react-semaphor 0.1.584 → 0.1.585
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +477 -440
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-nmycV1Se.js → assistant-chat-BdbLmAnK.js} +7 -7
- package/dist/chunks/{bookmark-impact-CI3gmxi0.js → bookmark-impact-BhT3k379.js} +2 -2
- package/dist/chunks/{bookmark-state-D9-RFkDg.js → bookmark-state-CL4WEpgB.js} +2 -2
- package/dist/chunks/{card-filter-builder-C7QyPqRy.js → card-filter-builder-CEcKF6Fw.js} +50 -50
- package/dist/chunks/{comparison-window-caption-BAnsTI8y.js → comparison-window-caption-CoART8BC.js} +530 -633
- package/dist/chunks/{dashboard-inJy_V78.js → dashboard-MPku_x1M.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DXs0XA1O.js → dashboard-briefing-launcher-CkFNlkr1.js} +8 -8
- package/dist/chunks/{dashboard-controls-6Zoo8d8Y.js → dashboard-controls-Clt4ovXS.js} +9 -9
- package/dist/chunks/{dashboard-json-D5eJhVA9.js → dashboard-json-DSmXazIg.js} +1 -1
- package/dist/chunks/{dates-B3_GWc_Y.js → dates-CYZW9owO.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-DR03SYeW.js → edit-dashboard-visual-Dn2ECRbX.js} +2751 -2686
- package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
- package/dist/chunks/{filter-reach-copy-CZwzrxBp.js → filter-reach-copy-CmJpPa4G.js} +1627 -1371
- package/dist/chunks/{filter-value-text-DtOvqcjn.js → filter-value-text-xefXzZlf.js} +10 -10
- package/dist/chunks/{index-BgT1L0p5.js → index-0WYn6RMz.js} +35 -35
- package/dist/chunks/{matrix-analytical-definition-Cs2v43FM.js → matrix-analytical-definition-QjBgUYhP.js} +382 -544
- package/dist/chunks/{metric-comparison-Be4uS3Ql.js → metric-comparison-ZmurmEIs.js} +2 -2
- package/dist/chunks/{pivot-header-presentation-uH06jiZD.js → pivot-header-presentation-CdeTU96P.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DvZY4eJM.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1010 -1005
- package/dist/chunks/{pivot-result-identity-BZexMfmL.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
- package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
- package/dist/chunks/{report-preferences-dialog-DWeVe2so.js → report-preferences-dialog-BRaeufEi.js} +119 -119
- package/dist/chunks/{resolve-dashboard-input-context-uATCuOP7.js → resolve-dashboard-input-context-Cn9jumxl.js} +304 -299
- package/dist/chunks/{saved-dashboard-context-DSVV9iqW.js → saved-dashboard-context-CfqkUMzR.js} +5 -5
- package/dist/chunks/{semaphor-ready-indicator-B9vvRMnJ.js → semaphor-ready-indicator-D6WjdTGl.js} +19776 -19620
- package/dist/chunks/{shelf-drop-preview-context-BHOnp5Bo.js → shelf-drop-preview-context-Bbbrr9u4.js} +2 -2
- package/dist/chunks/{stored-dashboard-xc5iidHL.js → stored-dashboard-sPkTjxYf.js} +7 -7
- package/dist/chunks/{table-export-sheet-Cv_94obr.js → table-export-sheet-Dmtqi5NV.js} +1 -1
- package/dist/chunks/{variable-draft-C3CjhsJQ.js → variable-draft-D1RotIEG.js} +3 -3
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +707 -704
- package/dist/format-utils/index.js +145 -142
- package/dist/index.js +14 -14
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/index.js +2 -2
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +5 -2
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +37 -4
- package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
- package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
- package/package.json +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
|
@@ -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 Ie, a5 as Ts, a6 as he, a7 as $e, a8 as la, a9 as ot, aa as Na, ab as Q, ac as G, ad as
|
|
5
|
-
import { dC as
|
|
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 xe, R as Po, S as Lo, H as Mo, T as Bo } from "../chunks/bookmark-state-
|
|
7
|
-
import { ae as
|
|
8
|
-
import { L as
|
|
9
|
-
import { r as Vo, ac as ya
|
|
10
|
-
import { aN as Lm,
|
|
11
|
-
import { f as
|
|
12
|
-
import { p as
|
|
13
|
-
import { r as Ha, D as Ia, f as
|
|
14
|
-
import { N as Um,
|
|
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 Ie, a5 as Ts, a6 as he, a7 as $e, a8 as la, a9 as ot, aa as Na, ab as Q, ac as G, ad as Ee, 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 we, az as be, aA as qe, 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-Cn9jumxl.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, f0 as wd, fb as xd, f4 as Sd, dr as kd, ds as Td, ci as Rd, eL as Ad, eJ as Fd, eK as Dd, bM as Od, eX as Ed, dG as qd, co as Nd, dN as Pd, ch as Ld, ff as Md, fg as Bd, en as Vd, dF as jd, eO as Kd, fk as Wd, cF as Ud, f5 as Gd, dm as Qd, cj as Hd, eb as zd, ec as Yd, cY as Jd, cG as Xd, dU as Zd, bG as el, dZ as tl, el as al, dJ as sl, eP as ol, bH as nl, bP as il, e6 as rl, cA as dl, fi as ll, eo as cl, dM as ul, em as fl, dX as ml, d7 as hl, d6 as pl, cg as gl, dT as bl, b_ as yl, c4 as vl, dR as Il, cx as _l, bE as Cl, f6 as $l, fa as wl, cp as xl, e0 as Sl, d_ as kl, eh as Tl, bI as Rl, ep as Al, eY as Fl, dA as Dl, dB as Ol, fl as El, fm as ql, fo as Nl, b$ as Pl, c0 as Ll, c1 as Ml, ck as Bl, cm as Vl, fh as jl, ev as Kl, db as Wl, f as Ul, cM as Gl, c9 as Ql, cu as Hl, b as zl, cJ as Yl, dc as Jl, bS as Xl, bT as Zl, dL as ec, c8 as tc, e8 as ac, cq as sc, bz as oc, cd as nc, dp as ic, bW as rc, dz as dc, c3 as lc, d2 as cc, eM as uc, fn as fc, bN as mc, d4 as hc, e9 as pc, d5 as gc, ed as bc, eE as yc, eD as vc, dO as Ic, cC as _c, ct as Cc, cv as $c, l as wc, cw as xc, et as Sc, dx as kc, dK as Tc, bA as Rc, bB as Ac, bC as Fc, bJ as Dc, f2 as Oc, eZ as Ec, dD as qc, e_ as Nc, cz as Pc, ce as Lc, cI as Mc, dy as Bc, es as Vc, d9 as jc, da as Kc, bR as Wc, fj as Uc, dI as Gc, eq as Qc, dd as Hc, eI as zc, eG as Yc, J as Jc, f1 as Xc, c7 as Zc, f7 as eu, f8 as tu, dk as au, cL as su, bV as ou, d$ as nu, dW as iu, bD as ru, cD as du, cE as lu, cf as cu, c_ as uu, bZ as fu, c5 as mu, c6 as hu, dh as pu, di as gu, ca as bu, bK as yu, bY as vu, d0 as Iu, eB as _u, ex as Cu, f9 as $u, d1 as wu, c$ as xu, fc as Su, bU as ku, ez as Tu, cB as Ru, ew as Au, cK as Fu, ea as Du, eN as Ou, dj as Eu, cy as qu, dq as Nu, bF as Pu, bX as Lu, dP as Mu, eH as Bu, e7 as Vu, cH as ju, d3 as Ku, bO as Wu, dQ as Uu, fd as Gu, e5 as Qu, e4 as Hu, eu as zu, eF as Yu, cn as Ju, cs as Xu, bL as Zu, f3 as ef, e$ as tf, fe as af, cZ as sf, er as of, ek as nf, dl as rf, ej as df, eR as lf, eg as cf, ei as uf, cr as ff, ee as mf, ef as hf, eQ as pf, eS as gf, eT as bf, eU as yf, eV as vf, eW as If } from "../chunks/resolve-dashboard-input-context-Cn9jumxl.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 xe, R as Po, S as Lo, H as Mo, T as Bo } from "../chunks/bookmark-state-CL4WEpgB.js";
|
|
7
|
+
import { ae as Cf, ay as $f, Y as wf, Z as xf, a8 as Sf, ac as kf, a9 as Tf, aa as Rf, ab as Af, af as Ff, aw as Df, aq as Of, D as Ef, au as qf, F as Nf, a1 as Pf, I as Lf, ax as Mf, a4 as Bf, a5 as Vf, as as jf, ad as Kf, a2 as Wf, ao as Uf, at as Gf, av as Qf, ap as Hf, ar as zf, a0 as Yf, _ as Jf, ah as Xf, am as Zf, W as em, X as tm, U as am, a3 as sm, an as om, az as nm, ai as im, ag as rm, aj as dm, ak as lm, al as cm, a7 as um, a6 as fm, $ as mm } from "../chunks/bookmark-state-CL4WEpgB.js";
|
|
8
|
+
import { L as pm, G as gm, H as bm, g as ym, F as vm, q as Im, A as _m, D as Cm, u as $m, v as wm, E as xm, C as Sm, s as km, t as Tm, p as Rm, B as Am, I as Fm, w as Dm, y as Om, x as Em, z as qm } from "../chunks/stored-dashboard-sPkTjxYf.js";
|
|
9
|
+
import { r as Vo, ac as ya } from "../chunks/pivot-result-contract-expectations-Bx_BCu-7.js";
|
|
10
|
+
import { aO as Pm, aN as Lm, aJ as Mm, aM as Bm, aP as Vm, aD as jm } from "../chunks/pivot-result-contract-expectations-Bx_BCu-7.js";
|
|
11
|
+
import { f as jo, w as Ko, D as va, a as Wo } from "../chunks/metric-comparison-ZmurmEIs.js";
|
|
12
|
+
import { p as Uo } from "../chunks/report-runtime-context-NlOXwyRB.js";
|
|
13
|
+
import { r as Ha, D as Ia, f as Go, h as za, i as Qo, j as Ho, k as zo, e as wt, l as Yo, v as Jo } from "../chunks/filter-reach-copy-CmJpPa4G.js";
|
|
14
|
+
import { N as Wm, $ as Um, S as Gm, n as Qm, q as Hm, u as zm, t as Ym, F as Jm, B as Xm, m as Zm, p as eh, I as th, K as ah, L as sh, M as oh, _ as nh, a0 as ih, C as rh, X as dh, E as lh, w as ch, x as uh, z as fh, o as mh, y as hh, R as ph, O as gh, a1 as bh, Z as yh, Y as vh, J as Ih, G as _h, H as Ch, U as $h, T as wh, Q as xh, V as Sh, P as kh, s as Th, W as Rh, A as Ah } from "../chunks/filter-reach-copy-CmJpPa4G.js";
|
|
15
|
+
import { a7 as Ya, r as Ja, aN as Xo, a_ as Ne, aL as Zo, aQ as en, aK as tn, aE as an, aM as sn, a5 as on } from "../chunks/validators-CJ8Jh0E8.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 nn, e as rn, b as dn } from "../chunks/edit-9df1zOWe.js";
|
|
18
18
|
import "../chunks/matrix-operation-contract-BM5TveR3.js";
|
|
19
|
-
import { A as
|
|
20
|
-
import { y as _a, C as
|
|
19
|
+
import { A as Le, B as ze, z as ln, f as cn, y as Et, t as Me, e as un } from "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
20
|
+
import { y as _a, C as fn } from "../chunks/matrix-analytical-definition-QjBgUYhP.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 Dh, a as Oh, S as Eh } from "../chunks/pickers-DkqmtnTL.js";
|
|
24
|
+
import { r as mn } 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 hn, i as Ca, o as ut, d as pn, b as gn, c as bn } from "../chunks/variable-draft-D1RotIEG.js";
|
|
27
|
+
import { S as Nh, f as Ph, g as Lh, e as Mh, n as Bh } from "../chunks/variable-draft-D1RotIEG.js";
|
|
28
|
+
import { r as jh, a as Kh } from "../chunks/dates-CYZW9owO.js";
|
|
29
|
+
import { b as Uh, d as Gh } from "../chunks/bookmark-impact-BhT3k379.js";
|
|
30
|
+
import { r as ye, b as yn, s as vn, a as In } from "../chunks/resolver-DG_tfEpt.js";
|
|
31
|
+
import { n as _n, r as Cn } from "../chunks/index-BVKzKl5d.js";
|
|
32
|
+
import { e as Hh } from "../chunks/brand-BoUV0iHF.js";
|
|
33
|
+
const Sr = [
|
|
34
34
|
"cardType",
|
|
35
35
|
"sql",
|
|
36
36
|
"python",
|
|
@@ -46,7 +46,7 @@ const kr = [
|
|
|
46
46
|
"globalDateComparison",
|
|
47
47
|
"calendarContext",
|
|
48
48
|
"sqlRowLimit"
|
|
49
|
-
],
|
|
49
|
+
], kr = [
|
|
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 $n(e, a = {}) {
|
|
74
74
|
const t = ve(e), s = qt(a), o = {};
|
|
75
75
|
if (t.calendarContext !== void 0) {
|
|
76
|
-
const i =
|
|
76
|
+
const i = Uo(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 wn(e, a = {}) {
|
|
|
90
90
|
n.issues
|
|
91
91
|
);
|
|
92
92
|
if (t.resolvedPrimaryDateField && (o.resolvedPrimaryDateField = t.resolvedPrimaryDateField), t.globalDateComparison !== void 0) {
|
|
93
|
-
const i =
|
|
93
|
+
const i = jo(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
|
-
o.globalDateComparison =
|
|
100
|
+
o.globalDateComparison = Ko(
|
|
101
101
|
t.globalDateComparison
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
return o;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Tr(e, a = {}) {
|
|
107
107
|
const t = ve(e), s = qt(a), o = {};
|
|
108
108
|
if (t.pagination !== void 0) {
|
|
109
109
|
const n = ve(t.pagination), i = n.page, d = n.pageSize;
|
|
@@ -135,7 +135,7 @@ function Rr(e, a = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
return o;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Rr(e, a = {}) {
|
|
139
139
|
const t = ve(e), s = qt(a), o = (w) => new ce(`${s}${w} is required`, w), n = Ke(t.connection_id).trim();
|
|
140
140
|
if (!n) throw o("connection_id");
|
|
141
141
|
const i = Ke(t.cardType).trim();
|
|
@@ -178,39 +178,39 @@ function Ar(e, a = {}) {
|
|
|
178
178
|
controlDefinitions: x.controlDefinitions,
|
|
179
179
|
cardControlDefinitions: x.cardControlDefinitions,
|
|
180
180
|
controlBindings: x.controlBindings,
|
|
181
|
-
|
|
181
|
+
...$n(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"],
|
|
186
|
-
function
|
|
185
|
+
const ft = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"], wn = ["spacing", "canvasPadding", "canvas", "cardCorners", "chartColors"], Za = ["light", "dark"];
|
|
186
|
+
function Ar(e) {
|
|
187
187
|
const a = [], t = ht(e.globalStyle) ? e.globalStyle : {}, s = ht(t.default) ? t.default : {}, o = ht(t.dark) ? t.dark : {}, n = (p) => ye(o, p) ?? ye(s, p), i = {}, d = n(["gridLayout", "margin"]);
|
|
188
|
-
Array.isArray(d) && typeof d[1] == "number" && (i.spacing =
|
|
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 = n(["cardBorderRadius"]);
|
|
190
|
-
typeof l == "number" && (i.cardCorners =
|
|
190
|
+
typeof l == "number" && (i.cardCorners = De("cardCorners", l, a));
|
|
191
191
|
const c = n(["controlInputRadius"]);
|
|
192
|
-
typeof c == "number" && (i.controlCorners =
|
|
192
|
+
typeof c == "number" && (i.controlCorners = De("controlCorners", c, a));
|
|
193
193
|
const h = n(["chart", "options", "borderRadius"]);
|
|
194
|
-
typeof h == "number" && (i.barCorners =
|
|
194
|
+
typeof h == "number" && (i.barCorners = De("barCorners", h, a));
|
|
195
195
|
for (const p of Za) {
|
|
196
|
-
const I = p === "light" ? ye(s, ["canvasTheme"]) : n(["canvasTheme"]), v =
|
|
196
|
+
const I = p === "light" ? ye(s, ["canvasTheme"]) : n(["canvasTheme"]), v = kn(I, a);
|
|
197
197
|
v !== void 0 && (i.canvas = { ...i.canvas, [p]: v });
|
|
198
|
-
const x =
|
|
198
|
+
const x = Sn(s, o, p);
|
|
199
199
|
if (x) {
|
|
200
200
|
const w = x.filter(Xa).map((E) => E.toLowerCase());
|
|
201
201
|
w.length < x.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${p}: ${x.length - w.length} colours that aren't hex` }), w.length >= je.min && (i.chartColors = { ...i.chartColors, [p]: w.slice(0, je.max) }), w.length > je.max && a.push({ field: "chartColors", kind: "clamped", detail: `${p}: kept the first ${je.max} colours` });
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
return { style:
|
|
204
|
+
return { style: xn(i, e.organizationAppearance, a), notes: a };
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
const s =
|
|
206
|
+
function xn(e, a, t) {
|
|
207
|
+
const s = yn({ organizationAppearance: a ? _n(a).spec : null }), o = { ...e };
|
|
208
208
|
for (const n of Object.keys(e)) {
|
|
209
|
-
const i =
|
|
209
|
+
const i = In[n], d = n === "canvas" || n === "chartColors";
|
|
210
210
|
for (const l of Za) {
|
|
211
|
-
const c =
|
|
211
|
+
const c = vn(o, n, l);
|
|
212
212
|
if (c === void 0) continue;
|
|
213
|
-
const h =
|
|
213
|
+
const h = wn.includes(n) && ye(Cn(a, l), i) !== void 0, p = JSON.stringify(ye(s.schemes[l], i)) === JSON.stringify(c);
|
|
214
214
|
if (!(!h && !p))
|
|
215
215
|
if ((d || l === "light") && t.push({ field: n, kind: h ? "brand_wins" : "equal_to_inherited", detail: d ? l : `${JSON.stringify(c)}` }), d) {
|
|
216
216
|
const I = { ...o[n] };
|
|
@@ -220,7 +220,7 @@ function Sn(e, a, t) {
|
|
|
220
220
|
}
|
|
221
221
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function Sn(e, a, t) {
|
|
224
224
|
const s = ye(e, ["chart", "dataset", "backgroundColor"]), o = ye(a, ["chart", "dataset", "backgroundColor"]), n = mt(ft, s);
|
|
225
225
|
if (t === "light") return Array.isArray(s) ? n : void 0;
|
|
226
226
|
const i = mt(n, mt(ft, o));
|
|
@@ -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, o) => a[o] !== void 0 ? String(a[o]) : e[o]);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function kn(e, a) {
|
|
236
236
|
if (!(e == null || e === "")) {
|
|
237
237
|
if (e === "muted") return "muted";
|
|
238
238
|
if (e === "clear") return "background";
|
|
@@ -240,8 +240,8 @@ function Tn(e, a) {
|
|
|
240
240
|
a.push({ field: "canvas", kind: "dropped_colour", detail: String(e) });
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const { min: s, max: o } =
|
|
243
|
+
function De(e, a, t) {
|
|
244
|
+
const { min: s, max: o } = nn[e], n = Math.min(o, Math.max(s, Math.round(a)));
|
|
245
245
|
return n !== a && t.push({ field: e, kind: "clamped", detail: `${a} → ${n}` }), n;
|
|
246
246
|
}
|
|
247
247
|
function ht(e) {
|
|
@@ -258,19 +258,19 @@ const pt = {
|
|
|
258
258
|
chartColors: (e, a) => a.chartColors = e,
|
|
259
259
|
barCorners: (e, a) => a.barCorners = e
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function Tn(e) {
|
|
262
262
|
var t;
|
|
263
263
|
const a = {};
|
|
264
264
|
for (const [s, o] of Object.entries(e ?? {}))
|
|
265
265
|
o !== void 0 && ((t = pt[s]) == null || t.call(pt, o, a));
|
|
266
266
|
return a;
|
|
267
267
|
}
|
|
268
|
-
const
|
|
268
|
+
const Rn = {
|
|
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
|
-
function
|
|
273
|
+
function An(e, a, t = {}) {
|
|
274
274
|
var d;
|
|
275
275
|
const s = Ie(e), o = Eo(a.scope), n = new Set(Wa(e).map((l) => l.id)), i = {
|
|
276
276
|
reaches: [],
|
|
@@ -357,7 +357,7 @@ function Fn(e, a, t = {}) {
|
|
|
357
357
|
}
|
|
358
358
|
return i;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Fn(e, a) {
|
|
361
361
|
var o;
|
|
362
362
|
const t = a.scope;
|
|
363
363
|
if (t.kind === "allSheets") {
|
|
@@ -382,12 +382,12 @@ function es(e, a) {
|
|
|
382
382
|
}
|
|
383
383
|
function ts(e, a, t, s) {
|
|
384
384
|
var E, _, S;
|
|
385
|
-
const { input: o } = a, n =
|
|
385
|
+
const { input: o } = a, n = An(e, o, s), i = (y, D) => ({
|
|
386
386
|
filterId: o.id,
|
|
387
387
|
label: o.label,
|
|
388
388
|
editable: !1,
|
|
389
389
|
kind: D,
|
|
390
|
-
notEditable: { reason: y, message:
|
|
390
|
+
notEditable: { reason: y, message: Rn[y] },
|
|
391
391
|
reaches: n.reaches,
|
|
392
392
|
excluded: n.excluded,
|
|
393
393
|
...n.blocked ? { blocked: n.blocked } : {},
|
|
@@ -397,13 +397,13 @@ function ts(e, a, t, s) {
|
|
|
397
397
|
if (o.filter.kind === "global-date") return i("global_date", "global_date");
|
|
398
398
|
const d = ks(o.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 = Fn(e, o);
|
|
401
401
|
if (!l || a.origin !== "embeddedInput") return i("scope_not_expressible", "field");
|
|
402
402
|
const c = ((E = o.filter.fieldMeta) == null ? void 0 : E.name) ?? ((_ = o.filter.column) == null ? void 0 : _.split(".").pop()) ?? "", h = Ha({
|
|
403
403
|
dashboard: e,
|
|
404
404
|
target: { kind: "dashboardInput", input: o, scope: {} },
|
|
405
405
|
calendar: es(t, void 0)
|
|
406
|
-
}).value, p = Ya(o.filter.dataType), I = p || (S = h == null ? void 0 : h.values) == null ? void 0 : S.filter((y) => ["string", "number", "boolean"].includes(typeof y)), v = Ja(h && "relativeMeta" in h ? h.relativeMeta : void 0), x = p ? v : void 0, w = x ?
|
|
406
|
+
}).value, p = Ya(o.filter.dataType), I = p || (S = h == null ? void 0 : h.values) == null ? void 0 : S.filter((y) => ["string", "number", "boolean"].includes(typeof y)), v = Ja(h && "relativeMeta" in h ? h.relativeMeta : void 0), x = p ? v : void 0, w = x ? Xo(
|
|
407
407
|
x,
|
|
408
408
|
{ use: "filterDefault", columnHasTime: qa(o.filter) === "datetime" },
|
|
409
409
|
"defaultPeriod"
|
|
@@ -427,7 +427,7 @@ function ts(e, a, t, s) {
|
|
|
427
427
|
function as(e, a, t) {
|
|
428
428
|
return Ie(e).inputs.map((s) => ts(e, s, a, t));
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Pe(e, a, t, s) {
|
|
431
431
|
const o = Ie(e).findFilterInput({ inputId: a });
|
|
432
432
|
return o ? ts(e, o, t, s) : void 0;
|
|
433
433
|
}
|
|
@@ -455,7 +455,7 @@ function ns(e) {
|
|
|
455
455
|
field: s
|
|
456
456
|
}));
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Dn(e) {
|
|
459
459
|
const a = os(e), t = /* @__PURE__ */ new Map();
|
|
460
460
|
for (const { field: s } of ns(e)) {
|
|
461
461
|
const o = ss(s, a);
|
|
@@ -463,14 +463,14 @@ function On(e) {
|
|
|
463
463
|
}
|
|
464
464
|
return [...t.values()];
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function On(e, a, t) {
|
|
467
467
|
if (!t) return;
|
|
468
468
|
const s = la(a), o = ns(e).find((d) => la(d.ref) === s);
|
|
469
469
|
if (!o) return;
|
|
470
470
|
const n = ss(o.field, os(e)), i = n ? t[Nt(n)] : void 0;
|
|
471
471
|
return i ? ot(i, o.field.name, n.datasetName) : void 0;
|
|
472
472
|
}
|
|
473
|
-
const xt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "band", "seeRecords"],
|
|
473
|
+
const xt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "band", "seeRecords"], En = {
|
|
474
474
|
orientation: "orientation",
|
|
475
475
|
stack: "stacking",
|
|
476
476
|
donut: "donut hole",
|
|
@@ -482,16 +482,16 @@ const xt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "
|
|
|
482
482
|
inheritComparison: "dashboard comparison",
|
|
483
483
|
band: "band under its value",
|
|
484
484
|
seeRecords: "records to see"
|
|
485
|
-
},
|
|
486
|
-
function
|
|
485
|
+
}, qn = { x: "xAxisConfig", y: "yAxisConfig" }, gt = { x: "horizontal", y: "vertical" };
|
|
486
|
+
function Nn(e) {
|
|
487
487
|
const a = `${e.sql ? "SQL " : ""}${qs(e.type)}`;
|
|
488
488
|
return `${/^[aeiou]/i.test(a) ? "an" : "a"} ${a}`;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Pn(e, a, t) {
|
|
491
491
|
const s = Object.fromEntries(Object.entries(a).filter(([o, n]) => n !== void 0 && !t.includes(o)));
|
|
492
492
|
return Object.keys(s).length ? { op: "card.update", cardId: e.cardRef, ...s } : void 0;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Ln(e, a, t, s, o) {
|
|
495
495
|
var v, x, w, E, _, S, y, D, $, N;
|
|
496
496
|
const n = xt.filter((g) => t[g] !== void 0);
|
|
497
497
|
if (!n.length) return {};
|
|
@@ -499,15 +499,15 @@ function Mn(e, a, t, s, o) {
|
|
|
499
499
|
for (const g of d)
|
|
500
500
|
o.push(
|
|
501
501
|
Q("setting_not_for_card", {
|
|
502
|
-
message: `${G(e.title)} is ${
|
|
502
|
+
message: `${G(e.title)} is ${Nn(a)}, which has no ${En[g]}.`,
|
|
503
503
|
path: `${s.path}.${g}`,
|
|
504
504
|
fix: i.length ? `Leave out ${g}; this card takes ${i.join(", ")}.` : `Leave out ${g}.`,
|
|
505
505
|
allowed: i,
|
|
506
|
-
suggestedChange:
|
|
506
|
+
suggestedChange: Pn(s, t, d)
|
|
507
507
|
})
|
|
508
508
|
);
|
|
509
509
|
if (d.length) return {};
|
|
510
|
-
const l = {}, c = ((v =
|
|
510
|
+
const l = {}, c = ((v = Ee(e)) == null ? void 0 : v.properties) ?? {}, h = {
|
|
511
511
|
...c,
|
|
512
512
|
...t.orientation !== void 0 ? { orientation: t.orientation } : {},
|
|
513
513
|
...t.stack !== void 0 ? { stack: t.stack } : {},
|
|
@@ -524,8 +524,8 @@ function Mn(e, a, t, s, o) {
|
|
|
524
524
|
t.dataLabels.show !== Ds(p) && (g.show = t.dataLabels.show);
|
|
525
525
|
const k = t.dataLabels.format;
|
|
526
526
|
if (k === null && ((w = I.dataLabels) != null && w.format) && (g.format = null), k) {
|
|
527
|
-
const T =
|
|
528
|
-
T && !
|
|
527
|
+
const T = Mn(e, a, k, `${s.path}.dataLabels.format`, o);
|
|
528
|
+
T && !Ne(T, (E = I.dataLabels) == null ? void 0 : E.format) && (g.format = T);
|
|
529
529
|
}
|
|
530
530
|
Object.keys(g).length && (l.dataLabels = g);
|
|
531
531
|
}
|
|
@@ -538,8 +538,8 @@ function Mn(e, a, t, s, o) {
|
|
|
538
538
|
for (const T of ["x", "y"]) {
|
|
539
539
|
const L = t.axes[T];
|
|
540
540
|
if (!L) continue;
|
|
541
|
-
const V =
|
|
542
|
-
V && (k[
|
|
541
|
+
const V = Bn(e, T, L, ((y = I.axes) == null ? void 0 : y[T]) ?? {}, T === g, `${s.path}.axes.${T}`, o);
|
|
542
|
+
V && (k[qn[T]] = V);
|
|
543
543
|
}
|
|
544
544
|
Object.keys(k).length && (l.axes = k);
|
|
545
545
|
}
|
|
@@ -556,8 +556,8 @@ function Mn(e, a, t, s, o) {
|
|
|
556
556
|
})
|
|
557
557
|
) : t.band !== (((N = e.config) == null ? void 0 : N.kpiBand) ?? "automatic") && (l.band = t.band === "automatic" ? null : t.band)), l;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
560
|
-
const n = String(t.type), i = Ns("cartesian", "number"), d =
|
|
559
|
+
function Mn(e, a, t, s, o) {
|
|
560
|
+
const n = String(t.type), i = Ns("cartesian", "number"), d = Le(n), l = d == null ? void 0 : d.safeParse(t);
|
|
561
561
|
if (!i.includes(n) || !(l != null && l.success)) {
|
|
562
562
|
const h = l && !l.success ? l.error.issues[0] : void 0;
|
|
563
563
|
o.push(
|
|
@@ -577,7 +577,7 @@ function Bn(e, a, t, s, o) {
|
|
|
577
577
|
}
|
|
578
578
|
return l.data;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function Bn(e, a, t, s, o, n, i) {
|
|
581
581
|
const d = {};
|
|
582
582
|
t.title !== void 0 && (t.title !== null && !t.title.trim() ? i.push(Q("value_invalid", { message: "An axis title can't be empty.", path: `${n}.title`, fix: "Send a title, or null for none." })) : (t.title ?? void 0) !== s.title && (d.title = t.title));
|
|
583
583
|
const l = ["min", "max"].filter((c) => t[c] !== void 0 && t[c] !== null);
|
|
@@ -626,25 +626,25 @@ function $a(e, a, t, s, o) {
|
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
628
|
const is = (e) => e.granularity ? `a date grouped by ${e.granularity}` : e.dataType ? `a ${e.dataType.toLowerCase()}` : "this column";
|
|
629
|
-
function
|
|
629
|
+
function Se(e, a) {
|
|
630
630
|
return `${e}.columns[${JSON.stringify(a)}]`;
|
|
631
631
|
}
|
|
632
632
|
function St(e, a, t, s) {
|
|
633
633
|
const { [s]: o, ...n } = t;
|
|
634
634
|
return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Vn(e, a, t) {
|
|
637
637
|
const { hidden: s, width: o, ...n } = t;
|
|
638
638
|
return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
|
|
639
639
|
}
|
|
640
640
|
function We(e, a, t) {
|
|
641
641
|
return { op: "card.update", cardId: e.cardRef, columns: { [a]: { format: t } } };
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function jn(e, a, t, s, o, n, i) {
|
|
644
644
|
var c;
|
|
645
645
|
const d = o.label;
|
|
646
646
|
if (d === void 0 || d === t.label) return;
|
|
647
|
-
const l = `${
|
|
647
|
+
const l = `${Se(n.path, s)}.label`;
|
|
648
648
|
if (!a.settings.has("columns.label") || !t.labelKey) {
|
|
649
649
|
i.push(
|
|
650
650
|
Q("setting_not_for_card", {
|
|
@@ -657,7 +657,7 @@ function Kn(e, a, t, s, o, n, i) {
|
|
|
657
657
|
return;
|
|
658
658
|
}
|
|
659
659
|
if (d === null) {
|
|
660
|
-
const h = ((c =
|
|
660
|
+
const h = ((c = On(e, t.ref, n.catalogs)) == null ? void 0 : c.label) || t.field || t.label;
|
|
661
661
|
return t.labelInherited && t.label === h ? void 0 : { key: t.labelKey, label: h, origin: "semantic" };
|
|
662
662
|
}
|
|
663
663
|
if (!d.trim()) {
|
|
@@ -666,9 +666,9 @@ function Kn(e, a, t, s, o, n, i) {
|
|
|
666
666
|
}
|
|
667
667
|
return { key: t.labelKey, label: d };
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function Kn(e, a, t, s, o, n, i) {
|
|
670
670
|
var g, k;
|
|
671
|
-
const d = `${
|
|
671
|
+
const d = `${Se(n.path, s)}.format`;
|
|
672
672
|
if (!a.settings.has("columns.format")) {
|
|
673
673
|
i.push(Q("setting_not_for_card", { message: `${G(e.title)} takes no column formats.`, path: d }));
|
|
674
674
|
return;
|
|
@@ -680,7 +680,7 @@ function Wn(e, a, t, s, o, n, i) {
|
|
|
680
680
|
...h ? { catalogFormat: h } : {}
|
|
681
681
|
}), I = p.source === "override" ? p.format : void 0;
|
|
682
682
|
if (o === null) return I ? null : void 0;
|
|
683
|
-
if (I &&
|
|
683
|
+
if (I && Ne(o, I)) return;
|
|
684
684
|
const v = js(e, a, t, n.sqlResultColumns), x = v.value, w = Ks(v);
|
|
685
685
|
if (w.length === 0) {
|
|
686
686
|
i.push($a(e, s, d, t, x));
|
|
@@ -712,15 +712,15 @@ function Wn(e, a, t, s, o, n, i) {
|
|
|
712
712
|
);
|
|
713
713
|
return;
|
|
714
714
|
}
|
|
715
|
-
const y =
|
|
715
|
+
const y = Le(S), D = y == null ? void 0 : y.safeParse(_);
|
|
716
716
|
if (!y || !(D != null && D.success)) {
|
|
717
717
|
const T = D && !D.success ? D.error.issues[0] : void 0;
|
|
718
718
|
i.push(
|
|
719
719
|
Q("format_invalid", {
|
|
720
720
|
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.`,
|
|
721
721
|
path: d,
|
|
722
|
-
fix:
|
|
723
|
-
allowed: y ? ze(S) : [...
|
|
722
|
+
fix: Qn(S),
|
|
723
|
+
allowed: y ? ze(S) : [...ln],
|
|
724
724
|
...p.format ? { suggestedChange: We(n, s, p.format) } : {}
|
|
725
725
|
})
|
|
726
726
|
);
|
|
@@ -728,7 +728,7 @@ function Wn(e, a, t, s, o, n, i) {
|
|
|
728
728
|
}
|
|
729
729
|
const $ = D.data;
|
|
730
730
|
if ($.type === "temporal_bucket" && t.granularity && !ya($, t.granularity).ok) {
|
|
731
|
-
const L =
|
|
731
|
+
const L = cn.filter(
|
|
732
732
|
(V) => ya({ presentation: { mode: "preset", preset: V } }, t.granularity).ok
|
|
733
733
|
);
|
|
734
734
|
i.push(
|
|
@@ -742,7 +742,7 @@ function Wn(e, a, t, s, o, n, i) {
|
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
744
|
if ($.type === "date") {
|
|
745
|
-
const T = o, L = p.format ?? {}, V = Object.keys(T).filter((K) => !ca.includes(K) && !
|
|
745
|
+
const T = o, L = p.format ?? {}, V = Object.keys(T).filter((K) => !ca.includes(K) && !Ne(T[K], L[K]));
|
|
746
746
|
if (V.length) {
|
|
747
747
|
const K = Object.fromEntries(Object.entries($).filter(([B]) => !V.includes(B)));
|
|
748
748
|
i.push(
|
|
@@ -769,13 +769,13 @@ function Wn(e, a, t, s, o, n, i) {
|
|
|
769
769
|
);
|
|
770
770
|
return;
|
|
771
771
|
}
|
|
772
|
-
return I &&
|
|
772
|
+
return I && Ne(I, $) ? void 0 : $;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Wn(e, a, t, s, o, n, i) {
|
|
775
775
|
var w, E;
|
|
776
776
|
const d = o.polarity;
|
|
777
777
|
if (d === void 0) return;
|
|
778
|
-
const l = `${
|
|
778
|
+
const l = `${Se(n.path, s)}.polarity`, c = t.ref;
|
|
779
779
|
if (!(a.settings.has("columns.polarity") && (c.kind === "sqlKpiValue" || c.kind === "field" && t.role === "measure"))) {
|
|
780
780
|
i.push(
|
|
781
781
|
Q("setting_not_for_card", {
|
|
@@ -803,10 +803,10 @@ function Un(e, a, t, s, o, n, i) {
|
|
|
803
803
|
}
|
|
804
804
|
return d === (x ?? v ?? va) ? void 0 : d;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Un(e, a, t, s, o, n, i, d) {
|
|
807
807
|
var h, p, I;
|
|
808
808
|
if (o.hidden === void 0 && o.width === void 0) return {};
|
|
809
|
-
const l =
|
|
809
|
+
const l = Se(i.path, s);
|
|
810
810
|
if (!a.settings.has("columns.hidden") || t.resultKey === void 0) {
|
|
811
811
|
const v = a.pivoted && t.role === "measure";
|
|
812
812
|
return d.push(
|
|
@@ -814,7 +814,7 @@ function Gn(e, a, t, s, o, n, i, d) {
|
|
|
814
814
|
message: v ? `${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.`,
|
|
815
815
|
path: `${l}.${o.hidden !== void 0 ? "hidden" : "width"}`,
|
|
816
816
|
allowed: v ? ["label", "format"] : ["label", "format"].filter((x) => a.settings.has(`columns.${x}`)),
|
|
817
|
-
suggestedChange:
|
|
817
|
+
suggestedChange: Vn(i, s, o)
|
|
818
818
|
})
|
|
819
819
|
), {};
|
|
820
820
|
}
|
|
@@ -831,7 +831,7 @@ function Gn(e, a, t, s, o, n, i, d) {
|
|
|
831
831
|
}
|
|
832
832
|
return c;
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Gn(e, a, t) {
|
|
835
835
|
var E, _, S, y;
|
|
836
836
|
const { columns: s = {}, ...o } = a.settings ?? {}, n = [], i = xt.some((D) => o[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);
|
|
837
837
|
if (!Object.keys(s).length && !i && !d) return { ok: !0, labels: [], settings: null, warnings: [] };
|
|
@@ -841,9 +841,9 @@ function Qn(e, a, t) {
|
|
|
841
841
|
ok: !1,
|
|
842
842
|
problems: [Q("setting_not_for_card", { message: `${G(e.title)} takes no card settings through this tool.`, path: t.path })]
|
|
843
843
|
};
|
|
844
|
-
const c =
|
|
844
|
+
const c = Ln(e, l, o, t, n), h = Ls(e, l, t.sqlResultColumns), p = d ? Ms(e, l, h, a.highlights, t, n) : void 0, I = Ft(e), v = [], x = [];
|
|
845
845
|
for (const [D, $] of Object.entries(s)) {
|
|
846
|
-
const N = Bs(h, D, { path:
|
|
846
|
+
const N = Bs(h, D, { path: Se(t.path, D), cardTitle: G(e.title) });
|
|
847
847
|
if (!N.ok) {
|
|
848
848
|
n.push(N.problem);
|
|
849
849
|
continue;
|
|
@@ -853,15 +853,15 @@ function Qn(e, a, t) {
|
|
|
853
853
|
n.push(
|
|
854
854
|
Q("columns_unavailable", {
|
|
855
855
|
message: `${G(e.title)}'s columns weren't read from its query, so ${D} can't be checked.`,
|
|
856
|
-
path:
|
|
856
|
+
path: Se(t.path, D),
|
|
857
857
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
858
858
|
})
|
|
859
859
|
);
|
|
860
860
|
continue;
|
|
861
861
|
}
|
|
862
|
-
const k =
|
|
862
|
+
const k = jn(e, l, g, D, $, t, n);
|
|
863
863
|
k && v.push(k);
|
|
864
|
-
const T =
|
|
864
|
+
const T = Un(e, l, g, D, $, I.columns[g.name], t, n), L = $.format !== void 0 ? Kn(e, l, g, D, $.format, t, n) : void 0, V = Wn(e, l, g, D, $, t, n), K = {
|
|
865
865
|
column: g.ref,
|
|
866
866
|
...T,
|
|
867
867
|
...L !== void 0 ? { format: L } : {},
|
|
@@ -873,11 +873,11 @@ function Qn(e, a, t) {
|
|
|
873
873
|
const w = { ...c, ...x.length ? { columns: x } : {}, ...p ? { highlights: p } : {} };
|
|
874
874
|
return { ok: !0, labels: v, settings: Object.keys(w).length ? w : null, warnings: [] };
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
const a =
|
|
876
|
+
function Qn(e) {
|
|
877
|
+
const a = Le(e), t = a && a === Le("number") ? ua.number : e === "temporal_bucket" || e === "date" ? ua[e] : void 0;
|
|
878
878
|
return t ? `Send a stored format: ${t}.` : "Send the format in the stored shape the outline shows.";
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Hn(e, a, t, s, o) {
|
|
881
881
|
var _, S, y, D, $, N;
|
|
882
882
|
const n = we(e, { sql: !0, calculations: !1 });
|
|
883
883
|
if (!n.editable) return [n.message];
|
|
@@ -909,7 +909,7 @@ function zn(e, a, t, s, o) {
|
|
|
909
909
|
const T = g && typeof g == "object" ? g.aggregate : void 0;
|
|
910
910
|
T && _a(E[k] ?? {}) !== T && p.push(`the aggregate of measures[${k}]`);
|
|
911
911
|
});
|
|
912
|
-
for (const { key: g, label: k } of
|
|
912
|
+
for (const { key: g, label: k } of qe(a))
|
|
913
913
|
Ws(e, g) !== k && p.push(`the label "${k}"`);
|
|
914
914
|
if (!o || o.aspects.includes("filters")) {
|
|
915
915
|
const g = d.filters ?? [];
|
|
@@ -923,7 +923,7 @@ function zn(e, a, t, s, o) {
|
|
|
923
923
|
(B) => !(c != null && c.timeWindow) && !g.some((se) => V(se, B))
|
|
924
924
|
);
|
|
925
925
|
(!K.length || K.some((B) => !k.some((se) => V(B, se)))) && p.push("timeWindow"), k = k.filter((B) => !K.some((se) => V(se, B)));
|
|
926
|
-
} else T ?
|
|
926
|
+
} else T ? Zo(d.timeWindow, i.timeWindow) || p.push("timeWindow") : L && p.push("timeWindow");
|
|
927
927
|
(g.length !== k.length || g.some((K, B) => !V(K, k[B]))) && p.push("filters");
|
|
928
928
|
}
|
|
929
929
|
if (d.orderBy !== void 0) {
|
|
@@ -945,7 +945,7 @@ function Je(e, a) {
|
|
|
945
945
|
const t = e.variables ?? [];
|
|
946
946
|
return t.find((s) => s.name === a) ?? t.find((s) => s.id === a);
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function zn(e, a, t, s) {
|
|
949
949
|
var i;
|
|
950
950
|
const o = Je(e, a);
|
|
951
951
|
o || s.problem(ls(e, a, t));
|
|
@@ -1026,7 +1026,7 @@ async function wa(e, a, t) {
|
|
|
1026
1026
|
dataSource: h.dataSource,
|
|
1027
1027
|
connectionId: h.connectionId,
|
|
1028
1028
|
get: "only",
|
|
1029
|
-
...(y = d.filters) != null && y.length ? { conditions: await
|
|
1029
|
+
...(y = d.filters) != null && y.length ? { conditions: await Jn(d, n, i, t.refuseAll) } : {}
|
|
1030
1030
|
};
|
|
1031
1031
|
if (l.kind === "aggregate") {
|
|
1032
1032
|
(v.length !== 1 || x.length) && s({
|
|
@@ -1035,7 +1035,7 @@ async function wa(e, a, t) {
|
|
|
1035
1035
|
path: `${i}.query`,
|
|
1036
1036
|
fix: `Send measures: [{ name, aggregate }] alone; for one field's value use get: "only", "first" or "list" with dimensions: [field].`
|
|
1037
1037
|
}), 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." });
|
|
1038
|
-
const $ = I(v[0], `${i}.query.measures[0]`), N = typeof v[0] == "string" ? void 0 : v[0].aggregate, g =
|
|
1038
|
+
const $ = I(v[0], `${i}.query.measures[0]`), N = typeof v[0] == "string" ? void 0 : v[0].aggregate, g = hn($).filter((L) => Ca(L.value)), k = N ?? (ut($) ? "calculation" : pn($));
|
|
1039
1039
|
if (!Ca(k) || !g.some((L) => L.value === k)) {
|
|
1040
1040
|
const L = g.map((V) => V.value);
|
|
1041
1041
|
s({
|
|
@@ -1046,7 +1046,7 @@ async function wa(e, a, t) {
|
|
|
1046
1046
|
allowed: L
|
|
1047
1047
|
});
|
|
1048
1048
|
}
|
|
1049
|
-
const T =
|
|
1049
|
+
const T = Yn(v[0], { ...w, field: $, get: k }, `${i}.query.measures[0].comparison`, s);
|
|
1050
1050
|
return S(Ye({ ...w, field: $, get: k, ...T ? { comparison: T } : {} }, a));
|
|
1051
1051
|
}
|
|
1052
1052
|
(x.length !== 1 || v.length) && s({
|
|
@@ -1091,7 +1091,7 @@ async function wa(e, a, t) {
|
|
|
1091
1091
|
return g.length && t.refuseAll(cs(g, i)), N;
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function Yn(e, a, t, s) {
|
|
1095
1095
|
var n, i;
|
|
1096
1096
|
const o = typeof e == "string" ? void 0 : e.comparison;
|
|
1097
1097
|
if (!(!o || o.kind === "inherit" || o.kind === "off"))
|
|
@@ -1100,14 +1100,14 @@ function Jn(e, a, t, s) {
|
|
|
1100
1100
|
message: "A variable compares with an earlier period, not a target.",
|
|
1101
1101
|
path: t,
|
|
1102
1102
|
fix: "Send comparison: { kind: 'previous_period' } or { kind: 'previous_year' }; put a target in the words, or on a KPI card."
|
|
1103
|
-
}),
|
|
1103
|
+
}), bn(a) || s({
|
|
1104
1104
|
code: "invalid_change",
|
|
1105
1105
|
message: `${((n = a.field) == null ? void 0 : n.label) || ((i = a.field) == null ? void 0 : i.name)} with ${String(a.get)} isn't a number, so it has no comparison.`,
|
|
1106
1106
|
path: t,
|
|
1107
1107
|
fix: "Compare a count, or a numeric field's total, average, lowest or highest; leave comparison out here."
|
|
1108
1108
|
}), Xs(o);
|
|
1109
1109
|
}
|
|
1110
|
-
async function
|
|
1110
|
+
async function Jn(e, a, t, s) {
|
|
1111
1111
|
var n;
|
|
1112
1112
|
const o = await a.compileCardQuery({
|
|
1113
1113
|
query: { domainId: e.domainId, datasetName: e.datasetName, measures: ["__count"], filters: e.filters },
|
|
@@ -1115,8 +1115,8 @@ async function Xn(e, a, t, s) {
|
|
|
1115
1115
|
});
|
|
1116
1116
|
return o.ok ? ((n = o.part.config) == null ? void 0 : n.filters) ?? null : s(o.problems.map((i) => ({ ...i, path: i.path ? `${t}.query.${i.path}` : `${t}.query.filters` })));
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1119
|
-
const n = ds(a), i =
|
|
1118
|
+
function Xn(e, a, t, s, o) {
|
|
1119
|
+
const n = ds(a), i = gn(e);
|
|
1120
1120
|
n.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: `${o}.get`, fix: 'Send query with measures: [{ name, aggregate }] and get: "aggregate".' }), n.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: `${o}.get`, fix: "Send query with dimensions: [field] and the get." }), i.mode === "sql" && n.kind !== "only" && n.kind !== "first" && s.problem({ code: "invalid_change", message: "A SQL variable takes the only row or the first row of its result.", path: `${o}.get`, fix: 'Send get: "only" or "first", or write the list in the SQL itself.' });
|
|
1121
1121
|
const d = Ye(
|
|
1122
1122
|
{
|
|
@@ -1129,7 +1129,7 @@ function Zn(e, a, t, s, o) {
|
|
|
1129
1129
|
);
|
|
1130
1130
|
return { query: d.query, get: d.get };
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function Zn(e, a) {
|
|
1133
1133
|
const t = Qa(e).filter(({ ref: i }) => i.source === "data" && i.variableId === a), s = (i) => {
|
|
1134
1134
|
var d;
|
|
1135
1135
|
return `"${((d = (e.sheets ?? []).find((l) => l.id === i)) == null ? void 0 : d.title) ?? i}"`;
|
|
@@ -1145,7 +1145,7 @@ function ei(e, a) {
|
|
|
1145
1145
|
)
|
|
1146
1146
|
].join(", "), places: t };
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function ei(e, a, t, s, o) {
|
|
1149
1149
|
const { problem: n } = o;
|
|
1150
1150
|
(!Xe(t) || !t.document) && n({
|
|
1151
1151
|
code: "invalid_change",
|
|
@@ -1171,7 +1171,7 @@ function ti(e, a, t, s, o) {
|
|
|
1171
1171
|
path: `${s}.style`,
|
|
1172
1172
|
fix: "Leave style out for a footer line."
|
|
1173
1173
|
});
|
|
1174
|
-
const _ = i[w] ?
|
|
1174
|
+
const _ = i[w] ? Go(i[w].blocks, E) : void 0;
|
|
1175
1175
|
l = (_ == null ? void 0 : _.content) ?? [], c = _ == null ? void 0 : _.style;
|
|
1176
1176
|
}
|
|
1177
1177
|
const h = e.style !== void 0 ? Hs(e.style) : void 0, p = !h || Object.entries(h).every(([w, E]) => (c == null ? void 0 : c[w]) === E);
|
|
@@ -1204,9 +1204,9 @@ const xa = "A text card takes title, description and text.", bt = (e) => e.cards
|
|
|
1204
1204
|
function us(e, a) {
|
|
1205
1205
|
return a.path.reduce((t, s) => typeof s == "number" ? `${t}[${s}]` : `${t}.${s}`, e);
|
|
1206
1206
|
}
|
|
1207
|
-
const
|
|
1208
|
-
async function
|
|
1209
|
-
return fs(e, a, t, { limit:
|
|
1207
|
+
const ti = { max: _o, what: "A proposal", fix: "Split the changes into several proposals." };
|
|
1208
|
+
async function Fr(e, a, t) {
|
|
1209
|
+
return fs(e, a, t, { limit: ti });
|
|
1210
1210
|
}
|
|
1211
1211
|
async function fs(e, a, t, s) {
|
|
1212
1212
|
var Gt, Qt, Ht, zt, Yt, Jt, Xt, Zt, ea, ta, aa, sa, oa, na, ia, ra;
|
|
@@ -1233,7 +1233,7 @@ async function fs(e, a, t, s) {
|
|
|
1233
1233
|
return;
|
|
1234
1234
|
}
|
|
1235
1235
|
for (const u of f.error.issues) {
|
|
1236
|
-
const b =
|
|
1236
|
+
const b = en(u.message);
|
|
1237
1237
|
o.push({
|
|
1238
1238
|
code: "invalid_change",
|
|
1239
1239
|
message: (b == null ? void 0 : b.message) ?? u.message,
|
|
@@ -1260,7 +1260,7 @@ async function fs(e, a, t, s) {
|
|
|
1260
1260
|
if (!O && !A && !F && !((Y = C == null ? void 0 : C.remove) != null && Y.length)) return null;
|
|
1261
1261
|
const R = ie(v, 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 = {};
|
|
1262
1262
|
if (P && !((j = R.sql) != null && j.trim()))
|
|
1263
|
-
for (const H of
|
|
1263
|
+
for (const H of Dn(R)) {
|
|
1264
1264
|
const de = await t.loadCardSource(H);
|
|
1265
1265
|
de && (M[Nt(H)] = de.fields);
|
|
1266
1266
|
}
|
|
@@ -1279,7 +1279,7 @@ async function fs(e, a, t, s) {
|
|
|
1279
1279
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
1280
1280
|
}), z = H;
|
|
1281
1281
|
}
|
|
1282
|
-
const W =
|
|
1282
|
+
const W = Gn(
|
|
1283
1283
|
R,
|
|
1284
1284
|
{
|
|
1285
1285
|
settings: { ...b, ...O ? { columns: O } : { columns: void 0 } },
|
|
@@ -1297,7 +1297,7 @@ async function fs(e, a, t, s) {
|
|
|
1297
1297
|
if (!W.ok)
|
|
1298
1298
|
throw o.push(...W.problems), new me();
|
|
1299
1299
|
for (const H of W.labels) {
|
|
1300
|
-
const de = m.queryLabels.find((
|
|
1300
|
+
const de = m.queryLabels.find((Ae) => He(Ae.key, H.key) && Ae.label !== H.label);
|
|
1301
1301
|
de && y({
|
|
1302
1302
|
code: "value_invalid",
|
|
1303
1303
|
message: `Two labels are stated for one column of "${R.title || "Untitled"}": "${de.label}" in the query and "${H.label}" in columns.`,
|
|
@@ -1434,7 +1434,7 @@ async function fs(e, a, t, s) {
|
|
|
1434
1434
|
}, Bt = (m, r) => {
|
|
1435
1435
|
const f = m.startsWith("$") ? void 0 : Je(v, m);
|
|
1436
1436
|
return f ? f.id : oe(m, r);
|
|
1437
|
-
},
|
|
1437
|
+
}, Te = { services: t, problem: y, refuseAll: B, need: D }, nt = () => (v.sheets ?? []).filter((m) => !Xe(m)), Be = () => nt().map((m) => ({ sheetId: m.id, title: m.title ?? "" })), it = (m, r, f) => {
|
|
1438
1438
|
let u = m;
|
|
1439
1439
|
if (m.startsWith("$")) {
|
|
1440
1440
|
const C = h.get(m);
|
|
@@ -1447,17 +1447,17 @@ async function fs(e, a, t, s) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
const b = (v.sheets ?? []).find((C) => C.id === u);
|
|
1449
1449
|
return b || y({ code: "sheet_not_found", message: `There's no sheet ${u} on this dashboard.`, path: r, fix: "Read the outline again and use its sheet ids.", details: { sheets: Be() } }), f.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;
|
|
1450
|
-
},
|
|
1450
|
+
}, Re = (m, r) => it(m, r, { grid: !0 }), Vt = (m, r) => m.map((f, u) => Re(f, `${r}.sheetIds[${u}]`).id), jt = (m, r, f, u) => {
|
|
1451
1451
|
var A;
|
|
1452
1452
|
for (const F of Ma(r, f)) y({ ...F, path: `${u}.${F.path}` });
|
|
1453
|
-
const b =
|
|
1453
|
+
const b = Fe[m], C = tt(r), O = r.dateField;
|
|
1454
1454
|
if (O && typeof O != "string" && O.label && !r.timeGrain && y({
|
|
1455
1455
|
code: "invalid_change",
|
|
1456
1456
|
message: "A label names a column, and the date field is a column only when the card groups by it.",
|
|
1457
1457
|
path: `${u}.query.dateField.label`,
|
|
1458
1458
|
fix: "Send timeGrain to group by the date, or leave the label out."
|
|
1459
1459
|
}), !b.forms.includes(C)) {
|
|
1460
|
-
const F = Object.keys(
|
|
1460
|
+
const F = Object.keys(Fe).filter((R) => Fe[R].forms.includes(C));
|
|
1461
1461
|
y({
|
|
1462
1462
|
code: "type_not_supported",
|
|
1463
1463
|
message: `A ${m.replace(/_/g, " ")} card takes ${b.forms.map((R) => Ue[R]).join(" or ")}, not ${Ue[C]}.`,
|
|
@@ -1514,7 +1514,7 @@ async function fs(e, a, t, s) {
|
|
|
1514
1514
|
fix: m.code === "query_not_kept" ? "Tell the user to make this change in the editor." : "Read the outline again and propose again.",
|
|
1515
1515
|
details: { reason: "not_expressible", ..."parts" in m ? { parts: m.parts } : {} }
|
|
1516
1516
|
}), Wt = (m, r, f, u, b, C, O) => {
|
|
1517
|
-
const A =
|
|
1517
|
+
const A = Hn(m, r, f, C, O);
|
|
1518
1518
|
if (!A.length) return;
|
|
1519
1519
|
const F = r;
|
|
1520
1520
|
if (A.length === 1 && A[0] === "dateField" && F.dateField && !F.timeGrain && !F.timeWindow) {
|
|
@@ -1542,15 +1542,15 @@ async function fs(e, a, t, s) {
|
|
|
1542
1542
|
if (!A.ok)
|
|
1543
1543
|
throw o.push(...A.problems.map((q) => ({ ...q, path: q.path ? `${u}.query.${q.path}` : `${u}.query` }))), new me();
|
|
1544
1544
|
n.push(...A.warnings.map((q) => ({ ...q, path: q.path ?? `${u}.query` })));
|
|
1545
|
-
const F = !b && "timeWindow" in r && r.timeWindow ?
|
|
1545
|
+
const F = !b && "timeWindow" in r && r.timeWindow ? ci(A.part.config) : void 0;
|
|
1546
1546
|
F && "timeWindow" in r && r.timeWindow && hs(r.timeWindow, { use: "cardFilter", columnHasTime: uo(F) }, `${u}.query.timeWindow`, y);
|
|
1547
1547
|
let R = { ...A.part, type: C };
|
|
1548
1548
|
const P = R.config ?? {};
|
|
1549
1549
|
if (C === "detailTable") {
|
|
1550
1550
|
const q = fo(mo("table", "detailTable", P)) ?? {};
|
|
1551
|
-
R = { ...R, config:
|
|
1551
|
+
R = { ...R, config: si(q) };
|
|
1552
1552
|
}
|
|
1553
|
-
return C === "matrixTable" && (R = await vs(R, P, r, f, u)),
|
|
1553
|
+
return C === "matrixTable" && (R = await vs(R, P, r, f, u)), oi(R, qe(r));
|
|
1554
1554
|
}, vs = async (m, r, f, u, b) => {
|
|
1555
1555
|
var q;
|
|
1556
1556
|
const C = await t.loadCardSource({ domainId: f.domainId, datasetName: f.datasetName });
|
|
@@ -1586,13 +1586,13 @@ async function fs(e, a, t, s) {
|
|
|
1586
1586
|
message: `${r.position.after} isn't a card on a grid sheet.`,
|
|
1587
1587
|
path: `${f}.position.after`,
|
|
1588
1588
|
fix: "Use a cardId from semaphor_get_dashboard_details on the same sheet, or a handle from this proposal."
|
|
1589
|
-
}) : (r.sheetId &&
|
|
1589
|
+
}) : (r.sheetId && Re(r.sheetId, `${f}.sheetId`).id !== j.sheetId && y({
|
|
1590
1590
|
code: "invalid_change",
|
|
1591
1591
|
message: `position.after names a card on another sheet than ${r.sheetId}.`,
|
|
1592
1592
|
path: `${f}.position.after`,
|
|
1593
1593
|
fix: "Leave out sheetId, or name the card's sheet."
|
|
1594
1594
|
}), { sheetId: j.sheetId, frameId: j.frameId });
|
|
1595
|
-
})() : void 0, b = u ?
|
|
1595
|
+
})() : void 0, b = u ? Re(u.sheetId, `${f}.position.after`) : r.sheetId ? Re(r.sheetId, `${f}.sheetId`) : (() => {
|
|
1596
1596
|
const Y = nt();
|
|
1597
1597
|
return Y.length !== 1 && y({
|
|
1598
1598
|
code: Y.length ? "sheet_required" : "sheet_not_a_grid",
|
|
@@ -1610,7 +1610,7 @@ async function fs(e, a, t, s) {
|
|
|
1610
1610
|
Y.length && y({ code: "invalid_change", message: `A text card takes no ${et(Y)}.`, path: f, fix: xa }), r.text === void 0 && y({ code: "invalid_change", message: "A text card needs its words in text.", path: `${f}.text`, fix: xa });
|
|
1611
1611
|
const j = ga({ text: r.text, context: { dashboard: v, place: { kind: "sheet", sheetId: b.id } }, path: `${f}.text` });
|
|
1612
1612
|
j.ok || B(j.problems);
|
|
1613
|
-
const ne =
|
|
1613
|
+
const ne = Ho({
|
|
1614
1614
|
id: t.newId(),
|
|
1615
1615
|
title: r.title,
|
|
1616
1616
|
...r.description ? { description: r.description } : {},
|
|
@@ -1628,7 +1628,7 @@ async function fs(e, a, t, s) {
|
|
|
1628
1628
|
const F = yt(r.query), R = F.query, P = r.type;
|
|
1629
1629
|
jt(P, R, r.matrix, f);
|
|
1630
1630
|
const q = await Ut(P, R, r.matrix, f), M = {
|
|
1631
|
-
...
|
|
1631
|
+
...zo({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
|
|
1632
1632
|
type: q.type
|
|
1633
1633
|
}, U = ha(M, q);
|
|
1634
1634
|
U.ok || y({ code: "invalid_change", message: U.message, path: f });
|
|
@@ -1641,7 +1641,7 @@ async function fs(e, a, t, s) {
|
|
|
1641
1641
|
cardId: z.id,
|
|
1642
1642
|
cardRef: X,
|
|
1643
1643
|
request: { settings: V(r) },
|
|
1644
|
-
queryLabels: "sql" in R ? [] :
|
|
1644
|
+
queryLabels: "sql" in R ? [] : qe(R),
|
|
1645
1645
|
index: m,
|
|
1646
1646
|
path: f
|
|
1647
1647
|
});
|
|
@@ -1656,7 +1656,7 @@ async function fs(e, a, t, s) {
|
|
|
1656
1656
|
r.text !== void 0 && y({ code: "invalid_change", message: `"${(b == null ? void 0 : b.card.title) ?? u}" isn't a text card, so it takes no text.`, path: `${f}.text`, fix: "Change its query; text is for text cards." });
|
|
1657
1657
|
const { card: C, read: O } = g(u, f);
|
|
1658
1658
|
let A = !1, F = [];
|
|
1659
|
-
const R = r.type && r.type !== ((Gt =
|
|
1659
|
+
const R = r.type && r.type !== ((Gt = Ee(C)) == null ? void 0 : Gt.type) ? ct(r.type) : void 0;
|
|
1660
1660
|
if (R && R !== C.type) {
|
|
1661
1661
|
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, {
|
|
1662
1662
|
...U ? { catalog: U } : {},
|
|
@@ -1681,7 +1681,7 @@ async function fs(e, a, t, s) {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
const P = r.query ? yt(r.query) : void 0;
|
|
1683
1683
|
if (r.query || r.matrix) {
|
|
1684
|
-
const q = ie(v, u).card, M = we(q, { sql: !0, calculations: !1 }), U = M.editable ? yt(M.query).query : void 0, z = U, W =
|
|
1684
|
+
const q = ie(v, u).card, M = we(q, { sql: !0, calculations: !1 }), U = M.editable ? yt(M.query).query : void 0, z = U, W = di(z, (P == null ? void 0 : P.query) ?? {}, `${f}.query`, (le) => {
|
|
1685
1685
|
if (le.code === "query_form_mismatch" && (P != null && P.calculations.length)) {
|
|
1686
1686
|
const pe = T(q, P.calculations, f), Ce = fa({ card: q, stated: pe, context: { path: f, cardRef: r.cardId, dates: ka(q) } });
|
|
1687
1687
|
if (!Ce.ok)
|
|
@@ -1689,20 +1689,20 @@ async function fs(e, a, t, s) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
return y(le);
|
|
1691
1691
|
});
|
|
1692
|
-
F =
|
|
1693
|
-
const X = ((Ht =
|
|
1692
|
+
F = ri((P == null ? void 0 : P.query) ?? {}, W);
|
|
1693
|
+
const X = ((Ht = Ee(q)) == null ? void 0 : Ht.type) ?? $t(q.type), Y = r.matrix ?? (M.editable ? M.matrix : void 0);
|
|
1694
1694
|
jt(X, W, Y, f);
|
|
1695
|
-
const j = M.editable && U ? ao(U, W, M.matrix, Y) : void 0, ne = !j || j.aspects.length > 0, fe = j && !("sql" in W) ?
|
|
1695
|
+
const j = M.editable && U ? ao(U, W, M.matrix, Y) : void 0, ne = !j || j.aspects.length > 0, fe = j && !("sql" in W) ? qe(W).filter((le) => !ma(j, le.key.role)) : [], H = so(q, j, fe.map((le) => le.key.role));
|
|
1696
1696
|
H && Kt(H, f);
|
|
1697
1697
|
let de = W;
|
|
1698
1698
|
if (j && !("sql" in W) && W.orderBy && !j.aspects.includes("order") && ["metric", "group_by", "detail"].some((le) => ma(j, le))) {
|
|
1699
1699
|
const { orderBy: le, ...pe } = W;
|
|
1700
1700
|
de = pe;
|
|
1701
1701
|
}
|
|
1702
|
-
let
|
|
1702
|
+
let Ae;
|
|
1703
1703
|
if (ne) {
|
|
1704
1704
|
const le = !!(z && ms(z, (P == null ? void 0 : P.query) ?? {}) && (j != null && j.keptWindow)), pe = await Ut(X, de, Y, f, le), Ce = pe.type === ct(X) ? { ...pe, type: q.type } : pe;
|
|
1705
|
-
|
|
1705
|
+
Ae = Ce;
|
|
1706
1706
|
const da = j ? { ...Ce, change: j } : Ce, ge = ha(q, da);
|
|
1707
1707
|
if (ge.ok || Kt(ge, f), ge.ok && ge.droppedBindings.length && n.push({
|
|
1708
1708
|
code: "control_binding_dropped",
|
|
@@ -1721,7 +1721,7 @@ async function fs(e, a, t, s) {
|
|
|
1721
1721
|
});
|
|
1722
1722
|
$({ op: "card.update", cardId: u, update: { kind: "requery", query: da }, changeIndex: m }, `${f}.query`), A = !0;
|
|
1723
1723
|
}
|
|
1724
|
-
fe.length && pa(ie(v, u).card, fe).changed.length && $({ op: "card.update", cardId: u, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${f}.query`), (ne || fe.length) && Wt(ie(v, u).card, de, Y, f, q.title ?? "",
|
|
1724
|
+
fe.length && pa(ie(v, u).card, fe).changed.length && $({ op: "card.update", cardId: u, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${f}.query`), (ne || fe.length) && Wt(ie(v, u).card, de, Y, f, q.title ?? "", Ae, j);
|
|
1725
1725
|
}
|
|
1726
1726
|
(r.query || R) && await L({ cardId: u, cardRef: r.cardId, stated: (P == null ? void 0 : P.calculations) ?? [], index: m, path: f }) && (A = !0), (r.title !== void 0 || r.description !== void 0) && $(
|
|
1727
1727
|
{
|
|
@@ -1766,7 +1766,7 @@ async function fs(e, a, t, s) {
|
|
|
1766
1766
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1767
1767
|
details: { available: u.fields.slice(0, 20).map((P) => P.name) }
|
|
1768
1768
|
});
|
|
1769
|
-
const C = r.sheetIds ? Vt(r.sheetIds, f) : void 0, O = Ta(C), A =
|
|
1769
|
+
const C = r.sheetIds ? Vt(r.sheetIds, f) : void 0, O = Ta(C), A = Qo({
|
|
1770
1770
|
field: b,
|
|
1771
1771
|
dataSource: u.dataSource,
|
|
1772
1772
|
connectionId: u.connectionId,
|
|
@@ -1782,7 +1782,7 @@ async function fs(e, a, t, s) {
|
|
|
1782
1782
|
break;
|
|
1783
1783
|
}
|
|
1784
1784
|
case "filter.update": {
|
|
1785
|
-
const u = te(r.filterId, `${f}.filterId`), b =
|
|
1785
|
+
const u = te(r.filterId, `${f}.filterId`), b = Pe(v, u, void 0, I);
|
|
1786
1786
|
b != null && b.editable || y({
|
|
1787
1787
|
code: "filter_not_editable",
|
|
1788
1788
|
message: b && !b.editable ? b.notEditable.message : "This filter can't be changed through the MCP.",
|
|
@@ -1820,19 +1820,19 @@ async function fs(e, a, t, s) {
|
|
|
1820
1820
|
break;
|
|
1821
1821
|
}
|
|
1822
1822
|
case "filter.bind": {
|
|
1823
|
-
const u = te(r.filterId, `${f}.filterId`), b =
|
|
1823
|
+
const u = te(r.filterId, `${f}.filterId`), b = Pe(v, u, void 0, I);
|
|
1824
1824
|
b != null && b.editable || y({
|
|
1825
1825
|
code: "filter_not_editable",
|
|
1826
1826
|
message: b && !b.editable ? b.notEditable.message : "This filter can't be changed through the MCP.",
|
|
1827
1827
|
path: `${f}.filterId`,
|
|
1828
1828
|
fix: "Tell the user to change it in the editor; removing or excluding it works."
|
|
1829
1829
|
});
|
|
1830
|
-
const C = Bt(r.cardId, `${f}.cardId`), O = Ua(v, C).card, A = Ie(v).findFilterInput({ inputId: u }), F = A && $e(A.input, O, I).reach === "relationshipApplied", R = await
|
|
1830
|
+
const C = Bt(r.cardId, `${f}.cardId`), O = Ua(v, C).card, A = Ie(v).findFilterInput({ inputId: u }), F = A && $e(A.input, O, I).reach === "relationshipApplied", R = await ui(O, r.field, t, `${f}.field`, y, F ? b.label : void 0);
|
|
1831
1831
|
$({ op: "filter.bind", filterId: u, cardId: C, binding: { kind: "bound", cardId: C, bindingId: t.newId(), target: R }, changeIndex: m }, f), d.push({ ref: r.filterId, kind: "filter", id: u, title: b.label, changeIndex: m });
|
|
1832
1832
|
break;
|
|
1833
1833
|
}
|
|
1834
1834
|
case "layout.arrange": {
|
|
1835
|
-
const u = r.sheetId ?
|
|
1835
|
+
const u = r.sheetId ? Re(r.sheetId, `${f}.sheetId`) : (() => {
|
|
1836
1836
|
const b = nt();
|
|
1837
1837
|
return b.length !== 1 && y({
|
|
1838
1838
|
code: b.length ? "sheet_required" : "sheet_not_a_grid",
|
|
@@ -1925,7 +1925,7 @@ async function fs(e, a, t, s) {
|
|
|
1925
1925
|
case "dashboard.style": {
|
|
1926
1926
|
const { op: u, ...b } = r;
|
|
1927
1927
|
x ?? (x = t.readOrganizationAppearance ? t.readOrganizationAppearance() : Promise.resolve(null));
|
|
1928
|
-
const { style: C, organizationAppearance: O } = za(v, await x), A =
|
|
1928
|
+
const { style: C, organizationAppearance: O } = za(v, await x), A = rn({ style: C, edit: b, layers: { organizationAppearance: O } });
|
|
1929
1929
|
if (A.ok)
|
|
1930
1930
|
A.sentences.length && $({ op: "dashboard.style", style: A.style, sentences: A.sentences, changeIndex: m }, f);
|
|
1931
1931
|
else {
|
|
@@ -1948,13 +1948,13 @@ async function fs(e, a, t, s) {
|
|
|
1948
1948
|
path: f
|
|
1949
1949
|
},
|
|
1950
1950
|
v,
|
|
1951
|
-
|
|
1951
|
+
Te
|
|
1952
1952
|
);
|
|
1953
1953
|
$({ op: "variable.add", variable: u, changeIndex: m }, f), d.push({ ref: r.name, kind: "variable", id: u.id, title: u.name, changeIndex: m });
|
|
1954
1954
|
break;
|
|
1955
1955
|
}
|
|
1956
1956
|
case "variable.update": {
|
|
1957
|
-
const u =
|
|
1957
|
+
const u = zn(v, r.name, `${f}.name`, Te), b = r.rename ?? u.name, C = {
|
|
1958
1958
|
...r.rename !== void 0 ? { name: r.rename } : {},
|
|
1959
1959
|
...r.label !== void 0 ? { label: r.label } : {},
|
|
1960
1960
|
...r.presentation !== void 0 ? { presentation: r.presentation } : {},
|
|
@@ -1973,11 +1973,11 @@ async function fs(e, a, t, s) {
|
|
|
1973
1973
|
path: f
|
|
1974
1974
|
},
|
|
1975
1975
|
O,
|
|
1976
|
-
|
|
1976
|
+
Te
|
|
1977
1977
|
);
|
|
1978
1978
|
C.query = R.query, C.get = R.get;
|
|
1979
1979
|
} else if (r.get !== void 0) {
|
|
1980
|
-
const R =
|
|
1980
|
+
const R = Xn(u, r.get, O, Te, f);
|
|
1981
1981
|
C.query = R.query, C.get = R.get;
|
|
1982
1982
|
}
|
|
1983
1983
|
Object.keys(C).length || y({ code: "invalid_change", message: `variable.update on ${u.name} changes nothing.`, path: f, fix: "Send rename, label, query, get, presentation or emptyText." });
|
|
@@ -1988,7 +1988,7 @@ async function fs(e, a, t, s) {
|
|
|
1988
1988
|
case "variable.remove": {
|
|
1989
1989
|
const u = Je(v, r.name);
|
|
1990
1990
|
u || y(ls(v, r.name, `${f}.name`));
|
|
1991
|
-
const b = u, C =
|
|
1991
|
+
const b = u, C = Zn(v, b.id);
|
|
1992
1992
|
C.places.length && y({
|
|
1993
1993
|
code: "variable_in_use",
|
|
1994
1994
|
message: `${b.name} is shown in ${C.words}.`,
|
|
@@ -1999,7 +1999,7 @@ async function fs(e, a, t, s) {
|
|
|
1999
1999
|
break;
|
|
2000
2000
|
}
|
|
2001
2001
|
case "document.text.update": {
|
|
2002
|
-
const u = it(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: b, unchanged: C } =
|
|
2002
|
+
const u = it(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: b, unchanged: C } = ei(r, v, u, f, Te);
|
|
2003
2003
|
if (d.push({ ref: r.sheetId, kind: "sheet", id: u.id, title: u.title ?? "", changeIndex: m }), C) break;
|
|
2004
2004
|
$({ op: "document.text", sheetId: u.id, edit: b, changeIndex: m }, f);
|
|
2005
2005
|
break;
|
|
@@ -2030,18 +2030,18 @@ async function fs(e, a, t, s) {
|
|
|
2030
2030
|
for (const m of c) {
|
|
2031
2031
|
const r = ie(ae.dashboard, m);
|
|
2032
2032
|
if (!r) continue;
|
|
2033
|
-
const f = ((ea = i.find((O) => Pt(O) === m)) == null ? void 0 : ea.changeIndex) ?? 0, u = we(r.card, { sql: !0 }), b = ((ta =
|
|
2034
|
-
u.editable && ("sql" in u.query ? !!u.query.sql : "measures" in u.query ? u.query.measures.length > 0 : u.query.columns.length > 0) && ((aa =
|
|
2033
|
+
const f = ((ea = i.find((O) => Pt(O) === m)) == null ? void 0 : ea.changeIndex) ?? 0, u = we(r.card, { sql: !0 }), b = ((ta = Ee(r.card)) == null ? void 0 : ta.type) ?? $t(r.card.type);
|
|
2034
|
+
u.editable && ("sql" in u.query ? !!u.query.sql : "measures" in u.query ? u.query.measures.length > 0 : u.query.columns.length > 0) && ((aa = Fe[b]) == null ? void 0 : aa.forms.includes(tt(u.query))) || o.push({
|
|
2035
2035
|
code: "type_not_supported",
|
|
2036
2036
|
message: `As changed, "${r.card.title}" would have no query a ${b.replace(/_/g, " ")} can run.`,
|
|
2037
2037
|
path: `changes[${f}]`,
|
|
2038
|
-
fix: `Send a complete query with the type change: ${((sa =
|
|
2038
|
+
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"}.`
|
|
2039
2039
|
});
|
|
2040
2040
|
}
|
|
2041
|
-
if (o.push(...
|
|
2041
|
+
if (o.push(...ni(e, ae.dashboard, i, rt, I)), o.push(...ii(ae.dashboard, dt, t.calendar)), o.length) return { ok: !1, problems: o };
|
|
2042
2042
|
for (const m of i) {
|
|
2043
2043
|
if (m.op !== "filter.add" && !(m.op === "filter.update" && m.settings.scope)) continue;
|
|
2044
|
-
const r = m.op === "filter.add" ? m.input.id : m.filterId, f =
|
|
2044
|
+
const r = m.op === "filter.add" ? m.input.id : m.filterId, f = Pe(ae.dashboard, r, void 0, I);
|
|
2045
2045
|
if (!(f != null && f.editable)) continue;
|
|
2046
2046
|
const u = async (A) => {
|
|
2047
2047
|
const F = [];
|
|
@@ -2101,7 +2101,7 @@ async function fs(e, a, t, s) {
|
|
|
2101
2101
|
fix: "Add a timeWindow on that date, or a dashboard date filter that reaches the card."
|
|
2102
2102
|
});
|
|
2103
2103
|
}
|
|
2104
|
-
const Is =
|
|
2104
|
+
const Is = ai(ae.dashboard, i, ae.descriptions, I);
|
|
2105
2105
|
return {
|
|
2106
2106
|
ok: !0,
|
|
2107
2107
|
operations: i,
|
|
@@ -2115,7 +2115,7 @@ async function fs(e, a, t, s) {
|
|
|
2115
2115
|
warnings: n
|
|
2116
2116
|
};
|
|
2117
2117
|
}
|
|
2118
|
-
function
|
|
2118
|
+
function ai(e, a, t, s) {
|
|
2119
2119
|
const o = a.filter((l) => l.op === "card.add");
|
|
2120
2120
|
if (!o.length) return [...t];
|
|
2121
2121
|
const n = as(e, void 0, s);
|
|
@@ -2154,12 +2154,12 @@ function Pt(e) {
|
|
|
2154
2154
|
if (e.op === "card.update" || e.op === "card.remove") return e.cardId;
|
|
2155
2155
|
if (e.op === "card.add") return (a = e.frame.cards[0]) == null ? void 0 : a.id;
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function si(e) {
|
|
2158
2158
|
return Object.fromEntries(
|
|
2159
2159
|
ho.flatMap((a) => e[a] === void 0 ? [] : [[a, e[a]]])
|
|
2160
2160
|
);
|
|
2161
2161
|
}
|
|
2162
|
-
function
|
|
2162
|
+
function oi(e, a) {
|
|
2163
2163
|
if (!a.length || !e.config) return e;
|
|
2164
2164
|
const t = { ...e.config }, s = [];
|
|
2165
2165
|
if (t.matrix) {
|
|
@@ -2181,11 +2181,11 @@ function ni(e, a) {
|
|
|
2181
2181
|
const o = { metric: "metricColumns", group_by: "groupByColumns", detail: "detailColumns" };
|
|
2182
2182
|
for (const { key: n, label: i } of a) {
|
|
2183
2183
|
const d = [...t[o[n.role]] ?? []], l = Ka(n.role, d).findIndex((c) => He(c, n));
|
|
2184
|
-
l < 0 || (d[l] =
|
|
2184
|
+
l < 0 || (d[l] = fn(d[l], i), t[o[n.role]] = d, s.push(n));
|
|
2185
2185
|
}
|
|
2186
2186
|
return { ...e, config: t, statedLabels: s };
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function ni(e, a, t, s, o) {
|
|
2189
2189
|
var E;
|
|
2190
2190
|
const n = [], i = new Map(xe(a).map((_) => [_.cardId, _])), d = Ot(a), l = Ie(a), c = (_) => {
|
|
2191
2191
|
var S, y;
|
|
@@ -2257,7 +2257,7 @@ function ii(e, a, t, s, o) {
|
|
|
2257
2257
|
for (const _ of t)
|
|
2258
2258
|
(_.op === "filter.bind" || _.op === "filter.exclude") && v.set(`${_.filterId}|${_.cardId}`, _);
|
|
2259
2259
|
for (const _ of v.values()) {
|
|
2260
|
-
const S =
|
|
2260
|
+
const S = Pe(a, _.filterId, void 0, o), y = i.get(_.cardId);
|
|
2261
2261
|
if (!S || !y) continue;
|
|
2262
2262
|
const D = S.reaches.includes(_.cardId);
|
|
2263
2263
|
if (_.op === "filter.bind" ? D : !D) continue;
|
|
@@ -2272,13 +2272,13 @@ function ii(e, a, t, s, o) {
|
|
|
2272
2272
|
});
|
|
2273
2273
|
}
|
|
2274
2274
|
for (const [_, S] of s) {
|
|
2275
|
-
const y =
|
|
2275
|
+
const y = Pe(a, _, void 0, o);
|
|
2276
2276
|
if (!y) continue;
|
|
2277
2277
|
const D = y.editable && ((E = y.exceptSheetIds) == null ? void 0 : E.some((g) => {
|
|
2278
2278
|
var k;
|
|
2279
2279
|
return ((k = d.get(g)) == null ? void 0 : k.sheetKind) === "dashboard";
|
|
2280
2280
|
})), $ = y.editable && !D ? y.sheetIds : void 0, N = S.sheetIds === "all" ? "all" : [...S.sheetIds].sort();
|
|
2281
|
-
|
|
2281
|
+
Ne($ === "all" || !$ ? $ : [...$].sort(), N) || n.push({
|
|
2282
2282
|
code: "filter_not_editable",
|
|
2283
2283
|
message: `"${y.label}" wouldn't show on the sheets asked for. Change where it shows in the editor.`,
|
|
2284
2284
|
path: `changes[${S.changeIndex}].sheetIds`,
|
|
@@ -2305,7 +2305,7 @@ function ii(e, a, t, s, o) {
|
|
|
2305
2305
|
}
|
|
2306
2306
|
return n;
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2308
|
+
function ii(e, a, t) {
|
|
2309
2309
|
const s = [], o = Ie(e);
|
|
2310
2310
|
for (const [n, i] of a) {
|
|
2311
2311
|
const d = o.findFilterInput({ inputId: n });
|
|
@@ -2319,7 +2319,7 @@ function ri(e, a, t) {
|
|
|
2319
2319
|
});
|
|
2320
2320
|
if (i.period) {
|
|
2321
2321
|
const I = Ja(l && "relativeMeta" in l ? l.relativeMeta : void 0);
|
|
2322
|
-
(!I ||
|
|
2322
|
+
(!I || tn(i.period) || !an(I, i.period)) && p(
|
|
2323
2323
|
`"${d.input.label}" wouldn't load with that default${h ? `: ${h}` : ""}.`,
|
|
2324
2324
|
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."
|
|
2325
2325
|
);
|
|
@@ -2346,16 +2346,16 @@ function ka(e) {
|
|
|
2346
2346
|
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) => co(o.dataType || "") === "date");
|
|
2347
2347
|
return { comparisonDate: a ? { name: a.name, label: a.label || a.name } : null, dateWindow: "unknown" };
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function ri(e, a) {
|
|
2350
2350
|
if ("sql" in a) return [];
|
|
2351
2351
|
const t = e, s = (...n) => new Set(n.flatMap((i) => Array.isArray(i) ? i : i ? [i] : []).map((i) => be(i, a.datasetName))), o = {
|
|
2352
2352
|
metric: s(t.measures),
|
|
2353
2353
|
group_by: s(t.dimensions, t.dateField),
|
|
2354
2354
|
detail: s(t.columns)
|
|
2355
2355
|
};
|
|
2356
|
-
return
|
|
2356
|
+
return qe(a).filter((n) => o[n.key.role].has(n.key.field));
|
|
2357
2357
|
}
|
|
2358
|
-
function
|
|
2358
|
+
function di(e, a, t, s) {
|
|
2359
2359
|
const o = Object.fromEntries(Object.entries(a).filter(([, p]) => p != null)), n = tt(o), i = tt(e), d = (p) => Sa[p].safeParse(o);
|
|
2360
2360
|
if (!e || n && n !== i) {
|
|
2361
2361
|
const p = n ?? i, I = p ? d(p) : void 0;
|
|
@@ -2391,10 +2391,10 @@ function Ta(e) {
|
|
|
2391
2391
|
return e ? { kind: "sheets", sheetIds: e } : { kind: "allSheets", sheetKinds: ["dashboard"] };
|
|
2392
2392
|
}
|
|
2393
2393
|
function Ra(e, a, t, s) {
|
|
2394
|
-
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:
|
|
2394
|
+
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: li(a) }, t, s);
|
|
2395
2395
|
}
|
|
2396
2396
|
function hs(e, a, t, s) {
|
|
2397
|
-
const o =
|
|
2397
|
+
const o = sn(e, a);
|
|
2398
2398
|
return o.ok ? o.window : s({
|
|
2399
2399
|
code: "invalid_change",
|
|
2400
2400
|
message: o.refusal.message,
|
|
@@ -2402,14 +2402,14 @@ function hs(e, a, t, s) {
|
|
|
2402
2402
|
path: o.refusal.path ? `${t}.${o.refusal.path}` : t
|
|
2403
2403
|
});
|
|
2404
2404
|
}
|
|
2405
|
-
function
|
|
2405
|
+
function li(e) {
|
|
2406
2406
|
return qa({ dataType: e.dataType }) === "datetime";
|
|
2407
2407
|
}
|
|
2408
|
-
function
|
|
2408
|
+
function ci(e) {
|
|
2409
2409
|
var a, t, s;
|
|
2410
2410
|
return (s = (t = (a = e == null ? void 0 : e.filters) == null ? void 0 : a.conditions) == null ? void 0 : t.find((o) => o.relativeMeta)) == null ? void 0 : s.field;
|
|
2411
2411
|
}
|
|
2412
|
-
async function
|
|
2412
|
+
async function ui(e, a, t, s, o, n) {
|
|
2413
2413
|
const i = no(e), d = i.kind === "config" ? i.executableSources : i.kind === "sql" ? i.pinnedCatalogSources.map((w) => w.source) : [], l = he(e), c = typeof a == "string" ? (l == null ? void 0 : l.kind) === "semantic" ? l.datasetName : void 0 : a.datasetName, h = d.find((w) => w.kind === "semantic" && Tt(w.datasetName) === Tt(c));
|
|
2414
2414
|
if ((!h || h.kind !== "semantic") && n)
|
|
2415
2415
|
return o({
|
|
@@ -2425,7 +2425,7 @@ async function fi(e, a, t, s, o, n) {
|
|
|
2425
2425
|
path: s,
|
|
2426
2426
|
fix: "Name a field of the card's own dataset, or { name, datasetName } for a dataset its query joins."
|
|
2427
2427
|
});
|
|
2428
|
-
const p = await t.loadCardSource({ domainId: h.domainId, datasetName: h.datasetName }), I = typeof a == "string" ? a : a.name, v = p ? ot(p.fields, I, h.datasetName) : void 0, x = v ?
|
|
2428
|
+
const p = await t.loadCardSource({ domainId: h.domainId, datasetName: h.datasetName }), I = typeof a == "string" ? a : a.name, v = p ? ot(p.fields, I, h.datasetName) : void 0, x = v ? Yo(h, { column_name: v.name, data_type: v.dataType, ...v.sourceField ? { sourceField: v.sourceField } : {} }) : void 0;
|
|
2429
2429
|
return x || o({
|
|
2430
2430
|
code: "field_not_found",
|
|
2431
2431
|
message: `"${I}" isn't a field of ${h.datasetName}.`,
|
|
@@ -2434,12 +2434,12 @@ async function fi(e, a, t, s, o, n) {
|
|
|
2434
2434
|
details: { available: ((p == null ? void 0 : p.fields) ?? []).slice(0, 20).map((w) => w.name) }
|
|
2435
2435
|
});
|
|
2436
2436
|
}
|
|
2437
|
-
const
|
|
2437
|
+
const fi = {
|
|
2438
2438
|
max: ba,
|
|
2439
2439
|
what: "A proposal that creates a dashboard",
|
|
2440
2440
|
fix: `Create with the first ${ba}, then change the new dashboard in a second proposal.`
|
|
2441
2441
|
};
|
|
2442
|
-
async function
|
|
2442
|
+
async function Dr(e, a) {
|
|
2443
2443
|
const t = (d) => d && typeof d == "object" ? d.op : void 0, s = e.changes.flatMap(
|
|
2444
2444
|
(d, l) => t(d) === "dashboard.update" ? [
|
|
2445
2445
|
{
|
|
@@ -2451,12 +2451,12 @@ async function Or(e, a) {
|
|
|
2451
2451
|
] : []
|
|
2452
2452
|
);
|
|
2453
2453
|
if (s.length) return { ok: !1, problems: s };
|
|
2454
|
-
const o =
|
|
2454
|
+
const o = hi(e, a), n = await fs(o, e.changes, a, { limit: fi });
|
|
2455
2455
|
if (!n.ok) return n;
|
|
2456
|
-
const i =
|
|
2457
|
-
return { ...i, seed: o, sentence:
|
|
2456
|
+
const i = mi(n, e.changes);
|
|
2457
|
+
return { ...i, seed: o, sentence: pi(i.dashboard) };
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2459
|
+
function mi(e, a) {
|
|
2460
2460
|
if (a.some((n) => {
|
|
2461
2461
|
if (!n || typeof n != "object") return !1;
|
|
2462
2462
|
const { op: i } = n;
|
|
@@ -2473,7 +2473,7 @@ function hi(e, a) {
|
|
|
2473
2473
|
descriptions: [...e.descriptions, ...o.descriptions]
|
|
2474
2474
|
};
|
|
2475
2475
|
}
|
|
2476
|
-
function
|
|
2476
|
+
function hi(e, a) {
|
|
2477
2477
|
const t = e.changes.some((s) => s && typeof s == "object" && s.op === "sheet.add");
|
|
2478
2478
|
return {
|
|
2479
2479
|
id: e.dashboardId,
|
|
@@ -2485,19 +2485,19 @@ function pi(e, a) {
|
|
|
2485
2485
|
};
|
|
2486
2486
|
}
|
|
2487
2487
|
const vt = (e, a) => `${e} ${a}${e === 1 ? "" : "s"}`;
|
|
2488
|
-
function
|
|
2488
|
+
function pi(e) {
|
|
2489
2489
|
const a = e.sheets ?? [], t = a.reduce((n, i) => n + (i.frames ?? []).reduce((d, l) => {
|
|
2490
2490
|
var c;
|
|
2491
2491
|
return d + (((c = l.cards) == null ? void 0 : c.length) ?? 0);
|
|
2492
2492
|
}, 0), 0), s = (e.inputs ?? []).filter((n) => n.kind === "filter").length, o = [vt(a.length, "sheet"), vt(t, "card"), ...s ? [vt(s, "filter")] : []];
|
|
2493
2493
|
return `Creates a private dashboard ${Va(e.title)} with ${et(o)}.`;
|
|
2494
2494
|
}
|
|
2495
|
-
const
|
|
2496
|
-
function
|
|
2495
|
+
const gi = 50;
|
|
2496
|
+
function Or(e, a) {
|
|
2497
2497
|
var $, N;
|
|
2498
2498
|
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, o = (e.sheets ?? []).filter((g) => !t || t.has(g.id)), n = xe(e).filter(
|
|
2499
2499
|
(g) => (!t || t.has(g.sheetId)) && (!s || s.has(g.cardId))
|
|
2500
|
-
), i = n.length > (a.maxQueryCards ??
|
|
2500
|
+
), i = n.length > (a.maxQueryCards ?? gi), d = new Map(
|
|
2501
2501
|
(e.sheets ?? []).flatMap((g) => (g.frames ?? []).map((k) => [k.id, k]))
|
|
2502
2502
|
), l = /* @__PURE__ */ new Map(), c = (g) => {
|
|
2503
2503
|
(g == null ? void 0 : g.kind) === "semantic" && l.set(`${g.domainId}|${g.datasetName}`, { domainId: g.domainId, datasetName: g.datasetName });
|
|
@@ -2511,7 +2511,7 @@ function Er(e, a) {
|
|
|
2511
2511
|
sheetId: g.id,
|
|
2512
2512
|
title: g.title ?? "",
|
|
2513
2513
|
kind: g.kind === "document" ? "document" : "dashboard",
|
|
2514
|
-
...g.kind === "document" ?
|
|
2514
|
+
...g.kind === "document" ? yi(g, I(g.id)) : { layout: _i(g) },
|
|
2515
2515
|
cards: n.filter((k) => k.sheetId === g.id).map((k) => {
|
|
2516
2516
|
var oe;
|
|
2517
2517
|
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 ?? "" };
|
|
@@ -2564,7 +2564,7 @@ function Er(e, a) {
|
|
|
2564
2564
|
});
|
|
2565
2565
|
for (const g of E)
|
|
2566
2566
|
g.editable && l.set(`${g.domainId}|${g.datasetName}`, { domainId: g.domainId, datasetName: g.datasetName });
|
|
2567
|
-
const _ =
|
|
2567
|
+
const _ = vi(e, a, new Map([...h, ...v]));
|
|
2568
2568
|
for (const g of e.variables ?? []) {
|
|
2569
2569
|
const k = kt(g);
|
|
2570
2570
|
(k == null ? void 0 : k.kind) === "semantic" && l.set(`${k.domainId}|${k.datasetName}`, { domainId: k.domainId, datasetName: k.datasetName });
|
|
@@ -2597,20 +2597,20 @@ function Er(e, a) {
|
|
|
2597
2597
|
sheets: w,
|
|
2598
2598
|
filters: E,
|
|
2599
2599
|
variables: _,
|
|
2600
|
-
style:
|
|
2600
|
+
style: bi(e, a),
|
|
2601
2601
|
editorOnly: D,
|
|
2602
2602
|
...i ? { truncated: !0 } : {}
|
|
2603
2603
|
};
|
|
2604
2604
|
}
|
|
2605
|
-
function
|
|
2605
|
+
function bi(e, a) {
|
|
2606
2606
|
const { style: t, organizationAppearance: s } = za(e, a.organizationAppearance);
|
|
2607
|
-
return { set:
|
|
2607
|
+
return { set: Tn(t), shows: dn({ organizationAppearance: s, dashboardStyle: t }, "light").shows };
|
|
2608
2608
|
}
|
|
2609
2609
|
function Aa(e, a) {
|
|
2610
2610
|
const t = $o(a);
|
|
2611
2611
|
return t ? { ...e, style: t } : e;
|
|
2612
2612
|
}
|
|
2613
|
-
function
|
|
2613
|
+
function yi(e, a) {
|
|
2614
2614
|
const t = e.document;
|
|
2615
2615
|
if (!t) return {};
|
|
2616
2616
|
const s = (o) => {
|
|
@@ -2627,7 +2627,7 @@ function vi(e, a) {
|
|
|
2627
2627
|
)
|
|
2628
2628
|
};
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function vi(e, a, t) {
|
|
2631
2631
|
const s = Qa(e), o = (c) => s.filter(({ ref: h }) => c(h)).map(({ place: h, where: p }) => ({
|
|
2632
2632
|
sheetId: h.sheetId,
|
|
2633
2633
|
where: p.kind,
|
|
@@ -2648,7 +2648,7 @@ function Ii(e, a, t) {
|
|
|
2648
2648
|
})), d = [...n.values()].filter((c) => c.kind === "report").map((c) => ({
|
|
2649
2649
|
name: c.name,
|
|
2650
2650
|
kind: "report",
|
|
2651
|
-
words:
|
|
2651
|
+
words: Ii[c.reportKey],
|
|
2652
2652
|
parts: [],
|
|
2653
2653
|
usedIn: o((h) => h.source === "documentMeta" && h.key === c.reportKey),
|
|
2654
2654
|
editable: !1
|
|
@@ -2657,7 +2657,7 @@ function Ii(e, a, t) {
|
|
|
2657
2657
|
return {
|
|
2658
2658
|
name: c.name,
|
|
2659
2659
|
kind: "data",
|
|
2660
|
-
words:
|
|
2660
|
+
words: Jo(c),
|
|
2661
2661
|
parts: Lo(c),
|
|
2662
2662
|
...I ? { presentation: I } : {},
|
|
2663
2663
|
usedIn: o((v) => v.source === "data" && v.variableId === c.id),
|
|
@@ -2668,18 +2668,18 @@ function Ii(e, a, t) {
|
|
|
2668
2668
|
});
|
|
2669
2669
|
return [...i, ...d, ...l];
|
|
2670
2670
|
}
|
|
2671
|
-
const
|
|
2671
|
+
const Ii = {
|
|
2672
2672
|
generatedAt: "When the report was generated",
|
|
2673
2673
|
pageNumber: "The page number (Documents)",
|
|
2674
2674
|
pageCount: "The page count (Documents)"
|
|
2675
2675
|
};
|
|
2676
2676
|
function Ge(e) {
|
|
2677
|
-
const a =
|
|
2677
|
+
const a = Ee(e);
|
|
2678
2678
|
return a ? { type: a.type, ...a.properties } : { type: $t(e.type) };
|
|
2679
2679
|
}
|
|
2680
|
-
function
|
|
2680
|
+
function _i(e) {
|
|
2681
2681
|
const a = new Map((e.frames ?? []).map((t) => [t.id, t]));
|
|
2682
|
-
return
|
|
2682
|
+
return mn(e).rows.map((t) => ({
|
|
2683
2683
|
tiles: t.tiles.map((s) => {
|
|
2684
2684
|
const o = a.get(s.frameId);
|
|
2685
2685
|
return { cardIds: o ? Ba(o) : [], width: s.width };
|
|
@@ -2692,13 +2692,13 @@ function Z(e) {
|
|
|
2692
2692
|
function ue(e, a) {
|
|
2693
2693
|
return Z(e) && Object.prototype.hasOwnProperty.call(e, a) && e[a] !== void 0;
|
|
2694
2694
|
}
|
|
2695
|
-
const re = ue,
|
|
2696
|
-
function
|
|
2697
|
-
return
|
|
2695
|
+
const re = ue, Ci = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], $i = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], wi = '`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";
|
|
2696
|
+
function xi(e) {
|
|
2697
|
+
return Le(String(e.type)) ?? Et;
|
|
2698
2698
|
}
|
|
2699
|
-
function
|
|
2699
|
+
function Oe(e, a, t) {
|
|
2700
2700
|
if (t === void 0) return;
|
|
2701
|
-
const s = Z(t) ?
|
|
2701
|
+
const s = Z(t) ? xi(t).safeParse(t) : Et.safeParse(t);
|
|
2702
2702
|
if (!s.success)
|
|
2703
2703
|
for (const o of s.error.issues) {
|
|
2704
2704
|
const n = o.code === "unrecognized_keys" ? o.keys : [o.path.length ? String(o.path[o.path.length - 1]) : "type"];
|
|
@@ -2714,19 +2714,19 @@ function It(e, a, t) {
|
|
|
2714
2714
|
if (Z(t)) {
|
|
2715
2715
|
for (const s of ["dateFormat", "customFormat"])
|
|
2716
2716
|
re(t, s) && e.push({ path: `${a}.${s}`, field: s, replacement: "`format` on this column (a temporal bucket or date format)" });
|
|
2717
|
-
|
|
2717
|
+
Oe(e, `${a}.format`, t.format);
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
2720
|
function ps(e, a) {
|
|
2721
2721
|
const t = [], s = e.config;
|
|
2722
|
-
for (const x of
|
|
2722
|
+
for (const x of Ci) {
|
|
2723
2723
|
const w = s == null ? void 0 : s[x];
|
|
2724
2724
|
Array.isArray(w) && w.forEach((E, _) => It(t, `${a}.config.${x}[${_}]`, E));
|
|
2725
2725
|
}
|
|
2726
2726
|
const o = Z(s == null ? void 0 : s.matrix) ? s.matrix : void 0, n = Z(o == null ? void 0 : o.presentation) ? o.presentation : void 0;
|
|
2727
2727
|
for (const x of ["measureFormats", "levelFormats"]) {
|
|
2728
2728
|
const w = n == null ? void 0 : n[x];
|
|
2729
|
-
if (Z(w)) for (const [E, _] of Object.entries(w))
|
|
2729
|
+
if (Z(w)) for (const [E, _] of Object.entries(w)) Oe(t, `${a}.config.matrix.presentation.${x}.${E}`, _);
|
|
2730
2730
|
}
|
|
2731
2731
|
re(n, "conditionalFormatting") && t.push({ path: `${a}.config.matrix.presentation.conditionalFormatting`, field: "conditionalFormatting", replacement: Qe });
|
|
2732
2732
|
const i = e.interactionConfig, d = i == null ? void 0 : i.drillHierarchies;
|
|
@@ -2755,24 +2755,24 @@ function ps(e, a) {
|
|
|
2755
2755
|
if (!Z(w)) continue;
|
|
2756
2756
|
const E = `${c}.tablePrefs.columnSettingsMap.${x}`;
|
|
2757
2757
|
for (const _ of ["numberFormat", "dateFormat", "inheritMetricFormat"])
|
|
2758
|
-
re(w, _) && t.push({ path: `${E}.${_}`, field: _, replacement: _ === "inheritMetricFormat" ? "nothing: a column follows its `format`" :
|
|
2758
|
+
re(w, _) && t.push({ path: `${E}.${_}`, field: _, replacement: _ === "inheritMetricFormat" ? "nothing: a column follows its `format`" : wi });
|
|
2759
2759
|
re(w, "colorRanges") && t.push({ path: `${E}.colorRanges`, field: "colorRanges", replacement: Qe });
|
|
2760
2760
|
}
|
|
2761
|
-
for (const x of
|
|
2761
|
+
for (const x of $i) {
|
|
2762
2762
|
const w = l[x];
|
|
2763
2763
|
if (Z(w)) {
|
|
2764
2764
|
for (const E of ["formatMode", "mode", "formatOptions"])
|
|
2765
2765
|
re(w, E) && t.push({ path: `${c}.${x}.${E}`, field: E, replacement: `\`preferences.${x}.valueFormat\` (absent means the column's format)` });
|
|
2766
|
-
x === "dataLabelsConfig" && re(w, "format") && t.push({ path: `${c}.${x}.format`, field: "format", replacement: "`preferences.dataLabelsConfig.valueFormat`" }),
|
|
2766
|
+
x === "dataLabelsConfig" && re(w, "format") && t.push({ path: `${c}.${x}.format`, field: "format", replacement: "`preferences.dataLabelsConfig.valueFormat`" }), Oe(t, `${c}.${x}.valueFormat`, w.valueFormat);
|
|
2767
2767
|
}
|
|
2768
2768
|
}
|
|
2769
2769
|
const v = l.sqlColumns;
|
|
2770
2770
|
if (Z(v))
|
|
2771
2771
|
for (const [x, w] of Object.entries(v))
|
|
2772
|
-
Z(w) &&
|
|
2773
|
-
return Z(l.sqlKpiValue) &&
|
|
2772
|
+
Z(w) && Oe(t, `${c}.sqlColumns.${x}.format`, w.format);
|
|
2773
|
+
return Z(l.sqlKpiValue) && Oe(t, `${c}.sqlKpiValue.format`, l.sqlKpiValue.format), t;
|
|
2774
2774
|
}
|
|
2775
|
-
function
|
|
2775
|
+
function Si(e) {
|
|
2776
2776
|
const a = `sheets[id=${e.sheetId}]`;
|
|
2777
2777
|
switch (e.kind) {
|
|
2778
2778
|
case "sheetCard":
|
|
@@ -2788,15 +2788,15 @@ function gs(e) {
|
|
|
2788
2788
|
if (Array.isArray(e.sheets))
|
|
2789
2789
|
return xe(e).map((t) => ({
|
|
2790
2790
|
card: t.card,
|
|
2791
|
-
at:
|
|
2791
|
+
at: Si(t)
|
|
2792
2792
|
}));
|
|
2793
2793
|
const a = e;
|
|
2794
2794
|
return Array.isArray(a.cards) ? a.cards.map((t) => ({ card: t, at: `cards[id=${t.id}]` })) : [];
|
|
2795
2795
|
}
|
|
2796
|
-
function
|
|
2796
|
+
function Er(e) {
|
|
2797
2797
|
return gs(e).flatMap(({ card: a, at: t }) => ps(a, t));
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2799
|
+
function ki(e, a) {
|
|
2800
2800
|
var n;
|
|
2801
2801
|
const t = (n = e.preferences) == null ? void 0 : n.conditionalFormatting;
|
|
2802
2802
|
if (t === void 0) return [];
|
|
@@ -2811,14 +2811,14 @@ function Ti(e, a) {
|
|
|
2811
2811
|
message: i.message
|
|
2812
2812
|
}));
|
|
2813
2813
|
}
|
|
2814
|
-
function
|
|
2814
|
+
function qr(e) {
|
|
2815
2815
|
return gs(e).flatMap(({ card: a, at: t }) => [
|
|
2816
2816
|
...ps(a, t).map((s) => ({
|
|
2817
2817
|
code: "retired_presentation_field",
|
|
2818
2818
|
path: s.path,
|
|
2819
2819
|
message: `\`${s.field}\` is retired: use ${s.replacement}.`
|
|
2820
2820
|
})),
|
|
2821
|
-
...
|
|
2821
|
+
...ki(a, t)
|
|
2822
2822
|
]);
|
|
2823
2823
|
}
|
|
2824
2824
|
const Lt = [
|
|
@@ -2827,7 +2827,7 @@ const Lt = [
|
|
|
2827
2827
|
"detailColumns",
|
|
2828
2828
|
"pivotByColumns",
|
|
2829
2829
|
"sortByColumns"
|
|
2830
|
-
],
|
|
2830
|
+
], Ti = [
|
|
2831
2831
|
"xAxisConfig",
|
|
2832
2832
|
"yAxisConfig",
|
|
2833
2833
|
"secondaryYAxisConfig",
|
|
@@ -2847,14 +2847,14 @@ function _e(e, a) {
|
|
|
2847
2847
|
return bs(t(e), t(a));
|
|
2848
2848
|
}
|
|
2849
2849
|
function at(e) {
|
|
2850
|
-
const a =
|
|
2850
|
+
const a = on(e);
|
|
2851
2851
|
return a === "date" || a === "datetime";
|
|
2852
2852
|
}
|
|
2853
2853
|
function ys(e) {
|
|
2854
2854
|
var a, t;
|
|
2855
2855
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
2856
2856
|
}
|
|
2857
|
-
function
|
|
2857
|
+
function Ri(e) {
|
|
2858
2858
|
return e.type === "kpi" && Oo(e);
|
|
2859
2859
|
}
|
|
2860
2860
|
function Rt(e) {
|
|
@@ -2865,13 +2865,13 @@ function ee(e, a) {
|
|
|
2865
2865
|
const t = (s = e.config) == null ? void 0 : s[a];
|
|
2866
2866
|
return Array.isArray(t) ? t : [];
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2868
|
+
function Ai(e, a) {
|
|
2869
2869
|
for (const t of Lt) {
|
|
2870
2870
|
const s = ee(e, t).indexOf(a);
|
|
2871
2871
|
if (s >= 0) return `config.${t}[${s}]`;
|
|
2872
2872
|
}
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function ke(e, a) {
|
|
2875
2875
|
let t = !1;
|
|
2876
2876
|
for (const s of a)
|
|
2877
2877
|
Object.prototype.hasOwnProperty.call(e, s) && (delete e[s], t = !0);
|
|
@@ -2881,14 +2881,12 @@ function st(e, a, t, s) {
|
|
|
2881
2881
|
a.format = t, a.formatOrigin = "override", e.changes.push({
|
|
2882
2882
|
path: s,
|
|
2883
2883
|
action: "moved",
|
|
2884
|
-
to: `${
|
|
2884
|
+
to: `${Ai(e.card, a) ?? "config"}.format`
|
|
2885
2885
|
});
|
|
2886
2886
|
}
|
|
2887
2887
|
function Mt(e) {
|
|
2888
|
-
if (
|
|
2889
|
-
|
|
2890
|
-
const a = Se(e);
|
|
2891
|
-
return (a == null ? void 0 : a.type) === "currency" && a.currency === void 0 && jo(e) ? { ...a, currency: "USD" } : a;
|
|
2888
|
+
if (J(e))
|
|
2889
|
+
return Me(e);
|
|
2892
2890
|
}
|
|
2893
2891
|
function At(e, a, t) {
|
|
2894
2892
|
if (!(!ue(a, "dateFormat") && !ue(a, "customFormat"))) {
|
|
@@ -2906,10 +2904,10 @@ function At(e, a, t) {
|
|
|
2906
2904
|
to: `${t}.format`
|
|
2907
2905
|
}));
|
|
2908
2906
|
}
|
|
2909
|
-
|
|
2907
|
+
ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2910
2908
|
}
|
|
2911
2909
|
}
|
|
2912
|
-
function
|
|
2910
|
+
function Fi(e, a, t) {
|
|
2913
2911
|
if (!ue(a, "dateFormat") && !ue(a, "customFormat")) return;
|
|
2914
2912
|
const s = a.dateFormat === "custom" ? a.customFormat : a.dateFormat;
|
|
2915
2913
|
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({
|
|
@@ -2920,28 +2918,28 @@ function Di(e, a, t) {
|
|
|
2920
2918
|
path: `${t}.dateFormat`,
|
|
2921
2919
|
reason: "detail_date_beside_format",
|
|
2922
2920
|
detail: "A detail date pattern on a column that has a format of its own."
|
|
2923
|
-
}),
|
|
2921
|
+
}), ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2924
2922
|
}
|
|
2925
|
-
function
|
|
2923
|
+
function Di(e, a, t, s) {
|
|
2926
2924
|
if (a.format !== void 0) {
|
|
2927
2925
|
const o = Mt(a.format);
|
|
2928
2926
|
o ? _e(o, a.format) || (a.format = o, e.changes.push({ path: `${s}.format`, action: "cleaned" })) : (delete a.format, e.changes.push({ path: `${s}.format`, action: "removed" }));
|
|
2929
2927
|
}
|
|
2930
|
-
t === "groupByColumns" || t === "pivotByColumns" ? At(e, a, s) : t === "detailColumns" ?
|
|
2928
|
+
t === "groupByColumns" || t === "pivotByColumns" ? At(e, a, s) : t === "detailColumns" ? Fi(e, a, s) : ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
|
|
2931
2929
|
}
|
|
2932
|
-
function
|
|
2930
|
+
function Oi(e, a) {
|
|
2933
2931
|
for (const t of Lt)
|
|
2934
2932
|
ee(e.card, t).forEach((s, o) => {
|
|
2935
2933
|
var i;
|
|
2936
2934
|
if (!s.format || s.formatOrigin) return;
|
|
2937
2935
|
const n = (i = a.modelFormatFor) == null ? void 0 : i.call(a, s);
|
|
2938
|
-
s.formatOrigin = n && _e(
|
|
2936
|
+
s.formatOrigin = n && _e(Me(n), s.format) ? "semantic" : "override", e.changes.push({
|
|
2939
2937
|
path: `config.${t}[${o}].formatOrigin`,
|
|
2940
2938
|
action: "marked"
|
|
2941
2939
|
});
|
|
2942
2940
|
});
|
|
2943
2941
|
}
|
|
2944
|
-
function
|
|
2942
|
+
function Ei(e) {
|
|
2945
2943
|
var t;
|
|
2946
2944
|
const a = (t = e.card.interactionConfig) == null ? void 0 : t.drillHierarchies;
|
|
2947
2945
|
Array.isArray(a) && a.forEach((s, o) => {
|
|
@@ -2959,13 +2957,13 @@ function qi(e) {
|
|
|
2959
2957
|
});
|
|
2960
2958
|
});
|
|
2961
2959
|
}
|
|
2962
|
-
const
|
|
2960
|
+
const qi = [
|
|
2963
2961
|
"numberFormat",
|
|
2964
2962
|
"dateFormat",
|
|
2965
2963
|
"inheritMetricFormat",
|
|
2966
2964
|
"colorRanges"
|
|
2967
2965
|
];
|
|
2968
|
-
function
|
|
2966
|
+
function Ni(e, a) {
|
|
2969
2967
|
const t = (o) => o == null ? void 0 : o.trim().toLowerCase(), s = t(a);
|
|
2970
2968
|
return [
|
|
2971
2969
|
e.id,
|
|
@@ -2973,7 +2971,7 @@ function Pi(e, a) {
|
|
|
2973
2971
|
e.name,
|
|
2974
2972
|
e.qualifiedFieldName,
|
|
2975
2973
|
e.label,
|
|
2976
|
-
e.role === "metric" ?
|
|
2974
|
+
e.role === "metric" ? Wo(e) : void 0
|
|
2977
2975
|
].some((o) => o !== void 0 && t(o) === s);
|
|
2978
2976
|
}
|
|
2979
2977
|
function Fa(e, a) {
|
|
@@ -2983,22 +2981,22 @@ function Fa(e, a) {
|
|
|
2983
2981
|
...ee(e, "detailColumns"),
|
|
2984
2982
|
...ee(e, "metricColumns"),
|
|
2985
2983
|
...ee(e, "groupByColumns")
|
|
2986
|
-
].filter((o) =>
|
|
2984
|
+
].filter((o) => Ni(o, a));
|
|
2987
2985
|
return s.length === 1 ? s[0] : void 0;
|
|
2988
2986
|
}
|
|
2989
|
-
function
|
|
2987
|
+
function Pi(e) {
|
|
2990
2988
|
return e.type === "number" && J(e.numberFormat) && e.inheritMetricFormat !== !0;
|
|
2991
2989
|
}
|
|
2992
|
-
function
|
|
2990
|
+
function Li(e, a) {
|
|
2993
2991
|
var t;
|
|
2994
|
-
return at(a.dataType) ? ee(e, "detailColumns").includes(a) ? e.type === "detailTable" :
|
|
2992
|
+
return at(a.dataType) ? ee(e, "detailColumns").includes(a) ? e.type === "detailTable" : un(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
|
|
2995
2993
|
}
|
|
2996
2994
|
function Da(e, a, t, s) {
|
|
2997
2995
|
var i;
|
|
2998
2996
|
const o = (i = e.card).preferences ?? (i.preferences = {}), n = o.sqlColumns ?? (o.sqlColumns = {});
|
|
2999
2997
|
n[a] = { ...n[a], format: t }, e.changes.push({ path: s, action: "moved", to: `preferences.sqlColumns[${JSON.stringify(a)}].format` });
|
|
3000
2998
|
}
|
|
3001
|
-
function
|
|
2999
|
+
function Mi(e) {
|
|
3002
3000
|
const [a, ...t] = e;
|
|
3003
3001
|
if (!a) return;
|
|
3004
3002
|
const s = Object.fromEntries(
|
|
@@ -3006,7 +3004,7 @@ function Bi(e) {
|
|
|
3006
3004
|
);
|
|
3007
3005
|
return Et.safeParse(s).success ? s : void 0;
|
|
3008
3006
|
}
|
|
3009
|
-
function
|
|
3007
|
+
function Bi(e, a) {
|
|
3010
3008
|
const t = e.card, s = Mo({
|
|
3011
3009
|
groupByColumns: ee(t, "groupByColumns"),
|
|
3012
3010
|
metricColumns: ee(t, "metricColumns"),
|
|
@@ -3024,10 +3022,10 @@ function Vi(e, a) {
|
|
|
3024
3022
|
});
|
|
3025
3023
|
}
|
|
3026
3024
|
}
|
|
3027
|
-
function
|
|
3025
|
+
function Vi(e, a) {
|
|
3028
3026
|
var n;
|
|
3029
3027
|
if (!a.length) return;
|
|
3030
|
-
const t = ee(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ?
|
|
3028
|
+
const t = ee(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ? Mi(a.map((i) => i.format)) : void 0;
|
|
3031
3029
|
s && o && st(e, s, o, a[0].from);
|
|
3032
3030
|
for (const i of a)
|
|
3033
3031
|
if (!(s != null && s.format && _e(i.format, s.format))) {
|
|
@@ -3052,7 +3050,7 @@ function ji(e, a) {
|
|
|
3052
3050
|
);
|
|
3053
3051
|
}
|
|
3054
3052
|
}
|
|
3055
|
-
function
|
|
3053
|
+
function ji(e) {
|
|
3056
3054
|
var l;
|
|
3057
3055
|
const a = (l = e.card.preferences) == null ? void 0 : l.tablePrefs, t = a == null ? void 0 : a.columnSettingsMap;
|
|
3058
3056
|
if (!J(t)) return;
|
|
@@ -3060,7 +3058,7 @@ function Ki(e) {
|
|
|
3060
3058
|
for (const [c, h] of Object.entries(t)) {
|
|
3061
3059
|
if (!J(h)) continue;
|
|
3062
3060
|
const p = h, I = `preferences.tablePrefs.columnSettingsMap[${JSON.stringify(c)}]`;
|
|
3063
|
-
if (
|
|
3061
|
+
if (Pi(p)) {
|
|
3064
3062
|
const v = So(p.numberFormat);
|
|
3065
3063
|
if (v && o)
|
|
3066
3064
|
Da(e, c, v, `${I}.numberFormat`);
|
|
@@ -3085,36 +3083,36 @@ function Ki(e) {
|
|
|
3085
3083
|
Da(e, c, ko(p.dateFormat), `${I}.dateFormat`);
|
|
3086
3084
|
else if (v && Rt(s)) {
|
|
3087
3085
|
const x = Fa(s, c);
|
|
3088
|
-
(!x || !
|
|
3086
|
+
(!x || !Li(s, x)) && e.unconverted.push({
|
|
3089
3087
|
path: `${I}.dateFormat`,
|
|
3090
3088
|
reason: "config_column_date_setting",
|
|
3091
3089
|
detail: `"${c}"'s download formats its dates with this setting.`
|
|
3092
3090
|
});
|
|
3093
3091
|
}
|
|
3094
3092
|
}
|
|
3095
|
-
for (const v of
|
|
3093
|
+
for (const v of qi)
|
|
3096
3094
|
Object.prototype.hasOwnProperty.call(p, v) && (delete p[v], e.changes.push({ path: `${I}.${v}`, action: "removed" }));
|
|
3097
3095
|
}
|
|
3098
|
-
|
|
3096
|
+
Bi(e, i), Vi(e, d);
|
|
3099
3097
|
}
|
|
3100
|
-
function
|
|
3098
|
+
function Ki(e) {
|
|
3101
3099
|
return Object.keys(e).some(
|
|
3102
3100
|
(a) => a !== "enabled" && a !== "colorRanges" && e[a] !== void 0
|
|
3103
3101
|
);
|
|
3104
3102
|
}
|
|
3105
|
-
function
|
|
3103
|
+
function Wi(e) {
|
|
3106
3104
|
return (e == null ? void 0 : e.enabled) === !1 || (e == null ? void 0 : e.enabled) === "false";
|
|
3107
3105
|
}
|
|
3108
|
-
function
|
|
3106
|
+
function Ui(e) {
|
|
3109
3107
|
const a = e.card, t = a.preferences;
|
|
3110
3108
|
if (!t) return;
|
|
3111
|
-
const s = t.kpiVisualOptions, o = J(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, n = t, i = J(n.formatNumber) ? n.formatNumber : void 0, d = o ?
|
|
3109
|
+
const s = t.kpiVisualOptions, o = J(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, n = t, i = J(n.formatNumber) ? n.formatNumber : void 0, d = o ? Me(To(o)) : void 0, l = i && Ki(i) ? Me(Ro(i)) : void 0;
|
|
3112
3110
|
if (a.type === "kpi") {
|
|
3113
|
-
if (
|
|
3111
|
+
if (Wi(i) && e.unconverted.push({
|
|
3114
3112
|
path: "preferences.formatNumber.enabled",
|
|
3115
3113
|
reason: "raw_display",
|
|
3116
3114
|
detail: "Formatting is switched off on this KPI."
|
|
3117
|
-
}),
|
|
3115
|
+
}), Ri(a)) {
|
|
3118
3116
|
const c = d ?? l, h = s == null ? void 0 : s.queryComparisonPolarity;
|
|
3119
3117
|
(c || h) && (t.sqlKpiValue = {
|
|
3120
3118
|
...t.sqlKpiValue,
|
|
@@ -3129,7 +3127,7 @@ function Gi(e) {
|
|
|
3129
3127
|
ee(a, "metricColumns").forEach((h) => {
|
|
3130
3128
|
d ? st(e, h, d, "preferences.kpiVisualOptions.formatOptions") : l && !h.format && st(e, h, l, "preferences.formatNumber");
|
|
3131
3129
|
});
|
|
3132
|
-
|
|
3130
|
+
Gi(e, i);
|
|
3133
3131
|
} else if (l) {
|
|
3134
3132
|
const c = ee(a, "metricColumns");
|
|
3135
3133
|
ys(a) ? e.unconverted.push({
|
|
@@ -3146,11 +3144,11 @@ function Gi(e) {
|
|
|
3146
3144
|
const c = i.colorRanges;
|
|
3147
3145
|
Array.isArray(c) && c.length > 0 ? n.formatNumber = { colorRanges: c } : delete n.formatNumber, e.changes.push({ path: "preferences.formatNumber", action: "removed" });
|
|
3148
3146
|
}
|
|
3149
|
-
s &&
|
|
3147
|
+
s && ke(s, ["formatOptions", "queryComparisonPolarity"]) && (e.changes.push({ path: "preferences.kpiVisualOptions.formatOptions", action: "removed" }), Object.keys(s).length === 0 && delete t.kpiVisualOptions);
|
|
3150
3148
|
for (const c of ["numberAxisFormat", "columnSettings"])
|
|
3151
|
-
|
|
3149
|
+
ke(t, [c]) && e.changes.push({ path: `preferences.${c}`, action: "removed" });
|
|
3152
3150
|
}
|
|
3153
|
-
function
|
|
3151
|
+
function Gi(e, a) {
|
|
3154
3152
|
var n;
|
|
3155
3153
|
const t = a == null ? void 0 : a.decimalPlaces, s = e.card.preferences;
|
|
3156
3154
|
if (typeof t != "number" || ((n = s.comparisonPresentation) == null ? void 0 : n.precision) !== void 0) return;
|
|
@@ -3164,24 +3162,24 @@ function Qi(e, a) {
|
|
|
3164
3162
|
to: "preferences.comparisonPresentation.precision"
|
|
3165
3163
|
}));
|
|
3166
3164
|
}
|
|
3167
|
-
const
|
|
3168
|
-
function
|
|
3165
|
+
const Qi = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
|
|
3166
|
+
function Hi(e) {
|
|
3169
3167
|
const a = e.card.preferences;
|
|
3170
3168
|
if (a)
|
|
3171
|
-
for (const t of
|
|
3169
|
+
for (const t of Ti) {
|
|
3172
3170
|
const s = a[t];
|
|
3173
3171
|
if (!J(s)) continue;
|
|
3174
3172
|
const o = `preferences.${t}`, n = 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" || n ? "override" : "inherit");
|
|
3175
3173
|
if (l === "raw" || d === void 0 && i === "none")
|
|
3176
3174
|
e.unconverted.push({ path: `${o}.format`, reason: "raw_display", detail: "Data labels show raw values." });
|
|
3177
3175
|
else if (l === "override") {
|
|
3178
|
-
const c = n && n.type ? n : i &&
|
|
3176
|
+
const c = n && n.type ? n : i && Qi.has(i) ? { ...n, type: i } : n, h = c ? Me(Ao(c, { preserveOmittedProperties: !0 })) : void 0;
|
|
3179
3177
|
h && (s.valueFormat = h, e.changes.push({ path: `${o}.formatOptions`, action: "moved", to: `${o}.valueFormat` }));
|
|
3180
3178
|
}
|
|
3181
|
-
|
|
3179
|
+
ke(s, ["formatMode", "mode", "formatOptions", ...t === "dataLabelsConfig" ? ["format"] : []]) && e.changes.push({ path: `${o}.formatMode`, action: "removed" });
|
|
3182
3180
|
}
|
|
3183
3181
|
}
|
|
3184
|
-
function
|
|
3182
|
+
function zi(e) {
|
|
3185
3183
|
var s;
|
|
3186
3184
|
const a = (s = e.card.config) == null ? void 0 : s.matrix, t = J(a) && J(a.presentation) ? a.presentation : void 0;
|
|
3187
3185
|
if (t)
|
|
@@ -3194,27 +3192,27 @@ function Yi(e) {
|
|
|
3194
3192
|
}
|
|
3195
3193
|
}
|
|
3196
3194
|
}
|
|
3197
|
-
function
|
|
3195
|
+
function Yi(e, a = {}) {
|
|
3198
3196
|
const t = { card: structuredClone(e), changes: [], unconverted: [] };
|
|
3199
3197
|
for (const s of Lt)
|
|
3200
3198
|
ee(t.card, s).forEach((o, n) => {
|
|
3201
|
-
J(o) &&
|
|
3199
|
+
J(o) && Di(t, o, s, `config.${s}[${n}]`);
|
|
3202
3200
|
});
|
|
3203
|
-
return
|
|
3201
|
+
return Ei(t), ji(t), Ui(t), Hi(t), zi(t), Oi(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
|
|
3204
3202
|
}
|
|
3205
|
-
const
|
|
3206
|
-
function
|
|
3203
|
+
const Ji = "__semaphor_unassigned_trigger__", Xi = "__NULL__";
|
|
3204
|
+
function Zi(e) {
|
|
3207
3205
|
var a, t;
|
|
3208
3206
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
3209
3207
|
}
|
|
3210
|
-
function
|
|
3208
|
+
function er(e) {
|
|
3211
3209
|
const a = e.config;
|
|
3212
3210
|
return a ? e.type === "detailTable" ? a.detailColumns ?? [] : [...a.detailColumns ?? [], ...a.metricColumns ?? [], ...a.groupByColumns ?? []] : [];
|
|
3213
3211
|
}
|
|
3214
3212
|
function Oa(e) {
|
|
3215
3213
|
return [e.id, e.alias, e.name, e.qualifiedFieldName, e.label];
|
|
3216
3214
|
}
|
|
3217
|
-
function
|
|
3215
|
+
function tr(e, a) {
|
|
3218
3216
|
var c, h;
|
|
3219
3217
|
const t = ((c = e.config) == null ? void 0 : c.metricColumns) ?? [], s = ((h = e.config) == null ? void 0 : h.pivotByColumns) ?? [];
|
|
3220
3218
|
if (t.length !== 1 || s.length !== 1) return { reason: "pivot_key_form" };
|
|
@@ -3223,16 +3221,16 @@ function ar(e, a) {
|
|
|
3223
3221
|
ref: {
|
|
3224
3222
|
kind: "pivot",
|
|
3225
3223
|
metricId: o.id,
|
|
3226
|
-
members: [{ fieldId: n.id, value: a ===
|
|
3224
|
+
members: [{ fieldId: n.id, value: a === Xi ? null : a }]
|
|
3227
3225
|
}
|
|
3228
3226
|
};
|
|
3229
3227
|
}
|
|
3230
|
-
function
|
|
3228
|
+
function ar(e, a) {
|
|
3231
3229
|
var i, d;
|
|
3232
|
-
if (a ===
|
|
3233
|
-
if (
|
|
3234
|
-
const t =
|
|
3235
|
-
return n.length === 1 ? { ref: { kind: "field", fieldId: n[0] } } : n.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ?
|
|
3230
|
+
if (a === Ji) return { reason: "unassigned_trigger" };
|
|
3231
|
+
if (Zi(e)) return { ref: { kind: "result", key: a } };
|
|
3232
|
+
const t = er(e), s = t.filter((l) => Oa(l).includes(a)), o = s.length ? s : t.filter((l) => Oa(l).some((c) => (c == null ? void 0 : c.trim().toLowerCase()) === a.trim().toLowerCase())), n = [...new Set(o.map((l) => l.id))];
|
|
3233
|
+
return n.length === 1 ? { ref: { kind: "field", fieldId: n[0] } } : n.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ? tr(e, a) : { reason: "no_matching_column" };
|
|
3236
3234
|
}
|
|
3237
3235
|
function Ea(e, a, t, s, o) {
|
|
3238
3236
|
const n = (g, k, T) => {
|
|
@@ -3277,7 +3275,7 @@ function Ea(e, a, t, s, o) {
|
|
|
3277
3275
|
target: N
|
|
3278
3276
|
};
|
|
3279
3277
|
}
|
|
3280
|
-
function
|
|
3278
|
+
function sr(e, a) {
|
|
3281
3279
|
var o;
|
|
3282
3280
|
const t = (o = La(e)) == null ? void 0 : o.value;
|
|
3283
3281
|
if (!t) return [];
|
|
@@ -3290,7 +3288,7 @@ function or(e, a) {
|
|
|
3290
3288
|
return [{ id: `kpi-color-range-${i + 1}`, condition: x, target: { level: "cell" }, style: { textColor: w } }];
|
|
3291
3289
|
}).reverse();
|
|
3292
3290
|
}
|
|
3293
|
-
function
|
|
3291
|
+
function or(e) {
|
|
3294
3292
|
var h, p, I, v, x, w, E;
|
|
3295
3293
|
const a = structuredClone(e), t = [], s = [], o = [], n = (_) => {
|
|
3296
3294
|
t.some((S) => S.from.startsWith(_)) || t.push({ ruleId: "", action: "removed", from: _ });
|
|
@@ -3303,7 +3301,7 @@ function nr(e) {
|
|
|
3303
3301
|
t.push({ ruleId: D.id, action: "removed", from: `${S}.rules[${$}]` });
|
|
3304
3302
|
return;
|
|
3305
3303
|
}
|
|
3306
|
-
const N = Ea(D, (k) =>
|
|
3304
|
+
const N = Ea(D, (k) => ar(a, k), `${S}.rules[${$}]`, s, !1);
|
|
3307
3305
|
N && (o.push(N), t.push({ ruleId: D.id, action: "moved", from: `${S}.rules[${$}]` }));
|
|
3308
3306
|
}), delete i.conditionalFormatting, s.some((D) => D.path.startsWith(S)) || n(S);
|
|
3309
3307
|
}
|
|
@@ -3325,7 +3323,7 @@ function nr(e) {
|
|
|
3325
3323
|
if (c && ue(c, "colorRanges")) {
|
|
3326
3324
|
const _ = Array.isArray(c.colorRanges) ? c.colorRanges : [];
|
|
3327
3325
|
if (a.type === "kpi") {
|
|
3328
|
-
const S =
|
|
3326
|
+
const S = sr(a, _);
|
|
3329
3327
|
o.push(...S), S.forEach((y) => t.push({ ruleId: y.id, action: "moved", from: "preferences.formatNumber.colorRanges" }));
|
|
3330
3328
|
}
|
|
3331
3329
|
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" });
|
|
@@ -3343,14 +3341,14 @@ function nr(e) {
|
|
|
3343
3341
|
}
|
|
3344
3342
|
return { card: a, changes: t, unresolved: s };
|
|
3345
3343
|
}
|
|
3346
|
-
function
|
|
3347
|
-
const { only: t, ...s } = a, o = t === "rules" ? void 0 :
|
|
3344
|
+
function Nr(e, a = {}) {
|
|
3345
|
+
const { only: t, ...s } = a, o = t === "rules" ? void 0 : Yi(e, s), n = t === "formats" ? void 0 : or((o == null ? void 0 : o.card) ?? e);
|
|
3348
3346
|
return { card: (n == null ? void 0 : n.card) ?? (o == null ? void 0 : o.card) ?? e, formats: o, rules: n };
|
|
3349
3347
|
}
|
|
3350
|
-
function
|
|
3348
|
+
function Pr(e) {
|
|
3351
3349
|
return e.kind === "metric" ? e.resultId : e.measureId;
|
|
3352
3350
|
}
|
|
3353
|
-
function
|
|
3351
|
+
function nr(e) {
|
|
3354
3352
|
if (e.op === "dashboard.update" || e.op === "dashboard.style" || e.op === "sheet.update") return !0;
|
|
3355
3353
|
if (e.op !== "card.update") return !1;
|
|
3356
3354
|
switch (e.update.kind) {
|
|
@@ -3362,497 +3360,502 @@ function ir(e) {
|
|
|
3362
3360
|
return !1;
|
|
3363
3361
|
}
|
|
3364
3362
|
}
|
|
3365
|
-
function
|
|
3366
|
-
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(
|
|
3363
|
+
function Lr(e) {
|
|
3364
|
+
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(nr) ? "not_needed" : "needed";
|
|
3367
3365
|
}
|
|
3368
3366
|
export {
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3367
|
+
Vr as AGGREGATES,
|
|
3368
|
+
jr as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
3369
|
+
Kr as CALCULATED_FIELDS_GROUP_ID,
|
|
3370
|
+
Wr as CALCULATED_FIELDS_GROUP_NAME,
|
|
3371
|
+
Ur as CARD_CONFIG_KEY_CLASSES,
|
|
3372
|
+
Gr as CARD_KEY_CLASSES,
|
|
3375
3373
|
ho as CARD_QUERY_CONFIG_KEYS,
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3374
|
+
kr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
3375
|
+
Sr as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
3376
|
+
Dh as CARD_SURFACES,
|
|
3377
|
+
Qr as CARD_TYPES,
|
|
3378
|
+
Fe as CARD_TYPE_RULES,
|
|
3381
3379
|
je as CHART_COLORS_BOUNDS,
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3380
|
+
Hr as CHIP_VALUE_COLUMN,
|
|
3381
|
+
zr as COLUMN_KEY_CLASSES,
|
|
3382
|
+
Yr as COLUMN_PRESENTATION_KEYS,
|
|
3383
|
+
Jr as COMPARISON_POLARITIES,
|
|
3384
|
+
Cf as COMPARISON_SIGN_WORDS,
|
|
3385
|
+
Xr as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
3386
|
+
Zr as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
3387
|
+
ed as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
3388
|
+
td as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
3389
|
+
ad as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
3390
|
+
sd as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
3391
|
+
od as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
3392
|
+
nd as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
3393
|
+
id as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
3394
|
+
rd as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
3395
|
+
Oh as CORNER_STEPS,
|
|
3398
3396
|
ce as CardQueryRequestError,
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3397
|
+
dd as ControlResolutionError,
|
|
3398
|
+
ld as DASHBOARD_CHANGE_OPS,
|
|
3399
|
+
cd as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
3400
|
+
$f as DASHBOARD_FILTER_OPERATIONS,
|
|
3401
|
+
ud as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
|
|
3402
|
+
nn as DASHBOARD_STYLE_NUMBER_BOUNDS,
|
|
3403
|
+
wf as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
3404
|
+
xf as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
3405
|
+
fd as DOMAIN_EDIT_CHANGE_OPS,
|
|
3406
|
+
md as DYNAMIC_TEXT_MESSAGE,
|
|
3407
|
+
hd as DashboardFilterMappingContractError,
|
|
3408
|
+
pd as ExecutionControlContractError,
|
|
3409
|
+
gd as FILTER_OPERATORS,
|
|
3412
3410
|
ua as FORMAT_WORDS,
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3411
|
+
bd as FilterModelError,
|
|
3412
|
+
yd as KPI_MEASURES_SHOWN,
|
|
3413
|
+
vd as KPI_TREND_PERIODS,
|
|
3414
|
+
Id as LEGACY_TABLE_CARD_TYPES,
|
|
3415
|
+
pm as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
|
|
3418
3416
|
ba as MAX_CREATE_CHANGES,
|
|
3419
|
-
|
|
3417
|
+
_d as MAX_NEXT_STEP_CHARS,
|
|
3420
3418
|
_o as MAX_PROPOSED_CHANGES,
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3419
|
+
Cd as MAX_QUERY_LIMIT,
|
|
3420
|
+
$d as MAX_TEXT_WORDS,
|
|
3421
|
+
wd as MEASURE_CALCULATION_SUMMARIES,
|
|
3422
|
+
Wm as NEW_CARD_TYPE,
|
|
3423
|
+
xd as NON_ADDITIVE_SUM_OF_ROWS_HINT,
|
|
3424
|
+
Sd as PUBLIC_TRANSFORM_KIND,
|
|
3425
|
+
kd as QUERY_ASPECTS,
|
|
3426
|
+
Td as QUERY_CONFIG_KEY_ASPECTS,
|
|
3427
|
+
Um as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
|
|
3428
|
+
Rd as RESERVED_VARIABLE_NAMES,
|
|
3429
|
+
Ad as SEE_RECORDS_CARD_TYPES,
|
|
3430
|
+
Fd as SEE_RECORDS_LIMITS,
|
|
3431
|
+
Dd as SEE_RECORDS_MAX_PAGE,
|
|
3432
|
+
Gm as SEE_RECORDS_MESSAGES,
|
|
3433
|
+
Od as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
3434
|
+
Ed as SETTINGS_BY_KIND,
|
|
3435
|
+
Nh as SHELF_FIELD_KEYS,
|
|
3436
|
+
Eh as SPACING_STEPS,
|
|
3437
|
+
qd as TIME_GRAINS,
|
|
3438
|
+
Nd as TOOLBAR_FILTER_REACH_FIELDS,
|
|
3439
|
+
Sf as VARIABLE_CARD_TYPE,
|
|
3440
|
+
kf as VARIABLE_COMPARISON_PARTS,
|
|
3441
|
+
Pd as VARIABLE_GETS,
|
|
3442
|
+
Tf as VARIABLE_LIST_CAP,
|
|
3443
|
+
Rf as VARIABLE_LIST_SHOWN,
|
|
3444
|
+
Ld as VARIABLE_NAME_PATTERN,
|
|
3445
|
+
Af as VARIABLE_VALUE_PART,
|
|
3446
|
+
Md as WINDOW_ERROR_CODES,
|
|
3447
|
+
Bd as WINDOW_WARNING_CODES,
|
|
3448
|
+
Vd as acceptedColumnRefKinds,
|
|
3449
|
+
jd as analyticsFilterSchema,
|
|
3450
|
+
gm as applyCardReferenceRemapping,
|
|
3451
|
+
Kd as applyCardSettings,
|
|
3454
3452
|
wt as applyDashboardOperations,
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3453
|
+
Wd as applyFilterApplicability,
|
|
3454
|
+
Qm as applyFilterSettingsChange,
|
|
3455
|
+
bm as applyGroupByOverride,
|
|
3456
|
+
Ud as applyLinkedClickToFilterOverrides,
|
|
3457
|
+
Gd as applyMeasureCalculations,
|
|
3458
|
+
Qd as applyOptionDependencyOverride,
|
|
3459
|
+
Hd as applyVariableChange,
|
|
3460
|
+
zd as blockClause,
|
|
3461
|
+
Yd as blockSentence,
|
|
3462
|
+
Uh as bookmarkImpactSentence,
|
|
3463
|
+
Hm as buildCardExportFormatOptions,
|
|
3464
|
+
ym as buildCardExportQueryContext,
|
|
3465
|
+
zm as buildCardExportRequest,
|
|
3466
|
+
Ym as buildCardExportRequestFromOptions,
|
|
3467
|
+
Jm as buildColumnCatalog,
|
|
3468
|
+
Jd as buildControlDefinitionIndex,
|
|
3471
3469
|
no as buildDashboardCardSourceIndex,
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3470
|
+
Xm as buildEntityColumnGroup,
|
|
3471
|
+
Zm as buildFilterInputFromDefinition,
|
|
3472
|
+
Qo as buildFilterInputFromField,
|
|
3473
|
+
Xd as buildLinkedClickToFilterOverrides,
|
|
3474
|
+
Zd as buildProposeChangeInputSchema,
|
|
3475
|
+
el as buildSavedEditorCard,
|
|
3476
|
+
eh as buildTableExportFormatOptions,
|
|
3477
|
+
tl as calculationAddSchema,
|
|
3478
|
+
th as cardColumnRefForKey,
|
|
3479
|
+
al as cardColumnRefSchema,
|
|
3482
3480
|
wo as cardConditionalFormattingSchema,
|
|
3483
|
-
|
|
3481
|
+
sl as cardQueryPatchSchema,
|
|
3484
3482
|
Ps as cardSettingsKind,
|
|
3485
3483
|
qs as cardTypeSentenceName,
|
|
3486
|
-
|
|
3484
|
+
ol as carryColumnSettings,
|
|
3487
3485
|
po as changeCardType,
|
|
3488
|
-
|
|
3486
|
+
nl as changeMatrixEditor,
|
|
3489
3487
|
xo as checkConditionalRuleColumns,
|
|
3490
3488
|
Dt as checkDataVariable,
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3489
|
+
il as checkDetailDateFormat,
|
|
3490
|
+
qr as checkPresentationStores,
|
|
3491
|
+
rl as chipOverVariable,
|
|
3492
|
+
dl as clickToFilterSettingsSchema,
|
|
3493
|
+
ll as collectJoinPlanIdentifiers,
|
|
3496
3494
|
Qa as collectVariableReferences,
|
|
3497
3495
|
Na as columnDataset,
|
|
3498
3496
|
go as columnFieldKey,
|
|
3499
3497
|
Ka as columnKeys,
|
|
3500
|
-
|
|
3498
|
+
cl as columnRefIssue,
|
|
3501
3499
|
la as columnRefKey,
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3500
|
+
ul as columnSettingsInputSchema,
|
|
3501
|
+
Ff as comparisonPartPresentation,
|
|
3502
|
+
vm as composeCardReferenceRemapping,
|
|
3503
|
+
fl as conditionalRuleSchema,
|
|
3504
|
+
Lr as confirmClassFor,
|
|
3505
|
+
ml as contextChangeSchema,
|
|
3506
|
+
hl as controlBindingExecutionSchema,
|
|
3507
|
+
pl as controlDefinitionExecutionSchema,
|
|
3510
3508
|
so as controlRefusal,
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3509
|
+
Ar as convertLegacyStyle,
|
|
3510
|
+
gl as createDashboardFilterBindingId,
|
|
3511
|
+
Pm as createMatrixAuthoringDraft,
|
|
3512
|
+
Lm as createMatrixConfig,
|
|
3513
|
+
zo as createNewCard,
|
|
3514
|
+
bl as createTargetSchema,
|
|
3515
|
+
Ho as createTextCard,
|
|
3516
|
+
yl as dashboardCardFilterSourceInventoryContains,
|
|
3519
3517
|
Zs as dashboardChangeSchema,
|
|
3520
|
-
|
|
3521
|
-
|
|
3518
|
+
vl as dashboardFilterTargetMatchesLogicalValue,
|
|
3519
|
+
Df as dashboardFilterValueTypeForDataType,
|
|
3522
3520
|
No as dashboardInputScopeIncludesDocumentSheets,
|
|
3523
|
-
|
|
3524
|
-
|
|
3521
|
+
Tn as dashboardStyleAsEdit,
|
|
3522
|
+
Il as dashboardStyleChangeSchema,
|
|
3525
3523
|
za as dashboardStyleLayers,
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3524
|
+
_l as defaultClickToFilterSettings,
|
|
3525
|
+
pn as defaultVariableGet,
|
|
3526
|
+
Ph as defaultVariableName,
|
|
3527
|
+
Gh as describeBookmarkImpact,
|
|
3528
|
+
Cl as describeDashboardFilterCardReach,
|
|
3531
3529
|
$e as describeDashboardFilterCardReachDetail,
|
|
3532
|
-
|
|
3530
|
+
ah as describeDateWindow,
|
|
3531
|
+
sh as describeKpiDateSection,
|
|
3532
|
+
oh as describeKpiTileDate,
|
|
3533
|
+
$l as describeMeasureCalculations,
|
|
3533
3534
|
ao as describeQueryChange,
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3535
|
+
nh as describeRelationshipRoute,
|
|
3536
|
+
ih as describeRelationshipSkip,
|
|
3537
|
+
wl as describeTableColumnTotal,
|
|
3538
|
+
Of as documentInputTextUsage,
|
|
3539
|
+
Ef as doesDashboardInputApplyToTarget,
|
|
3540
|
+
qf as doesDashboardInputReachFilterTarget,
|
|
3541
|
+
Nf as doesDashboardInputSurviveCarriedContext,
|
|
3542
|
+
xl as doesToolbarFilterReachTab,
|
|
3543
|
+
rh as domainCalculatedFields,
|
|
3544
|
+
Sl as domainEditChangeSchema,
|
|
3545
|
+
kl as domainEditChangeSchemas,
|
|
3546
|
+
Lh as draftBlocker,
|
|
3547
|
+
gn as draftFromVariable,
|
|
3548
|
+
Tl as drawsDetailDatesInBrowser,
|
|
3549
|
+
Rl as dropMatrixEditorField,
|
|
3550
|
+
Hh as editBrandStyle,
|
|
3551
|
+
rn as editDashboardStyle,
|
|
3552
|
+
Al as evaluateConditionalRules,
|
|
3553
|
+
Fl as explicitComparisonSchema,
|
|
3553
3554
|
Gs as fieldIdentityKey,
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3555
|
+
Dl as fieldRef,
|
|
3556
|
+
Ol as fieldRefSchema,
|
|
3557
|
+
El as filterApplicabilityContextForCard,
|
|
3558
|
+
dh as filterReachPreviewAnswers,
|
|
3559
|
+
ql as filterValueReachForCard,
|
|
3560
|
+
Nl as filterValueSemanticDataset,
|
|
3560
3561
|
ot as findCatalogField,
|
|
3561
|
-
|
|
3562
|
-
|
|
3562
|
+
Pl as findDashboardCardExecutableSource,
|
|
3563
|
+
Ll as findDashboardCardPinnedCatalogSource,
|
|
3563
3564
|
Ua as findDashboardFilterTarget,
|
|
3564
|
-
|
|
3565
|
+
Ml as findDashboardSqlPinnedCatalogSource,
|
|
3565
3566
|
ps as findRetiredCardPresentationFields,
|
|
3566
|
-
|
|
3567
|
+
Er as findRetiredPresentationFields,
|
|
3567
3568
|
Us as findSortedColumn,
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3569
|
+
lh as flattenEntityColumns,
|
|
3570
|
+
Bl as foldPrototypeDocumentInputs,
|
|
3571
|
+
Vl as formatFilterModelIssues,
|
|
3571
3572
|
ws as formatResolvedPrimaryDateFieldIssues,
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3573
|
+
jl as formatSkippedFilterWarnings,
|
|
3574
|
+
Kl as fromEditableRules,
|
|
3575
|
+
ch as getCalculatedFieldAggregateOverrides,
|
|
3576
|
+
Wl as getCalculatedFieldNamespace,
|
|
3577
|
+
uh as getCalculatedFieldParameters,
|
|
3578
|
+
fh as getCalculatedFieldShelfOverrides,
|
|
3579
|
+
Ul as getCardDefinition,
|
|
3580
|
+
mh as getClickContextFromTable,
|
|
3581
|
+
Gl as getColumnCatalogFieldId,
|
|
3582
|
+
Ql as getDashboardFilterSubscriptionHint,
|
|
3583
|
+
Hl as getDashboardGlobalDateFilter,
|
|
3584
|
+
Pf as getDocumentKpiSectionShapeIssues,
|
|
3585
|
+
Lf as getDocumentSectionCards,
|
|
3586
|
+
hh as getDomainCalculatedSelectionOverrides,
|
|
3587
|
+
zl as getFieldAggregationOptions,
|
|
3588
|
+
Yl as getMatrixBindingTargets,
|
|
3589
|
+
Mm as getMatrixLevelLabel,
|
|
3590
|
+
Bm as getMatrixMeasureLabel,
|
|
3591
|
+
Jl as getStableDomainCalculatedFieldId,
|
|
3592
|
+
Xl as getTemporalBucketAuthoringOptions,
|
|
3593
|
+
Zl as getTemporalBucketAuthoringSelection,
|
|
3594
|
+
ec as handleSchema,
|
|
3595
|
+
tc as hasDashboardFilterSubscription,
|
|
3596
|
+
ph as hasSeeRecordsMeasureFilter,
|
|
3596
3597
|
ue as hasStoredKey,
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3598
|
+
ac as hasTextCardRichWords,
|
|
3599
|
+
sc as hasToolbarFilterReachField,
|
|
3600
|
+
Im as hostFilterValueFor,
|
|
3601
|
+
_m as hostFilterValuesToSlots,
|
|
3602
|
+
oc as inspectMatrixCardConfig,
|
|
3603
|
+
Cm as isAdHocFilterValueOnTab,
|
|
3603
3604
|
Ca as isAggregateGet,
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3605
|
+
nc as isAllowedDashboardInputScopeCombination,
|
|
3606
|
+
ic as isCardType,
|
|
3607
|
+
Mf as isDashboardFilterOperationCompatible,
|
|
3607
3608
|
Ga as isDashboardInputOnTab,
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3609
|
+
Bf as isDashboardInputOwnedBySheet,
|
|
3610
|
+
Vf as isDashboardInputScopeEmpty,
|
|
3611
|
+
jf as isDashboardTargetIdTaken,
|
|
3612
|
+
rc as isDatabaseEntityReference,
|
|
3613
|
+
dc as isGroupedDate,
|
|
3614
|
+
lc as isLegacyTableCard,
|
|
3615
|
+
cc as isPresentationCurrencyBinding,
|
|
3616
|
+
uc as isSeeRecordsCardType,
|
|
3617
|
+
fc as isSemanticAutoJoinCard,
|
|
3618
|
+
mc as isSemaphorCartesianChartType,
|
|
3618
3619
|
Oo as isSqlKpi,
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3620
|
+
hc as isStructuralControlBinding,
|
|
3621
|
+
pc as isTextCardRichContent,
|
|
3622
|
+
gc as isValidControlOptionPresentation,
|
|
3623
|
+
Kf as isVariableComparisonPart,
|
|
3624
|
+
bc as isWhenRun,
|
|
3625
|
+
yc as kpiSegmentMetricId,
|
|
3626
|
+
vc as kpiShowsTrend,
|
|
3626
3627
|
Es as kpiTrendBy,
|
|
3628
|
+
gh as kpiTrendByHint,
|
|
3627
3629
|
Ws as labelAt,
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3630
|
+
Ic as layoutArrangeSchema,
|
|
3631
|
+
$m as legacyTableRoutingIds,
|
|
3632
|
+
wm as legacyTableRoutingTarget,
|
|
3633
|
+
_c as linkedClickToFilterOverridesSchema,
|
|
3634
|
+
xm as listAdHocFilterValuesOnTab,
|
|
3633
3635
|
xe as listDashboardCardLocations,
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
+
Cc as listDashboardFilterDefinitions,
|
|
3637
|
+
$c as listDashboardFilterInputsOnTab,
|
|
3636
3638
|
Wa as listDashboardFilterTargets,
|
|
3637
|
-
|
|
3639
|
+
Wf as listDashboardInputReachKeys,
|
|
3638
3640
|
Eo as listDashboardInputScopeExceptedCardIds,
|
|
3639
3641
|
qo as listDashboardInputScopeExceptedSheetIds,
|
|
3640
|
-
|
|
3642
|
+
wc as listDashboardInputsTolerantly,
|
|
3641
3643
|
Ot as listDashboardTabTargets,
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3644
|
+
Uf as listDataVariablePlaces,
|
|
3645
|
+
Sm as listFilterInputValueTargets,
|
|
3646
|
+
Gf as listFilterTargetScopeTargets,
|
|
3647
|
+
Qf as listReachedVariableTargets,
|
|
3648
|
+
Hf as listReferencedDataVariableIds,
|
|
3649
|
+
xc as listStoredFilterDefinitions,
|
|
3650
|
+
zf as listVariableScopeTargets,
|
|
3651
|
+
Yf as mapDashboardCards,
|
|
3652
|
+
Jf as mapDocumentSectionCards,
|
|
3653
|
+
Sc as mapRuleColumns,
|
|
3654
|
+
kc as matchColumns,
|
|
3655
|
+
km as matrixCatalogSources,
|
|
3654
3656
|
vo as matrixColumnKeys,
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3657
|
+
Tc as matrixColumnsSchema,
|
|
3658
|
+
Rc as matrixDefinitionFieldRefs,
|
|
3659
|
+
Ac as matrixDefinitionFields,
|
|
3660
|
+
Fc as matrixDefinitionSources,
|
|
3661
|
+
Dc as matrixEditorCatalogFromFields,
|
|
3662
|
+
Tm as matrixExecutionSources,
|
|
3663
|
+
Oc as measureCalculationOptions,
|
|
3664
|
+
Ec as measureComparisonSchema,
|
|
3665
|
+
qc as measureRefSchema,
|
|
3666
|
+
Nc as measureTransformSchema,
|
|
3667
|
+
Vm as mergeMatrixSorts,
|
|
3666
3668
|
lo as metricCardQuerySchema,
|
|
3667
3669
|
yo as moveMatrixLevel,
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3670
|
+
Mh as newVariableDraft,
|
|
3671
|
+
Bh as newVariableId,
|
|
3672
|
+
Pc as normalizeClickToFilterSettings,
|
|
3673
|
+
Lc as normalizeDashboardInputs,
|
|
3674
|
+
Mc as normalizeLegacyLinkedTargetOverrides,
|
|
3675
|
+
Bc as occurrenceKeys,
|
|
3674
3676
|
es as outlineCalendar,
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
+
Or as outlineDashboard,
|
|
3678
|
+
Pe as outlineFilter,
|
|
3677
3679
|
as as outlineFilters,
|
|
3678
3680
|
ut as ownsItsAggregate,
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3681
|
+
Rr as parseCardQueryRequest,
|
|
3682
|
+
$n as parseCardQueryRequestContext,
|
|
3683
|
+
Tr as parseCardQueryRequestExtras,
|
|
3684
|
+
Vc as parseColumnRefKey,
|
|
3685
|
+
bh as parseDashboardStyle,
|
|
3686
|
+
jc as parseExecutionControlBindingsShallow,
|
|
3685
3687
|
Ss as parseExecutionControlContext,
|
|
3686
|
-
|
|
3688
|
+
Kc as parseExecutionControlContract,
|
|
3687
3689
|
pa as planCardLabels,
|
|
3688
3690
|
ha as planCardRequery,
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3691
|
+
yh as pluralDatasetLabel,
|
|
3692
|
+
Rm as prepareLoadedDashboard,
|
|
3693
|
+
Wc as previewTemporalBucketAuthoringFormat,
|
|
3694
|
+
Xf as projectDataVariableToCard,
|
|
3695
|
+
Uc as pruneUnrelatedCalculatedFilters,
|
|
3694
3696
|
oo as queryForm,
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
+
Gc as queryMeasureSchema,
|
|
3698
|
+
Qc as readCardConditionalRules,
|
|
3697
3699
|
we as readCardQuery,
|
|
3698
3700
|
Ft as readCardSettings,
|
|
3699
3701
|
he as readCardSource,
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
+
Ee as readCardTypeProperties,
|
|
3703
|
+
jh as readComparisonDates,
|
|
3702
3704
|
Ie as readDashboardFilterModel,
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3705
|
+
Kh as readDefaultComparisonDates,
|
|
3706
|
+
Hc as readExactDomainCalculatedFieldReference,
|
|
3707
|
+
vh as readFilterReachResponse,
|
|
3708
|
+
Am as readFilterValueList,
|
|
3709
|
+
Ih as readKpiDateContext,
|
|
3710
|
+
zc as readKpiFigure,
|
|
3711
|
+
Yc as readKpiNumber,
|
|
3712
|
+
Jc as readMatrixCardConfig,
|
|
3713
|
+
Xc as readMeasureCalculations,
|
|
3714
|
+
Zc as readSqlFilterUse,
|
|
3715
|
+
eu as readStoredTransform,
|
|
3713
3716
|
ja as readTextCardWords,
|
|
3714
3717
|
Ze as readTextWords,
|
|
3715
|
-
|
|
3716
|
-
|
|
3718
|
+
tu as readTransform,
|
|
3719
|
+
Zf as readVariableAnswer,
|
|
3717
3720
|
rs as readVariableEditability,
|
|
3718
3721
|
kt as readVariableSource,
|
|
3719
3722
|
Co as readablePresentation,
|
|
3720
|
-
|
|
3723
|
+
au as rebindDashboardOptionDependencyInputId,
|
|
3721
3724
|
ma as rebuildsRole,
|
|
3722
|
-
|
|
3723
|
-
|
|
3725
|
+
su as reconcileMatrixSpecStructure,
|
|
3726
|
+
ou as reconcileTemporalBucketAuthoringFormat,
|
|
3724
3727
|
ro as recordsCardQuerySchema,
|
|
3725
3728
|
Js as refDataset,
|
|
3726
3729
|
be as refKey,
|
|
3727
3730
|
Ct as refName,
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3731
|
+
nu as registeredDomainEditChangeSchemas,
|
|
3732
|
+
iu as relationshipAddSchema,
|
|
3733
|
+
ru as relationshipRouteTarget,
|
|
3734
|
+
du as remapClickToFilterReferences,
|
|
3735
|
+
lu as remapLinkedClickToFilterOverrides,
|
|
3736
|
+
cu as requireNormalizedDashboardInputs,
|
|
3737
|
+
uu as resolveBindingControlValue,
|
|
3738
|
+
em as resolveCanonicalDetailResultRawKey,
|
|
3739
|
+
tm as resolveCanonicalResultOutputKey,
|
|
3737
3740
|
Mo as resolveCanonicalResultOutputKeys,
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3741
|
+
am as resolveCanonicalResultRawKey,
|
|
3742
|
+
_h as resolveCardColumnRef,
|
|
3743
|
+
Gn as resolveCardSettings,
|
|
3744
|
+
Ch as resolveConditionalRules,
|
|
3745
|
+
Fr as resolveDashboardChanges,
|
|
3746
|
+
Dr as resolveDashboardCreate,
|
|
3747
|
+
fu as resolveDashboardEntitySource,
|
|
3748
|
+
mu as resolveDashboardFilterAutomaticTarget,
|
|
3749
|
+
hu as resolveDashboardFilterInheritedTarget,
|
|
3750
|
+
pu as resolveDashboardOptionDependencies,
|
|
3751
|
+
gu as resolveDashboardOptionPopulation,
|
|
3752
|
+
bu as resolveDashboardSqlFilterTarget,
|
|
3753
|
+
dn as resolveDashboardStyle,
|
|
3754
|
+
yu as resolveDetailTableRawTemporalPresentation,
|
|
3755
|
+
vu as resolveFieldSelectedSource,
|
|
3756
|
+
Iu as resolveGroupByFieldTarget,
|
|
3757
|
+
_u as resolveKpiLayout,
|
|
3755
3758
|
La as resolveKpiShape,
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
+
Cu as resolveKpiValueStyle,
|
|
3760
|
+
Fm as resolveMatrixControlBindings,
|
|
3761
|
+
jm as resolveMatrixDefinition,
|
|
3759
3762
|
fa as resolveMeasureCalculations,
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3763
|
+
$u as resolveMeasureTransform,
|
|
3764
|
+
wu as resolveMetricFieldTarget,
|
|
3765
|
+
xu as resolveScalarMappedValue,
|
|
3766
|
+
Su as resolveTableColumnTotal,
|
|
3767
|
+
ku as resolveTemporalBucketAuthoringFormat,
|
|
3765
3768
|
xs as resolveTemporalResultOwner,
|
|
3766
3769
|
ga as resolveTextCardWords,
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3770
|
+
Tu as resolveValueStyle,
|
|
3771
|
+
Ru as respondsToSelectionsSchema,
|
|
3772
|
+
Au as retainConditionalRules,
|
|
3773
|
+
Fu as retainedMatrixPath,
|
|
3774
|
+
sm as rewriteDashboardInputScopeIds,
|
|
3775
|
+
Dm as routeLegacyTableCard,
|
|
3776
|
+
Om as routeLegacyTableCards,
|
|
3777
|
+
Em as routeLegacyTableFrame,
|
|
3775
3778
|
He as sameColumnKey,
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3779
|
+
Du as sanitizeTextCardUrl,
|
|
3780
|
+
$h as seeRecordsAvailability,
|
|
3781
|
+
wh as seeRecordsCardAvailability,
|
|
3782
|
+
Pr as seeRecordsMeasureId,
|
|
3783
|
+
xh as seeRecordsMeasureKind,
|
|
3784
|
+
Sh as seeRecordsReasonHidesOffer,
|
|
3785
|
+
Ou as seeRecordsRequestSchema,
|
|
3786
|
+
kh as seeRecordsRowField,
|
|
3787
|
+
Eu as selectDashboardOptionDependencyInputIds,
|
|
3788
|
+
qu as selectionFieldFromExplorerField,
|
|
3789
|
+
Th as selectionTupleFromClickContext,
|
|
3790
|
+
Rh as setMeasureCalculations,
|
|
3791
|
+
Nu as settableCardType,
|
|
3792
|
+
Pu as sharedCardPreferences,
|
|
3793
|
+
Lu as sharedTableDialect,
|
|
3794
|
+
Mu as sheetChangeSchemas,
|
|
3792
3795
|
io as sqlCardQuerySchema,
|
|
3793
|
-
|
|
3794
|
-
|
|
3796
|
+
Bu as sqlKpiResultKeys,
|
|
3797
|
+
qe as statedLabelsOf,
|
|
3795
3798
|
Rs as storedCardTypeFor,
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3799
|
+
Vu as storedRunPresentation,
|
|
3800
|
+
om as storedTextRefs,
|
|
3801
|
+
ju as stripInstanceTargetsForLibrarySave,
|
|
3802
|
+
Ku as structuralControlOverride,
|
|
3800
3803
|
ts as summarizeFilter,
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3804
|
+
Wu as supportsCanonicalDashboardTemporalResult,
|
|
3805
|
+
Uu as tabChangeSchemas,
|
|
3806
|
+
Gu as tableColumnTotalLabel,
|
|
3807
|
+
Qu as textCardExcerpt,
|
|
3808
|
+
Hu as textCardWordingClauses,
|
|
3806
3809
|
_t as textCatalogAt,
|
|
3807
3810
|
ct as toChartType,
|
|
3808
|
-
|
|
3809
|
-
|
|
3811
|
+
zu as toEditableRules,
|
|
3812
|
+
Yu as toFiniteKpiNumber,
|
|
3810
3813
|
$t as toPublicCardType,
|
|
3811
3814
|
Xs as toStoredComparison,
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3815
|
+
Ju as toolbarFilterInputFields,
|
|
3816
|
+
Xu as toolbarFilterScope,
|
|
3817
|
+
Zu as transformComparisonDocument,
|
|
3818
|
+
ef as transformGroupings,
|
|
3819
|
+
tf as transformOrderSchema,
|
|
3817
3820
|
bo as updateMatrixConfig,
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3821
|
+
Yi as upgradeCardFormats,
|
|
3822
|
+
Nr as upgradeCardPresentation,
|
|
3823
|
+
or as upgradeConditionalFormatting,
|
|
3824
|
+
qm as upgradeToStoredDashboard,
|
|
3825
|
+
af as validateAndResolveWindowTransforms,
|
|
3826
|
+
sf as validateControlValue,
|
|
3827
|
+
nm as validateDashboardFilterValues,
|
|
3825
3828
|
$s as validateResolvedPrimaryDateFieldShape,
|
|
3826
|
-
|
|
3827
|
-
|
|
3829
|
+
im as variableCardKeepsComparison,
|
|
3830
|
+
rm as variableComparison,
|
|
3828
3831
|
Ye as variableFromDraft,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
+
hn as variableGetOptions,
|
|
3833
|
+
dm as variablePartCell,
|
|
3834
|
+
lm as variablePartType,
|
|
3832
3835
|
Lo as variableParts,
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3836
|
+
cm as variableQueryResponseOf,
|
|
3837
|
+
Ah as variableSourceWords,
|
|
3838
|
+
bn as variableTakesComparison,
|
|
3839
|
+
Jo as variableWords,
|
|
3840
|
+
of as withCardConditionalRules,
|
|
3841
|
+
nf as withCardConfigSqlDatePatterns,
|
|
3842
|
+
um as withCardExcludedFromScope,
|
|
3843
|
+
fm as withCardIncludedInScope,
|
|
3844
|
+
rf as withDashboardOptionDependencyOverride,
|
|
3845
|
+
df as withDetailSqlDatePattern,
|
|
3846
|
+
mm as withDraftCard,
|
|
3847
|
+
lf as withFormatOverride,
|
|
3848
|
+
cf as withSqlDatePattern,
|
|
3846
3849
|
Po as withUnstatedScopeParts,
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3850
|
+
uf as withoutSqlDatePattern,
|
|
3851
|
+
ff as withoutToolbarFilterReachFields,
|
|
3852
|
+
mf as wordingBlocks,
|
|
3853
|
+
hf as wordingClauses,
|
|
3854
|
+
pf as writeColumnFormat,
|
|
3855
|
+
gf as writeColumnPolarity,
|
|
3856
|
+
bf as writeComparisonDisplay,
|
|
3857
|
+
yf as writeComparisonPresentation,
|
|
3858
|
+
vf as writeInheritComparison,
|
|
3859
|
+
If as writeSeeRecords,
|
|
3857
3860
|
Ys as writeTextWords
|
|
3858
3861
|
};
|