react-semaphor 0.1.591 → 0.1.593
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-Cazikwyh.js → assistant-chat-D05uNAeO.js} +7 -7
- package/dist/chunks/bookmark-impact-B0k90wq8.js +76 -0
- package/dist/chunks/{bookmark-state-Bt_eQEqt.js → bookmark-state-Be2W3s6t.js} +174 -166
- package/dist/chunks/{card-filter-builder-DFR-6Jpm.js → card-filter-builder-CiafWE26.js} +73 -73
- package/dist/chunks/{comparison-window-caption-CFaw-kIV.js → comparison-window-caption-h8w3ySL6.js} +88 -89
- package/dist/chunks/{dashboard-DCh9hKnJ.js → dashboard-T-gYKGTF.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-ob8G1b58.js → dashboard-briefing-launcher-CPh2B3Rf.js} +84 -84
- package/dist/chunks/{dashboard-controls-Nszg0k1A.js → dashboard-controls-Cijc9c3G.js} +9 -9
- package/dist/chunks/{dashboard-json-BpwnG23b.js → dashboard-json-D3m7h4VL.js} +1 -1
- package/dist/chunks/{dates-BOLBSBpn.js → dates-Bb0sn54j.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-BvM7br5P.js → edit-dashboard-visual-C0iSuX9t.js} +374 -374
- package/dist/chunks/{filter-reach-copy-By3r7O3G.js → filter-reach-copy-CifrEFxj.js} +221 -221
- package/dist/chunks/{filter-value-text-CFiIZWJP.js → filter-value-text-CHBm4IU7.js} +10 -10
- package/dist/chunks/{index-CsQYlwhU.js → index-CzM2w1kY.js} +22 -22
- package/dist/chunks/{pivot-result-contract-expectations-BkMRCjzf.js → pivot-result-contract-expectations-CaS0y823.js} +588 -552
- package/dist/chunks/{report-preferences-dialog-ChXt8wCt.js → report-preferences-dialog-GHvai50w.js} +9 -9
- package/dist/chunks/{resolve-dashboard-input-context-BlyFX8He.js → resolve-dashboard-input-context-BcQHmMlw.js} +7585 -6490
- package/dist/chunks/{saved-dashboard-context-BPSdH2jW.js → saved-dashboard-context-BHHEzmwM.js} +16 -16
- package/dist/chunks/{semaphor-ready-indicator-BZUMCHRU.js → semaphor-ready-indicator-AOUJrUAJ.js} +21334 -21330
- package/dist/chunks/{shelf-drop-preview-context-yJheoeTC.js → shelf-drop-preview-context-Cs62lWI1.js} +2 -2
- package/dist/chunks/stored-dashboard-Cmtl_Obh.js +4029 -0
- package/dist/chunks/{table-export-sheet-h7wm5TwP.js → table-export-sheet-Cd6z7SsG.js} +1 -1
- package/dist/chunks/{variable-draft-OpYyaVCW.js → variable-draft-CSK9Ps1o.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1097 -1105
- package/dist/format-utils/index.js +215 -216
- package/dist/index.js +56 -56
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +3 -3
- package/dist/types/components/visual/data-table/types/data-table.d.ts +24 -2
- package/dist/types/index.js +30 -29
- package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +27 -0
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +37 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +11 -0
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +56 -0
- package/dist/types/shared/dashboard-viewer/table-settings.d.ts +7 -0
- package/package.json +1 -1
- package/dist/chunks/bookmark-impact-rWjQgk8h.js +0 -75
- package/dist/chunks/pivot-header-presentation-gUxhdIdr.js +0 -42
- package/dist/chunks/stored-dashboard-CxQl9g0l.js +0 -4994
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -53
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
var Cs = Object.defineProperty;
|
|
2
2
|
var $s = (e, a, t) => a in e ? Cs(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { L as
|
|
9
|
-
import { r as
|
|
10
|
-
import {
|
|
11
|
-
import { f as
|
|
12
|
-
import { p as
|
|
13
|
-
import { r as Ya, D as Ia, h as
|
|
14
|
-
import { N as
|
|
15
|
-
import { a9 as Ja, r as Xa, aP as
|
|
3
|
+
var ct = (e, a, t) => $s(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
+
import { a1 as ws, a2 as xs, a3 as Ss, a4 as ks, a5 as Ts, a6 as Na, a7 as ve, a8 as Rs, a9 as he, aa as $e, ab as ca, ac as nt, ad as Pa, ae as U, af as K, ag as qe, ah as As, ai as Ds, aj as Ft, ak as Fs, al as Os, am as Es, an as qs, ao as Ns, ap as Ps, aq as Ls, ar as La, as as Ms, at as Bs, au as Vs, av as Gs, aw as js, ax as Ks, ay as Ws, az as ut, aA as Us, aB as Ma, aC as ua, aD as we, aE as ge, aF as Ne, aG as Qs, aH as Hs, aI as Ys, t as Xe, aJ as zs, aK as Js, aL as $t, aM as Ze, aN as Xs, aO as Zs, aP as Ba, aQ as Ot, aR as wt, aS as eo, aT as to, aU as ao, aV as re, aW as Va, aX as Ga, aY as fa, aZ as ft, a_ as so, a$ as oo, b0 as ma, b1 as xt, b2 as no, b3 as ha, b4 as io, b5 as pa, b6 as ga, b7 as et, b8 as ba, b9 as De, ba as ro, bb as Ye, q as lo, bc as ja, bd as co, be as uo, bf as fo, bg as Ka, a as mo, bh as ho, bi as po, bj as go, bk as bo, bl as yo, bm as vo, bn as _o, bo as Io, bp as Co, bq as $o, br as wo, bs as xo, bt as So, bu as ya, bv as ko, bw as To, bx as Ro, by as Ao, bz as Do, bA as Fo, bB as Oo, bC as Eo, bD as qo, bE as No, bF as Po, bG as Lo } from "../chunks/resolve-dashboard-input-context-BcQHmMlw.js";
|
|
5
|
+
import { e0 as zr, c1 as Jr, c6 as Xr, dF as Zr, dG as ed, dU as td, dT as ad, dO as sd, f3 as od, dV as nd, dW as id, em as rd, dg as dd, dh as ld, di as cd, dd as ud, de as fd, df as md, d9 as hd, da as pd, dc as gd, db as bd, dj as yd, eg as vd, dH as _d, cu as Id, eM as Cd, eL as $d, er as wd, es as xd, ct as Sd, dz as kd, e2 as Td, cD as Rd, f5 as Ad, ck as Dd, bX as Fd, ej as Od, e5 as Ed, et as qd, fw as Nd, fH as Pd, fA as Ld, dR as Md, dS as Bd, cA as Vd, ff as Gd, fd as jd, fe as Kd, bU as Wd, fr as Ud, e4 as Qd, cG as Hd, eb as Yd, cz as zd, fL as Jd, fM as Xd, eU as Zd, b$ as el, e3 as tl, dn as al, fi as sl, fQ as ol, c_ as nl, fB as il, dN as rl, cB as dl, cP as ll, bY as cl, eB as ul, eC as fl, dk as ml, c$ as hl, ei as pl, bO as gl, en as bl, eS as yl, c0 as vl, e7 as _l, fV as Il, fj as Cl, bP as $l, c5 as wl, ew as xl, cV as Sl, fO as kl, eV as Tl, ea as Rl, eT as Al, el as Dl, dy as Fl, dx as Ol, cy as El, eh as ql, eP as Nl, cg as Pl, cm as Ll, ef as Ml, cQ as Bl, d2 as Vl, d4 as Gl, cS as jl, bM as Kl, fC as Wl, fG as Ul, eN as Ql, eQ as Hl, eR as Yl, cH as zl, eq as Jl, eo as Xl, eH as Zl, bQ as ec, bZ as tc, eW as ac, fs as sc, b_ as oc, d_ as nc, d$ as ic, fR as rc, fS as dc, fU as lc, d3 as cc, ch as uc, ci as fc, cj as mc, cC as hc, cE as pc, fN as gc, f0 as bc, dC as yc, k as vc, d8 as _c, cr as Ic, cM as Cc, b as $c, d5 as wc, dD as xc, c8 as Sc, c9 as kc, c2 as Tc, dp as Rc, e9 as Ac, cq as Dc, ey as Fc, cI as Oc, bH as Ec, cv as qc, dP as Nc, cc as Pc, dZ as Lc, cl as Mc, dt as Bc, fg as Vc, fT as Gc, bV as jc, dv as Kc, ez as Wc, dw as Uc, eD as Qc, f8 as Hc, f7 as Yc, ec as zc, cX as Jc, cL as Xc, cN as Zc, o as eu, cO as tu, e_ as au, dX as su, e8 as ou, bI as nu, bJ as iu, bK as ru, bR as du, fy as lu, ft as cu, e1 as uu, fu, cU as mu, cw as hu, d1 as pu, dY as gu, eZ as bu, dA as yu, dB as vu, c7 as _u, fP as Iu, e6 as Cu, eX as $u, eO as wu, dE as xu, fc as Su, fa as ku, M as Tu, fx as Ru, cp as Au, fD as Du, fE as Fu, dL as Ou, d7 as Eu, cb as qu, ep as Nu, ek as Pu, bL as Lu, cY as Mu, cZ as Bu, cx as Vu, dm as Gu, cf as ju, cn as Ku, co as Wu, dI as Uu, dJ as Qu, cs as Hu, bS as Yu, ce as zu, dr as Ju, f6 as Xu, f2 as Zu, fF as ef, ds as tf, dq as af, fI as sf, ca as of, f4 as nf, cW as rf, f1 as df, d6 as lf, eA as cf, fh as uf, dK as ff, cT as mf, dQ as hf, bN as pf, cd as gf, ed as bf, fb as yf, ex as vf, d0 as _f, du as If, bW as Cf, ee as $f, fJ as wf, ev as xf, eu as Sf, e$ as kf, f9 as Tf, cF as Rf, cK as Af, bT as Df, fz as Ff, fv as Of, fK as Ef, dl as qf, eY as Nf, eK as Pf, dM as Lf, eJ as Mf, fl as Bf, c3 as Vf, eG as Gf, c4 as jf, eI as Kf, cJ as Wf, eE as Uf, eF as Qf, fk as Hf, fm as Yf, fn as zf, fo as Jf, cR as Xf, fp as Zf, fq as em } from "../chunks/resolve-dashboard-input-context-BcQHmMlw.js";
|
|
6
|
+
import { L as Mo, M as Wa, H as Ua, N as Bo, O as Vo, P as Et, Q as Qa, R as Ha, D as xe, S as Go, T as jo, I as Ko, U as Wo } from "../chunks/bookmark-state-Be2W3s6t.js";
|
|
7
|
+
import { ah as am, aB as sm, $ as om, a0 as nm, ab as im, af as rm, ac as dm, ad as lm, ae as cm, ai as um, az as fm, at as mm, F as hm, ax as pm, G as gm, a4 as bm, J as ym, aA as vm, a7 as _m, a8 as Im, av as Cm, ag as $m, a5 as wm, ar as xm, aw as Sm, ay as km, as as Tm, au as Rm, a3 as Am, a1 as Dm, ak as Fm, ap as Om, X as Em, Y as qm, W as Nm, Z as Pm, a6 as Lm, aq as Mm, aC as Bm, al as Vm, aj as Gm, am as jm, an as Km, ao as Wm, aa as Um, a9 as Qm, _ as Hm, a2 as Ym } from "../chunks/bookmark-state-Be2W3s6t.js";
|
|
8
|
+
import { L as Jm, D as Xm, E as Zm, d as eh, C as th, k as ah, x as sh, A as oh, q as nh, s as ih, B as rh, z as dh, n as lh, o as ch, p as uh, y as fh, F as mh, t as hh, v as ph, u as gh, w as bh } from "../chunks/stored-dashboard-Cmtl_Obh.js";
|
|
9
|
+
import { r as Uo, ab as va } from "../chunks/pivot-result-contract-expectations-CaS0y823.js";
|
|
10
|
+
import { aR as vh, aQ as _h, aM as Ih, aP as Ch, aS as $h, aG as wh } from "../chunks/pivot-result-contract-expectations-CaS0y823.js";
|
|
11
|
+
import { f as Qo, w as Ho, D as _a, a as Yo } from "../chunks/metric-comparison-BeKnUD08.js";
|
|
12
|
+
import { p as zo } from "../chunks/report-runtime-context-g4Zp_TU9.js";
|
|
13
|
+
import { r as Ya, D as Ia, h as Jo, i as za, j as Xo, k as Zo, l as en, f as St, m as tn, v as an } from "../chunks/filter-reach-copy-CifrEFxj.js";
|
|
14
|
+
import { N as Sh, $ as kh, S as Th, o as Rh, t as Ah, w as Dh, u as Fh, G as Oh, C as Eh, n as qh, q as Nh, J as Ph, d as Lh, a1 as Mh, L as Bh, M as Vh, _ as Gh, a0 as jh, E as Kh, X as Wh, F as Uh, x as Qh, y as Hh, A as Yh, p as zh, z as Jh, R as Xh, O as Zh, a2 as ep, Z as tp, Y as ap, K as sp, H as op, I as np, U as ip, T as rp, Q as dp, V as lp, P as cp, s as up, W as fp, B as mp } from "../chunks/filter-reach-copy-CifrEFxj.js";
|
|
15
|
+
import { a9 as Ja, r as Xa, aP as sn, b0 as Pe, aN as on, aS as nn, aM as rn, aG as dn, aO as ln, a7 as cn } from "../chunks/validators-BlEWWX9O.js";
|
|
16
16
|
import "../chunks/schema-C9NPiIru.js";
|
|
17
|
-
import { i as Za, C as
|
|
17
|
+
import { i as Za, C as je, D as un, e as fn, b as mn } from "../chunks/edit-9df1zOWe.js";
|
|
18
18
|
import "../chunks/matrix-operation-contract-CAanJeCj.js";
|
|
19
|
-
import { C as Me, D as Oe, B as
|
|
20
|
-
import { A as Ca, E as
|
|
19
|
+
import { C as Me, D as Oe, B as hn, f as pn, z as qt, t as Be, e as gn } from "../chunks/analytics-base-schemas-8wz9vqn_.js";
|
|
20
|
+
import { A as Ca, E as bn } from "../chunks/matrix-analytical-definition-CyWOwLmE.js";
|
|
21
21
|
import "zod";
|
|
22
22
|
import "../value-format-preferences/index.js";
|
|
23
|
-
import { d as
|
|
24
|
-
import { C as
|
|
25
|
-
import { r as
|
|
23
|
+
import { d as yn } from "../chunks/raw-temporal-value-BzdgeDa7.js";
|
|
24
|
+
import { C as pp, a as gp, S as bp } from "../chunks/pickers-DkqmtnTL.js";
|
|
25
|
+
import { r as vn } from "../chunks/index-CV_Kzou0.js";
|
|
26
26
|
import "../chunks/context-CVXTFljo.js";
|
|
27
|
-
import { v as ze, a as
|
|
28
|
-
import { S as
|
|
29
|
-
import { K as
|
|
30
|
-
import { b as
|
|
31
|
-
import { r as
|
|
32
|
-
import { n as
|
|
33
|
-
import { e as
|
|
34
|
-
const
|
|
27
|
+
import { v as ze, a as _n, i as $a, o as mt, d as In, b as Cn, c as $n } from "../chunks/variable-draft-CSK9Ps1o.js";
|
|
28
|
+
import { S as vp, f as _p, g as Ip, e as Cp, n as $p } from "../chunks/variable-draft-CSK9Ps1o.js";
|
|
29
|
+
import { K as xp, a as Sp, d as kp, r as Tp, b as Rp } from "../chunks/dates-Bb0sn54j.js";
|
|
30
|
+
import { b as Dp, d as Fp } from "../chunks/bookmark-impact-B0k90wq8.js";
|
|
31
|
+
import { r as be, b as wn, s as xn, a as Sn } from "../chunks/resolver-DG_tfEpt.js";
|
|
32
|
+
import { n as kn, r as Tn } from "../chunks/index-BVKzKl5d.js";
|
|
33
|
+
import { e as Ep } from "../chunks/brand-BoUV0iHF.js";
|
|
34
|
+
const qr = [
|
|
35
35
|
"cardType",
|
|
36
36
|
"sql",
|
|
37
37
|
"python",
|
|
@@ -47,36 +47,36 @@ const Er = [
|
|
|
47
47
|
"globalDateComparison",
|
|
48
48
|
"calendarContext",
|
|
49
49
|
"sqlRowLimit"
|
|
50
|
-
],
|
|
50
|
+
], Nr = [
|
|
51
51
|
"cardId",
|
|
52
52
|
"cardTitle",
|
|
53
53
|
"cache_config",
|
|
54
54
|
"queryConfig",
|
|
55
55
|
"tableConfig"
|
|
56
56
|
];
|
|
57
|
-
class
|
|
57
|
+
class le extends Error {
|
|
58
58
|
constructor(t, s, o) {
|
|
59
59
|
super(t);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Object.setPrototypeOf(this,
|
|
60
|
+
ct(this, "field");
|
|
61
|
+
ct(this, "details");
|
|
62
|
+
Object.setPrototypeOf(this, le.prototype), this.name = "CardQueryRequestError", this.field = s, this.details = o;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
function Nt(e) {
|
|
66
66
|
return e.label ? `${e.label}.` : "";
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function ye(e) {
|
|
69
69
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : { ...e };
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ke(e) {
|
|
72
72
|
return typeof e == "string" ? e : "";
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
const t =
|
|
74
|
+
function Rn(e, a = {}) {
|
|
75
|
+
const t = ye(e), s = Nt(a), o = {};
|
|
76
76
|
if (t.calendarContext !== void 0) {
|
|
77
|
-
const i =
|
|
77
|
+
const i = zo(t.calendarContext);
|
|
78
78
|
if (!i.ok)
|
|
79
|
-
throw new
|
|
79
|
+
throw new le(
|
|
80
80
|
`${s}calendarContext: ${i.issues.map((d) => d.message).join("; ")}`,
|
|
81
81
|
"calendarContext",
|
|
82
82
|
i.issues
|
|
@@ -85,31 +85,31 @@ function Tn(e, a = {}) {
|
|
|
85
85
|
}
|
|
86
86
|
const n = ws(t.resolvedPrimaryDateField);
|
|
87
87
|
if (!n.ok)
|
|
88
|
-
throw new
|
|
88
|
+
throw new le(
|
|
89
89
|
`${s}${xs(n.issues)}`,
|
|
90
90
|
"resolvedPrimaryDateField",
|
|
91
91
|
n.issues
|
|
92
92
|
);
|
|
93
93
|
if (t.resolvedPrimaryDateField && (o.resolvedPrimaryDateField = t.resolvedPrimaryDateField), t.globalDateComparison !== void 0) {
|
|
94
|
-
const i =
|
|
94
|
+
const i = Qo(t.globalDateComparison);
|
|
95
95
|
if (!i.ok)
|
|
96
|
-
throw new
|
|
96
|
+
throw new le(
|
|
97
97
|
`${s}Invalid globalDateComparison: ${i.errors.map((d) => `${d.path}: ${d.message}`).join("; ")}`,
|
|
98
98
|
"globalDateComparison",
|
|
99
99
|
i.errors
|
|
100
100
|
);
|
|
101
|
-
o.globalDateComparison =
|
|
101
|
+
o.globalDateComparison = Ho(
|
|
102
102
|
t.globalDateComparison
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
return o;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const t =
|
|
107
|
+
function Pr(e, a = {}) {
|
|
108
|
+
const t = ye(e), s = Nt(a), o = {};
|
|
109
109
|
if (t.pagination !== void 0) {
|
|
110
|
-
const n =
|
|
110
|
+
const n = ye(t.pagination), i = n.page, d = n.pageSize;
|
|
111
111
|
if (!Number.isInteger(i) || i < 1 || !Number.isInteger(d) || d < 1)
|
|
112
|
-
throw new
|
|
112
|
+
throw new le(
|
|
113
113
|
`${s}pagination must name a page and a page size of at least 1`,
|
|
114
114
|
"pagination"
|
|
115
115
|
);
|
|
@@ -117,18 +117,18 @@ function Nr(e, a = {}) {
|
|
|
117
117
|
}
|
|
118
118
|
if (t.tableTotalsRequest !== void 0) {
|
|
119
119
|
if (!t.tableTotalsRequest || typeof t.tableTotalsRequest != "object" || Array.isArray(t.tableTotalsRequest))
|
|
120
|
-
throw new
|
|
120
|
+
throw new le(`${s}tableTotalsRequest must be an object`, "tableTotalsRequest");
|
|
121
121
|
o.tableTotalsRequest = t.tableTotalsRequest;
|
|
122
122
|
}
|
|
123
123
|
if (t.sourceRowProbe !== void 0) {
|
|
124
|
-
const n =
|
|
124
|
+
const n = ye(t.sourceRowProbe).limit;
|
|
125
125
|
if (!Number.isInteger(n) || n < 1)
|
|
126
|
-
throw new
|
|
126
|
+
throw new le(
|
|
127
127
|
`${s}sourceRowProbe must name a limit of at least 1`,
|
|
128
128
|
"sourceRowProbe"
|
|
129
129
|
);
|
|
130
130
|
if (o.pagination)
|
|
131
|
-
throw new
|
|
131
|
+
throw new le(
|
|
132
132
|
`${s}sourceRowProbe cannot be combined with pagination`,
|
|
133
133
|
"sourceRowProbe"
|
|
134
134
|
);
|
|
@@ -136,15 +136,15 @@ function Nr(e, a = {}) {
|
|
|
136
136
|
}
|
|
137
137
|
return o;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
const t =
|
|
139
|
+
function Lr(e, a = {}) {
|
|
140
|
+
const t = ye(e), s = Nt(a), o = (x) => new le(`${s}${x} is required`, x), n = Ke(t.connection_id).trim();
|
|
141
141
|
if (!n) throw o("connection_id");
|
|
142
|
-
const i =
|
|
142
|
+
const i = Ke(t.cardType).trim();
|
|
143
143
|
if (!i) throw o("cardType");
|
|
144
144
|
const d = t.resultOwner;
|
|
145
145
|
if (d !== "config" && d !== "freeform" && d !== "none")
|
|
146
146
|
throw o("resultOwner");
|
|
147
|
-
const l =
|
|
147
|
+
const l = ye(t.cardConfig), c = Ke(t.sql), h = Ke(t.python), p = !!a.configOptional || Object.keys(l).length > 0;
|
|
148
148
|
if (d === "config" && !p) throw o("cardConfig");
|
|
149
149
|
if (d === "freeform" && !c.trim()) throw o("sql");
|
|
150
150
|
const v = Ss({
|
|
@@ -153,12 +153,12 @@ function Pr(e, a = {}) {
|
|
|
153
153
|
normalizedPython: h
|
|
154
154
|
});
|
|
155
155
|
if (d !== v)
|
|
156
|
-
throw new
|
|
156
|
+
throw new le(
|
|
157
157
|
`${s}resultOwner must match the normalized execution owner "${v}"`,
|
|
158
158
|
"resultOwner"
|
|
159
159
|
);
|
|
160
160
|
if (d === "none") throw o("cardConfig");
|
|
161
|
-
const b =
|
|
161
|
+
const b = ye(t.cardDataSource);
|
|
162
162
|
if (Object.keys(b).length === 0) throw o("cardDataSource");
|
|
163
163
|
const S = ks({
|
|
164
164
|
controlValues: t.controlValues,
|
|
@@ -179,13 +179,13 @@ function Pr(e, a = {}) {
|
|
|
179
179
|
controlDefinitions: S.controlDefinitions,
|
|
180
180
|
cardControlDefinitions: S.cardControlDefinitions,
|
|
181
181
|
controlBindings: S.controlBindings,
|
|
182
|
-
...
|
|
182
|
+
...Rn(t, a),
|
|
183
183
|
...typeof t.sqlRowLimit == "number" && Number.isInteger(t.sqlRowLimit) && t.sqlRowLimit > 0 ? { sqlRowLimit: t.sqlRowLimit } : {}
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
const
|
|
187
|
-
function
|
|
188
|
-
const a = [], t =
|
|
186
|
+
const ht = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"], An = ["spacing", "canvasPadding", "canvas", "cardCorners", "chartColors"], es = ["light", "dark"];
|
|
187
|
+
function Mr(e) {
|
|
188
|
+
const a = [], t = gt(e.globalStyle) ? e.globalStyle : {}, s = gt(t.default) ? t.default : {}, o = gt(t.dark) ? t.dark : {}, n = (p) => be(o, p) ?? be(s, p), i = {}, d = n(["gridLayout", "margin"]);
|
|
189
189
|
Array.isArray(d) && typeof d[1] == "number" && (i.spacing = Fe("spacing", d[1], a), i.canvasPadding = Fe("canvasPadding", d[1], a));
|
|
190
190
|
const l = n(["cardBorderRadius"]);
|
|
191
191
|
typeof l == "number" && (i.cardCorners = Fe("cardCorners", l, a));
|
|
@@ -194,24 +194,24 @@ function Lr(e) {
|
|
|
194
194
|
const h = n(["chart", "options", "borderRadius"]);
|
|
195
195
|
typeof h == "number" && (i.barCorners = Fe("barCorners", h, a));
|
|
196
196
|
for (const p of es) {
|
|
197
|
-
const v = p === "light" ?
|
|
197
|
+
const v = p === "light" ? be(s, ["canvasTheme"]) : n(["canvasTheme"]), b = On(v, a);
|
|
198
198
|
b !== void 0 && (i.canvas = { ...i.canvas, [p]: b });
|
|
199
|
-
const S =
|
|
199
|
+
const S = Fn(s, o, p);
|
|
200
200
|
if (S) {
|
|
201
201
|
const x = S.filter(Za).map((E) => E.toLowerCase());
|
|
202
|
-
x.length < S.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${p}: ${S.length - x.length} colours that aren't hex` }), x.length >=
|
|
202
|
+
x.length < S.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${p}: ${S.length - x.length} colours that aren't hex` }), x.length >= je.min && (i.chartColors = { ...i.chartColors, [p]: x.slice(0, je.max) }), x.length > je.max && a.push({ field: "chartColors", kind: "clamped", detail: `${p}: kept the first ${je.max} colours` });
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
return { style:
|
|
205
|
+
return { style: Dn(i, e.organizationAppearance, a), notes: a };
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const s =
|
|
207
|
+
function Dn(e, a, t) {
|
|
208
|
+
const s = wn({ organizationAppearance: a ? kn(a).spec : null }), o = { ...e };
|
|
209
209
|
for (const n of Object.keys(e)) {
|
|
210
|
-
const i =
|
|
210
|
+
const i = Sn[n], d = n === "canvas" || n === "chartColors";
|
|
211
211
|
for (const l of es) {
|
|
212
|
-
const c =
|
|
212
|
+
const c = xn(o, n, l);
|
|
213
213
|
if (c === void 0) continue;
|
|
214
|
-
const h =
|
|
214
|
+
const h = An.includes(n) && be(Tn(a, l), i) !== void 0, p = JSON.stringify(be(s.schemes[l], i)) === JSON.stringify(c);
|
|
215
215
|
if (!(!h && !p))
|
|
216
216
|
if ((d || l === "light") && t.push({ field: n, kind: h ? "brand_wins" : "equal_to_inherited", detail: d ? l : `${JSON.stringify(c)}` }), d) {
|
|
217
217
|
const v = { ...o[n] };
|
|
@@ -221,19 +221,19 @@ function An(e, a, t) {
|
|
|
221
221
|
}
|
|
222
222
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
const s =
|
|
224
|
+
function Fn(e, a, t) {
|
|
225
|
+
const s = be(e, ["chart", "dataset", "backgroundColor"]), o = be(a, ["chart", "dataset", "backgroundColor"]), n = pt(ht, s);
|
|
226
226
|
if (t === "light") return Array.isArray(s) ? n : void 0;
|
|
227
|
-
const i =
|
|
228
|
-
if (!(!Array.isArray(o) && JSON.stringify(i) === JSON.stringify(
|
|
227
|
+
const i = pt(n, pt(ht, o));
|
|
228
|
+
if (!(!Array.isArray(o) && JSON.stringify(i) === JSON.stringify(ht)))
|
|
229
229
|
return Array.isArray(s) || Array.isArray(o) ? i : void 0;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function pt(e, a) {
|
|
232
232
|
if (!Array.isArray(a)) return [...e];
|
|
233
233
|
const t = Math.max(e.length, a.length);
|
|
234
234
|
return Array.from({ length: t }, (s, o) => a[o] !== void 0 ? String(a[o]) : e[o]);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function On(e, a) {
|
|
237
237
|
if (!(e == null || e === "")) {
|
|
238
238
|
if (e === "muted") return "muted";
|
|
239
239
|
if (e === "clear") return "background";
|
|
@@ -242,13 +242,13 @@ function Fn(e, a) {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function Fe(e, a, t) {
|
|
245
|
-
const { min: s, max: o } =
|
|
245
|
+
const { min: s, max: o } = un[e], n = Math.min(o, Math.max(s, Math.round(a)));
|
|
246
246
|
return n !== a && t.push({ field: e, kind: "clamped", detail: `${a} → ${n}` }), n;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function gt(e) {
|
|
249
249
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
250
250
|
}
|
|
251
|
-
const
|
|
251
|
+
const bt = {
|
|
252
252
|
spacing: (e, a) => a.spacing = e,
|
|
253
253
|
canvasPadding: (e, a) => a.canvasPadding = e,
|
|
254
254
|
canvas: (e, a) => a.canvas = e,
|
|
@@ -259,21 +259,21 @@ const gt = {
|
|
|
259
259
|
chartColors: (e, a) => a.chartColors = e,
|
|
260
260
|
barCorners: (e, a) => a.barCorners = e
|
|
261
261
|
};
|
|
262
|
-
function
|
|
262
|
+
function En(e) {
|
|
263
263
|
var t;
|
|
264
264
|
const a = {};
|
|
265
265
|
for (const [s, o] of Object.entries(e ?? {}))
|
|
266
|
-
o !== void 0 && ((t =
|
|
266
|
+
o !== void 0 && ((t = bt[s]) == null || t.call(bt, o, a));
|
|
267
267
|
return a;
|
|
268
268
|
}
|
|
269
|
-
const
|
|
269
|
+
const qn = {
|
|
270
270
|
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.",
|
|
271
271
|
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.",
|
|
272
272
|
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."
|
|
273
273
|
};
|
|
274
|
-
function
|
|
274
|
+
function Nn(e, a, t = {}) {
|
|
275
275
|
var d;
|
|
276
|
-
const s =
|
|
276
|
+
const s = ve(e), o = Mo(a.scope), n = new Set(Wa(e).map((l) => l.id)), i = {
|
|
277
277
|
reaches: [],
|
|
278
278
|
excluded: [
|
|
279
279
|
.../* @__PURE__ */ new Set([
|
|
@@ -358,16 +358,16 @@ function qn(e, a, t = {}) {
|
|
|
358
358
|
}
|
|
359
359
|
return i;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Pn(e, a) {
|
|
362
362
|
var o;
|
|
363
363
|
const t = a.scope;
|
|
364
364
|
if (t.kind === "allSheets") {
|
|
365
365
|
if ((o = t.sheetKinds) != null && o.length && !t.sheetKinds.includes("dashboard")) return;
|
|
366
|
-
const n =
|
|
366
|
+
const n = Bo(t);
|
|
367
367
|
return {
|
|
368
368
|
sheetIds: "all",
|
|
369
369
|
...n.length ? { exceptSheetIds: [...n] } : {},
|
|
370
|
-
...
|
|
370
|
+
...Vo(t) ? { includesDocumentSheets: !0 } : {}
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
if (t.kind !== "sheets") return;
|
|
@@ -383,12 +383,12 @@ function ts(e, a) {
|
|
|
383
383
|
}
|
|
384
384
|
function as(e, a, t, s) {
|
|
385
385
|
var E, C, k;
|
|
386
|
-
const { input: o } = a, n =
|
|
386
|
+
const { input: o } = a, n = Nn(e, o, s), i = (y, F) => ({
|
|
387
387
|
filterId: o.id,
|
|
388
388
|
label: o.label,
|
|
389
389
|
editable: !1,
|
|
390
390
|
kind: F,
|
|
391
|
-
notEditable: { reason: y, message:
|
|
391
|
+
notEditable: { reason: y, message: qn[y] },
|
|
392
392
|
reaches: n.reaches,
|
|
393
393
|
excluded: n.excluded,
|
|
394
394
|
...n.blocked ? { blocked: n.blocked } : {},
|
|
@@ -398,13 +398,13 @@ function as(e, a, t, s) {
|
|
|
398
398
|
if (o.filter.kind === "global-date") return i("global_date", "global_date");
|
|
399
399
|
const d = Ts(o.filter).filter((y) => y.kind === "semantic");
|
|
400
400
|
if (d.length !== 1 || d[0].kind !== "semantic") return i("not_semantic", "field");
|
|
401
|
-
const l =
|
|
401
|
+
const l = Pn(e, o);
|
|
402
402
|
if (!l || a.origin !== "embeddedInput") return i("scope_not_expressible", "field");
|
|
403
403
|
const c = ((E = o.filter.fieldMeta) == null ? void 0 : E.name) ?? ((C = o.filter.column) == null ? void 0 : C.split(".").pop()) ?? "", h = Ya({
|
|
404
404
|
dashboard: e,
|
|
405
405
|
target: { kind: "dashboardInput", input: o, scope: {} },
|
|
406
406
|
calendar: ts(t, void 0)
|
|
407
|
-
}).value, p = Ja(o.filter.dataType), v = p || (k = h == null ? void 0 : h.values) == null ? void 0 : k.filter((y) => ["string", "number", "boolean"].includes(typeof y)), b = Xa(h && "relativeMeta" in h ? h.relativeMeta : void 0), S = p ? b : void 0, x = S ?
|
|
407
|
+
}).value, p = Ja(o.filter.dataType), v = p || (k = h == null ? void 0 : h.values) == null ? void 0 : k.filter((y) => ["string", "number", "boolean"].includes(typeof y)), b = Xa(h && "relativeMeta" in h ? h.relativeMeta : void 0), S = p ? b : void 0, x = S ? Ln(h == null ? void 0 : h.operation, S) ?? sn(
|
|
408
408
|
S,
|
|
409
409
|
{ use: "filterDefault", columnHasTime: Na(o.filter) === "datetime" },
|
|
410
410
|
"defaultPeriod"
|
|
@@ -425,8 +425,8 @@ function as(e, a, t, s) {
|
|
|
425
425
|
...n
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
const t = typeof e == "string" ?
|
|
428
|
+
function Ln(e, a) {
|
|
429
|
+
const t = typeof e == "string" ? yn(e, a) : void 0;
|
|
430
430
|
return t ? {
|
|
431
431
|
reason: "point_default",
|
|
432
432
|
message: `The default is "${t}", a condition set in the editor. It stays while defaultPeriod is left out.`,
|
|
@@ -435,10 +435,10 @@ function Pn(e, a) {
|
|
|
435
435
|
} : void 0;
|
|
436
436
|
}
|
|
437
437
|
function ss(e, a, t) {
|
|
438
|
-
return
|
|
438
|
+
return ve(e).inputs.map((s) => as(e, s, a, t));
|
|
439
439
|
}
|
|
440
440
|
function Le(e, a, t, s) {
|
|
441
|
-
const o =
|
|
441
|
+
const o = ve(e).findFilterInput({ inputId: a });
|
|
442
442
|
return o ? as(e, o, t, s) : void 0;
|
|
443
443
|
}
|
|
444
444
|
const Pt = (e) => `${e.domainId}\0${e.datasetName}`;
|
|
@@ -465,7 +465,7 @@ function is(e) {
|
|
|
465
465
|
field: s
|
|
466
466
|
}));
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Mn(e) {
|
|
469
469
|
const a = ns(e), t = /* @__PURE__ */ new Map();
|
|
470
470
|
for (const { field: s } of is(e)) {
|
|
471
471
|
const o = os(s, a);
|
|
@@ -473,17 +473,18 @@ function Ln(e) {
|
|
|
473
473
|
}
|
|
474
474
|
return [...t.values()];
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Bn(e, a, t) {
|
|
477
477
|
if (!t) return;
|
|
478
478
|
const s = ca(a), o = is(e).find((d) => ca(d.ref) === s);
|
|
479
479
|
if (!o) return;
|
|
480
480
|
const n = os(o.field, ns(e)), i = n ? t[Pt(n)] : void 0;
|
|
481
|
-
return i ?
|
|
481
|
+
return i ? nt(i, o.field.name, n.datasetName) : void 0;
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "trend", "trendGrain", "seeRecords"], Vn = {
|
|
484
484
|
orientation: "orientation",
|
|
485
485
|
stack: "stacking",
|
|
486
486
|
donut: "donut hole",
|
|
487
|
+
columnOrder: "column order",
|
|
487
488
|
totals: "total row",
|
|
488
489
|
dataLabels: "data labels",
|
|
489
490
|
legend: "legend",
|
|
@@ -493,24 +494,24 @@ const St = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "
|
|
|
493
494
|
trend: "trend under its value",
|
|
494
495
|
trendGrain: "trend grain",
|
|
495
496
|
seeRecords: "records to see"
|
|
496
|
-
},
|
|
497
|
-
function
|
|
498
|
-
const a = `${e.sql ? "SQL " : ""}${
|
|
497
|
+
}, Gn = { x: "xAxisConfig", y: "yAxisConfig" }, yt = { x: "horizontal", y: "vertical" };
|
|
498
|
+
function jn(e) {
|
|
499
|
+
const a = `${e.sql ? "SQL " : ""}${Ps(e.type)}`;
|
|
499
500
|
return `${/^[aeiou]/i.test(a) ? "an" : "a"} ${a}`;
|
|
500
501
|
}
|
|
501
502
|
function Kn(e, a, t) {
|
|
502
503
|
const s = Object.fromEntries(Object.entries(a).filter(([o, n]) => n !== void 0 && !t.includes(o)));
|
|
503
504
|
return Object.keys(s).length ? { op: "card.update", cardId: e.cardRef, ...s } : void 0;
|
|
504
505
|
}
|
|
505
|
-
function
|
|
506
|
+
function Wn(e, a, t, s, o) {
|
|
506
507
|
var b, S, x, E, C, k, y, F, w, N, I;
|
|
507
|
-
const n =
|
|
508
|
+
const n = tt.filter((_) => t[_] !== void 0);
|
|
508
509
|
if (!n.length) return {};
|
|
509
|
-
const i =
|
|
510
|
+
const i = tt.filter((_) => a.settings.has(_)), d = n.filter((_) => !a.settings.has(_));
|
|
510
511
|
for (const _ of d)
|
|
511
512
|
o.push(
|
|
512
|
-
|
|
513
|
-
message: `${
|
|
513
|
+
U("setting_not_for_card", {
|
|
514
|
+
message: `${K(e.title)} is ${jn(a)}, which has no ${Vn[_]}.`,
|
|
514
515
|
path: `${s.path}.${_}`,
|
|
515
516
|
fix: i.length ? `Leave out ${_}; this card takes ${i.join(", ")}.` : `Leave out ${_}.`,
|
|
516
517
|
allowed: i,
|
|
@@ -526,16 +527,20 @@ function jn(e, a, t, s, o) {
|
|
|
526
527
|
};
|
|
527
528
|
["orientation", "stack", "donut"].some((_) => h[_] !== c[_]) && (l.variant = As(a.type, h));
|
|
528
529
|
const p = l.variant ? Ds(e, l.variant) : e, v = Ft(p);
|
|
530
|
+
if (t.columnOrder) {
|
|
531
|
+
const _ = Fs(e, a, t.columnOrder, s, o);
|
|
532
|
+
_ && (l.columnOrder = _);
|
|
533
|
+
}
|
|
529
534
|
if (t.totals) {
|
|
530
|
-
const _ =
|
|
535
|
+
const _ = Os(e, a, t.totals, ((S = v.totals) == null ? void 0 : S.row) ?? !1, s, o);
|
|
531
536
|
_ && (l.totals = _);
|
|
532
537
|
}
|
|
533
538
|
if (t.dataLabels) {
|
|
534
539
|
const _ = {};
|
|
535
|
-
t.dataLabels.show !==
|
|
540
|
+
t.dataLabels.show !== Es(p) && (_.show = t.dataLabels.show);
|
|
536
541
|
const D = t.dataLabels.format;
|
|
537
542
|
if (D === null && ((x = v.dataLabels) != null && x.format) && (_.format = null), D) {
|
|
538
|
-
const M =
|
|
543
|
+
const M = Un(e, a, D, `${s.path}.dataLabels.format`, o);
|
|
539
544
|
M && !Pe(M, (E = v.dataLabels) == null ? void 0 : E.format) && (_.format = M);
|
|
540
545
|
}
|
|
541
546
|
Object.keys(_).length && (l.dataLabels = _);
|
|
@@ -545,12 +550,12 @@ function jn(e, a, t, s, o) {
|
|
|
545
550
|
t.legend.show !== ((C = v.legend) == null ? void 0 : C.show) && (_.show = t.legend.show), t.legend.position !== void 0 && t.legend.position !== ((k = v.legend) == null ? void 0 : k.position) && (_.position = t.legend.position), Object.keys(_).length && (l.legend = _);
|
|
546
551
|
}
|
|
547
552
|
if (t.axes) {
|
|
548
|
-
const _ =
|
|
553
|
+
const _ = qs(p.type, p.preferences), D = {};
|
|
549
554
|
for (const M of ["x", "y"]) {
|
|
550
555
|
const P = t.axes[M];
|
|
551
556
|
if (!P) continue;
|
|
552
|
-
const G =
|
|
553
|
-
G && (D[
|
|
557
|
+
const G = Qn(e, M, P, ((y = v.axes) == null ? void 0 : y[M]) ?? {}, M === _, `${s.path}.axes.${M}`, o);
|
|
558
|
+
G && (D[Gn[M]] = G);
|
|
554
559
|
}
|
|
555
560
|
Object.keys(D).length && (l.axes = D);
|
|
556
561
|
}
|
|
@@ -559,10 +564,10 @@ function jn(e, a, t, s, o) {
|
|
|
559
564
|
M !== void 0 && M !== ((_ == null ? void 0 : _.showComparison) ?? !0) && (D.show = M), P !== void 0 && P !== ((_ == null ? void 0 : _.displayMode) ?? "difference") && (D.mode = P), G !== void 0 && G !== ((_ == null ? void 0 : _.precision) ?? null) && (D.precision = G), Object.keys(D).length && (l.comparisonDisplay = D);
|
|
560
565
|
}
|
|
561
566
|
if (t.inheritComparison !== void 0 && t.inheritComparison !== (((w = e.preferences) == null ? void 0 : w.inheritGlobalComparison) !== !1) && (l.inheritComparison = t.inheritComparison), t.seeRecords !== void 0 && t.seeRecords !== (e.seeRecords !== !1) && (l.seeRecords = t.seeRecords), t.trend !== void 0 && t.trend !== (((N = e.config) == null ? void 0 : N.kpiBand) === "trend") && (l.trend = t.trend), t.trendGrain !== void 0) {
|
|
562
|
-
const _ =
|
|
567
|
+
const _ = Ns(e.config);
|
|
563
568
|
_ ? o.push(
|
|
564
|
-
|
|
565
|
-
message: `${
|
|
569
|
+
U("value_invalid", {
|
|
570
|
+
message: `${K(e.title)} draws its trend by its Trend By${_.granularity ? `, by ${_.granularity}` : ""}, so it takes no grain of its own.`,
|
|
566
571
|
path: `${s.path}.trendGrain`,
|
|
567
572
|
fix: "Change the Trend By's timeGrain in its query, or remove the Trend By to set a grain here.",
|
|
568
573
|
allowed: []
|
|
@@ -571,13 +576,13 @@ function jn(e, a, t, s, o) {
|
|
|
571
576
|
}
|
|
572
577
|
return l;
|
|
573
578
|
}
|
|
574
|
-
function
|
|
575
|
-
const n = String(t.type), i =
|
|
579
|
+
function Un(e, a, t, s, o) {
|
|
580
|
+
const n = String(t.type), i = Ls("cartesian", "number"), d = Me(n), l = d == null ? void 0 : d.safeParse(t);
|
|
576
581
|
if (!i.includes(n) || !(l != null && l.success)) {
|
|
577
582
|
const h = l && !l.success ? l.error.issues[0] : void 0;
|
|
578
583
|
o.push(
|
|
579
|
-
|
|
580
|
-
message: i.includes(n) ? `That format for the values on ${
|
|
584
|
+
U("format_invalid", {
|
|
585
|
+
message: i.includes(n) ? `That format for the values on ${K(e.title)} isn't valid: ${(h == null ? void 0 : h.message) ?? "invalid"}.` : `The values on ${K(e.title)} are numbers, so they can't take a ${n.replace("_", " ")} format.`,
|
|
581
586
|
path: s,
|
|
582
587
|
fix: "Send a whole number, currency, percent, scientific or duration format.",
|
|
583
588
|
allowed: i.includes(n) ? Oe(n) : [...i]
|
|
@@ -587,20 +592,20 @@ function Wn(e, a, t, s, o) {
|
|
|
587
592
|
}
|
|
588
593
|
const c = La({ surface: a.type === "pie" ? "pie" : "cartesian", value: "number", rawValueKinds: [] }, l.data);
|
|
589
594
|
if (!c.ok) {
|
|
590
|
-
o.push(
|
|
595
|
+
o.push(U("format_invalid", { message: `${K(e.title)} can't draw that format on its values: ${c.reason}.`, path: s }));
|
|
591
596
|
return;
|
|
592
597
|
}
|
|
593
598
|
return l.data;
|
|
594
599
|
}
|
|
595
|
-
function
|
|
600
|
+
function Qn(e, a, t, s, o, n, i) {
|
|
596
601
|
const d = {};
|
|
597
|
-
t.title !== void 0 && (t.title !== null && !t.title.trim() ? i.push(
|
|
602
|
+
t.title !== void 0 && (t.title !== null && !t.title.trim() ? i.push(U("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));
|
|
598
603
|
const l = ["min", "max"].filter((c) => t[c] !== void 0 && t[c] !== null);
|
|
599
604
|
if (!o && l.length) {
|
|
600
|
-
const c =
|
|
605
|
+
const c = yt[a === "x" ? "y" : "x"];
|
|
601
606
|
i.push(
|
|
602
|
-
|
|
603
|
-
message: `${
|
|
607
|
+
U("setting_not_for_card", {
|
|
608
|
+
message: `${K(e.title)}'s ${yt[a]} axis lists categories; set a range on its ${c} axis.`,
|
|
604
609
|
path: `${n}.${l[0]}`,
|
|
605
610
|
allowed: ["title"]
|
|
606
611
|
})
|
|
@@ -612,7 +617,7 @@ function Un(e, a, t, s, o, n, i) {
|
|
|
612
617
|
const v = t[p];
|
|
613
618
|
if (v !== void 0) {
|
|
614
619
|
if (v !== null && !Number.isFinite(v)) {
|
|
615
|
-
i.push(
|
|
620
|
+
i.push(U("value_invalid", { message: `An axis ${p} must be a number.`, path: `${n}.${p}` }));
|
|
616
621
|
return;
|
|
617
622
|
}
|
|
618
623
|
(v ?? void 0) !== s[p] && (d[p] = v);
|
|
@@ -621,8 +626,8 @@ function Un(e, a, t, s, o, n, i) {
|
|
|
621
626
|
const c = t.min !== void 0 ? t.min : s.min, h = t.max !== void 0 ? t.max : s.max;
|
|
622
627
|
if (typeof c == "number" && typeof h == "number" && c > h) {
|
|
623
628
|
i.push(
|
|
624
|
-
|
|
625
|
-
message: `The ${
|
|
629
|
+
U("value_invalid", {
|
|
630
|
+
message: `The ${yt[a]} axis of ${K(e.title)} can't start at ${c} and end at ${h}.`,
|
|
626
631
|
path: n,
|
|
627
632
|
fix: "Send a min no greater than the max."
|
|
628
633
|
})
|
|
@@ -634,8 +639,8 @@ function Un(e, a, t, s, o, n, i) {
|
|
|
634
639
|
}
|
|
635
640
|
function wa(e, a, t, s, o) {
|
|
636
641
|
const n = o === "date" && s.role === "dimension";
|
|
637
|
-
return
|
|
638
|
-
message: o === "text" ? `${a} on ${
|
|
642
|
+
return U("setting_not_for_card", {
|
|
643
|
+
message: o === "text" ? `${a} on ${K(e.title)} shows its text as it is; text formats apply on a Matrix only.` : o === "category" ? `${a} labels the categories of ${K(e.title)}, which a chart shows as the query returns them; format it on a table or a Matrix.` : `${K(e.title)} shows ${a}, ${rs(s)}, without a format of its own; this card type doesn't apply one.`,
|
|
639
644
|
path: t,
|
|
640
645
|
...n ? { fix: `Group ${a} by day, week, month, quarter or year to format its dates.` } : {}
|
|
641
646
|
});
|
|
@@ -648,22 +653,22 @@ function kt(e, a, t, s) {
|
|
|
648
653
|
const { [s]: o, ...n } = t;
|
|
649
654
|
return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
|
|
650
655
|
}
|
|
651
|
-
function
|
|
656
|
+
function Hn(e, a, t) {
|
|
652
657
|
const { hidden: s, width: o, ...n } = t;
|
|
653
658
|
return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
|
|
654
659
|
}
|
|
655
660
|
function We(e, a, t) {
|
|
656
661
|
return { op: "card.update", cardId: e.cardRef, columns: { [a]: { format: t } } };
|
|
657
662
|
}
|
|
658
|
-
function
|
|
663
|
+
function Yn(e, a, t, s, o, n, i) {
|
|
659
664
|
var c;
|
|
660
665
|
const d = o.label;
|
|
661
666
|
if (d === void 0 || d === t.label) return;
|
|
662
667
|
const l = `${Se(n.path, s)}.label`;
|
|
663
668
|
if (!a.settings.has("columns.label") || !t.labelKey) {
|
|
664
669
|
i.push(
|
|
665
|
-
|
|
666
|
-
message: a.sql ? `${
|
|
670
|
+
U("setting_not_for_card", {
|
|
671
|
+
message: a.sql ? `${K(e.title)}'s column ${s} takes its header from the query; rename it in the SQL.` : `${s} on ${K(e.title)} takes no header of its own.`,
|
|
667
672
|
path: l,
|
|
668
673
|
allowed: ["hidden", "width", "format"].filter((h) => h !== "hidden" || a.settings.has("columns.hidden")),
|
|
669
674
|
suggestedChange: kt(n, s, o, "label")
|
|
@@ -672,23 +677,23 @@ function Hn(e, a, t, s, o, n, i) {
|
|
|
672
677
|
return;
|
|
673
678
|
}
|
|
674
679
|
if (d === null) {
|
|
675
|
-
const h = ((c =
|
|
680
|
+
const h = ((c = Bn(e, t.ref, n.catalogs)) == null ? void 0 : c.label) || t.field || t.label;
|
|
676
681
|
return t.labelInherited && t.label === h ? void 0 : { key: t.labelKey, label: h, origin: "semantic" };
|
|
677
682
|
}
|
|
678
683
|
if (!d.trim()) {
|
|
679
|
-
i.push(
|
|
684
|
+
i.push(U("value_invalid", { message: "A column header can't be empty.", path: l, fix: "Send a header, or null to use the model's." }));
|
|
680
685
|
return;
|
|
681
686
|
}
|
|
682
687
|
return { key: t.labelKey, label: d };
|
|
683
688
|
}
|
|
684
|
-
function
|
|
689
|
+
function zn(e, a, t, s, o, n, i) {
|
|
685
690
|
var _, D, M;
|
|
686
691
|
const d = `${Se(n.path, s)}.format`;
|
|
687
692
|
if (!a.settings.has("columns.format")) {
|
|
688
|
-
i.push(
|
|
693
|
+
i.push(U("setting_not_for_card", { message: `${K(e.title)} takes no column formats.`, path: d }));
|
|
689
694
|
return;
|
|
690
695
|
}
|
|
691
|
-
const l = t.ref, c = ((_ = n.modelFormats) == null ? void 0 : _.status) === "read" ? n.modelFormats.formats : void 0, h = l.kind === "matrixLevel" ? c == null ? void 0 : c[l.levelId] : l.kind === "matrixMeasure" ? c == null ? void 0 : c[l.measureId] : void 0, p =
|
|
696
|
+
const l = t.ref, c = ((_ = n.modelFormats) == null ? void 0 : _.status) === "read" ? n.modelFormats.formats : void 0, h = l.kind === "matrixLevel" ? c == null ? void 0 : c[l.levelId] : l.kind === "matrixMeasure" ? c == null ? void 0 : c[l.measureId] : void 0, p = Uo({
|
|
692
697
|
card: e,
|
|
693
698
|
column: l,
|
|
694
699
|
...c ? { modelFormats: c } : {},
|
|
@@ -696,7 +701,7 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
696
701
|
}), v = p.source === "override" ? p.format : void 0;
|
|
697
702
|
if (o === null) return v ? null : void 0;
|
|
698
703
|
if (v && Pe(o, v)) return;
|
|
699
|
-
const b = Ks(e, a, t, n.sqlResultColumns), S = b.value, x =
|
|
704
|
+
const b = Ks(e, a, t, n.sqlResultColumns), S = b.value, x = Ws(b);
|
|
700
705
|
if (x.length === 0) {
|
|
701
706
|
i.push(wa(e, s, d, t, S));
|
|
702
707
|
return;
|
|
@@ -705,9 +710,9 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
705
710
|
if (E && !p.format) {
|
|
706
711
|
const P = x[0];
|
|
707
712
|
i.push(
|
|
708
|
-
|
|
713
|
+
U("format_invalid", {
|
|
709
714
|
// Unavailable is not "none": say which, so the agent knows the column may have a model format (ledger P2-20).
|
|
710
|
-
message: ((D = n.modelFormats) == null ? void 0 : D.status) === "unavailable" ? `${s} on ${
|
|
715
|
+
message: ((D = n.modelFormats) == null ? void 0 : D.status) === "unavailable" ? `${s} on ${K(e.title)} may follow its model's format, which couldn't be read; state the whole format with its type.` : `${s} on ${K(e.title)} has no format to change; state the whole format with its type.`,
|
|
711
716
|
path: d,
|
|
712
717
|
fix: "Add `type` to the format.",
|
|
713
718
|
allowed: Oe(P),
|
|
@@ -719,8 +724,8 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
719
724
|
const C = E ? { ...p.format, ...o } : o, k = String(C.type);
|
|
720
725
|
if (!x.includes(k)) {
|
|
721
726
|
i.push(
|
|
722
|
-
k === "string" ? wa(e, s, `${d}.type`, t, "text") :
|
|
723
|
-
message: S === "result" ? `${s} on ${
|
|
727
|
+
k === "string" ? wa(e, s, `${d}.type`, t, "text") : U("format_invalid", {
|
|
728
|
+
message: S === "result" ? `${s} on ${K(e.title)} comes straight from the query, so it can't take a ${k.replace("_", " ")} format.` : `${s} on ${K(e.title)} is ${rs(t)}, so it can't take a ${k.replace("_", " ")} format.`,
|
|
724
729
|
path: `${d}.type`,
|
|
725
730
|
allowed: [...x]
|
|
726
731
|
})
|
|
@@ -731,11 +736,11 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
731
736
|
if (!y || !(F != null && F.success)) {
|
|
732
737
|
const P = F && !F.success ? F.error.issues[0] : void 0;
|
|
733
738
|
i.push(
|
|
734
|
-
|
|
739
|
+
U("format_invalid", {
|
|
735
740
|
message: y ? (P == null ? void 0 : P.code) === "unrecognized_keys" ? `A ${k} format has no ${P.keys.join(", ")}.` : `That format for ${s} isn't valid: ${(P == null ? void 0 : P.message) ?? "invalid"}.` : `${JSON.stringify(k)} isn't a format type.`,
|
|
736
741
|
path: d,
|
|
737
|
-
fix:
|
|
738
|
-
allowed: y ? Oe(k) : [...
|
|
742
|
+
fix: ei(k),
|
|
743
|
+
allowed: y ? Oe(k) : [...hn],
|
|
739
744
|
...p.format ? { suggestedChange: We(n, s, p.format) } : {}
|
|
740
745
|
})
|
|
741
746
|
);
|
|
@@ -743,12 +748,12 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
743
748
|
}
|
|
744
749
|
const w = F.data;
|
|
745
750
|
if (w.type === "temporal_bucket" && t.granularity && !va(w, t.granularity).ok) {
|
|
746
|
-
const G =
|
|
751
|
+
const G = pn.filter(
|
|
747
752
|
(B) => va({ presentation: { mode: "preset", preset: B } }, t.granularity).ok
|
|
748
753
|
);
|
|
749
754
|
i.push(
|
|
750
|
-
|
|
751
|
-
message: `${s} on ${
|
|
755
|
+
U("date_finer_than_grain", {
|
|
756
|
+
message: `${s} on ${K(e.title)} is grouped by ${t.granularity}, which that date format doesn't fit.`,
|
|
752
757
|
path: d,
|
|
753
758
|
allowed: G,
|
|
754
759
|
suggestedChange: We(n, s, { type: "temporal_bucket", presentation: { mode: "preset", preset: G[0] ?? "short" } })
|
|
@@ -757,33 +762,33 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
757
762
|
return;
|
|
758
763
|
}
|
|
759
764
|
if (w.type === "date") {
|
|
760
|
-
const P = o, G = p.format ?? {}, B = Object.keys(P).filter((
|
|
765
|
+
const P = o, G = p.format ?? {}, B = Object.keys(P).filter((Z) => !ut.includes(Z) && !Pe(P[Z], G[Z]));
|
|
761
766
|
if (B.length) {
|
|
762
|
-
const
|
|
767
|
+
const Z = Object.fromEntries(Object.entries(w).filter(([te]) => !B.includes(te)));
|
|
763
768
|
i.push(
|
|
764
|
-
|
|
769
|
+
U("format_invalid", {
|
|
765
770
|
message: `A date format set here takes a pattern or a preset; it doesn't set ${B.join(", ")}.`,
|
|
766
771
|
path: d,
|
|
767
772
|
fix: `Leave out ${B.join(", ")}.`,
|
|
768
|
-
allowed:
|
|
769
|
-
suggestedChange: We(n, s,
|
|
773
|
+
allowed: ut.filter((te) => te !== "type"),
|
|
774
|
+
suggestedChange: We(n, s, Z)
|
|
770
775
|
})
|
|
771
776
|
);
|
|
772
777
|
return;
|
|
773
778
|
}
|
|
774
779
|
}
|
|
775
|
-
const N = w.type === "date" && b.surface === "detail_table" && b.value === "date" ?
|
|
780
|
+
const N = w.type === "date" && b.surface === "detail_table" && b.value === "date" ? Us(t, w, (M = e.dataSource) == null ? void 0 : M.connectionType) : void 0;
|
|
776
781
|
if (N) {
|
|
777
782
|
i.push(
|
|
778
|
-
|
|
783
|
+
U(
|
|
779
784
|
"format_invalid",
|
|
780
785
|
N.reason === "connection" ? {
|
|
781
|
-
message: `${
|
|
786
|
+
message: `${K(e.title)} can't show ${s} that way: ${N.message}`,
|
|
782
787
|
path: d,
|
|
783
788
|
fix: "Write the pattern in uppercase letters (YYYY MM DD HH mm ss) with no dialect, for example 'DD MMM YYYY' or 'HH:mm'.",
|
|
784
|
-
allowed:
|
|
789
|
+
allowed: ut.filter((P) => P !== "type")
|
|
785
790
|
} : {
|
|
786
|
-
message: `${
|
|
791
|
+
message: `${K(e.title)} can't draw that format on ${s}: ${N.message}.`,
|
|
787
792
|
path: d,
|
|
788
793
|
fix: "Change the format to one the column can show.",
|
|
789
794
|
allowed: Oe(k)
|
|
@@ -795,8 +800,8 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
795
800
|
const I = La(b, w);
|
|
796
801
|
if (!I.ok) {
|
|
797
802
|
i.push(
|
|
798
|
-
|
|
799
|
-
message: `${
|
|
803
|
+
U("format_invalid", {
|
|
804
|
+
message: `${K(e.title)} can't draw that format on ${s}: ${I.reason}.`,
|
|
800
805
|
path: d,
|
|
801
806
|
fix: "Change the format to one the column can show.",
|
|
802
807
|
allowed: Oe(k)
|
|
@@ -806,15 +811,15 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
806
811
|
}
|
|
807
812
|
return v && Pe(v, w) ? void 0 : w;
|
|
808
813
|
}
|
|
809
|
-
function
|
|
814
|
+
function Jn(e, a, t, s, o, n, i) {
|
|
810
815
|
var x, E;
|
|
811
816
|
const d = o.polarity;
|
|
812
817
|
if (d === void 0) return;
|
|
813
818
|
const l = `${Se(n.path, s)}.polarity`, c = t.ref;
|
|
814
819
|
if (!(a.settings.has("columns.polarity") && (c.kind === "sqlKpiValue" || c.kind === "field" && t.role === "measure"))) {
|
|
815
820
|
i.push(
|
|
816
|
-
|
|
817
|
-
message: t.role === "measure" || t.role === "value" ? `${
|
|
821
|
+
U("setting_not_for_card", {
|
|
822
|
+
message: t.role === "measure" || t.role === "value" ? `${K(e.title)} shows no comparison, so ${s} has no favorable direction.` : `${s} on ${K(e.title)} isn't a measure, so it has no favorable direction.`,
|
|
818
823
|
path: l,
|
|
819
824
|
fix: "Leave out polarity.",
|
|
820
825
|
suggestedChange: kt(n, s, o, "polarity")
|
|
@@ -826,7 +831,7 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
826
831
|
if (d === null) return b ? null : void 0;
|
|
827
832
|
if (S && d !== S) {
|
|
828
833
|
i.push(
|
|
829
|
-
|
|
834
|
+
U("polarity_set_by_model", {
|
|
830
835
|
message: `The model says ${s} is ${S.replace(/_/g, " ")}; a card can't say otherwise.`,
|
|
831
836
|
path: l,
|
|
832
837
|
fix: "Change it in the model, or leave polarity out.",
|
|
@@ -838,27 +843,27 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
838
843
|
}
|
|
839
844
|
return d === (S ?? b ?? _a) ? void 0 : d;
|
|
840
845
|
}
|
|
841
|
-
function
|
|
846
|
+
function Xn(e, a, t, s, o, n, i, d) {
|
|
842
847
|
var h, p, v;
|
|
843
848
|
if (o.hidden === void 0 && o.width === void 0) return {};
|
|
844
849
|
const l = Se(i.path, s);
|
|
845
850
|
if (!a.settings.has("columns.hidden") || t.resultKey === void 0) {
|
|
846
851
|
const b = a.pivoted && t.role === "measure";
|
|
847
852
|
return d.push(
|
|
848
|
-
|
|
849
|
-
message: b ? `${s} on ${
|
|
853
|
+
U("setting_not_for_card", {
|
|
854
|
+
message: b ? `${s} on ${K(e.title)} has a column for each pivot value; hide or size them in the editor.` : `${K(e.title)} has no hidden columns or column widths; those are for tables.`,
|
|
850
855
|
path: `${l}.${o.hidden !== void 0 ? "hidden" : "width"}`,
|
|
851
856
|
allowed: b ? ["label", "format"] : ["label", "format"].filter((S) => a.settings.has(`columns.${S}`)),
|
|
852
|
-
suggestedChange:
|
|
857
|
+
suggestedChange: Hn(i, s, o)
|
|
853
858
|
})
|
|
854
859
|
), {};
|
|
855
860
|
}
|
|
856
861
|
const c = {};
|
|
857
862
|
if (o.hidden !== void 0 && o.hidden !== ((n == null ? void 0 : n.hidden) === !0) && (c.hidden = o.hidden), o.width !== void 0 && o.width !== ((n == null ? void 0 : n.width) ?? null)) {
|
|
858
|
-
const { minSize: b, maxSize: S } =
|
|
863
|
+
const { minSize: b, maxSize: S } = js((v = (p = (h = e.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : p.columnSettingsMap) == null ? void 0 : v[t.resultKey]);
|
|
859
864
|
o.width !== null && (!Number.isFinite(o.width) || o.width < b || o.width > S) ? d.push(
|
|
860
|
-
|
|
861
|
-
message: `${s} on ${
|
|
865
|
+
U("value_invalid", {
|
|
866
|
+
message: `${s} on ${K(e.title)} can be ${b} to ${S} pixels wide.`,
|
|
862
867
|
path: `${l}.width`,
|
|
863
868
|
fix: `Send a width from ${b} to ${S} pixels, or null for automatic.`
|
|
864
869
|
})
|
|
@@ -866,19 +871,19 @@ function Jn(e, a, t, s, o, n, i, d) {
|
|
|
866
871
|
}
|
|
867
872
|
return c;
|
|
868
873
|
}
|
|
869
|
-
function
|
|
874
|
+
function Zn(e, a, t) {
|
|
870
875
|
var E, C, k, y;
|
|
871
|
-
const { columns: s = {}, ...o } = a.settings ?? {}, n = [], i =
|
|
876
|
+
const { columns: s = {}, ...o } = a.settings ?? {}, n = [], i = tt.some((F) => o[F] !== void 0), d = !!((C = (E = a.highlights) == null ? void 0 : E.add) != null && C.length || (y = (k = a.highlights) == null ? void 0 : k.remove) != null && y.length);
|
|
872
877
|
if (!Object.keys(s).length && !i && !d) return { ok: !0, labels: [], settings: null, warnings: [] };
|
|
873
|
-
const l =
|
|
878
|
+
const l = Ms(e);
|
|
874
879
|
if (!l)
|
|
875
880
|
return {
|
|
876
881
|
ok: !1,
|
|
877
|
-
problems: [
|
|
882
|
+
problems: [U("setting_not_for_card", { message: `${K(e.title)} takes no card settings through this tool.`, path: t.path })]
|
|
878
883
|
};
|
|
879
|
-
const c =
|
|
884
|
+
const c = Wn(e, l, o, t, n), h = Bs(e, l, t.sqlResultColumns), p = d ? Vs(e, l, h, a.highlights, t, n) : void 0, v = Ft(e), b = [], S = [];
|
|
880
885
|
for (const [F, w] of Object.entries(s)) {
|
|
881
|
-
const N =
|
|
886
|
+
const N = Gs(h, F, { path: Se(t.path, F), cardTitle: K(e.title) });
|
|
882
887
|
if (!N.ok) {
|
|
883
888
|
n.push(N.problem);
|
|
884
889
|
continue;
|
|
@@ -886,17 +891,17 @@ function Xn(e, a, t) {
|
|
|
886
891
|
const I = N.column;
|
|
887
892
|
if (I.sqlName === "inferred") {
|
|
888
893
|
n.push(
|
|
889
|
-
|
|
890
|
-
message: `${
|
|
894
|
+
U("columns_unavailable", {
|
|
895
|
+
message: `${K(e.title)}'s columns weren't read from its query, so ${F} can't be checked.`,
|
|
891
896
|
path: Se(t.path, F),
|
|
892
897
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
893
898
|
})
|
|
894
899
|
);
|
|
895
900
|
continue;
|
|
896
901
|
}
|
|
897
|
-
const _ =
|
|
902
|
+
const _ = Yn(e, l, I, F, w, t, n);
|
|
898
903
|
_ && b.push(_);
|
|
899
|
-
const D =
|
|
904
|
+
const D = Xn(e, l, I, F, w, v.columns[I.name], t, n), M = w.format !== void 0 ? zn(e, l, I, F, w.format, t, n) : void 0, P = Jn(e, l, I, F, w, t, n), G = {
|
|
900
905
|
column: I.ref,
|
|
901
906
|
...D,
|
|
902
907
|
...M !== void 0 ? { format: M } : {},
|
|
@@ -908,11 +913,11 @@ function Xn(e, a, t) {
|
|
|
908
913
|
const x = { ...c, ...S.length ? { columns: S } : {}, ...p ? { highlights: p } : {} };
|
|
909
914
|
return { ok: !0, labels: b, settings: Object.keys(x).length ? x : null, warnings: [] };
|
|
910
915
|
}
|
|
911
|
-
function
|
|
916
|
+
function ei(e) {
|
|
912
917
|
const a = Me(e), t = a && a === Me("number") ? ua.number : e === "temporal_bucket" || e === "date" ? ua[e] : void 0;
|
|
913
918
|
return t ? `Send a stored format: ${t}.` : "Send the format in the stored shape the outline shows.";
|
|
914
919
|
}
|
|
915
|
-
function
|
|
920
|
+
function ti(e, a, t, s, o) {
|
|
916
921
|
var C, k, y, F, w, N;
|
|
917
922
|
const n = we(e, { sql: !0, calculations: !1 });
|
|
918
923
|
if (!n.editable) return [n.message];
|
|
@@ -927,7 +932,7 @@ function ei(e, a, t, s, o) {
|
|
|
927
932
|
config: s.config
|
|
928
933
|
}, { sql: !0, calculations: !1 }) : void 0;
|
|
929
934
|
if (l && !l.editable) return ["the compiled query"];
|
|
930
|
-
const c = l != null && l.editable ? l.query : void 0, h = String(d.datasetName ?? ""), p = [], v = (I) =>
|
|
935
|
+
const c = l != null && l.editable ? l.query : void 0, h = String(d.datasetName ?? ""), p = [], v = (I) => ge(I, h), b = (I, _, D) => {
|
|
931
936
|
const M = _ ?? [], P = D ?? [];
|
|
932
937
|
(M.length !== P.length || M.some((G, B) => v(G) !== v(P[B]))) && p.push(I);
|
|
933
938
|
};
|
|
@@ -945,25 +950,25 @@ function ei(e, a, t, s, o) {
|
|
|
945
950
|
D && Ca(E[_] ?? {}) !== D && p.push(`the aggregate of measures[${_}]`);
|
|
946
951
|
});
|
|
947
952
|
for (const { key: I, label: _ } of Ne(a))
|
|
948
|
-
|
|
953
|
+
Qs(e, I) !== _ && p.push(`the label "${_}"`);
|
|
949
954
|
if (!o || o.aspects.includes("filters")) {
|
|
950
955
|
const I = d.filters ?? [];
|
|
951
956
|
let _ = i.filters ?? [];
|
|
952
957
|
const D = d.timeWindow, M = i.timeWindow, P = (G, B) => {
|
|
953
|
-
const
|
|
954
|
-
return v(G.field) === v(B.field) && G.operator === B.operator && (G.scope ?? "row") === (B.scope ?? "row") && (typeof G.field == "object" ? G.field.aggregate : void 0) === (typeof B.field == "object" ? B.field.aggregate : void 0) && (G.values === void 0 ||
|
|
958
|
+
const Z = (te) => JSON.stringify((te ?? []).map(String));
|
|
959
|
+
return v(G.field) === v(B.field) && G.operator === B.operator && (G.scope ?? "row") === (B.scope ?? "row") && (typeof G.field == "object" ? G.field.aggregate : void 0) === (typeof B.field == "object" ? B.field.aggregate : void 0) && (G.values === void 0 || Z(G.values) === Z(B.values));
|
|
955
960
|
};
|
|
956
961
|
if (D && !M) {
|
|
957
962
|
const G = ((c == null ? void 0 : c.filters) ?? []).filter(
|
|
958
|
-
(B) => !(c != null && c.timeWindow) && !I.some((
|
|
963
|
+
(B) => !(c != null && c.timeWindow) && !I.some((Z) => P(Z, B))
|
|
959
964
|
);
|
|
960
|
-
(!G.length || G.some((B) => !_.some((
|
|
961
|
-
} else D ?
|
|
965
|
+
(!G.length || G.some((B) => !_.some((Z) => P(B, Z)))) && p.push("timeWindow"), _ = _.filter((B) => !G.some((Z) => P(Z, B)));
|
|
966
|
+
} else D ? on(d.timeWindow, i.timeWindow) || p.push("timeWindow") : M && p.push("timeWindow");
|
|
962
967
|
(I.length !== _.length || I.some((G, B) => !P(G, _[B]))) && p.push("filters");
|
|
963
968
|
}
|
|
964
969
|
if (d.orderBy !== void 0) {
|
|
965
|
-
const I = d.orderBy, _ = (w = (F = e.config) == null ? void 0 : F.sortByColumns) == null ? void 0 : w[0], D = _ &&
|
|
966
|
-
(!_ || !D || _.direction !== I.direction || v(I.field) !==
|
|
970
|
+
const I = d.orderBy, _ = (w = (F = e.config) == null ? void 0 : F.sortByColumns) == null ? void 0 : w[0], D = _ && Hs(e.config ?? {}, _), M = I.field && typeof I.field == "object" ? I.field.aggregate : void 0;
|
|
971
|
+
(!_ || !D || _.direction !== I.direction || v(I.field) !== Ys(D.name, Pa(D)) || M !== void 0 && Ca(D) !== M) && p.push("orderBy");
|
|
967
972
|
}
|
|
968
973
|
return d.limit !== void 0 && ((N = e.config) == null ? void 0 : N.rowLimit) !== d.limit && p.push("limit"), p;
|
|
969
974
|
}
|
|
@@ -980,7 +985,7 @@ function Je(e, a) {
|
|
|
980
985
|
const t = e.variables ?? [];
|
|
981
986
|
return t.find((s) => s.name === a) ?? t.find((s) => s.id === a);
|
|
982
987
|
}
|
|
983
|
-
function
|
|
988
|
+
function ai(e, a, t, s) {
|
|
984
989
|
var i;
|
|
985
990
|
const o = Je(e, a);
|
|
986
991
|
o || s.problem(cs(e, a, t));
|
|
@@ -1040,14 +1045,14 @@ async function xa(e, a, t) {
|
|
|
1040
1045
|
const p = h.fields;
|
|
1041
1046
|
for (const w of Ba({ ...d, measures: d.measures ?? [] })) s({ ...w, path: `${i}.${w.path}` });
|
|
1042
1047
|
const v = (w, N) => {
|
|
1043
|
-
const I =
|
|
1048
|
+
const I = wt(w), _ = eo(w, d.datasetName);
|
|
1044
1049
|
_.toLowerCase() !== d.datasetName.toLowerCase() && s({
|
|
1045
1050
|
code: "field_not_found",
|
|
1046
1051
|
message: `A variable reads one dataset: "${I}" names ${_}, not ${d.datasetName}.`,
|
|
1047
1052
|
path: N,
|
|
1048
1053
|
fix: `Name a field of ${d.datasetName}, or set datasetName to ${_} and read its field.`
|
|
1049
1054
|
});
|
|
1050
|
-
const D =
|
|
1055
|
+
const D = nt(p, I, d.datasetName);
|
|
1051
1056
|
return D || s({
|
|
1052
1057
|
code: "field_not_found",
|
|
1053
1058
|
message: `"${I}" isn't a field of ${d.datasetName}.`,
|
|
@@ -1061,7 +1066,7 @@ async function xa(e, a, t) {
|
|
|
1061
1066
|
dataSource: h.dataSource,
|
|
1062
1067
|
connectionId: h.connectionId,
|
|
1063
1068
|
get: "only",
|
|
1064
|
-
...(y = d.filters) != null && y.length ? { conditions: await
|
|
1069
|
+
...(y = d.filters) != null && y.length ? { conditions: await oi(d, n, i, t.refuseAll) } : {}
|
|
1065
1070
|
};
|
|
1066
1071
|
if (l.kind === "aggregate") {
|
|
1067
1072
|
(b.length !== 1 || S.length) && s({
|
|
@@ -1070,18 +1075,18 @@ async function xa(e, a, t) {
|
|
|
1070
1075
|
path: `${i}.query`,
|
|
1071
1076
|
fix: `Send measures: [{ name, aggregate }] alone; for one field's value use get: "only", "first" or "list" with dimensions: [field].`
|
|
1072
1077
|
}), 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." });
|
|
1073
|
-
const w = v(b[0], `${i}.query.measures[0]`), N = typeof b[0] == "string" ? void 0 : b[0].aggregate, I =
|
|
1078
|
+
const w = v(b[0], `${i}.query.measures[0]`), N = typeof b[0] == "string" ? void 0 : b[0].aggregate, I = _n(w).filter((M) => $a(M.value)), _ = N ?? (mt(w) ? "calculation" : In(w));
|
|
1074
1079
|
if (!$a(_) || !I.some((M) => M.value === _)) {
|
|
1075
1080
|
const M = I.map((P) => P.value);
|
|
1076
1081
|
s({
|
|
1077
1082
|
code: "invalid_change",
|
|
1078
1083
|
message: N ? `${N} isn't an aggregate ${w.label || w.name} takes.` : `${w.label || w.name} needs its aggregate.`,
|
|
1079
1084
|
path: `${i}.query.measures[0]`,
|
|
1080
|
-
fix:
|
|
1085
|
+
fix: mt(w) ? `${w.label || w.name} aggregates itself: send it without an aggregate.` : `Send { name: "${w.name}", aggregate } with one of: ${M.join(", ")}.`,
|
|
1081
1086
|
allowed: M
|
|
1082
1087
|
});
|
|
1083
1088
|
}
|
|
1084
|
-
const D =
|
|
1089
|
+
const D = si(b[0], { ...x, field: w, get: _ }, `${i}.query.measures[0].comparison`, s);
|
|
1085
1090
|
return k(ze({ ...x, field: w, get: _, ...D ? { comparison: D } : {} }, a));
|
|
1086
1091
|
}
|
|
1087
1092
|
(S.length !== 1 || b.length) && s({
|
|
@@ -1091,7 +1096,7 @@ async function xa(e, a, t) {
|
|
|
1091
1096
|
fix: "Send dimensions: [field] and no measures; order the first value or the list with orderBy."
|
|
1092
1097
|
});
|
|
1093
1098
|
const E = v(S[0], `${i}.query.dimensions[0]`);
|
|
1094
|
-
|
|
1099
|
+
mt(E) && s({
|
|
1095
1100
|
code: "invalid_change",
|
|
1096
1101
|
message: `${E.label || E.name} is an aggregate calculation, so it has one value, not rows.`,
|
|
1097
1102
|
path: `${i}.query.dimensions[0]`,
|
|
@@ -1126,7 +1131,7 @@ async function xa(e, a, t) {
|
|
|
1126
1131
|
return I.length && t.refuseAll(us(I, i)), N;
|
|
1127
1132
|
}
|
|
1128
1133
|
}
|
|
1129
|
-
function
|
|
1134
|
+
function si(e, a, t, s) {
|
|
1130
1135
|
var n, i;
|
|
1131
1136
|
const o = typeof e == "string" ? void 0 : e.comparison;
|
|
1132
1137
|
if (!(!o || o.kind === "inherit" || o.kind === "off"))
|
|
@@ -1135,14 +1140,14 @@ function ai(e, a, t, s) {
|
|
|
1135
1140
|
message: "A variable compares with an earlier period, not a target.",
|
|
1136
1141
|
path: t,
|
|
1137
1142
|
fix: "Send comparison: { kind: 'previous_period' } or { kind: 'previous_year' }; put a target in the words, or on a KPI card."
|
|
1138
|
-
}),
|
|
1143
|
+
}), $n(a) || s({
|
|
1139
1144
|
code: "invalid_change",
|
|
1140
1145
|
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.`,
|
|
1141
1146
|
path: t,
|
|
1142
1147
|
fix: "Compare a count, or a numeric field's total, average, lowest or highest; leave comparison out here."
|
|
1143
|
-
}),
|
|
1148
|
+
}), to(o);
|
|
1144
1149
|
}
|
|
1145
|
-
async function
|
|
1150
|
+
async function oi(e, a, t, s) {
|
|
1146
1151
|
var n;
|
|
1147
1152
|
const o = await a.compileCardQuery({
|
|
1148
1153
|
query: { domainId: e.domainId, datasetName: e.datasetName, measures: ["__count"], filters: e.filters },
|
|
@@ -1150,8 +1155,8 @@ async function si(e, a, t, s) {
|
|
|
1150
1155
|
});
|
|
1151
1156
|
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` })));
|
|
1152
1157
|
}
|
|
1153
|
-
function
|
|
1154
|
-
const n = ls(a), i =
|
|
1158
|
+
function ni(e, a, t, s, o) {
|
|
1159
|
+
const n = ls(a), i = Cn(e);
|
|
1155
1160
|
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.' });
|
|
1156
1161
|
const d = ze(
|
|
1157
1162
|
{
|
|
@@ -1164,7 +1169,7 @@ function oi(e, a, t, s, o) {
|
|
|
1164
1169
|
);
|
|
1165
1170
|
return { query: d.query, get: d.get };
|
|
1166
1171
|
}
|
|
1167
|
-
function
|
|
1172
|
+
function ii(e, a) {
|
|
1168
1173
|
const t = Ha(e).filter(({ ref: i }) => i.source === "data" && i.variableId === a), s = (i) => {
|
|
1169
1174
|
var d;
|
|
1170
1175
|
return `"${((d = (e.sheets ?? []).find((l) => l.id === i)) == null ? void 0 : d.title) ?? i}"`;
|
|
@@ -1180,7 +1185,7 @@ function ni(e, a) {
|
|
|
1180
1185
|
)
|
|
1181
1186
|
].join(", "), places: t };
|
|
1182
1187
|
}
|
|
1183
|
-
function
|
|
1188
|
+
function ri(e, a, t, s, o) {
|
|
1184
1189
|
const { problem: n } = o;
|
|
1185
1190
|
(!Xe(t) || !t.document) && n({
|
|
1186
1191
|
code: "invalid_change",
|
|
@@ -1200,21 +1205,21 @@ function ii(e, a, t, s, o) {
|
|
|
1200
1205
|
message: `The ${x} has ${x === "header" ? "a title and a metadata line" : "a note and a page info line"}, not a ${E} line.`,
|
|
1201
1206
|
path: `${s}.target.role`,
|
|
1202
1207
|
fix: `Send role: ${Ia[x].map((k) => `"${k}"`).join(" or ")}.`
|
|
1203
|
-
}), e.style !== void 0 && !
|
|
1208
|
+
}), e.style !== void 0 && !zs(E) && n({
|
|
1204
1209
|
code: "invalid_change",
|
|
1205
1210
|
message: `The footer's ${E === "pageInfo" ? "page info" : E} line has no size or alignment; only the header's title and metadata lines and text sections do.`,
|
|
1206
1211
|
path: `${s}.style`,
|
|
1207
1212
|
fix: "Leave style out for a footer line."
|
|
1208
1213
|
});
|
|
1209
|
-
const C = i[x] ?
|
|
1214
|
+
const C = i[x] ? Jo(i[x].blocks, E) : void 0;
|
|
1210
1215
|
l = (C == null ? void 0 : C.content) ?? [], c = C == null ? void 0 : C.style;
|
|
1211
1216
|
}
|
|
1212
|
-
const h = e.style !== void 0 ?
|
|
1217
|
+
const h = e.style !== void 0 ? Js(e.style) : void 0, p = !h || Object.entries(h).every(([x, E]) => (c == null ? void 0 : c[x]) === E);
|
|
1213
1218
|
let v;
|
|
1214
1219
|
if (e.text !== void 0) {
|
|
1215
|
-
const x = { kind: "document", sheetId: t.id }, E = { catalog:
|
|
1216
|
-
if (JSON.stringify(
|
|
1217
|
-
const k =
|
|
1220
|
+
const x = { kind: "document", sheetId: t.id }, E = { catalog: $t({ dashboard: a, place: x }), inputs: a.inputs, variables: a.variables }, C = JSON.stringify(Ze(l, E));
|
|
1221
|
+
if (JSON.stringify(Xs(e.text)) !== C) {
|
|
1222
|
+
const k = Zs(e.text, l, { dashboard: a, place: x, path: `${s}.text`, links: !0 });
|
|
1218
1223
|
k.ok || o.refuseAll(k.problems);
|
|
1219
1224
|
const y = k.content;
|
|
1220
1225
|
JSON.stringify(Ze(y, E)) !== C && (v = y);
|
|
@@ -1226,7 +1231,7 @@ function ii(e, a, t, s, o) {
|
|
|
1226
1231
|
};
|
|
1227
1232
|
return { edit: "sectionId" in d ? { type: "updateText", sectionId: d.sectionId, ...b } : { type: "updateRegionText", region: d.region, role: d.role, ...b }, unchanged: v === void 0 && p };
|
|
1228
1233
|
}
|
|
1229
|
-
const
|
|
1234
|
+
const di = {
|
|
1230
1235
|
matrix: "A Matrix",
|
|
1231
1236
|
pie: "A pie chart",
|
|
1232
1237
|
detail_table: "A detail table",
|
|
@@ -1234,10 +1239,10 @@ const ri = {
|
|
|
1234
1239
|
};
|
|
1235
1240
|
class me extends Error {
|
|
1236
1241
|
}
|
|
1237
|
-
const Sa = "A text card takes title, description and text.",
|
|
1242
|
+
const Sa = "A text card takes title, description and text.", vt = (e) => e.cards.some((a) => {
|
|
1238
1243
|
var t, s;
|
|
1239
1244
|
return ((t = a.customCardPreferences) == null ? void 0 : t.visualType) === "multiple" || !!((s = a.customCardPreferences) != null && s.dataInputCardIds);
|
|
1240
|
-
}), Rt = (e) => (e ?? "").trim().toLowerCase(),
|
|
1245
|
+
}), Rt = (e) => (e ?? "").trim().toLowerCase(), at = ro, ka = { measures: fo, records: uo, sql: co }, Ue = {
|
|
1241
1246
|
measures: "a measures query (measures, with optional dimensions)",
|
|
1242
1247
|
records: "a records query (columns)",
|
|
1243
1248
|
sql: "a SQL query"
|
|
@@ -1245,9 +1250,9 @@ const Sa = "A text card takes title, description and text.", yt = (e) => e.cards
|
|
|
1245
1250
|
function fs(e, a) {
|
|
1246
1251
|
return a.path.reduce((t, s) => typeof s == "number" ? `${t}[${s}]` : `${t}.${s}`, e);
|
|
1247
1252
|
}
|
|
1248
|
-
const
|
|
1249
|
-
async function
|
|
1250
|
-
return ms(e, a, t, { limit:
|
|
1253
|
+
const li = { max: So, what: "A proposal", fix: "Split the changes into several proposals." };
|
|
1254
|
+
async function Br(e, a, t) {
|
|
1255
|
+
return ms(e, a, t, { limit: li });
|
|
1251
1256
|
}
|
|
1252
1257
|
async function ms(e, a, t, s) {
|
|
1253
1258
|
var Qt, Ht, Yt, zt, Jt, Xt, Zt, ea, ta, aa, sa, oa, na, ia, ra, da;
|
|
@@ -1268,13 +1273,13 @@ async function ms(e, a, t, s) {
|
|
|
1268
1273
|
};
|
|
1269
1274
|
const k = [];
|
|
1270
1275
|
if (a.forEach((m, r) => {
|
|
1271
|
-
const f =
|
|
1276
|
+
const f = ao.safeParse(m);
|
|
1272
1277
|
if (f.success) {
|
|
1273
1278
|
k.push(f.data);
|
|
1274
1279
|
return;
|
|
1275
1280
|
}
|
|
1276
1281
|
for (const u of f.error.issues) {
|
|
1277
|
-
const g =
|
|
1282
|
+
const g = nn(u.message);
|
|
1278
1283
|
o.push({
|
|
1279
1284
|
code: "invalid_change",
|
|
1280
1285
|
message: (g == null ? void 0 : g.message) ?? u.message,
|
|
@@ -1293,34 +1298,35 @@ async function ms(e, a, t, s) {
|
|
|
1293
1298
|
fix: "Use a measures or records query (a semantic dataset for a variable), or ask an administrator for SQL access."
|
|
1294
1299
|
}), l.add("sql");
|
|
1295
1300
|
}, w = (m, r) => {
|
|
1296
|
-
const f =
|
|
1301
|
+
const f = St(b, [m], p);
|
|
1297
1302
|
f.ok ? (b = f.dashboard, i.push(m)) : y({ code: "invalid_change", message: f.failedAt.message, path: r, ...f.failedAt.fix ? { fix: f.failedAt.fix } : {} });
|
|
1298
1303
|
}, N = async (m) => {
|
|
1299
|
-
var
|
|
1300
|
-
const { cardId: r, index: f, path: u } = m, { settings: g = {}, highlights: $ } = m.request, O = g.columns && Object.keys(g.columns).length ? g.columns : void 0, R = Object.entries(g).some(([
|
|
1301
|
-
if (!O && !R && !A && !((
|
|
1302
|
-
const T =
|
|
1303
|
-
if (L && !((
|
|
1304
|
-
for (const
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1304
|
+
var J, j, ie, fe, Ae, Ie;
|
|
1305
|
+
const { cardId: r, index: f, path: u } = m, { settings: g = {}, highlights: $ } = m.request, O = g.columns && Object.keys(g.columns).length ? g.columns : void 0, R = Object.entries(g).some(([Y, X]) => Y !== "columns" && X !== void 0), A = !!((J = $ == null ? void 0 : $.add) != null && J.length);
|
|
1306
|
+
if (!O && !R && !A && !((j = $ == null ? void 0 : $.remove) != null && j.length)) return null;
|
|
1307
|
+
const T = re(b, r).card, L = Object.values(O ?? {}).some((Y) => Y.label === null), q = Object.values(O ?? {}).some((Y) => Y.format !== void 0 && Y.format !== null), V = {};
|
|
1308
|
+
if (L && !((ie = T.sql) != null && ie.trim()))
|
|
1309
|
+
for (const Y of Mn(T)) {
|
|
1310
|
+
const X = await t.loadCardSource(Y);
|
|
1311
|
+
X && (V[Pt(Y)] = X.fields);
|
|
1307
1312
|
}
|
|
1308
|
-
let
|
|
1309
|
-
if (q && !((
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1313
|
+
let W;
|
|
1314
|
+
if (q && !((fe = T.sql) != null && fe.trim())) {
|
|
1315
|
+
const Y = t.readModelFormats ? await t.readModelFormats({ card: T }) : null;
|
|
1316
|
+
W = Y ? { status: "read", formats: Y } : { status: "unavailable" };
|
|
1312
1317
|
}
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1318
|
+
const z = !!((Ae = g.columnOrder) != null && Ae.length);
|
|
1319
|
+
let H;
|
|
1320
|
+
if ((O || A || z) && ((Ie = T.sql) != null && Ie.trim()) && T.type !== "kpi") {
|
|
1321
|
+
const Y = t.readSqlResultColumns ? await t.readSqlResultColumns({ cardId: r, dashboard: b }) : null;
|
|
1322
|
+
Y || y({
|
|
1317
1323
|
code: "columns_unavailable",
|
|
1318
|
-
message: O ? `"${T.title || "Untitled"}" couldn't be run to read its columns, so their names can't be checked.` : `"${T.title || "Untitled"}" couldn't be run to read its columns, so the highlight's column can't be checked.`,
|
|
1319
|
-
path: O ? `${u}.columns` : `${u}.column`,
|
|
1324
|
+
message: O || z ? `"${T.title || "Untitled"}" couldn't be run to read its columns, so their names can't be checked.` : `"${T.title || "Untitled"}" couldn't be run to read its columns, so the highlight's column can't be checked.`,
|
|
1325
|
+
path: O ? `${u}.columns` : z ? `${u}.columnOrder` : `${u}.column`,
|
|
1320
1326
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
1321
|
-
}),
|
|
1327
|
+
}), H = Y;
|
|
1322
1328
|
}
|
|
1323
|
-
const
|
|
1329
|
+
const Q = Zn(
|
|
1324
1330
|
T,
|
|
1325
1331
|
{
|
|
1326
1332
|
settings: { ...g, ...O ? { columns: O } : { columns: void 0 } },
|
|
@@ -1331,25 +1337,25 @@ async function ms(e, a, t, s) {
|
|
|
1331
1337
|
cardRef: m.cardRef,
|
|
1332
1338
|
catalogs: V,
|
|
1333
1339
|
newId: t.newId,
|
|
1334
|
-
...
|
|
1335
|
-
...
|
|
1340
|
+
...W ? { modelFormats: W } : {},
|
|
1341
|
+
...H ? { sqlResultColumns: H } : {}
|
|
1336
1342
|
}
|
|
1337
1343
|
);
|
|
1338
|
-
if (!
|
|
1339
|
-
throw o.push(...
|
|
1340
|
-
for (const
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1344
|
+
if (!Q.ok)
|
|
1345
|
+
throw o.push(...Q.problems), new me();
|
|
1346
|
+
for (const Y of Q.labels) {
|
|
1347
|
+
const X = m.queryLabels.find((ce) => Ye(ce.key, Y.key) && ce.label !== Y.label);
|
|
1348
|
+
X && y({
|
|
1343
1349
|
code: "value_invalid",
|
|
1344
|
-
message: `Two labels are stated for one column of "${T.title || "Untitled"}": "${
|
|
1350
|
+
message: `Two labels are stated for one column of "${T.title || "Untitled"}": "${X.label}" in the query and "${Y.label}" in columns.`,
|
|
1345
1351
|
path: `${u}.columns`,
|
|
1346
1352
|
fix: "State the label once."
|
|
1347
1353
|
});
|
|
1348
1354
|
}
|
|
1349
|
-
return n.push(...
|
|
1355
|
+
return n.push(...Q.warnings), Q.labels.length && ga(T, Q.labels).changed.length && w({ op: "card.update", cardId: r, update: { kind: "relabel", labels: Q.labels }, changeIndex: f }, `${u}.columns`), Q.settings && w({ op: "card.update", cardId: r, update: { kind: "settings", settings: Q.settings }, changeIndex: f }, O ? `${u}.columns` : u), Q.settings;
|
|
1350
1356
|
}, I = (m, r) => {
|
|
1351
1357
|
var g;
|
|
1352
|
-
const f =
|
|
1358
|
+
const f = re(b, m);
|
|
1353
1359
|
f || y({ code: "card_not_editable", message: "Cards in Document sections are changed in the editor.", path: `${r}.cardId`, fix: "Tell the user to change it in the editor.", details: { reason: "document_section" } });
|
|
1354
1360
|
const u = we(f.card, { sql: !0 });
|
|
1355
1361
|
return ((g = u.source) == null ? void 0 : g.kind) === "sql" && F(`${r}.cardId`), u.editable || y({
|
|
@@ -1366,14 +1372,14 @@ async function ms(e, a, t, s) {
|
|
|
1366
1372
|
}), { card: f.card, read: u };
|
|
1367
1373
|
}, _ = /* @__PURE__ */ new Map(), D = (m, r, f) => {
|
|
1368
1374
|
var g;
|
|
1369
|
-
const u =
|
|
1375
|
+
const u = Ka("metric", ((g = m.config) == null ? void 0 : g.metricColumns) ?? []);
|
|
1370
1376
|
return r.map(({ index: $, calculations: O }) => ({
|
|
1371
1377
|
...O,
|
|
1372
1378
|
measure: u[$] ?? { role: "metric", field: "", ordinal: $ },
|
|
1373
1379
|
path: `${f}.query.measures[${$}]`
|
|
1374
1380
|
}));
|
|
1375
1381
|
}, M = async (m) => {
|
|
1376
|
-
const r =
|
|
1382
|
+
const r = re(b, m.cardId).card, f = D(r, m.stated, m.path), u = f.some((O) => {
|
|
1377
1383
|
var R, A;
|
|
1378
1384
|
return ((R = O.comparison) == null ? void 0 : R.kind) === "previous_period" || ((A = O.comparison) == null ? void 0 : A.kind) === "previous_year";
|
|
1379
1385
|
}), g = u && t.readComparisonDates ? await t.readComparisonDates({ card: r, dashboard: b }) : Ta(r), $ = ma({ card: r, stated: f, context: { path: m.path, cardRef: m.cardRef, dates: g } });
|
|
@@ -1383,21 +1389,7 @@ async function ms(e, a, t, s) {
|
|
|
1383
1389
|
{ op: "card.update", cardId: m.cardId, update: { kind: "calculations", calculations: $.update }, changeIndex: m.index },
|
|
1384
1390
|
`${m.path}.query`
|
|
1385
1391
|
), !0) : !1;
|
|
1386
|
-
}, P = (m) => ({
|
|
1387
|
-
columns: m.columns,
|
|
1388
|
-
orientation: m.orientation,
|
|
1389
|
-
stack: m.stack,
|
|
1390
|
-
donut: m.donut,
|
|
1391
|
-
totals: m.totals,
|
|
1392
|
-
dataLabels: m.dataLabels,
|
|
1393
|
-
legend: m.legend,
|
|
1394
|
-
axes: m.axes,
|
|
1395
|
-
comparisonDisplay: m.comparisonDisplay,
|
|
1396
|
-
inheritComparison: m.inheritComparison,
|
|
1397
|
-
trend: m.trend,
|
|
1398
|
-
trendGrain: m.trendGrain,
|
|
1399
|
-
seeRecords: m.seeRecords
|
|
1400
|
-
}), G = (m) => Object.entries(P(m)).filter(([, r]) => r !== void 0).map(([r]) => r), B = (m) => (o.push(...m.slice(0, -1)), y(m[m.length - 1])), J = (m, r, f, u) => {
|
|
1392
|
+
}, P = (m) => Object.fromEntries(["columns", ...tt].map((r) => [r, m[r]])), G = (m) => Object.entries(P(m)).filter(([, r]) => r !== void 0).map(([r]) => r), B = (m) => (o.push(...m.slice(0, -1)), y(m[m.length - 1])), Z = (m, r, f, u) => {
|
|
1401
1393
|
const { card: g } = r, $ = [...m.type ? ["type"] : [], ...m.query ? ["query"] : [], ...m.matrix ? ["matrix"] : [], ...G(m)];
|
|
1402
1394
|
$.length && y({
|
|
1403
1395
|
code: "invalid_change",
|
|
@@ -1405,7 +1397,7 @@ async function ms(e, a, t, s) {
|
|
|
1405
1397
|
path: u,
|
|
1406
1398
|
fix: "Change a card to or from text in the editor, or add a new card and remove this one."
|
|
1407
1399
|
});
|
|
1408
|
-
const O =
|
|
1400
|
+
const O = ja(g, { inputs: b.inputs, variables: b.variables });
|
|
1409
1401
|
O.editable || y({ code: "card_not_editable", message: O.message, path: `${u}.cardId`, fix: "Tell the user to change it in the editor.", details: { reason: "text" } });
|
|
1410
1402
|
const R = O.editable && (O.form === "legacy_html" || O.form === "legacy_runs");
|
|
1411
1403
|
R && m.description !== void 0 && m.text === void 0 && y({
|
|
@@ -1441,7 +1433,7 @@ async function ms(e, a, t, s) {
|
|
|
1441
1433
|
path: u,
|
|
1442
1434
|
details: { cardIds: [g.id] }
|
|
1443
1435
|
});
|
|
1444
|
-
},
|
|
1436
|
+
}, te = (m, r) => {
|
|
1445
1437
|
if (m.startsWith("$")) {
|
|
1446
1438
|
const f = h.get(m);
|
|
1447
1439
|
return (!f || f.kind !== "card") && y({
|
|
@@ -1457,7 +1449,7 @@ async function ms(e, a, t, s) {
|
|
|
1457
1449
|
path: r,
|
|
1458
1450
|
fix: "Read the outline again and use its card ids."
|
|
1459
1451
|
}), m;
|
|
1460
|
-
},
|
|
1452
|
+
}, oe = (m, r) => {
|
|
1461
1453
|
if (m.startsWith("$")) {
|
|
1462
1454
|
const u = h.get(m);
|
|
1463
1455
|
return (!u || u.kind !== "filter") && y({
|
|
@@ -1475,8 +1467,8 @@ async function ms(e, a, t, s) {
|
|
|
1475
1467
|
}), m;
|
|
1476
1468
|
}, Vt = (m, r) => {
|
|
1477
1469
|
const f = m.startsWith("$") ? void 0 : Je(b, m);
|
|
1478
|
-
return f ? f.id :
|
|
1479
|
-
}, Te = { services: t, problem: y, refuseAll: B, need: F },
|
|
1470
|
+
return f ? f.id : te(m, r);
|
|
1471
|
+
}, Te = { services: t, problem: y, refuseAll: B, need: F }, it = () => (b.sheets ?? []).filter((m) => !Xe(m)), Ve = () => it().map((m) => ({ sheetId: m.id, title: m.title ?? "" })), rt = (m, r, f) => {
|
|
1480
1472
|
let u = m;
|
|
1481
1473
|
if (m.startsWith("$")) {
|
|
1482
1474
|
const $ = h.get(m);
|
|
@@ -1489,10 +1481,10 @@ async function ms(e, a, t, s) {
|
|
|
1489
1481
|
}
|
|
1490
1482
|
const g = (b.sheets ?? []).find(($) => $.id === u);
|
|
1491
1483
|
return g || 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: Ve() } }), f.grid && Xe(g) && y({ code: "sheet_not_a_grid", message: `"${g.title}" is a Document sheet.`, path: r, fix: "Add the card to a grid sheet; Document sheets are changed in the editor.", details: { sheets: Ve() } }), g;
|
|
1492
|
-
}, Re = (m, r) =>
|
|
1484
|
+
}, Re = (m, r) => rt(m, r, { grid: !0 }), Gt = (m, r) => m.map((f, u) => Re(f, `${r}.sheetIds[${u}]`).id), jt = (m, r, f, u) => {
|
|
1493
1485
|
var R;
|
|
1494
1486
|
for (const A of Ba(r, f)) y({ ...A, path: `${u}.${A.path}` });
|
|
1495
|
-
const g = De[m], $ =
|
|
1487
|
+
const g = De[m], $ = at(r), O = r.dateField;
|
|
1496
1488
|
if (O && typeof O != "string" && O.label && !r.timeGrain && y({
|
|
1497
1489
|
code: "invalid_change",
|
|
1498
1490
|
message: "A label names a column, and the date field is a column only when the card groups by it.",
|
|
@@ -1533,30 +1525,30 @@ async function ms(e, a, t, s) {
|
|
|
1533
1525
|
fix: "Send matrix: { columns: [...] } naming dimensions or the date field of the query (an empty list puts nothing across the top)."
|
|
1534
1526
|
}), !g.matrixColumns && f && y({ code: "type_not_supported", message: "matrix.columns is only for Matrix cards.", path: `${u}.matrix`, fix: 'Leave out matrix, or use type "matrix".' }), f && $ === "measures") {
|
|
1535
1527
|
const A = r, T = A.datasetName, L = [...A.dimensions ?? [], ...A.timeGrain && A.dateField ? [A.dateField] : []];
|
|
1536
|
-
L.length && f.columns.length >= L.length && L.every((V) => f.columns.some((
|
|
1528
|
+
L.length && f.columns.length >= L.length && L.every((V) => f.columns.some((W) => ge(W, T) === ge(V, T))) && y({
|
|
1537
1529
|
code: "type_not_supported",
|
|
1538
1530
|
message: "A Matrix needs at least one field down the side.",
|
|
1539
1531
|
path: `${u}.matrix.columns`,
|
|
1540
1532
|
fix: "Leave one dimension or the date field out of matrix.columns."
|
|
1541
1533
|
});
|
|
1542
|
-
const q = new Set([...A.dimensions ?? [], ...A.dateField ? [A.dateField] : []].map((V) =>
|
|
1543
|
-
f.columns.forEach((V,
|
|
1544
|
-
q.has(
|
|
1534
|
+
const q = new Set([...A.dimensions ?? [], ...A.dateField ? [A.dateField] : []].map((V) => ge(V, T)));
|
|
1535
|
+
f.columns.forEach((V, W) => {
|
|
1536
|
+
q.has(ge(V, T)) || y({
|
|
1545
1537
|
code: "type_not_supported",
|
|
1546
|
-
message: `"${
|
|
1547
|
-
path: `${u}.matrix.columns[${
|
|
1538
|
+
message: `"${wt(V)}" isn't one of the query's dimensions or its date field.`,
|
|
1539
|
+
path: `${u}.matrix.columns[${W}]`,
|
|
1548
1540
|
fix: "Name dimensions or the date field of the query in matrix.columns."
|
|
1549
1541
|
});
|
|
1550
1542
|
});
|
|
1551
1543
|
}
|
|
1552
|
-
},
|
|
1544
|
+
}, Kt = (m, r) => y({
|
|
1553
1545
|
code: m.code === "query_not_kept" ? "card_not_editable" : "invalid_change",
|
|
1554
1546
|
message: m.message,
|
|
1555
1547
|
path: `${r}.query`,
|
|
1556
1548
|
fix: m.code === "query_not_kept" ? "Tell the user to make this change in the editor." : "Read the outline again and propose again.",
|
|
1557
1549
|
details: { reason: "not_expressible", ..."parts" in m ? { parts: m.parts } : {} }
|
|
1558
1550
|
}), Wt = (m, r, f, u, g, $, O) => {
|
|
1559
|
-
const R =
|
|
1551
|
+
const R = ti(m, r, f, $, O);
|
|
1560
1552
|
if (!R.length) return;
|
|
1561
1553
|
const A = r;
|
|
1562
1554
|
if (R.length === 1 && R[0] === "dateField" && A.dateField && !A.timeGrain && !A.timeWindow) {
|
|
@@ -1577,10 +1569,10 @@ async function ms(e, a, t, s) {
|
|
|
1577
1569
|
details: { reason: "not_expressible", detail: `doesn't hold: ${T}` }
|
|
1578
1570
|
});
|
|
1579
1571
|
}, Ut = async (m, r, f, u, g = !1) => {
|
|
1580
|
-
const $ =
|
|
1572
|
+
const $ = ft(m);
|
|
1581
1573
|
if ("sql" in r)
|
|
1582
1574
|
return F(`${u}.query`), { type: $, source: { kind: "sql", connectionId: r.connectionId, sql: r.sql } };
|
|
1583
|
-
"measures" in r && r.timeGrain ===
|
|
1575
|
+
"measures" in r && r.timeGrain === ho && (po({ cardType: $, configBacked: !0, shelf: "groupBy", dataType: "date" }).ok || y(
|
|
1584
1576
|
m === "kpi" ? {
|
|
1585
1577
|
code: "type_not_supported",
|
|
1586
1578
|
message: "A KPI's query can't group by a grain that follows the dashboard date.",
|
|
@@ -1588,7 +1580,7 @@ async function ms(e, a, t, s) {
|
|
|
1588
1580
|
fix: 'For a trend that follows the dashboard date, send trend: true and trendGrain: "automatic" with no Trend By.'
|
|
1589
1581
|
} : {
|
|
1590
1582
|
code: "type_not_supported",
|
|
1591
|
-
message: `${
|
|
1583
|
+
message: `${di[m] ?? `A ${m.replace(/_/g, " ")}`} can't group by a grain that follows the dashboard date.`,
|
|
1592
1584
|
path: `${u}.query.timeGrain`,
|
|
1593
1585
|
fix: 'Use a bar, line or area chart or a table, or send a fixed timeGrain such as "month".'
|
|
1594
1586
|
}
|
|
@@ -1597,20 +1589,20 @@ async function ms(e, a, t, s) {
|
|
|
1597
1589
|
if (!R.ok)
|
|
1598
1590
|
throw o.push(...R.problems.map((q) => ({ ...q, path: q.path ? `${u}.query.${q.path}` : `${u}.query` }))), new me();
|
|
1599
1591
|
n.push(...R.warnings.map((q) => ({ ...q, path: q.path ?? `${u}.query` })));
|
|
1600
|
-
const A = !g && "timeWindow" in r && r.timeWindow ?
|
|
1601
|
-
A && "timeWindow" in r && r.timeWindow && ps(r.timeWindow, { use: "cardFilter", columnHasTime:
|
|
1592
|
+
const A = !g && "timeWindow" in r && r.timeWindow ? yi(R.part.config) : void 0;
|
|
1593
|
+
A && "timeWindow" in r && r.timeWindow && ps(r.timeWindow, { use: "cardFilter", columnHasTime: go(A) }, `${u}.query.timeWindow`, y);
|
|
1602
1594
|
let T = { ...R.part, type: $ };
|
|
1603
1595
|
const L = T.config ?? {};
|
|
1604
1596
|
if ($ === "detailTable") {
|
|
1605
|
-
const q =
|
|
1606
|
-
T = { ...T, config:
|
|
1597
|
+
const q = bo(yo("table", "detailTable", L)) ?? {};
|
|
1598
|
+
T = { ...T, config: ui(q) };
|
|
1607
1599
|
}
|
|
1608
|
-
return $ === "matrixTable" && (T = await _s(T, L, r, f, u)),
|
|
1600
|
+
return $ === "matrixTable" && (T = await _s(T, L, r, f, u)), fi(T, Ne(r));
|
|
1609
1601
|
}, _s = async (m, r, f, u, g) => {
|
|
1610
1602
|
var q;
|
|
1611
1603
|
const $ = await t.loadCardSource({ domainId: f.domainId, datasetName: f.datasetName });
|
|
1612
1604
|
if ($ || y({ code: "field_not_found", message: `The dataset "${f.datasetName}" isn't available.`, path: `${g}.query.datasetName`, fix: "Find datasets with semaphor_list_datasets." }), m.source.kind !== "semantic") throw new me();
|
|
1613
|
-
const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, R =
|
|
1605
|
+
const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, R = _o(O, "matrixTable", { catalog: $.fields, createId: t.newId }), A = R.status === "changed" ? (q = R.card.config) == null ? void 0 : q.matrix : void 0;
|
|
1614
1606
|
(R.status !== "changed" || R.leftOut.length || !A) && y({
|
|
1615
1607
|
code: "type_not_supported",
|
|
1616
1608
|
message: R.status === "changed" && R.leftOut.length ? `These fields can't run in a Matrix: ${R.leftOut.join(", ")}.` : "This query can't be shown as a Matrix.",
|
|
@@ -1619,59 +1611,59 @@ async function ms(e, a, t, s) {
|
|
|
1619
1611
|
});
|
|
1620
1612
|
let T = A;
|
|
1621
1613
|
const L = f.datasetName;
|
|
1622
|
-
for (const [V,
|
|
1623
|
-
const
|
|
1624
|
-
(
|
|
1614
|
+
for (const [V, W] of u.columns.entries()) {
|
|
1615
|
+
const z = [...T.spec.rows, ...T.spec.columns].find(
|
|
1616
|
+
(H) => Io(H.field) === ge(W, L)
|
|
1625
1617
|
);
|
|
1626
|
-
|
|
1618
|
+
z || y({ code: "type_not_supported", message: `"${wt(W)}" isn't a level of this Matrix.`, path: `${g}.matrix.columns[${V}]`, fix: "Name dimensions or the date field of the query in matrix.columns." }), T = Co(T, $o(T.spec, z.id, "columns")).config;
|
|
1627
1619
|
}
|
|
1628
1620
|
return { ...m, config: { matrix: T } };
|
|
1629
|
-
},
|
|
1621
|
+
}, dt = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ new Map();
|
|
1630
1622
|
for (const [m, r] of k.entries()) {
|
|
1631
1623
|
const f = `changes[${m}]`;
|
|
1632
1624
|
try {
|
|
1633
1625
|
switch (r.op) {
|
|
1634
1626
|
case "card.add": {
|
|
1635
1627
|
const u = r.position && typeof r.position == "object" ? (() => {
|
|
1636
|
-
const
|
|
1637
|
-
(
|
|
1628
|
+
const J = te(r.position.after, `${f}.position.after`), j = xe(b).find(
|
|
1629
|
+
(ie) => ie.cardId === J && ie.kind === "frameCard"
|
|
1638
1630
|
);
|
|
1639
|
-
return !
|
|
1631
|
+
return !j || j.kind !== "frameCard" ? y({
|
|
1640
1632
|
code: "card_not_found",
|
|
1641
1633
|
message: `${r.position.after} isn't a card on a grid sheet.`,
|
|
1642
1634
|
path: `${f}.position.after`,
|
|
1643
1635
|
fix: "Use a cardId from semaphor_get_dashboard_details on the same sheet, or a handle from this proposal."
|
|
1644
|
-
}) : (r.sheetId && Re(r.sheetId, `${f}.sheetId`).id !==
|
|
1636
|
+
}) : (r.sheetId && Re(r.sheetId, `${f}.sheetId`).id !== j.sheetId && y({
|
|
1645
1637
|
code: "invalid_change",
|
|
1646
1638
|
message: `position.after names a card on another sheet than ${r.sheetId}.`,
|
|
1647
1639
|
path: `${f}.position.after`,
|
|
1648
1640
|
fix: "Leave out sheetId, or name the card's sheet."
|
|
1649
|
-
}), { sheetId:
|
|
1641
|
+
}), { sheetId: j.sheetId, frameId: j.frameId });
|
|
1650
1642
|
})() : void 0, g = u ? Re(u.sheetId, `${f}.position.after`) : r.sheetId ? Re(r.sheetId, `${f}.sheetId`) : (() => {
|
|
1651
|
-
const
|
|
1652
|
-
return
|
|
1653
|
-
code:
|
|
1654
|
-
message:
|
|
1643
|
+
const J = it();
|
|
1644
|
+
return J.length !== 1 && y({
|
|
1645
|
+
code: J.length ? "sheet_required" : "sheet_not_a_grid",
|
|
1646
|
+
message: J.length ? "This dashboard has several grid sheets; say which one gets the card." : "This dashboard has no grid sheet to add a card to.",
|
|
1655
1647
|
path: `${f}.sheetId`,
|
|
1656
|
-
fix:
|
|
1648
|
+
fix: J.length ? "Send sheetId: one of details.sheets." : "Add a sheet with sheet.add earlier in this list.",
|
|
1657
1649
|
details: { sheets: Ve() }
|
|
1658
|
-
}),
|
|
1659
|
-
})(), $ = u ? { after: u.frameId } : typeof r.position == "string" ? r.position : void 0, O = $ || r.width ? { ...$ ? { position: $ } : {}, ...r.width ? { width: r.width } : {} } : void 0, R = (
|
|
1660
|
-
const
|
|
1661
|
-
return h.has(
|
|
1650
|
+
}), J[0];
|
|
1651
|
+
})(), $ = u ? { after: u.frameId } : typeof r.position == "string" ? r.position : void 0, O = $ || r.width ? { ...$ ? { position: $ } : {}, ...r.width ? { width: r.width } : {} } : void 0, R = (J) => {
|
|
1652
|
+
const j = r.handle ?? `$card_${++x}`;
|
|
1653
|
+
return h.has(j) && y({ code: "invalid_change", message: `The handle ${j} is defined twice.`, path: `${f}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(j, { kind: "card", id: J.id, title: r.title }), d.push({ ref: j, kind: "card", id: J.id, title: r.title, changeIndex: m }), j;
|
|
1662
1654
|
};
|
|
1663
1655
|
if (r.type === "text") {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
const
|
|
1667
|
-
|
|
1668
|
-
const
|
|
1656
|
+
const J = [...r.query ? ["query"] : [], ...r.matrix ? ["matrix"] : [], ...G(r)];
|
|
1657
|
+
J.length && y({ code: "invalid_change", message: `A text card takes no ${et(J)}.`, path: f, fix: Sa }), r.text === void 0 && y({ code: "invalid_change", message: "A text card needs its words in text.", path: `${f}.text`, fix: Sa });
|
|
1658
|
+
const j = ba({ text: r.text, context: { dashboard: b, place: { kind: "sheet", sheetId: g.id } }, path: `${f}.text` });
|
|
1659
|
+
j.ok || B(j.problems);
|
|
1660
|
+
const ie = Zo({
|
|
1669
1661
|
id: t.newId(),
|
|
1670
1662
|
title: r.title,
|
|
1671
1663
|
...r.description ? { description: r.description } : {},
|
|
1672
|
-
richContent:
|
|
1664
|
+
richContent: j.ok && !j.unchanged ? j.richContent : { version: 1, blocks: [{ type: "paragraph", children: [] }] }
|
|
1673
1665
|
});
|
|
1674
|
-
w({ op: "card.add", sheetId: g.id, frame: { id: t.newId(), cards: [
|
|
1666
|
+
w({ op: "card.add", sheetId: g.id, frame: { id: t.newId(), cards: [ie], activeCardId: ie.id }, ...O ? { placement: O } : {}, changeIndex: m }, f), R(ie);
|
|
1675
1667
|
break;
|
|
1676
1668
|
}
|
|
1677
1669
|
(r.text !== void 0 || !r.query) && y({
|
|
@@ -1680,21 +1672,21 @@ async function ms(e, a, t, s) {
|
|
|
1680
1672
|
path: r.text !== void 0 ? `${f}.text` : `${f}.query`,
|
|
1681
1673
|
fix: "Send query; text is for type text."
|
|
1682
1674
|
});
|
|
1683
|
-
const A =
|
|
1684
|
-
|
|
1675
|
+
const A = _t(r.query), T = A.query, L = r.type;
|
|
1676
|
+
jt(L, T, r.matrix, f);
|
|
1685
1677
|
const q = await Ut(L, T, r.matrix, f), V = {
|
|
1686
|
-
...
|
|
1678
|
+
...en({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
|
|
1687
1679
|
type: q.type
|
|
1688
|
-
},
|
|
1689
|
-
|
|
1690
|
-
const
|
|
1691
|
-
Wt(
|
|
1692
|
-
const
|
|
1693
|
-
w({ op: "card.add", sheetId: g.id, frame:
|
|
1694
|
-
const
|
|
1695
|
-
c.push(
|
|
1696
|
-
cardId:
|
|
1697
|
-
cardRef:
|
|
1680
|
+
}, W = pa(V, q);
|
|
1681
|
+
W.ok || y({ code: "invalid_change", message: W.message, path: f });
|
|
1682
|
+
const z = W.ok ? W.card : V;
|
|
1683
|
+
Wt(z, T, r.matrix, f, r.title, q);
|
|
1684
|
+
const H = { id: t.newId(), cards: [z], activeCardId: z.id };
|
|
1685
|
+
w({ op: "card.add", sheetId: g.id, frame: H, ...O ? { placement: O } : {}, changeIndex: m }, f);
|
|
1686
|
+
const Q = R(z);
|
|
1687
|
+
c.push(z.id), await M({ cardId: z.id, cardRef: Q, stated: A.calculations, index: m, path: f }), await N({
|
|
1688
|
+
cardId: z.id,
|
|
1689
|
+
cardRef: Q,
|
|
1698
1690
|
request: { settings: P(r) },
|
|
1699
1691
|
queryLabels: "sql" in T ? [] : Ne(T),
|
|
1700
1692
|
index: m,
|
|
@@ -1703,70 +1695,70 @@ async function ms(e, a, t, s) {
|
|
|
1703
1695
|
break;
|
|
1704
1696
|
}
|
|
1705
1697
|
case "card.update": {
|
|
1706
|
-
const u =
|
|
1698
|
+
const u = te(r.cardId, `${f}.cardId`), g = re(b, u);
|
|
1707
1699
|
if ((g == null ? void 0 : g.card.type) === "text") {
|
|
1708
|
-
|
|
1700
|
+
Z(r, g, m, f);
|
|
1709
1701
|
break;
|
|
1710
1702
|
}
|
|
1711
1703
|
r.text !== void 0 && y({ code: "invalid_change", message: `"${(g == null ? void 0 : g.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." });
|
|
1712
1704
|
const { card: $, read: O } = I(u, f);
|
|
1713
1705
|
let R = !1, A = [];
|
|
1714
|
-
const T = r.type && r.type !== ((Qt = qe($)) == null ? void 0 : Qt.type) ?
|
|
1706
|
+
const T = r.type && r.type !== ((Qt = qe($)) == null ? void 0 : Qt.type) ? ft(r.type) : void 0;
|
|
1715
1707
|
if (T && T !== $.type) {
|
|
1716
|
-
const q = O.editable ? O.source : void 0, V =
|
|
1717
|
-
...
|
|
1718
|
-
...V && !
|
|
1708
|
+
const q = O.editable ? O.source : void 0, V = so($, T), W = V && q && q.kind === "semantic" ? (Ht = await t.loadCardSource({ domainId: q.domainId, datasetName: q.datasetName })) == null ? void 0 : Ht.fields : void 0, z = [], H = oo($, T, {
|
|
1709
|
+
...W ? { catalog: W } : {},
|
|
1710
|
+
...V && !W ? { catalogLoading: !0 } : {},
|
|
1719
1711
|
createId: () => {
|
|
1720
|
-
const
|
|
1721
|
-
return
|
|
1712
|
+
const Q = t.newId();
|
|
1713
|
+
return z.push(Q), Q;
|
|
1722
1714
|
}
|
|
1723
1715
|
});
|
|
1724
|
-
if (
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1716
|
+
if (H.status === "refused" && y({ code: "type_not_supported", message: "The card's dataset fields couldn't be loaded for a change to or from a Matrix.", path: `${f}.type`, fix: "Send a complete query with the type change." }), H.status === "changed") {
|
|
1717
|
+
const Q = [...H.leftOut, ...H.droppedPreferences];
|
|
1718
|
+
Q.length && n.push({
|
|
1727
1719
|
code: "type_change_drops",
|
|
1728
|
-
message: `Changing "${$.title}" to ${r.type.replace(/_/g, " ")} leaves out ${
|
|
1720
|
+
message: `Changing "${$.title}" to ${r.type.replace(/_/g, " ")} leaves out ${Q.join(", ")}.`,
|
|
1729
1721
|
path: `${f}.type`,
|
|
1730
|
-
details: { dropped:
|
|
1722
|
+
details: { dropped: Q }
|
|
1731
1723
|
}), w(
|
|
1732
|
-
{ op: "card.update", cardId: u, update: { kind: "retype", type: T, ...
|
|
1724
|
+
{ op: "card.update", cardId: u, update: { kind: "retype", type: T, ...W ? { catalog: W } : {}, newIds: z }, changeIndex: m },
|
|
1733
1725
|
`${f}.type`
|
|
1734
1726
|
), R = !0;
|
|
1735
1727
|
}
|
|
1736
1728
|
}
|
|
1737
|
-
const L = r.query ?
|
|
1729
|
+
const L = r.query ? _t(r.query) : void 0;
|
|
1738
1730
|
if (r.query || r.matrix) {
|
|
1739
|
-
const q =
|
|
1740
|
-
if (
|
|
1741
|
-
const
|
|
1731
|
+
const q = re(b, u).card, V = we(q, { sql: !0, calculations: !1 }), W = V.editable ? _t(V.query).query : void 0, z = W, H = gi(z, (L == null ? void 0 : L.query) ?? {}, `${f}.query`, (X) => {
|
|
1732
|
+
if (X.code === "query_form_mismatch" && (L != null && L.calculations.length)) {
|
|
1733
|
+
const ce = D(q, L.calculations, f), Ce = ma({ card: q, stated: ce, context: { path: f, cardRef: r.cardId, dates: Ta(q) } });
|
|
1742
1734
|
if (!Ce.ok)
|
|
1743
1735
|
throw o.push(...Ce.problems), new me();
|
|
1744
1736
|
}
|
|
1745
|
-
return y(
|
|
1737
|
+
return y(X);
|
|
1746
1738
|
});
|
|
1747
|
-
A =
|
|
1748
|
-
const
|
|
1749
|
-
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1752
|
-
let
|
|
1753
|
-
if (
|
|
1754
|
-
const { orderBy:
|
|
1755
|
-
|
|
1739
|
+
A = pi((L == null ? void 0 : L.query) ?? {}, H);
|
|
1740
|
+
const Q = ((Yt = qe(q)) == null ? void 0 : Yt.type) ?? xt(q.type), J = r.matrix ?? (V.editable ? V.matrix : void 0);
|
|
1741
|
+
jt(Q, H, J, f);
|
|
1742
|
+
const j = V.editable && W ? no(W, H, V.matrix, J) : void 0, ie = !j || j.aspects.length > 0, fe = j && !("sql" in H) ? Ne(H).filter((X) => !ha(j, X.key.role)) : [], Ae = io(q, j, fe.map((X) => X.key.role));
|
|
1743
|
+
Ae && Kt(Ae, f);
|
|
1744
|
+
let Ie = H;
|
|
1745
|
+
if (j && !("sql" in H) && H.orderBy && !j.aspects.includes("order") && ["metric", "group_by", "detail"].some((X) => ha(j, X))) {
|
|
1746
|
+
const { orderBy: X, ...ce } = H;
|
|
1747
|
+
Ie = ce;
|
|
1756
1748
|
}
|
|
1757
|
-
let
|
|
1758
|
-
if (
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1761
|
-
const la =
|
|
1762
|
-
if (
|
|
1749
|
+
let Y;
|
|
1750
|
+
if (ie) {
|
|
1751
|
+
const X = !!(z && hs(z, (L == null ? void 0 : L.query) ?? {}) && (j != null && j.keptWindow)), ce = await Ut(Q, Ie, J, f, X), Ce = ce.type === ft(Q) ? { ...ce, type: q.type } : ce;
|
|
1752
|
+
Y = Ce;
|
|
1753
|
+
const la = j ? { ...Ce, change: j } : Ce, pe = pa(q, la);
|
|
1754
|
+
if (pe.ok || Kt(pe, f), pe.ok && pe.droppedBindings.length && n.push({
|
|
1763
1755
|
code: "control_binding_dropped",
|
|
1764
1756
|
message: `"${q.title}" loses the controls bound to the levels or measures this change removes; they stop changing this card.`,
|
|
1765
1757
|
path: `${f}.query`,
|
|
1766
1758
|
fix: "Keep those fields in the query, or tell the user the controls no longer apply to this card.",
|
|
1767
|
-
details: { controlIds:
|
|
1768
|
-
}),
|
|
1769
|
-
for (const Ge of
|
|
1759
|
+
details: { controlIds: pe.droppedBindings }
|
|
1760
|
+
}), pe.ok)
|
|
1761
|
+
for (const Ge of pe.keptLabels)
|
|
1770
1762
|
n.push({
|
|
1771
1763
|
code: "label_kept_after_change",
|
|
1772
1764
|
message: `"${q.title}" keeps the label "${Ge.label}" on ${Ge.field}, whose aggregate or time grain changed.`,
|
|
@@ -1776,7 +1768,7 @@ async function ms(e, a, t, s) {
|
|
|
1776
1768
|
});
|
|
1777
1769
|
w({ op: "card.update", cardId: u, update: { kind: "requery", query: la }, changeIndex: m }, `${f}.query`), R = !0;
|
|
1778
1770
|
}
|
|
1779
|
-
fe.length && ga(
|
|
1771
|
+
fe.length && ga(re(b, u).card, fe).changed.length && w({ op: "card.update", cardId: u, update: { kind: "relabel", labels: fe }, changeIndex: m }, `${f}.query`), (ie || fe.length) && Wt(re(b, u).card, Ie, J, f, q.title ?? "", Y, j);
|
|
1780
1772
|
}
|
|
1781
1773
|
(r.query || T) && await M({ cardId: u, cardRef: r.cardId, stated: (L == null ? void 0 : L.calculations) ?? [], index: m, path: f }) && (R = !0), (r.title !== void 0 || r.description !== void 0) && w(
|
|
1782
1774
|
{
|
|
@@ -1801,8 +1793,8 @@ async function ms(e, a, t, s) {
|
|
|
1801
1793
|
break;
|
|
1802
1794
|
}
|
|
1803
1795
|
case "card.remove": {
|
|
1804
|
-
const u =
|
|
1805
|
-
g || y({ code: "card_not_editable", message: "Cards in Document sections are removed in the editor.", path: `${f}.cardId`, fix: "Tell the user to remove it in the editor.", details: { reason: "document_section" } }),
|
|
1796
|
+
const u = te(r.cardId, `${f}.cardId`), g = re(b, u);
|
|
1797
|
+
g || y({ code: "card_not_editable", message: "Cards in Document sections are removed in the editor.", path: `${f}.cardId`, fix: "Tell the user to remove it in the editor.", details: { reason: "document_section" } }), vt(g.frame) && g.frame.cards.length > 1 && y({ code: "card_not_editable", message: "This card is an input of a custom visual; remove it in the editor.", path: `${f}.cardId`, fix: "Tell the user to remove it in the editor.", details: { reason: "custom" } }), g.frame.visualId && g.frame.cards.length > 1 && n.push({
|
|
1806
1798
|
code: "detaches_linked_visual",
|
|
1807
1799
|
message: `Removing "${g.card.title}" makes the rest of its tile local to this dashboard; it stops following its library visual.`,
|
|
1808
1800
|
path: f,
|
|
@@ -1813,7 +1805,7 @@ async function ms(e, a, t, s) {
|
|
|
1813
1805
|
case "filter.add": {
|
|
1814
1806
|
const u = await t.loadCardSource({ domainId: r.domainId, datasetName: r.datasetName });
|
|
1815
1807
|
u || y({ code: "field_not_found", message: `The dataset "${r.datasetName}" isn't available in this domain.`, path: `${f}.datasetName`, fix: "Find datasets with semaphor_list_datasets." });
|
|
1816
|
-
const g =
|
|
1808
|
+
const g = nt(u.fields, r.field, r.datasetName);
|
|
1817
1809
|
g || y({
|
|
1818
1810
|
code: "field_not_found",
|
|
1819
1811
|
message: `"${r.field}" isn't a field of ${r.datasetName}.`,
|
|
@@ -1821,7 +1813,7 @@ async function ms(e, a, t, s) {
|
|
|
1821
1813
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1822
1814
|
details: { available: u.fields.slice(0, 20).map((L) => L.name) }
|
|
1823
1815
|
});
|
|
1824
|
-
const $ = r.sheetIds ? Gt(r.sheetIds, f) : void 0, O = Ra($), R =
|
|
1816
|
+
const $ = r.sheetIds ? Gt(r.sheetIds, f) : void 0, O = Ra($), R = Xo({
|
|
1825
1817
|
field: g,
|
|
1826
1818
|
dataSource: u.dataSource,
|
|
1827
1819
|
connectionId: u.connectionId,
|
|
@@ -1831,13 +1823,13 @@ async function ms(e, a, t, s) {
|
|
|
1831
1823
|
createId: t.newId,
|
|
1832
1824
|
label: r.label
|
|
1833
1825
|
}), A = { ...R.filter };
|
|
1834
|
-
A.dateSelectionMode || (A.type = r.selection ?? "multiple"), r.defaultValues && (A.defaultValues = r.defaultValues), r.defaultPeriod && Object.assign(A, fa(A, Aa(r.defaultPeriod, g, `${f}.defaultPeriod`, y))), w({ op: "filter.add", input: { ...R, filter: A }, changeIndex: m }, f),
|
|
1826
|
+
A.dateSelectionMode || (A.type = r.selection ?? "multiple"), r.defaultValues && (A.defaultValues = r.defaultValues), r.defaultPeriod && Object.assign(A, fa(A, Aa(r.defaultPeriod, g, `${f}.defaultPeriod`, y))), w({ op: "filter.add", input: { ...R, filter: A }, changeIndex: m }, f), dt.set(R.id, { sheetIds: $ ?? "all", changeIndex: m }), (r.defaultValues !== void 0 || r.defaultPeriod !== void 0) && lt.set(R.id, { values: r.defaultValues, period: r.defaultPeriod, changeIndex: m });
|
|
1835
1827
|
const T = r.handle;
|
|
1836
1828
|
T && (h.has(T) && y({ code: "invalid_change", message: `The handle ${T} is defined twice.`, path: `${f}.handle`, fix: "Give each new card, filter or sheet its own handle." }), h.set(T, { kind: "filter", id: R.id, title: r.label })), d.push({ ref: T ?? R.id, kind: "filter", id: R.id, title: r.label, changeIndex: m });
|
|
1837
1829
|
break;
|
|
1838
1830
|
}
|
|
1839
1831
|
case "filter.update": {
|
|
1840
|
-
const u =
|
|
1832
|
+
const u = oe(r.filterId, `${f}.filterId`), g = Le(b, u, void 0, v);
|
|
1841
1833
|
g != null && g.editable || y({
|
|
1842
1834
|
code: "filter_not_editable",
|
|
1843
1835
|
message: g && !g.editable ? g.notEditable.message : "This filter can't be changed through the MCP.",
|
|
@@ -1861,36 +1853,36 @@ async function ms(e, a, t, s) {
|
|
|
1861
1853
|
...r.selection !== void 0 || R ? { definition: O } : {},
|
|
1862
1854
|
// A change of sheets states the sheets; what else the scope says (the cards it leaves out,
|
|
1863
1855
|
// whether it covers Document sheets) stays.
|
|
1864
|
-
...A ? { scope:
|
|
1856
|
+
...A ? { scope: Go(
|
|
1865
1857
|
$.scope,
|
|
1866
1858
|
Ra(A === "all" ? void 0 : A),
|
|
1867
1859
|
new Set([...Et(b).values()].filter((L) => L.sheetKind === "document").map((L) => L.sheetId))
|
|
1868
1860
|
) } : {},
|
|
1869
1861
|
...R ? { values: { defaultChanged: !0, target: {} } } : {}
|
|
1870
1862
|
};
|
|
1871
|
-
w({ op: "filter.update", filterId: u, settings: T, changeIndex: m }, f), A &&
|
|
1863
|
+
w({ op: "filter.update", filterId: u, settings: T, changeIndex: m }, f), A && dt.set(u, { sheetIds: A, changeIndex: m }), R && lt.set(u, { values: r.defaultValues, period: r.defaultPeriod, changeIndex: m }), d.push({ ref: r.filterId, kind: "filter", id: u, title: $.label, changeIndex: m });
|
|
1872
1864
|
break;
|
|
1873
1865
|
}
|
|
1874
1866
|
case "filter.remove": {
|
|
1875
|
-
const u =
|
|
1867
|
+
const u = oe(r.filterId, `${f}.filterId`), g = ((zt = (b.inputs ?? []).find(($) => $.id === u)) == null ? void 0 : zt.label) ?? "";
|
|
1876
1868
|
w({ op: "filter.remove", filterId: u, changeIndex: m }, f), d.push({ ref: r.filterId, kind: "filter", id: u, title: g, changeIndex: m });
|
|
1877
1869
|
break;
|
|
1878
1870
|
}
|
|
1879
1871
|
case "filter.bind": {
|
|
1880
|
-
const u =
|
|
1872
|
+
const u = oe(r.filterId, `${f}.filterId`), g = Le(b, u, void 0, v);
|
|
1881
1873
|
g != null && g.editable || y({
|
|
1882
1874
|
code: "filter_not_editable",
|
|
1883
1875
|
message: g && !g.editable ? g.notEditable.message : "This filter can't be changed through the MCP.",
|
|
1884
1876
|
path: `${f}.filterId`,
|
|
1885
1877
|
fix: "Tell the user to change it in the editor; removing or excluding it works."
|
|
1886
1878
|
});
|
|
1887
|
-
const $ = Vt(r.cardId, `${f}.cardId`), O = Ua(b, $).card, R =
|
|
1879
|
+
const $ = Vt(r.cardId, `${f}.cardId`), O = Ua(b, $).card, R = ve(b).findFilterInput({ inputId: u }), A = R && $e(R.input, O, v).reach === "relationshipApplied", T = await vi(O, r.field, t, `${f}.field`, y, A ? g.label : void 0);
|
|
1888
1880
|
w({ op: "filter.bind", filterId: u, cardId: $, binding: { kind: "bound", cardId: $, bindingId: t.newId(), target: T }, changeIndex: m }, f), d.push({ ref: r.filterId, kind: "filter", id: u, title: g.label, changeIndex: m });
|
|
1889
1881
|
break;
|
|
1890
1882
|
}
|
|
1891
1883
|
case "layout.arrange": {
|
|
1892
1884
|
const u = r.sheetId ? Re(r.sheetId, `${f}.sheetId`) : (() => {
|
|
1893
|
-
const g =
|
|
1885
|
+
const g = it();
|
|
1894
1886
|
return g.length !== 1 && y({
|
|
1895
1887
|
code: g.length ? "sheet_required" : "sheet_not_a_grid",
|
|
1896
1888
|
message: g.length ? "This dashboard has several grid sheets; say which one to arrange." : "This dashboard has no grid sheet to arrange.",
|
|
@@ -1903,10 +1895,10 @@ async function ms(e, a, t, s) {
|
|
|
1903
1895
|
break;
|
|
1904
1896
|
}
|
|
1905
1897
|
case "layout.tabs": {
|
|
1906
|
-
const u = r.cardIds.map((q, V) =>
|
|
1898
|
+
const u = r.cardIds.map((q, V) => te(q, `${f}.cardIds[${V}]`)), g = (q, V, W = `${f}.cardIds`) => y({ code: "layout_invalid", message: q, path: W, fix: V });
|
|
1907
1899
|
new Set(u).size !== u.length && g("Each card is named once in tabs.", "Name two or more different cards, each once.");
|
|
1908
|
-
const $ = u.map((q, V) =>
|
|
1909
|
-
$.some((q) => q.sheet.id !== O.id) && g("Tabs are cards on one sheet.", "Name cards on one sheet; a card moves to another sheet in the editor."), $.some((q) =>
|
|
1900
|
+
const $ = u.map((q, V) => re(b, q) ?? g("A Document section's card can't be a tab.", "Name cards on a grid sheet.", `${f}.cardIds[${V}]`)), O = $[0].sheet;
|
|
1901
|
+
$.some((q) => q.sheet.id !== O.id) && g("Tabs are cards on one sheet.", "Name cards on one sheet; a card moves to another sheet in the editor."), $.some((q) => vt(q.frame) && q.frame.cards.length > 1) && g("A custom visual's inputs stay in its spot.", "Name cards that aren't a custom visual's inputs, or arrange them in the editor.");
|
|
1910
1902
|
const R = $[0].frame, A = $[0].card;
|
|
1911
1903
|
d.push({ ref: r.cardIds[0], kind: "card", id: A.id, title: A.title ?? "", changeIndex: m });
|
|
1912
1904
|
const T = Va(R);
|
|
@@ -1926,8 +1918,8 @@ async function ms(e, a, t, s) {
|
|
|
1926
1918
|
break;
|
|
1927
1919
|
}
|
|
1928
1920
|
case "layout.untab": {
|
|
1929
|
-
const u =
|
|
1930
|
-
if (g || y({ code: "layout_invalid", message: "A Document section's card has no spot of its own.", path: `${f}.cardId`, fix: "Name a card on a grid sheet." }),
|
|
1921
|
+
const u = te(r.cardId, `${f}.cardId`), g = re(b, u);
|
|
1922
|
+
if (g || y({ code: "layout_invalid", message: "A Document section's card has no spot of its own.", path: `${f}.cardId`, fix: "Name a card on a grid sheet." }), vt(g.frame) && g.frame.cards.length > 1 && y({ code: "layout_invalid", message: "A custom visual's inputs stay in its spot.", path: `${f}.cardId`, fix: "Arrange a custom visual in the editor." }), d.push({ ref: r.cardId, kind: "card", id: u, title: g.card.title ?? "", changeIndex: m }), g.frame.cards.length < 2) break;
|
|
1931
1923
|
g.frame.visualId && n.push({
|
|
1932
1924
|
code: "detaches_linked_visual",
|
|
1933
1925
|
message: `Taking "${g.card.title}" out of its tabs makes them local to this dashboard; they stop following their library visual.`,
|
|
@@ -1937,13 +1929,13 @@ async function ms(e, a, t, s) {
|
|
|
1937
1929
|
break;
|
|
1938
1930
|
}
|
|
1939
1931
|
case "filter.exclude": {
|
|
1940
|
-
const u =
|
|
1932
|
+
const u = oe(r.filterId, `${f}.filterId`), g = Vt(r.cardId, `${f}.cardId`), $ = ((Jt = (b.inputs ?? []).find((O) => O.id === u)) == null ? void 0 : Jt.label) ?? "";
|
|
1941
1933
|
w({ op: "filter.exclude", filterId: u, cardId: g, changeIndex: m }, f), d.push({ ref: r.filterId, kind: "filter", id: u, title: $, changeIndex: m });
|
|
1942
1934
|
break;
|
|
1943
1935
|
}
|
|
1944
1936
|
case "highlight.add":
|
|
1945
1937
|
case "highlight.remove": {
|
|
1946
|
-
const u =
|
|
1938
|
+
const u = te(r.cardId, `${f}.cardId`), { card: g } = I(u, f), { op: $, cardId: O, ...R } = r, A = await N({
|
|
1947
1939
|
cardId: u,
|
|
1948
1940
|
cardRef: r.cardId,
|
|
1949
1941
|
request: { highlights: r.op === "highlight.add" ? { add: [R] } : { remove: [r.ruleId] } },
|
|
@@ -1962,7 +1954,7 @@ async function ms(e, a, t, s) {
|
|
|
1962
1954
|
break;
|
|
1963
1955
|
}
|
|
1964
1956
|
case "sheet.update": {
|
|
1965
|
-
const u =
|
|
1957
|
+
const u = rt(r.sheetId, `${f}.sheetId`, { grid: !1 });
|
|
1966
1958
|
(u.title ?? "") !== r.title && w({ op: "sheet.update", sheetId: u.id, title: r.title, changeIndex: m }, f), d.push({ ref: r.sheetId, kind: "sheet", id: u.id, title: r.title, changeIndex: m });
|
|
1967
1959
|
break;
|
|
1968
1960
|
}
|
|
@@ -1982,7 +1974,7 @@ async function ms(e, a, t, s) {
|
|
|
1982
1974
|
case "dashboard.style": {
|
|
1983
1975
|
const { op: u, ...g } = r;
|
|
1984
1976
|
S ?? (S = t.readOrganizationAppearance ? t.readOrganizationAppearance() : Promise.resolve(null));
|
|
1985
|
-
const { style: $, organizationAppearance: O } = za(b, await S), R =
|
|
1977
|
+
const { style: $, organizationAppearance: O } = za(b, await S), R = fn({ style: $, edit: g, layers: { organizationAppearance: O } });
|
|
1986
1978
|
if (R.ok)
|
|
1987
1979
|
R.sentences.length && w({ op: "dashboard.style", style: R.style, sentences: R.sentences, changeIndex: m }, f);
|
|
1988
1980
|
else {
|
|
@@ -2011,7 +2003,7 @@ async function ms(e, a, t, s) {
|
|
|
2011
2003
|
break;
|
|
2012
2004
|
}
|
|
2013
2005
|
case "variable.update": {
|
|
2014
|
-
const u =
|
|
2006
|
+
const u = ai(b, r.name, `${f}.name`, Te), g = r.rename ?? u.name, $ = {
|
|
2015
2007
|
...r.rename !== void 0 ? { name: r.rename } : {},
|
|
2016
2008
|
...r.label !== void 0 ? { label: r.label } : {},
|
|
2017
2009
|
...r.presentation !== void 0 ? { presentation: r.presentation } : {},
|
|
@@ -2034,7 +2026,7 @@ async function ms(e, a, t, s) {
|
|
|
2034
2026
|
);
|
|
2035
2027
|
$.query = T.query, $.get = T.get;
|
|
2036
2028
|
} else if (r.get !== void 0) {
|
|
2037
|
-
const T =
|
|
2029
|
+
const T = ni(u, r.get, O, Te, f);
|
|
2038
2030
|
$.query = T.query, $.get = T.get;
|
|
2039
2031
|
}
|
|
2040
2032
|
Object.keys($).length || y({ code: "invalid_change", message: `variable.update on ${u.name} changes nothing.`, path: f, fix: "Send rename, label, query, get, presentation or emptyText." });
|
|
@@ -2045,7 +2037,7 @@ async function ms(e, a, t, s) {
|
|
|
2045
2037
|
case "variable.remove": {
|
|
2046
2038
|
const u = Je(b, r.name);
|
|
2047
2039
|
u || y(cs(b, r.name, `${f}.name`));
|
|
2048
|
-
const g = u, $ =
|
|
2040
|
+
const g = u, $ = ii(b, g.id);
|
|
2049
2041
|
$.places.length && y({
|
|
2050
2042
|
code: "variable_in_use",
|
|
2051
2043
|
message: `${g.name} is shown in ${$.words}.`,
|
|
@@ -2056,7 +2048,7 @@ async function ms(e, a, t, s) {
|
|
|
2056
2048
|
break;
|
|
2057
2049
|
}
|
|
2058
2050
|
case "document.text.update": {
|
|
2059
|
-
const u =
|
|
2051
|
+
const u = rt(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: g, unchanged: $ } = ri(r, b, u, f, Te);
|
|
2060
2052
|
if (d.push({ ref: r.sheetId, kind: "sheet", id: u.id, title: u.title ?? "", changeIndex: m }), $) break;
|
|
2061
2053
|
w({ op: "document.text", sheetId: u.id, edit: g, changeIndex: m }, f);
|
|
2062
2054
|
break;
|
|
@@ -2071,34 +2063,34 @@ async function ms(e, a, t, s) {
|
|
|
2071
2063
|
}
|
|
2072
2064
|
}
|
|
2073
2065
|
if (o.length) return { ok: !1, problems: o };
|
|
2074
|
-
const
|
|
2075
|
-
if (!
|
|
2066
|
+
const ne = St(e, i, { ...p, ...v });
|
|
2067
|
+
if (!ne.ok)
|
|
2076
2068
|
return {
|
|
2077
2069
|
ok: !1,
|
|
2078
2070
|
problems: [
|
|
2079
2071
|
{
|
|
2080
2072
|
code: "invalid_change",
|
|
2081
|
-
message:
|
|
2082
|
-
path: `changes[${((ea = i[
|
|
2073
|
+
message: ne.failedAt.message,
|
|
2074
|
+
path: `changes[${((ea = i[ne.failedAt.index]) == null ? void 0 : ea.changeIndex) ?? 0}]`,
|
|
2083
2075
|
fix: "Read the outline again and propose again."
|
|
2084
2076
|
}
|
|
2085
2077
|
]
|
|
2086
2078
|
};
|
|
2087
2079
|
for (const m of c) {
|
|
2088
|
-
const r =
|
|
2080
|
+
const r = re(ne.dashboard, m);
|
|
2089
2081
|
if (!r) continue;
|
|
2090
|
-
const f = ((ta = i.find((O) => Lt(O) === m)) == null ? void 0 : ta.changeIndex) ?? 0, u = we(r.card, { sql: !0 }), g = ((aa = qe(r.card)) == null ? void 0 : aa.type) ??
|
|
2091
|
-
u.editable && ("sql" in u.query ? !!u.query.sql : "measures" in u.query ? u.query.measures.length > 0 : u.query.columns.length > 0) && ((sa = De[g]) == null ? void 0 : sa.forms.includes(
|
|
2082
|
+
const f = ((ta = i.find((O) => Lt(O) === m)) == null ? void 0 : ta.changeIndex) ?? 0, u = we(r.card, { sql: !0 }), g = ((aa = qe(r.card)) == null ? void 0 : aa.type) ?? xt(r.card.type);
|
|
2083
|
+
u.editable && ("sql" in u.query ? !!u.query.sql : "measures" in u.query ? u.query.measures.length > 0 : u.query.columns.length > 0) && ((sa = De[g]) == null ? void 0 : sa.forms.includes(at(u.query))) || o.push({
|
|
2092
2084
|
code: "type_not_supported",
|
|
2093
2085
|
message: `As changed, "${r.card.title}" would have no query a ${g.replace(/_/g, " ")} can run.`,
|
|
2094
2086
|
path: `changes[${f}]`,
|
|
2095
2087
|
fix: `Send a complete query with the type change: ${((oa = De[g]) == null ? void 0 : oa.forms.map((O) => Ue[O]).join(" or ")) ?? "a measures query"}.`
|
|
2096
2088
|
});
|
|
2097
2089
|
}
|
|
2098
|
-
if (o.push(...
|
|
2090
|
+
if (o.push(...mi(e, ne.dashboard, i, dt, v)), o.push(...hi(ne.dashboard, lt, t.calendar)), o.length) return { ok: !1, problems: o };
|
|
2099
2091
|
for (const m of i) {
|
|
2100
2092
|
if (m.op !== "filter.add" && !(m.op === "filter.update" && m.settings.scope)) continue;
|
|
2101
|
-
const r = m.op === "filter.add" ? m.input.id : m.filterId, f = Le(
|
|
2093
|
+
const r = m.op === "filter.add" ? m.input.id : m.filterId, f = Le(ne.dashboard, r, void 0, v);
|
|
2102
2094
|
if (!(f != null && f.editable)) continue;
|
|
2103
2095
|
const u = async (R) => {
|
|
2104
2096
|
const A = [];
|
|
@@ -2148,9 +2140,9 @@ async function ms(e, a, t, s) {
|
|
|
2148
2140
|
}
|
|
2149
2141
|
if (t.readComparisonDates)
|
|
2150
2142
|
for (const [m, r] of _) {
|
|
2151
|
-
const f = (ra =
|
|
2143
|
+
const f = (ra = re(ne.dashboard, m)) == null ? void 0 : ra.card;
|
|
2152
2144
|
if (!f) continue;
|
|
2153
|
-
const u = await t.readComparisonDates({ card: f, dashboard:
|
|
2145
|
+
const u = await t.readComparisonDates({ card: f, dashboard: ne.dashboard });
|
|
2154
2146
|
u.dateWindow === "none" && n.push({
|
|
2155
2147
|
code: "comparison_without_date_window",
|
|
2156
2148
|
message: `"${f.title || "Untitled"}" compares with an earlier period only while a date range applies to ${((da = u.comparisonDate) == null ? void 0 : da.label) ?? "its date"}; none does yet.`,
|
|
@@ -2158,13 +2150,13 @@ async function ms(e, a, t, s) {
|
|
|
2158
2150
|
fix: "Add a timeWindow on that date, or a dashboard date filter that reaches the card."
|
|
2159
2151
|
});
|
|
2160
2152
|
}
|
|
2161
|
-
const Is =
|
|
2153
|
+
const Is = ci(ne.dashboard, i, ne.descriptions, v);
|
|
2162
2154
|
return {
|
|
2163
2155
|
ok: !0,
|
|
2164
2156
|
operations: i,
|
|
2165
2157
|
context: p,
|
|
2166
|
-
dashboard:
|
|
2167
|
-
detaches:
|
|
2158
|
+
dashboard: ne.dashboard,
|
|
2159
|
+
detaches: ne.detaches,
|
|
2168
2160
|
refs: d,
|
|
2169
2161
|
descriptions: Is,
|
|
2170
2162
|
changedCardIds: c,
|
|
@@ -2172,7 +2164,7 @@ async function ms(e, a, t, s) {
|
|
|
2172
2164
|
warnings: n
|
|
2173
2165
|
};
|
|
2174
2166
|
}
|
|
2175
|
-
function
|
|
2167
|
+
function ci(e, a, t, s) {
|
|
2176
2168
|
const o = a.filter((l) => l.op === "card.add");
|
|
2177
2169
|
if (!o.length) return [...t];
|
|
2178
2170
|
const n = ss(e, void 0, s);
|
|
@@ -2211,16 +2203,16 @@ function Lt(e) {
|
|
|
2211
2203
|
if (e.op === "card.update" || e.op === "card.remove") return e.cardId;
|
|
2212
2204
|
if (e.op === "card.add") return (a = e.frame.cards[0]) == null ? void 0 : a.id;
|
|
2213
2205
|
}
|
|
2214
|
-
function
|
|
2206
|
+
function ui(e) {
|
|
2215
2207
|
return Object.fromEntries(
|
|
2216
|
-
|
|
2208
|
+
vo.flatMap((a) => e[a] === void 0 ? [] : [[a, e[a]]])
|
|
2217
2209
|
);
|
|
2218
2210
|
}
|
|
2219
|
-
function
|
|
2211
|
+
function fi(e, a) {
|
|
2220
2212
|
if (!a.length || !e.config) return e;
|
|
2221
2213
|
const t = { ...e.config }, s = [];
|
|
2222
2214
|
if (t.matrix) {
|
|
2223
|
-
const n = t.matrix, i =
|
|
2215
|
+
const n = t.matrix, i = wo(n), d = [...n.spec.rows, ...n.spec.columns], l = { ...n.presentation.levelLabels }, c = { ...n.presentation.measureLabels };
|
|
2224
2216
|
for (const { key: h, label: p } of a) {
|
|
2225
2217
|
if (h.role === "metric") {
|
|
2226
2218
|
const v = i.measures.findIndex((b) => Ye(b, h));
|
|
@@ -2237,14 +2229,14 @@ function ui(e, a) {
|
|
|
2237
2229
|
}
|
|
2238
2230
|
const o = { metric: "metricColumns", group_by: "groupByColumns", detail: "detailColumns" };
|
|
2239
2231
|
for (const { key: n, label: i } of a) {
|
|
2240
|
-
const d = [...t[o[n.role]] ?? []], l =
|
|
2241
|
-
l < 0 || (d[l] =
|
|
2232
|
+
const d = [...t[o[n.role]] ?? []], l = Ka(n.role, d).findIndex((c) => Ye(c, n));
|
|
2233
|
+
l < 0 || (d[l] = bn(d[l], i), t[o[n.role]] = d, s.push(n));
|
|
2242
2234
|
}
|
|
2243
2235
|
return { ...e, config: t, statedLabels: s };
|
|
2244
2236
|
}
|
|
2245
|
-
function
|
|
2237
|
+
function mi(e, a, t, s, o) {
|
|
2246
2238
|
var E;
|
|
2247
|
-
const n = [], i = new Map(xe(a).map((C) => [C.cardId, C])), d = Et(a), l =
|
|
2239
|
+
const n = [], i = new Map(xe(a).map((C) => [C.cardId, C])), d = Et(a), l = ve(a), c = (C) => {
|
|
2248
2240
|
var k, y;
|
|
2249
2241
|
return ((y = (k = a.sheets) == null ? void 0 : k.find((F) => F.id === C)) == null ? void 0 : y.title) ?? C;
|
|
2250
2242
|
}, h = (C, k) => {
|
|
@@ -2265,7 +2257,7 @@ function fi(e, a, t, s, o) {
|
|
|
2265
2257
|
message: `${N} isn't shown on "${c(F.sheetId)}", so it can't filter ${w}.`,
|
|
2266
2258
|
fix: "Show it on that sheet first with filter.update sheetIds (null for every sheet), in the same proposal."
|
|
2267
2259
|
};
|
|
2268
|
-
const _ =
|
|
2260
|
+
const _ = xo(y, F.card);
|
|
2269
2261
|
switch (_.status) {
|
|
2270
2262
|
case "incompatible":
|
|
2271
2263
|
return { reason: "incompatible_field", message: `${w} can't take ${N}'s values on that field: their types differ.`, fix: "Bind a field of the same type (filter.bind)." };
|
|
@@ -2343,7 +2335,7 @@ function fi(e, a, t, s, o) {
|
|
|
2343
2335
|
details: { reason: "filter_settings_override", ...w ? { sheetIds: w } : {} }
|
|
2344
2336
|
});
|
|
2345
2337
|
}
|
|
2346
|
-
const S =
|
|
2338
|
+
const S = ve(e), x = (C) => C === "blocked" || C === "ambiguous";
|
|
2347
2339
|
for (const C of l.inputs) {
|
|
2348
2340
|
const k = C.input.id;
|
|
2349
2341
|
for (const y of l.reachedCards({ inputId: k })) {
|
|
@@ -2362,8 +2354,8 @@ function fi(e, a, t, s, o) {
|
|
|
2362
2354
|
}
|
|
2363
2355
|
return n;
|
|
2364
2356
|
}
|
|
2365
|
-
function
|
|
2366
|
-
const s = [], o =
|
|
2357
|
+
function hi(e, a, t) {
|
|
2358
|
+
const s = [], o = ve(e);
|
|
2367
2359
|
for (const [n, i] of a) {
|
|
2368
2360
|
const d = o.findFilterInput({ inputId: n });
|
|
2369
2361
|
if (!d) continue;
|
|
@@ -2376,7 +2368,7 @@ function mi(e, a, t) {
|
|
|
2376
2368
|
});
|
|
2377
2369
|
if (i.period) {
|
|
2378
2370
|
const v = Xa(l && "relativeMeta" in l ? l.relativeMeta : void 0);
|
|
2379
|
-
(!v ||
|
|
2371
|
+
(!v || rn(i.period) || !dn(v, i.period)) && p(
|
|
2380
2372
|
`"${d.input.label}" wouldn't load with that default${h ? `: ${h}` : ""}.`,
|
|
2381
2373
|
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."
|
|
2382
2374
|
);
|
|
@@ -2388,7 +2380,7 @@ function mi(e, a, t) {
|
|
|
2388
2380
|
}
|
|
2389
2381
|
return s;
|
|
2390
2382
|
}
|
|
2391
|
-
function
|
|
2383
|
+
function _t(e) {
|
|
2392
2384
|
const a = e.measures;
|
|
2393
2385
|
if (!Array.isArray(a)) return { query: e, calculations: [] };
|
|
2394
2386
|
const t = [], s = a.map((o, n) => {
|
|
@@ -2400,20 +2392,20 @@ function vt(e) {
|
|
|
2400
2392
|
}
|
|
2401
2393
|
function Ta(e) {
|
|
2402
2394
|
var t, s;
|
|
2403
|
-
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) =>
|
|
2395
|
+
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) => mo(o.dataType || "") === "date");
|
|
2404
2396
|
return { comparisonDate: a ? { name: a.name, label: a.label || a.name } : null, dateWindow: "unknown" };
|
|
2405
2397
|
}
|
|
2406
|
-
function
|
|
2398
|
+
function pi(e, a) {
|
|
2407
2399
|
if ("sql" in a) return [];
|
|
2408
|
-
const t = e, s = (...n) => new Set(n.flatMap((i) => Array.isArray(i) ? i : i ? [i] : []).map((i) =>
|
|
2400
|
+
const t = e, s = (...n) => new Set(n.flatMap((i) => Array.isArray(i) ? i : i ? [i] : []).map((i) => ge(i, a.datasetName))), o = {
|
|
2409
2401
|
metric: s(t.measures),
|
|
2410
2402
|
group_by: s(t.dimensions, t.dateField),
|
|
2411
2403
|
detail: s(t.columns)
|
|
2412
2404
|
};
|
|
2413
2405
|
return Ne(a).filter((n) => o[n.key.role].has(n.key.field));
|
|
2414
2406
|
}
|
|
2415
|
-
function
|
|
2416
|
-
const o = Object.fromEntries(Object.entries(a).filter(([, p]) => p != null)), n =
|
|
2407
|
+
function gi(e, a, t, s) {
|
|
2408
|
+
const o = Object.fromEntries(Object.entries(a).filter(([, p]) => p != null)), n = at(o), i = at(e), d = (p) => ka[p].safeParse(o);
|
|
2417
2409
|
if (!e || n && n !== i) {
|
|
2418
2410
|
const p = n ?? i, v = p ? d(p) : void 0;
|
|
2419
2411
|
return v != null && v.success ? v.data : s({
|
|
@@ -2448,10 +2440,10 @@ function Ra(e) {
|
|
|
2448
2440
|
return e ? { kind: "sheets", sheetIds: e } : { kind: "allSheets", sheetKinds: ["dashboard"] };
|
|
2449
2441
|
}
|
|
2450
2442
|
function Aa(e, a, t, s) {
|
|
2451
|
-
return ["date", "datetime", "timestamp"].some((i) => Rt(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." }), ps(e, { use: "filterDefault", columnHasTime:
|
|
2443
|
+
return ["date", "datetime", "timestamp"].some((i) => Rt(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." }), ps(e, { use: "filterDefault", columnHasTime: bi(a) }, t, s);
|
|
2452
2444
|
}
|
|
2453
2445
|
function ps(e, a, t, s) {
|
|
2454
|
-
const o =
|
|
2446
|
+
const o = ln(e, a);
|
|
2455
2447
|
return o.ok ? o.window : s({
|
|
2456
2448
|
code: "invalid_change",
|
|
2457
2449
|
message: o.refusal.message,
|
|
@@ -2459,15 +2451,15 @@ function ps(e, a, t, s) {
|
|
|
2459
2451
|
path: o.refusal.path ? `${t}.${o.refusal.path}` : t
|
|
2460
2452
|
});
|
|
2461
2453
|
}
|
|
2462
|
-
function
|
|
2454
|
+
function bi(e) {
|
|
2463
2455
|
return Na({ dataType: e.dataType }) === "datetime";
|
|
2464
2456
|
}
|
|
2465
|
-
function
|
|
2457
|
+
function yi(e) {
|
|
2466
2458
|
var a, t, s;
|
|
2467
2459
|
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;
|
|
2468
2460
|
}
|
|
2469
|
-
async function
|
|
2470
|
-
const i =
|
|
2461
|
+
async function vi(e, a, t, s, o, n) {
|
|
2462
|
+
const i = lo(e), d = i.kind === "config" ? i.executableSources : i.kind === "sql" ? i.pinnedCatalogSources.map((x) => x.source) : [], l = he(e), c = typeof a == "string" ? (l == null ? void 0 : l.kind) === "semantic" ? l.datasetName : void 0 : a.datasetName, h = d.find((x) => x.kind === "semantic" && Rt(x.datasetName) === Rt(c));
|
|
2471
2463
|
if ((!h || h.kind !== "semantic") && n)
|
|
2472
2464
|
return o({
|
|
2473
2465
|
code: "field_not_found",
|
|
@@ -2482,7 +2474,7 @@ async function yi(e, a, t, s, o, n) {
|
|
|
2482
2474
|
path: s,
|
|
2483
2475
|
fix: "Name a field of the card's own dataset, or { name, datasetName } for a dataset its query joins."
|
|
2484
2476
|
});
|
|
2485
|
-
const p = await t.loadCardSource({ domainId: h.domainId, datasetName: h.datasetName }), v = typeof a == "string" ? a : a.name, b = p ?
|
|
2477
|
+
const p = await t.loadCardSource({ domainId: h.domainId, datasetName: h.datasetName }), v = typeof a == "string" ? a : a.name, b = p ? nt(p.fields, v, h.datasetName) : void 0, S = b ? tn(h, { column_name: b.name, data_type: b.dataType, ...b.sourceField ? { sourceField: b.sourceField } : {} }) : void 0;
|
|
2486
2478
|
return S || o({
|
|
2487
2479
|
code: "field_not_found",
|
|
2488
2480
|
message: `"${v}" isn't a field of ${h.datasetName}.`,
|
|
@@ -2491,12 +2483,12 @@ async function yi(e, a, t, s, o, n) {
|
|
|
2491
2483
|
details: { available: ((p == null ? void 0 : p.fields) ?? []).slice(0, 20).map((x) => x.name) }
|
|
2492
2484
|
});
|
|
2493
2485
|
}
|
|
2494
|
-
const
|
|
2486
|
+
const _i = {
|
|
2495
2487
|
max: ya,
|
|
2496
2488
|
what: "A proposal that creates a dashboard",
|
|
2497
2489
|
fix: `Create with the first ${ya}, then change the new dashboard in a second proposal.`
|
|
2498
2490
|
};
|
|
2499
|
-
async function
|
|
2491
|
+
async function Vr(e, a) {
|
|
2500
2492
|
const t = (d) => d && typeof d == "object" ? d.op : void 0, s = e.changes.flatMap(
|
|
2501
2493
|
(d, l) => t(d) === "dashboard.update" ? [
|
|
2502
2494
|
{
|
|
@@ -2508,12 +2500,12 @@ async function Br(e, a) {
|
|
|
2508
2500
|
] : []
|
|
2509
2501
|
);
|
|
2510
2502
|
if (s.length) return { ok: !1, problems: s };
|
|
2511
|
-
const o =
|
|
2503
|
+
const o = Ci(e, a), n = await ms(o, e.changes, a, { limit: _i });
|
|
2512
2504
|
if (!n.ok) return n;
|
|
2513
|
-
const i =
|
|
2514
|
-
return { ...i, seed: o, sentence:
|
|
2505
|
+
const i = Ii(n, e.changes);
|
|
2506
|
+
return { ...i, seed: o, sentence: $i(i.dashboard) };
|
|
2515
2507
|
}
|
|
2516
|
-
function
|
|
2508
|
+
function Ii(e, a) {
|
|
2517
2509
|
if (a.some((n) => {
|
|
2518
2510
|
if (!n || typeof n != "object") return !1;
|
|
2519
2511
|
const { op: i } = n;
|
|
@@ -2521,7 +2513,7 @@ function _i(e, a) {
|
|
|
2521
2513
|
})) return e;
|
|
2522
2514
|
const s = (e.dashboard.sheets ?? []).filter((n) => !Xe(n) && (n.frames ?? []).length > 0).map((n) => ({ op: "layout.arrange", sheetId: n.id }));
|
|
2523
2515
|
if (!s.length) return e;
|
|
2524
|
-
const o =
|
|
2516
|
+
const o = St(e.dashboard, s, e.context);
|
|
2525
2517
|
if (!o.ok) throw new Error(`Arranging a new dashboard failed: ${o.failedAt.code}`);
|
|
2526
2518
|
return {
|
|
2527
2519
|
...e,
|
|
@@ -2530,7 +2522,7 @@ function _i(e, a) {
|
|
|
2530
2522
|
descriptions: [...e.descriptions, ...o.descriptions]
|
|
2531
2523
|
};
|
|
2532
2524
|
}
|
|
2533
|
-
function
|
|
2525
|
+
function Ci(e, a) {
|
|
2534
2526
|
const t = e.changes.some((s) => s && typeof s == "object" && s.op === "sheet.add");
|
|
2535
2527
|
return {
|
|
2536
2528
|
id: e.dashboardId,
|
|
@@ -2541,43 +2533,43 @@ function Ii(e, a) {
|
|
|
2541
2533
|
sheets: t ? [] : [{ id: a.newId(), title: "Sheet 1" }]
|
|
2542
2534
|
};
|
|
2543
2535
|
}
|
|
2544
|
-
const
|
|
2545
|
-
function
|
|
2536
|
+
const It = (e, a) => `${e} ${a}${e === 1 ? "" : "s"}`;
|
|
2537
|
+
function $i(e) {
|
|
2546
2538
|
const a = e.sheets ?? [], t = a.reduce((n, i) => n + (i.frames ?? []).reduce((d, l) => {
|
|
2547
2539
|
var c;
|
|
2548
2540
|
return d + (((c = l.cards) == null ? void 0 : c.length) ?? 0);
|
|
2549
|
-
}, 0), 0), s = (e.inputs ?? []).filter((n) => n.kind === "filter").length, o = [
|
|
2541
|
+
}, 0), 0), s = (e.inputs ?? []).filter((n) => n.kind === "filter").length, o = [It(a.length, "sheet"), It(t, "card"), ...s ? [It(s, "filter")] : []];
|
|
2550
2542
|
return `Creates a private dashboard ${Ga(e.title)} with ${et(o)}.`;
|
|
2551
2543
|
}
|
|
2552
|
-
const
|
|
2553
|
-
function
|
|
2544
|
+
const wi = 50;
|
|
2545
|
+
function Gr(e, a) {
|
|
2554
2546
|
var w, N;
|
|
2555
2547
|
const t = (w = a.sheetIds) != null && w.length ? new Set(a.sheetIds) : void 0, s = (N = a.cardIds) != null && N.length ? new Set(a.cardIds) : void 0, o = (e.sheets ?? []).filter((I) => !t || t.has(I.id)), n = xe(e).filter(
|
|
2556
2548
|
(I) => (!t || t.has(I.sheetId)) && (!s || s.has(I.cardId))
|
|
2557
|
-
), i = n.length > (a.maxQueryCards ??
|
|
2549
|
+
), i = n.length > (a.maxQueryCards ?? wi), d = new Map(
|
|
2558
2550
|
(e.sheets ?? []).flatMap((I) => (I.frames ?? []).map((_) => [_.id, _]))
|
|
2559
2551
|
), l = /* @__PURE__ */ new Map(), c = (I) => {
|
|
2560
2552
|
(I == null ? void 0 : I.kind) === "semantic" && l.set(`${I.domainId}|${I.datasetName}`, { domainId: I.domainId, datasetName: I.datasetName });
|
|
2561
2553
|
}, h = new Map(
|
|
2562
|
-
(e.sheets ?? []).map((I) => [I.id,
|
|
2554
|
+
(e.sheets ?? []).map((I) => [I.id, $t({ dashboard: e, place: { kind: I.kind === "document" ? "document" : "sheet", sheetId: I.id } })])
|
|
2563
2555
|
), p = (I) => ({ catalog: I, inputs: e.inputs, variables: e.variables }), v = (I) => p(h.get(I)), b = /* @__PURE__ */ new Map(), S = (I, _) => {
|
|
2564
2556
|
if (I.kind === "document") return v(I.id);
|
|
2565
|
-
const D =
|
|
2557
|
+
const D = $t({ dashboard: e, place: { kind: "sheet", sheetId: I.id, cardId: _ } });
|
|
2566
2558
|
return b.set(`${I.id}:${_}`, D), p(D);
|
|
2567
2559
|
}, x = o.map((I) => ({
|
|
2568
2560
|
sheetId: I.id,
|
|
2569
2561
|
title: I.title ?? "",
|
|
2570
2562
|
kind: I.kind === "document" ? "document" : "dashboard",
|
|
2571
|
-
...I.kind === "document" ?
|
|
2563
|
+
...I.kind === "document" ? Si(I, v(I.id)) : { layout: Ri(I) },
|
|
2572
2564
|
cards: n.filter((_) => _.sheetId === I.id).map((_) => {
|
|
2573
|
-
var
|
|
2574
|
-
const D = _.card, M = _.kind === "frameCard" ? (
|
|
2565
|
+
var te;
|
|
2566
|
+
const D = _.card, M = _.kind === "frameCard" ? (te = d.get(_.frameId)) == null ? void 0 : te.visualId : void 0, P = M ? { linkedVisualId: M } : {}, G = { cardId: _.cardId, title: D.title ?? "" };
|
|
2575
2567
|
if (_.kind !== "frameCard") {
|
|
2576
|
-
const
|
|
2577
|
-
return c(
|
|
2568
|
+
const oe = he(D);
|
|
2569
|
+
return c(oe), {
|
|
2578
2570
|
...G,
|
|
2579
2571
|
...Qe(D),
|
|
2580
|
-
...
|
|
2572
|
+
...oe ? { source: oe } : {},
|
|
2581
2573
|
editable: !1,
|
|
2582
2574
|
notEditable: _.kind === "documentSectionCard" ? { reason: "document_section", message: "Cards in Document sections can't be changed through the MCP yet. Change them in the editor." } : {
|
|
2583
2575
|
reason: "not_expressible",
|
|
@@ -2587,8 +2579,8 @@ function Vr(e, a) {
|
|
|
2587
2579
|
};
|
|
2588
2580
|
}
|
|
2589
2581
|
if (D.type === "text") {
|
|
2590
|
-
const
|
|
2591
|
-
return
|
|
2582
|
+
const oe = ja(D, S(I, D.id));
|
|
2583
|
+
return oe.editable ? { ...G, type: "text", ...P, editable: !0, text: oe.text, ...oe.editorOnly.length ? { editorOnly: oe.editorOnly } : {} } : { ...G, ...Qe(D), ...P, editable: !1, notEditable: { reason: "text", message: oe.message } };
|
|
2592
2584
|
}
|
|
2593
2585
|
const B = we(D, { sql: a.sql });
|
|
2594
2586
|
if (c(B.source), !B.editable)
|
|
@@ -2600,7 +2592,7 @@ function Vr(e, a) {
|
|
|
2600
2592
|
editable: !1,
|
|
2601
2593
|
notEditable: { reason: B.reason, message: B.message, ...B.detail ? { detail: B.detail } : {} }
|
|
2602
2594
|
};
|
|
2603
|
-
const
|
|
2595
|
+
const Z = i ? void 0 : Ft(D);
|
|
2604
2596
|
return {
|
|
2605
2597
|
...G,
|
|
2606
2598
|
...Qe(D),
|
|
@@ -2613,7 +2605,7 @@ function Vr(e, a) {
|
|
|
2613
2605
|
...B.matrix ? { matrix: B.matrix } : {},
|
|
2614
2606
|
...B.timeWindowReadOnly ? { timeWindowReadOnly: B.timeWindowReadOnly } : {}
|
|
2615
2607
|
},
|
|
2616
|
-
...
|
|
2608
|
+
...Z
|
|
2617
2609
|
};
|
|
2618
2610
|
})
|
|
2619
2611
|
})), E = ss(e, ts(a.calendar, a.updatedAt), {
|
|
@@ -2621,7 +2613,7 @@ function Vr(e, a) {
|
|
|
2621
2613
|
});
|
|
2622
2614
|
for (const I of E)
|
|
2623
2615
|
I.editable && l.set(`${I.domainId}|${I.datasetName}`, { domainId: I.domainId, datasetName: I.datasetName });
|
|
2624
|
-
const C =
|
|
2616
|
+
const C = ki(e, a, new Map([...h, ...b]));
|
|
2625
2617
|
for (const I of e.variables ?? []) {
|
|
2626
2618
|
const _ = Tt(I);
|
|
2627
2619
|
(_ == null ? void 0 : _.kind) === "semantic" && l.set(`${_.domainId}|${_.datasetName}`, { domainId: _.domainId, datasetName: _.datasetName });
|
|
@@ -2659,20 +2651,20 @@ function Vr(e, a) {
|
|
|
2659
2651
|
sheets: x,
|
|
2660
2652
|
filters: E,
|
|
2661
2653
|
variables: C,
|
|
2662
|
-
style:
|
|
2654
|
+
style: xi(e, a),
|
|
2663
2655
|
editorOnly: F,
|
|
2664
2656
|
...i ? { truncated: !0 } : {}
|
|
2665
2657
|
};
|
|
2666
2658
|
}
|
|
2667
|
-
function
|
|
2659
|
+
function xi(e, a) {
|
|
2668
2660
|
const { style: t, organizationAppearance: s } = za(e, a.organizationAppearance);
|
|
2669
|
-
return { set:
|
|
2661
|
+
return { set: En(t), shows: mn({ organizationAppearance: s, dashboardStyle: t }, "light").shows };
|
|
2670
2662
|
}
|
|
2671
2663
|
function Da(e, a) {
|
|
2672
|
-
const t =
|
|
2664
|
+
const t = To(a);
|
|
2673
2665
|
return t ? { ...e, style: t } : e;
|
|
2674
2666
|
}
|
|
2675
|
-
function
|
|
2667
|
+
function Si(e, a) {
|
|
2676
2668
|
const t = e.document;
|
|
2677
2669
|
if (!t) return {};
|
|
2678
2670
|
const s = (o) => {
|
|
@@ -2689,7 +2681,7 @@ function xi(e, a) {
|
|
|
2689
2681
|
)
|
|
2690
2682
|
};
|
|
2691
2683
|
}
|
|
2692
|
-
function
|
|
2684
|
+
function ki(e, a, t) {
|
|
2693
2685
|
const s = Ha(e), o = (c) => s.filter(({ ref: h }) => c(h)).map(({ place: h, where: p }) => ({
|
|
2694
2686
|
sheetId: h.sheetId,
|
|
2695
2687
|
where: p.kind,
|
|
@@ -2710,17 +2702,17 @@ function Si(e, a, t) {
|
|
|
2710
2702
|
})), d = [...n.values()].filter((c) => c.kind === "report").map((c) => ({
|
|
2711
2703
|
name: c.name,
|
|
2712
2704
|
kind: "report",
|
|
2713
|
-
words:
|
|
2705
|
+
words: Ti[c.reportKey],
|
|
2714
2706
|
parts: [],
|
|
2715
2707
|
usedIn: o((h) => h.source === "documentMeta" && h.key === c.reportKey),
|
|
2716
2708
|
editable: !1
|
|
2717
2709
|
})), l = (e.variables ?? []).map((c) => {
|
|
2718
|
-
const h = ds(c, { sql: a.sql }), p = Ot(c, e)[0], v =
|
|
2710
|
+
const h = ds(c, { sql: a.sql }), p = Ot(c, e)[0], v = ko(c.presentation);
|
|
2719
2711
|
return {
|
|
2720
2712
|
name: c.name,
|
|
2721
2713
|
kind: "data",
|
|
2722
|
-
words:
|
|
2723
|
-
parts:
|
|
2714
|
+
words: an(c),
|
|
2715
|
+
parts: jo(c),
|
|
2724
2716
|
...v ? { presentation: v } : {},
|
|
2725
2717
|
usedIn: o((b) => b.source === "data" && b.variableId === c.id),
|
|
2726
2718
|
editable: h.editable,
|
|
@@ -2730,37 +2722,37 @@ function Si(e, a, t) {
|
|
|
2730
2722
|
});
|
|
2731
2723
|
return [...i, ...d, ...l];
|
|
2732
2724
|
}
|
|
2733
|
-
const
|
|
2725
|
+
const Ti = {
|
|
2734
2726
|
generatedAt: "When the report was generated",
|
|
2735
2727
|
pageNumber: "The page number (Documents)",
|
|
2736
2728
|
pageCount: "The page count (Documents)"
|
|
2737
2729
|
};
|
|
2738
2730
|
function Qe(e) {
|
|
2739
2731
|
const a = qe(e);
|
|
2740
|
-
return a ? { type: a.type, ...a.properties } : { type:
|
|
2732
|
+
return a ? { type: a.type, ...a.properties } : { type: xt(e.type) };
|
|
2741
2733
|
}
|
|
2742
|
-
function
|
|
2734
|
+
function Ri(e) {
|
|
2743
2735
|
const a = new Map((e.frames ?? []).map((t) => [t.id, t]));
|
|
2744
|
-
return
|
|
2736
|
+
return vn(e).rows.map((t) => ({
|
|
2745
2737
|
tiles: t.tiles.map((s) => {
|
|
2746
2738
|
const o = a.get(s.frameId);
|
|
2747
2739
|
return { cardIds: o ? Va(o) : [], width: s.width };
|
|
2748
2740
|
})
|
|
2749
2741
|
}));
|
|
2750
2742
|
}
|
|
2751
|
-
function
|
|
2743
|
+
function ae(e) {
|
|
2752
2744
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2753
2745
|
}
|
|
2754
2746
|
function ue(e, a) {
|
|
2755
|
-
return
|
|
2747
|
+
return ae(e) && Object.prototype.hasOwnProperty.call(e, a) && e[a] !== void 0;
|
|
2756
2748
|
}
|
|
2757
|
-
const
|
|
2758
|
-
function
|
|
2749
|
+
const de = ue, Ai = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], Di = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], Fi = '`format` on the matching column in `config.metricColumns`, `groupByColumns` or `detailColumns`; for a SQL or Python card, `preferences.sqlColumns["<column>"].format`', He = "`preferences.conditionalFormatting`, with columns named by card column id";
|
|
2750
|
+
function Oi(e) {
|
|
2759
2751
|
return Me(String(e.type)) ?? qt;
|
|
2760
2752
|
}
|
|
2761
2753
|
function Ee(e, a, t) {
|
|
2762
2754
|
if (t === void 0) return;
|
|
2763
|
-
const s =
|
|
2755
|
+
const s = ae(t) ? Oi(t).safeParse(t) : qt.safeParse(t);
|
|
2764
2756
|
if (!s.success)
|
|
2765
2757
|
for (const o of s.error.issues) {
|
|
2766
2758
|
const n = o.code === "unrecognized_keys" ? o.keys : [o.path.length ? String(o.path[o.path.length - 1]) : "type"];
|
|
@@ -2772,69 +2764,69 @@ function Ee(e, a, t) {
|
|
|
2772
2764
|
});
|
|
2773
2765
|
}
|
|
2774
2766
|
}
|
|
2775
|
-
function
|
|
2776
|
-
if (
|
|
2767
|
+
function Ct(e, a, t) {
|
|
2768
|
+
if (ae(t)) {
|
|
2777
2769
|
for (const s of ["dateFormat", "customFormat"])
|
|
2778
|
-
|
|
2770
|
+
de(t, s) && e.push({ path: `${a}.${s}`, field: s, replacement: "`format` on this column (a temporal bucket or date format)" });
|
|
2779
2771
|
Ee(e, `${a}.format`, t.format);
|
|
2780
2772
|
}
|
|
2781
2773
|
}
|
|
2782
2774
|
function gs(e, a) {
|
|
2783
2775
|
const t = [], s = e.config;
|
|
2784
|
-
for (const S of
|
|
2776
|
+
for (const S of Ai) {
|
|
2785
2777
|
const x = s == null ? void 0 : s[S];
|
|
2786
|
-
Array.isArray(x) && x.forEach((E, C) =>
|
|
2778
|
+
Array.isArray(x) && x.forEach((E, C) => Ct(t, `${a}.config.${S}[${C}]`, E));
|
|
2787
2779
|
}
|
|
2788
|
-
const o =
|
|
2780
|
+
const o = ae(s == null ? void 0 : s.matrix) ? s.matrix : void 0, n = ae(o == null ? void 0 : o.presentation) ? o.presentation : void 0;
|
|
2789
2781
|
for (const S of ["measureFormats", "levelFormats"]) {
|
|
2790
2782
|
const x = n == null ? void 0 : n[S];
|
|
2791
|
-
if (
|
|
2783
|
+
if (ae(x)) for (const [E, C] of Object.entries(x)) Ee(t, `${a}.config.matrix.presentation.${S}.${E}`, C);
|
|
2792
2784
|
}
|
|
2793
|
-
|
|
2785
|
+
de(n, "conditionalFormatting") && t.push({ path: `${a}.config.matrix.presentation.conditionalFormatting`, field: "conditionalFormatting", replacement: He });
|
|
2794
2786
|
const i = e.interactionConfig, d = i == null ? void 0 : i.drillHierarchies;
|
|
2795
2787
|
Array.isArray(d) && d.forEach((S, x) => {
|
|
2796
|
-
|
|
2797
|
-
|
|
2788
|
+
ae(S) && (Ct(t, `${a}.interactionConfig.drillHierarchies[${x}].baseField`, S.baseField), Array.isArray(S.steps) && S.steps.forEach((E, C) => {
|
|
2789
|
+
ae(E) && Ct(t, `${a}.interactionConfig.drillHierarchies[${x}].steps[${C}].field`, E.field);
|
|
2798
2790
|
}));
|
|
2799
2791
|
});
|
|
2800
2792
|
const l = e.preferences;
|
|
2801
2793
|
if (!l) return t;
|
|
2802
2794
|
const c = `${a}.preferences`;
|
|
2803
|
-
if (
|
|
2804
|
-
const S = l.formatNumber, x =
|
|
2795
|
+
if (de(l, "formatNumber")) {
|
|
2796
|
+
const S = l.formatNumber, x = ae(S) && Object.keys(S).every((E) => E === "colorRanges");
|
|
2805
2797
|
t.push(
|
|
2806
2798
|
x ? { path: `${c}.formatNumber.colorRanges`, field: "colorRanges", replacement: `${He} (a rule on the KPI's value)` } : { path: `${c}.formatNumber`, field: "formatNumber", replacement: "`format` on each measure in `config.metricColumns`; for a SQL KPI, `preferences.sqlKpiValue.format`" }
|
|
2807
2799
|
);
|
|
2808
2800
|
}
|
|
2809
|
-
|
|
2801
|
+
de(l, "numberAxisFormat") && t.push({ path: `${c}.numberAxisFormat`, field: "numberAxisFormat", replacement: "`valueFormat` on `preferences.yAxisConfig` (or the axis it formats)" }), de(l, "columnSettings") && t.push({ path: `${c}.columnSettings`, field: "columnSettings", replacement: "`preferences.tablePrefs.columnSettingsMap`, keyed by column" });
|
|
2810
2802
|
const h = l.kpiVisualOptions;
|
|
2811
|
-
|
|
2803
|
+
de(h, "formatOptions") && t.push({ path: `${c}.kpiVisualOptions.formatOptions`, field: "formatOptions", replacement: "`format` on each measure in `config.metricColumns`; for a SQL KPI, `preferences.sqlKpiValue.format`" }), de(h, "queryComparisonPolarity") && t.push({ path: `${c}.kpiVisualOptions.queryComparisonPolarity`, field: "queryComparisonPolarity", replacement: "`preferences.sqlKpiValue.comparisonPolarity`" });
|
|
2812
2804
|
const p = l.tablePrefs;
|
|
2813
|
-
|
|
2805
|
+
de(p, "conditionalFormatting") && t.push({ path: `${c}.tablePrefs.conditionalFormatting`, field: "conditionalFormatting", replacement: He });
|
|
2814
2806
|
const v = p == null ? void 0 : p.columnSettingsMap;
|
|
2815
|
-
if (
|
|
2807
|
+
if (ae(v))
|
|
2816
2808
|
for (const [S, x] of Object.entries(v)) {
|
|
2817
|
-
if (!
|
|
2809
|
+
if (!ae(x)) continue;
|
|
2818
2810
|
const E = `${c}.tablePrefs.columnSettingsMap.${S}`;
|
|
2819
2811
|
for (const C of ["numberFormat", "dateFormat", "inheritMetricFormat"])
|
|
2820
|
-
|
|
2821
|
-
|
|
2812
|
+
de(x, C) && t.push({ path: `${E}.${C}`, field: C, replacement: C === "inheritMetricFormat" ? "nothing: a column follows its `format`" : Fi });
|
|
2813
|
+
de(x, "colorRanges") && t.push({ path: `${E}.colorRanges`, field: "colorRanges", replacement: He });
|
|
2822
2814
|
}
|
|
2823
|
-
for (const S of
|
|
2815
|
+
for (const S of Di) {
|
|
2824
2816
|
const x = l[S];
|
|
2825
|
-
if (
|
|
2817
|
+
if (ae(x)) {
|
|
2826
2818
|
for (const E of ["formatMode", "mode", "formatOptions"])
|
|
2827
|
-
|
|
2828
|
-
S === "dataLabelsConfig" &&
|
|
2819
|
+
de(x, E) && t.push({ path: `${c}.${S}.${E}`, field: E, replacement: `\`preferences.${S}.valueFormat\` (absent means the column's format)` });
|
|
2820
|
+
S === "dataLabelsConfig" && de(x, "format") && t.push({ path: `${c}.${S}.format`, field: "format", replacement: "`preferences.dataLabelsConfig.valueFormat`" }), Ee(t, `${c}.${S}.valueFormat`, x.valueFormat);
|
|
2829
2821
|
}
|
|
2830
2822
|
}
|
|
2831
2823
|
const b = l.sqlColumns;
|
|
2832
|
-
if (
|
|
2824
|
+
if (ae(b))
|
|
2833
2825
|
for (const [S, x] of Object.entries(b))
|
|
2834
|
-
|
|
2835
|
-
return
|
|
2826
|
+
ae(x) && Ee(t, `${c}.sqlColumns.${S}.format`, x.format);
|
|
2827
|
+
return ae(l.sqlKpiValue) && Ee(t, `${c}.sqlKpiValue.format`, l.sqlKpiValue.format), t;
|
|
2836
2828
|
}
|
|
2837
|
-
function
|
|
2829
|
+
function Ei(e) {
|
|
2838
2830
|
const a = `sheets[id=${e.sheetId}]`;
|
|
2839
2831
|
switch (e.kind) {
|
|
2840
2832
|
case "sheetCard":
|
|
@@ -2846,24 +2838,24 @@ function Oi(e) {
|
|
|
2846
2838
|
}
|
|
2847
2839
|
}
|
|
2848
2840
|
function bs(e) {
|
|
2849
|
-
if (!
|
|
2841
|
+
if (!ae(e)) return [];
|
|
2850
2842
|
if (Array.isArray(e.sheets))
|
|
2851
2843
|
return xe(e).map((t) => ({
|
|
2852
2844
|
card: t.card,
|
|
2853
|
-
at:
|
|
2845
|
+
at: Ei(t)
|
|
2854
2846
|
}));
|
|
2855
2847
|
const a = e;
|
|
2856
2848
|
return Array.isArray(a.cards) ? a.cards.map((t) => ({ card: t, at: `cards[id=${t.id}]` })) : [];
|
|
2857
2849
|
}
|
|
2858
|
-
function
|
|
2850
|
+
function jr(e) {
|
|
2859
2851
|
return bs(e).flatMap(({ card: a, at: t }) => gs(a, t));
|
|
2860
2852
|
}
|
|
2861
|
-
function
|
|
2853
|
+
function qi(e, a) {
|
|
2862
2854
|
var n;
|
|
2863
2855
|
const t = (n = e.preferences) == null ? void 0 : n.conditionalFormatting;
|
|
2864
2856
|
if (t === void 0) return [];
|
|
2865
|
-
const s = `${a}.preferences.conditionalFormatting`, o =
|
|
2866
|
-
return o.success ?
|
|
2857
|
+
const s = `${a}.preferences.conditionalFormatting`, o = Ro.safeParse(t);
|
|
2858
|
+
return o.success ? Ao(e).map((i) => ({
|
|
2867
2859
|
code: "invalid_conditional_formatting",
|
|
2868
2860
|
path: `${s}.rules[id=${i.ruleId}].${i.path}`,
|
|
2869
2861
|
message: i.message
|
|
@@ -2880,7 +2872,7 @@ function Kr(e) {
|
|
|
2880
2872
|
path: s.path,
|
|
2881
2873
|
message: `\`${s.field}\` is retired: use ${s.replacement}.`
|
|
2882
2874
|
})),
|
|
2883
|
-
...
|
|
2875
|
+
...qi(a, t)
|
|
2884
2876
|
]);
|
|
2885
2877
|
}
|
|
2886
2878
|
const Mt = [
|
|
@@ -2889,47 +2881,47 @@ const Mt = [
|
|
|
2889
2881
|
"detailColumns",
|
|
2890
2882
|
"pivotByColumns",
|
|
2891
2883
|
"sortByColumns"
|
|
2892
|
-
],
|
|
2884
|
+
], Ni = [
|
|
2893
2885
|
"xAxisConfig",
|
|
2894
2886
|
"yAxisConfig",
|
|
2895
2887
|
"secondaryYAxisConfig",
|
|
2896
2888
|
"tooltipConfig",
|
|
2897
2889
|
"dataLabelsConfig"
|
|
2898
2890
|
];
|
|
2899
|
-
function
|
|
2891
|
+
function ee(e) {
|
|
2900
2892
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2901
2893
|
}
|
|
2902
2894
|
function ys(e, a) {
|
|
2903
2895
|
return JSON.stringify(e) === JSON.stringify(a);
|
|
2904
2896
|
}
|
|
2905
|
-
function
|
|
2906
|
-
const t = (s) =>
|
|
2897
|
+
function _e(e, a) {
|
|
2898
|
+
const t = (s) => ee(s) ? Object.fromEntries(
|
|
2907
2899
|
Object.keys(s).sort().map((o) => [o, t(s[o])])
|
|
2908
2900
|
) : s;
|
|
2909
2901
|
return ys(t(e), t(a));
|
|
2910
2902
|
}
|
|
2911
|
-
function
|
|
2912
|
-
const a =
|
|
2903
|
+
function st(e) {
|
|
2904
|
+
const a = cn(e);
|
|
2913
2905
|
return a === "date" || a === "datetime";
|
|
2914
2906
|
}
|
|
2915
2907
|
function vs(e) {
|
|
2916
2908
|
var a, t;
|
|
2917
2909
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
2918
2910
|
}
|
|
2919
|
-
function
|
|
2920
|
-
return e.type === "kpi" &&
|
|
2911
|
+
function Pi(e) {
|
|
2912
|
+
return e.type === "kpi" && Lo(e);
|
|
2921
2913
|
}
|
|
2922
2914
|
function At(e) {
|
|
2923
2915
|
return e.type === "table" || e.type === "detailTable";
|
|
2924
2916
|
}
|
|
2925
|
-
function
|
|
2917
|
+
function se(e, a) {
|
|
2926
2918
|
var s;
|
|
2927
2919
|
const t = (s = e.config) == null ? void 0 : s[a];
|
|
2928
2920
|
return Array.isArray(t) ? t : [];
|
|
2929
2921
|
}
|
|
2930
|
-
function
|
|
2922
|
+
function Li(e, a) {
|
|
2931
2923
|
for (const t of Mt) {
|
|
2932
|
-
const s =
|
|
2924
|
+
const s = se(e, t).indexOf(a);
|
|
2933
2925
|
if (s >= 0) return `config.${t}[${s}]`;
|
|
2934
2926
|
}
|
|
2935
2927
|
}
|
|
@@ -2939,21 +2931,21 @@ function ke(e, a) {
|
|
|
2939
2931
|
Object.prototype.hasOwnProperty.call(e, s) && (delete e[s], t = !0);
|
|
2940
2932
|
return t;
|
|
2941
2933
|
}
|
|
2942
|
-
function
|
|
2934
|
+
function ot(e, a, t, s) {
|
|
2943
2935
|
a.format = t, a.formatOrigin = "override", e.changes.push({
|
|
2944
2936
|
path: s,
|
|
2945
2937
|
action: "moved",
|
|
2946
|
-
to: `${
|
|
2938
|
+
to: `${Li(e.card, a) ?? "config"}.format`
|
|
2947
2939
|
});
|
|
2948
2940
|
}
|
|
2949
2941
|
function Bt(e) {
|
|
2950
|
-
if (
|
|
2942
|
+
if (ee(e))
|
|
2951
2943
|
return Be(e);
|
|
2952
2944
|
}
|
|
2953
2945
|
function Dt(e, a, t) {
|
|
2954
2946
|
if (!(!ue(a, "dateFormat") && !ue(a, "customFormat"))) {
|
|
2955
|
-
if (
|
|
2956
|
-
const s =
|
|
2947
|
+
if (st(a.dataType) && a.format == null && a.dateFormat != null) {
|
|
2948
|
+
const s = No({
|
|
2957
2949
|
fieldId: a.id,
|
|
2958
2950
|
dataType: a.dataType,
|
|
2959
2951
|
granularity: a.granularity,
|
|
@@ -2969,57 +2961,57 @@ function Dt(e, a, t) {
|
|
|
2969
2961
|
ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2970
2962
|
}
|
|
2971
2963
|
}
|
|
2972
|
-
function
|
|
2964
|
+
function Mi(e, a, t) {
|
|
2973
2965
|
if (!ue(a, "dateFormat") && !ue(a, "customFormat")) return;
|
|
2974
2966
|
const s = a.dateFormat === "custom" ? a.customFormat : a.dateFormat;
|
|
2975
|
-
e.card.type === "detailTable" &&
|
|
2967
|
+
e.card.type === "detailTable" && st(a.dataType) && !a.format && typeof s == "string" && s.trim() ? (a.format = { type: "date", pattern: s }, a.formatOrigin = "override", e.changes.push({
|
|
2976
2968
|
path: `${t}.dateFormat`,
|
|
2977
2969
|
action: "moved",
|
|
2978
2970
|
to: `${t}.format`
|
|
2979
|
-
})) : e.card.type === "detailTable" &&
|
|
2971
|
+
})) : e.card.type === "detailTable" && st(a.dataType) && a.format && typeof s == "string" && s.trim() && !_e(a.format, { type: "date", pattern: s }) && e.unconverted.push({
|
|
2980
2972
|
path: `${t}.dateFormat`,
|
|
2981
2973
|
reason: "detail_date_beside_format",
|
|
2982
2974
|
detail: "A detail date pattern on a column that has a format of its own."
|
|
2983
2975
|
}), ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2984
2976
|
}
|
|
2985
|
-
function
|
|
2977
|
+
function Bi(e, a, t, s) {
|
|
2986
2978
|
if (a.format !== void 0) {
|
|
2987
2979
|
const o = Bt(a.format);
|
|
2988
|
-
o ?
|
|
2980
|
+
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" }));
|
|
2989
2981
|
}
|
|
2990
|
-
t === "groupByColumns" || t === "pivotByColumns" ? Dt(e, a, s) : t === "detailColumns" ?
|
|
2982
|
+
t === "groupByColumns" || t === "pivotByColumns" ? Dt(e, a, s) : t === "detailColumns" ? Mi(e, a, s) : ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
|
|
2991
2983
|
}
|
|
2992
|
-
function
|
|
2984
|
+
function Vi(e, a) {
|
|
2993
2985
|
for (const t of Mt)
|
|
2994
|
-
|
|
2986
|
+
se(e.card, t).forEach((s, o) => {
|
|
2995
2987
|
var i;
|
|
2996
2988
|
if (!s.format || s.formatOrigin) return;
|
|
2997
2989
|
const n = (i = a.modelFormatFor) == null ? void 0 : i.call(a, s);
|
|
2998
|
-
s.formatOrigin = n &&
|
|
2990
|
+
s.formatOrigin = n && _e(Be(n), s.format) ? "semantic" : "override", e.changes.push({
|
|
2999
2991
|
path: `config.${t}[${o}].formatOrigin`,
|
|
3000
2992
|
action: "marked"
|
|
3001
2993
|
});
|
|
3002
2994
|
});
|
|
3003
2995
|
}
|
|
3004
|
-
function
|
|
2996
|
+
function Gi(e) {
|
|
3005
2997
|
var t;
|
|
3006
2998
|
const a = (t = e.card.interactionConfig) == null ? void 0 : t.drillHierarchies;
|
|
3007
2999
|
Array.isArray(a) && a.forEach((s, o) => {
|
|
3008
|
-
if (!
|
|
3000
|
+
if (!ee(s)) return;
|
|
3009
3001
|
const n = `interactionConfig.drillHierarchies[${o}]`;
|
|
3010
|
-
|
|
3011
|
-
if (
|
|
3002
|
+
ee(s.baseField) && Dt(e, s.baseField, `${n}.baseField`), Array.isArray(s.steps) && s.steps.forEach((i, d) => {
|
|
3003
|
+
if (ee(i) && ee(i.field)) {
|
|
3012
3004
|
const l = i.field, c = `${n}.steps[${d}].field`;
|
|
3013
3005
|
if (l.format !== void 0) {
|
|
3014
3006
|
const h = Bt(l.format);
|
|
3015
|
-
h && !
|
|
3007
|
+
h && !_e(h, l.format) && (l.format = h, e.changes.push({ path: `${c}.format`, action: "cleaned" }));
|
|
3016
3008
|
}
|
|
3017
3009
|
Dt(e, l, c);
|
|
3018
3010
|
}
|
|
3019
3011
|
});
|
|
3020
3012
|
});
|
|
3021
3013
|
}
|
|
3022
|
-
const
|
|
3014
|
+
const ji = [
|
|
3023
3015
|
"numberFormat",
|
|
3024
3016
|
"dateFormat",
|
|
3025
3017
|
"inheritMetricFormat",
|
|
@@ -3033,32 +3025,32 @@ function Ki(e, a) {
|
|
|
3033
3025
|
e.name,
|
|
3034
3026
|
e.qualifiedFieldName,
|
|
3035
3027
|
e.label,
|
|
3036
|
-
e.role === "metric" ?
|
|
3028
|
+
e.role === "metric" ? Yo(e) : void 0
|
|
3037
3029
|
].some((o) => o !== void 0 && t(o) === s);
|
|
3038
3030
|
}
|
|
3039
3031
|
function Fa(e, a) {
|
|
3040
|
-
const t =
|
|
3032
|
+
const t = Po(e, { columnId: a });
|
|
3041
3033
|
if (t) return t;
|
|
3042
3034
|
const s = [
|
|
3043
|
-
...
|
|
3044
|
-
...
|
|
3045
|
-
...
|
|
3035
|
+
...se(e, "detailColumns"),
|
|
3036
|
+
...se(e, "metricColumns"),
|
|
3037
|
+
...se(e, "groupByColumns")
|
|
3046
3038
|
].filter((o) => Ki(o, a));
|
|
3047
3039
|
return s.length === 1 ? s[0] : void 0;
|
|
3048
3040
|
}
|
|
3049
|
-
function
|
|
3050
|
-
return e.type === "number" &&
|
|
3041
|
+
function Wi(e) {
|
|
3042
|
+
return e.type === "number" && ee(e.numberFormat) && e.inheritMetricFormat !== !0;
|
|
3051
3043
|
}
|
|
3052
|
-
function
|
|
3044
|
+
function Ui(e, a) {
|
|
3053
3045
|
var t;
|
|
3054
|
-
return
|
|
3046
|
+
return st(a.dataType) ? se(e, "detailColumns").includes(a) ? e.type === "detailTable" : gn(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
|
|
3055
3047
|
}
|
|
3056
3048
|
function Oa(e, a, t, s) {
|
|
3057
3049
|
var i;
|
|
3058
3050
|
const o = (i = e.card).preferences ?? (i.preferences = {}), n = o.sqlColumns ?? (o.sqlColumns = {});
|
|
3059
3051
|
n[a] = { ...n[a], format: t }, e.changes.push({ path: s, action: "moved", to: `preferences.sqlColumns[${JSON.stringify(a)}].format` });
|
|
3060
3052
|
}
|
|
3061
|
-
function
|
|
3053
|
+
function Qi(e) {
|
|
3062
3054
|
const [a, ...t] = e;
|
|
3063
3055
|
if (!a) return;
|
|
3064
3056
|
const s = Object.fromEntries(
|
|
@@ -3066,31 +3058,31 @@ function Ui(e) {
|
|
|
3066
3058
|
);
|
|
3067
3059
|
return qt.safeParse(s).success ? s : void 0;
|
|
3068
3060
|
}
|
|
3069
|
-
function
|
|
3061
|
+
function Hi(e, a) {
|
|
3070
3062
|
const t = e.card, s = Ko({
|
|
3071
|
-
groupByColumns:
|
|
3072
|
-
metricColumns:
|
|
3073
|
-
pivotByColumns:
|
|
3074
|
-
detailColumns: t.type === "detailTable" ?
|
|
3063
|
+
groupByColumns: se(t, "groupByColumns"),
|
|
3064
|
+
metricColumns: se(t, "metricColumns"),
|
|
3065
|
+
pivotByColumns: se(t, "pivotByColumns"),
|
|
3066
|
+
detailColumns: t.type === "detailTable" ? se(t, "detailColumns") : []
|
|
3075
3067
|
});
|
|
3076
3068
|
for (const [o, n] of a) {
|
|
3077
3069
|
const i = n.find((l) => l.key === s.get(o)), d = i ?? n[0];
|
|
3078
|
-
if (
|
|
3070
|
+
if (ot(e, o, d.format, d.from), !i)
|
|
3079
3071
|
for (const l of n)
|
|
3080
|
-
l !== d && !
|
|
3072
|
+
l !== d && !_e(l.format, d.format) && e.unconverted.push({
|
|
3081
3073
|
path: l.from,
|
|
3082
3074
|
reason: "ambiguous_column_setting",
|
|
3083
3075
|
detail: `"${l.key}" and "${d.key}" both name ${o.id}.`
|
|
3084
3076
|
});
|
|
3085
3077
|
}
|
|
3086
3078
|
}
|
|
3087
|
-
function
|
|
3079
|
+
function Yi(e, a) {
|
|
3088
3080
|
var n;
|
|
3089
3081
|
if (!a.length) return;
|
|
3090
|
-
const t =
|
|
3091
|
-
s && o &&
|
|
3082
|
+
const t = se(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ? Qi(a.map((i) => i.format)) : void 0;
|
|
3083
|
+
s && o && ot(e, s, o, a[0].from);
|
|
3092
3084
|
for (const i of a)
|
|
3093
|
-
if (!(s != null && s.format &&
|
|
3085
|
+
if (!(s != null && s.format && _e(i.format, s.format))) {
|
|
3094
3086
|
if (!t.length) {
|
|
3095
3087
|
e.unconverted.push({
|
|
3096
3088
|
path: i.from,
|
|
@@ -3112,16 +3104,16 @@ function Hi(e, a) {
|
|
|
3112
3104
|
);
|
|
3113
3105
|
}
|
|
3114
3106
|
}
|
|
3115
|
-
function
|
|
3107
|
+
function zi(e) {
|
|
3116
3108
|
var l;
|
|
3117
3109
|
const a = (l = e.card.preferences) == null ? void 0 : l.tablePrefs, t = a == null ? void 0 : a.columnSettingsMap;
|
|
3118
|
-
if (!
|
|
3119
|
-
const s = e.card, o = vs(s), n =
|
|
3110
|
+
if (!ee(t)) return;
|
|
3111
|
+
const s = e.card, o = vs(s), n = se(s, "pivotByColumns").length > 0, i = /* @__PURE__ */ new Map(), d = [];
|
|
3120
3112
|
for (const [c, h] of Object.entries(t)) {
|
|
3121
|
-
if (!
|
|
3113
|
+
if (!ee(h)) continue;
|
|
3122
3114
|
const p = h, v = `preferences.tablePrefs.columnSettingsMap[${JSON.stringify(c)}]`;
|
|
3123
|
-
if (
|
|
3124
|
-
const b =
|
|
3115
|
+
if (Wi(p)) {
|
|
3116
|
+
const b = Do(p.numberFormat);
|
|
3125
3117
|
if (b && o)
|
|
3126
3118
|
Oa(e, c, b, `${v}.numberFormat`);
|
|
3127
3119
|
else if (b && At(s)) {
|
|
@@ -3131,7 +3123,7 @@ function Yi(e) {
|
|
|
3131
3123
|
reason: "unmatched_column_setting",
|
|
3132
3124
|
detail: `"${c}" names no card column.`
|
|
3133
3125
|
});
|
|
3134
|
-
} else b && s.type !== "matrixTable" && s.type !== "kpi" &&
|
|
3126
|
+
} else b && s.type !== "matrixTable" && s.type !== "kpi" && se(s, "metricColumns").some(
|
|
3135
3127
|
(x) => x.comparison != null
|
|
3136
3128
|
) && e.unconverted.push({
|
|
3137
3129
|
path: `${v}.numberFormat`,
|
|
@@ -3139,42 +3131,42 @@ function Yi(e) {
|
|
|
3139
3131
|
detail: `"${c}" formats this chart's comparison tooltip only.`
|
|
3140
3132
|
});
|
|
3141
3133
|
}
|
|
3142
|
-
if (
|
|
3134
|
+
if (ee(p.dateFormat)) {
|
|
3143
3135
|
const b = p.type === "date";
|
|
3144
3136
|
if (b && o)
|
|
3145
|
-
Oa(e, c,
|
|
3137
|
+
Oa(e, c, Fo(p.dateFormat), `${v}.dateFormat`);
|
|
3146
3138
|
else if (b && At(s)) {
|
|
3147
3139
|
const S = Fa(s, c);
|
|
3148
|
-
(!S || !
|
|
3140
|
+
(!S || !Ui(s, S)) && e.unconverted.push({
|
|
3149
3141
|
path: `${v}.dateFormat`,
|
|
3150
3142
|
reason: "config_column_date_setting",
|
|
3151
3143
|
detail: `"${c}"'s download formats its dates with this setting.`
|
|
3152
3144
|
});
|
|
3153
3145
|
}
|
|
3154
3146
|
}
|
|
3155
|
-
for (const b of
|
|
3147
|
+
for (const b of ji)
|
|
3156
3148
|
Object.prototype.hasOwnProperty.call(p, b) && (delete p[b], e.changes.push({ path: `${v}.${b}`, action: "removed" }));
|
|
3157
3149
|
}
|
|
3158
|
-
|
|
3150
|
+
Hi(e, i), Yi(e, d);
|
|
3159
3151
|
}
|
|
3160
|
-
function
|
|
3152
|
+
function Ji(e) {
|
|
3161
3153
|
return Object.keys(e).some(
|
|
3162
3154
|
(a) => a !== "enabled" && a !== "colorRanges" && e[a] !== void 0
|
|
3163
3155
|
);
|
|
3164
3156
|
}
|
|
3165
|
-
function
|
|
3157
|
+
function Xi(e) {
|
|
3166
3158
|
return (e == null ? void 0 : e.enabled) === !1 || (e == null ? void 0 : e.enabled) === "false";
|
|
3167
3159
|
}
|
|
3168
|
-
function
|
|
3160
|
+
function Zi(e) {
|
|
3169
3161
|
const a = e.card, t = a.preferences;
|
|
3170
3162
|
if (!t) return;
|
|
3171
|
-
const s = t.kpiVisualOptions, o =
|
|
3163
|
+
const s = t.kpiVisualOptions, o = ee(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, n = t, i = ee(n.formatNumber) ? n.formatNumber : void 0, d = o ? Be(Oo(o)) : void 0, l = i && Ji(i) ? Be(Eo(i)) : void 0;
|
|
3172
3164
|
if (a.type === "kpi") {
|
|
3173
|
-
if (
|
|
3165
|
+
if (Xi(i) && e.unconverted.push({
|
|
3174
3166
|
path: "preferences.formatNumber.enabled",
|
|
3175
3167
|
reason: "raw_display",
|
|
3176
3168
|
detail: "Formatting is switched off on this KPI."
|
|
3177
|
-
}),
|
|
3169
|
+
}), Pi(a)) {
|
|
3178
3170
|
const c = d ?? l, h = s == null ? void 0 : s.queryComparisonPolarity;
|
|
3179
3171
|
(c || h) && (t.sqlKpiValue = {
|
|
3180
3172
|
...t.sqlKpiValue,
|
|
@@ -3186,12 +3178,12 @@ function Xi(e) {
|
|
|
3186
3178
|
to: "preferences.sqlKpiValue"
|
|
3187
3179
|
}));
|
|
3188
3180
|
} else
|
|
3189
|
-
|
|
3190
|
-
d ?
|
|
3181
|
+
se(a, "metricColumns").forEach((h) => {
|
|
3182
|
+
d ? ot(e, h, d, "preferences.kpiVisualOptions.formatOptions") : l && !h.format && ot(e, h, l, "preferences.formatNumber");
|
|
3191
3183
|
});
|
|
3192
|
-
|
|
3184
|
+
er(e, i);
|
|
3193
3185
|
} else if (l) {
|
|
3194
|
-
const c =
|
|
3186
|
+
const c = se(a, "metricColumns");
|
|
3195
3187
|
vs(a) ? e.unconverted.push({
|
|
3196
3188
|
path: "preferences.formatNumber",
|
|
3197
3189
|
reason: "sql_card_wide_format",
|
|
@@ -3210,11 +3202,11 @@ function Xi(e) {
|
|
|
3210
3202
|
for (const c of ["numberAxisFormat", "columnSettings"])
|
|
3211
3203
|
ke(t, [c]) && e.changes.push({ path: `preferences.${c}`, action: "removed" });
|
|
3212
3204
|
}
|
|
3213
|
-
function
|
|
3205
|
+
function er(e, a) {
|
|
3214
3206
|
var n;
|
|
3215
3207
|
const t = a == null ? void 0 : a.decimalPlaces, s = e.card.preferences;
|
|
3216
3208
|
if (typeof t != "number" || ((n = s.comparisonPresentation) == null ? void 0 : n.precision) !== void 0) return;
|
|
3217
|
-
const o =
|
|
3209
|
+
const o = Wo(t);
|
|
3218
3210
|
o !== void 0 && (s.comparisonPresentation = {
|
|
3219
3211
|
...s.comparisonPresentation,
|
|
3220
3212
|
precision: o
|
|
@@ -3224,57 +3216,57 @@ function Zi(e, a) {
|
|
|
3224
3216
|
to: "preferences.comparisonPresentation.precision"
|
|
3225
3217
|
}));
|
|
3226
3218
|
}
|
|
3227
|
-
const
|
|
3228
|
-
function
|
|
3219
|
+
const tr = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
|
|
3220
|
+
function ar(e) {
|
|
3229
3221
|
const a = e.card.preferences;
|
|
3230
3222
|
if (a)
|
|
3231
|
-
for (const t of
|
|
3223
|
+
for (const t of Ni) {
|
|
3232
3224
|
const s = a[t];
|
|
3233
|
-
if (!
|
|
3234
|
-
const o = `preferences.${t}`, n =
|
|
3225
|
+
if (!ee(s)) continue;
|
|
3226
|
+
const o = `preferences.${t}`, n = ee(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");
|
|
3235
3227
|
if (l === "raw" || d === void 0 && i === "none")
|
|
3236
3228
|
e.unconverted.push({ path: `${o}.format`, reason: "raw_display", detail: "Data labels show raw values." });
|
|
3237
3229
|
else if (l === "override") {
|
|
3238
|
-
const c = n && n.type ? n : i &&
|
|
3230
|
+
const c = n && n.type ? n : i && tr.has(i) ? { ...n, type: i } : n, h = c ? Be(qo(c, { preserveOmittedProperties: !0 })) : void 0;
|
|
3239
3231
|
h && (s.valueFormat = h, e.changes.push({ path: `${o}.formatOptions`, action: "moved", to: `${o}.valueFormat` }));
|
|
3240
3232
|
}
|
|
3241
3233
|
ke(s, ["formatMode", "mode", "formatOptions", ...t === "dataLabelsConfig" ? ["format"] : []]) && e.changes.push({ path: `${o}.formatMode`, action: "removed" });
|
|
3242
3234
|
}
|
|
3243
3235
|
}
|
|
3244
|
-
function
|
|
3236
|
+
function sr(e) {
|
|
3245
3237
|
var s;
|
|
3246
|
-
const a = (s = e.card.config) == null ? void 0 : s.matrix, t =
|
|
3238
|
+
const a = (s = e.card.config) == null ? void 0 : s.matrix, t = ee(a) && ee(a.presentation) ? a.presentation : void 0;
|
|
3247
3239
|
if (t)
|
|
3248
3240
|
for (const o of ["measureFormats", "levelFormats"]) {
|
|
3249
3241
|
const n = t[o];
|
|
3250
|
-
if (
|
|
3242
|
+
if (ee(n))
|
|
3251
3243
|
for (const [i, d] of Object.entries(n)) {
|
|
3252
3244
|
const l = Bt(d);
|
|
3253
|
-
l && !
|
|
3245
|
+
l && !_e(l, d) && (n[i] = l, e.changes.push({ path: `config.matrix.presentation.${o}[${JSON.stringify(i)}]`, action: "cleaned" }));
|
|
3254
3246
|
}
|
|
3255
3247
|
}
|
|
3256
3248
|
}
|
|
3257
|
-
function
|
|
3249
|
+
function or(e, a = {}) {
|
|
3258
3250
|
const t = { card: structuredClone(e), changes: [], unconverted: [] };
|
|
3259
3251
|
for (const s of Mt)
|
|
3260
|
-
|
|
3261
|
-
|
|
3252
|
+
se(t.card, s).forEach((o, n) => {
|
|
3253
|
+
ee(o) && Bi(t, o, s, `config.${s}[${n}]`);
|
|
3262
3254
|
});
|
|
3263
|
-
return
|
|
3255
|
+
return Gi(t), zi(t), Zi(t), ar(t), sr(t), Vi(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
|
|
3264
3256
|
}
|
|
3265
|
-
const
|
|
3266
|
-
function
|
|
3257
|
+
const nr = "__semaphor_unassigned_trigger__", ir = "__NULL__";
|
|
3258
|
+
function rr(e) {
|
|
3267
3259
|
var a, t;
|
|
3268
3260
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
3269
3261
|
}
|
|
3270
|
-
function
|
|
3262
|
+
function dr(e) {
|
|
3271
3263
|
const a = e.config;
|
|
3272
3264
|
return a ? e.type === "detailTable" ? a.detailColumns ?? [] : [...a.detailColumns ?? [], ...a.metricColumns ?? [], ...a.groupByColumns ?? []] : [];
|
|
3273
3265
|
}
|
|
3274
3266
|
function Ea(e) {
|
|
3275
3267
|
return [e.id, e.alias, e.name, e.qualifiedFieldName, e.label];
|
|
3276
3268
|
}
|
|
3277
|
-
function
|
|
3269
|
+
function lr(e, a) {
|
|
3278
3270
|
var c, h;
|
|
3279
3271
|
const t = ((c = e.config) == null ? void 0 : c.metricColumns) ?? [], s = ((h = e.config) == null ? void 0 : h.pivotByColumns) ?? [];
|
|
3280
3272
|
if (t.length !== 1 || s.length !== 1) return { reason: "pivot_key_form" };
|
|
@@ -3283,16 +3275,16 @@ function dr(e, a) {
|
|
|
3283
3275
|
ref: {
|
|
3284
3276
|
kind: "pivot",
|
|
3285
3277
|
metricId: o.id,
|
|
3286
|
-
members: [{ fieldId: n.id, value: a ===
|
|
3278
|
+
members: [{ fieldId: n.id, value: a === ir ? null : a }]
|
|
3287
3279
|
}
|
|
3288
3280
|
};
|
|
3289
3281
|
}
|
|
3290
|
-
function
|
|
3282
|
+
function cr(e, a) {
|
|
3291
3283
|
var i, d;
|
|
3292
|
-
if (a ===
|
|
3293
|
-
if (
|
|
3294
|
-
const t =
|
|
3295
|
-
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 ?
|
|
3284
|
+
if (a === nr) return { reason: "unassigned_trigger" };
|
|
3285
|
+
if (rr(e)) return { ref: { kind: "result", key: a } };
|
|
3286
|
+
const t = dr(e), s = t.filter((l) => Ea(l).includes(a)), o = s.length ? s : t.filter((l) => Ea(l).some((c) => (c == null ? void 0 : c.trim().toLowerCase()) === a.trim().toLowerCase())), n = [...new Set(o.map((l) => l.id))];
|
|
3287
|
+
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 ? lr(e, a) : { reason: "no_matching_column" };
|
|
3296
3288
|
}
|
|
3297
3289
|
function qa(e, a, t, s, o) {
|
|
3298
3290
|
const n = (I, _, D) => {
|
|
@@ -3337,7 +3329,7 @@ function qa(e, a, t, s, o) {
|
|
|
3337
3329
|
target: N
|
|
3338
3330
|
};
|
|
3339
3331
|
}
|
|
3340
|
-
function
|
|
3332
|
+
function ur(e, a) {
|
|
3341
3333
|
var o;
|
|
3342
3334
|
const t = (o = Ma(e)) == null ? void 0 : o.value;
|
|
3343
3335
|
if (!t) return [];
|
|
@@ -3350,7 +3342,7 @@ function cr(e, a) {
|
|
|
3350
3342
|
return [{ id: `kpi-color-range-${i + 1}`, condition: S, target: { level: "cell" }, style: { textColor: x } }];
|
|
3351
3343
|
}).reverse();
|
|
3352
3344
|
}
|
|
3353
|
-
function
|
|
3345
|
+
function fr(e) {
|
|
3354
3346
|
var h, p, v, b, S, x, E;
|
|
3355
3347
|
const a = structuredClone(e), t = [], s = [], o = [], n = (C) => {
|
|
3356
3348
|
t.some((k) => k.from.startsWith(C)) || t.push({ ruleId: "", action: "removed", from: C });
|
|
@@ -3363,7 +3355,7 @@ function ur(e) {
|
|
|
3363
3355
|
t.push({ ruleId: F.id, action: "removed", from: `${k}.rules[${w}]` });
|
|
3364
3356
|
return;
|
|
3365
3357
|
}
|
|
3366
|
-
const N = qa(F, (_) =>
|
|
3358
|
+
const N = qa(F, (_) => cr(a, _), `${k}.rules[${w}]`, s, !1);
|
|
3367
3359
|
N && (o.push(N), t.push({ ruleId: F.id, action: "moved", from: `${k}.rules[${w}]` }));
|
|
3368
3360
|
}), delete i.conditionalFormatting, s.some((F) => F.path.startsWith(k)) || n(k);
|
|
3369
3361
|
}
|
|
@@ -3385,7 +3377,7 @@ function ur(e) {
|
|
|
3385
3377
|
if (c && ue(c, "colorRanges")) {
|
|
3386
3378
|
const C = Array.isArray(c.colorRanges) ? c.colorRanges : [];
|
|
3387
3379
|
if (a.type === "kpi") {
|
|
3388
|
-
const k =
|
|
3380
|
+
const k = ur(a, C);
|
|
3389
3381
|
o.push(...k), k.forEach((y) => t.push({ ruleId: y.id, action: "moved", from: "preferences.formatNumber.colorRanges" }));
|
|
3390
3382
|
}
|
|
3391
3383
|
delete c.colorRanges, Object.keys(c).length === 0 && delete l.formatNumber, t.some((k) => k.from === "preferences.formatNumber.colorRanges") || t.push({ ruleId: "", action: "removed", from: "preferences.formatNumber.colorRanges" });
|
|
@@ -3403,14 +3395,14 @@ function ur(e) {
|
|
|
3403
3395
|
}
|
|
3404
3396
|
return { card: a, changes: t, unresolved: s };
|
|
3405
3397
|
}
|
|
3406
|
-
function
|
|
3407
|
-
const { only: t, ...s } = a, o = t === "rules" ? void 0 :
|
|
3398
|
+
function Wr(e, a = {}) {
|
|
3399
|
+
const { only: t, ...s } = a, o = t === "rules" ? void 0 : or(e, s), n = t === "formats" ? void 0 : fr((o == null ? void 0 : o.card) ?? e);
|
|
3408
3400
|
return { card: (n == null ? void 0 : n.card) ?? (o == null ? void 0 : o.card) ?? e, formats: o, rules: n };
|
|
3409
3401
|
}
|
|
3410
|
-
function
|
|
3402
|
+
function Ur(e) {
|
|
3411
3403
|
return e.kind === "metric" ? e.resultId : e.measureId;
|
|
3412
3404
|
}
|
|
3413
|
-
function
|
|
3405
|
+
function mr(e) {
|
|
3414
3406
|
if (e.op === "dashboard.update" || e.op === "dashboard.style" || e.op === "sheet.update") return !0;
|
|
3415
3407
|
if (e.op !== "card.update") return !1;
|
|
3416
3408
|
switch (e.update.kind) {
|
|
@@ -3422,536 +3414,536 @@ function fr(e) {
|
|
|
3422
3414
|
return !1;
|
|
3423
3415
|
}
|
|
3424
3416
|
}
|
|
3425
|
-
function
|
|
3426
|
-
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(
|
|
3417
|
+
function Qr(e) {
|
|
3418
|
+
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(mr) ? "not_needed" : "needed";
|
|
3427
3419
|
}
|
|
3428
3420
|
export {
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3421
|
+
zr as AGGREGATES,
|
|
3422
|
+
Jr as AUTOMATIC_FALLBACK_GRAIN,
|
|
3423
|
+
Xr as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
3424
|
+
ho as AUTOMATIC_TIME_GRAIN,
|
|
3425
|
+
Zr as CALCULATED_FIELDS_GROUP_ID,
|
|
3426
|
+
ed as CALCULATED_FIELDS_GROUP_NAME,
|
|
3427
|
+
td as CARD_CONFIG_KEY_CLASSES,
|
|
3428
|
+
ad as CARD_KEY_CLASSES,
|
|
3429
|
+
vo as CARD_QUERY_CONFIG_KEYS,
|
|
3430
|
+
Nr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
3431
|
+
qr as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
3432
|
+
pp as CARD_SURFACES,
|
|
3433
|
+
sd as CARD_TYPES,
|
|
3442
3434
|
De as CARD_TYPE_RULES,
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3435
|
+
je as CHART_COLORS_BOUNDS,
|
|
3436
|
+
od as CHIP_VALUE_COLUMN,
|
|
3437
|
+
nd as COLUMN_KEY_CLASSES,
|
|
3438
|
+
id as COLUMN_PRESENTATION_KEYS,
|
|
3439
|
+
rd as COMPARISON_POLARITIES,
|
|
3440
|
+
am as COMPARISON_SIGN_WORDS,
|
|
3441
|
+
dd as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
3442
|
+
ld as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
3443
|
+
cd as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
3444
|
+
ud as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
3445
|
+
fd as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
3446
|
+
md as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
3447
|
+
hd as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
3448
|
+
pd as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
3449
|
+
gd as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
3450
|
+
bd as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
3451
|
+
gp as CORNER_STEPS,
|
|
3452
|
+
le as CardQueryRequestError,
|
|
3453
|
+
yd as ControlResolutionError,
|
|
3454
|
+
vd as DASHBOARD_CHANGE_OPS,
|
|
3455
|
+
_d as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
3456
|
+
sm as DASHBOARD_FILTER_OPERATIONS,
|
|
3457
|
+
Id as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
|
|
3458
|
+
un as DASHBOARD_STYLE_NUMBER_BOUNDS,
|
|
3459
|
+
Cd as DEFAULT_DETAIL_DATE_STYLE,
|
|
3460
|
+
$d as DETAIL_DATE_STYLES,
|
|
3461
|
+
om as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
3462
|
+
nm as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
3463
|
+
wd as DOMAIN_EDIT_CHANGE_OPS,
|
|
3464
|
+
xd as DYNAMIC_TEXT_MESSAGE,
|
|
3465
|
+
Sd as DashboardFilterMappingContractError,
|
|
3466
|
+
kd as ExecutionControlContractError,
|
|
3467
|
+
Td as FILTER_OPERATORS,
|
|
3476
3468
|
ua as FORMAT_WORDS,
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3469
|
+
Rd as FilterModelError,
|
|
3470
|
+
Ad as KPI_MEASURES_SHOWN,
|
|
3471
|
+
xp as KPI_TREND_GRAINS,
|
|
3472
|
+
Sp as KPI_TREND_PERIODS,
|
|
3473
|
+
Dd as LEGACY_TABLE_CARD_TYPES,
|
|
3474
|
+
Jm as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
|
|
3483
3475
|
ya as MAX_CREATE_CHANGES,
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3476
|
+
Fd as MAX_DATE_GRAIN_POINTS,
|
|
3477
|
+
Od as MAX_NEXT_STEP_CHARS,
|
|
3478
|
+
So as MAX_PROPOSED_CHANGES,
|
|
3479
|
+
Ed as MAX_QUERY_LIMIT,
|
|
3480
|
+
qd as MAX_TEXT_WORDS,
|
|
3481
|
+
Nd as MEASURE_CALCULATION_SUMMARIES,
|
|
3482
|
+
Sh as NEW_CARD_TYPE,
|
|
3483
|
+
Pd as NON_ADDITIVE_SUM_OF_ROWS_HINT,
|
|
3484
|
+
Ld as PUBLIC_TRANSFORM_KIND,
|
|
3485
|
+
Md as QUERY_ASPECTS,
|
|
3486
|
+
Bd as QUERY_CONFIG_KEY_ASPECTS,
|
|
3487
|
+
kh as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
|
|
3488
|
+
Vd as RESERVED_VARIABLE_NAMES,
|
|
3489
|
+
Gd as SEE_RECORDS_CARD_TYPES,
|
|
3490
|
+
jd as SEE_RECORDS_LIMITS,
|
|
3499
3491
|
Kd as SEE_RECORDS_MAX_PAGE,
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3492
|
+
Th as SEE_RECORDS_MESSAGES,
|
|
3493
|
+
Wd as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
3494
|
+
Ud as SETTINGS_BY_KIND,
|
|
3495
|
+
vp as SHELF_FIELD_KEYS,
|
|
3496
|
+
bp as SPACING_STEPS,
|
|
3497
|
+
Qd as TIME_GRAINS,
|
|
3498
|
+
Hd as TOOLBAR_FILTER_REACH_FIELDS,
|
|
3499
|
+
im as VARIABLE_CARD_TYPE,
|
|
3500
|
+
rm as VARIABLE_COMPARISON_PARTS,
|
|
3501
|
+
Yd as VARIABLE_GETS,
|
|
3502
|
+
dm as VARIABLE_LIST_CAP,
|
|
3503
|
+
lm as VARIABLE_LIST_SHOWN,
|
|
3504
|
+
zd as VARIABLE_NAME_PATTERN,
|
|
3505
|
+
cm as VARIABLE_VALUE_PART,
|
|
3506
|
+
Jd as WINDOW_ERROR_CODES,
|
|
3507
|
+
Xd as WINDOW_WARNING_CODES,
|
|
3508
|
+
Zd as acceptedColumnRefKinds,
|
|
3509
|
+
el as acceptsGrainThatRan,
|
|
3510
|
+
tl as analyticsFilterSchema,
|
|
3511
|
+
al as appliedBindingControlValue,
|
|
3512
|
+
Xm as applyCardReferenceRemapping,
|
|
3513
|
+
sl as applyCardSettings,
|
|
3514
|
+
St as applyDashboardOperations,
|
|
3515
|
+
ol as applyFilterApplicability,
|
|
3516
|
+
Rh as applyFilterSettingsChange,
|
|
3517
|
+
Zm as applyGroupByOverride,
|
|
3518
|
+
nl as applyLinkedClickToFilterOverrides,
|
|
3519
|
+
il as applyMeasureCalculations,
|
|
3520
|
+
rl as applyOptionDependencyOverride,
|
|
3521
|
+
dl as applyVariableChange,
|
|
3522
|
+
ll as asDateDefaultPointCondition,
|
|
3523
|
+
cl as automaticDateGrain,
|
|
3524
|
+
po as automaticGrainSupport,
|
|
3525
|
+
ul as blockClause,
|
|
3526
|
+
fl as blockSentence,
|
|
3527
|
+
Dp as bookmarkImpactSentence,
|
|
3528
|
+
Ah as buildCardExportFormatOptions,
|
|
3529
|
+
eh as buildCardExportQueryContext,
|
|
3530
|
+
Dh as buildCardExportRequest,
|
|
3531
|
+
Fh as buildCardExportRequestFromOptions,
|
|
3532
|
+
Oh as buildColumnCatalog,
|
|
3533
|
+
ml as buildControlDefinitionIndex,
|
|
3534
|
+
lo as buildDashboardCardSourceIndex,
|
|
3535
|
+
Eh as buildEntityColumnGroup,
|
|
3536
|
+
qh as buildFilterInputFromDefinition,
|
|
3537
|
+
Xo as buildFilterInputFromField,
|
|
3538
|
+
hl as buildLinkedClickToFilterOverrides,
|
|
3539
|
+
pl as buildProposeChangeInputSchema,
|
|
3540
|
+
gl as buildSavedEditorCard,
|
|
3541
|
+
Nh as buildTableExportFormatOptions,
|
|
3542
|
+
bl as calculationAddSchema,
|
|
3543
|
+
Ph as cardColumnRefForKey,
|
|
3544
|
+
yl as cardColumnRefSchema,
|
|
3545
|
+
Ro as cardConditionalFormattingSchema,
|
|
3546
|
+
vl as cardConfigAsRan,
|
|
3547
|
+
_l as cardQueryPatchSchema,
|
|
3548
|
+
Il as cardReachesDatasetThroughRelationships,
|
|
3549
|
+
Ms as cardSettingsKind,
|
|
3550
|
+
Ps as cardTypeSentenceName,
|
|
3551
|
+
Cl as carryColumnSettings,
|
|
3552
|
+
_o as changeCardType,
|
|
3553
|
+
$l as changeMatrixEditor,
|
|
3554
|
+
Ao as checkConditionalRuleColumns,
|
|
3563
3555
|
Ot as checkDataVariable,
|
|
3564
|
-
|
|
3556
|
+
wl as checkDetailDateFormat,
|
|
3565
3557
|
Kr as checkPresentationStores,
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3558
|
+
xl as chipOverVariable,
|
|
3559
|
+
Sl as clickToFilterSettingsSchema,
|
|
3560
|
+
kl as collectJoinPlanIdentifiers,
|
|
3569
3561
|
Ha as collectVariableReferences,
|
|
3570
3562
|
Pa as columnDataset,
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3563
|
+
Io as columnFieldKey,
|
|
3564
|
+
Ka as columnKeys,
|
|
3565
|
+
Tl as columnRefIssue,
|
|
3574
3566
|
ca as columnRefKey,
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3567
|
+
Rl as columnSettingsInputSchema,
|
|
3568
|
+
um as comparisonPartPresentation,
|
|
3569
|
+
th as composeCardReferenceRemapping,
|
|
3570
|
+
Al as conditionalRuleSchema,
|
|
3571
|
+
Qr as confirmClassFor,
|
|
3572
|
+
Dl as contextChangeSchema,
|
|
3573
|
+
Fl as controlBindingExecutionSchema,
|
|
3574
|
+
Ol as controlDefinitionExecutionSchema,
|
|
3575
|
+
io as controlRefusal,
|
|
3576
|
+
Mr as convertLegacyStyle,
|
|
3577
|
+
El as createDashboardFilterBindingId,
|
|
3578
|
+
vh as createMatrixAuthoringDraft,
|
|
3579
|
+
_h as createMatrixConfig,
|
|
3580
|
+
en as createNewCard,
|
|
3581
|
+
ql as createTargetSchema,
|
|
3582
|
+
Zo as createTextCard,
|
|
3583
|
+
Nl as customDetailDateFormat,
|
|
3584
|
+
Pl as dashboardCardFilterSourceInventoryContains,
|
|
3585
|
+
ao as dashboardChangeSchema,
|
|
3586
|
+
Ll as dashboardFilterTargetMatchesLogicalValue,
|
|
3587
|
+
fm as dashboardFilterValueTypeForDataType,
|
|
3588
|
+
Vo as dashboardInputScopeIncludesDocumentSheets,
|
|
3589
|
+
En as dashboardStyleAsEdit,
|
|
3590
|
+
Ml as dashboardStyleChangeSchema,
|
|
3599
3591
|
za as dashboardStyleLayers,
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3592
|
+
Bl as dateDefaultPointCondition,
|
|
3593
|
+
Vl as decideClickToFilterCardLevel,
|
|
3594
|
+
Gl as decideClickToFilterField,
|
|
3595
|
+
jl as defaultClickToFilterSettings,
|
|
3596
|
+
In as defaultVariableGet,
|
|
3597
|
+
_p as defaultVariableName,
|
|
3598
|
+
Fp as describeBookmarkImpact,
|
|
3607
3599
|
Kl as describeDashboardFilterCardReach,
|
|
3608
3600
|
$e as describeDashboardFilterCardReachDetail,
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3601
|
+
Lh as describeDateWindow,
|
|
3602
|
+
Mh as describeFilterReachEntry,
|
|
3603
|
+
Bh as describeKpiDateSection,
|
|
3604
|
+
Vh as describeKpiTileDate,
|
|
3605
|
+
kp as describeKpiTrendRow,
|
|
3606
|
+
Wl as describeMeasureCalculations,
|
|
3607
|
+
no as describeQueryChange,
|
|
3608
|
+
Gh as describeRelationshipRoute,
|
|
3609
|
+
jh as describeRelationshipSkip,
|
|
3610
|
+
Ul as describeTableColumnTotal,
|
|
3611
|
+
Ql as detailDateDisplayFormat,
|
|
3612
|
+
Hl as detailDateFormatProblem,
|
|
3613
|
+
Yl as detailDateTwelveHourAvailable,
|
|
3614
|
+
mm as documentInputTextUsage,
|
|
3615
|
+
hm as doesDashboardInputApplyToTarget,
|
|
3616
|
+
pm as doesDashboardInputReachFilterTarget,
|
|
3617
|
+
gm as doesDashboardInputSurviveCarriedContext,
|
|
3618
|
+
zl as doesToolbarFilterReachTab,
|
|
3627
3619
|
Kh as domainCalculatedFields,
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3620
|
+
Jl as domainEditChangeSchema,
|
|
3621
|
+
Xl as domainEditChangeSchemas,
|
|
3622
|
+
Ip as draftBlocker,
|
|
3623
|
+
Cn as draftFromVariable,
|
|
3624
|
+
Zl as drawsDetailDatesInBrowser,
|
|
3625
|
+
ec as dropMatrixEditorField,
|
|
3626
|
+
Ep as editBrandStyle,
|
|
3627
|
+
fn as editDashboardStyle,
|
|
3628
|
+
tc as estimateDateGrainPoints,
|
|
3629
|
+
ac as evaluateConditionalRules,
|
|
3630
|
+
sc as explicitComparisonSchema,
|
|
3631
|
+
oc as fieldAsRan,
|
|
3632
|
+
Ys as fieldIdentityKey,
|
|
3633
|
+
nc as fieldRef,
|
|
3634
|
+
ic as fieldRefSchema,
|
|
3635
|
+
rc as filterApplicabilityContextForCard,
|
|
3636
|
+
Wh as filterReachPreviewAnswers,
|
|
3637
|
+
dc as filterValueReachForCard,
|
|
3638
|
+
lc as filterValueSemanticDataset,
|
|
3639
|
+
cc as findBorrowedSelectionBinding,
|
|
3640
|
+
nt as findCatalogField,
|
|
3641
|
+
uc as findDashboardCardExecutableSource,
|
|
3642
|
+
fc as findDashboardCardPinnedCatalogSource,
|
|
3651
3643
|
Ua as findDashboardFilterTarget,
|
|
3652
|
-
|
|
3644
|
+
mc as findDashboardSqlPinnedCatalogSource,
|
|
3653
3645
|
gs as findRetiredCardPresentationFields,
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3646
|
+
jr as findRetiredPresentationFields,
|
|
3647
|
+
Hs as findSortedColumn,
|
|
3648
|
+
Uh as flattenEntityColumns,
|
|
3649
|
+
hc as foldPrototypeDocumentInputs,
|
|
3650
|
+
pc as formatFilterModelIssues,
|
|
3659
3651
|
xs as formatResolvedPrimaryDateFieldIssues,
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3652
|
+
gc as formatSkippedFilterWarnings,
|
|
3653
|
+
bc as fromEditableRules,
|
|
3654
|
+
Qh as getCalculatedFieldAggregateOverrides,
|
|
3655
|
+
yc as getCalculatedFieldNamespace,
|
|
3656
|
+
Hh as getCalculatedFieldParameters,
|
|
3657
|
+
Yh as getCalculatedFieldShelfOverrides,
|
|
3658
|
+
vc as getCardDefinition,
|
|
3659
|
+
zh as getClickContextFromTable,
|
|
3660
|
+
_c as getColumnCatalogFieldId,
|
|
3661
|
+
Ic as getDashboardFilterSubscriptionHint,
|
|
3662
|
+
Cc as getDashboardGlobalDateFilter,
|
|
3663
|
+
bm as getDocumentKpiSectionShapeIssues,
|
|
3664
|
+
ym as getDocumentSectionCards,
|
|
3665
|
+
Jh as getDomainCalculatedSelectionOverrides,
|
|
3666
|
+
$c as getFieldAggregationOptions,
|
|
3667
|
+
wc as getMatrixBindingTargets,
|
|
3668
|
+
Ih as getMatrixLevelLabel,
|
|
3669
|
+
Ch as getMatrixMeasureLabel,
|
|
3670
|
+
xc as getStableDomainCalculatedFieldId,
|
|
3671
|
+
Sc as getTemporalBucketAuthoringOptions,
|
|
3672
|
+
kc as getTemporalBucketAuthoringSelection,
|
|
3673
|
+
Tc as grainChoicePatch,
|
|
3674
|
+
Rc as grainControlApplies,
|
|
3675
|
+
Ac as handleSchema,
|
|
3676
|
+
Dc as hasDashboardFilterSubscription,
|
|
3677
|
+
Xh as hasSeeRecordsMeasureFilter,
|
|
3686
3678
|
ue as hasStoredKey,
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3679
|
+
Fc as hasTextCardRichWords,
|
|
3680
|
+
Oc as hasToolbarFilterReachField,
|
|
3681
|
+
ah as hostFilterValueFor,
|
|
3682
|
+
sh as hostFilterValuesToSlots,
|
|
3683
|
+
Ec as inspectMatrixCardConfig,
|
|
3684
|
+
oh as isAdHocFilterValueOnTab,
|
|
3693
3685
|
$a as isAggregateGet,
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3686
|
+
qc as isAllowedDashboardInputScopeCombination,
|
|
3687
|
+
Nc as isCardType,
|
|
3688
|
+
vm as isDashboardFilterOperationCompatible,
|
|
3697
3689
|
Qa as isDashboardInputOnTab,
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3690
|
+
_m as isDashboardInputOwnedBySheet,
|
|
3691
|
+
Im as isDashboardInputScopeEmpty,
|
|
3692
|
+
Cm as isDashboardTargetIdTaken,
|
|
3693
|
+
Pc as isDatabaseEntityReference,
|
|
3694
|
+
Lc as isGroupedDate,
|
|
3695
|
+
Mc as isLegacyTableCard,
|
|
3696
|
+
Bc as isPresentationCurrencyBinding,
|
|
3697
|
+
Vc as isSeeRecordsCardType,
|
|
3698
|
+
Gc as isSemanticAutoJoinCard,
|
|
3699
|
+
jc as isSemaphorCartesianChartType,
|
|
3700
|
+
Lo as isSqlKpi,
|
|
3709
3701
|
Kc as isStructuralControlBinding,
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3702
|
+
Wc as isTextCardRichContent,
|
|
3703
|
+
Uc as isValidControlOptionPresentation,
|
|
3704
|
+
$m as isVariableComparisonPart,
|
|
3705
|
+
Qc as isWhenRun,
|
|
3706
|
+
Hc as kpiSegmentMetricId,
|
|
3707
|
+
Yc as kpiShowsTrend,
|
|
3708
|
+
Ns as kpiTrendBy,
|
|
3709
|
+
Zh as kpiTrendByHint,
|
|
3710
|
+
Qs as labelAt,
|
|
3711
|
+
zc as layoutArrangeSchema,
|
|
3712
|
+
nh as legacyTableRoutingIds,
|
|
3713
|
+
ih as legacyTableRoutingTarget,
|
|
3714
|
+
Jc as linkedClickToFilterOverridesSchema,
|
|
3715
|
+
rh as listAdHocFilterValuesOnTab,
|
|
3724
3716
|
xe as listDashboardCardLocations,
|
|
3725
|
-
|
|
3726
|
-
|
|
3717
|
+
Xc as listDashboardFilterDefinitions,
|
|
3718
|
+
Zc as listDashboardFilterInputsOnTab,
|
|
3727
3719
|
Wa as listDashboardFilterTargets,
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3720
|
+
wm as listDashboardInputReachKeys,
|
|
3721
|
+
Mo as listDashboardInputScopeExceptedCardIds,
|
|
3722
|
+
Bo as listDashboardInputScopeExceptedSheetIds,
|
|
3723
|
+
eu as listDashboardInputsTolerantly,
|
|
3732
3724
|
Et as listDashboardTabTargets,
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3725
|
+
xm as listDataVariablePlaces,
|
|
3726
|
+
dh as listFilterInputValueTargets,
|
|
3727
|
+
Sm as listFilterTargetScopeTargets,
|
|
3728
|
+
km as listReachedVariableTargets,
|
|
3729
|
+
Tm as listReferencedDataVariableIds,
|
|
3730
|
+
tu as listStoredFilterDefinitions,
|
|
3731
|
+
Rm as listVariableScopeTargets,
|
|
3732
|
+
Am as mapDashboardCards,
|
|
3733
|
+
Dm as mapDocumentSectionCards,
|
|
3734
|
+
au as mapRuleColumns,
|
|
3735
|
+
su as matchColumns,
|
|
3736
|
+
lh as matrixCatalogSources,
|
|
3737
|
+
wo as matrixColumnKeys,
|
|
3738
|
+
ou as matrixColumnsSchema,
|
|
3739
|
+
nu as matrixDefinitionFieldRefs,
|
|
3740
|
+
iu as matrixDefinitionFields,
|
|
3741
|
+
ru as matrixDefinitionSources,
|
|
3742
|
+
du as matrixEditorCatalogFromFields,
|
|
3743
|
+
ch as matrixExecutionSources,
|
|
3744
|
+
lu as measureCalculationOptions,
|
|
3745
|
+
cu as measureComparisonSchema,
|
|
3746
|
+
uu as measureRefSchema,
|
|
3747
|
+
fu as measureTransformSchema,
|
|
3748
|
+
$h as mergeMatrixSorts,
|
|
3749
|
+
fo as metricCardQuerySchema,
|
|
3750
|
+
$o as moveMatrixLevel,
|
|
3751
|
+
Cp as newVariableDraft,
|
|
3752
|
+
$p as newVariableId,
|
|
3753
|
+
mu as normalizeClickToFilterSettings,
|
|
3754
|
+
hu as normalizeDashboardInputs,
|
|
3755
|
+
pu as normalizeLegacyLinkedTargetOverrides,
|
|
3756
|
+
gu as occurrenceKeys,
|
|
3765
3757
|
ts as outlineCalendar,
|
|
3766
|
-
|
|
3758
|
+
Gr as outlineDashboard,
|
|
3767
3759
|
Le as outlineFilter,
|
|
3768
3760
|
ss as outlineFilters,
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3761
|
+
mt as ownsItsAggregate,
|
|
3762
|
+
Lr as parseCardQueryRequest,
|
|
3763
|
+
Rn as parseCardQueryRequestContext,
|
|
3764
|
+
Pr as parseCardQueryRequestExtras,
|
|
3765
|
+
bu as parseColumnRefKey,
|
|
3766
|
+
ep as parseDashboardStyle,
|
|
3767
|
+
yu as parseExecutionControlBindingsShallow,
|
|
3776
3768
|
ks as parseExecutionControlContext,
|
|
3777
|
-
|
|
3769
|
+
vu as parseExecutionControlContract,
|
|
3778
3770
|
ga as planCardLabels,
|
|
3779
3771
|
pa as planCardRequery,
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3772
|
+
tp as pluralDatasetLabel,
|
|
3773
|
+
uh as prepareLoadedDashboard,
|
|
3774
|
+
_u as previewTemporalBucketAuthoringFormat,
|
|
3775
|
+
Fm as projectDataVariableToCard,
|
|
3776
|
+
Iu as pruneUnrelatedCalculatedFilters,
|
|
3777
|
+
ro as queryForm,
|
|
3778
|
+
Cu as queryMeasureSchema,
|
|
3779
|
+
$u as readCardConditionalRules,
|
|
3788
3780
|
we as readCardQuery,
|
|
3789
3781
|
Ft as readCardSettings,
|
|
3790
3782
|
he as readCardSource,
|
|
3791
3783
|
qe as readCardTypeProperties,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3784
|
+
Tp as readComparisonDates,
|
|
3785
|
+
ve as readDashboardFilterModel,
|
|
3786
|
+
Rp as readDefaultComparisonDates,
|
|
3787
|
+
wu as readDetailDateChoice,
|
|
3788
|
+
xu as readExactDomainCalculatedFieldReference,
|
|
3789
|
+
ap as readFilterReachResponse,
|
|
3790
|
+
fh as readFilterValueList,
|
|
3791
|
+
sp as readKpiDateContext,
|
|
3792
|
+
Su as readKpiFigure,
|
|
3793
|
+
ku as readKpiNumber,
|
|
3794
|
+
Tu as readMatrixCardConfig,
|
|
3795
|
+
Ru as readMeasureCalculations,
|
|
3796
|
+
Au as readSqlFilterUse,
|
|
3797
|
+
Du as readStoredTransform,
|
|
3798
|
+
ja as readTextCardWords,
|
|
3807
3799
|
Ze as readTextWords,
|
|
3808
|
-
|
|
3809
|
-
|
|
3800
|
+
Fu as readTransform,
|
|
3801
|
+
Om as readVariableAnswer,
|
|
3810
3802
|
ds as readVariableEditability,
|
|
3811
3803
|
Tt as readVariableSource,
|
|
3812
|
-
|
|
3813
|
-
|
|
3804
|
+
ko as readablePresentation,
|
|
3805
|
+
Ou as rebindDashboardOptionDependencyInputId,
|
|
3814
3806
|
ha as rebuildsRole,
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3807
|
+
Eu as reconcileMatrixSpecStructure,
|
|
3808
|
+
qu as reconcileTemporalBucketAuthoringFormat,
|
|
3809
|
+
uo as recordsCardQuerySchema,
|
|
3810
|
+
eo as refDataset,
|
|
3811
|
+
ge as refKey,
|
|
3812
|
+
wt as refName,
|
|
3813
|
+
Nu as registeredDomainEditChangeSchemas,
|
|
3814
|
+
Pu as relationshipAddSchema,
|
|
3815
|
+
Lu as relationshipRouteTarget,
|
|
3816
|
+
Mu as remapClickToFilterReferences,
|
|
3817
|
+
Bu as remapLinkedClickToFilterOverrides,
|
|
3818
|
+
Vu as requireNormalizedDashboardInputs,
|
|
3819
|
+
Gu as resolveBindingControlValue,
|
|
3820
|
+
Em as resolveCanonicalDetailResultRawKey,
|
|
3821
|
+
qm as resolveCanonicalResultOutputKey,
|
|
3830
3822
|
Ko as resolveCanonicalResultOutputKeys,
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3823
|
+
Nm as resolveCanonicalResultRawKey,
|
|
3824
|
+
op as resolveCardColumnRef,
|
|
3825
|
+
Zn as resolveCardSettings,
|
|
3826
|
+
np as resolveConditionalRules,
|
|
3827
|
+
Br as resolveDashboardChanges,
|
|
3828
|
+
Vr as resolveDashboardCreate,
|
|
3829
|
+
ju as resolveDashboardEntitySource,
|
|
3838
3830
|
Ku as resolveDashboardFilterAutomaticTarget,
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3831
|
+
Wu as resolveDashboardFilterInheritedTarget,
|
|
3832
|
+
Uu as resolveDashboardOptionDependencies,
|
|
3833
|
+
Qu as resolveDashboardOptionPopulation,
|
|
3834
|
+
Hu as resolveDashboardSqlFilterTarget,
|
|
3835
|
+
mn as resolveDashboardStyle,
|
|
3836
|
+
Yu as resolveDetailTableRawTemporalPresentation,
|
|
3837
|
+
Pm as resolveDistinctDetailRawKeys,
|
|
3838
|
+
zu as resolveFieldSelectedSource,
|
|
3839
|
+
Ju as resolveGroupByFieldTarget,
|
|
3840
|
+
Xu as resolveKpiLayout,
|
|
3849
3841
|
Ma as resolveKpiShape,
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3842
|
+
Zu as resolveKpiValueStyle,
|
|
3843
|
+
mh as resolveMatrixControlBindings,
|
|
3844
|
+
wh as resolveMatrixDefinition,
|
|
3853
3845
|
ma as resolveMeasureCalculations,
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3846
|
+
ef as resolveMeasureTransform,
|
|
3847
|
+
tf as resolveMetricFieldTarget,
|
|
3848
|
+
af as resolveScalarMappedValue,
|
|
3849
|
+
sf as resolveTableColumnTotal,
|
|
3850
|
+
of as resolveTemporalBucketAuthoringFormat,
|
|
3859
3851
|
Ss as resolveTemporalResultOwner,
|
|
3860
3852
|
ba as resolveTextCardWords,
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3853
|
+
nf as resolveValueStyle,
|
|
3854
|
+
rf as respondsToSelectionsSchema,
|
|
3855
|
+
df as retainConditionalRules,
|
|
3856
|
+
lf as retainedMatrixPath,
|
|
3857
|
+
Lm as rewriteDashboardInputScopeIds,
|
|
3858
|
+
hh as routeLegacyTableCard,
|
|
3859
|
+
ph as routeLegacyTableCards,
|
|
3860
|
+
gh as routeLegacyTableFrame,
|
|
3869
3861
|
Ye as sameColumnKey,
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3862
|
+
cf as sanitizeTextCardUrl,
|
|
3863
|
+
ip as seeRecordsAvailability,
|
|
3864
|
+
rp as seeRecordsCardAvailability,
|
|
3865
|
+
Ur as seeRecordsMeasureId,
|
|
3866
|
+
dp as seeRecordsMeasureKind,
|
|
3867
|
+
lp as seeRecordsReasonHidesOffer,
|
|
3868
|
+
uf as seeRecordsRequestSchema,
|
|
3869
|
+
cp as seeRecordsRowField,
|
|
3870
|
+
ff as selectDashboardOptionDependencyInputIds,
|
|
3871
|
+
mf as selectionFieldFromExplorerField,
|
|
3872
|
+
up as selectionTupleFromClickContext,
|
|
3873
|
+
fp as setMeasureCalculations,
|
|
3874
|
+
hf as settableCardType,
|
|
3875
|
+
pf as sharedCardPreferences,
|
|
3876
|
+
gf as sharedTableDialect,
|
|
3877
|
+
bf as sheetChangeSchemas,
|
|
3878
|
+
co as sqlCardQuerySchema,
|
|
3879
|
+
yf as sqlKpiResultKeys,
|
|
3888
3880
|
Ne as statedLabelsOf,
|
|
3889
3881
|
As as storedCardTypeFor,
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3882
|
+
vf as storedRunPresentation,
|
|
3883
|
+
Mm as storedTextRefs,
|
|
3884
|
+
_f as stripInstanceTargetsForLibrarySave,
|
|
3885
|
+
If as structuralControlOverride,
|
|
3894
3886
|
as as summarizeFilter,
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3887
|
+
Cf as supportsCanonicalDashboardTemporalResult,
|
|
3888
|
+
$f as tabChangeSchemas,
|
|
3889
|
+
wf as tableColumnTotalLabel,
|
|
3890
|
+
xf as textCardExcerpt,
|
|
3891
|
+
Sf as textCardWordingClauses,
|
|
3892
|
+
$t as textCatalogAt,
|
|
3893
|
+
ft as toChartType,
|
|
3894
|
+
kf as toEditableRules,
|
|
3895
|
+
Tf as toFiniteKpiNumber,
|
|
3896
|
+
xt as toPublicCardType,
|
|
3897
|
+
to as toStoredComparison,
|
|
3898
|
+
Rf as toolbarFilterInputFields,
|
|
3899
|
+
Af as toolbarFilterScope,
|
|
3900
|
+
Df as transformComparisonDocument,
|
|
3901
|
+
Ff as transformGroupings,
|
|
3902
|
+
Of as transformOrderSchema,
|
|
3903
|
+
Co as updateMatrixConfig,
|
|
3904
|
+
or as upgradeCardFormats,
|
|
3905
|
+
Wr as upgradeCardPresentation,
|
|
3906
|
+
fr as upgradeConditionalFormatting,
|
|
3907
|
+
bh as upgradeToStoredDashboard,
|
|
3908
|
+
Ef as validateAndResolveWindowTransforms,
|
|
3909
|
+
qf as validateControlValue,
|
|
3910
|
+
Bm as validateDashboardFilterValues,
|
|
3919
3911
|
ws as validateResolvedPrimaryDateFieldShape,
|
|
3920
|
-
|
|
3921
|
-
|
|
3912
|
+
Vm as variableCardKeepsComparison,
|
|
3913
|
+
Gm as variableComparison,
|
|
3922
3914
|
ze as variableFromDraft,
|
|
3923
|
-
|
|
3924
|
-
|
|
3915
|
+
_n as variableGetOptions,
|
|
3916
|
+
jm as variablePartCell,
|
|
3925
3917
|
Km as variablePartType,
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3918
|
+
jo as variableParts,
|
|
3919
|
+
Wm as variableQueryResponseOf,
|
|
3920
|
+
mp as variableSourceWords,
|
|
3921
|
+
$n as variableTakesComparison,
|
|
3922
|
+
an as variableWords,
|
|
3923
|
+
Nf as withCardConditionalRules,
|
|
3924
|
+
Pf as withCardConfigSqlDatePatterns,
|
|
3925
|
+
Um as withCardExcludedFromScope,
|
|
3926
|
+
Qm as withCardIncludedInScope,
|
|
3927
|
+
Lf as withDashboardOptionDependencyOverride,
|
|
3928
|
+
Mf as withDetailSqlDatePattern,
|
|
3929
|
+
Hm as withDistinctDetailColumnAliases,
|
|
3930
|
+
Ym as withDraftCard,
|
|
3931
|
+
Bf as withFormatOverride,
|
|
3932
|
+
Vf as withGrainChoice,
|
|
3933
|
+
Gf as withSqlDatePattern,
|
|
3934
|
+
jf as withStartingGrain,
|
|
3935
|
+
Go as withUnstatedScopeParts,
|
|
3944
3936
|
Kf as withoutSqlDatePattern,
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3937
|
+
Wf as withoutToolbarFilterReachFields,
|
|
3938
|
+
Uf as wordingBlocks,
|
|
3939
|
+
Qf as wordingClauses,
|
|
3940
|
+
Hf as writeColumnFormat,
|
|
3941
|
+
Yf as writeColumnPolarity,
|
|
3942
|
+
zf as writeComparisonDisplay,
|
|
3943
|
+
Jf as writeComparisonPresentation,
|
|
3952
3944
|
fa as writeDateFilterDefault,
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3945
|
+
Xf as writeDateSelectionMode,
|
|
3946
|
+
Zf as writeInheritComparison,
|
|
3947
|
+
em as writeSeeRecords,
|
|
3948
|
+
Zs as writeTextWords
|
|
3957
3949
|
};
|