react-semaphor 0.1.580 → 0.1.582
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/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-CUwGURJj.js → assistant-chat-CVtxjVEH.js} +6 -6
- package/dist/chunks/{bookmark-impact-BNyR-yDX.js → bookmark-impact-BDSeeRy7.js} +1 -1
- package/dist/chunks/{card-filter-builder-k9yqDSw8.js → card-filter-builder-CMZ5nwdC.js} +3 -3
- package/dist/chunks/{comparison-window-caption-DdLqMgiG.js → comparison-window-caption-sRFtnX1q.js} +15 -15
- package/dist/chunks/{dashboard-DvcAk8uJ.js → dashboard-BNn7fpDY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DBgS97ZH.js → dashboard-briefing-launcher-C9wf8KhD.js} +83 -83
- package/dist/chunks/{dashboard-controls-BiZ1rlNC.js → dashboard-controls-PDb9Gap5.js} +8 -8
- package/dist/chunks/{dashboard-json-B25xzYcJ.js → dashboard-json-CvtVy2UH.js} +1 -1
- package/dist/chunks/{dates-3Pah03_l.js → dates-B42fboJU.js} +5 -5
- package/dist/chunks/{edit-dashboard-visual-DYuO3mEU.js → edit-dashboard-visual-Cat0RWPp.js} +2154 -2144
- package/dist/chunks/{filter-reach-copy-CzLt96tq.js → filter-reach-copy-C-RH1rVx.js} +148 -148
- package/dist/chunks/{filter-value-text-DvvSNlho.js → filter-value-text-DXGYypEd.js} +1 -1
- package/dist/chunks/{index-BMZq6JT6.js → index-JWLo4R_t.js} +2 -2
- package/dist/chunks/pivot-header-presentation-MvvlxtIB.js +42 -0
- package/dist/chunks/{temporal-input-presentation-CqbJjIuu.js → pivot-result-contract-expectations-8tuNjRvG.js} +570 -560
- package/dist/chunks/{report-preferences-dialog-DpAetrdY.js → report-preferences-dialog-CwbsD6t6.js} +8 -8
- package/dist/chunks/{resolve-dashboard-input-context-CNxtkCzj.js → resolve-dashboard-input-context-6FP1-7aU.js} +6966 -6690
- package/dist/chunks/{saved-dashboard-context-Bnt0H7mi.js → saved-dashboard-context-D2G0uLji.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-Dwmvmf0S.js → semaphor-ready-indicator-UhNS27Gy.js} +26243 -26171
- package/dist/chunks/{shelf-drop-preview-context-CiveteBS.js → shelf-drop-preview-context-DPksW68k.js} +2 -2
- package/dist/chunks/{stored-dashboard-D3gu-D7A.js → stored-dashboard-KpTy4umJ.js} +1214 -1389
- package/dist/chunks/{table-export-sheet-BNGSJA2N.js → table-export-sheet-wBkk17aa.js} +1 -1
- package/dist/chunks/{variable-draft-C3_RL2gI.js → variable-draft-CP5I66_J.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +950 -942
- package/dist/format-utils/index.js +207 -206
- package/dist/index.js +12 -12
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +16 -6
- package/dist/types/lib/document/document-section-query-options.d.ts +3 -4
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +4 -1
- package/dist/types/lib/query-context/card-server-request.d.ts +6 -4
- package/dist/types/lib/table-formatting/table-totals-settings.d.ts +25 -2
- package/dist/types/lib/types/explorer-types.d.ts +7 -2
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +19 -2
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +12 -3
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/table-column-total.d.ts +42 -0
- package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +6 -1
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +0 -55
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
var _s = Object.defineProperty;
|
|
2
2
|
var Cs = (e, a, t) => a in e ? _s(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
3
|
var lt = (e, a, t) => Cs(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
-
import { _ as $s, $ as ws, a0 as xs, a1 as Ss, a2 as ks, a3 as qa, a4 as $e, a5 as Ts, a6 as he, a7 as Ee, a8 as la, a9 as ot, aa as Na, ab as Q, ac as G, ad as qe, ae as Rs, af as
|
|
5
|
-
import {
|
|
6
|
-
import { K as
|
|
7
|
-
import { ae as
|
|
8
|
-
import { L as
|
|
9
|
-
import { r as
|
|
10
|
-
import {
|
|
11
|
-
import { f as
|
|
12
|
-
import { p as
|
|
13
|
-
import { r as Ha, D as Ia, f as
|
|
14
|
-
import { N as
|
|
15
|
-
import { a7 as Ya, r as Ja, aN as
|
|
4
|
+
import { _ as $s, $ as ws, a0 as xs, a1 as Ss, a2 as ks, a3 as qa, a4 as $e, a5 as Ts, a6 as he, a7 as Ee, a8 as la, a9 as ot, aa as Na, ab as Q, ac as G, ad as qe, ae as Rs, af as As, ag as Ft, ah as Fs, ai as Ds, aj as Os, ak as Es, al as qs, am as Ns, an as Pa, ao as Ps, ap as Ls, aq as Ms, ar as Bs, as as Vs, at as js, au as Ks, av as ca, aw as La, ax as ua, ay as Ce, az as be, aA as Ne, aB as Ws, aC as Us, aD as Gs, o as Xe, aE as Qs, aF as Hs, aG as _t, aH as Ze, aI as zs, aJ as Ys, aK as Ma, aL as Dt, aM as Ct, aN as Js, aO as Xs, aP as Zs, aQ as ie, aR as Ba, aS as Va, aT as ct, aU as eo, aV as to, aW as fa, aX as $t, aY as ao, aZ as ma, a_ as so, a$ as ha, b0 as pa, b1 as et, b2 as ga, b3 as Fe, b4 as oo, b5 as He, m as no, b6 as ja, b7 as io, b8 as ro, b9 as lo, ba as Ka, a as co, bb as uo, bc as fo, bd as mo, be as ho, bf as po, bg as go, bh as bo, bi as yo, bj as vo, bk as Io, bl as _o, bm as ba, bn as Co, bo as $o, bp as wo, bq as xo, br as So, bs as ko, bt as To, bu as Ro, bv as Ao, bw as Fo, bx as Do, by as Oo } from "../chunks/resolve-dashboard-input-context-6FP1-7aU.js";
|
|
5
|
+
import { dC as Vr, bQ as jr, de as Kr, df as Wr, du as Ur, dt as Gr, dn as Qr, ey as Hr, dv as zr, dw as Yr, dY as Jr, cU as Xr, cV as Zr, cW as ed, cR as td, cS as ad, cT as sd, cN as od, cO as nd, cQ as id, cP as rd, cX as dd, dS as ld, dg as cd, cc as ud, e1 as fd, e2 as md, cb as hd, d8 as pd, dE as gd, cl as bd, eA as yd, eC as vd, c2 as Id, dV as _d, dH as Cd, e3 as $d, eV as wd, f4 as xd, eZ as Sd, dr as kd, ds as Td, ci as Rd, bM as Ad, eQ as Fd, dG as Dd, co as Od, dN as Ed, ch as qd, f8 as Nd, f9 as Pd, en as Ld, dF as Md, eI as Bd, fd as Vd, cF as jd, e_ as Kd, dm as Wd, cj as Ud, eb as Gd, ec as Qd, cY as Hd, cG as zd, dU as Yd, bG as Jd, dZ as Xd, el as Zd, dJ as el, eJ as tl, bH as al, bP as sl, e6 as ol, cA as nl, fb as il, eo as rl, dM as dl, em as ll, dX as cl, d7 as ul, d6 as fl, cg as ml, dT as hl, b_ as pl, c4 as gl, dR as bl, cx as yl, bE as vl, e$ as Il, f3 as _l, cp as Cl, e0 as $l, d_ as wl, eh as xl, bI as Sl, ep as kl, eR as Tl, dA as Rl, dB as Al, fe as Fl, ff as Dl, fh as Ol, b$ as El, c0 as ql, c1 as Nl, ck as Pl, cm as Ll, fa as Ml, ev as Bl, db as Vl, f as jl, cM as Kl, c9 as Wl, cu as Ul, b as Gl, cJ as Ql, dc as Hl, bS as zl, bT as Yl, dL as Jl, c8 as Xl, e8 as Zl, cq as ec, bz as tc, cd as ac, dp as sc, bW as oc, dz as nc, c3 as ic, d2 as rc, fg as dc, bN as lc, d4 as cc, e9 as uc, d5 as fc, ed as mc, eE as hc, eD as pc, dO as gc, cC as bc, ct as yc, cv as vc, l as Ic, cw as _c, et as Cc, dx as $c, dK as wc, bA as xc, bB as Sc, bC as kc, bJ as Tc, eX as Rc, eS as Ac, dD as Fc, eT as Dc, cz as Oc, ce as Ec, cI as qc, dy as Nc, es as Pc, d9 as Lc, da as Mc, bR as Bc, fc as Vc, dI as jc, eq as Kc, dd as Wc, eH as Uc, J as Gc, eW as Qc, c7 as Hc, f0 as zc, f1 as Yc, dk as Jc, cL as Xc, bV as Zc, d$ as eu, dW as tu, bD as au, cD as su, cE as ou, cf as nu, c_ as iu, bZ as ru, c5 as du, c6 as lu, dh as cu, di as uu, ca as fu, bK as mu, bY as hu, d0 as pu, eB as gu, ex as bu, f2 as yu, d1 as vu, c$ as Iu, f5 as _u, bU as Cu, ez as $u, cB as wu, ew as xu, cK as Su, ea as ku, dj as Tu, cy as Ru, dq as Au, bF as Fu, bX as Du, dP as Ou, eG as Eu, e7 as qu, cH as Nu, d3 as Pu, bO as Lu, dQ as Mu, f6 as Bu, e5 as Vu, e4 as ju, eu as Ku, eF as Wu, cn as Uu, cs as Gu, bL as Qu, eY as Hu, eU as zu, f7 as Yu, cZ as Ju, er as Xu, ek as Zu, dl as ef, ej as tf, eL as af, eg as sf, ei as of, cr as nf, ee as rf, ef as df, eK as lf, eM as cf, eN as uf, eO as ff, eP as mf } from "../chunks/resolve-dashboard-input-context-6FP1-7aU.js";
|
|
6
|
+
import { K as Eo, L as Wa, G as Ua, M as qo, N as No, O as Ot, P as Ga, Q as Qa, A as we, R as Po, S as Lo, H as Mo, T as Bo } from "../chunks/bookmark-state-BEl_G9vr.js";
|
|
7
|
+
import { ae as pf, ay as gf, Y as bf, Z as yf, a8 as vf, ac as If, a9 as _f, aa as Cf, ab as $f, af as wf, aw as xf, aq as Sf, D as kf, au as Tf, F as Rf, a1 as Af, I as Ff, ax as Df, a4 as Of, a5 as Ef, as as qf, ad as Nf, a2 as Pf, ao as Lf, at as Mf, av as Bf, ap as Vf, ar as jf, a0 as Kf, _ as Wf, ah as Uf, am as Gf, W as Qf, X as Hf, U as zf, a3 as Yf, an as Jf, az as Xf, ai as Zf, ag as em, aj as tm, ak as am, al as sm, a7 as om, a6 as nm, $ as im } from "../chunks/bookmark-state-BEl_G9vr.js";
|
|
8
|
+
import { L as dm, G as lm, H as cm, g as um, F as fm, q as mm, A as hm, D as pm, u as gm, v as bm, E as ym, C as vm, s as Im, t as _m, p as Cm, B as $m, I as wm, w as xm, y as Sm, x as km, z as Tm } from "../chunks/stored-dashboard-KpTy4umJ.js";
|
|
9
|
+
import { r as Vo, a5 as ya, aD as jo } from "../chunks/pivot-result-contract-expectations-8tuNjRvG.js";
|
|
10
|
+
import { aG as Am, aF as Fm, aA as Dm, aE as Om, aH as Em, au as qm } from "../chunks/pivot-result-contract-expectations-8tuNjRvG.js";
|
|
11
|
+
import { f as Ko, w as Wo, D as va, r as Uo } from "../chunks/metric-comparison-n9NsIa-2.js";
|
|
12
|
+
import { p as Go } from "../chunks/report-runtime-context-BhPzLTbS.js";
|
|
13
|
+
import { r as Ha, D as Ia, f as Qo, h as za, i as Ho, j as zo, k as Yo, e as wt, l as Jo, v as Xo } from "../chunks/filter-reach-copy-C-RH1rVx.js";
|
|
14
|
+
import { N as Pm, R as Lm, n as Mm, q as Bm, u as Vm, t as jm, F as Km, B as Wm, m as Um, p as Gm, I as Qm, O as Hm, P as zm, C as Ym, K as Jm, E as Xm, w as Zm, x as eh, z as th, o as ah, y as sh, Q as oh, M as nh, L as ih, G as rh, H as dh, s as lh, J as ch, A as uh } from "../chunks/filter-reach-copy-C-RH1rVx.js";
|
|
15
|
+
import { a7 as Ya, r as Ja, aN as Zo, a_ as Pe, aL as en, aQ as tn, aK as an, aE as sn, aM as on, a5 as nn } from "../chunks/validators-B8fpdinG.js";
|
|
16
16
|
import "../chunks/schema-C9NPiIru.js";
|
|
17
|
-
import { i as Xa, C as je, D as
|
|
17
|
+
import { i as Xa, C as je, D as rn, e as dn, b as ln } from "../chunks/edit-9df1zOWe.js";
|
|
18
18
|
import "../chunks/matrix-operation-contract-DCVinw1o.js";
|
|
19
|
-
import { A as Me, B as ze, z as
|
|
20
|
-
import { y as _a, C as
|
|
19
|
+
import { A as Me, B as ze, z as cn, f as un, y as Et, t as xe, e as fn } from "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
20
|
+
import { y as _a, C as mn } from "../chunks/matrix-analytical-definition-dkS8szLM.js";
|
|
21
21
|
import "zod";
|
|
22
22
|
import "../value-format-preferences/index.js";
|
|
23
|
-
import { C as
|
|
24
|
-
import { r as
|
|
23
|
+
import { C as mh, a as hh, S as ph } from "../chunks/pickers-DkqmtnTL.js";
|
|
24
|
+
import { r as hn } from "../chunks/index-CV_Kzou0.js";
|
|
25
25
|
import "../chunks/context-BTLBjQNh.js";
|
|
26
|
-
import { v as Ye, a as
|
|
27
|
-
import { S as
|
|
28
|
-
import { r as
|
|
29
|
-
import { b as
|
|
30
|
-
import { r as ye, b as
|
|
31
|
-
import { n as
|
|
32
|
-
import { e as
|
|
33
|
-
const
|
|
26
|
+
import { v as Ye, a as pn, i as Ca, o as ut, d as gn, b as bn, c as yn } from "../chunks/variable-draft-CP5I66_J.js";
|
|
27
|
+
import { S as bh, f as yh, g as vh, e as Ih, n as _h } from "../chunks/variable-draft-CP5I66_J.js";
|
|
28
|
+
import { r as $h, a as wh } from "../chunks/dates-B42fboJU.js";
|
|
29
|
+
import { b as Sh, d as kh } from "../chunks/bookmark-impact-BDSeeRy7.js";
|
|
30
|
+
import { r as ye, b as vn, s as In, a as _n } from "../chunks/resolver-DG_tfEpt.js";
|
|
31
|
+
import { n as Cn, r as $n } from "../chunks/index-BVKzKl5d.js";
|
|
32
|
+
import { e as Rh } from "../chunks/brand-BoUV0iHF.js";
|
|
33
|
+
const kr = [
|
|
34
34
|
"cardType",
|
|
35
35
|
"sql",
|
|
36
36
|
"python",
|
|
@@ -46,7 +46,7 @@ const Sr = [
|
|
|
46
46
|
"globalDateComparison",
|
|
47
47
|
"calendarContext",
|
|
48
48
|
"sqlRowLimit"
|
|
49
|
-
],
|
|
49
|
+
], Tr = [
|
|
50
50
|
"cardId",
|
|
51
51
|
"cardTitle",
|
|
52
52
|
"cache_config",
|
|
@@ -70,10 +70,10 @@ function ve(e) {
|
|
|
70
70
|
function Ke(e) {
|
|
71
71
|
return typeof e == "string" ? e : "";
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function wn(e, a = {}) {
|
|
74
74
|
const t = ve(e), s = qt(a), n = {};
|
|
75
75
|
if (t.calendarContext !== void 0) {
|
|
76
|
-
const i =
|
|
76
|
+
const i = Go(t.calendarContext);
|
|
77
77
|
if (!i.ok)
|
|
78
78
|
throw new ce(
|
|
79
79
|
`${s}calendarContext: ${i.issues.map((d) => d.message).join("; ")}`,
|
|
@@ -90,20 +90,20 @@ function $n(e, a = {}) {
|
|
|
90
90
|
o.issues
|
|
91
91
|
);
|
|
92
92
|
if (t.resolvedPrimaryDateField && (n.resolvedPrimaryDateField = t.resolvedPrimaryDateField), t.globalDateComparison !== void 0) {
|
|
93
|
-
const i =
|
|
93
|
+
const i = Ko(t.globalDateComparison);
|
|
94
94
|
if (!i.ok)
|
|
95
95
|
throw new ce(
|
|
96
96
|
`${s}Invalid globalDateComparison: ${i.errors.map((d) => `${d.path}: ${d.message}`).join("; ")}`,
|
|
97
97
|
"globalDateComparison",
|
|
98
98
|
i.errors
|
|
99
99
|
);
|
|
100
|
-
n.globalDateComparison =
|
|
100
|
+
n.globalDateComparison = Wo(
|
|
101
101
|
t.globalDateComparison
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
return n;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Rr(e, a = {}) {
|
|
107
107
|
const t = ve(e), s = qt(a), n = {};
|
|
108
108
|
if (t.pagination !== void 0) {
|
|
109
109
|
const o = ve(t.pagination), i = o.page, d = o.pageSize;
|
|
@@ -135,7 +135,7 @@ function Tr(e, a = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
return n;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ar(e, a = {}) {
|
|
139
139
|
const t = ve(e), s = qt(a), n = (x) => new ce(`${s}${x} is required`, x), o = Ke(t.connection_id).trim();
|
|
140
140
|
if (!o) throw n("connection_id");
|
|
141
141
|
const i = Ke(t.cardType).trim();
|
|
@@ -143,11 +143,11 @@ function Rr(e, a = {}) {
|
|
|
143
143
|
const d = t.resultOwner;
|
|
144
144
|
if (d !== "config" && d !== "freeform" && d !== "none")
|
|
145
145
|
throw n("resultOwner");
|
|
146
|
-
const l = ve(t.cardConfig), c = Ke(t.sql), h = Ke(t.python),
|
|
147
|
-
if (d === "config" && !
|
|
146
|
+
const l = ve(t.cardConfig), c = Ke(t.sql), h = Ke(t.python), g = !!a.configOptional || Object.keys(l).length > 0;
|
|
147
|
+
if (d === "config" && !g) throw n("cardConfig");
|
|
148
148
|
if (d === "freeform" && !c.trim()) throw n("sql");
|
|
149
149
|
const v = xs({
|
|
150
|
-
hasExecutableConfig:
|
|
150
|
+
hasExecutableConfig: g,
|
|
151
151
|
sql: c,
|
|
152
152
|
normalizedPython: h
|
|
153
153
|
});
|
|
@@ -178,13 +178,13 @@ function Rr(e, a = {}) {
|
|
|
178
178
|
controlDefinitions: w.controlDefinitions,
|
|
179
179
|
cardControlDefinitions: w.cardControlDefinitions,
|
|
180
180
|
controlBindings: w.controlBindings,
|
|
181
|
-
|
|
181
|
+
...wn(t, a),
|
|
182
182
|
...typeof t.sqlRowLimit == "number" && Number.isInteger(t.sqlRowLimit) && t.sqlRowLimit > 0 ? { sqlRowLimit: t.sqlRowLimit } : {}
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
const ft = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"],
|
|
185
|
+
const ft = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"], xn = ["spacing", "canvasPadding", "canvas", "cardCorners", "chartColors"], Za = ["light", "dark"];
|
|
186
186
|
function Fr(e) {
|
|
187
|
-
const a = [], t = ht(e.globalStyle) ? e.globalStyle : {}, s = ht(t.default) ? t.default : {}, n = ht(t.dark) ? t.dark : {}, o = (
|
|
187
|
+
const a = [], t = ht(e.globalStyle) ? e.globalStyle : {}, s = ht(t.default) ? t.default : {}, n = ht(t.dark) ? t.dark : {}, o = (g) => ye(n, g) ?? ye(s, g), i = {}, d = o(["gridLayout", "margin"]);
|
|
188
188
|
Array.isArray(d) && typeof d[1] == "number" && (i.spacing = De("spacing", d[1], a), i.canvasPadding = De("canvasPadding", d[1], a));
|
|
189
189
|
const l = o(["cardBorderRadius"]);
|
|
190
190
|
typeof l == "number" && (i.cardCorners = De("cardCorners", l, a));
|
|
@@ -192,26 +192,26 @@ function Fr(e) {
|
|
|
192
192
|
typeof c == "number" && (i.controlCorners = De("controlCorners", c, a));
|
|
193
193
|
const h = o(["chart", "options", "borderRadius"]);
|
|
194
194
|
typeof h == "number" && (i.barCorners = De("barCorners", h, a));
|
|
195
|
-
for (const
|
|
196
|
-
const v =
|
|
197
|
-
I !== void 0 && (i.canvas = { ...i.canvas, [
|
|
198
|
-
const w =
|
|
195
|
+
for (const g of Za) {
|
|
196
|
+
const v = g === "light" ? ye(s, ["canvasTheme"]) : o(["canvasTheme"]), I = Tn(v, a);
|
|
197
|
+
I !== void 0 && (i.canvas = { ...i.canvas, [g]: I });
|
|
198
|
+
const w = kn(s, n, g);
|
|
199
199
|
if (w) {
|
|
200
200
|
const x = w.filter(Xa).map((E) => E.toLowerCase());
|
|
201
|
-
x.length < w.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${
|
|
201
|
+
x.length < w.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${g}: ${w.length - x.length} colours that aren't hex` }), x.length >= je.min && (i.chartColors = { ...i.chartColors, [g]: x.slice(0, je.max) }), x.length > je.max && a.push({ field: "chartColors", kind: "clamped", detail: `${g}: kept the first ${je.max} colours` });
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
return { style:
|
|
204
|
+
return { style: Sn(i, e.organizationAppearance, a), notes: a };
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
const s =
|
|
206
|
+
function Sn(e, a, t) {
|
|
207
|
+
const s = vn({ organizationAppearance: a ? Cn(a).spec : null }), n = { ...e };
|
|
208
208
|
for (const o of Object.keys(e)) {
|
|
209
|
-
const i =
|
|
209
|
+
const i = _n[o], d = o === "canvas" || o === "chartColors";
|
|
210
210
|
for (const l of Za) {
|
|
211
|
-
const c =
|
|
211
|
+
const c = In(n, o, l);
|
|
212
212
|
if (c === void 0) continue;
|
|
213
|
-
const h =
|
|
214
|
-
if (!(!h && !
|
|
213
|
+
const h = xn.includes(o) && ye($n(a, l), i) !== void 0, g = JSON.stringify(ye(s.schemes[l], i)) === JSON.stringify(c);
|
|
214
|
+
if (!(!h && !g))
|
|
215
215
|
if ((d || l === "light") && t.push({ field: o, kind: h ? "brand_wins" : "equal_to_inherited", detail: d ? l : `${JSON.stringify(c)}` }), d) {
|
|
216
216
|
const v = { ...n[o] };
|
|
217
217
|
delete v[l], Object.keys(v).length > 0 ? n[o] = v : delete n[o];
|
|
@@ -220,7 +220,7 @@ function xn(e, a, t) {
|
|
|
220
220
|
}
|
|
221
221
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function kn(e, a, t) {
|
|
224
224
|
const s = ye(e, ["chart", "dataset", "backgroundColor"]), n = ye(a, ["chart", "dataset", "backgroundColor"]), o = mt(ft, s);
|
|
225
225
|
if (t === "light") return Array.isArray(s) ? o : void 0;
|
|
226
226
|
const i = mt(o, mt(ft, n));
|
|
@@ -232,7 +232,7 @@ function mt(e, a) {
|
|
|
232
232
|
const t = Math.max(e.length, a.length);
|
|
233
233
|
return Array.from({ length: t }, (s, n) => a[n] !== void 0 ? String(a[n]) : e[n]);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Tn(e, a) {
|
|
236
236
|
if (!(e == null || e === "")) {
|
|
237
237
|
if (e === "muted") return "muted";
|
|
238
238
|
if (e === "clear") return "background";
|
|
@@ -241,7 +241,7 @@ function kn(e, a) {
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
function De(e, a, t) {
|
|
244
|
-
const { min: s, max: n } =
|
|
244
|
+
const { min: s, max: n } = rn[e], o = Math.min(n, Math.max(s, Math.round(a)));
|
|
245
245
|
return o !== a && t.push({ field: e, kind: "clamped", detail: `${a} → ${o}` }), o;
|
|
246
246
|
}
|
|
247
247
|
function ht(e) {
|
|
@@ -258,21 +258,21 @@ const pt = {
|
|
|
258
258
|
chartColors: (e, a) => a.chartColors = e,
|
|
259
259
|
barCorners: (e, a) => a.barCorners = e
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function Rn(e) {
|
|
262
262
|
var t;
|
|
263
263
|
const a = {};
|
|
264
264
|
for (const [s, n] of Object.entries(e ?? {}))
|
|
265
265
|
n !== void 0 && ((t = pt[s]) == null || t.call(pt, n, a));
|
|
266
266
|
return a;
|
|
267
267
|
}
|
|
268
|
-
const
|
|
268
|
+
const An = {
|
|
269
269
|
global_date: "The date filter for the whole report can't be changed through the MCP. Change it in the editor; removing or excluding it works.",
|
|
270
270
|
not_semantic: "This filter reads a database table, not a dataset, so it can't be changed through the MCP. Change it in the editor; removing or excluding it works.",
|
|
271
271
|
scope_not_expressible: "This filter applies to chosen cards rather than whole sheets, so it can't be changed through the MCP. Change it in the editor; removing or excluding it works."
|
|
272
272
|
};
|
|
273
273
|
function Fn(e, a, t = {}) {
|
|
274
274
|
var d;
|
|
275
|
-
const s = $e(e), n =
|
|
275
|
+
const s = $e(e), n = Eo(a.scope), o = new Set(Wa(e).map((l) => l.id)), i = {
|
|
276
276
|
reaches: [],
|
|
277
277
|
excluded: [
|
|
278
278
|
.../* @__PURE__ */ new Set([
|
|
@@ -291,7 +291,7 @@ function Fn(e, a, t = {}) {
|
|
|
291
291
|
], i;
|
|
292
292
|
}
|
|
293
293
|
for (const l of s.reachedCards({ inputId: a.id })) {
|
|
294
|
-
const c = Ee(a, l.card, t), h = c.reach,
|
|
294
|
+
const c = Ee(a, l.card, t), h = c.reach, g = () => {
|
|
295
295
|
const v = he(l.card);
|
|
296
296
|
return {
|
|
297
297
|
cardId: l.cardId,
|
|
@@ -311,7 +311,7 @@ function Fn(e, a, t = {}) {
|
|
|
311
311
|
(i.blocked ?? (i.blocked = [])).push({ cardId: l.cardId, title: l.card.title ?? "", reason: h });
|
|
312
312
|
break;
|
|
313
313
|
case "relationship":
|
|
314
|
-
(i.relationshipPending ?? (i.relationshipPending = [])).push(
|
|
314
|
+
(i.relationshipPending ?? (i.relationshipPending = [])).push(g());
|
|
315
315
|
break;
|
|
316
316
|
case "sqlTemplate":
|
|
317
317
|
(i.sqlPending ?? (i.sqlPending = [])).push({ cardId: l.cardId, title: l.card.title ?? "" });
|
|
@@ -319,7 +319,7 @@ function Fn(e, a, t = {}) {
|
|
|
319
319
|
case "excluded":
|
|
320
320
|
break;
|
|
321
321
|
case "notApplicable":
|
|
322
|
-
he(l.card) && i.notReached.push({ ...
|
|
322
|
+
he(l.card) && i.notReached.push({ ...g(), ...c.reason ? { reason: c.reason } : {} });
|
|
323
323
|
break;
|
|
324
324
|
default: {
|
|
325
325
|
const v = h;
|
|
@@ -330,7 +330,7 @@ function Fn(e, a, t = {}) {
|
|
|
330
330
|
for (const l of s.reachedVariables({ inputId: a.id })) {
|
|
331
331
|
const c = Ua(e, l.variableId);
|
|
332
332
|
if ((c == null ? void 0 : c.kind) !== "variable") continue;
|
|
333
|
-
const h = Ee(a, c.card, t),
|
|
333
|
+
const h = Ee(a, c.card, t), g = he(c.card), v = { cardId: c.id, title: c.variable.name, ...(g == null ? void 0 : g.kind) === "semantic" ? { datasetName: g.datasetName } : {} };
|
|
334
334
|
switch (h.reach) {
|
|
335
335
|
case "bound":
|
|
336
336
|
case "automatic":
|
|
@@ -357,16 +357,16 @@ function Fn(e, a, t = {}) {
|
|
|
357
357
|
}
|
|
358
358
|
return i;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Dn(e, a) {
|
|
361
361
|
var n;
|
|
362
362
|
const t = a.scope;
|
|
363
363
|
if (t.kind === "allSheets") {
|
|
364
364
|
if ((n = t.sheetKinds) != null && n.length && !t.sheetKinds.includes("dashboard")) return;
|
|
365
|
-
const o =
|
|
365
|
+
const o = qo(t);
|
|
366
366
|
return {
|
|
367
367
|
sheetIds: "all",
|
|
368
368
|
...o.length ? { exceptSheetIds: [...o] } : {},
|
|
369
|
-
...
|
|
369
|
+
...No(t) ? { includesDocumentSheets: !0 } : {}
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
if (t.kind !== "sheets") return;
|
|
@@ -387,7 +387,7 @@ function ts(e, a, t, s) {
|
|
|
387
387
|
label: n.label,
|
|
388
388
|
editable: !1,
|
|
389
389
|
kind: D,
|
|
390
|
-
notEditable: { reason: y, message:
|
|
390
|
+
notEditable: { reason: y, message: An[y] },
|
|
391
391
|
reaches: o.reaches,
|
|
392
392
|
excluded: o.excluded,
|
|
393
393
|
...o.blocked ? { blocked: o.blocked } : {},
|
|
@@ -397,13 +397,13 @@ function ts(e, a, t, s) {
|
|
|
397
397
|
if (n.filter.kind === "global-date") return i("global_date", "global_date");
|
|
398
398
|
const d = ks(n.filter).filter((y) => y.kind === "semantic");
|
|
399
399
|
if (d.length !== 1 || d[0].kind !== "semantic") return i("not_semantic", "field");
|
|
400
|
-
const l =
|
|
400
|
+
const l = Dn(e, n);
|
|
401
401
|
if (!l || a.origin !== "embeddedInput") return i("scope_not_expressible", "field");
|
|
402
402
|
const c = ((E = n.filter.fieldMeta) == null ? void 0 : E.name) ?? ((_ = n.filter.column) == null ? void 0 : _.split(".").pop()) ?? "", h = Ha({
|
|
403
403
|
dashboard: e,
|
|
404
404
|
target: { kind: "dashboardInput", input: n, scope: {} },
|
|
405
405
|
calendar: es(t, void 0)
|
|
406
|
-
}).value,
|
|
406
|
+
}).value, g = Ya(n.filter.dataType), v = g || (S = h == null ? void 0 : h.values) == null ? void 0 : S.filter((y) => ["string", "number", "boolean"].includes(typeof y)), I = Ja(h && "relativeMeta" in h ? h.relativeMeta : void 0), w = g ? I : void 0, x = w ? Zo(
|
|
407
407
|
w,
|
|
408
408
|
{ use: "filterDefault", columnHasTime: qa(n.filter) === "datetime" },
|
|
409
409
|
"defaultPeriod"
|
|
@@ -419,7 +419,7 @@ function ts(e, a, t, s) {
|
|
|
419
419
|
...v != null && v.length ? { defaultValues: v } : {},
|
|
420
420
|
...w ? { defaultPeriod: w } : {},
|
|
421
421
|
...x ? { defaultPeriodReadOnly: x } : {},
|
|
422
|
-
...
|
|
422
|
+
...g ? { datePicker: n.filter.dateSelectionMode === "day" ? "day" : n.filter.dateSelectionMode === "months" ? "month" : "range" } : {},
|
|
423
423
|
...l,
|
|
424
424
|
...o
|
|
425
425
|
};
|
|
@@ -455,7 +455,7 @@ function ns(e) {
|
|
|
455
455
|
field: s
|
|
456
456
|
}));
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function On(e) {
|
|
459
459
|
const a = os(e), t = /* @__PURE__ */ new Map();
|
|
460
460
|
for (const { field: s } of ns(e)) {
|
|
461
461
|
const n = ss(s, a);
|
|
@@ -463,14 +463,14 @@ function Dn(e) {
|
|
|
463
463
|
}
|
|
464
464
|
return [...t.values()];
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function En(e, a, t) {
|
|
467
467
|
if (!t) return;
|
|
468
468
|
const s = la(a), n = ns(e).find((d) => la(d.ref) === s);
|
|
469
469
|
if (!n) return;
|
|
470
470
|
const o = ss(n.field, os(e)), i = o ? t[Nt(o)] : void 0;
|
|
471
471
|
return i ? ot(i, n.field.name, o.datasetName) : void 0;
|
|
472
472
|
}
|
|
473
|
-
const xt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "band"],
|
|
473
|
+
const xt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "band"], qn = {
|
|
474
474
|
orientation: "orientation",
|
|
475
475
|
stack: "stacking",
|
|
476
476
|
donut: "donut hole",
|
|
@@ -481,28 +481,28 @@ const xt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "
|
|
|
481
481
|
comparisonDisplay: "comparison display",
|
|
482
482
|
inheritComparison: "dashboard comparison",
|
|
483
483
|
band: "band under its value"
|
|
484
|
-
},
|
|
485
|
-
function
|
|
486
|
-
const a = `${e.sql ? "SQL " : ""}${
|
|
484
|
+
}, Nn = { x: "xAxisConfig", y: "yAxisConfig" }, gt = { x: "horizontal", y: "vertical" };
|
|
485
|
+
function Pn(e) {
|
|
486
|
+
const a = `${e.sql ? "SQL " : ""}${qs(e.type)}`;
|
|
487
487
|
return `${/^[aeiou]/i.test(a) ? "an" : "a"} ${a}`;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Ln(e, a, t) {
|
|
490
490
|
const s = Object.fromEntries(Object.entries(a).filter(([n, o]) => o !== void 0 && !t.includes(n)));
|
|
491
491
|
return Object.keys(s).length ? { op: "card.update", cardId: e.cardRef, ...s } : void 0;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Mn(e, a, t, s, n) {
|
|
494
494
|
var I, w, x, E, _, S, y, D, $, N;
|
|
495
|
-
const o = xt.filter((
|
|
495
|
+
const o = xt.filter((p) => t[p] !== void 0);
|
|
496
496
|
if (!o.length) return {};
|
|
497
|
-
const i = xt.filter((
|
|
498
|
-
for (const
|
|
497
|
+
const i = xt.filter((p) => a.settings.has(p)), d = o.filter((p) => !a.settings.has(p));
|
|
498
|
+
for (const p of d)
|
|
499
499
|
n.push(
|
|
500
500
|
Q("setting_not_for_card", {
|
|
501
|
-
message: `${G(e.title)} is ${
|
|
502
|
-
path: `${s.path}.${
|
|
503
|
-
fix: i.length ? `Leave out ${
|
|
501
|
+
message: `${G(e.title)} is ${Pn(a)}, which has no ${qn[p]}.`,
|
|
502
|
+
path: `${s.path}.${p}`,
|
|
503
|
+
fix: i.length ? `Leave out ${p}; this card takes ${i.join(", ")}.` : `Leave out ${p}.`,
|
|
504
504
|
allowed: i,
|
|
505
|
-
suggestedChange:
|
|
505
|
+
suggestedChange: Ln(s, t, d)
|
|
506
506
|
})
|
|
507
507
|
);
|
|
508
508
|
if (d.length) return {};
|
|
@@ -512,37 +512,41 @@ function Ln(e, a, t, s, n) {
|
|
|
512
512
|
...t.stack !== void 0 ? { stack: t.stack } : {},
|
|
513
513
|
...t.donut !== void 0 ? { donut: t.donut } : {}
|
|
514
514
|
};
|
|
515
|
-
["orientation", "stack", "donut"].some((
|
|
516
|
-
const
|
|
517
|
-
if (t.totals
|
|
518
|
-
const
|
|
519
|
-
|
|
515
|
+
["orientation", "stack", "donut"].some((p) => h[p] !== c[p]) && (l.variant = Rs(a.type, h));
|
|
516
|
+
const g = l.variant ? As(e, l.variant) : e, v = Ft(g);
|
|
517
|
+
if (t.totals) {
|
|
518
|
+
const p = Fs(e, a, t.totals, ((w = v.totals) == null ? void 0 : w.row) ?? !1, s, n);
|
|
519
|
+
p && (l.totals = p);
|
|
520
|
+
}
|
|
521
|
+
if (t.dataLabels) {
|
|
522
|
+
const p = {};
|
|
523
|
+
t.dataLabels.show !== Ds(g) && (p.show = t.dataLabels.show);
|
|
520
524
|
const k = t.dataLabels.format;
|
|
521
|
-
if (k === null && ((x = v.dataLabels) != null && x.format) && (
|
|
522
|
-
const T =
|
|
523
|
-
T && !Pe(T, (E = v.dataLabels) == null ? void 0 : E.format) && (
|
|
525
|
+
if (k === null && ((x = v.dataLabels) != null && x.format) && (p.format = null), k) {
|
|
526
|
+
const T = Bn(e, a, k, `${s.path}.dataLabels.format`, n);
|
|
527
|
+
T && !Pe(T, (E = v.dataLabels) == null ? void 0 : E.format) && (p.format = T);
|
|
524
528
|
}
|
|
525
|
-
Object.keys(
|
|
529
|
+
Object.keys(p).length && (l.dataLabels = p);
|
|
526
530
|
}
|
|
527
531
|
if (t.legend) {
|
|
528
|
-
const
|
|
529
|
-
t.legend.show !== ((_ = v.legend) == null ? void 0 : _.show) && (
|
|
532
|
+
const p = {};
|
|
533
|
+
t.legend.show !== ((_ = v.legend) == null ? void 0 : _.show) && (p.show = t.legend.show), t.legend.position !== void 0 && t.legend.position !== ((S = v.legend) == null ? void 0 : S.position) && (p.position = t.legend.position), Object.keys(p).length && (l.legend = p);
|
|
530
534
|
}
|
|
531
535
|
if (t.axes) {
|
|
532
|
-
const
|
|
536
|
+
const p = Os(g.type, g.preferences), k = {};
|
|
533
537
|
for (const T of ["x", "y"]) {
|
|
534
538
|
const L = t.axes[T];
|
|
535
539
|
if (!L) continue;
|
|
536
|
-
const V =
|
|
537
|
-
V && (k[
|
|
540
|
+
const V = Vn(e, T, L, ((y = v.axes) == null ? void 0 : y[T]) ?? {}, T === p, `${s.path}.axes.${T}`, n);
|
|
541
|
+
V && (k[Nn[T]] = V);
|
|
538
542
|
}
|
|
539
543
|
Object.keys(k).length && (l.axes = k);
|
|
540
544
|
}
|
|
541
545
|
if (t.comparisonDisplay) {
|
|
542
|
-
const
|
|
543
|
-
T !== void 0 && T !== ((
|
|
546
|
+
const p = (D = e.preferences) == null ? void 0 : D.comparisonPresentation, k = {}, { show: T, mode: L, precision: V } = t.comparisonDisplay;
|
|
547
|
+
T !== void 0 && T !== ((p == null ? void 0 : p.showComparison) ?? !0) && (k.show = T), L !== void 0 && L !== ((p == null ? void 0 : p.displayMode) ?? "difference") && (k.mode = L), V !== void 0 && V !== ((p == null ? void 0 : p.precision) ?? null) && (k.precision = V), Object.keys(k).length && (l.comparisonDisplay = k);
|
|
544
548
|
}
|
|
545
|
-
return t.inheritComparison !== void 0 && t.inheritComparison !== ((($ = e.preferences) == null ? void 0 : $.inheritGlobalComparison) !== !1) && (l.inheritComparison = t.inheritComparison), t.band !== void 0 && (t.band === "trend" && !
|
|
549
|
+
return t.inheritComparison !== void 0 && t.inheritComparison !== ((($ = e.preferences) == null ? void 0 : $.inheritGlobalComparison) !== !1) && (l.inheritComparison = t.inheritComparison), t.band !== void 0 && (t.band === "trend" && !Es(e.config) ? n.push(
|
|
546
550
|
Q("value_invalid", {
|
|
547
551
|
message: `${G(e.title)} has no Trend By date, so it has no trend to show.`,
|
|
548
552
|
path: `${s.path}.band`,
|
|
@@ -551,8 +555,8 @@ function Ln(e, a, t, s, n) {
|
|
|
551
555
|
})
|
|
552
556
|
) : t.band !== (((N = e.config) == null ? void 0 : N.kpiBand) ?? "automatic") && (l.band = t.band === "automatic" ? null : t.band)), l;
|
|
553
557
|
}
|
|
554
|
-
function
|
|
555
|
-
const o = String(t.type), i =
|
|
558
|
+
function Bn(e, a, t, s, n) {
|
|
559
|
+
const o = String(t.type), i = Ns("cartesian", "number"), d = Me(o), l = d == null ? void 0 : d.safeParse(t);
|
|
556
560
|
if (!i.includes(o) || !(l != null && l.success)) {
|
|
557
561
|
const h = l && !l.success ? l.error.issues[0] : void 0;
|
|
558
562
|
n.push(
|
|
@@ -572,7 +576,7 @@ function Mn(e, a, t, s, n) {
|
|
|
572
576
|
}
|
|
573
577
|
return l.data;
|
|
574
578
|
}
|
|
575
|
-
function
|
|
579
|
+
function Vn(e, a, t, s, n, o, i) {
|
|
576
580
|
const d = {};
|
|
577
581
|
t.title !== void 0 && (t.title !== null && !t.title.trim() ? i.push(Q("value_invalid", { message: "An axis title can't be empty.", path: `${o}.title`, fix: "Send a title, or null for none." })) : (t.title ?? void 0) !== s.title && (d.title = t.title));
|
|
578
582
|
const l = ["min", "max"].filter((c) => t[c] !== void 0 && t[c] !== null);
|
|
@@ -588,14 +592,14 @@ function Bn(e, a, t, s, n, o, i) {
|
|
|
588
592
|
return;
|
|
589
593
|
}
|
|
590
594
|
if (n) {
|
|
591
|
-
for (const
|
|
592
|
-
const v = t[
|
|
595
|
+
for (const g of ["min", "max"]) {
|
|
596
|
+
const v = t[g];
|
|
593
597
|
if (v !== void 0) {
|
|
594
598
|
if (v !== null && !Number.isFinite(v)) {
|
|
595
|
-
i.push(Q("value_invalid", { message: `An axis ${
|
|
599
|
+
i.push(Q("value_invalid", { message: `An axis ${g} must be a number.`, path: `${o}.${g}` }));
|
|
596
600
|
return;
|
|
597
601
|
}
|
|
598
|
-
(v ?? void 0) !== s[
|
|
602
|
+
(v ?? void 0) !== s[g] && (d[g] = v);
|
|
599
603
|
}
|
|
600
604
|
}
|
|
601
605
|
const c = t.min !== void 0 ? t.min : s.min, h = t.max !== void 0 ? t.max : s.max;
|
|
@@ -628,14 +632,14 @@ function St(e, a, t, s) {
|
|
|
628
632
|
const { [s]: n, ...o } = t;
|
|
629
633
|
return Object.keys(o).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: o } } : void 0;
|
|
630
634
|
}
|
|
631
|
-
function
|
|
635
|
+
function jn(e, a, t) {
|
|
632
636
|
const { hidden: s, width: n, ...o } = t;
|
|
633
637
|
return Object.keys(o).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: o } } : void 0;
|
|
634
638
|
}
|
|
635
639
|
function We(e, a, t) {
|
|
636
640
|
return { op: "card.update", cardId: e.cardRef, columns: { [a]: { format: t } } };
|
|
637
641
|
}
|
|
638
|
-
function
|
|
642
|
+
function Kn(e, a, t, s, n, o, i) {
|
|
639
643
|
var c;
|
|
640
644
|
const d = n.label;
|
|
641
645
|
if (d === void 0 || d === t.label) return;
|
|
@@ -652,7 +656,7 @@ function jn(e, a, t, s, n, o, i) {
|
|
|
652
656
|
return;
|
|
653
657
|
}
|
|
654
658
|
if (d === null) {
|
|
655
|
-
const h = ((c =
|
|
659
|
+
const h = ((c = En(e, t.ref, o.catalogs)) == null ? void 0 : c.label) || t.field || t.label;
|
|
656
660
|
return t.labelInherited && t.label === h ? void 0 : { key: t.labelKey, label: h, origin: "semantic" };
|
|
657
661
|
}
|
|
658
662
|
if (!d.trim()) {
|
|
@@ -661,28 +665,28 @@ function jn(e, a, t, s, n, o, i) {
|
|
|
661
665
|
}
|
|
662
666
|
return { key: t.labelKey, label: d };
|
|
663
667
|
}
|
|
664
|
-
function
|
|
665
|
-
var
|
|
668
|
+
function Wn(e, a, t, s, n, o, i) {
|
|
669
|
+
var p, k;
|
|
666
670
|
const d = `${Se(o.path, s)}.format`;
|
|
667
671
|
if (!a.settings.has("columns.format")) {
|
|
668
672
|
i.push(Q("setting_not_for_card", { message: `${G(e.title)} takes no column formats.`, path: d }));
|
|
669
673
|
return;
|
|
670
674
|
}
|
|
671
|
-
const l = t.ref, c = ((
|
|
675
|
+
const l = t.ref, c = ((p = o.modelFormats) == null ? void 0 : p.status) === "read" ? o.modelFormats.formats : void 0, h = l.kind === "matrixLevel" ? c == null ? void 0 : c[l.levelId] : l.kind === "matrixMeasure" ? c == null ? void 0 : c[l.measureId] : void 0, g = Vo({
|
|
672
676
|
card: e,
|
|
673
677
|
column: l,
|
|
674
678
|
...c ? { modelFormats: c } : {},
|
|
675
679
|
...h ? { catalogFormat: h } : {}
|
|
676
|
-
}), v =
|
|
680
|
+
}), v = g.source === "override" ? g.format : void 0;
|
|
677
681
|
if (n === null) return v ? null : void 0;
|
|
678
682
|
if (v && Pe(n, v)) return;
|
|
679
|
-
const I =
|
|
683
|
+
const I = js(e, a, t, o.sqlResultColumns), w = I.value, x = Ks(I);
|
|
680
684
|
if (x.length === 0) {
|
|
681
685
|
i.push($a(e, s, d, t, w));
|
|
682
686
|
return;
|
|
683
687
|
}
|
|
684
688
|
const E = !("type" in n) || n.type === void 0;
|
|
685
|
-
if (E && !
|
|
689
|
+
if (E && !g.format) {
|
|
686
690
|
const T = x[0];
|
|
687
691
|
i.push(
|
|
688
692
|
Q("format_invalid", {
|
|
@@ -696,7 +700,7 @@ function Kn(e, a, t, s, n, o, i) {
|
|
|
696
700
|
);
|
|
697
701
|
return;
|
|
698
702
|
}
|
|
699
|
-
const _ = E ? { ...
|
|
703
|
+
const _ = E ? { ...g.format, ...n } : n, S = String(_.type);
|
|
700
704
|
if (!x.includes(S)) {
|
|
701
705
|
i.push(
|
|
702
706
|
S === "string" ? $a(e, s, `${d}.type`, t, "text") : Q("format_invalid", {
|
|
@@ -714,16 +718,16 @@ function Kn(e, a, t, s, n, o, i) {
|
|
|
714
718
|
Q("format_invalid", {
|
|
715
719
|
message: y ? (T == null ? void 0 : T.code) === "unrecognized_keys" ? `A ${S} format has no ${T.keys.join(", ")}.` : `That format for ${s} isn't valid: ${(T == null ? void 0 : T.message) ?? "invalid"}.` : `${JSON.stringify(S)} isn't a format type.`,
|
|
716
720
|
path: d,
|
|
717
|
-
fix:
|
|
718
|
-
allowed: y ? ze(S) : [...
|
|
719
|
-
...
|
|
721
|
+
fix: Hn(S),
|
|
722
|
+
allowed: y ? ze(S) : [...cn],
|
|
723
|
+
...g.format ? { suggestedChange: We(o, s, g.format) } : {}
|
|
720
724
|
})
|
|
721
725
|
);
|
|
722
726
|
return;
|
|
723
727
|
}
|
|
724
728
|
const $ = D.data;
|
|
725
729
|
if ($.type === "temporal_bucket" && t.granularity && !ya($, t.granularity).ok) {
|
|
726
|
-
const L =
|
|
730
|
+
const L = un.filter(
|
|
727
731
|
(V) => ya({ presentation: { mode: "preset", preset: V } }, t.granularity).ok
|
|
728
732
|
);
|
|
729
733
|
i.push(
|
|
@@ -737,7 +741,7 @@ function Kn(e, a, t, s, n, o, i) {
|
|
|
737
741
|
return;
|
|
738
742
|
}
|
|
739
743
|
if ($.type === "date") {
|
|
740
|
-
const T = n, L =
|
|
744
|
+
const T = n, L = g.format ?? {}, V = Object.keys(T).filter((K) => !ca.includes(K) && !Pe(T[K], L[K]));
|
|
741
745
|
if (V.length) {
|
|
742
746
|
const K = Object.fromEntries(Object.entries($).filter(([B]) => !V.includes(B)));
|
|
743
747
|
i.push(
|
|
@@ -766,7 +770,7 @@ function Kn(e, a, t, s, n, o, i) {
|
|
|
766
770
|
}
|
|
767
771
|
return v && Pe(v, $) ? void 0 : $;
|
|
768
772
|
}
|
|
769
|
-
function
|
|
773
|
+
function Un(e, a, t, s, n, o, i) {
|
|
770
774
|
var x, E;
|
|
771
775
|
const d = n.polarity;
|
|
772
776
|
if (d === void 0) return;
|
|
@@ -782,7 +786,7 @@ function Wn(e, a, t, s, n, o, i) {
|
|
|
782
786
|
);
|
|
783
787
|
return;
|
|
784
788
|
}
|
|
785
|
-
const
|
|
789
|
+
const g = c.kind === "field" ? (E = (x = e.config) == null ? void 0 : x.metricColumns) == null ? void 0 : E.find((_) => _.id === c.fieldId) : void 0, v = c.kind === "sqlKpiValue" ? La(e) : void 0, I = c.kind === "sqlKpiValue" ? (v == null ? void 0 : v.source) === "sql" && v.polarity !== va ? v.polarity : void 0 : g == null ? void 0 : g.comparisonPolarity, w = g == null ? void 0 : g.semanticComparisonPolarity;
|
|
786
790
|
if (d === null) return I ? null : void 0;
|
|
787
791
|
if (w && d !== w) {
|
|
788
792
|
i.push(
|
|
@@ -798,8 +802,8 @@ function Wn(e, a, t, s, n, o, i) {
|
|
|
798
802
|
}
|
|
799
803
|
return d === (w ?? I ?? va) ? void 0 : d;
|
|
800
804
|
}
|
|
801
|
-
function
|
|
802
|
-
var h,
|
|
805
|
+
function Gn(e, a, t, s, n, o, i, d) {
|
|
806
|
+
var h, g, v;
|
|
803
807
|
if (n.hidden === void 0 && n.width === void 0) return {};
|
|
804
808
|
const l = Se(i.path, s);
|
|
805
809
|
if (!a.settings.has("columns.hidden") || t.resultKey === void 0) {
|
|
@@ -809,13 +813,13 @@ function Un(e, a, t, s, n, o, i, d) {
|
|
|
809
813
|
message: I ? `${s} on ${G(e.title)} has a column for each pivot value; hide or size them in the editor.` : `${G(e.title)} has no hidden columns or column widths; those are for tables.`,
|
|
810
814
|
path: `${l}.${n.hidden !== void 0 ? "hidden" : "width"}`,
|
|
811
815
|
allowed: I ? ["label", "format"] : ["label", "format"].filter((w) => a.settings.has(`columns.${w}`)),
|
|
812
|
-
suggestedChange:
|
|
816
|
+
suggestedChange: jn(i, s, n)
|
|
813
817
|
})
|
|
814
818
|
), {};
|
|
815
819
|
}
|
|
816
820
|
const c = {};
|
|
817
821
|
if (n.hidden !== void 0 && n.hidden !== ((o == null ? void 0 : o.hidden) === !0) && (c.hidden = n.hidden), n.width !== void 0 && n.width !== ((o == null ? void 0 : o.width) ?? null)) {
|
|
818
|
-
const { minSize: I, maxSize: w } =
|
|
822
|
+
const { minSize: I, maxSize: w } = Vs((v = (g = (h = e.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : g.columnSettingsMap) == null ? void 0 : v[t.resultKey]);
|
|
819
823
|
n.width !== null && (!Number.isFinite(n.width) || n.width < I || n.width > w) ? d.push(
|
|
820
824
|
Q("value_invalid", {
|
|
821
825
|
message: `${s} on ${G(e.title)} can be ${I} to ${w} pixels wide.`,
|
|
@@ -826,25 +830,25 @@ function Un(e, a, t, s, n, o, i, d) {
|
|
|
826
830
|
}
|
|
827
831
|
return c;
|
|
828
832
|
}
|
|
829
|
-
function
|
|
833
|
+
function Qn(e, a, t) {
|
|
830
834
|
var E, _, S, y;
|
|
831
835
|
const { columns: s = {}, ...n } = a.settings ?? {}, o = [], i = xt.some((D) => n[D] !== void 0), d = !!((_ = (E = a.highlights) == null ? void 0 : E.add) != null && _.length || (y = (S = a.highlights) == null ? void 0 : S.remove) != null && y.length);
|
|
832
836
|
if (!Object.keys(s).length && !i && !d) return { ok: !0, labels: [], settings: null, warnings: [] };
|
|
833
|
-
const l =
|
|
837
|
+
const l = Ps(e);
|
|
834
838
|
if (!l)
|
|
835
839
|
return {
|
|
836
840
|
ok: !1,
|
|
837
841
|
problems: [Q("setting_not_for_card", { message: `${G(e.title)} takes no card settings through this tool.`, path: t.path })]
|
|
838
842
|
};
|
|
839
|
-
const c =
|
|
843
|
+
const c = Mn(e, l, n, t, o), h = Ls(e, l, t.sqlResultColumns), g = d ? Ms(e, l, h, a.highlights, t, o) : void 0, v = Ft(e), I = [], w = [];
|
|
840
844
|
for (const [D, $] of Object.entries(s)) {
|
|
841
|
-
const N =
|
|
845
|
+
const N = Bs(h, D, { path: Se(t.path, D), cardTitle: G(e.title) });
|
|
842
846
|
if (!N.ok) {
|
|
843
847
|
o.push(N.problem);
|
|
844
848
|
continue;
|
|
845
849
|
}
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
850
|
+
const p = N.column;
|
|
851
|
+
if (p.sqlName === "inferred") {
|
|
848
852
|
o.push(
|
|
849
853
|
Q("columns_unavailable", {
|
|
850
854
|
message: `${G(e.title)}'s columns weren't read from its query, so ${D} can't be checked.`,
|
|
@@ -854,10 +858,10 @@ function Gn(e, a, t) {
|
|
|
854
858
|
);
|
|
855
859
|
continue;
|
|
856
860
|
}
|
|
857
|
-
const k =
|
|
861
|
+
const k = Kn(e, l, p, D, $, t, o);
|
|
858
862
|
k && I.push(k);
|
|
859
|
-
const T =
|
|
860
|
-
column:
|
|
863
|
+
const T = Gn(e, l, p, D, $, v.columns[p.name], t, o), L = $.format !== void 0 ? Wn(e, l, p, D, $.format, t, o) : void 0, V = Un(e, l, p, D, $, t, o), K = {
|
|
864
|
+
column: p.ref,
|
|
861
865
|
...T,
|
|
862
866
|
...L !== void 0 ? { format: L } : {},
|
|
863
867
|
...V !== void 0 ? { polarity: V } : {}
|
|
@@ -865,14 +869,14 @@ function Gn(e, a, t) {
|
|
|
865
869
|
Object.keys(K).length > 1 && w.push(K);
|
|
866
870
|
}
|
|
867
871
|
if (o.length) return { ok: !1, problems: o };
|
|
868
|
-
const x = { ...c, ...w.length ? { columns: w } : {}, ...
|
|
872
|
+
const x = { ...c, ...w.length ? { columns: w } : {}, ...g ? { highlights: g } : {} };
|
|
869
873
|
return { ok: !0, labels: I, settings: Object.keys(x).length ? x : null, warnings: [] };
|
|
870
874
|
}
|
|
871
|
-
function
|
|
875
|
+
function Hn(e) {
|
|
872
876
|
const a = Me(e), t = a && a === Me("number") ? ua.number : e === "temporal_bucket" || e === "date" ? ua[e] : void 0;
|
|
873
877
|
return t ? `Send a stored format: ${t}.` : "Send the format in the stored shape the outline shows.";
|
|
874
878
|
}
|
|
875
|
-
function
|
|
879
|
+
function zn(e, a, t, s, n) {
|
|
876
880
|
var _, S, y, D, $, N;
|
|
877
881
|
const o = Ce(e, { sql: !0, calculations: !1 });
|
|
878
882
|
if (!o.editable) return [o.message];
|
|
@@ -887,27 +891,27 @@ function Hn(e, a, t, s, n) {
|
|
|
887
891
|
config: s.config
|
|
888
892
|
}, { sql: !0, calculations: !1 }) : void 0;
|
|
889
893
|
if (l && !l.editable) return ["the compiled query"];
|
|
890
|
-
const c = l != null && l.editable ? l.query : void 0, h = String(d.datasetName ?? ""),
|
|
894
|
+
const c = l != null && l.editable ? l.query : void 0, h = String(d.datasetName ?? ""), g = [], v = (p) => be(p, h), I = (p, k, T) => {
|
|
891
895
|
const L = k ?? [], V = T ?? [];
|
|
892
|
-
(L.length !== V.length || L.some((K, B) => v(K) !== v(V[B]))) &&
|
|
896
|
+
(L.length !== V.length || L.some((K, B) => v(K) !== v(V[B]))) && g.push(p);
|
|
893
897
|
};
|
|
894
|
-
for (const
|
|
898
|
+
for (const p of ["domainId", "datasetName"]) d[p] !== i[p] && g.push(p);
|
|
895
899
|
if (I("measures", d.measures, i.measures), I("columns", d.columns, i.columns), t || o.matrix) {
|
|
896
|
-
const
|
|
900
|
+
const p = (T) => new Set(((T == null ? void 0 : T.columns) ?? []).map(v)), k = (T, L) => (T ?? []).filter((V) => !p(L).has(v(V)));
|
|
897
901
|
I("dimensions", k(d.dimensions, t), k(i.dimensions, o.matrix)), I("matrix.columns", t == null ? void 0 : t.columns, (_ = o.matrix) == null ? void 0 : _.columns);
|
|
898
902
|
} else
|
|
899
903
|
I("dimensions", d.dimensions, i.dimensions);
|
|
900
904
|
const w = d.timeWindow !== void 0 && !d.timeGrain, x = w && i.timeWindow === void 0 ? void 0 : w && d.dateField === void 0 ? c == null ? void 0 : c.dateField : d.dateField;
|
|
901
|
-
x !== void 0 && (i.dateField === void 0 || v(x) !== v(i.dateField)) &&
|
|
902
|
-
const E = (S = e.config) != null && S.matrix ? e.config.matrix.spec.measures.map((
|
|
903
|
-
(d.measures ?? []).forEach((
|
|
904
|
-
const T =
|
|
905
|
-
T && _a(E[k] ?? {}) !== T &&
|
|
905
|
+
x !== void 0 && (i.dateField === void 0 || v(x) !== v(i.dateField)) && g.push("dateField"), d.timeGrain !== void 0 && d.timeGrain !== i.timeGrain && g.push("timeGrain");
|
|
906
|
+
const E = (S = e.config) != null && S.matrix ? e.config.matrix.spec.measures.map((p) => p.kind === "aggregate" ? { aggregate: p.aggregate } : {}) : ((y = e.config) == null ? void 0 : y.metricColumns) ?? [];
|
|
907
|
+
(d.measures ?? []).forEach((p, k) => {
|
|
908
|
+
const T = p && typeof p == "object" ? p.aggregate : void 0;
|
|
909
|
+
T && _a(E[k] ?? {}) !== T && g.push(`the aggregate of measures[${k}]`);
|
|
906
910
|
});
|
|
907
|
-
for (const { key:
|
|
908
|
-
|
|
911
|
+
for (const { key: p, label: k } of Ne(a))
|
|
912
|
+
Ws(e, p) !== k && g.push(`the label "${k}"`);
|
|
909
913
|
if (!n || n.aspects.includes("filters")) {
|
|
910
|
-
const
|
|
914
|
+
const p = d.filters ?? [];
|
|
911
915
|
let k = i.filters ?? [];
|
|
912
916
|
const T = d.timeWindow, L = i.timeWindow, V = (K, B) => {
|
|
913
917
|
const se = (oe) => JSON.stringify((oe ?? []).map(String));
|
|
@@ -915,17 +919,17 @@ function Hn(e, a, t, s, n) {
|
|
|
915
919
|
};
|
|
916
920
|
if (T && !L) {
|
|
917
921
|
const K = ((c == null ? void 0 : c.filters) ?? []).filter(
|
|
918
|
-
(B) => !(c != null && c.timeWindow) && !
|
|
922
|
+
(B) => !(c != null && c.timeWindow) && !p.some((se) => V(se, B))
|
|
919
923
|
);
|
|
920
|
-
(!K.length || K.some((B) => !k.some((se) => V(B, se)))) &&
|
|
921
|
-
} else T ?
|
|
922
|
-
(
|
|
924
|
+
(!K.length || K.some((B) => !k.some((se) => V(B, se)))) && g.push("timeWindow"), k = k.filter((B) => !K.some((se) => V(se, B)));
|
|
925
|
+
} else T ? en(d.timeWindow, i.timeWindow) || g.push("timeWindow") : L && g.push("timeWindow");
|
|
926
|
+
(p.length !== k.length || p.some((K, B) => !V(K, k[B]))) && g.push("filters");
|
|
923
927
|
}
|
|
924
928
|
if (d.orderBy !== void 0) {
|
|
925
|
-
const
|
|
926
|
-
(!k || !T || k.direction !==
|
|
929
|
+
const p = d.orderBy, k = ($ = (D = e.config) == null ? void 0 : D.sortByColumns) == null ? void 0 : $[0], T = k && Us(e.config ?? {}, k), L = p.field && typeof p.field == "object" ? p.field.aggregate : void 0;
|
|
930
|
+
(!k || !T || k.direction !== p.direction || v(p.field) !== Gs(T.name, Na(T)) || L !== void 0 && _a(T) !== L) && g.push("orderBy");
|
|
927
931
|
}
|
|
928
|
-
return d.limit !== void 0 && ((N = e.config) == null ? void 0 : N.rowLimit) !== d.limit &&
|
|
932
|
+
return d.limit !== void 0 && ((N = e.config) == null ? void 0 : N.rowLimit) !== d.limit && g.push("limit"), g;
|
|
929
933
|
}
|
|
930
934
|
function kt(e) {
|
|
931
935
|
const a = Wa({ variables: [e] })[0];
|
|
@@ -940,7 +944,7 @@ function Je(e, a) {
|
|
|
940
944
|
const t = e.variables ?? [];
|
|
941
945
|
return t.find((s) => s.name === a) ?? t.find((s) => s.id === a);
|
|
942
946
|
}
|
|
943
|
-
function
|
|
947
|
+
function Yn(e, a, t, s) {
|
|
944
948
|
var i;
|
|
945
949
|
const n = Je(e, a);
|
|
946
950
|
n || s.problem(ls(e, a, t));
|
|
@@ -997,23 +1001,23 @@ async function wa(e, a, t) {
|
|
|
997
1001
|
path: `${i}.query.datasetName`,
|
|
998
1002
|
fix: "List the domain's datasets with semaphor_list_datasets and name one of them."
|
|
999
1003
|
});
|
|
1000
|
-
const
|
|
1004
|
+
const g = h.fields;
|
|
1001
1005
|
for (const $ of Ma({ ...d, measures: d.measures ?? [] })) s({ ...$, path: `${i}.${$.path}` });
|
|
1002
1006
|
const v = ($, N) => {
|
|
1003
|
-
const
|
|
1007
|
+
const p = Ct($), k = Js($, d.datasetName);
|
|
1004
1008
|
k.toLowerCase() !== d.datasetName.toLowerCase() && s({
|
|
1005
1009
|
code: "field_not_found",
|
|
1006
|
-
message: `A variable reads one dataset: "${
|
|
1010
|
+
message: `A variable reads one dataset: "${p}" names ${k}, not ${d.datasetName}.`,
|
|
1007
1011
|
path: N,
|
|
1008
1012
|
fix: `Name a field of ${d.datasetName}, or set datasetName to ${k} and read its field.`
|
|
1009
1013
|
});
|
|
1010
|
-
const T = ot(
|
|
1014
|
+
const T = ot(g, p, d.datasetName);
|
|
1011
1015
|
return T || s({
|
|
1012
1016
|
code: "field_not_found",
|
|
1013
|
-
message: `"${
|
|
1017
|
+
message: `"${p}" isn't a field of ${d.datasetName}.`,
|
|
1014
1018
|
path: N,
|
|
1015
1019
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1016
|
-
details: { available:
|
|
1020
|
+
details: { available: g.slice(0, 20).map((L) => L.name) }
|
|
1017
1021
|
}), T;
|
|
1018
1022
|
}, I = d.measures ?? [], w = d.dimensions ?? [], x = {
|
|
1019
1023
|
...c,
|
|
@@ -1021,7 +1025,7 @@ async function wa(e, a, t) {
|
|
|
1021
1025
|
dataSource: h.dataSource,
|
|
1022
1026
|
connectionId: h.connectionId,
|
|
1023
1027
|
get: "only",
|
|
1024
|
-
...(y = d.filters) != null && y.length ? { conditions: await
|
|
1028
|
+
...(y = d.filters) != null && y.length ? { conditions: await Xn(d, o, i, t.refuseAll) } : {}
|
|
1025
1029
|
};
|
|
1026
1030
|
if (l.kind === "aggregate") {
|
|
1027
1031
|
(I.length !== 1 || w.length) && s({
|
|
@@ -1030,9 +1034,9 @@ async function wa(e, a, t) {
|
|
|
1030
1034
|
path: `${i}.query`,
|
|
1031
1035
|
fix: `Send measures: [{ name, aggregate }] alone; for one field's value use get: "only", "first" or "list" with dimensions: [field].`
|
|
1032
1036
|
}), d.orderBy && s({ code: "invalid_change", message: "An aggregate is one value, so it has no order.", path: `${i}.query.orderBy`, fix: "Leave out orderBy." });
|
|
1033
|
-
const $ = v(I[0], `${i}.query.measures[0]`), N = typeof I[0] == "string" ? void 0 : I[0].aggregate,
|
|
1034
|
-
if (!Ca(k) || !
|
|
1035
|
-
const L =
|
|
1037
|
+
const $ = v(I[0], `${i}.query.measures[0]`), N = typeof I[0] == "string" ? void 0 : I[0].aggregate, p = pn($).filter((L) => Ca(L.value)), k = N ?? (ut($) ? "calculation" : gn($));
|
|
1038
|
+
if (!Ca(k) || !p.some((L) => L.value === k)) {
|
|
1039
|
+
const L = p.map((V) => V.value);
|
|
1036
1040
|
s({
|
|
1037
1041
|
code: "invalid_change",
|
|
1038
1042
|
message: N ? `${N} isn't an aggregate ${$.label || $.name} takes.` : `${$.label || $.name} needs its aggregate.`,
|
|
@@ -1041,7 +1045,7 @@ async function wa(e, a, t) {
|
|
|
1041
1045
|
allowed: L
|
|
1042
1046
|
});
|
|
1043
1047
|
}
|
|
1044
|
-
const T =
|
|
1048
|
+
const T = Jn(I[0], { ...x, field: $, get: k }, `${i}.query.measures[0].comparison`, s);
|
|
1045
1049
|
return S(Ye({ ...x, field: $, get: k, ...T ? { comparison: T } : {} }, a));
|
|
1046
1050
|
}
|
|
1047
1051
|
(w.length !== 1 || I.length) && s({
|
|
@@ -1082,11 +1086,11 @@ async function wa(e, a, t) {
|
|
|
1082
1086
|
)
|
|
1083
1087
|
);
|
|
1084
1088
|
function S($) {
|
|
1085
|
-
const N = { ...$, name: e.name },
|
|
1086
|
-
return
|
|
1089
|
+
const N = { ...$, name: e.name }, p = Dt(N, a);
|
|
1090
|
+
return p.length && t.refuseAll(cs(p, i)), N;
|
|
1087
1091
|
}
|
|
1088
1092
|
}
|
|
1089
|
-
function
|
|
1093
|
+
function Jn(e, a, t, s) {
|
|
1090
1094
|
var o, i;
|
|
1091
1095
|
const n = typeof e == "string" ? void 0 : e.comparison;
|
|
1092
1096
|
if (!(!n || n.kind === "inherit" || n.kind === "off"))
|
|
@@ -1095,14 +1099,14 @@ function Yn(e, a, t, s) {
|
|
|
1095
1099
|
message: "A variable compares with an earlier period, not a target.",
|
|
1096
1100
|
path: t,
|
|
1097
1101
|
fix: "Send comparison: { kind: 'previous_period' } or { kind: 'previous_year' }; put a target in the words, or on a KPI card."
|
|
1098
|
-
}),
|
|
1102
|
+
}), yn(a) || s({
|
|
1099
1103
|
code: "invalid_change",
|
|
1100
1104
|
message: `${((o = a.field) == null ? void 0 : o.label) || ((i = a.field) == null ? void 0 : i.name)} with ${String(a.get)} isn't a number, so it has no comparison.`,
|
|
1101
1105
|
path: t,
|
|
1102
1106
|
fix: "Compare a count, or a numeric field's total, average, lowest or highest; leave comparison out here."
|
|
1103
|
-
}),
|
|
1107
|
+
}), Xs(n);
|
|
1104
1108
|
}
|
|
1105
|
-
async function
|
|
1109
|
+
async function Xn(e, a, t, s) {
|
|
1106
1110
|
var o;
|
|
1107
1111
|
const n = await a.compileCardQuery({
|
|
1108
1112
|
query: { domainId: e.domainId, datasetName: e.datasetName, measures: ["__count"], filters: e.filters },
|
|
@@ -1110,8 +1114,8 @@ async function Jn(e, a, t, s) {
|
|
|
1110
1114
|
});
|
|
1111
1115
|
return n.ok ? ((o = n.part.config) == null ? void 0 : o.filters) ?? null : s(n.problems.map((i) => ({ ...i, path: i.path ? `${t}.query.${i.path}` : `${t}.query.filters` })));
|
|
1112
1116
|
}
|
|
1113
|
-
function
|
|
1114
|
-
const o = ds(a), i =
|
|
1117
|
+
function Zn(e, a, t, s, n) {
|
|
1118
|
+
const o = ds(a), i = bn(e);
|
|
1115
1119
|
o.kind === "aggregate" && e.get.kind !== "aggregate" && s.problem({ code: "invalid_change", message: `${e.name} reads a field's rows; an aggregate needs its measure.`, path: `${n}.get`, fix: 'Send query with measures: [{ name, aggregate }] and get: "aggregate".' }), o.kind !== "aggregate" && e.get.kind === "aggregate" && s.problem({ code: "invalid_change", message: `${e.name} is an aggregate; a value, the first or a list reads a dimension.`, path: `${n}.get`, fix: "Send query with dimensions: [field] and the get." }), i.mode === "sql" && o.kind !== "only" && o.kind !== "first" && s.problem({ code: "invalid_change", message: "A SQL variable takes the only row or the first row of its result.", path: `${n}.get`, fix: 'Send get: "only" or "first", or write the list in the SQL itself.' });
|
|
1116
1120
|
const d = Ye(
|
|
1117
1121
|
{
|
|
@@ -1124,7 +1128,7 @@ function Xn(e, a, t, s, n) {
|
|
|
1124
1128
|
);
|
|
1125
1129
|
return { query: d.query, get: d.get };
|
|
1126
1130
|
}
|
|
1127
|
-
function
|
|
1131
|
+
function ei(e, a) {
|
|
1128
1132
|
const t = Qa(e).filter(({ ref: i }) => i.source === "data" && i.variableId === a), s = (i) => {
|
|
1129
1133
|
var d;
|
|
1130
1134
|
return `"${((d = (e.sheets ?? []).find((l) => l.id === i)) == null ? void 0 : d.title) ?? i}"`;
|
|
@@ -1140,7 +1144,7 @@ function Zn(e, a) {
|
|
|
1140
1144
|
)
|
|
1141
1145
|
].join(", "), places: t };
|
|
1142
1146
|
}
|
|
1143
|
-
function
|
|
1147
|
+
function ti(e, a, t, s, n) {
|
|
1144
1148
|
const { problem: o } = n;
|
|
1145
1149
|
(!Xe(t) || !t.document) && o({
|
|
1146
1150
|
code: "invalid_change",
|
|
@@ -1160,21 +1164,21 @@ function ei(e, a, t, s, n) {
|
|
|
1160
1164
|
message: `The ${x} has ${x === "header" ? "a title and a metadata line" : "a note and a page info line"}, not a ${E} line.`,
|
|
1161
1165
|
path: `${s}.target.role`,
|
|
1162
1166
|
fix: `Send role: ${Ia[x].map((S) => `"${S}"`).join(" or ")}.`
|
|
1163
|
-
}), e.style !== void 0 && !
|
|
1167
|
+
}), e.style !== void 0 && !Qs(E) && o({
|
|
1164
1168
|
code: "invalid_change",
|
|
1165
1169
|
message: `The footer's ${E === "pageInfo" ? "page info" : E} line has no size or alignment; only the header's title and metadata lines and text sections do.`,
|
|
1166
1170
|
path: `${s}.style`,
|
|
1167
1171
|
fix: "Leave style out for a footer line."
|
|
1168
1172
|
});
|
|
1169
|
-
const _ = i[x] ?
|
|
1173
|
+
const _ = i[x] ? Qo(i[x].blocks, E) : void 0;
|
|
1170
1174
|
l = (_ == null ? void 0 : _.content) ?? [], c = _ == null ? void 0 : _.style;
|
|
1171
1175
|
}
|
|
1172
|
-
const h = e.style !== void 0 ?
|
|
1176
|
+
const h = e.style !== void 0 ? Hs(e.style) : void 0, g = !h || Object.entries(h).every(([x, E]) => (c == null ? void 0 : c[x]) === E);
|
|
1173
1177
|
let v;
|
|
1174
1178
|
if (e.text !== void 0) {
|
|
1175
1179
|
const x = { kind: "document", sheetId: t.id }, E = { catalog: _t({ dashboard: a, place: x }), inputs: a.inputs, variables: a.variables }, _ = JSON.stringify(Ze(l, E));
|
|
1176
|
-
if (JSON.stringify(
|
|
1177
|
-
const S =
|
|
1180
|
+
if (JSON.stringify(zs(e.text)) !== _) {
|
|
1181
|
+
const S = Ys(e.text, l, { dashboard: a, place: x, path: `${s}.text`, links: !0 });
|
|
1178
1182
|
S.ok || n.refuseAll(S.problems);
|
|
1179
1183
|
const y = S.content;
|
|
1180
1184
|
JSON.stringify(Ze(y, E)) !== _ && (v = y);
|
|
@@ -1182,16 +1186,16 @@ function ei(e, a, t, s, n) {
|
|
|
1182
1186
|
}
|
|
1183
1187
|
const I = {
|
|
1184
1188
|
...v !== void 0 ? { content: v } : {},
|
|
1185
|
-
...h !== void 0 && !
|
|
1189
|
+
...h !== void 0 && !g ? { style: h } : {}
|
|
1186
1190
|
};
|
|
1187
|
-
return { edit: "sectionId" in d ? { type: "updateText", sectionId: d.sectionId, ...I } : { type: "updateRegionText", region: d.region, role: d.role, ...I }, unchanged: v === void 0 &&
|
|
1191
|
+
return { edit: "sectionId" in d ? { type: "updateText", sectionId: d.sectionId, ...I } : { type: "updateRegionText", region: d.region, role: d.role, ...I }, unchanged: v === void 0 && g };
|
|
1188
1192
|
}
|
|
1189
1193
|
class me extends Error {
|
|
1190
1194
|
}
|
|
1191
1195
|
const xa = "A text card takes title, description and text.", bt = (e) => e.cards.some((a) => {
|
|
1192
1196
|
var t, s;
|
|
1193
1197
|
return ((t = a.customCardPreferences) == null ? void 0 : t.visualType) === "multiple" || !!((s = a.customCardPreferences) != null && s.dataInputCardIds);
|
|
1194
|
-
}), Tt = (e) => (e ?? "").trim().toLowerCase(), tt =
|
|
1198
|
+
}), Tt = (e) => (e ?? "").trim().toLowerCase(), tt = oo, Sa = { measures: lo, records: ro, sql: io }, Ue = {
|
|
1195
1199
|
measures: "a measures query (measures, with optional dimensions)",
|
|
1196
1200
|
records: "a records query (columns)",
|
|
1197
1201
|
sql: "a SQL query"
|
|
@@ -1199,13 +1203,13 @@ const xa = "A text card takes title, description and text.", bt = (e) => e.cards
|
|
|
1199
1203
|
function us(e, a) {
|
|
1200
1204
|
return a.path.reduce((t, s) => typeof s == "number" ? `${t}[${s}]` : `${t}.${s}`, e);
|
|
1201
1205
|
}
|
|
1202
|
-
const
|
|
1203
|
-
async function
|
|
1204
|
-
return fs(e, a, t, { limit:
|
|
1206
|
+
const ai = { max: _o, what: "A proposal", fix: "Split the changes into several proposals." };
|
|
1207
|
+
async function Dr(e, a, t) {
|
|
1208
|
+
return fs(e, a, t, { limit: ai });
|
|
1205
1209
|
}
|
|
1206
1210
|
async function fs(e, a, t, s) {
|
|
1207
1211
|
var Gt, Qt, Ht, zt, Yt, Jt, Xt, Zt, ea, ta, aa, sa, oa, na, ia, ra;
|
|
1208
|
-
const n = [], o = [], i = [], d = [], l = /* @__PURE__ */ new Set(), c = [], h = /* @__PURE__ */ new Map(),
|
|
1212
|
+
const n = [], o = [], i = [], d = [], l = /* @__PURE__ */ new Set(), c = [], h = /* @__PURE__ */ new Map(), g = { calendar: t.calendar }, v = t.relationshipReach ? { relationshipReach: t.relationshipReach } : {};
|
|
1209
1213
|
let I = e, w, x = 0, E = 0;
|
|
1210
1214
|
const { limit: _ } = s;
|
|
1211
1215
|
if (a.length > _.max)
|
|
@@ -1222,13 +1226,13 @@ async function fs(e, a, t, s) {
|
|
|
1222
1226
|
};
|
|
1223
1227
|
const S = [];
|
|
1224
1228
|
if (a.forEach((m, r) => {
|
|
1225
|
-
const u =
|
|
1229
|
+
const u = Zs.safeParse(m);
|
|
1226
1230
|
if (u.success) {
|
|
1227
1231
|
S.push(u.data);
|
|
1228
1232
|
return;
|
|
1229
1233
|
}
|
|
1230
1234
|
for (const f of u.error.issues) {
|
|
1231
|
-
const b =
|
|
1235
|
+
const b = tn(f.message);
|
|
1232
1236
|
n.push({
|
|
1233
1237
|
code: "invalid_change",
|
|
1234
1238
|
message: (b == null ? void 0 : b.message) ?? f.message,
|
|
@@ -1247,15 +1251,15 @@ async function fs(e, a, t, s) {
|
|
|
1247
1251
|
fix: "Use a measures or records query (a semantic dataset for a variable), or ask an administrator for SQL access."
|
|
1248
1252
|
}), l.add("sql");
|
|
1249
1253
|
}, $ = (m, r) => {
|
|
1250
|
-
const u = wt(I, [m],
|
|
1254
|
+
const u = wt(I, [m], g);
|
|
1251
1255
|
u.ok ? (I = u.dashboard, i.push(m)) : y({ code: "invalid_change", message: u.failedAt.message, path: r, ...u.failedAt.fix ? { fix: u.failedAt.fix } : {} });
|
|
1252
1256
|
}, N = async (m) => {
|
|
1253
1257
|
var X, Y, j, ne, fe;
|
|
1254
|
-
const { cardId: r, index: u, path: f } = m, { settings: b = {}, highlights: C } = m.request, O = b.columns && Object.keys(b.columns).length ? b.columns : void 0,
|
|
1255
|
-
if (!O && !
|
|
1258
|
+
const { cardId: r, index: u, path: f } = m, { settings: b = {}, highlights: C } = m.request, O = b.columns && Object.keys(b.columns).length ? b.columns : void 0, A = Object.entries(b).some(([H, de]) => H !== "columns" && de !== void 0), F = !!((X = C == null ? void 0 : C.add) != null && X.length);
|
|
1259
|
+
if (!O && !A && !F && !((Y = C == null ? void 0 : C.remove) != null && Y.length)) return null;
|
|
1256
1260
|
const R = ie(I, r).card, P = Object.values(O ?? {}).some((H) => H.label === null), q = Object.values(O ?? {}).some((H) => H.format !== void 0 && H.format !== null), M = {};
|
|
1257
1261
|
if (P && !((j = R.sql) != null && j.trim()))
|
|
1258
|
-
for (const H of
|
|
1262
|
+
for (const H of On(R)) {
|
|
1259
1263
|
const de = await t.loadCardSource(H);
|
|
1260
1264
|
de && (M[Nt(H)] = de.fields);
|
|
1261
1265
|
}
|
|
@@ -1265,7 +1269,7 @@ async function fs(e, a, t, s) {
|
|
|
1265
1269
|
U = H ? { status: "read", formats: H } : { status: "unavailable" };
|
|
1266
1270
|
}
|
|
1267
1271
|
let z;
|
|
1268
|
-
if ((O ||
|
|
1272
|
+
if ((O || F) && ((fe = R.sql) != null && fe.trim()) && R.type !== "kpi") {
|
|
1269
1273
|
const H = t.readSqlResultColumns ? await t.readSqlResultColumns({ cardId: r, dashboard: I }) : null;
|
|
1270
1274
|
H || y({
|
|
1271
1275
|
code: "columns_unavailable",
|
|
@@ -1274,7 +1278,7 @@ async function fs(e, a, t, s) {
|
|
|
1274
1278
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
1275
1279
|
}), z = H;
|
|
1276
1280
|
}
|
|
1277
|
-
const W =
|
|
1281
|
+
const W = Qn(
|
|
1278
1282
|
R,
|
|
1279
1283
|
{
|
|
1280
1284
|
settings: { ...b, ...O ? { columns: O } : { columns: void 0 } },
|
|
@@ -1292,7 +1296,7 @@ async function fs(e, a, t, s) {
|
|
|
1292
1296
|
if (!W.ok)
|
|
1293
1297
|
throw n.push(...W.problems), new me();
|
|
1294
1298
|
for (const H of W.labels) {
|
|
1295
|
-
const de = m.queryLabels.find((
|
|
1299
|
+
const de = m.queryLabels.find((Ae) => He(Ae.key, H.key) && Ae.label !== H.label);
|
|
1296
1300
|
de && y({
|
|
1297
1301
|
code: "value_invalid",
|
|
1298
1302
|
message: `Two labels are stated for one column of "${R.title || "Untitled"}": "${de.label}" in the query and "${H.label}" in columns.`,
|
|
@@ -1301,7 +1305,7 @@ async function fs(e, a, t, s) {
|
|
|
1301
1305
|
});
|
|
1302
1306
|
}
|
|
1303
1307
|
return o.push(...W.warnings), W.labels.length && pa(R, W.labels).changed.length && $({ op: "card.update", cardId: r, update: { kind: "relabel", labels: W.labels }, changeIndex: u }, `${f}.columns`), W.settings && $({ op: "card.update", cardId: r, update: { kind: "settings", settings: W.settings }, changeIndex: u }, O ? `${f}.columns` : f), W.settings;
|
|
1304
|
-
},
|
|
1308
|
+
}, p = (m, r) => {
|
|
1305
1309
|
var b;
|
|
1306
1310
|
const u = ie(I, m);
|
|
1307
1311
|
u || y({ code: "card_not_editable", message: "Cards in Document sections are changed in the editor.", path: `${r}.cardId`, fix: "Tell the user to change it in the editor.", details: { reason: "document_section" } });
|
|
@@ -1328,8 +1332,8 @@ async function fs(e, a, t, s) {
|
|
|
1328
1332
|
}));
|
|
1329
1333
|
}, L = async (m) => {
|
|
1330
1334
|
const r = ie(I, m.cardId).card, u = T(r, m.stated, m.path), f = u.some((O) => {
|
|
1331
|
-
var
|
|
1332
|
-
return ((
|
|
1335
|
+
var A, F;
|
|
1336
|
+
return ((A = O.comparison) == null ? void 0 : A.kind) === "previous_period" || ((F = O.comparison) == null ? void 0 : F.kind) === "previous_year";
|
|
1333
1337
|
}), b = f && t.readComparisonDates ? await t.readComparisonDates({ card: r, dashboard: I }) : ka(r), C = fa({ card: r, stated: u, context: { path: m.path, cardRef: m.cardRef, dates: b } });
|
|
1334
1338
|
if (!C.ok)
|
|
1335
1339
|
throw n.push(...C.problems), new me();
|
|
@@ -1359,14 +1363,14 @@ async function fs(e, a, t, s) {
|
|
|
1359
1363
|
});
|
|
1360
1364
|
const O = ja(b, { inputs: I.inputs, variables: I.variables });
|
|
1361
1365
|
O.editable || y({ code: "card_not_editable", message: O.message, path: `${f}.cardId`, fix: "Tell the user to change it in the editor.", details: { reason: "text" } });
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1366
|
+
const A = O.editable && (O.form === "legacy_html" || O.form === "legacy_runs");
|
|
1367
|
+
A && m.description !== void 0 && m.text === void 0 && y({
|
|
1364
1368
|
code: "invalid_change",
|
|
1365
1369
|
message: `"${b.title}" keeps its words in its description, so a description change would replace them.`,
|
|
1366
1370
|
path: `${f}.description`,
|
|
1367
1371
|
fix: "Send the words in text with it: they are stored as rich text, and the description becomes the subtitle."
|
|
1368
1372
|
}), d.push({ ref: m.cardId, kind: "card", id: b.id, title: m.title ?? b.title ?? "", changeIndex: u });
|
|
1369
|
-
let
|
|
1373
|
+
let F = !1, R = !1;
|
|
1370
1374
|
if (m.text !== void 0) {
|
|
1371
1375
|
const M = ga({
|
|
1372
1376
|
text: m.text,
|
|
@@ -1374,11 +1378,11 @@ async function fs(e, a, t, s) {
|
|
|
1374
1378
|
// Any variable the catalog offers where the card sits (DV-D13).
|
|
1375
1379
|
context: { dashboard: I, place: { kind: "sheet", sheetId: r.sheet.id, cardId: b.id } },
|
|
1376
1380
|
path: `${f}.text`,
|
|
1377
|
-
storeAsRichText:
|
|
1381
|
+
storeAsRichText: A && m.description !== void 0
|
|
1378
1382
|
});
|
|
1379
|
-
M.ok || B(M.problems), M.ok && !M.unchanged && ($({ op: "card.update", cardId: b.id, update: { kind: "text", richContent: M.richContent, clearsLegacy: M.clearsLegacy }, changeIndex: u }, f),
|
|
1383
|
+
M.ok || B(M.problems), M.ok && !M.unchanged && ($({ op: "card.update", cardId: b.id, update: { kind: "text", richContent: M.richContent, clearsLegacy: M.clearsLegacy }, changeIndex: u }, f), F = !0, R = M.clearsLegacy);
|
|
1380
1384
|
}
|
|
1381
|
-
const P = m.title !== void 0 && m.title !== b.title, q = m.description !== void 0 && (
|
|
1385
|
+
const P = m.title !== void 0 && m.title !== b.title, q = m.description !== void 0 && (A ? R : (m.description ?? void 0) !== (b.description ?? void 0));
|
|
1382
1386
|
(P || q) && ($(
|
|
1383
1387
|
{
|
|
1384
1388
|
op: "card.update",
|
|
@@ -1387,7 +1391,7 @@ async function fs(e, a, t, s) {
|
|
|
1387
1391
|
changeIndex: u
|
|
1388
1392
|
},
|
|
1389
1393
|
f
|
|
1390
|
-
),
|
|
1394
|
+
), F = !0), F && r.frame.visualId && o.push({
|
|
1391
1395
|
code: "detaches_linked_visual",
|
|
1392
1396
|
message: `"${b.title}" will stop following its library visual and become local to this dashboard.`,
|
|
1393
1397
|
path: f,
|
|
@@ -1442,36 +1446,36 @@ async function fs(e, a, t, s) {
|
|
|
1442
1446
|
const b = (I.sheets ?? []).find((C) => C.id === f);
|
|
1443
1447
|
return b || y({ code: "sheet_not_found", message: `There's no sheet ${f} on this dashboard.`, path: r, fix: "Read the outline again and use its sheet ids.", details: { sheets: Be() } }), u.grid && Xe(b) && y({ code: "sheet_not_a_grid", message: `"${b.title}" is a Document sheet.`, path: r, fix: "Add the card to a grid sheet; Document sheets are changed in the editor.", details: { sheets: Be() } }), b;
|
|
1444
1448
|
}, Re = (m, r) => it(m, r, { grid: !0 }), Vt = (m, r) => m.map((u, f) => Re(u, `${r}.sheetIds[${f}]`).id), jt = (m, r, u, f) => {
|
|
1445
|
-
var
|
|
1446
|
-
for (const
|
|
1447
|
-
const b =
|
|
1449
|
+
var A;
|
|
1450
|
+
for (const F of Ma(r, u)) y({ ...F, path: `${f}.${F.path}` });
|
|
1451
|
+
const b = Fe[m], C = tt(r), O = r.dateField;
|
|
1448
1452
|
if (O && typeof O != "string" && O.label && !r.timeGrain && y({
|
|
1449
1453
|
code: "invalid_change",
|
|
1450
1454
|
message: "A label names a column, and the date field is a column only when the card groups by it.",
|
|
1451
1455
|
path: `${f}.query.dateField.label`,
|
|
1452
1456
|
fix: "Send timeGrain to group by the date, or leave the label out."
|
|
1453
1457
|
}), !b.forms.includes(C)) {
|
|
1454
|
-
const
|
|
1458
|
+
const F = Object.keys(Fe).filter((R) => Fe[R].forms.includes(C));
|
|
1455
1459
|
y({
|
|
1456
1460
|
code: "type_not_supported",
|
|
1457
1461
|
message: `A ${m.replace(/_/g, " ")} card takes ${b.forms.map((R) => Ue[R]).join(" or ")}, not ${Ue[C]}.`,
|
|
1458
1462
|
path: `${f}.query`,
|
|
1459
|
-
fix: `Send ${b.forms.map((R) => Ue[R]).join(" or ")}, or use a type this query fits: ${
|
|
1463
|
+
fix: `Send ${b.forms.map((R) => Ue[R]).join(" or ")}, or use a type this query fits: ${F.join(", ")}.`
|
|
1460
1464
|
});
|
|
1461
1465
|
}
|
|
1462
1466
|
if (C === "measures") {
|
|
1463
|
-
const
|
|
1467
|
+
const F = r, R = F.measures.length;
|
|
1464
1468
|
b.measures && (R < b.measures.min || b.measures.max !== void 0 && R > b.measures.max) && y({
|
|
1465
1469
|
code: "type_not_supported",
|
|
1466
1470
|
message: `A ${m.replace(/_/g, " ")} card shows exactly ${b.measures.max} measure.`,
|
|
1467
1471
|
path: `${f}.query.measures`,
|
|
1468
1472
|
fix: "Send one measure, or use a table or chart for several."
|
|
1469
|
-
}), !b.dimensions && ((
|
|
1473
|
+
}), !b.dimensions && ((A = F.dimensions) != null && A.length) && y({
|
|
1470
1474
|
code: "type_not_supported",
|
|
1471
1475
|
message: `A ${m.replace(/_/g, " ")} card shows one number, so it has no dimensions.`,
|
|
1472
1476
|
path: `${f}.query.dimensions`,
|
|
1473
1477
|
fix: "Remove the dimensions, or use a table or chart."
|
|
1474
|
-
}), m === "matrix" && (
|
|
1478
|
+
}), m === "matrix" && (F.orderBy || F.limit) && y({
|
|
1475
1479
|
code: "type_not_supported",
|
|
1476
1480
|
message: "A Matrix's sorting and top N are set in the editor.",
|
|
1477
1481
|
path: `${f}.query`,
|
|
@@ -1484,14 +1488,14 @@ async function fs(e, a, t, s) {
|
|
|
1484
1488
|
path: `${f}.matrix`,
|
|
1485
1489
|
fix: "Send matrix: { columns: [...] } naming dimensions or the date field of the query (an empty list puts nothing across the top)."
|
|
1486
1490
|
}), !b.matrixColumns && u && y({ code: "type_not_supported", message: "matrix.columns is only for Matrix cards.", path: `${f}.matrix`, fix: 'Leave out matrix, or use type "matrix".' }), u && C === "measures") {
|
|
1487
|
-
const
|
|
1491
|
+
const F = r, R = F.datasetName, P = [...F.dimensions ?? [], ...F.timeGrain && F.dateField ? [F.dateField] : []];
|
|
1488
1492
|
P.length && u.columns.length >= P.length && P.every((M) => u.columns.some((U) => be(U, R) === be(M, R))) && y({
|
|
1489
1493
|
code: "type_not_supported",
|
|
1490
1494
|
message: "A Matrix needs at least one field down the side.",
|
|
1491
1495
|
path: `${f}.matrix.columns`,
|
|
1492
1496
|
fix: "Leave one dimension or the date field out of matrix.columns."
|
|
1493
1497
|
});
|
|
1494
|
-
const q = new Set([...
|
|
1498
|
+
const q = new Set([...F.dimensions ?? [], ...F.dateField ? [F.dateField] : []].map((M) => be(M, R)));
|
|
1495
1499
|
u.columns.forEach((M, U) => {
|
|
1496
1500
|
q.has(be(M, R)) || y({
|
|
1497
1501
|
code: "type_not_supported",
|
|
@@ -1508,10 +1512,10 @@ async function fs(e, a, t, s) {
|
|
|
1508
1512
|
fix: m.code === "query_not_kept" ? "Tell the user to make this change in the editor." : "Read the outline again and propose again.",
|
|
1509
1513
|
details: { reason: "not_expressible", ..."parts" in m ? { parts: m.parts } : {} }
|
|
1510
1514
|
}), Wt = (m, r, u, f, b, C, O) => {
|
|
1511
|
-
const
|
|
1512
|
-
if (!
|
|
1513
|
-
const
|
|
1514
|
-
if (
|
|
1515
|
+
const A = zn(m, r, u, C, O);
|
|
1516
|
+
if (!A.length) return;
|
|
1517
|
+
const F = r;
|
|
1518
|
+
if (A.length === 1 && A[0] === "dateField" && F.dateField && !F.timeGrain && !F.timeWindow) {
|
|
1515
1519
|
y({
|
|
1516
1520
|
code: "value_invalid",
|
|
1517
1521
|
message: `A dateField on its own doesn't change "${b}": it needs timeGrain to group by the date (a KPI's Trend By) or a timeWindow to filter by it.`,
|
|
@@ -1520,7 +1524,7 @@ async function fs(e, a, t, s) {
|
|
|
1520
1524
|
});
|
|
1521
1525
|
return;
|
|
1522
1526
|
}
|
|
1523
|
-
const R =
|
|
1527
|
+
const R = A.join(", ");
|
|
1524
1528
|
y({
|
|
1525
1529
|
code: "card_not_editable",
|
|
1526
1530
|
message: O ? `As changed, "${b}" wouldn't hold ${R} as asked, so make this change in the editor.` : `"${b}" can't be built holding ${R} as asked.`,
|
|
@@ -1532,37 +1536,37 @@ async function fs(e, a, t, s) {
|
|
|
1532
1536
|
const C = ct(m);
|
|
1533
1537
|
if ("sql" in r)
|
|
1534
1538
|
return D(`${f}.query`), { type: C, source: { kind: "sql", connectionId: r.connectionId, sql: r.sql } };
|
|
1535
|
-
const O = C === "matrixTable" || C === "detailTable" ? "table" : C,
|
|
1536
|
-
if (!
|
|
1537
|
-
throw n.push(...
|
|
1538
|
-
o.push(...
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1541
|
-
let R = { ...
|
|
1539
|
+
const O = C === "matrixTable" || C === "detailTable" ? "table" : C, A = await t.compileCardQuery({ query: r, chartType: O });
|
|
1540
|
+
if (!A.ok)
|
|
1541
|
+
throw n.push(...A.problems.map((q) => ({ ...q, path: q.path ? `${f}.query.${q.path}` : `${f}.query` }))), new me();
|
|
1542
|
+
o.push(...A.warnings.map((q) => ({ ...q, path: q.path ?? `${f}.query` })));
|
|
1543
|
+
const F = !b && "timeWindow" in r && r.timeWindow ? ui(A.part.config) : void 0;
|
|
1544
|
+
F && "timeWindow" in r && r.timeWindow && hs(r.timeWindow, { use: "cardFilter", columnHasTime: uo(F) }, `${f}.query.timeWindow`, y);
|
|
1545
|
+
let R = { ...A.part, type: C };
|
|
1542
1546
|
const P = R.config ?? {};
|
|
1543
1547
|
if (C === "detailTable") {
|
|
1544
|
-
const q =
|
|
1545
|
-
R = { ...R, config:
|
|
1548
|
+
const q = fo(mo("table", "detailTable", P)) ?? {};
|
|
1549
|
+
R = { ...R, config: oi(q) };
|
|
1546
1550
|
}
|
|
1547
|
-
return C === "matrixTable" && (R = await vs(R, P, r, u, f)),
|
|
1551
|
+
return C === "matrixTable" && (R = await vs(R, P, r, u, f)), ni(R, Ne(r));
|
|
1548
1552
|
}, vs = async (m, r, u, f, b) => {
|
|
1549
1553
|
var q;
|
|
1550
1554
|
const C = await t.loadCardSource({ domainId: u.domainId, datasetName: u.datasetName });
|
|
1551
1555
|
if (C || y({ code: "field_not_found", message: `The dataset "${u.datasetName}" isn't available.`, path: `${b}.query.datasetName`, fix: "Find datasets with semaphor_list_datasets." }), m.source.kind !== "semantic") throw new me();
|
|
1552
|
-
const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r },
|
|
1553
|
-
(
|
|
1556
|
+
const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, A = po(O, "matrixTable", { catalog: C.fields, createId: t.newId }), F = A.status === "changed" ? (q = A.card.config) == null ? void 0 : q.matrix : void 0;
|
|
1557
|
+
(A.status !== "changed" || A.leftOut.length || !F) && y({
|
|
1554
1558
|
code: "type_not_supported",
|
|
1555
|
-
message:
|
|
1559
|
+
message: A.status === "changed" && A.leftOut.length ? `These fields can't run in a Matrix: ${A.leftOut.join(", ")}.` : "This query can't be shown as a Matrix.",
|
|
1556
1560
|
path: `${b}.query`,
|
|
1557
1561
|
fix: "Use plain dataset fields for a Matrix, or use a table."
|
|
1558
1562
|
});
|
|
1559
|
-
let R =
|
|
1563
|
+
let R = F;
|
|
1560
1564
|
const P = u.datasetName;
|
|
1561
1565
|
for (const [M, U] of f.columns.entries()) {
|
|
1562
1566
|
const z = [...R.spec.rows, ...R.spec.columns].find(
|
|
1563
|
-
(W) =>
|
|
1567
|
+
(W) => go(W.field) === be(U, P)
|
|
1564
1568
|
);
|
|
1565
|
-
z || y({ code: "type_not_supported", message: `"${Ct(U)}" isn't a level of this Matrix.`, path: `${b}.matrix.columns[${M}]`, fix: "Name dimensions or the date field of the query in matrix.columns." }), R =
|
|
1569
|
+
z || y({ code: "type_not_supported", message: `"${Ct(U)}" isn't a level of this Matrix.`, path: `${b}.matrix.columns[${M}]`, fix: "Name dimensions or the date field of the query in matrix.columns." }), R = bo(R, yo(R.spec, z.id, "columns")).config;
|
|
1566
1570
|
}
|
|
1567
1571
|
return { ...m, config: { matrix: R } };
|
|
1568
1572
|
}, rt = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Map();
|
|
@@ -1595,7 +1599,7 @@ async function fs(e, a, t, s) {
|
|
|
1595
1599
|
fix: Y.length ? "Send sheetId: one of details.sheets." : "Add a sheet with sheet.add earlier in this list.",
|
|
1596
1600
|
details: { sheets: Be() }
|
|
1597
1601
|
}), Y[0];
|
|
1598
|
-
})(), C = f ? { after: f.frameId } : typeof r.position == "string" ? r.position : void 0, O = C || r.width ? { ...C ? { position: C } : {}, ...r.width ? { width: r.width } : {} } : void 0,
|
|
1602
|
+
})(), C = f ? { after: f.frameId } : typeof r.position == "string" ? r.position : void 0, O = C || r.width ? { ...C ? { position: C } : {}, ...r.width ? { width: r.width } : {} } : void 0, A = (Y) => {
|
|
1599
1603
|
const j = r.handle ?? `$card_${++x}`;
|
|
1600
1604
|
return h.has(j) && y({ code: "invalid_change", message: `The handle ${j} is defined twice.`, path: `${u}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(j, { kind: "card", id: Y.id, title: r.title }), d.push({ ref: j, kind: "card", id: Y.id, title: r.title, changeIndex: m }), j;
|
|
1601
1605
|
};
|
|
@@ -1604,13 +1608,13 @@ async function fs(e, a, t, s) {
|
|
|
1604
1608
|
Y.length && y({ code: "invalid_change", message: `A text card takes no ${et(Y)}.`, path: u, fix: xa }), r.text === void 0 && y({ code: "invalid_change", message: "A text card needs its words in text.", path: `${u}.text`, fix: xa });
|
|
1605
1609
|
const j = ga({ text: r.text, context: { dashboard: I, place: { kind: "sheet", sheetId: b.id } }, path: `${u}.text` });
|
|
1606
1610
|
j.ok || B(j.problems);
|
|
1607
|
-
const ne =
|
|
1611
|
+
const ne = zo({
|
|
1608
1612
|
id: t.newId(),
|
|
1609
1613
|
title: r.title,
|
|
1610
1614
|
...r.description ? { description: r.description } : {},
|
|
1611
1615
|
richContent: j.ok && !j.unchanged ? j.richContent : { version: 1, blocks: [{ type: "paragraph", children: [] }] }
|
|
1612
1616
|
});
|
|
1613
|
-
$({ op: "card.add", sheetId: b.id, frame: { id: t.newId(), cards: [ne], activeCardId: ne.id }, ...O ? { placement: O } : {}, changeIndex: m }, u),
|
|
1617
|
+
$({ op: "card.add", sheetId: b.id, frame: { id: t.newId(), cards: [ne], activeCardId: ne.id }, ...O ? { placement: O } : {}, changeIndex: m }, u), A(ne);
|
|
1614
1618
|
break;
|
|
1615
1619
|
}
|
|
1616
1620
|
(r.text !== void 0 || !r.query) && y({
|
|
@@ -1619,10 +1623,10 @@ async function fs(e, a, t, s) {
|
|
|
1619
1623
|
path: r.text !== void 0 ? `${u}.text` : `${u}.query`,
|
|
1620
1624
|
fix: "Send query; text is for type text."
|
|
1621
1625
|
});
|
|
1622
|
-
const
|
|
1626
|
+
const F = yt(r.query), R = F.query, P = r.type;
|
|
1623
1627
|
jt(P, R, r.matrix, u);
|
|
1624
1628
|
const q = await Ut(P, R, r.matrix, u), M = {
|
|
1625
|
-
...
|
|
1629
|
+
...Yo({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
|
|
1626
1630
|
type: q.type
|
|
1627
1631
|
}, U = ha(M, q);
|
|
1628
1632
|
U.ok || y({ code: "invalid_change", message: U.message, path: u });
|
|
@@ -1630,8 +1634,8 @@ async function fs(e, a, t, s) {
|
|
|
1630
1634
|
Wt(z, R, r.matrix, u, r.title, q);
|
|
1631
1635
|
const W = { id: t.newId(), cards: [z], activeCardId: z.id };
|
|
1632
1636
|
$({ op: "card.add", sheetId: b.id, frame: W, ...O ? { placement: O } : {}, changeIndex: m }, u);
|
|
1633
|
-
const X =
|
|
1634
|
-
c.push(z.id), await L({ cardId: z.id, cardRef: X, stated:
|
|
1637
|
+
const X = A(z);
|
|
1638
|
+
c.push(z.id), await L({ cardId: z.id, cardRef: X, stated: F.calculations, index: m, path: u }), await N({
|
|
1635
1639
|
cardId: z.id,
|
|
1636
1640
|
cardRef: X,
|
|
1637
1641
|
request: { settings: V(r) },
|
|
@@ -1648,11 +1652,11 @@ async function fs(e, a, t, s) {
|
|
|
1648
1652
|
break;
|
|
1649
1653
|
}
|
|
1650
1654
|
r.text !== void 0 && y({ code: "invalid_change", message: `"${(b == null ? void 0 : b.card.title) ?? f}" isn't a text card, so it takes no text.`, path: `${u}.text`, fix: "Change its query; text is for text cards." });
|
|
1651
|
-
const { card: C, read: O } =
|
|
1652
|
-
let
|
|
1655
|
+
const { card: C, read: O } = p(f, u);
|
|
1656
|
+
let A = !1, F = [];
|
|
1653
1657
|
const R = r.type && r.type !== ((Gt = qe(C)) == null ? void 0 : Gt.type) ? ct(r.type) : void 0;
|
|
1654
1658
|
if (R && R !== C.type) {
|
|
1655
|
-
const q = O.editable ? O.source : void 0, M =
|
|
1659
|
+
const q = O.editable ? O.source : void 0, M = eo(C, R), U = M && q && q.kind === "semantic" ? (Qt = await t.loadCardSource({ domainId: q.domainId, datasetName: q.datasetName })) == null ? void 0 : Qt.fields : void 0, z = [], W = to(C, R, {
|
|
1656
1660
|
...U ? { catalog: U } : {},
|
|
1657
1661
|
...M && !U ? { catalogLoading: !0 } : {},
|
|
1658
1662
|
createId: () => {
|
|
@@ -1670,12 +1674,12 @@ async function fs(e, a, t, s) {
|
|
|
1670
1674
|
}), $(
|
|
1671
1675
|
{ op: "card.update", cardId: f, update: { kind: "retype", type: R, ...U ? { catalog: U } : {}, newIds: z }, changeIndex: m },
|
|
1672
1676
|
`${u}.type`
|
|
1673
|
-
),
|
|
1677
|
+
), A = !0;
|
|
1674
1678
|
}
|
|
1675
1679
|
}
|
|
1676
1680
|
const P = r.query ? yt(r.query) : void 0;
|
|
1677
1681
|
if (r.query || r.matrix) {
|
|
1678
|
-
const q = ie(I, f).card, M = Ce(q, { sql: !0, calculations: !1 }), U = M.editable ? yt(M.query).query : void 0, z = U, W =
|
|
1682
|
+
const q = ie(I, f).card, M = Ce(q, { sql: !0, calculations: !1 }), U = M.editable ? yt(M.query).query : void 0, z = U, W = li(z, (P == null ? void 0 : P.query) ?? {}, `${u}.query`, (le) => {
|
|
1679
1683
|
if (le.code === "query_form_mismatch" && (P != null && P.calculations.length)) {
|
|
1680
1684
|
const pe = T(q, P.calculations, u), _e = fa({ card: q, stated: pe, context: { path: u, cardRef: r.cardId, dates: ka(q) } });
|
|
1681
1685
|
if (!_e.ok)
|
|
@@ -1683,20 +1687,20 @@ async function fs(e, a, t, s) {
|
|
|
1683
1687
|
}
|
|
1684
1688
|
return y(le);
|
|
1685
1689
|
});
|
|
1686
|
-
|
|
1690
|
+
F = di((P == null ? void 0 : P.query) ?? {}, W);
|
|
1687
1691
|
const X = ((Ht = qe(q)) == null ? void 0 : Ht.type) ?? $t(q.type), Y = r.matrix ?? (M.editable ? M.matrix : void 0);
|
|
1688
1692
|
jt(X, W, Y, u);
|
|
1689
|
-
const j = M.editable && U ?
|
|
1693
|
+
const j = M.editable && U ? ao(U, W, M.matrix, Y) : void 0, ne = !j || j.aspects.length > 0, fe = j && !("sql" in W) ? Ne(W).filter((le) => !ma(j, le.key.role)) : [], H = so(q, j, fe.map((le) => le.key.role));
|
|
1690
1694
|
H && Kt(H, u);
|
|
1691
1695
|
let de = W;
|
|
1692
1696
|
if (j && !("sql" in W) && W.orderBy && !j.aspects.includes("order") && ["metric", "group_by", "detail"].some((le) => ma(j, le))) {
|
|
1693
1697
|
const { orderBy: le, ...pe } = W;
|
|
1694
1698
|
de = pe;
|
|
1695
1699
|
}
|
|
1696
|
-
let
|
|
1700
|
+
let Ae;
|
|
1697
1701
|
if (ne) {
|
|
1698
1702
|
const le = !!(z && ms(z, (P == null ? void 0 : P.query) ?? {}) && (j != null && j.keptWindow)), pe = await Ut(X, de, Y, u, le), _e = pe.type === ct(X) ? { ...pe, type: q.type } : pe;
|
|
1699
|
-
|
|
1703
|
+
Ae = _e;
|
|
1700
1704
|
const da = j ? { ..._e, change: j } : _e, ge = ha(q, da);
|
|
1701
1705
|
if (ge.ok || Kt(ge, u), ge.ok && ge.droppedBindings.length && o.push({
|
|
1702
1706
|
code: "control_binding_dropped",
|
|
@@ -1713,11 +1717,11 @@ async function fs(e, a, t, s) {
|
|
|
1713
1717
|
fix: "State a new label on the field ref if the old one no longer fits.",
|
|
1714
1718
|
details: { columns: [{ label: Ve.label, field: Ve.field }] }
|
|
1715
1719
|
});
|
|
1716
|
-
$({ op: "card.update", cardId: f, update: { kind: "requery", query: da }, changeIndex: m }, `${u}.query`),
|
|
1720
|
+
$({ op: "card.update", cardId: f, update: { kind: "requery", query: da }, changeIndex: m }, `${u}.query`), A = !0;
|
|
1717
1721
|
}
|
|
1718
|
-
fe.length && pa(ie(I, f).card, fe).changed.length && $({ op: "card.update", cardId: f, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${u}.query`), (ne || fe.length) && Wt(ie(I, f).card, de, Y, u, q.title ?? "",
|
|
1722
|
+
fe.length && pa(ie(I, f).card, fe).changed.length && $({ op: "card.update", cardId: f, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${u}.query`), (ne || fe.length) && Wt(ie(I, f).card, de, Y, u, q.title ?? "", Ae, j);
|
|
1719
1723
|
}
|
|
1720
|
-
(r.query || R) && await L({ cardId: f, cardRef: r.cardId, stated: (P == null ? void 0 : P.calculations) ?? [], index: m, path: u }) && (
|
|
1724
|
+
(r.query || R) && await L({ cardId: f, cardRef: r.cardId, stated: (P == null ? void 0 : P.calculations) ?? [], index: m, path: u }) && (A = !0), (r.title !== void 0 || r.description !== void 0) && $(
|
|
1721
1725
|
{
|
|
1722
1726
|
op: "card.update",
|
|
1723
1727
|
cardId: f,
|
|
@@ -1733,10 +1737,10 @@ async function fs(e, a, t, s) {
|
|
|
1733
1737
|
cardId: f,
|
|
1734
1738
|
cardRef: r.cardId,
|
|
1735
1739
|
request: { settings: V(r) },
|
|
1736
|
-
queryLabels:
|
|
1740
|
+
queryLabels: F,
|
|
1737
1741
|
index: m,
|
|
1738
1742
|
path: u
|
|
1739
|
-
}),
|
|
1743
|
+
}), A && !c.includes(f) && c.push(f), d.push({ ref: r.cardId, kind: "card", id: f, title: C.title ?? "", changeIndex: m });
|
|
1740
1744
|
break;
|
|
1741
1745
|
}
|
|
1742
1746
|
case "card.remove": {
|
|
@@ -1760,7 +1764,7 @@ async function fs(e, a, t, s) {
|
|
|
1760
1764
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1761
1765
|
details: { available: f.fields.slice(0, 20).map((P) => P.name) }
|
|
1762
1766
|
});
|
|
1763
|
-
const C = r.sheetIds ? Vt(r.sheetIds, u) : void 0, O = Ta(C),
|
|
1767
|
+
const C = r.sheetIds ? Vt(r.sheetIds, u) : void 0, O = Ta(C), A = Ho({
|
|
1764
1768
|
field: b,
|
|
1765
1769
|
dataSource: f.dataSource,
|
|
1766
1770
|
connectionId: f.connectionId,
|
|
@@ -1769,10 +1773,10 @@ async function fs(e, a, t, s) {
|
|
|
1769
1773
|
dashboard: I,
|
|
1770
1774
|
createId: t.newId,
|
|
1771
1775
|
label: r.label
|
|
1772
|
-
}),
|
|
1773
|
-
|
|
1776
|
+
}), F = { ...A.filter };
|
|
1777
|
+
F.dateSelectionMode || (F.type = r.selection ?? "multiple"), r.defaultValues && (F.defaultValues = r.defaultValues), r.defaultPeriod && (F.defaultDateFilter = Ra(r.defaultPeriod, b, `${u}.defaultPeriod`, y)), $({ op: "filter.add", input: { ...A, filter: F }, changeIndex: m }, u), rt.set(A.id, { sheetIds: C ?? "all", changeIndex: m }), (r.defaultValues !== void 0 || r.defaultPeriod !== void 0) && dt.set(A.id, { values: r.defaultValues, period: r.defaultPeriod, changeIndex: m });
|
|
1774
1778
|
const R = r.handle;
|
|
1775
|
-
R && (h.has(R) && y({ code: "invalid_change", message: `The handle ${R} is defined twice.`, path: `${u}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(R, { kind: "filter", id:
|
|
1779
|
+
R && (h.has(R) && y({ code: "invalid_change", message: `The handle ${R} is defined twice.`, path: `${u}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(R, { kind: "filter", id: A.id, title: r.label })), d.push({ ref: R ?? A.id, kind: "filter", id: A.id, title: r.label, changeIndex: m });
|
|
1776
1780
|
break;
|
|
1777
1781
|
}
|
|
1778
1782
|
case "filter.update": {
|
|
@@ -1786,26 +1790,26 @@ async function fs(e, a, t, s) {
|
|
|
1786
1790
|
const C = (I.inputs ?? []).find((P) => P.id === f);
|
|
1787
1791
|
if ((C == null ? void 0 : C.kind) !== "filter" || !C.filter) throw new me();
|
|
1788
1792
|
const O = { ...C.filter };
|
|
1789
|
-
let
|
|
1790
|
-
r.selection && (O.type = r.selection), r.defaultValues !== void 0 && (
|
|
1793
|
+
let A = !1;
|
|
1794
|
+
r.selection && (O.type = r.selection), r.defaultValues !== void 0 && (A = !0, r.defaultValues === null ? delete O.defaultValues : O.defaultValues = r.defaultValues), r.defaultPeriod !== void 0 && (A = !0, r.defaultPeriod === null ? delete O.defaultDateFilter : O.defaultDateFilter = Ra(
|
|
1791
1795
|
r.defaultPeriod,
|
|
1792
1796
|
{ dataType: O.dataType },
|
|
1793
1797
|
`${u}.defaultPeriod`,
|
|
1794
1798
|
y
|
|
1795
1799
|
));
|
|
1796
|
-
const
|
|
1800
|
+
const F = r.sheetIds === void 0 ? void 0 : r.sheetIds ? Vt(r.sheetIds, u) : "all", R = {
|
|
1797
1801
|
...r.label !== void 0 ? { label: r.label } : {},
|
|
1798
|
-
...r.selection !== void 0 ||
|
|
1802
|
+
...r.selection !== void 0 || A ? { definition: O } : {},
|
|
1799
1803
|
// A change of sheets states the sheets; what else the scope says (the cards it leaves out,
|
|
1800
1804
|
// whether it covers Document sheets) stays.
|
|
1801
|
-
...
|
|
1805
|
+
...F ? { scope: Po(
|
|
1802
1806
|
C.scope,
|
|
1803
|
-
Ta(
|
|
1807
|
+
Ta(F === "all" ? void 0 : F),
|
|
1804
1808
|
new Set([...Ot(I).values()].filter((P) => P.sheetKind === "document").map((P) => P.sheetId))
|
|
1805
1809
|
) } : {},
|
|
1806
|
-
...
|
|
1810
|
+
...A ? { values: { defaultChanged: !0, target: {} } } : {}
|
|
1807
1811
|
};
|
|
1808
|
-
$({ op: "filter.update", filterId: f, settings: R, changeIndex: m }, u),
|
|
1812
|
+
$({ op: "filter.update", filterId: f, settings: R, changeIndex: m }, u), F && rt.set(f, { sheetIds: F, changeIndex: m }), A && dt.set(f, { values: r.defaultValues, period: r.defaultPeriod, changeIndex: m }), d.push({ ref: r.filterId, kind: "filter", id: f, title: C.label, changeIndex: m });
|
|
1809
1813
|
break;
|
|
1810
1814
|
}
|
|
1811
1815
|
case "filter.remove": {
|
|
@@ -1821,8 +1825,8 @@ async function fs(e, a, t, s) {
|
|
|
1821
1825
|
path: `${u}.filterId`,
|
|
1822
1826
|
fix: "Tell the user to change it in the editor; removing or excluding it works."
|
|
1823
1827
|
});
|
|
1824
|
-
const C = Bt(r.cardId, `${u}.cardId`), O = Ua(I, C).card,
|
|
1825
|
-
$({ op: "filter.bind", filterId: f, cardId: C, binding: { kind: "bound", cardId: C, bindingId: t.newId(), target:
|
|
1828
|
+
const C = Bt(r.cardId, `${u}.cardId`), O = Ua(I, C).card, A = await fi(O, r.field, t, `${u}.field`, y);
|
|
1829
|
+
$({ op: "filter.bind", filterId: f, cardId: C, binding: { kind: "bound", cardId: C, bindingId: t.newId(), target: A }, changeIndex: m }, u), d.push({ ref: r.filterId, kind: "filter", id: f, title: b.label, changeIndex: m });
|
|
1826
1830
|
break;
|
|
1827
1831
|
}
|
|
1828
1832
|
case "layout.arrange": {
|
|
@@ -1844,9 +1848,9 @@ async function fs(e, a, t, s) {
|
|
|
1844
1848
|
new Set(f).size !== f.length && b("Each card is named once in tabs.", "Name two or more different cards, each once.");
|
|
1845
1849
|
const C = f.map((q, M) => ie(I, q) ?? b("A Document section's card can't be a tab.", "Name cards on a grid sheet.", `${u}.cardIds[${M}]`)), O = C[0].sheet;
|
|
1846
1850
|
C.some((q) => q.sheet.id !== O.id) && b("Tabs are cards on one sheet.", "Name cards on one sheet; a card moves to another sheet in the editor."), C.some((q) => bt(q.frame) && q.frame.cards.length > 1) && b("A custom visual's inputs stay in its spot.", "Name cards that aren't a custom visual's inputs, or arrange them in the editor.");
|
|
1847
|
-
const
|
|
1848
|
-
d.push({ ref: r.cardIds[0], kind: "card", id:
|
|
1849
|
-
const R = Ba(
|
|
1851
|
+
const A = C[0].frame, F = C[0].card;
|
|
1852
|
+
d.push({ ref: r.cardIds[0], kind: "card", id: F.id, title: F.title ?? "", changeIndex: m });
|
|
1853
|
+
const R = Ba(A);
|
|
1850
1854
|
if (f.every((q, M) => R[M] === q)) break;
|
|
1851
1855
|
const P = [...new Map(C.map((q) => [q.frame.id, q.frame])).values()].filter((q) => q.visualId);
|
|
1852
1856
|
P.length && o.push({
|
|
@@ -1854,9 +1858,9 @@ async function fs(e, a, t, s) {
|
|
|
1854
1858
|
message: "Moving these cards makes the tiles they leave or join local to this dashboard; they stop following their library visuals.",
|
|
1855
1859
|
path: u,
|
|
1856
1860
|
details: { cardIds: P.flatMap((q) => q.cards.map((M) => M.id)) }
|
|
1857
|
-
}),
|
|
1861
|
+
}), F.type === "kpi" && C.slice(1).some((q) => q.card.type === "text") && o.push({
|
|
1858
1862
|
code: "tabs_show_as_kpi_info",
|
|
1859
|
-
message: `A text card in ${Va(
|
|
1863
|
+
message: `A text card in ${Va(F.title)}'s spot shows as the KPI's info, not as a tab.`,
|
|
1860
1864
|
path: u,
|
|
1861
1865
|
fix: "Put another card first if the text should be a tab of its own."
|
|
1862
1866
|
}), $({ op: "layout.tabs", sheetId: O.id, cardIds: f, changeIndex: m }, u);
|
|
@@ -1880,14 +1884,14 @@ async function fs(e, a, t, s) {
|
|
|
1880
1884
|
}
|
|
1881
1885
|
case "highlight.add":
|
|
1882
1886
|
case "highlight.remove": {
|
|
1883
|
-
const f = oe(r.cardId, `${u}.cardId`), { card: b } =
|
|
1887
|
+
const f = oe(r.cardId, `${u}.cardId`), { card: b } = p(f, u), { op: C, cardId: O, ...A } = r, F = await N({
|
|
1884
1888
|
cardId: f,
|
|
1885
1889
|
cardRef: r.cardId,
|
|
1886
|
-
request: { highlights: r.op === "highlight.add" ? { add: [
|
|
1890
|
+
request: { highlights: r.op === "highlight.add" ? { add: [A] } : { remove: [r.ruleId] } },
|
|
1887
1891
|
queryLabels: [],
|
|
1888
1892
|
index: m,
|
|
1889
1893
|
path: u
|
|
1890
|
-
}), R = (Xt = (Jt =
|
|
1894
|
+
}), R = (Xt = (Jt = F == null ? void 0 : F.highlights) == null ? void 0 : Jt.add) == null ? void 0 : Xt[0];
|
|
1891
1895
|
d.push({ ref: r.cardId, kind: "card", id: f, title: b.title ?? "", changeIndex: m, ...R ? { ruleId: R.id } : {} });
|
|
1892
1896
|
break;
|
|
1893
1897
|
}
|
|
@@ -1919,12 +1923,12 @@ async function fs(e, a, t, s) {
|
|
|
1919
1923
|
case "dashboard.style": {
|
|
1920
1924
|
const { op: f, ...b } = r;
|
|
1921
1925
|
w ?? (w = t.readOrganizationAppearance ? t.readOrganizationAppearance() : Promise.resolve(null));
|
|
1922
|
-
const { style: C, organizationAppearance: O } = za(I, await w),
|
|
1923
|
-
if (
|
|
1924
|
-
|
|
1926
|
+
const { style: C, organizationAppearance: O } = za(I, await w), A = dn({ style: C, edit: b, layers: { organizationAppearance: O } });
|
|
1927
|
+
if (A.ok)
|
|
1928
|
+
A.sentences.length && $({ op: "dashboard.style", style: A.style, sentences: A.sentences, changeIndex: m }, u);
|
|
1925
1929
|
else {
|
|
1926
|
-
const { refusal:
|
|
1927
|
-
y({ code:
|
|
1930
|
+
const { refusal: F } = A;
|
|
1931
|
+
y({ code: F.code, message: F.message, path: F.field === "edit" ? u : `${u}.${F.field}`, fix: F.fix });
|
|
1928
1932
|
}
|
|
1929
1933
|
break;
|
|
1930
1934
|
}
|
|
@@ -1948,7 +1952,7 @@ async function fs(e, a, t, s) {
|
|
|
1948
1952
|
break;
|
|
1949
1953
|
}
|
|
1950
1954
|
case "variable.update": {
|
|
1951
|
-
const f =
|
|
1955
|
+
const f = Yn(I, r.name, `${u}.name`, Te), b = r.rename ?? f.name, C = {
|
|
1952
1956
|
...r.rename !== void 0 ? { name: r.rename } : {},
|
|
1953
1957
|
...r.label !== void 0 ? { label: r.label } : {},
|
|
1954
1958
|
...r.presentation !== void 0 ? { presentation: r.presentation } : {},
|
|
@@ -1971,18 +1975,18 @@ async function fs(e, a, t, s) {
|
|
|
1971
1975
|
);
|
|
1972
1976
|
C.query = R.query, C.get = R.get;
|
|
1973
1977
|
} else if (r.get !== void 0) {
|
|
1974
|
-
const R =
|
|
1978
|
+
const R = Zn(f, r.get, O, Te, u);
|
|
1975
1979
|
C.query = R.query, C.get = R.get;
|
|
1976
1980
|
}
|
|
1977
1981
|
Object.keys(C).length || y({ code: "invalid_change", message: `variable.update on ${f.name} changes nothing.`, path: u, fix: "Send rename, label, query, get, presentation or emptyText." });
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1982
|
+
const A = { ...f, ...Object.fromEntries(Object.entries(C).map(([R, P]) => [R, P ?? void 0])), id: f.id }, F = Dt(A, { ...O, variables: [...O.variables, A] });
|
|
1983
|
+
F.length && B(cs(F, u)), $({ op: "variable.update", variableId: f.id, patch: C, changeIndex: m }, u), d.push({ ref: r.name, kind: "variable", id: f.id, title: b, changeIndex: m });
|
|
1980
1984
|
break;
|
|
1981
1985
|
}
|
|
1982
1986
|
case "variable.remove": {
|
|
1983
1987
|
const f = Je(I, r.name);
|
|
1984
1988
|
f || y(ls(I, r.name, `${u}.name`));
|
|
1985
|
-
const b = f, C =
|
|
1989
|
+
const b = f, C = ei(I, b.id);
|
|
1986
1990
|
C.places.length && y({
|
|
1987
1991
|
code: "variable_in_use",
|
|
1988
1992
|
message: `${b.name} is shown in ${C.words}.`,
|
|
@@ -1993,7 +1997,7 @@ async function fs(e, a, t, s) {
|
|
|
1993
1997
|
break;
|
|
1994
1998
|
}
|
|
1995
1999
|
case "document.text.update": {
|
|
1996
|
-
const f = it(r.sheetId, `${u}.sheetId`, { grid: !1 }), { edit: b, unchanged: C } =
|
|
2000
|
+
const f = it(r.sheetId, `${u}.sheetId`, { grid: !1 }), { edit: b, unchanged: C } = ti(r, I, f, u, Te);
|
|
1997
2001
|
if (d.push({ ref: r.sheetId, kind: "sheet", id: f.id, title: f.title ?? "", changeIndex: m }), C) break;
|
|
1998
2002
|
$({ op: "document.text", sheetId: f.id, edit: b, changeIndex: m }, u);
|
|
1999
2003
|
break;
|
|
@@ -2008,7 +2012,7 @@ async function fs(e, a, t, s) {
|
|
|
2008
2012
|
}
|
|
2009
2013
|
}
|
|
2010
2014
|
if (n.length) return { ok: !1, problems: n };
|
|
2011
|
-
const ae = wt(e, i,
|
|
2015
|
+
const ae = wt(e, i, g);
|
|
2012
2016
|
if (!ae.ok)
|
|
2013
2017
|
return {
|
|
2014
2018
|
ok: !1,
|
|
@@ -2025,31 +2029,31 @@ async function fs(e, a, t, s) {
|
|
|
2025
2029
|
const r = ie(ae.dashboard, m);
|
|
2026
2030
|
if (!r) continue;
|
|
2027
2031
|
const u = ((ea = i.find((O) => Pt(O) === m)) == null ? void 0 : ea.changeIndex) ?? 0, f = Ce(r.card, { sql: !0 }), b = ((ta = qe(r.card)) == null ? void 0 : ta.type) ?? $t(r.card.type);
|
|
2028
|
-
f.editable && ("sql" in f.query ? !!f.query.sql : "measures" in f.query ? f.query.measures.length > 0 : f.query.columns.length > 0) && ((aa =
|
|
2032
|
+
f.editable && ("sql" in f.query ? !!f.query.sql : "measures" in f.query ? f.query.measures.length > 0 : f.query.columns.length > 0) && ((aa = Fe[b]) == null ? void 0 : aa.forms.includes(tt(f.query))) || n.push({
|
|
2029
2033
|
code: "type_not_supported",
|
|
2030
2034
|
message: `As changed, "${r.card.title}" would have no query a ${b.replace(/_/g, " ")} can run.`,
|
|
2031
2035
|
path: `changes[${u}]`,
|
|
2032
|
-
fix: `Send a complete query with the type change: ${((sa =
|
|
2036
|
+
fix: `Send a complete query with the type change: ${((sa = Fe[b]) == null ? void 0 : sa.forms.map((O) => Ue[O]).join(" or ")) ?? "a measures query"}.`
|
|
2033
2037
|
});
|
|
2034
2038
|
}
|
|
2035
|
-
if (n.push(...
|
|
2039
|
+
if (n.push(...ii(e, ae.dashboard, i, rt, v)), n.push(...ri(ae.dashboard, dt, t.calendar)), n.length) return { ok: !1, problems: n };
|
|
2036
2040
|
for (const m of i) {
|
|
2037
2041
|
if (m.op !== "filter.add" && !(m.op === "filter.update" && m.settings.scope)) continue;
|
|
2038
2042
|
const r = m.op === "filter.add" ? m.input.id : m.filterId, u = Le(ae.dashboard, r, void 0, v);
|
|
2039
2043
|
if (!(u != null && u.editable)) continue;
|
|
2040
|
-
const f = async (
|
|
2041
|
-
const
|
|
2042
|
-
for (const R of
|
|
2044
|
+
const f = async (A) => {
|
|
2045
|
+
const F = [];
|
|
2046
|
+
for (const R of A) {
|
|
2043
2047
|
const P = R.datasetName ? await t.findRelationshipFields({
|
|
2044
2048
|
domainId: u.domainId,
|
|
2045
2049
|
fromDataset: u.datasetName,
|
|
2046
2050
|
field: u.field,
|
|
2047
2051
|
toDataset: R.datasetName
|
|
2048
2052
|
}) : [];
|
|
2049
|
-
|
|
2053
|
+
F.push({ ...R, suggestedFields: P });
|
|
2050
2054
|
}
|
|
2051
|
-
return
|
|
2052
|
-
}, b = (
|
|
2055
|
+
return F;
|
|
2056
|
+
}, b = (A) => A.map((F) => `"${F.title}"`).join(", "), C = u.notReached.filter((A) => A.reason === "sql_no_filter_reference"), O = u.notReached.filter((A) => A.reason !== "sql_no_filter_reference");
|
|
2053
2057
|
if (C.length && o.push({
|
|
2054
2058
|
code: "filter_not_reaching_cards",
|
|
2055
2059
|
message: `"${u.label}" doesn't reach ${C.length} SQL card${C.length === 1 ? "" : "s"} whose SQL doesn't use dashboard filters: ${b(C)}.`,
|
|
@@ -2057,13 +2061,13 @@ async function fs(e, a, t, s) {
|
|
|
2057
2061
|
fix: "To filter a SQL card, add {{ filters | where }} to its SQL (or {{ filters | and }} after an existing WHERE) with card.update, or leave it unfiltered.",
|
|
2058
2062
|
details: { cards: C }
|
|
2059
2063
|
}), O.length) {
|
|
2060
|
-
const
|
|
2064
|
+
const A = await f(O);
|
|
2061
2065
|
o.push({
|
|
2062
2066
|
code: "filter_not_reaching_cards",
|
|
2063
|
-
message: `"${u.label}" doesn't reach ${
|
|
2067
|
+
message: `"${u.label}" doesn't reach ${A.length} card${A.length === 1 ? "" : "s"} on its sheets: ${b(A)}.`,
|
|
2064
2068
|
path: `changes[${m.changeIndex ?? 0}]`,
|
|
2065
2069
|
fix: "Add filter.bind with one of the suggested fields to reach a card, or leave it unfiltered.",
|
|
2066
|
-
details: { cards:
|
|
2070
|
+
details: { cards: A }
|
|
2067
2071
|
});
|
|
2068
2072
|
}
|
|
2069
2073
|
if ((oa = u.sqlPending) != null && oa.length && o.push({
|
|
@@ -2073,13 +2077,13 @@ async function fs(e, a, t, s) {
|
|
|
2073
2077
|
fix: "Read the card's SQL to tell the user whether it uses this filter.",
|
|
2074
2078
|
details: { cards: u.sqlPending }
|
|
2075
2079
|
}), (na = u.relationshipPending) != null && na.length) {
|
|
2076
|
-
const
|
|
2080
|
+
const A = await f(u.relationshipPending);
|
|
2077
2081
|
o.push({
|
|
2078
2082
|
code: "filter_reach_through_relationships",
|
|
2079
|
-
message: `"${u.label}" may reach ${
|
|
2083
|
+
message: `"${u.label}" may reach ${A.length} card${A.length === 1 ? "" : "s"} on its sheets through the domain's relationships: ${b(A)}. Whether it applies is decided when each card runs.`,
|
|
2080
2084
|
path: `changes[${m.changeIndex ?? 0}]`,
|
|
2081
2085
|
fix: "Add filter.bind with one of the suggested fields to make it certain, or leave it to the relationships.",
|
|
2082
|
-
details: { cards:
|
|
2086
|
+
details: { cards: A }
|
|
2083
2087
|
});
|
|
2084
2088
|
}
|
|
2085
2089
|
}
|
|
@@ -2095,11 +2099,11 @@ async function fs(e, a, t, s) {
|
|
|
2095
2099
|
fix: "Add a timeWindow on that date, or a dashboard date filter that reaches the card."
|
|
2096
2100
|
});
|
|
2097
2101
|
}
|
|
2098
|
-
const Is =
|
|
2102
|
+
const Is = si(ae.dashboard, i, ae.descriptions, v);
|
|
2099
2103
|
return {
|
|
2100
2104
|
ok: !0,
|
|
2101
2105
|
operations: i,
|
|
2102
|
-
context:
|
|
2106
|
+
context: g,
|
|
2103
2107
|
dashboard: ae.dashboard,
|
|
2104
2108
|
detaches: ae.detaches,
|
|
2105
2109
|
refs: d,
|
|
@@ -2109,7 +2113,7 @@ async function fs(e, a, t, s) {
|
|
|
2109
2113
|
warnings: o
|
|
2110
2114
|
};
|
|
2111
2115
|
}
|
|
2112
|
-
function
|
|
2116
|
+
function si(e, a, t, s) {
|
|
2113
2117
|
const n = a.filter((l) => l.op === "card.add");
|
|
2114
2118
|
if (!n.length) return [...t];
|
|
2115
2119
|
const o = as(e, void 0, s);
|
|
@@ -2118,12 +2122,12 @@ function ai(e, a, t, s) {
|
|
|
2118
2122
|
for (const l of n) {
|
|
2119
2123
|
const c = Pt(l);
|
|
2120
2124
|
if (!c || l.changeIndex === void 0) continue;
|
|
2121
|
-
const h = o.filter((_) => _.reaches.includes(c)).map((_) => _.label),
|
|
2125
|
+
const h = o.filter((_) => _.reaches.includes(c)).map((_) => _.label), g = (_) => o.filter(
|
|
2122
2126
|
(S) => {
|
|
2123
2127
|
var y;
|
|
2124
2128
|
return "notReached" in S && ((y = S.notReached) == null ? void 0 : y.some((D) => D.cardId === c && D.reason === "sql_no_filter_reference" === _));
|
|
2125
2129
|
}
|
|
2126
|
-
).map((S) => S.label), v =
|
|
2130
|
+
).map((S) => S.label), v = g(!1), I = g(!0), w = o.filter((_) => {
|
|
2127
2131
|
var S;
|
|
2128
2132
|
return (S = _.relationshipPending) == null ? void 0 : S.some((y) => y.cardId === c);
|
|
2129
2133
|
}).map((_) => _.label), x = o.filter((_) => {
|
|
@@ -2148,25 +2152,25 @@ function Pt(e) {
|
|
|
2148
2152
|
if (e.op === "card.update" || e.op === "card.remove") return e.cardId;
|
|
2149
2153
|
if (e.op === "card.add") return (a = e.frame.cards[0]) == null ? void 0 : a.id;
|
|
2150
2154
|
}
|
|
2151
|
-
function
|
|
2155
|
+
function oi(e) {
|
|
2152
2156
|
return Object.fromEntries(
|
|
2153
|
-
|
|
2157
|
+
ho.flatMap((a) => e[a] === void 0 ? [] : [[a, e[a]]])
|
|
2154
2158
|
);
|
|
2155
2159
|
}
|
|
2156
|
-
function
|
|
2160
|
+
function ni(e, a) {
|
|
2157
2161
|
if (!a.length || !e.config) return e;
|
|
2158
2162
|
const t = { ...e.config }, s = [];
|
|
2159
2163
|
if (t.matrix) {
|
|
2160
|
-
const o = t.matrix, i =
|
|
2161
|
-
for (const { key: h, label:
|
|
2164
|
+
const o = t.matrix, i = vo(o), d = [...o.spec.rows, ...o.spec.columns], l = { ...o.presentation.levelLabels }, c = { ...o.presentation.measureLabels };
|
|
2165
|
+
for (const { key: h, label: g } of a) {
|
|
2162
2166
|
if (h.role === "metric") {
|
|
2163
2167
|
const v = i.measures.findIndex((I) => He(I, h));
|
|
2164
2168
|
if (v < 0) continue;
|
|
2165
|
-
c[o.spec.measures[v].id] =
|
|
2169
|
+
c[o.spec.measures[v].id] = g;
|
|
2166
2170
|
} else {
|
|
2167
2171
|
const v = i.levels.findIndex((I) => He(I, h));
|
|
2168
2172
|
if (v < 0) continue;
|
|
2169
|
-
l[d[v].id] =
|
|
2173
|
+
l[d[v].id] = g;
|
|
2170
2174
|
}
|
|
2171
2175
|
s.push(h);
|
|
2172
2176
|
}
|
|
@@ -2175,11 +2179,11 @@ function oi(e, a) {
|
|
|
2175
2179
|
const n = { metric: "metricColumns", group_by: "groupByColumns", detail: "detailColumns" };
|
|
2176
2180
|
for (const { key: o, label: i } of a) {
|
|
2177
2181
|
const d = [...t[n[o.role]] ?? []], l = Ka(o.role, d).findIndex((c) => He(c, o));
|
|
2178
|
-
l < 0 || (d[l] =
|
|
2182
|
+
l < 0 || (d[l] = mn(d[l], i), t[n[o.role]] = d, s.push(o));
|
|
2179
2183
|
}
|
|
2180
2184
|
return { ...e, config: t, statedLabels: s };
|
|
2181
2185
|
}
|
|
2182
|
-
function
|
|
2186
|
+
function ii(e, a, t, s, n) {
|
|
2183
2187
|
var E;
|
|
2184
2188
|
const o = [], i = new Map(we(a).map((_) => [_.cardId, _])), d = Ot(a), l = $e(a), c = (_) => {
|
|
2185
2189
|
var S, y;
|
|
@@ -2187,7 +2191,7 @@ function ni(e, a, t, s, n) {
|
|
|
2187
2191
|
}, h = (_, S) => {
|
|
2188
2192
|
var y;
|
|
2189
2193
|
return ((y = [...t].reverse().find((D) => Pt(D) === S || "filterId" in D && D.filterId === _)) == null ? void 0 : y.changeIndex) ?? 0;
|
|
2190
|
-
},
|
|
2194
|
+
}, g = (_, S) => {
|
|
2191
2195
|
const y = l.findFilterInput({ inputId: _ }).input, D = i.get(S), $ = `"${D.card.title ?? ""}"`, N = `"${y.label}"`;
|
|
2192
2196
|
if (D.kind === "documentSectionCard")
|
|
2193
2197
|
return {
|
|
@@ -2195,14 +2199,14 @@ function ni(e, a, t, s, n) {
|
|
|
2195
2199
|
message: `${$} is in a Document section, which takes only the filters its Document sheet shows.`,
|
|
2196
2200
|
fix: "Tell the user to change where the filter shows in the editor."
|
|
2197
2201
|
};
|
|
2198
|
-
const
|
|
2199
|
-
if (
|
|
2202
|
+
const p = d.get(D.sheetId);
|
|
2203
|
+
if (p && !Ga(y, p))
|
|
2200
2204
|
return {
|
|
2201
2205
|
reason: "outside_sheets",
|
|
2202
2206
|
message: `${N} isn't shown on "${c(D.sheetId)}", so it can't filter ${$}.`,
|
|
2203
2207
|
fix: "Show it on that sheet first with filter.update sheetIds (null for every sheet), in the same proposal."
|
|
2204
2208
|
};
|
|
2205
|
-
const k =
|
|
2209
|
+
const k = Io(y, D.card);
|
|
2206
2210
|
switch (k.status) {
|
|
2207
2211
|
case "incompatible":
|
|
2208
2212
|
return { reason: "incompatible_field", message: `${$} can't take ${N}'s values on that field: their types differ.`, fix: "Bind a field of the same type (filter.bind)." };
|
|
@@ -2256,7 +2260,7 @@ function ni(e, a, t, s, n) {
|
|
|
2256
2260
|
const D = S.reaches.includes(_.cardId);
|
|
2257
2261
|
if (_.op === "filter.bind" ? D : !D) continue;
|
|
2258
2262
|
v.add(`${_.filterId}|${_.cardId}`);
|
|
2259
|
-
const $ = _.op === "filter.bind" ?
|
|
2263
|
+
const $ = _.op === "filter.bind" ? g(_.filterId, _.cardId) : { reason: "filter_settings_override", message: `"${S.label}" would still filter "${y.card.title ?? ""}".`, fix: "Tell the user to change the filter's settings in the editor." };
|
|
2260
2264
|
o.push({
|
|
2261
2265
|
code: "filter_not_editable",
|
|
2262
2266
|
message: $.message,
|
|
@@ -2268,9 +2272,9 @@ function ni(e, a, t, s, n) {
|
|
|
2268
2272
|
for (const [_, S] of s) {
|
|
2269
2273
|
const y = Le(a, _, void 0, n);
|
|
2270
2274
|
if (!y) continue;
|
|
2271
|
-
const D = y.editable && ((E = y.exceptSheetIds) == null ? void 0 : E.some((
|
|
2275
|
+
const D = y.editable && ((E = y.exceptSheetIds) == null ? void 0 : E.some((p) => {
|
|
2272
2276
|
var k;
|
|
2273
|
-
return ((k = d.get(
|
|
2277
|
+
return ((k = d.get(p)) == null ? void 0 : k.sheetKind) === "dashboard";
|
|
2274
2278
|
})), $ = y.editable && !D ? y.sheetIds : void 0, N = S.sheetIds === "all" ? "all" : [...S.sheetIds].sort();
|
|
2275
2279
|
Pe($ === "all" || !$ ? $ : [...$].sort(), N) || o.push({
|
|
2276
2280
|
code: "filter_not_editable",
|
|
@@ -2285,9 +2289,9 @@ function ni(e, a, t, s, n) {
|
|
|
2285
2289
|
const S = _.input.id;
|
|
2286
2290
|
for (const y of l.reachedCards({ inputId: S })) {
|
|
2287
2291
|
if (v.has(`${S}|${y.cardId}`) || !x(Ee(_.input, y.card, n).reach)) continue;
|
|
2288
|
-
const D = w.findFilterInput({ inputId: S }), $ = D && w.reachedCards({ inputId: S }).find((
|
|
2292
|
+
const D = w.findFilterInput({ inputId: S }), $ = D && w.reachedCards({ inputId: S }).find((p) => p.cardId === y.cardId);
|
|
2289
2293
|
if (D && $ && x(Ee(D.input, $.card, n).reach)) continue;
|
|
2290
|
-
const N =
|
|
2294
|
+
const N = g(S, y.cardId);
|
|
2291
2295
|
o.push({
|
|
2292
2296
|
code: "invalid_change",
|
|
2293
2297
|
message: `${N.message} The card would stop showing data while "${_.input.label}" has a value.`,
|
|
@@ -2299,12 +2303,12 @@ function ni(e, a, t, s, n) {
|
|
|
2299
2303
|
}
|
|
2300
2304
|
return o;
|
|
2301
2305
|
}
|
|
2302
|
-
function
|
|
2306
|
+
function ri(e, a, t) {
|
|
2303
2307
|
const s = [], n = $e(e);
|
|
2304
2308
|
for (const [o, i] of a) {
|
|
2305
2309
|
const d = n.findFilterInput({ inputId: o });
|
|
2306
2310
|
if (!d) continue;
|
|
2307
|
-
const l = Ha({ dashboard: e, target: { kind: "dashboardInput", input: d.input, scope: {} }, calendar: t }).value, c = d.input.filter.dateSelectionMode, h = c === "day" ? "its date picker takes one day" : void 0,
|
|
2311
|
+
const l = Ha({ dashboard: e, target: { kind: "dashboardInput", input: d.input, scope: {} }, calendar: t }).value, c = d.input.filter.dateSelectionMode, h = c === "day" ? "its date picker takes one day" : void 0, g = (v, I) => s.push({
|
|
2308
2312
|
code: "filter_not_editable",
|
|
2309
2313
|
message: v,
|
|
2310
2314
|
path: `changes[${i.changeIndex}]`,
|
|
@@ -2313,15 +2317,15 @@ function ii(e, a, t) {
|
|
|
2313
2317
|
});
|
|
2314
2318
|
if (i.period) {
|
|
2315
2319
|
const v = Ja(l && "relativeMeta" in l ? l.relativeMeta : void 0);
|
|
2316
|
-
(!v ||
|
|
2320
|
+
(!v || an(i.period) || !sn(v, i.period)) && g(
|
|
2317
2321
|
`"${d.input.label}" wouldn't load with that default${h ? `: ${h}` : ""}.`,
|
|
2318
2322
|
h ? "Ask for a default the picker can take, or tell the user to make it a date range in the editor." : "Tell the user to change the filter's default in the editor."
|
|
2319
2323
|
);
|
|
2320
2324
|
} else if (i.values) {
|
|
2321
2325
|
const v = (I) => JSON.stringify((I ?? []).map(String).sort());
|
|
2322
|
-
(!l || v(l.values) !== v(i.values)) &&
|
|
2326
|
+
(!l || v(l.values) !== v(i.values)) && g(`"${d.input.label}" wouldn't load with those values.`, "Tell the user to change the filter's default in the editor.");
|
|
2323
2327
|
} else
|
|
2324
|
-
(Ya(d.input.filter.dataType) ? i.period === null : i.values === null) && l &&
|
|
2328
|
+
(Ya(d.input.filter.dataType) ? i.period === null : i.values === null) && l && g(`"${d.input.label}" would still load with a default.`, "Tell the user to change the filter's default in the editor.");
|
|
2325
2329
|
}
|
|
2326
2330
|
return s;
|
|
2327
2331
|
}
|
|
@@ -2337,10 +2341,10 @@ function yt(e) {
|
|
|
2337
2341
|
}
|
|
2338
2342
|
function ka(e) {
|
|
2339
2343
|
var t, s;
|
|
2340
|
-
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((n) =>
|
|
2344
|
+
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((n) => co(n.dataType || "") === "date");
|
|
2341
2345
|
return { comparisonDate: a ? { name: a.name, label: a.label || a.name } : null, dateWindow: "unknown" };
|
|
2342
2346
|
}
|
|
2343
|
-
function
|
|
2347
|
+
function di(e, a) {
|
|
2344
2348
|
if ("sql" in a) return [];
|
|
2345
2349
|
const t = e, s = (...o) => new Set(o.flatMap((i) => Array.isArray(i) ? i : i ? [i] : []).map((i) => be(i, a.datasetName))), n = {
|
|
2346
2350
|
metric: s(t.measures),
|
|
@@ -2349,10 +2353,10 @@ function ri(e, a) {
|
|
|
2349
2353
|
};
|
|
2350
2354
|
return Ne(a).filter((o) => n[o.key.role].has(o.key.field));
|
|
2351
2355
|
}
|
|
2352
|
-
function
|
|
2353
|
-
const n = Object.fromEntries(Object.entries(a).filter(([,
|
|
2356
|
+
function li(e, a, t, s) {
|
|
2357
|
+
const n = Object.fromEntries(Object.entries(a).filter(([, g]) => g != null)), o = tt(n), i = tt(e), d = (g) => Sa[g].safeParse(n);
|
|
2354
2358
|
if (!e || o && o !== i) {
|
|
2355
|
-
const
|
|
2359
|
+
const g = o ?? i, v = g ? d(g) : void 0;
|
|
2356
2360
|
return v != null && v.success ? v.data : s({
|
|
2357
2361
|
code: e ? "query_form_mismatch" : "type_not_supported",
|
|
2358
2362
|
message: e ? "This patch changes the query's form (measures, records or SQL) without a complete query." : "This card's current query can't be patched; send a complete query.",
|
|
@@ -2361,17 +2365,17 @@ function di(e, a, t, s) {
|
|
|
2361
2365
|
});
|
|
2362
2366
|
}
|
|
2363
2367
|
const l = { ...e };
|
|
2364
|
-
for (const [
|
|
2365
|
-
v !== void 0 && (v === null ? delete l[
|
|
2368
|
+
for (const [g, v] of Object.entries(a))
|
|
2369
|
+
v !== void 0 && (v === null ? delete l[g] : l[g] = v);
|
|
2366
2370
|
const c = ms(e, a);
|
|
2367
2371
|
c && delete l.timeWindow;
|
|
2368
2372
|
const h = Sa[i].safeParse(l);
|
|
2369
2373
|
if (!h.success) {
|
|
2370
|
-
const
|
|
2374
|
+
const g = h.error.issues[0];
|
|
2371
2375
|
return s({
|
|
2372
|
-
code: (
|
|
2373
|
-
message: (
|
|
2374
|
-
path:
|
|
2376
|
+
code: (g == null ? void 0 : g.code) === "unrecognized_keys" ? "query_form_mismatch" : "invalid_change",
|
|
2377
|
+
message: (g == null ? void 0 : g.message) ?? "The merged query is not valid.",
|
|
2378
|
+
path: g ? us(t, g) : t,
|
|
2375
2379
|
fix: "Patch only keys of the card's query form, or send a complete query of a new form."
|
|
2376
2380
|
});
|
|
2377
2381
|
}
|
|
@@ -2385,10 +2389,10 @@ function Ta(e) {
|
|
|
2385
2389
|
return e ? { kind: "sheets", sheetIds: e } : { kind: "allSheets", sheetKinds: ["dashboard"] };
|
|
2386
2390
|
}
|
|
2387
2391
|
function Ra(e, a, t, s) {
|
|
2388
|
-
return ["date", "datetime", "timestamp"].some((i) => Tt(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." }), hs(e, { use: "filterDefault", columnHasTime:
|
|
2392
|
+
return ["date", "datetime", "timestamp"].some((i) => Tt(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." }), hs(e, { use: "filterDefault", columnHasTime: ci(a) }, t, s);
|
|
2389
2393
|
}
|
|
2390
2394
|
function hs(e, a, t, s) {
|
|
2391
|
-
const n =
|
|
2395
|
+
const n = on(e, a);
|
|
2392
2396
|
return n.ok ? n.window : s({
|
|
2393
2397
|
code: "invalid_change",
|
|
2394
2398
|
message: n.refusal.message,
|
|
@@ -2396,15 +2400,15 @@ function hs(e, a, t, s) {
|
|
|
2396
2400
|
path: n.refusal.path ? `${t}.${n.refusal.path}` : t
|
|
2397
2401
|
});
|
|
2398
2402
|
}
|
|
2399
|
-
function
|
|
2403
|
+
function ci(e) {
|
|
2400
2404
|
return qa({ dataType: e.dataType }) === "datetime";
|
|
2401
2405
|
}
|
|
2402
|
-
function
|
|
2406
|
+
function ui(e) {
|
|
2403
2407
|
var a, t, s;
|
|
2404
2408
|
return (s = (t = (a = e == null ? void 0 : e.filters) == null ? void 0 : a.conditions) == null ? void 0 : t.find((n) => n.relativeMeta)) == null ? void 0 : s.field;
|
|
2405
2409
|
}
|
|
2406
|
-
async function
|
|
2407
|
-
const o =
|
|
2410
|
+
async function fi(e, a, t, s, n) {
|
|
2411
|
+
const o = no(e), i = o.kind === "config" ? o.executableSources : o.kind === "sql" ? o.pinnedCatalogSources.map((w) => w.source) : [], d = he(e), l = typeof a == "string" ? (d == null ? void 0 : d.kind) === "semantic" ? d.datasetName : void 0 : a.datasetName, c = i.find((w) => w.kind === "semantic" && Tt(w.datasetName) === Tt(l));
|
|
2408
2412
|
if (!c || c.kind !== "semantic")
|
|
2409
2413
|
return n({
|
|
2410
2414
|
code: "field_not_found",
|
|
@@ -2412,21 +2416,21 @@ async function ui(e, a, t, s, n) {
|
|
|
2412
2416
|
path: s,
|
|
2413
2417
|
fix: "Name a field of the card's own dataset, or { name, datasetName } for a dataset its query joins."
|
|
2414
2418
|
});
|
|
2415
|
-
const h = await t.loadCardSource({ domainId: c.domainId, datasetName: c.datasetName }),
|
|
2419
|
+
const h = await t.loadCardSource({ domainId: c.domainId, datasetName: c.datasetName }), g = typeof a == "string" ? a : a.name, v = h ? ot(h.fields, g, c.datasetName) : void 0, I = v ? Jo(c, { column_name: v.name, data_type: v.dataType, ...v.sourceField ? { sourceField: v.sourceField } : {} }) : void 0;
|
|
2416
2420
|
return I || n({
|
|
2417
2421
|
code: "field_not_found",
|
|
2418
|
-
message: `"${
|
|
2422
|
+
message: `"${g}" isn't a field of ${c.datasetName}.`,
|
|
2419
2423
|
path: s,
|
|
2420
2424
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
2421
2425
|
details: { available: ((h == null ? void 0 : h.fields) ?? []).slice(0, 20).map((w) => w.name) }
|
|
2422
2426
|
});
|
|
2423
2427
|
}
|
|
2424
|
-
const
|
|
2428
|
+
const mi = {
|
|
2425
2429
|
max: ba,
|
|
2426
2430
|
what: "A proposal that creates a dashboard",
|
|
2427
2431
|
fix: `Create with the first ${ba}, then change the new dashboard in a second proposal.`
|
|
2428
2432
|
};
|
|
2429
|
-
async function
|
|
2433
|
+
async function Or(e, a) {
|
|
2430
2434
|
const t = (d) => d && typeof d == "object" ? d.op : void 0, s = e.changes.flatMap(
|
|
2431
2435
|
(d, l) => t(d) === "dashboard.update" ? [
|
|
2432
2436
|
{
|
|
@@ -2438,12 +2442,12 @@ async function Dr(e, a) {
|
|
|
2438
2442
|
] : []
|
|
2439
2443
|
);
|
|
2440
2444
|
if (s.length) return { ok: !1, problems: s };
|
|
2441
|
-
const n =
|
|
2445
|
+
const n = pi(e, a), o = await fs(n, e.changes, a, { limit: mi });
|
|
2442
2446
|
if (!o.ok) return o;
|
|
2443
|
-
const i =
|
|
2444
|
-
return { ...i, seed: n, sentence:
|
|
2447
|
+
const i = hi(o, e.changes);
|
|
2448
|
+
return { ...i, seed: n, sentence: gi(i.dashboard) };
|
|
2445
2449
|
}
|
|
2446
|
-
function
|
|
2450
|
+
function hi(e, a) {
|
|
2447
2451
|
if (a.some((o) => {
|
|
2448
2452
|
if (!o || typeof o != "object") return !1;
|
|
2449
2453
|
const { op: i } = o;
|
|
@@ -2460,7 +2464,7 @@ function mi(e, a) {
|
|
|
2460
2464
|
descriptions: [...e.descriptions, ...n.descriptions]
|
|
2461
2465
|
};
|
|
2462
2466
|
}
|
|
2463
|
-
function
|
|
2467
|
+
function pi(e, a) {
|
|
2464
2468
|
const t = e.changes.some((s) => s && typeof s == "object" && s.op === "sheet.add");
|
|
2465
2469
|
return {
|
|
2466
2470
|
id: e.dashboardId,
|
|
@@ -2472,34 +2476,34 @@ function hi(e, a) {
|
|
|
2472
2476
|
};
|
|
2473
2477
|
}
|
|
2474
2478
|
const vt = (e, a) => `${e} ${a}${e === 1 ? "" : "s"}`;
|
|
2475
|
-
function
|
|
2479
|
+
function gi(e) {
|
|
2476
2480
|
const a = e.sheets ?? [], t = a.reduce((o, i) => o + (i.frames ?? []).reduce((d, l) => {
|
|
2477
2481
|
var c;
|
|
2478
2482
|
return d + (((c = l.cards) == null ? void 0 : c.length) ?? 0);
|
|
2479
2483
|
}, 0), 0), s = (e.inputs ?? []).filter((o) => o.kind === "filter").length, n = [vt(a.length, "sheet"), vt(t, "card"), ...s ? [vt(s, "filter")] : []];
|
|
2480
2484
|
return `Creates a private dashboard ${Va(e.title)} with ${et(n)}.`;
|
|
2481
2485
|
}
|
|
2482
|
-
const
|
|
2483
|
-
function
|
|
2486
|
+
const bi = 50;
|
|
2487
|
+
function Er(e, a) {
|
|
2484
2488
|
var $, N;
|
|
2485
|
-
const t = ($ = a.sheetIds) != null && $.length ? new Set(a.sheetIds) : void 0, s = (N = a.cardIds) != null && N.length ? new Set(a.cardIds) : void 0, n = (e.sheets ?? []).filter((
|
|
2486
|
-
(
|
|
2487
|
-
), i = o.length > (a.maxQueryCards ??
|
|
2488
|
-
(e.sheets ?? []).flatMap((
|
|
2489
|
-
), l = /* @__PURE__ */ new Map(), c = (
|
|
2490
|
-
(
|
|
2489
|
+
const t = ($ = a.sheetIds) != null && $.length ? new Set(a.sheetIds) : void 0, s = (N = a.cardIds) != null && N.length ? new Set(a.cardIds) : void 0, n = (e.sheets ?? []).filter((p) => !t || t.has(p.id)), o = we(e).filter(
|
|
2490
|
+
(p) => (!t || t.has(p.sheetId)) && (!s || s.has(p.cardId))
|
|
2491
|
+
), i = o.length > (a.maxQueryCards ?? bi), d = new Map(
|
|
2492
|
+
(e.sheets ?? []).flatMap((p) => (p.frames ?? []).map((k) => [k.id, k]))
|
|
2493
|
+
), l = /* @__PURE__ */ new Map(), c = (p) => {
|
|
2494
|
+
(p == null ? void 0 : p.kind) === "semantic" && l.set(`${p.domainId}|${p.datasetName}`, { domainId: p.domainId, datasetName: p.datasetName });
|
|
2491
2495
|
}, h = new Map(
|
|
2492
|
-
(e.sheets ?? []).map((
|
|
2493
|
-
),
|
|
2494
|
-
if (
|
|
2495
|
-
const T = _t({ dashboard: e, place: { kind: "sheet", sheetId:
|
|
2496
|
-
return I.set(`${
|
|
2497
|
-
}, x = n.map((
|
|
2498
|
-
sheetId:
|
|
2499
|
-
title:
|
|
2500
|
-
kind:
|
|
2501
|
-
...
|
|
2502
|
-
cards: o.filter((k) => k.sheetId ===
|
|
2496
|
+
(e.sheets ?? []).map((p) => [p.id, _t({ dashboard: e, place: { kind: p.kind === "document" ? "document" : "sheet", sheetId: p.id } })])
|
|
2497
|
+
), g = (p) => ({ catalog: p, inputs: e.inputs, variables: e.variables }), v = (p) => g(h.get(p)), I = /* @__PURE__ */ new Map(), w = (p, k) => {
|
|
2498
|
+
if (p.kind === "document") return v(p.id);
|
|
2499
|
+
const T = _t({ dashboard: e, place: { kind: "sheet", sheetId: p.id, cardId: k } });
|
|
2500
|
+
return I.set(`${p.id}:${k}`, T), g(T);
|
|
2501
|
+
}, x = n.map((p) => ({
|
|
2502
|
+
sheetId: p.id,
|
|
2503
|
+
title: p.title ?? "",
|
|
2504
|
+
kind: p.kind === "document" ? "document" : "dashboard",
|
|
2505
|
+
...p.kind === "document" ? vi(p, v(p.id)) : { layout: Ci(p) },
|
|
2506
|
+
cards: o.filter((k) => k.sheetId === p.id).map((k) => {
|
|
2503
2507
|
var oe;
|
|
2504
2508
|
const T = k.card, L = k.kind === "frameCard" ? (oe = d.get(k.frameId)) == null ? void 0 : oe.visualId : void 0, V = L ? { linkedVisualId: L } : {}, K = { cardId: k.cardId, title: T.title ?? "" };
|
|
2505
2509
|
if (k.kind !== "frameCard") {
|
|
@@ -2517,7 +2521,7 @@ function Or(e, a) {
|
|
|
2517
2521
|
};
|
|
2518
2522
|
}
|
|
2519
2523
|
if (T.type === "text") {
|
|
2520
|
-
const te = ja(T, w(
|
|
2524
|
+
const te = ja(T, w(p, T.id));
|
|
2521
2525
|
return te.editable ? { ...K, type: "text", ...V, editable: !0, text: te.text, ...te.editorOnly.length ? { editorOnly: te.editorOnly } : {} } : { ...K, ...Ge(T), ...V, editable: !1, notEditable: { reason: "text", message: te.message } };
|
|
2522
2526
|
}
|
|
2523
2527
|
const B = Ce(T, { sql: a.sql });
|
|
@@ -2530,7 +2534,7 @@ function Or(e, a) {
|
|
|
2530
2534
|
editable: !1,
|
|
2531
2535
|
notEditable: { reason: B.reason, message: B.message, ...B.detail ? { detail: B.detail } : {} }
|
|
2532
2536
|
};
|
|
2533
|
-
const se = i ? void 0 :
|
|
2537
|
+
const se = i ? void 0 : Ft(T);
|
|
2534
2538
|
return {
|
|
2535
2539
|
...K,
|
|
2536
2540
|
...Ge(T),
|
|
@@ -2549,20 +2553,20 @@ function Or(e, a) {
|
|
|
2549
2553
|
})), E = as(e, es(a.calendar, a.updatedAt), {
|
|
2550
2554
|
...a.relationshipReach ? { relationshipReach: a.relationshipReach } : {}
|
|
2551
2555
|
});
|
|
2552
|
-
for (const
|
|
2553
|
-
|
|
2554
|
-
const _ =
|
|
2555
|
-
for (const
|
|
2556
|
-
const k = kt(
|
|
2556
|
+
for (const p of E)
|
|
2557
|
+
p.editable && l.set(`${p.domainId}|${p.datasetName}`, { domainId: p.domainId, datasetName: p.datasetName });
|
|
2558
|
+
const _ = Ii(e, a, new Map([...h, ...I]));
|
|
2559
|
+
for (const p of e.variables ?? []) {
|
|
2560
|
+
const k = kt(p);
|
|
2557
2561
|
(k == null ? void 0 : k.kind) === "semantic" && l.set(`${k.domainId}|${k.datasetName}`, { domainId: k.domainId, datasetName: k.datasetName });
|
|
2558
2562
|
}
|
|
2559
|
-
const S = (e.variables ?? []).filter((
|
|
2563
|
+
const S = (e.variables ?? []).filter((p) => {
|
|
2560
2564
|
var k;
|
|
2561
|
-
return ((k = kt(
|
|
2562
|
-
}).map((
|
|
2563
|
-
(
|
|
2565
|
+
return ((k = kt(p)) == null ? void 0 : k.kind) === "physical";
|
|
2566
|
+
}).map((p) => p.name), y = (e.sheets ?? []).some(
|
|
2567
|
+
(p) => {
|
|
2564
2568
|
var k;
|
|
2565
|
-
return (k =
|
|
2569
|
+
return (k = p.document) == null ? void 0 : k.sections.some((T) => {
|
|
2566
2570
|
var L, V;
|
|
2567
2571
|
return T.type === "text" && (((L = T.style) == null ? void 0 : L.fontWeight) || ((V = T.style) == null ? void 0 : V.color));
|
|
2568
2572
|
});
|
|
@@ -2584,46 +2588,46 @@ function Or(e, a) {
|
|
|
2584
2588
|
sheets: x,
|
|
2585
2589
|
filters: E,
|
|
2586
2590
|
variables: _,
|
|
2587
|
-
style:
|
|
2591
|
+
style: yi(e, a),
|
|
2588
2592
|
editorOnly: D,
|
|
2589
2593
|
...i ? { truncated: !0 } : {}
|
|
2590
2594
|
};
|
|
2591
2595
|
}
|
|
2592
|
-
function
|
|
2596
|
+
function yi(e, a) {
|
|
2593
2597
|
const { style: t, organizationAppearance: s } = za(e, a.organizationAppearance);
|
|
2594
|
-
return { set:
|
|
2598
|
+
return { set: Rn(t), shows: ln({ organizationAppearance: s, dashboardStyle: t }, "light").shows };
|
|
2595
2599
|
}
|
|
2596
|
-
function
|
|
2597
|
-
const t =
|
|
2600
|
+
function Aa(e, a) {
|
|
2601
|
+
const t = $o(a);
|
|
2598
2602
|
return t ? { ...e, style: t } : e;
|
|
2599
2603
|
}
|
|
2600
|
-
function
|
|
2604
|
+
function vi(e, a) {
|
|
2601
2605
|
const t = e.document;
|
|
2602
2606
|
if (!t) return {};
|
|
2603
2607
|
const s = (n) => {
|
|
2604
2608
|
var o;
|
|
2605
2609
|
return (((o = t[n]) == null ? void 0 : o.blocks) ?? []).flatMap(
|
|
2606
|
-
(i) => i.type === "text" && i.role ? [
|
|
2610
|
+
(i) => i.type === "text" && i.role ? [Aa({ role: i.role, text: Ze(i.content, { ...a, documentInputs: t.inputs }) }, i.style)] : []
|
|
2607
2611
|
);
|
|
2608
2612
|
};
|
|
2609
2613
|
return {
|
|
2610
2614
|
header: s("header"),
|
|
2611
2615
|
footer: s("footer"),
|
|
2612
2616
|
textSections: t.sections.flatMap(
|
|
2613
|
-
(n) => n.type === "text" ? [
|
|
2617
|
+
(n) => n.type === "text" ? [Aa({ sectionId: n.id, text: Ze(n.content, { ...a, documentInputs: t.inputs }) }, n.style)] : []
|
|
2614
2618
|
)
|
|
2615
2619
|
};
|
|
2616
2620
|
}
|
|
2617
|
-
function
|
|
2618
|
-
const s = Qa(e), n = (c) => s.filter(({ ref: h }) => c(h)).map(({ place: h, where:
|
|
2621
|
+
function Ii(e, a, t) {
|
|
2622
|
+
const s = Qa(e), n = (c) => s.filter(({ ref: h }) => c(h)).map(({ place: h, where: g }) => ({
|
|
2619
2623
|
sheetId: h.sheetId,
|
|
2620
|
-
where:
|
|
2621
|
-
id:
|
|
2624
|
+
where: g.kind,
|
|
2625
|
+
id: g.kind === "card" ? g.cardId : g.kind === "section" ? g.sectionId : g.blockId
|
|
2622
2626
|
})), o = /* @__PURE__ */ new Map();
|
|
2623
2627
|
for (const c of t.values())
|
|
2624
2628
|
for (const h of c.entries) {
|
|
2625
|
-
const
|
|
2626
|
-
(!
|
|
2629
|
+
const g = o.get(h.name);
|
|
2630
|
+
(!g || g.kind === "report" && h.kind !== "report") && o.set(h.name, h);
|
|
2627
2631
|
}
|
|
2628
2632
|
const i = [...o.values()].filter((c) => c.kind === "input").map((c) => ({
|
|
2629
2633
|
name: c.name,
|
|
@@ -2635,27 +2639,27 @@ function vi(e, a, t) {
|
|
|
2635
2639
|
})), d = [...o.values()].filter((c) => c.kind === "report").map((c) => ({
|
|
2636
2640
|
name: c.name,
|
|
2637
2641
|
kind: "report",
|
|
2638
|
-
words:
|
|
2642
|
+
words: _i[c.reportKey],
|
|
2639
2643
|
parts: [],
|
|
2640
2644
|
usedIn: n((h) => h.source === "documentMeta" && h.key === c.reportKey),
|
|
2641
2645
|
editable: !1
|
|
2642
2646
|
})), l = (e.variables ?? []).map((c) => {
|
|
2643
|
-
const h = rs(c, { sql: a.sql }),
|
|
2647
|
+
const h = rs(c, { sql: a.sql }), g = Dt(c, e)[0], v = Co(c.presentation);
|
|
2644
2648
|
return {
|
|
2645
2649
|
name: c.name,
|
|
2646
2650
|
kind: "data",
|
|
2647
|
-
words:
|
|
2648
|
-
parts:
|
|
2651
|
+
words: Xo(c),
|
|
2652
|
+
parts: Lo(c),
|
|
2649
2653
|
...v ? { presentation: v } : {},
|
|
2650
2654
|
usedIn: n((I) => I.source === "data" && I.variableId === c.id),
|
|
2651
2655
|
editable: h.editable,
|
|
2652
2656
|
...h.editable ? {} : { notEditable: { reason: h.reason, message: h.message } },
|
|
2653
|
-
...
|
|
2657
|
+
...g ? { broken: `${g.message} ${g.fix}` } : {}
|
|
2654
2658
|
};
|
|
2655
2659
|
});
|
|
2656
2660
|
return [...i, ...d, ...l];
|
|
2657
2661
|
}
|
|
2658
|
-
const
|
|
2662
|
+
const _i = {
|
|
2659
2663
|
generatedAt: "When the report was generated",
|
|
2660
2664
|
pageNumber: "The page number (Documents)",
|
|
2661
2665
|
pageCount: "The page count (Documents)"
|
|
@@ -2664,9 +2668,9 @@ function Ge(e) {
|
|
|
2664
2668
|
const a = qe(e);
|
|
2665
2669
|
return a ? { type: a.type, ...a.properties } : { type: $t(e.type) };
|
|
2666
2670
|
}
|
|
2667
|
-
function
|
|
2671
|
+
function Ci(e) {
|
|
2668
2672
|
const a = new Map((e.frames ?? []).map((t) => [t.id, t]));
|
|
2669
|
-
return
|
|
2673
|
+
return hn(e).rows.map((t) => ({
|
|
2670
2674
|
tiles: t.tiles.map((s) => {
|
|
2671
2675
|
const n = a.get(s.frameId);
|
|
2672
2676
|
return { cardIds: n ? Ba(n) : [], width: s.width };
|
|
@@ -2679,13 +2683,13 @@ function Z(e) {
|
|
|
2679
2683
|
function ue(e, a) {
|
|
2680
2684
|
return Z(e) && Object.prototype.hasOwnProperty.call(e, a) && e[a] !== void 0;
|
|
2681
2685
|
}
|
|
2682
|
-
const re = ue,
|
|
2683
|
-
function
|
|
2686
|
+
const re = ue, $i = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], wi = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], xi = '`format` on the matching column in `config.metricColumns`, `groupByColumns` or `detailColumns`; for a SQL or Python card, `preferences.sqlColumns["<column>"].format`', Qe = "`preferences.conditionalFormatting`, with columns named by card column id";
|
|
2687
|
+
function Si(e) {
|
|
2684
2688
|
return Me(String(e.type)) ?? Et;
|
|
2685
2689
|
}
|
|
2686
2690
|
function Oe(e, a, t) {
|
|
2687
2691
|
if (t === void 0) return;
|
|
2688
|
-
const s = Z(t) ?
|
|
2692
|
+
const s = Z(t) ? Si(t).safeParse(t) : Et.safeParse(t);
|
|
2689
2693
|
if (!s.success)
|
|
2690
2694
|
for (const n of s.error.issues) {
|
|
2691
2695
|
const o = n.code === "unrecognized_keys" ? n.keys : [n.path.length ? String(n.path[n.path.length - 1]) : "type"];
|
|
@@ -2706,7 +2710,7 @@ function It(e, a, t) {
|
|
|
2706
2710
|
}
|
|
2707
2711
|
function ps(e, a) {
|
|
2708
2712
|
const t = [], s = e.config;
|
|
2709
|
-
for (const w of
|
|
2713
|
+
for (const w of $i) {
|
|
2710
2714
|
const x = s == null ? void 0 : s[w];
|
|
2711
2715
|
Array.isArray(x) && x.forEach((E, _) => It(t, `${a}.config.${w}[${_}]`, E));
|
|
2712
2716
|
}
|
|
@@ -2734,18 +2738,18 @@ function ps(e, a) {
|
|
|
2734
2738
|
re(l, "numberAxisFormat") && t.push({ path: `${c}.numberAxisFormat`, field: "numberAxisFormat", replacement: "`valueFormat` on `preferences.yAxisConfig` (or the axis it formats)" }), re(l, "columnSettings") && t.push({ path: `${c}.columnSettings`, field: "columnSettings", replacement: "`preferences.tablePrefs.columnSettingsMap`, keyed by column" });
|
|
2735
2739
|
const h = l.kpiVisualOptions;
|
|
2736
2740
|
re(h, "formatOptions") && t.push({ path: `${c}.kpiVisualOptions.formatOptions`, field: "formatOptions", replacement: "`format` on each measure in `config.metricColumns`; for a SQL KPI, `preferences.sqlKpiValue.format`" }), re(h, "queryComparisonPolarity") && t.push({ path: `${c}.kpiVisualOptions.queryComparisonPolarity`, field: "queryComparisonPolarity", replacement: "`preferences.sqlKpiValue.comparisonPolarity`" });
|
|
2737
|
-
const
|
|
2738
|
-
re(
|
|
2739
|
-
const v =
|
|
2741
|
+
const g = l.tablePrefs;
|
|
2742
|
+
re(g, "conditionalFormatting") && t.push({ path: `${c}.tablePrefs.conditionalFormatting`, field: "conditionalFormatting", replacement: Qe });
|
|
2743
|
+
const v = g == null ? void 0 : g.columnSettingsMap;
|
|
2740
2744
|
if (Z(v))
|
|
2741
2745
|
for (const [w, x] of Object.entries(v)) {
|
|
2742
2746
|
if (!Z(x)) continue;
|
|
2743
2747
|
const E = `${c}.tablePrefs.columnSettingsMap.${w}`;
|
|
2744
2748
|
for (const _ of ["numberFormat", "dateFormat", "inheritMetricFormat"])
|
|
2745
|
-
re(x, _) && t.push({ path: `${E}.${_}`, field: _, replacement: _ === "inheritMetricFormat" ? "nothing: a column follows its `format`" :
|
|
2749
|
+
re(x, _) && t.push({ path: `${E}.${_}`, field: _, replacement: _ === "inheritMetricFormat" ? "nothing: a column follows its `format`" : xi });
|
|
2746
2750
|
re(x, "colorRanges") && t.push({ path: `${E}.colorRanges`, field: "colorRanges", replacement: Qe });
|
|
2747
2751
|
}
|
|
2748
|
-
for (const w of
|
|
2752
|
+
for (const w of wi) {
|
|
2749
2753
|
const x = l[w];
|
|
2750
2754
|
if (Z(x)) {
|
|
2751
2755
|
for (const E of ["formatMode", "mode", "formatOptions"])
|
|
@@ -2759,7 +2763,7 @@ function ps(e, a) {
|
|
|
2759
2763
|
Z(x) && Oe(t, `${c}.sqlColumns.${w}.format`, x.format);
|
|
2760
2764
|
return Z(l.sqlKpiValue) && Oe(t, `${c}.sqlKpiValue.format`, l.sqlKpiValue.format), t;
|
|
2761
2765
|
}
|
|
2762
|
-
function
|
|
2766
|
+
function ki(e) {
|
|
2763
2767
|
const a = `sheets[id=${e.sheetId}]`;
|
|
2764
2768
|
switch (e.kind) {
|
|
2765
2769
|
case "sheetCard":
|
|
@@ -2775,20 +2779,20 @@ function gs(e) {
|
|
|
2775
2779
|
if (Array.isArray(e.sheets))
|
|
2776
2780
|
return we(e).map((t) => ({
|
|
2777
2781
|
card: t.card,
|
|
2778
|
-
at:
|
|
2782
|
+
at: ki(t)
|
|
2779
2783
|
}));
|
|
2780
2784
|
const a = e;
|
|
2781
2785
|
return Array.isArray(a.cards) ? a.cards.map((t) => ({ card: t, at: `cards[id=${t.id}]` })) : [];
|
|
2782
2786
|
}
|
|
2783
|
-
function
|
|
2787
|
+
function qr(e) {
|
|
2784
2788
|
return gs(e).flatMap(({ card: a, at: t }) => ps(a, t));
|
|
2785
2789
|
}
|
|
2786
|
-
function
|
|
2790
|
+
function Ti(e, a) {
|
|
2787
2791
|
var o;
|
|
2788
2792
|
const t = (o = e.preferences) == null ? void 0 : o.conditionalFormatting;
|
|
2789
2793
|
if (t === void 0) return [];
|
|
2790
|
-
const s = `${a}.preferences.conditionalFormatting`, n =
|
|
2791
|
-
return n.success ?
|
|
2794
|
+
const s = `${a}.preferences.conditionalFormatting`, n = wo.safeParse(t);
|
|
2795
|
+
return n.success ? xo(e).map((i) => ({
|
|
2792
2796
|
code: "invalid_conditional_formatting",
|
|
2793
2797
|
path: `${s}.rules[id=${i.ruleId}].${i.path}`,
|
|
2794
2798
|
message: i.message
|
|
@@ -2798,14 +2802,14 @@ function ki(e, a) {
|
|
|
2798
2802
|
message: i.message
|
|
2799
2803
|
}));
|
|
2800
2804
|
}
|
|
2801
|
-
function
|
|
2805
|
+
function Nr(e) {
|
|
2802
2806
|
return gs(e).flatMap(({ card: a, at: t }) => [
|
|
2803
2807
|
...ps(a, t).map((s) => ({
|
|
2804
2808
|
code: "retired_presentation_field",
|
|
2805
2809
|
path: s.path,
|
|
2806
2810
|
message: `\`${s.field}\` is retired: use ${s.replacement}.`
|
|
2807
2811
|
})),
|
|
2808
|
-
...
|
|
2812
|
+
...Ti(a, t)
|
|
2809
2813
|
]);
|
|
2810
2814
|
}
|
|
2811
2815
|
const Lt = [
|
|
@@ -2814,7 +2818,7 @@ const Lt = [
|
|
|
2814
2818
|
"detailColumns",
|
|
2815
2819
|
"pivotByColumns",
|
|
2816
2820
|
"sortByColumns"
|
|
2817
|
-
],
|
|
2821
|
+
], Ri = [
|
|
2818
2822
|
"xAxisConfig",
|
|
2819
2823
|
"yAxisConfig",
|
|
2820
2824
|
"secondaryYAxisConfig",
|
|
@@ -2834,15 +2838,15 @@ function Ie(e, a) {
|
|
|
2834
2838
|
return bs(t(e), t(a));
|
|
2835
2839
|
}
|
|
2836
2840
|
function at(e) {
|
|
2837
|
-
const a =
|
|
2841
|
+
const a = nn(e);
|
|
2838
2842
|
return a === "date" || a === "datetime";
|
|
2839
2843
|
}
|
|
2840
2844
|
function ys(e) {
|
|
2841
2845
|
var a, t;
|
|
2842
2846
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
2843
2847
|
}
|
|
2844
|
-
function
|
|
2845
|
-
return e.type === "kpi" &&
|
|
2848
|
+
function Ai(e) {
|
|
2849
|
+
return e.type === "kpi" && Oo(e);
|
|
2846
2850
|
}
|
|
2847
2851
|
function Rt(e) {
|
|
2848
2852
|
return e.type === "table" || e.type === "detailTable";
|
|
@@ -2875,9 +2879,9 @@ function Mt(e) {
|
|
|
2875
2879
|
if (!J(e)) return;
|
|
2876
2880
|
if (e.type === "temporal_bucket") return xe(e);
|
|
2877
2881
|
const a = xe(e);
|
|
2878
|
-
return (a == null ? void 0 : a.type) === "currency" && a.currency === void 0 &&
|
|
2882
|
+
return (a == null ? void 0 : a.type) === "currency" && a.currency === void 0 && jo(e) ? { ...a, currency: "USD" } : a;
|
|
2879
2883
|
}
|
|
2880
|
-
function
|
|
2884
|
+
function At(e, a, t) {
|
|
2881
2885
|
if (!(!ue(a, "dateFormat") && !ue(a, "customFormat"))) {
|
|
2882
2886
|
if (at(a.dataType) && a.format == null && a.dateFormat != null) {
|
|
2883
2887
|
const s = Fo({
|
|
@@ -2896,7 +2900,7 @@ function Ft(e, a, t) {
|
|
|
2896
2900
|
ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2897
2901
|
}
|
|
2898
2902
|
}
|
|
2899
|
-
function
|
|
2903
|
+
function Di(e, a, t) {
|
|
2900
2904
|
if (!ue(a, "dateFormat") && !ue(a, "customFormat")) return;
|
|
2901
2905
|
const s = a.dateFormat === "custom" ? a.customFormat : a.dateFormat;
|
|
2902
2906
|
e.card.type === "detailTable" && at(a.dataType) && !a.format && typeof s == "string" && s.trim() ? (a.format = { type: "date", pattern: s }, a.formatOrigin = "override", e.changes.push({
|
|
@@ -2909,14 +2913,14 @@ function Ai(e, a, t) {
|
|
|
2909
2913
|
detail: "A detail date pattern on a column that has a format of its own."
|
|
2910
2914
|
}), ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2911
2915
|
}
|
|
2912
|
-
function
|
|
2916
|
+
function Oi(e, a, t, s) {
|
|
2913
2917
|
if (a.format !== void 0) {
|
|
2914
2918
|
const n = Mt(a.format);
|
|
2915
2919
|
n ? Ie(n, a.format) || (a.format = n, e.changes.push({ path: `${s}.format`, action: "cleaned" })) : (delete a.format, e.changes.push({ path: `${s}.format`, action: "removed" }));
|
|
2916
2920
|
}
|
|
2917
|
-
t === "groupByColumns" || t === "pivotByColumns" ?
|
|
2921
|
+
t === "groupByColumns" || t === "pivotByColumns" ? At(e, a, s) : t === "detailColumns" ? Di(e, a, s) : ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
|
|
2918
2922
|
}
|
|
2919
|
-
function
|
|
2923
|
+
function Ei(e, a) {
|
|
2920
2924
|
for (const t of Lt)
|
|
2921
2925
|
ee(e.card, t).forEach((s, n) => {
|
|
2922
2926
|
var i;
|
|
@@ -2928,31 +2932,31 @@ function Oi(e, a) {
|
|
|
2928
2932
|
});
|
|
2929
2933
|
});
|
|
2930
2934
|
}
|
|
2931
|
-
function
|
|
2935
|
+
function qi(e) {
|
|
2932
2936
|
var t;
|
|
2933
2937
|
const a = (t = e.card.interactionConfig) == null ? void 0 : t.drillHierarchies;
|
|
2934
2938
|
Array.isArray(a) && a.forEach((s, n) => {
|
|
2935
2939
|
if (!J(s)) return;
|
|
2936
2940
|
const o = `interactionConfig.drillHierarchies[${n}]`;
|
|
2937
|
-
J(s.baseField) &&
|
|
2941
|
+
J(s.baseField) && At(e, s.baseField, `${o}.baseField`), Array.isArray(s.steps) && s.steps.forEach((i, d) => {
|
|
2938
2942
|
if (J(i) && J(i.field)) {
|
|
2939
2943
|
const l = i.field, c = `${o}.steps[${d}].field`;
|
|
2940
2944
|
if (l.format !== void 0) {
|
|
2941
2945
|
const h = Mt(l.format);
|
|
2942
2946
|
h && !Ie(h, l.format) && (l.format = h, e.changes.push({ path: `${c}.format`, action: "cleaned" }));
|
|
2943
2947
|
}
|
|
2944
|
-
|
|
2948
|
+
At(e, l, c);
|
|
2945
2949
|
}
|
|
2946
2950
|
});
|
|
2947
2951
|
});
|
|
2948
2952
|
}
|
|
2949
|
-
const
|
|
2953
|
+
const Ni = [
|
|
2950
2954
|
"numberFormat",
|
|
2951
2955
|
"dateFormat",
|
|
2952
2956
|
"inheritMetricFormat",
|
|
2953
2957
|
"colorRanges"
|
|
2954
2958
|
];
|
|
2955
|
-
function
|
|
2959
|
+
function Pi(e, a) {
|
|
2956
2960
|
const t = (n) => n == null ? void 0 : n.trim().toLowerCase(), s = t(a);
|
|
2957
2961
|
return [
|
|
2958
2962
|
e.id,
|
|
@@ -2960,32 +2964,32 @@ function Ni(e, a) {
|
|
|
2960
2964
|
e.name,
|
|
2961
2965
|
e.qualifiedFieldName,
|
|
2962
2966
|
e.label,
|
|
2963
|
-
e.role === "metric" ?
|
|
2967
|
+
e.role === "metric" ? Uo(e) : void 0
|
|
2964
2968
|
].some((n) => n !== void 0 && t(n) === s);
|
|
2965
2969
|
}
|
|
2966
|
-
function
|
|
2967
|
-
const t =
|
|
2970
|
+
function Fa(e, a) {
|
|
2971
|
+
const t = Do(e, { columnId: a });
|
|
2968
2972
|
if (t) return t;
|
|
2969
2973
|
const s = [
|
|
2970
2974
|
...ee(e, "detailColumns"),
|
|
2971
2975
|
...ee(e, "metricColumns"),
|
|
2972
2976
|
...ee(e, "groupByColumns")
|
|
2973
|
-
].filter((n) =>
|
|
2977
|
+
].filter((n) => Pi(n, a));
|
|
2974
2978
|
return s.length === 1 ? s[0] : void 0;
|
|
2975
2979
|
}
|
|
2976
|
-
function
|
|
2980
|
+
function Li(e) {
|
|
2977
2981
|
return e.type === "number" && J(e.numberFormat) && e.inheritMetricFormat !== !0;
|
|
2978
2982
|
}
|
|
2979
|
-
function
|
|
2983
|
+
function Mi(e, a) {
|
|
2980
2984
|
var t;
|
|
2981
|
-
return at(a.dataType) ? ee(e, "detailColumns").includes(a) ? e.type === "detailTable" :
|
|
2985
|
+
return at(a.dataType) ? ee(e, "detailColumns").includes(a) ? e.type === "detailTable" : fn(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
|
|
2982
2986
|
}
|
|
2983
2987
|
function Da(e, a, t, s) {
|
|
2984
2988
|
var i;
|
|
2985
2989
|
const n = (i = e.card).preferences ?? (i.preferences = {}), o = n.sqlColumns ?? (n.sqlColumns = {});
|
|
2986
2990
|
o[a] = { ...o[a], format: t }, e.changes.push({ path: s, action: "moved", to: `preferences.sqlColumns[${JSON.stringify(a)}].format` });
|
|
2987
2991
|
}
|
|
2988
|
-
function
|
|
2992
|
+
function Bi(e) {
|
|
2989
2993
|
const [a, ...t] = e;
|
|
2990
2994
|
if (!a) return;
|
|
2991
2995
|
const s = Object.fromEntries(
|
|
@@ -2993,8 +2997,8 @@ function Mi(e) {
|
|
|
2993
2997
|
);
|
|
2994
2998
|
return Et.safeParse(s).success ? s : void 0;
|
|
2995
2999
|
}
|
|
2996
|
-
function
|
|
2997
|
-
const t = e.card, s =
|
|
3000
|
+
function Vi(e, a) {
|
|
3001
|
+
const t = e.card, s = Mo({
|
|
2998
3002
|
groupByColumns: ee(t, "groupByColumns"),
|
|
2999
3003
|
metricColumns: ee(t, "metricColumns"),
|
|
3000
3004
|
pivotByColumns: ee(t, "pivotByColumns"),
|
|
@@ -3011,10 +3015,10 @@ function Bi(e, a) {
|
|
|
3011
3015
|
});
|
|
3012
3016
|
}
|
|
3013
3017
|
}
|
|
3014
|
-
function
|
|
3018
|
+
function ji(e, a) {
|
|
3015
3019
|
var o;
|
|
3016
3020
|
if (!a.length) return;
|
|
3017
|
-
const t = ee(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, n = s && !s.format ?
|
|
3021
|
+
const t = ee(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, n = s && !s.format ? Bi(a.map((i) => i.format)) : void 0;
|
|
3018
3022
|
s && n && st(e, s, n, a[0].from);
|
|
3019
3023
|
for (const i of a)
|
|
3020
3024
|
if (!(s != null && s.format && Ie(i.format, s.format))) {
|
|
@@ -3039,20 +3043,20 @@ function Vi(e, a) {
|
|
|
3039
3043
|
);
|
|
3040
3044
|
}
|
|
3041
3045
|
}
|
|
3042
|
-
function
|
|
3046
|
+
function Ki(e) {
|
|
3043
3047
|
var l;
|
|
3044
3048
|
const a = (l = e.card.preferences) == null ? void 0 : l.tablePrefs, t = a == null ? void 0 : a.columnSettingsMap;
|
|
3045
3049
|
if (!J(t)) return;
|
|
3046
3050
|
const s = e.card, n = ys(s), o = ee(s, "pivotByColumns").length > 0, i = /* @__PURE__ */ new Map(), d = [];
|
|
3047
3051
|
for (const [c, h] of Object.entries(t)) {
|
|
3048
3052
|
if (!J(h)) continue;
|
|
3049
|
-
const
|
|
3050
|
-
if (
|
|
3051
|
-
const I =
|
|
3053
|
+
const g = h, v = `preferences.tablePrefs.columnSettingsMap[${JSON.stringify(c)}]`;
|
|
3054
|
+
if (Li(g)) {
|
|
3055
|
+
const I = So(g.numberFormat);
|
|
3052
3056
|
if (I && n)
|
|
3053
3057
|
Da(e, c, I, `${v}.numberFormat`);
|
|
3054
3058
|
else if (I && Rt(s)) {
|
|
3055
|
-
const w =
|
|
3059
|
+
const w = Fa(s, c), x = { key: c, format: I, from: `${v}.numberFormat` };
|
|
3056
3060
|
w ? i.set(w, [...i.get(w) ?? [], x]) : o ? d.push(x) : e.unconverted.push({
|
|
3057
3061
|
path: x.from,
|
|
3058
3062
|
reason: "unmatched_column_setting",
|
|
@@ -3066,42 +3070,42 @@ function ji(e) {
|
|
|
3066
3070
|
detail: `"${c}" formats this chart's comparison tooltip only.`
|
|
3067
3071
|
});
|
|
3068
3072
|
}
|
|
3069
|
-
if (J(
|
|
3070
|
-
const I =
|
|
3073
|
+
if (J(g.dateFormat)) {
|
|
3074
|
+
const I = g.type === "date";
|
|
3071
3075
|
if (I && n)
|
|
3072
|
-
Da(e, c,
|
|
3076
|
+
Da(e, c, ko(g.dateFormat), `${v}.dateFormat`);
|
|
3073
3077
|
else if (I && Rt(s)) {
|
|
3074
|
-
const w =
|
|
3075
|
-
(!w || !
|
|
3078
|
+
const w = Fa(s, c);
|
|
3079
|
+
(!w || !Mi(s, w)) && e.unconverted.push({
|
|
3076
3080
|
path: `${v}.dateFormat`,
|
|
3077
3081
|
reason: "config_column_date_setting",
|
|
3078
3082
|
detail: `"${c}"'s download formats its dates with this setting.`
|
|
3079
3083
|
});
|
|
3080
3084
|
}
|
|
3081
3085
|
}
|
|
3082
|
-
for (const I of
|
|
3083
|
-
Object.prototype.hasOwnProperty.call(
|
|
3086
|
+
for (const I of Ni)
|
|
3087
|
+
Object.prototype.hasOwnProperty.call(g, I) && (delete g[I], e.changes.push({ path: `${v}.${I}`, action: "removed" }));
|
|
3084
3088
|
}
|
|
3085
|
-
|
|
3089
|
+
Vi(e, i), ji(e, d);
|
|
3086
3090
|
}
|
|
3087
|
-
function
|
|
3091
|
+
function Wi(e) {
|
|
3088
3092
|
return Object.keys(e).some(
|
|
3089
3093
|
(a) => a !== "enabled" && a !== "colorRanges" && e[a] !== void 0
|
|
3090
3094
|
);
|
|
3091
3095
|
}
|
|
3092
|
-
function
|
|
3096
|
+
function Ui(e) {
|
|
3093
3097
|
return (e == null ? void 0 : e.enabled) === !1 || (e == null ? void 0 : e.enabled) === "false";
|
|
3094
3098
|
}
|
|
3095
|
-
function
|
|
3099
|
+
function Gi(e) {
|
|
3096
3100
|
const a = e.card, t = a.preferences;
|
|
3097
3101
|
if (!t) return;
|
|
3098
|
-
const s = t.kpiVisualOptions, n = J(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, o = t, i = J(o.formatNumber) ? o.formatNumber : void 0, d = n ? xe(
|
|
3102
|
+
const s = t.kpiVisualOptions, n = J(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, o = t, i = J(o.formatNumber) ? o.formatNumber : void 0, d = n ? xe(To(n)) : void 0, l = i && Wi(i) ? xe(Ro(i)) : void 0;
|
|
3099
3103
|
if (a.type === "kpi") {
|
|
3100
|
-
if (
|
|
3104
|
+
if (Ui(i) && e.unconverted.push({
|
|
3101
3105
|
path: "preferences.formatNumber.enabled",
|
|
3102
3106
|
reason: "raw_display",
|
|
3103
3107
|
detail: "Formatting is switched off on this KPI."
|
|
3104
|
-
}),
|
|
3108
|
+
}), Ai(a)) {
|
|
3105
3109
|
const c = d ?? l, h = s == null ? void 0 : s.queryComparisonPolarity;
|
|
3106
3110
|
(c || h) && (t.sqlKpiValue = {
|
|
3107
3111
|
...t.sqlKpiValue,
|
|
@@ -3116,7 +3120,7 @@ function Ui(e) {
|
|
|
3116
3120
|
ee(a, "metricColumns").forEach((h) => {
|
|
3117
3121
|
d ? st(e, h, d, "preferences.kpiVisualOptions.formatOptions") : l && !h.format && st(e, h, l, "preferences.formatNumber");
|
|
3118
3122
|
});
|
|
3119
|
-
|
|
3123
|
+
Qi(e, i);
|
|
3120
3124
|
} else if (l) {
|
|
3121
3125
|
const c = ee(a, "metricColumns");
|
|
3122
3126
|
ys(a) ? e.unconverted.push({
|
|
@@ -3137,11 +3141,11 @@ function Ui(e) {
|
|
|
3137
3141
|
for (const c of ["numberAxisFormat", "columnSettings"])
|
|
3138
3142
|
ke(t, [c]) && e.changes.push({ path: `preferences.${c}`, action: "removed" });
|
|
3139
3143
|
}
|
|
3140
|
-
function
|
|
3144
|
+
function Qi(e, a) {
|
|
3141
3145
|
var o;
|
|
3142
3146
|
const t = a == null ? void 0 : a.decimalPlaces, s = e.card.preferences;
|
|
3143
3147
|
if (typeof t != "number" || ((o = s.comparisonPresentation) == null ? void 0 : o.precision) !== void 0) return;
|
|
3144
|
-
const n =
|
|
3148
|
+
const n = Bo(t);
|
|
3145
3149
|
n !== void 0 && (s.comparisonPresentation = {
|
|
3146
3150
|
...s.comparisonPresentation,
|
|
3147
3151
|
precision: n
|
|
@@ -3151,24 +3155,24 @@ function Gi(e, a) {
|
|
|
3151
3155
|
to: "preferences.comparisonPresentation.precision"
|
|
3152
3156
|
}));
|
|
3153
3157
|
}
|
|
3154
|
-
const
|
|
3155
|
-
function
|
|
3158
|
+
const Hi = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
|
|
3159
|
+
function zi(e) {
|
|
3156
3160
|
const a = e.card.preferences;
|
|
3157
3161
|
if (a)
|
|
3158
|
-
for (const t of
|
|
3162
|
+
for (const t of Ri) {
|
|
3159
3163
|
const s = a[t];
|
|
3160
3164
|
if (!J(s)) continue;
|
|
3161
3165
|
const n = `preferences.${t}`, o = J(s.formatOptions) ? s.formatOptions : void 0, i = t === "dataLabelsConfig" && typeof s.format == "string" ? s.format : void 0, d = s.formatMode === "override" || s.formatMode === "inherit" ? s.formatMode : s.mode === "override" || s.mode === "inherit" ? s.mode : void 0, l = d ?? (i === "none" ? "raw" : i && i !== "auto" || o ? "override" : "inherit");
|
|
3162
3166
|
if (l === "raw" || d === void 0 && i === "none")
|
|
3163
3167
|
e.unconverted.push({ path: `${n}.format`, reason: "raw_display", detail: "Data labels show raw values." });
|
|
3164
3168
|
else if (l === "override") {
|
|
3165
|
-
const c = o && o.type ? o : i &&
|
|
3169
|
+
const c = o && o.type ? o : i && Hi.has(i) ? { ...o, type: i } : o, h = c ? xe(Ao(c, { preserveOmittedProperties: !0 })) : void 0;
|
|
3166
3170
|
h && (s.valueFormat = h, e.changes.push({ path: `${n}.formatOptions`, action: "moved", to: `${n}.valueFormat` }));
|
|
3167
3171
|
}
|
|
3168
3172
|
ke(s, ["formatMode", "mode", "formatOptions", ...t === "dataLabelsConfig" ? ["format"] : []]) && e.changes.push({ path: `${n}.formatMode`, action: "removed" });
|
|
3169
3173
|
}
|
|
3170
3174
|
}
|
|
3171
|
-
function
|
|
3175
|
+
function Yi(e) {
|
|
3172
3176
|
var s;
|
|
3173
3177
|
const a = (s = e.card.config) == null ? void 0 : s.matrix, t = J(a) && J(a.presentation) ? a.presentation : void 0;
|
|
3174
3178
|
if (t)
|
|
@@ -3181,27 +3185,27 @@ function zi(e) {
|
|
|
3181
3185
|
}
|
|
3182
3186
|
}
|
|
3183
3187
|
}
|
|
3184
|
-
function
|
|
3188
|
+
function Ji(e, a = {}) {
|
|
3185
3189
|
const t = { card: structuredClone(e), changes: [], unconverted: [] };
|
|
3186
3190
|
for (const s of Lt)
|
|
3187
3191
|
ee(t.card, s).forEach((n, o) => {
|
|
3188
|
-
J(n) &&
|
|
3192
|
+
J(n) && Oi(t, n, s, `config.${s}[${o}]`);
|
|
3189
3193
|
});
|
|
3190
|
-
return
|
|
3194
|
+
return qi(t), Ki(t), Gi(t), zi(t), Yi(t), Ei(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
|
|
3191
3195
|
}
|
|
3192
|
-
const
|
|
3193
|
-
function
|
|
3196
|
+
const Xi = "__semaphor_unassigned_trigger__", Zi = "__NULL__";
|
|
3197
|
+
function er(e) {
|
|
3194
3198
|
var a, t;
|
|
3195
3199
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
3196
3200
|
}
|
|
3197
|
-
function
|
|
3201
|
+
function tr(e) {
|
|
3198
3202
|
const a = e.config;
|
|
3199
3203
|
return a ? e.type === "detailTable" ? a.detailColumns ?? [] : [...a.detailColumns ?? [], ...a.metricColumns ?? [], ...a.groupByColumns ?? []] : [];
|
|
3200
3204
|
}
|
|
3201
3205
|
function Oa(e) {
|
|
3202
3206
|
return [e.id, e.alias, e.name, e.qualifiedFieldName, e.label];
|
|
3203
3207
|
}
|
|
3204
|
-
function
|
|
3208
|
+
function ar(e, a) {
|
|
3205
3209
|
var c, h;
|
|
3206
3210
|
const t = ((c = e.config) == null ? void 0 : c.metricColumns) ?? [], s = ((h = e.config) == null ? void 0 : h.pivotByColumns) ?? [];
|
|
3207
3211
|
if (t.length !== 1 || s.length !== 1) return { reason: "pivot_key_form" };
|
|
@@ -3210,34 +3214,34 @@ function tr(e, a) {
|
|
|
3210
3214
|
ref: {
|
|
3211
3215
|
kind: "pivot",
|
|
3212
3216
|
metricId: n.id,
|
|
3213
|
-
members: [{ fieldId: o.id, value: a ===
|
|
3217
|
+
members: [{ fieldId: o.id, value: a === Zi ? null : a }]
|
|
3214
3218
|
}
|
|
3215
3219
|
};
|
|
3216
3220
|
}
|
|
3217
|
-
function
|
|
3221
|
+
function sr(e, a) {
|
|
3218
3222
|
var i, d;
|
|
3219
|
-
if (a ===
|
|
3220
|
-
if (
|
|
3221
|
-
const t =
|
|
3222
|
-
return o.length === 1 ? { ref: { kind: "field", fieldId: o[0] } } : o.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ?
|
|
3223
|
+
if (a === Xi) return { reason: "unassigned_trigger" };
|
|
3224
|
+
if (er(e)) return { ref: { kind: "result", key: a } };
|
|
3225
|
+
const t = tr(e), s = t.filter((l) => Oa(l).includes(a)), n = s.length ? s : t.filter((l) => Oa(l).some((c) => (c == null ? void 0 : c.trim().toLowerCase()) === a.trim().toLowerCase())), o = [...new Set(n.map((l) => l.id))];
|
|
3226
|
+
return o.length === 1 ? { ref: { kind: "field", fieldId: o[0] } } : o.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ? ar(e, a) : { reason: "no_matching_column" };
|
|
3223
3227
|
}
|
|
3224
3228
|
function Ea(e, a, t, s, n) {
|
|
3225
|
-
const o = (
|
|
3226
|
-
s.push({ ruleId: e.id, name: e.name, enabled: e.enabled !== !1, path: `${t}.${
|
|
3229
|
+
const o = (p, k, T) => {
|
|
3230
|
+
s.push({ ruleId: e.id, name: e.name, enabled: e.enabled !== !1, path: `${t}.${p}`, reference: k, reason: T });
|
|
3227
3231
|
}, i = e.condition.columnId ?? "", d = a(i);
|
|
3228
3232
|
if (!("ref" in d)) return o("condition.columnId", i, d.reason);
|
|
3229
3233
|
const l = e.target.level, c = l === "row" ? e.target.applyToColumnIds : e.target.columnIds;
|
|
3230
3234
|
if (l === "cell" && !(c != null && c.length) && e.enabled !== !1)
|
|
3231
3235
|
return o("target.columnIds", "", "every_column");
|
|
3232
3236
|
const h = [];
|
|
3233
|
-
for (const [
|
|
3237
|
+
for (const [p, k] of (c ?? []).entries()) {
|
|
3234
3238
|
const T = a(k);
|
|
3235
3239
|
if (!("ref" in T))
|
|
3236
|
-
return o(`target.${l === "row" ? "applyToColumnIds" : "columnIds"}[${
|
|
3240
|
+
return o(`target.${l === "row" ? "applyToColumnIds" : "columnIds"}[${p}]`, k, T.reason);
|
|
3237
3241
|
h.push(T.ref);
|
|
3238
3242
|
}
|
|
3239
3243
|
const {
|
|
3240
|
-
columnIds:
|
|
3244
|
+
columnIds: g,
|
|
3241
3245
|
applyToColumnIds: v,
|
|
3242
3246
|
conditionColumnId: I,
|
|
3243
3247
|
matrix: w,
|
|
@@ -3264,43 +3268,43 @@ function Ea(e, a, t, s, n) {
|
|
|
3264
3268
|
target: N
|
|
3265
3269
|
};
|
|
3266
3270
|
}
|
|
3267
|
-
function
|
|
3271
|
+
function or(e, a) {
|
|
3268
3272
|
var n;
|
|
3269
3273
|
const t = (n = La(e)) == null ? void 0 : n.value;
|
|
3270
3274
|
if (!t) return [];
|
|
3271
3275
|
const s = (o) => o === null ? 0 : typeof o == "number" || typeof o == "string" || typeof o == "boolean" ? Number(o) : NaN;
|
|
3272
3276
|
return a.flatMap((o, i) => {
|
|
3273
3277
|
if (!o || typeof o != "object") return [];
|
|
3274
|
-
const { start: d, end: l, color: c } = o, h = s(d),
|
|
3275
|
-
if (Number.isNaN(h) || Number.isNaN(
|
|
3276
|
-
const v = h === -1 / 0 ? void 0 : h, I =
|
|
3278
|
+
const { start: d, end: l, color: c } = o, h = s(d), g = s(l);
|
|
3279
|
+
if (Number.isNaN(h) || Number.isNaN(g) || h > g || h === 1 / 0 || g === -1 / 0) return [];
|
|
3280
|
+
const v = h === -1 / 0 ? void 0 : h, I = g === 1 / 0 ? void 0 : g, w = v !== void 0 && I !== void 0 ? { kind: "between", column: t, min: v, max: I, inclusive: !0 } : v !== void 0 ? { kind: "comparison", column: t, operator: "gte", value: v } : I !== void 0 ? { kind: "comparison", column: t, operator: "lte", value: I } : { kind: "blank", column: t, isBlank: !1 }, x = typeof c == "string" ? c : "";
|
|
3277
3281
|
return [{ id: `kpi-color-range-${i + 1}`, condition: w, target: { level: "cell" }, style: { textColor: x } }];
|
|
3278
3282
|
}).reverse();
|
|
3279
3283
|
}
|
|
3280
|
-
function
|
|
3281
|
-
var h,
|
|
3284
|
+
function nr(e) {
|
|
3285
|
+
var h, g, v, I, w, x, E;
|
|
3282
3286
|
const a = structuredClone(e), t = [], s = [], n = [], o = (_) => {
|
|
3283
3287
|
t.some((S) => S.from.startsWith(_)) || t.push({ ruleId: "", action: "removed", from: _ });
|
|
3284
3288
|
}, i = (h = a.preferences) == null ? void 0 : h.tablePrefs;
|
|
3285
3289
|
if (i && ue(i, "conditionalFormatting")) {
|
|
3286
3290
|
const _ = i.conditionalFormatting, S = "preferences.tablePrefs.conditionalFormatting", y = a.type === "table" || a.type === "detailTable";
|
|
3287
3291
|
((_ == null ? void 0 : _.rules) ?? []).forEach((D, $) => {
|
|
3288
|
-
var
|
|
3289
|
-
if (!y || ((
|
|
3292
|
+
var p;
|
|
3293
|
+
if (!y || ((p = D.target) == null ? void 0 : p.matrix) !== void 0) {
|
|
3290
3294
|
t.push({ ruleId: D.id, action: "removed", from: `${S}.rules[${$}]` });
|
|
3291
3295
|
return;
|
|
3292
3296
|
}
|
|
3293
|
-
const N = Ea(D, (k) =>
|
|
3297
|
+
const N = Ea(D, (k) => sr(a, k), `${S}.rules[${$}]`, s, !1);
|
|
3294
3298
|
N && (n.push(N), t.push({ ruleId: D.id, action: "moved", from: `${S}.rules[${$}]` }));
|
|
3295
3299
|
}), delete i.conditionalFormatting, s.some((D) => D.path.startsWith(S)) || o(S);
|
|
3296
3300
|
}
|
|
3297
|
-
const d = (v = (
|
|
3301
|
+
const d = (v = (g = a.config) == null ? void 0 : g.matrix) == null ? void 0 : v.presentation;
|
|
3298
3302
|
if (d && ue(d, "conditionalFormatting")) {
|
|
3299
3303
|
const _ = d.conditionalFormatting, S = "config.matrix.presentation.conditionalFormatting", y = new Set((w = (I = a.config) == null ? void 0 : I.matrix) == null ? void 0 : w.spec.measures.map((D) => D.id));
|
|
3300
3304
|
((_ == null ? void 0 : _.rules) ?? []).forEach((D, $) => {
|
|
3301
3305
|
const N = Ea(
|
|
3302
3306
|
D,
|
|
3303
|
-
(
|
|
3307
|
+
(p) => y.has(p) ? { ref: { kind: "matrixMeasure", measureId: p } } : { reason: "no_matching_column" },
|
|
3304
3308
|
`${S}.rules[${$}]`,
|
|
3305
3309
|
s,
|
|
3306
3310
|
!0
|
|
@@ -3312,7 +3316,7 @@ function or(e) {
|
|
|
3312
3316
|
if (c && ue(c, "colorRanges")) {
|
|
3313
3317
|
const _ = Array.isArray(c.colorRanges) ? c.colorRanges : [];
|
|
3314
3318
|
if (a.type === "kpi") {
|
|
3315
|
-
const S =
|
|
3319
|
+
const S = or(a, _);
|
|
3316
3320
|
n.push(...S), S.forEach((y) => t.push({ ruleId: y.id, action: "moved", from: "preferences.formatNumber.colorRanges" }));
|
|
3317
3321
|
}
|
|
3318
3322
|
delete c.colorRanges, Object.keys(c).length === 0 && delete l.formatNumber, t.some((S) => S.from === "preferences.formatNumber.colorRanges") || t.push({ ruleId: "", action: "removed", from: "preferences.formatNumber.colorRanges" });
|
|
@@ -3330,11 +3334,11 @@ function or(e) {
|
|
|
3330
3334
|
}
|
|
3331
3335
|
return { card: a, changes: t, unresolved: s };
|
|
3332
3336
|
}
|
|
3333
|
-
function
|
|
3334
|
-
const { only: t, ...s } = a, n = t === "rules" ? void 0 :
|
|
3337
|
+
function Pr(e, a = {}) {
|
|
3338
|
+
const { only: t, ...s } = a, n = t === "rules" ? void 0 : Ji(e, s), o = t === "formats" ? void 0 : nr((n == null ? void 0 : n.card) ?? e);
|
|
3335
3339
|
return { card: (o == null ? void 0 : o.card) ?? (n == null ? void 0 : n.card) ?? e, formats: n, rules: o };
|
|
3336
3340
|
}
|
|
3337
|
-
function
|
|
3341
|
+
function ir(e) {
|
|
3338
3342
|
if (e.op === "dashboard.update" || e.op === "dashboard.style" || e.op === "sheet.update") return !0;
|
|
3339
3343
|
if (e.op !== "card.update") return !1;
|
|
3340
3344
|
switch (e.update.kind) {
|
|
@@ -3346,478 +3350,482 @@ function nr(e) {
|
|
|
3346
3350
|
return !1;
|
|
3347
3351
|
}
|
|
3348
3352
|
}
|
|
3349
|
-
function
|
|
3350
|
-
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(
|
|
3353
|
+
function Lr(e) {
|
|
3354
|
+
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(ir) ? "not_needed" : "needed";
|
|
3351
3355
|
}
|
|
3352
3356
|
export {
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3357
|
+
Vr as AGGREGATES,
|
|
3358
|
+
jr as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
3359
|
+
Kr as CALCULATED_FIELDS_GROUP_ID,
|
|
3360
|
+
Wr as CALCULATED_FIELDS_GROUP_NAME,
|
|
3361
|
+
Ur as CARD_CONFIG_KEY_CLASSES,
|
|
3362
|
+
Gr as CARD_KEY_CLASSES,
|
|
3363
|
+
ho as CARD_QUERY_CONFIG_KEYS,
|
|
3364
|
+
Tr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
3365
|
+
kr as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
3366
|
+
mh as CARD_SURFACES,
|
|
3367
|
+
Qr as CARD_TYPES,
|
|
3368
|
+
Fe as CARD_TYPE_RULES,
|
|
3365
3369
|
je as CHART_COLORS_BOUNDS,
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3370
|
+
Hr as CHIP_VALUE_COLUMN,
|
|
3371
|
+
zr as COLUMN_KEY_CLASSES,
|
|
3372
|
+
Yr as COLUMN_PRESENTATION_KEYS,
|
|
3373
|
+
Jr as COMPARISON_POLARITIES,
|
|
3374
|
+
pf as COMPARISON_SIGN_WORDS,
|
|
3375
|
+
Xr as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
3376
|
+
Zr as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
3377
|
+
ed as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
3378
|
+
td as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
3379
|
+
ad as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
3380
|
+
sd as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
3381
|
+
od as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
3382
|
+
nd as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
3383
|
+
id as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
3384
|
+
rd as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
3385
|
+
hh as CORNER_STEPS,
|
|
3382
3386
|
ce as CardQueryRequestError,
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3387
|
+
dd as ControlResolutionError,
|
|
3388
|
+
ld as DASHBOARD_CHANGE_OPS,
|
|
3389
|
+
cd as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
3390
|
+
gf as DASHBOARD_FILTER_OPERATIONS,
|
|
3391
|
+
ud as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
|
|
3392
|
+
rn as DASHBOARD_STYLE_NUMBER_BOUNDS,
|
|
3393
|
+
bf as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
3394
|
+
yf as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
3395
|
+
fd as DOMAIN_EDIT_CHANGE_OPS,
|
|
3396
|
+
md as DYNAMIC_TEXT_MESSAGE,
|
|
3397
|
+
hd as DashboardFilterMappingContractError,
|
|
3398
|
+
pd as ExecutionControlContractError,
|
|
3399
|
+
gd as FILTER_OPERATORS,
|
|
3396
3400
|
ua as FORMAT_WORDS,
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3401
|
+
bd as FilterModelError,
|
|
3402
|
+
yd as KPI_MEASURES_SHOWN,
|
|
3403
|
+
vd as KPI_TREND_PERIODS,
|
|
3404
|
+
Id as LEGACY_TABLE_CARD_TYPES,
|
|
3405
|
+
dm as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
|
|
3402
3406
|
ba as MAX_CREATE_CHANGES,
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3407
|
+
_d as MAX_NEXT_STEP_CHARS,
|
|
3408
|
+
_o as MAX_PROPOSED_CHANGES,
|
|
3409
|
+
Cd as MAX_QUERY_LIMIT,
|
|
3410
|
+
$d as MAX_TEXT_WORDS,
|
|
3411
|
+
wd as MEASURE_CALCULATION_SUMMARIES,
|
|
3412
|
+
Pm as NEW_CARD_TYPE,
|
|
3413
|
+
xd as NON_ADDITIVE_SUM_OF_ROWS_HINT,
|
|
3414
|
+
Sd as PUBLIC_TRANSFORM_KIND,
|
|
3415
|
+
kd as QUERY_ASPECTS,
|
|
3416
|
+
Td as QUERY_CONFIG_KEY_ASPECTS,
|
|
3417
|
+
Lm as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
|
|
3418
|
+
Rd as RESERVED_VARIABLE_NAMES,
|
|
3419
|
+
Ad as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
3420
|
+
Fd as SETTINGS_BY_KIND,
|
|
3421
|
+
bh as SHELF_FIELD_KEYS,
|
|
3422
|
+
ph as SPACING_STEPS,
|
|
3423
|
+
Dd as TIME_GRAINS,
|
|
3424
|
+
Od as TOOLBAR_FILTER_REACH_FIELDS,
|
|
3425
|
+
vf as VARIABLE_CARD_TYPE,
|
|
3426
|
+
If as VARIABLE_COMPARISON_PARTS,
|
|
3427
|
+
Ed as VARIABLE_GETS,
|
|
3428
|
+
_f as VARIABLE_LIST_CAP,
|
|
3429
|
+
Cf as VARIABLE_LIST_SHOWN,
|
|
3430
|
+
qd as VARIABLE_NAME_PATTERN,
|
|
3431
|
+
$f as VARIABLE_VALUE_PART,
|
|
3432
|
+
Nd as WINDOW_ERROR_CODES,
|
|
3433
|
+
Pd as WINDOW_WARNING_CODES,
|
|
3434
|
+
Ld as acceptedColumnRefKinds,
|
|
3435
|
+
Md as analyticsFilterSchema,
|
|
3436
|
+
lm as applyCardReferenceRemapping,
|
|
3437
|
+
Bd as applyCardSettings,
|
|
3433
3438
|
wt as applyDashboardOperations,
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3439
|
+
Vd as applyFilterApplicability,
|
|
3440
|
+
Mm as applyFilterSettingsChange,
|
|
3441
|
+
cm as applyGroupByOverride,
|
|
3442
|
+
jd as applyLinkedClickToFilterOverrides,
|
|
3443
|
+
Kd as applyMeasureCalculations,
|
|
3444
|
+
Wd as applyOptionDependencyOverride,
|
|
3445
|
+
Ud as applyVariableChange,
|
|
3446
|
+
Gd as blockClause,
|
|
3447
|
+
Qd as blockSentence,
|
|
3448
|
+
Sh as bookmarkImpactSentence,
|
|
3449
|
+
Bm as buildCardExportFormatOptions,
|
|
3450
|
+
um as buildCardExportQueryContext,
|
|
3451
|
+
Vm as buildCardExportRequest,
|
|
3452
|
+
jm as buildCardExportRequestFromOptions,
|
|
3453
|
+
Km as buildColumnCatalog,
|
|
3454
|
+
Hd as buildControlDefinitionIndex,
|
|
3455
|
+
no as buildDashboardCardSourceIndex,
|
|
3456
|
+
Wm as buildEntityColumnGroup,
|
|
3457
|
+
Um as buildFilterInputFromDefinition,
|
|
3458
|
+
Ho as buildFilterInputFromField,
|
|
3459
|
+
zd as buildLinkedClickToFilterOverrides,
|
|
3460
|
+
Yd as buildProposeChangeInputSchema,
|
|
3461
|
+
Jd as buildSavedEditorCard,
|
|
3462
|
+
Gm as buildTableExportFormatOptions,
|
|
3463
|
+
Xd as calculationAddSchema,
|
|
3464
|
+
Qm as cardColumnRefForKey,
|
|
3465
|
+
Zd as cardColumnRefSchema,
|
|
3466
|
+
wo as cardConditionalFormattingSchema,
|
|
3467
|
+
el as cardQueryPatchSchema,
|
|
3468
|
+
Ps as cardSettingsKind,
|
|
3469
|
+
qs as cardTypeSentenceName,
|
|
3470
|
+
tl as carryColumnSettings,
|
|
3471
|
+
po as changeCardType,
|
|
3472
|
+
al as changeMatrixEditor,
|
|
3473
|
+
xo as checkConditionalRuleColumns,
|
|
3469
3474
|
Dt as checkDataVariable,
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
+
sl as checkDetailDateFormat,
|
|
3476
|
+
Nr as checkPresentationStores,
|
|
3477
|
+
ol as chipOverVariable,
|
|
3478
|
+
nl as clickToFilterSettingsSchema,
|
|
3479
|
+
il as collectJoinPlanIdentifiers,
|
|
3475
3480
|
Qa as collectVariableReferences,
|
|
3476
3481
|
Na as columnDataset,
|
|
3477
|
-
|
|
3482
|
+
go as columnFieldKey,
|
|
3478
3483
|
Ka as columnKeys,
|
|
3479
|
-
|
|
3484
|
+
rl as columnRefIssue,
|
|
3480
3485
|
la as columnRefKey,
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3486
|
+
dl as columnSettingsInputSchema,
|
|
3487
|
+
wf as comparisonPartPresentation,
|
|
3488
|
+
fm as composeCardReferenceRemapping,
|
|
3489
|
+
ll as conditionalRuleSchema,
|
|
3490
|
+
Lr as confirmClassFor,
|
|
3491
|
+
cl as contextChangeSchema,
|
|
3492
|
+
ul as controlBindingExecutionSchema,
|
|
3493
|
+
fl as controlDefinitionExecutionSchema,
|
|
3494
|
+
so as controlRefusal,
|
|
3490
3495
|
Fr as convertLegacyStyle,
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3496
|
+
ml as createDashboardFilterBindingId,
|
|
3497
|
+
Am as createMatrixAuthoringDraft,
|
|
3498
|
+
Fm as createMatrixConfig,
|
|
3499
|
+
Yo as createNewCard,
|
|
3500
|
+
hl as createTargetSchema,
|
|
3501
|
+
zo as createTextCard,
|
|
3502
|
+
pl as dashboardCardFilterSourceInventoryContains,
|
|
3503
|
+
Zs as dashboardChangeSchema,
|
|
3504
|
+
gl as dashboardFilterTargetMatchesLogicalValue,
|
|
3505
|
+
xf as dashboardFilterValueTypeForDataType,
|
|
3506
|
+
No as dashboardInputScopeIncludesDocumentSheets,
|
|
3507
|
+
Rn as dashboardStyleAsEdit,
|
|
3508
|
+
bl as dashboardStyleChangeSchema,
|
|
3504
3509
|
za as dashboardStyleLayers,
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
+
yl as defaultClickToFilterSettings,
|
|
3511
|
+
gn as defaultVariableGet,
|
|
3512
|
+
yh as defaultVariableName,
|
|
3513
|
+
kh as describeBookmarkImpact,
|
|
3514
|
+
vl as describeDashboardFilterCardReach,
|
|
3510
3515
|
Ee as describeDashboardFilterCardReachDetail,
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3516
|
+
Il as describeMeasureCalculations,
|
|
3517
|
+
ao as describeQueryChange,
|
|
3518
|
+
Hm as describeRelationshipRoute,
|
|
3519
|
+
zm as describeRelationshipSkip,
|
|
3520
|
+
_l as describeTableColumnTotal,
|
|
3521
|
+
Sf as documentInputTextUsage,
|
|
3522
|
+
kf as doesDashboardInputApplyToTarget,
|
|
3523
|
+
Tf as doesDashboardInputReachFilterTarget,
|
|
3524
|
+
Rf as doesDashboardInputSurviveCarriedContext,
|
|
3525
|
+
Cl as doesToolbarFilterReachTab,
|
|
3526
|
+
Ym as domainCalculatedFields,
|
|
3527
|
+
$l as domainEditChangeSchema,
|
|
3528
|
+
wl as domainEditChangeSchemas,
|
|
3529
|
+
vh as draftBlocker,
|
|
3530
|
+
bn as draftFromVariable,
|
|
3531
|
+
xl as drawsDetailDatesInBrowser,
|
|
3532
|
+
Sl as dropMatrixEditorField,
|
|
3533
|
+
Rh as editBrandStyle,
|
|
3534
|
+
dn as editDashboardStyle,
|
|
3535
|
+
kl as evaluateConditionalRules,
|
|
3536
|
+
Tl as explicitComparisonSchema,
|
|
3537
|
+
Gs as fieldIdentityKey,
|
|
3538
|
+
Rl as fieldRef,
|
|
3539
|
+
Al as fieldRefSchema,
|
|
3540
|
+
Fl as filterApplicabilityContextForCard,
|
|
3541
|
+
Jm as filterReachPreviewAnswers,
|
|
3542
|
+
Dl as filterValueReachForCard,
|
|
3543
|
+
Ol as filterValueSemanticDataset,
|
|
3538
3544
|
ot as findCatalogField,
|
|
3539
|
-
|
|
3540
|
-
|
|
3545
|
+
El as findDashboardCardExecutableSource,
|
|
3546
|
+
ql as findDashboardCardPinnedCatalogSource,
|
|
3541
3547
|
Ua as findDashboardFilterTarget,
|
|
3542
|
-
|
|
3548
|
+
Nl as findDashboardSqlPinnedCatalogSource,
|
|
3543
3549
|
ps as findRetiredCardPresentationFields,
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3550
|
+
qr as findRetiredPresentationFields,
|
|
3551
|
+
Us as findSortedColumn,
|
|
3552
|
+
Xm as flattenEntityColumns,
|
|
3553
|
+
Pl as foldPrototypeDocumentInputs,
|
|
3554
|
+
Ll as formatFilterModelIssues,
|
|
3549
3555
|
ws as formatResolvedPrimaryDateFieldIssues,
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3556
|
+
Ml as formatSkippedFilterWarnings,
|
|
3557
|
+
Bl as fromEditableRules,
|
|
3558
|
+
Zm as getCalculatedFieldAggregateOverrides,
|
|
3559
|
+
Vl as getCalculatedFieldNamespace,
|
|
3560
|
+
eh as getCalculatedFieldParameters,
|
|
3561
|
+
th as getCalculatedFieldShelfOverrides,
|
|
3562
|
+
jl as getCardDefinition,
|
|
3563
|
+
ah as getClickContextFromTable,
|
|
3564
|
+
Kl as getColumnCatalogFieldId,
|
|
3565
|
+
Wl as getDashboardFilterSubscriptionHint,
|
|
3566
|
+
Ul as getDashboardGlobalDateFilter,
|
|
3567
|
+
Af as getDocumentKpiSectionShapeIssues,
|
|
3568
|
+
Ff as getDocumentSectionCards,
|
|
3569
|
+
sh as getDomainCalculatedSelectionOverrides,
|
|
3570
|
+
Gl as getFieldAggregationOptions,
|
|
3571
|
+
Ql as getMatrixBindingTargets,
|
|
3572
|
+
Dm as getMatrixLevelLabel,
|
|
3573
|
+
Om as getMatrixMeasureLabel,
|
|
3574
|
+
Hl as getStableDomainCalculatedFieldId,
|
|
3575
|
+
zl as getTemporalBucketAuthoringOptions,
|
|
3576
|
+
Yl as getTemporalBucketAuthoringSelection,
|
|
3577
|
+
Jl as handleSchema,
|
|
3578
|
+
Xl as hasDashboardFilterSubscription,
|
|
3573
3579
|
ue as hasStoredKey,
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
+
Zl as hasTextCardRichWords,
|
|
3581
|
+
ec as hasToolbarFilterReachField,
|
|
3582
|
+
mm as hostFilterValueFor,
|
|
3583
|
+
hm as hostFilterValuesToSlots,
|
|
3584
|
+
tc as inspectMatrixCardConfig,
|
|
3585
|
+
pm as isAdHocFilterValueOnTab,
|
|
3580
3586
|
Ca as isAggregateGet,
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3587
|
+
ac as isAllowedDashboardInputScopeCombination,
|
|
3588
|
+
sc as isCardType,
|
|
3589
|
+
Df as isDashboardFilterOperationCompatible,
|
|
3584
3590
|
Ga as isDashboardInputOnTab,
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3591
|
+
Of as isDashboardInputOwnedBySheet,
|
|
3592
|
+
Ef as isDashboardInputScopeEmpty,
|
|
3593
|
+
qf as isDashboardTargetIdTaken,
|
|
3594
|
+
oc as isDatabaseEntityReference,
|
|
3595
|
+
nc as isGroupedDate,
|
|
3596
|
+
ic as isLegacyTableCard,
|
|
3597
|
+
rc as isPresentationCurrencyBinding,
|
|
3598
|
+
dc as isSemanticAutoJoinCard,
|
|
3599
|
+
lc as isSemaphorCartesianChartType,
|
|
3600
|
+
Oo as isSqlKpi,
|
|
3601
|
+
cc as isStructuralControlBinding,
|
|
3602
|
+
uc as isTextCardRichContent,
|
|
3603
|
+
fc as isValidControlOptionPresentation,
|
|
3604
|
+
Nf as isVariableComparisonPart,
|
|
3605
|
+
mc as isWhenRun,
|
|
3606
|
+
hc as kpiSegmentMetricId,
|
|
3607
|
+
pc as kpiShowsTrend,
|
|
3608
|
+
Es as kpiTrendBy,
|
|
3609
|
+
Ws as labelAt,
|
|
3610
|
+
gc as layoutArrangeSchema,
|
|
3611
|
+
gm as legacyTableRoutingIds,
|
|
3612
|
+
bm as legacyTableRoutingTarget,
|
|
3613
|
+
bc as linkedClickToFilterOverridesSchema,
|
|
3614
|
+
ym as listAdHocFilterValuesOnTab,
|
|
3609
3615
|
we as listDashboardCardLocations,
|
|
3610
|
-
|
|
3611
|
-
|
|
3616
|
+
yc as listDashboardFilterDefinitions,
|
|
3617
|
+
vc as listDashboardFilterInputsOnTab,
|
|
3612
3618
|
Wa as listDashboardFilterTargets,
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3619
|
+
Pf as listDashboardInputReachKeys,
|
|
3620
|
+
Eo as listDashboardInputScopeExceptedCardIds,
|
|
3621
|
+
qo as listDashboardInputScopeExceptedSheetIds,
|
|
3622
|
+
Ic as listDashboardInputsTolerantly,
|
|
3617
3623
|
Ot as listDashboardTabTargets,
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3624
|
+
Lf as listDataVariablePlaces,
|
|
3625
|
+
vm as listFilterInputValueTargets,
|
|
3626
|
+
Mf as listFilterTargetScopeTargets,
|
|
3627
|
+
Bf as listReachedVariableTargets,
|
|
3628
|
+
Vf as listReferencedDataVariableIds,
|
|
3629
|
+
_c as listStoredFilterDefinitions,
|
|
3630
|
+
jf as listVariableScopeTargets,
|
|
3631
|
+
Kf as mapDashboardCards,
|
|
3632
|
+
Wf as mapDocumentSectionCards,
|
|
3633
|
+
Cc as mapRuleColumns,
|
|
3634
|
+
$c as matchColumns,
|
|
3635
|
+
Im as matrixCatalogSources,
|
|
3636
|
+
vo as matrixColumnKeys,
|
|
3637
|
+
wc as matrixColumnsSchema,
|
|
3638
|
+
xc as matrixDefinitionFieldRefs,
|
|
3639
|
+
Sc as matrixDefinitionFields,
|
|
3640
|
+
kc as matrixDefinitionSources,
|
|
3641
|
+
Tc as matrixEditorCatalogFromFields,
|
|
3642
|
+
_m as matrixExecutionSources,
|
|
3643
|
+
Rc as measureCalculationOptions,
|
|
3644
|
+
Ac as measureComparisonSchema,
|
|
3645
|
+
Fc as measureRefSchema,
|
|
3646
|
+
Dc as measureTransformSchema,
|
|
3647
|
+
Em as mergeMatrixSorts,
|
|
3648
|
+
lo as metricCardQuerySchema,
|
|
3649
|
+
yo as moveMatrixLevel,
|
|
3650
|
+
Ih as newVariableDraft,
|
|
3651
|
+
_h as newVariableId,
|
|
3652
|
+
Oc as normalizeClickToFilterSettings,
|
|
3653
|
+
Ec as normalizeDashboardInputs,
|
|
3654
|
+
qc as normalizeLegacyLinkedTargetOverrides,
|
|
3655
|
+
Nc as occurrenceKeys,
|
|
3650
3656
|
es as outlineCalendar,
|
|
3651
|
-
|
|
3657
|
+
Er as outlineDashboard,
|
|
3652
3658
|
Le as outlineFilter,
|
|
3653
3659
|
as as outlineFilters,
|
|
3654
3660
|
ut as ownsItsAggregate,
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
+
Ar as parseCardQueryRequest,
|
|
3662
|
+
wn as parseCardQueryRequestContext,
|
|
3663
|
+
Rr as parseCardQueryRequestExtras,
|
|
3664
|
+
Pc as parseColumnRefKey,
|
|
3665
|
+
oh as parseDashboardStyle,
|
|
3666
|
+
Lc as parseExecutionControlBindingsShallow,
|
|
3661
3667
|
Ss as parseExecutionControlContext,
|
|
3662
|
-
|
|
3668
|
+
Mc as parseExecutionControlContract,
|
|
3663
3669
|
pa as planCardLabels,
|
|
3664
3670
|
ha as planCardRequery,
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3671
|
+
nh as pluralDatasetLabel,
|
|
3672
|
+
Cm as prepareLoadedDashboard,
|
|
3673
|
+
Bc as previewTemporalBucketAuthoringFormat,
|
|
3674
|
+
Uf as projectDataVariableToCard,
|
|
3675
|
+
Vc as pruneUnrelatedCalculatedFilters,
|
|
3676
|
+
oo as queryForm,
|
|
3677
|
+
jc as queryMeasureSchema,
|
|
3678
|
+
Kc as readCardConditionalRules,
|
|
3673
3679
|
Ce as readCardQuery,
|
|
3674
|
-
|
|
3680
|
+
Ft as readCardSettings,
|
|
3675
3681
|
he as readCardSource,
|
|
3676
3682
|
qe as readCardTypeProperties,
|
|
3677
|
-
|
|
3683
|
+
$h as readComparisonDates,
|
|
3678
3684
|
$e as readDashboardFilterModel,
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3685
|
+
wh as readDefaultComparisonDates,
|
|
3686
|
+
Wc as readExactDomainCalculatedFieldReference,
|
|
3687
|
+
ih as readFilterReachResponse,
|
|
3688
|
+
$m as readFilterValueList,
|
|
3689
|
+
Uc as readKpiFigure,
|
|
3690
|
+
Gc as readMatrixCardConfig,
|
|
3691
|
+
Qc as readMeasureCalculations,
|
|
3692
|
+
Hc as readSqlFilterUse,
|
|
3693
|
+
zc as readStoredTransform,
|
|
3688
3694
|
ja as readTextCardWords,
|
|
3689
3695
|
Ze as readTextWords,
|
|
3690
|
-
|
|
3691
|
-
|
|
3696
|
+
Yc as readTransform,
|
|
3697
|
+
Gf as readVariableAnswer,
|
|
3692
3698
|
rs as readVariableEditability,
|
|
3693
3699
|
kt as readVariableSource,
|
|
3694
|
-
|
|
3695
|
-
|
|
3700
|
+
Co as readablePresentation,
|
|
3701
|
+
Jc as rebindDashboardOptionDependencyInputId,
|
|
3696
3702
|
ma as rebuildsRole,
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3703
|
+
Xc as reconcileMatrixSpecStructure,
|
|
3704
|
+
Zc as reconcileTemporalBucketAuthoringFormat,
|
|
3705
|
+
ro as recordsCardQuerySchema,
|
|
3706
|
+
Js as refDataset,
|
|
3701
3707
|
be as refKey,
|
|
3702
3708
|
Ct as refName,
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3709
|
+
eu as registeredDomainEditChangeSchemas,
|
|
3710
|
+
tu as relationshipAddSchema,
|
|
3711
|
+
au as relationshipRouteTarget,
|
|
3712
|
+
su as remapClickToFilterReferences,
|
|
3713
|
+
ou as remapLinkedClickToFilterOverrides,
|
|
3714
|
+
nu as requireNormalizedDashboardInputs,
|
|
3715
|
+
iu as resolveBindingControlValue,
|
|
3716
|
+
Qf as resolveCanonicalDetailResultRawKey,
|
|
3717
|
+
Hf as resolveCanonicalResultOutputKey,
|
|
3718
|
+
Mo as resolveCanonicalResultOutputKeys,
|
|
3719
|
+
zf as resolveCanonicalResultRawKey,
|
|
3720
|
+
rh as resolveCardColumnRef,
|
|
3721
|
+
Qn as resolveCardSettings,
|
|
3722
|
+
dh as resolveConditionalRules,
|
|
3723
|
+
Dr as resolveDashboardChanges,
|
|
3724
|
+
Or as resolveDashboardCreate,
|
|
3725
|
+
ru as resolveDashboardEntitySource,
|
|
3726
|
+
du as resolveDashboardFilterAutomaticTarget,
|
|
3727
|
+
lu as resolveDashboardFilterInheritedTarget,
|
|
3728
|
+
cu as resolveDashboardOptionDependencies,
|
|
3729
|
+
uu as resolveDashboardOptionPopulation,
|
|
3730
|
+
fu as resolveDashboardSqlFilterTarget,
|
|
3731
|
+
ln as resolveDashboardStyle,
|
|
3732
|
+
mu as resolveDetailTableRawTemporalPresentation,
|
|
3733
|
+
hu as resolveFieldSelectedSource,
|
|
3734
|
+
pu as resolveGroupByFieldTarget,
|
|
3735
|
+
gu as resolveKpiLayout,
|
|
3730
3736
|
La as resolveKpiShape,
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3737
|
+
bu as resolveKpiValueStyle,
|
|
3738
|
+
wm as resolveMatrixControlBindings,
|
|
3739
|
+
qm as resolveMatrixDefinition,
|
|
3734
3740
|
fa as resolveMeasureCalculations,
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3741
|
+
yu as resolveMeasureTransform,
|
|
3742
|
+
vu as resolveMetricFieldTarget,
|
|
3743
|
+
Iu as resolveScalarMappedValue,
|
|
3744
|
+
_u as resolveTableColumnTotal,
|
|
3745
|
+
Cu as resolveTemporalBucketAuthoringFormat,
|
|
3739
3746
|
xs as resolveTemporalResultOwner,
|
|
3740
3747
|
ga as resolveTextCardWords,
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3748
|
+
$u as resolveValueStyle,
|
|
3749
|
+
wu as respondsToSelectionsSchema,
|
|
3750
|
+
xu as retainConditionalRules,
|
|
3751
|
+
Su as retainedMatrixPath,
|
|
3752
|
+
Yf as rewriteDashboardInputScopeIds,
|
|
3753
|
+
xm as routeLegacyTableCard,
|
|
3754
|
+
Sm as routeLegacyTableCards,
|
|
3755
|
+
km as routeLegacyTableFrame,
|
|
3749
3756
|
He as sameColumnKey,
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3757
|
+
ku as sanitizeTextCardUrl,
|
|
3758
|
+
Tu as selectDashboardOptionDependencyInputIds,
|
|
3759
|
+
Ru as selectionFieldFromExplorerField,
|
|
3760
|
+
lh as selectionTupleFromClickContext,
|
|
3761
|
+
ch as setMeasureCalculations,
|
|
3762
|
+
Au as settableCardType,
|
|
3763
|
+
Fu as sharedCardPreferences,
|
|
3764
|
+
Du as sharedTableDialect,
|
|
3765
|
+
Ou as sheetChangeSchemas,
|
|
3766
|
+
io as sqlCardQuerySchema,
|
|
3767
|
+
Eu as sqlKpiResultKeys,
|
|
3761
3768
|
Ne as statedLabelsOf,
|
|
3762
3769
|
Rs as storedCardTypeFor,
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3770
|
+
qu as storedRunPresentation,
|
|
3771
|
+
Jf as storedTextRefs,
|
|
3772
|
+
Nu as stripInstanceTargetsForLibrarySave,
|
|
3773
|
+
Pu as structuralControlOverride,
|
|
3767
3774
|
ts as summarizeFilter,
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3775
|
+
Lu as supportsCanonicalDashboardTemporalResult,
|
|
3776
|
+
Mu as tabChangeSchemas,
|
|
3777
|
+
Bu as tableColumnTotalLabel,
|
|
3778
|
+
Vu as textCardExcerpt,
|
|
3779
|
+
ju as textCardWordingClauses,
|
|
3772
3780
|
_t as textCatalogAt,
|
|
3773
3781
|
ct as toChartType,
|
|
3774
|
-
|
|
3775
|
-
|
|
3782
|
+
Ku as toEditableRules,
|
|
3783
|
+
Wu as toFiniteKpiNumber,
|
|
3776
3784
|
$t as toPublicCardType,
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3785
|
+
Xs as toStoredComparison,
|
|
3786
|
+
Uu as toolbarFilterInputFields,
|
|
3787
|
+
Gu as toolbarFilterScope,
|
|
3788
|
+
Qu as transformComparisonDocument,
|
|
3789
|
+
Hu as transformGroupings,
|
|
3790
|
+
zu as transformOrderSchema,
|
|
3791
|
+
bo as updateMatrixConfig,
|
|
3792
|
+
Ji as upgradeCardFormats,
|
|
3793
|
+
Pr as upgradeCardPresentation,
|
|
3794
|
+
nr as upgradeConditionalFormatting,
|
|
3795
|
+
Tm as upgradeToStoredDashboard,
|
|
3796
|
+
Yu as validateAndResolveWindowTransforms,
|
|
3797
|
+
Ju as validateControlValue,
|
|
3798
|
+
Xf as validateDashboardFilterValues,
|
|
3791
3799
|
$s as validateResolvedPrimaryDateFieldShape,
|
|
3792
|
-
|
|
3793
|
-
|
|
3800
|
+
Zf as variableCardKeepsComparison,
|
|
3801
|
+
em as variableComparison,
|
|
3794
3802
|
Ye as variableFromDraft,
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3803
|
+
pn as variableGetOptions,
|
|
3804
|
+
tm as variablePartCell,
|
|
3805
|
+
am as variablePartType,
|
|
3806
|
+
Lo as variableParts,
|
|
3807
|
+
sm as variableQueryResponseOf,
|
|
3808
|
+
uh as variableSourceWords,
|
|
3809
|
+
yn as variableTakesComparison,
|
|
3810
|
+
Xo as variableWords,
|
|
3811
|
+
Xu as withCardConditionalRules,
|
|
3812
|
+
Zu as withCardConfigSqlDatePatterns,
|
|
3813
|
+
om as withCardExcludedFromScope,
|
|
3814
|
+
nm as withCardIncludedInScope,
|
|
3815
|
+
ef as withDashboardOptionDependencyOverride,
|
|
3816
|
+
tf as withDetailSqlDatePattern,
|
|
3817
|
+
im as withDraftCard,
|
|
3818
|
+
af as withFormatOverride,
|
|
3819
|
+
sf as withSqlDatePattern,
|
|
3820
|
+
Po as withUnstatedScopeParts,
|
|
3821
|
+
of as withoutSqlDatePattern,
|
|
3822
|
+
nf as withoutToolbarFilterReachFields,
|
|
3823
|
+
rf as wordingBlocks,
|
|
3824
|
+
df as wordingClauses,
|
|
3825
|
+
lf as writeColumnFormat,
|
|
3826
|
+
cf as writeColumnPolarity,
|
|
3827
|
+
uf as writeComparisonDisplay,
|
|
3828
|
+
ff as writeComparisonPresentation,
|
|
3829
|
+
mf as writeInheritComparison,
|
|
3830
|
+
Ys as writeTextWords
|
|
3823
3831
|
};
|