react-semaphor 0.1.592 → 0.1.594
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-BusR-5uT.js → assistant-chat-1-vtOSvb.js} +6 -6
- package/dist/chunks/{bookmark-impact-DozXJZDS.js → bookmark-impact-Dh-wiTs3.js} +2 -2
- package/dist/chunks/{card-filter-builder-DBTJ74yy.js → card-filter-builder-CLI3IBUQ.js} +351 -362
- package/dist/chunks/{comparison-window-caption-h8w3ySL6.js → comparison-window-caption-DmMFtNP5.js} +1 -1
- package/dist/chunks/{dashboard-CmzJzmph.js → dashboard-a5cAhXh8.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BOQGpYr2.js → dashboard-briefing-launcher-DtImhLiL.js} +224 -224
- package/dist/chunks/{dashboard-controls-BxI3e2_o.js → dashboard-controls-ChS1JL_o.js} +8 -8
- package/dist/chunks/{dashboard-json-BMqXV2Rx.js → dashboard-json-DEmywwom.js} +1 -1
- package/dist/chunks/{dates-DBsscxL_.js → dates-B-bKEsiu.js} +5 -5
- package/dist/chunks/{edit-dashboard-visual-Dvc_Pkfg.js → edit-dashboard-visual-CjGPZh0A.js} +5170 -5302
- package/dist/chunks/{filter-line-CYT7KIXb.js → filter-line-BpdPq1D2.js} +3 -2
- package/dist/chunks/{filter-reach-copy-hEzlpBu7.js → filter-reach-copy-DoXmRmk-.js} +4 -4
- package/dist/chunks/{filter-value-text-CHBm4IU7.js → filter-value-text-CDQCIREQ.js} +10 -10
- package/dist/chunks/{index-BoYJqc3F.js → index-C0jX5wlM.js} +2 -2
- package/dist/chunks/{pivot-result-contract-expectations-CaS0y823.js → pivot-result-contract-expectations-Dt0E1Wou.js} +1309 -1312
- package/dist/chunks/{report-preferences-dialog-Cu_f-8Kw.js → report-preferences-dialog-WFosRbzF.js} +8 -8
- package/dist/chunks/{resolve-dashboard-input-context-CkMk1RW6.js → resolve-dashboard-input-context-DfJshnw8.js} +6248 -6192
- package/dist/chunks/{saved-dashboard-context-RgBS_PIj.js → saved-dashboard-context-DdhPU2Kq.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-DXpTZJ7R.js → semaphor-ready-indicator-DBGF9cuM.js} +21939 -21871
- package/dist/chunks/{shelf-drop-preview-context-qdlJKaH7.js → shelf-drop-preview-context-v9NfjBVj.js} +2 -2
- package/dist/chunks/{stored-dashboard-Baw6Bp2A.js → stored-dashboard-D6FtWx_3.js} +930 -928
- package/dist/chunks/{table-export-sheet-Cd6z7SsG.js → table-export-sheet-DBlFMvE8.js} +1 -1
- package/dist/chunks/{variable-draft-BxtN6YcG.js → variable-draft-CxdgKDCx.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1025 -1012
- package/dist/format-utils/index.js +211 -210
- package/dist/index.js +11 -11
- package/dist/surfboard/index.js +1 -1
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +43 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/semantic-card-domain.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/temporal-bucket-authoring.d.ts +7 -1
- package/dist/types/shared/format-utils/temporal-bucket-format-policy.d.ts +27 -5
- package/package.json +1 -1
|
@@ -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
3
|
var ct = (e, a, t) => $s(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
-
import { a1 as ws, a2 as
|
|
5
|
-
import {
|
|
6
|
-
import { L as
|
|
7
|
-
import { ah as
|
|
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
|
|
4
|
+
import { a1 as ws, a2 as Ss, a3 as xs, 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 Q, af as W, 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 Us, aA as Qs, aB as ut, aC as Hs, aD as Ma, aE as ua, aF as we, aG as ge, aH as Ne, aI as Ys, aJ as zs, aK as Js, t as Xe, aL as Xs, aM as Zs, aN as $t, aO as Ze, aP as eo, aQ as to, aR as Ba, aS as Ot, aT as wt, aU as ao, aV as so, aW as oo, aX as re, aY as Va, aZ as Ga, a_ as fa, a$ as ft, b0 as no, b1 as io, b2 as ma, b3 as St, b4 as ro, b5 as ha, b6 as lo, b7 as pa, b8 as ga, b9 as et, ba, bb as De, bc as co, bd as Ye, q as uo, be as ja, bf as fo, bg as mo, bh as ho, bi as Ka, a 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 So, bt as xo, bu as ko, bv as To, bw as ya, 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, bH as Mo, bI as Bo } from "../chunks/resolve-dashboard-input-context-DfJshnw8.js";
|
|
5
|
+
import { e7 as Xr, c3 as Zr, c8 as ed, dM as td, dN as ad, d$ as sd, d_ as od, dV as nd, fd as id, e0 as rd, e1 as dd, et as ld, dn as cd, dp as ud, dq as fd, dk as md, dl as hd, dm as pd, dg as gd, dh as bd, dj as yd, di as vd, dr as _d, en as Id, dO as Cd, cB as $d, eT as wd, eS as Sd, ey as xd, ez as kd, cA as Td, dG as Rd, e9 as Ad, cK as Dd, ff as Fd, cm as Od, bZ as Ed, eq as qd, ec as Nd, eA as Pd, fG as Ld, fR as Md, fK as Bd, dY as Vd, dZ as Gd, cH as jd, fp as Kd, fn as Wd, fo as Ud, bW as Qd, fB as Hd, eb as Yd, cN as zd, ei as Jd, cG as Xd, fV as Zd, fW as el, f2 as tl, c1 as al, ea as sl, dv as ol, fs as nl, f_ as il, d5 as rl, fL as dl, dU as ll, cI as cl, cW as ul, b_ as fl, eI as ml, eJ as hl, ds as pl, d6 as gl, ep as bl, bQ as yl, eu as vl, f0 as _l, c2 as Il, ee as Cl, g3 as $l, ft as wl, bR as Sl, c7 as xl, eD as kl, d0 as Tl, fY as Rl, f3 as Al, eh as Dl, f1 as Fl, es as Ol, dF as El, dE as ql, cF as Nl, eo as Pl, eW as Ll, e$ as Ml, ci as Bl, ct as Vl, em as Gl, cX as jl, d9 as Kl, db as Wl, cZ as Ul, bO as Ql, fM as Hl, fQ as Yl, eU as zl, eX as Jl, eY as Xl, cO as Zl, ex as ec, ev as tc, eO as ac, bS as sc, b$ as oc, f4 as nc, fC as ic, c0 as rc, e5 as dc, e6 as lc, cs as cc, cq as uc, cr as fc, f$ as mc, g0 as hc, g2 as pc, da as gc, cj as bc, ck as yc, cl as vc, cJ as _c, cL as Ic, fX as Cc, fa as $c, dJ as wc, k as Sc, df as xc, cy as kc, cT as Tc, b as Rc, dc as Ac, dK as Dc, ca as Fc, cb as Oc, c4 as Ec, dw as qc, eZ as Nc, eg as Pc, cx as Lc, eF as Mc, cP as Bc, cp as Vc, bJ as Gc, cC as jc, dW as Kc, ce as Wc, e4 as Uc, cn as Qc, dA as Hc, fq as Yc, g1 as zc, bX as Jc, dC as Xc, eG as Zc, dD as eu, eK as tu, fi as au, fh as su, ej as ou, d2 as nu, cS as iu, cU as ru, o as du, cV as lu, f8 as cu, e2 as uu, ef as fu, bK as mu, bL as hu, bM as pu, bT as gu, fI as bu, fD as yu, e8 as vu, fE as _u, c$ as Iu, cD as Cu, d8 as $u, e3 as wu, f7 as Su, dH as xu, dI as ku, c9 as Tu, fZ as Ru, ed as Au, f5 as Du, eV as Fu, dL as Ou, e_ as Eu, fm as qu, fk as Nu, M as Pu, fH as Lu, cw as Mu, fN as Bu, fO as Vu, dS as Gu, de as ju, cd as Ku, ew as Wu, er as Uu, bN as Qu, d3 as Hu, d4 as Yu, cE as zu, du as Ju, ch as Xu, cu as Zu, cv as ef, dP as tf, dQ as af, cz as sf, bU as of, cg as nf, dy as rf, fg as df, fc as lf, fP as cf, dz as uf, dx as ff, fS as mf, cc as hf, fe as pf, d1 as gf, fb as bf, dd as yf, eH as vf, fr as _f, dR as If, c_ as Cf, co as $f, dX as wf, bP as Sf, cf as xf, ek as kf, fl as Tf, eE as Rf, d7 as Af, dB as Df, bY as Ff, el as Of, fT as Ef, eC as qf, eB as Nf, f9 as Pf, fj as Lf, cM as Mf, cR as Bf, bV as Vf, fJ as Gf, fF as jf, fU as Kf, dt as Wf, f6 as Uf, eR as Qf, dT as Hf, eQ as Yf, fv as zf, c5 as Jf, eN as Xf, c6 as Zf, eP as em, cQ as tm, eL as am, eM as sm, fu as om, fw as nm, fx as im, fy as rm, cY as dm, fz as lm, fA as cm } from "../chunks/resolve-dashboard-input-context-DfJshnw8.js";
|
|
6
|
+
import { L as Vo, M as Wa, H as Ua, N as Go, O as jo, P as Et, Q as Qa, R as Ha, D as Se, S as Ko, T as Wo, I as Uo, U as Qo } from "../chunks/bookmark-state-Be2W3s6t.js";
|
|
7
|
+
import { ah as fm, aB as mm, $ as hm, a0 as pm, ab as gm, af as bm, ac as ym, ad as vm, ae as _m, ai as Im, az as Cm, at as $m, F as wm, ax as Sm, G as xm, a4 as km, J as Tm, aA as Rm, a7 as Am, a8 as Dm, av as Fm, ag as Om, a5 as Em, ar as qm, aw as Nm, ay as Pm, as as Lm, au as Mm, a3 as Bm, a1 as Vm, ak as Gm, ap as jm, X as Km, Y as Wm, W as Um, Z as Qm, a6 as Hm, aq as Ym, aC as zm, al as Jm, aj as Xm, am as Zm, an as eh, ao as th, aa as ah, a9 as sh, _ as oh, a2 as nh } from "../chunks/bookmark-state-Be2W3s6t.js";
|
|
8
|
+
import { L as rh, D as dh, E as lh, d as ch, C as uh, k as fh, x as mh, A as hh, q as ph, s as gh, B as bh, z as yh, n as vh, o as _h, p as Ih, y as Ch, F as $h, t as wh, v as Sh, u as xh, w as kh } from "../chunks/stored-dashboard-D6FtWx_3.js";
|
|
9
|
+
import { r as Ho, ac as va } from "../chunks/pivot-result-contract-expectations-Dt0E1Wou.js";
|
|
10
|
+
import { aS as Rh, aR as Ah, aN as Dh, aQ as Fh, aT as Oh, aH as Eh } from "../chunks/pivot-result-contract-expectations-Dt0E1Wou.js";
|
|
11
|
+
import { f as Yo, w as zo, D as _a, a as Jo } from "../chunks/metric-comparison-BeKnUD08.js";
|
|
12
|
+
import { p as Xo } from "../chunks/report-runtime-context-g4Zp_TU9.js";
|
|
13
|
+
import { r as Ya, D as Ia, h as Zo, i as za, j as en, k as tn, l as an, f as xt, m as sn, v as on } from "../chunks/filter-reach-copy-DoXmRmk-.js";
|
|
14
|
+
import { N as Nh, $ as Ph, S as Lh, o as Mh, t as Bh, w as Vh, u as Gh, G as jh, C as Kh, n as Wh, q as Uh, J as Qh, d as Hh, a1 as Yh, L as zh, M as Jh, _ as Xh, a0 as Zh, E as ep, X as tp, F as ap, x as sp, y as op, A as np, p as ip, z as rp, R as dp, O as lp, a2 as cp, Z as up, Y as fp, K as mp, H as hp, I as pp, U as gp, T as bp, Q as yp, V as vp, P as _p, s as Ip, W as Cp, B as $p } from "../chunks/filter-reach-copy-DoXmRmk-.js";
|
|
15
|
+
import { a9 as Ja, r as Xa, aP as nn, b0 as Pe, aN as rn, aS as dn, aM as ln, aG as cn, aO as un, a7 as fn } from "../chunks/validators-BlEWWX9O.js";
|
|
16
16
|
import "../chunks/schema-C9NPiIru.js";
|
|
17
|
-
import { i as Za, C as je, D as
|
|
17
|
+
import { i as Za, C as je, D as mn, e as hn, b as pn } 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 gn, f as bn, z as qt, t as Be, e as yn } from "../chunks/analytics-base-schemas-8wz9vqn_.js";
|
|
20
|
+
import { A as Ca, E as vn } 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 _n } from "../chunks/raw-temporal-value-BzdgeDa7.js";
|
|
24
|
+
import { C as Sp, a as xp, S as kp } from "../chunks/pickers-DkqmtnTL.js";
|
|
25
|
+
import { r as In } 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 be, b as
|
|
32
|
-
import { n as
|
|
33
|
-
import { e as
|
|
34
|
-
const
|
|
27
|
+
import { v as ze, a as Cn, i as $a, o as mt, d as $n, b as wn, c as Sn } from "../chunks/variable-draft-CxdgKDCx.js";
|
|
28
|
+
import { S as Rp, f as Ap, g as Dp, e as Fp, n as Op } from "../chunks/variable-draft-CxdgKDCx.js";
|
|
29
|
+
import { K as qp, a as Np, d as Pp, r as Lp, b as Mp } from "../chunks/dates-B-bKEsiu.js";
|
|
30
|
+
import { b as Vp, d as Gp } from "../chunks/bookmark-impact-Dh-wiTs3.js";
|
|
31
|
+
import { r as be, b as xn, s as kn, a as Tn } from "../chunks/resolver-DG_tfEpt.js";
|
|
32
|
+
import { n as Rn, r as An } from "../chunks/index-BVKzKl5d.js";
|
|
33
|
+
import { e as Kp } from "../chunks/brand-BoUV0iHF.js";
|
|
34
|
+
const Pr = [
|
|
35
35
|
"cardType",
|
|
36
36
|
"sql",
|
|
37
37
|
"python",
|
|
@@ -47,7 +47,7 @@ const qr = [
|
|
|
47
47
|
"globalDateComparison",
|
|
48
48
|
"calendarContext",
|
|
49
49
|
"sqlRowLimit"
|
|
50
|
-
],
|
|
50
|
+
], Lr = [
|
|
51
51
|
"cardId",
|
|
52
52
|
"cardTitle",
|
|
53
53
|
"cache_config",
|
|
@@ -71,10 +71,10 @@ function ye(e) {
|
|
|
71
71
|
function Ke(e) {
|
|
72
72
|
return typeof e == "string" ? e : "";
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Dn(e, a = {}) {
|
|
75
75
|
const t = ye(e), s = Nt(a), o = {};
|
|
76
76
|
if (t.calendarContext !== void 0) {
|
|
77
|
-
const i =
|
|
77
|
+
const i = Xo(t.calendarContext);
|
|
78
78
|
if (!i.ok)
|
|
79
79
|
throw new le(
|
|
80
80
|
`${s}calendarContext: ${i.issues.map((d) => d.message).join("; ")}`,
|
|
@@ -86,25 +86,25 @@ function Rn(e, a = {}) {
|
|
|
86
86
|
const n = ws(t.resolvedPrimaryDateField);
|
|
87
87
|
if (!n.ok)
|
|
88
88
|
throw new le(
|
|
89
|
-
`${s}${
|
|
89
|
+
`${s}${Ss(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 = Yo(t.globalDateComparison);
|
|
95
95
|
if (!i.ok)
|
|
96
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 = zo(
|
|
102
102
|
t.globalDateComparison
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
return o;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Mr(e, a = {}) {
|
|
108
108
|
const t = ye(e), s = Nt(a), o = {};
|
|
109
109
|
if (t.pagination !== void 0) {
|
|
110
110
|
const n = ye(t.pagination), i = n.page, d = n.pageSize;
|
|
@@ -136,8 +136,8 @@ function Pr(e, a = {}) {
|
|
|
136
136
|
}
|
|
137
137
|
return o;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
const t = ye(e), s = Nt(a), o = (
|
|
139
|
+
function Br(e, a = {}) {
|
|
140
|
+
const t = ye(e), s = Nt(a), o = (S) => new le(`${s}${S} is required`, S), n = Ke(t.connection_id).trim();
|
|
141
141
|
if (!n) throw o("connection_id");
|
|
142
142
|
const i = Ke(t.cardType).trim();
|
|
143
143
|
if (!i) throw o("cardType");
|
|
@@ -147,7 +147,7 @@ function Lr(e, a = {}) {
|
|
|
147
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
|
-
const v =
|
|
150
|
+
const v = xs({
|
|
151
151
|
hasExecutableConfig: p,
|
|
152
152
|
sql: c,
|
|
153
153
|
normalizedPython: h
|
|
@@ -160,7 +160,7 @@ function Lr(e, a = {}) {
|
|
|
160
160
|
if (d === "none") throw o("cardConfig");
|
|
161
161
|
const b = ye(t.cardDataSource);
|
|
162
162
|
if (Object.keys(b).length === 0) throw o("cardDataSource");
|
|
163
|
-
const
|
|
163
|
+
const x = ks({
|
|
164
164
|
controlValues: t.controlValues,
|
|
165
165
|
controlDefinitions: t.controlDefinitions,
|
|
166
166
|
cardControlDefinitions: t.cardControlDefinitions,
|
|
@@ -175,16 +175,16 @@ function Lr(e, a = {}) {
|
|
|
175
175
|
cardConfig: l,
|
|
176
176
|
cardDataSource: b,
|
|
177
177
|
active_filters: Array.isArray(t.active_filters) ? t.active_filters : [],
|
|
178
|
-
controlValues:
|
|
179
|
-
controlDefinitions:
|
|
180
|
-
cardControlDefinitions:
|
|
181
|
-
controlBindings:
|
|
182
|
-
...
|
|
178
|
+
controlValues: x.controlValues,
|
|
179
|
+
controlDefinitions: x.controlDefinitions,
|
|
180
|
+
cardControlDefinitions: x.cardControlDefinitions,
|
|
181
|
+
controlBindings: x.controlBindings,
|
|
182
|
+
...Dn(t, a),
|
|
183
183
|
...typeof t.sqlRowLimit == "number" && Number.isInteger(t.sqlRowLimit) && t.sqlRowLimit > 0 ? { sqlRowLimit: t.sqlRowLimit } : {}
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
const ht = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"],
|
|
187
|
-
function
|
|
186
|
+
const ht = ["#14b8a6", "#5eead4", "#374151", "#6b7280", "#d1d5db"], Fn = ["spacing", "canvasPadding", "canvas", "cardCorners", "chartColors"], es = ["light", "dark"];
|
|
187
|
+
function Vr(e) {
|
|
188
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"]);
|
|
@@ -194,24 +194,24 @@ function Mr(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" ? be(s, ["canvasTheme"]) : n(["canvasTheme"]), b =
|
|
197
|
+
const v = p === "light" ? be(s, ["canvasTheme"]) : n(["canvasTheme"]), b = qn(v, a);
|
|
198
198
|
b !== void 0 && (i.canvas = { ...i.canvas, [p]: b });
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
201
|
-
const
|
|
202
|
-
|
|
199
|
+
const x = En(s, o, p);
|
|
200
|
+
if (x) {
|
|
201
|
+
const S = x.filter(Za).map((E) => E.toLowerCase());
|
|
202
|
+
S.length < x.length && a.push({ field: "chartColors", kind: "dropped_colour", detail: `${p}: ${x.length - S.length} colours that aren't hex` }), S.length >= je.min && (i.chartColors = { ...i.chartColors, [p]: S.slice(0, je.max) }), S.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: On(i, e.organizationAppearance, a), notes: a };
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const s =
|
|
207
|
+
function On(e, a, t) {
|
|
208
|
+
const s = xn({ organizationAppearance: a ? Rn(a).spec : null }), o = { ...e };
|
|
209
209
|
for (const n of Object.keys(e)) {
|
|
210
|
-
const i =
|
|
210
|
+
const i = Tn[n], d = n === "canvas" || n === "chartColors";
|
|
211
211
|
for (const l of es) {
|
|
212
|
-
const c =
|
|
212
|
+
const c = kn(o, n, l);
|
|
213
213
|
if (c === void 0) continue;
|
|
214
|
-
const h =
|
|
214
|
+
const h = Fn.includes(n) && be(An(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,7 +221,7 @@ function Dn(e, a, t) {
|
|
|
221
221
|
}
|
|
222
222
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function En(e, a, t) {
|
|
225
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
227
|
const i = pt(n, pt(ht, o));
|
|
@@ -233,7 +233,7 @@ function pt(e, a) {
|
|
|
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 qn(e, a) {
|
|
237
237
|
if (!(e == null || e === "")) {
|
|
238
238
|
if (e === "muted") return "muted";
|
|
239
239
|
if (e === "clear") return "background";
|
|
@@ -242,7 +242,7 @@ function On(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 } = mn[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
248
|
function gt(e) {
|
|
@@ -259,21 +259,21 @@ const bt = {
|
|
|
259
259
|
chartColors: (e, a) => a.chartColors = e,
|
|
260
260
|
barCorners: (e, a) => a.barCorners = e
|
|
261
261
|
};
|
|
262
|
-
function
|
|
262
|
+
function Nn(e) {
|
|
263
263
|
var t;
|
|
264
264
|
const a = {};
|
|
265
265
|
for (const [s, o] of Object.entries(e ?? {}))
|
|
266
266
|
o !== void 0 && ((t = bt[s]) == null || t.call(bt, o, a));
|
|
267
267
|
return a;
|
|
268
268
|
}
|
|
269
|
-
const
|
|
269
|
+
const Pn = {
|
|
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 Ln(e, a, t = {}) {
|
|
275
275
|
var d;
|
|
276
|
-
const s = ve(e), o =
|
|
276
|
+
const s = ve(e), o = Vo(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 Nn(e, a, t = {}) {
|
|
|
358
358
|
}
|
|
359
359
|
return i;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Mn(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 = Go(t);
|
|
367
367
|
return {
|
|
368
368
|
sheetIds: "all",
|
|
369
369
|
...n.length ? { exceptSheetIds: [...n] } : {},
|
|
370
|
-
...
|
|
370
|
+
...jo(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 = Ln(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: Pn[y] },
|
|
392
392
|
reaches: n.reaches,
|
|
393
393
|
excluded: n.excluded,
|
|
394
394
|
...n.blocked ? { blocked: n.blocked } : {},
|
|
@@ -398,14 +398,14 @@ 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 = Mn(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),
|
|
408
|
-
|
|
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), x = p ? b : void 0, S = x ? Bn(h == null ? void 0 : h.operation, x) ?? nn(
|
|
408
|
+
x,
|
|
409
409
|
{ use: "filterDefault", columnHasTime: Na(o.filter) === "datetime" },
|
|
410
410
|
"defaultPeriod"
|
|
411
411
|
) : void 0;
|
|
@@ -418,15 +418,15 @@ function as(e, a, t, s) {
|
|
|
418
418
|
field: c,
|
|
419
419
|
selection: o.filter.type === "single" ? "single" : "multiple",
|
|
420
420
|
...v != null && v.length ? { defaultValues: v } : {},
|
|
421
|
-
...
|
|
422
|
-
...
|
|
421
|
+
...x ? { defaultPeriod: x } : {},
|
|
422
|
+
...S ? { defaultPeriodReadOnly: S } : {},
|
|
423
423
|
...p ? { datePicker: o.filter.dateSelectionMode === "day" ? "day" : o.filter.dateSelectionMode === "months" ? "month" : "range" } : {},
|
|
424
424
|
...l,
|
|
425
425
|
...n
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
const t = typeof e == "string" ?
|
|
428
|
+
function Bn(e, a) {
|
|
429
|
+
const t = typeof e == "string" ? _n(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.`,
|
|
@@ -465,7 +465,7 @@ function is(e) {
|
|
|
465
465
|
field: s
|
|
466
466
|
}));
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Vn(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,14 +473,14 @@ function Mn(e) {
|
|
|
473
473
|
}
|
|
474
474
|
return [...t.values()];
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Gn(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
481
|
return i ? nt(i, o.field.name, n.datasetName) : void 0;
|
|
482
482
|
}
|
|
483
|
-
const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "trend", "trendGrain", "seeRecords"],
|
|
483
|
+
const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison", "trend", "trendGrain", "seeRecords"], jn = {
|
|
484
484
|
orientation: "orientation",
|
|
485
485
|
stack: "stacking",
|
|
486
486
|
donut: "donut hole",
|
|
@@ -494,28 +494,28 @@ const tt = ["orientation", "stack", "donut", "columnOrder", "totals", "dataLabel
|
|
|
494
494
|
trend: "trend under its value",
|
|
495
495
|
trendGrain: "trend grain",
|
|
496
496
|
seeRecords: "records to see"
|
|
497
|
-
},
|
|
498
|
-
function
|
|
497
|
+
}, Kn = { x: "xAxisConfig", y: "yAxisConfig" }, yt = { x: "horizontal", y: "vertical" };
|
|
498
|
+
function Wn(e) {
|
|
499
499
|
const a = `${e.sql ? "SQL " : ""}${Ps(e.type)}`;
|
|
500
500
|
return `${/^[aeiou]/i.test(a) ? "an" : "a"} ${a}`;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Un(e, a, t) {
|
|
503
503
|
const s = Object.fromEntries(Object.entries(a).filter(([o, n]) => n !== void 0 && !t.includes(o)));
|
|
504
504
|
return Object.keys(s).length ? { op: "card.update", cardId: e.cardRef, ...s } : void 0;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
var b,
|
|
506
|
+
function Qn(e, a, t, s, o) {
|
|
507
|
+
var b, x, S, E, C, k, y, F, w, N, I;
|
|
508
508
|
const n = tt.filter((_) => t[_] !== void 0);
|
|
509
509
|
if (!n.length) return {};
|
|
510
510
|
const i = tt.filter((_) => a.settings.has(_)), d = n.filter((_) => !a.settings.has(_));
|
|
511
511
|
for (const _ of d)
|
|
512
512
|
o.push(
|
|
513
|
-
|
|
514
|
-
message: `${
|
|
513
|
+
Q("setting_not_for_card", {
|
|
514
|
+
message: `${W(e.title)} is ${Wn(a)}, which has no ${jn[_]}.`,
|
|
515
515
|
path: `${s.path}.${_}`,
|
|
516
516
|
fix: i.length ? `Leave out ${_}; this card takes ${i.join(", ")}.` : `Leave out ${_}.`,
|
|
517
517
|
allowed: i,
|
|
518
|
-
suggestedChange:
|
|
518
|
+
suggestedChange: Un(s, t, d)
|
|
519
519
|
})
|
|
520
520
|
);
|
|
521
521
|
if (d.length) return {};
|
|
@@ -532,15 +532,15 @@ function Wn(e, a, t, s, o) {
|
|
|
532
532
|
_ && (l.columnOrder = _);
|
|
533
533
|
}
|
|
534
534
|
if (t.totals) {
|
|
535
|
-
const _ = Os(e, a, t.totals, ((
|
|
535
|
+
const _ = Os(e, a, t.totals, ((x = v.totals) == null ? void 0 : x.row) ?? !1, s, o);
|
|
536
536
|
_ && (l.totals = _);
|
|
537
537
|
}
|
|
538
538
|
if (t.dataLabels) {
|
|
539
539
|
const _ = {};
|
|
540
540
|
t.dataLabels.show !== Es(p) && (_.show = t.dataLabels.show);
|
|
541
541
|
const D = t.dataLabels.format;
|
|
542
|
-
if (D === null && ((
|
|
543
|
-
const M =
|
|
542
|
+
if (D === null && ((S = v.dataLabels) != null && S.format) && (_.format = null), D) {
|
|
543
|
+
const M = Hn(e, a, D, `${s.path}.dataLabels.format`, o);
|
|
544
544
|
M && !Pe(M, (E = v.dataLabels) == null ? void 0 : E.format) && (_.format = M);
|
|
545
545
|
}
|
|
546
546
|
Object.keys(_).length && (l.dataLabels = _);
|
|
@@ -554,8 +554,8 @@ function Wn(e, a, t, s, o) {
|
|
|
554
554
|
for (const M of ["x", "y"]) {
|
|
555
555
|
const P = t.axes[M];
|
|
556
556
|
if (!P) continue;
|
|
557
|
-
const G =
|
|
558
|
-
G && (D[
|
|
557
|
+
const G = Yn(e, M, P, ((y = v.axes) == null ? void 0 : y[M]) ?? {}, M === _, `${s.path}.axes.${M}`, o);
|
|
558
|
+
G && (D[Kn[M]] = G);
|
|
559
559
|
}
|
|
560
560
|
Object.keys(D).length && (l.axes = D);
|
|
561
561
|
}
|
|
@@ -566,8 +566,8 @@ function Wn(e, a, t, s, o) {
|
|
|
566
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) {
|
|
567
567
|
const _ = Ns(e.config);
|
|
568
568
|
_ ? o.push(
|
|
569
|
-
|
|
570
|
-
message: `${
|
|
569
|
+
Q("value_invalid", {
|
|
570
|
+
message: `${W(e.title)} draws its trend by its Trend By${_.granularity ? `, by ${_.granularity}` : ""}, so it takes no grain of its own.`,
|
|
571
571
|
path: `${s.path}.trendGrain`,
|
|
572
572
|
fix: "Change the Trend By's timeGrain in its query, or remove the Trend By to set a grain here.",
|
|
573
573
|
allowed: []
|
|
@@ -576,13 +576,13 @@ function Wn(e, a, t, s, o) {
|
|
|
576
576
|
}
|
|
577
577
|
return l;
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function Hn(e, a, t, s, o) {
|
|
580
580
|
const n = String(t.type), i = Ls("cartesian", "number"), d = Me(n), l = d == null ? void 0 : d.safeParse(t);
|
|
581
581
|
if (!i.includes(n) || !(l != null && l.success)) {
|
|
582
582
|
const h = l && !l.success ? l.error.issues[0] : void 0;
|
|
583
583
|
o.push(
|
|
584
|
-
|
|
585
|
-
message: i.includes(n) ? `That format for the values on ${
|
|
584
|
+
Q("format_invalid", {
|
|
585
|
+
message: i.includes(n) ? `That format for the values on ${W(e.title)} isn't valid: ${(h == null ? void 0 : h.message) ?? "invalid"}.` : `The values on ${W(e.title)} are numbers, so they can't take a ${n.replace("_", " ")} format.`,
|
|
586
586
|
path: s,
|
|
587
587
|
fix: "Send a whole number, currency, percent, scientific or duration format.",
|
|
588
588
|
allowed: i.includes(n) ? Oe(n) : [...i]
|
|
@@ -592,20 +592,20 @@ function Un(e, a, t, s, o) {
|
|
|
592
592
|
}
|
|
593
593
|
const c = La({ surface: a.type === "pie" ? "pie" : "cartesian", value: "number", rawValueKinds: [] }, l.data);
|
|
594
594
|
if (!c.ok) {
|
|
595
|
-
o.push(
|
|
595
|
+
o.push(Q("format_invalid", { message: `${W(e.title)} can't draw that format on its values: ${c.reason}.`, path: s }));
|
|
596
596
|
return;
|
|
597
597
|
}
|
|
598
598
|
return l.data;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Yn(e, a, t, s, o, n, i) {
|
|
601
601
|
const d = {};
|
|
602
|
-
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(Q("value_invalid", { message: "An axis title can't be empty.", path: `${n}.title`, fix: "Send a title, or null for none." })) : (t.title ?? void 0) !== s.title && (d.title = t.title));
|
|
603
603
|
const l = ["min", "max"].filter((c) => t[c] !== void 0 && t[c] !== null);
|
|
604
604
|
if (!o && l.length) {
|
|
605
605
|
const c = yt[a === "x" ? "y" : "x"];
|
|
606
606
|
i.push(
|
|
607
|
-
|
|
608
|
-
message: `${
|
|
607
|
+
Q("setting_not_for_card", {
|
|
608
|
+
message: `${W(e.title)}'s ${yt[a]} axis lists categories; set a range on its ${c} axis.`,
|
|
609
609
|
path: `${n}.${l[0]}`,
|
|
610
610
|
allowed: ["title"]
|
|
611
611
|
})
|
|
@@ -617,7 +617,7 @@ function Qn(e, a, t, s, o, n, i) {
|
|
|
617
617
|
const v = t[p];
|
|
618
618
|
if (v !== void 0) {
|
|
619
619
|
if (v !== null && !Number.isFinite(v)) {
|
|
620
|
-
i.push(
|
|
620
|
+
i.push(Q("value_invalid", { message: `An axis ${p} must be a number.`, path: `${n}.${p}` }));
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
623
623
|
(v ?? void 0) !== s[p] && (d[p] = v);
|
|
@@ -626,8 +626,8 @@ function Qn(e, a, t, s, o, n, i) {
|
|
|
626
626
|
const c = t.min !== void 0 ? t.min : s.min, h = t.max !== void 0 ? t.max : s.max;
|
|
627
627
|
if (typeof c == "number" && typeof h == "number" && c > h) {
|
|
628
628
|
i.push(
|
|
629
|
-
|
|
630
|
-
message: `The ${yt[a]} axis of ${
|
|
629
|
+
Q("value_invalid", {
|
|
630
|
+
message: `The ${yt[a]} axis of ${W(e.title)} can't start at ${c} and end at ${h}.`,
|
|
631
631
|
path: n,
|
|
632
632
|
fix: "Send a min no greater than the max."
|
|
633
633
|
})
|
|
@@ -639,36 +639,36 @@ function Qn(e, a, t, s, o, n, i) {
|
|
|
639
639
|
}
|
|
640
640
|
function wa(e, a, t, s, o) {
|
|
641
641
|
const n = o === "date" && s.role === "dimension";
|
|
642
|
-
return
|
|
643
|
-
message: o === "text" ? `${a} on ${
|
|
642
|
+
return Q("setting_not_for_card", {
|
|
643
|
+
message: o === "text" ? `${a} on ${W(e.title)} shows its text as it is; text formats apply on a Matrix only.` : o === "category" ? `${a} labels the categories of ${W(e.title)}, which a chart shows as the query returns them; format it on a table or a Matrix.` : `${W(e.title)} shows ${a}, ${rs(s)}, without a format of its own; this card type doesn't apply one.`,
|
|
644
644
|
path: t,
|
|
645
645
|
...n ? { fix: `Group ${a} by day, week, month, quarter or year to format its dates.` } : {}
|
|
646
646
|
});
|
|
647
647
|
}
|
|
648
648
|
const rs = (e) => e.granularity ? `a date grouped by ${e.granularity}` : e.dataType ? `a ${e.dataType.toLowerCase()}` : "this column";
|
|
649
|
-
function
|
|
649
|
+
function xe(e, a) {
|
|
650
650
|
return `${e}.columns[${JSON.stringify(a)}]`;
|
|
651
651
|
}
|
|
652
652
|
function kt(e, a, t, s) {
|
|
653
653
|
const { [s]: o, ...n } = t;
|
|
654
654
|
return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function zn(e, a, t) {
|
|
657
657
|
const { hidden: s, width: o, ...n } = t;
|
|
658
658
|
return Object.keys(n).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: n } } : void 0;
|
|
659
659
|
}
|
|
660
660
|
function We(e, a, t) {
|
|
661
661
|
return { op: "card.update", cardId: e.cardRef, columns: { [a]: { format: t } } };
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Jn(e, a, t, s, o, n, i) {
|
|
664
664
|
var c;
|
|
665
665
|
const d = o.label;
|
|
666
666
|
if (d === void 0 || d === t.label) return;
|
|
667
|
-
const l = `${
|
|
667
|
+
const l = `${xe(n.path, s)}.label`;
|
|
668
668
|
if (!a.settings.has("columns.label") || !t.labelKey) {
|
|
669
669
|
i.push(
|
|
670
|
-
|
|
671
|
-
message: a.sql ? `${
|
|
670
|
+
Q("setting_not_for_card", {
|
|
671
|
+
message: a.sql ? `${W(e.title)}'s column ${s} takes its header from the query; rename it in the SQL.` : `${s} on ${W(e.title)} takes no header of its own.`,
|
|
672
672
|
path: l,
|
|
673
673
|
allowed: ["hidden", "width", "format"].filter((h) => h !== "hidden" || a.settings.has("columns.hidden")),
|
|
674
674
|
suggestedChange: kt(n, s, o, "label")
|
|
@@ -677,23 +677,23 @@ function Yn(e, a, t, s, o, n, i) {
|
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
679
|
if (d === null) {
|
|
680
|
-
const h = ((c =
|
|
680
|
+
const h = ((c = Gn(e, t.ref, n.catalogs)) == null ? void 0 : c.label) || t.field || t.label;
|
|
681
681
|
return t.labelInherited && t.label === h ? void 0 : { key: t.labelKey, label: h, origin: "semantic" };
|
|
682
682
|
}
|
|
683
683
|
if (!d.trim()) {
|
|
684
|
-
i.push(
|
|
684
|
+
i.push(Q("value_invalid", { message: "A column header can't be empty.", path: l, fix: "Send a header, or null to use the model's." }));
|
|
685
685
|
return;
|
|
686
686
|
}
|
|
687
687
|
return { key: t.labelKey, label: d };
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Xn(e, a, t, s, o, n, i) {
|
|
690
690
|
var _, D, M;
|
|
691
|
-
const d = `${
|
|
691
|
+
const d = `${xe(n.path, s)}.format`;
|
|
692
692
|
if (!a.settings.has("columns.format")) {
|
|
693
|
-
i.push(
|
|
693
|
+
i.push(Q("setting_not_for_card", { message: `${W(e.title)} takes no column formats.`, path: d }));
|
|
694
694
|
return;
|
|
695
695
|
}
|
|
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 =
|
|
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 = Ho({
|
|
697
697
|
card: e,
|
|
698
698
|
column: l,
|
|
699
699
|
...c ? { modelFormats: c } : {},
|
|
@@ -701,18 +701,18 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
701
701
|
}), v = p.source === "override" ? p.format : void 0;
|
|
702
702
|
if (o === null) return v ? null : void 0;
|
|
703
703
|
if (v && Pe(o, v)) return;
|
|
704
|
-
const b = Ks(e, a, t, n.sqlResultColumns),
|
|
705
|
-
if (
|
|
706
|
-
i.push(wa(e, s, d, t,
|
|
704
|
+
const b = Ks(e, a, t, n.sqlResultColumns), x = b.value, S = Ws(b);
|
|
705
|
+
if (S.length === 0) {
|
|
706
|
+
i.push(wa(e, s, d, t, x));
|
|
707
707
|
return;
|
|
708
708
|
}
|
|
709
709
|
const E = !("type" in o) || o.type === void 0;
|
|
710
710
|
if (E && !p.format) {
|
|
711
|
-
const P =
|
|
711
|
+
const P = S[0];
|
|
712
712
|
i.push(
|
|
713
|
-
|
|
713
|
+
Q("format_invalid", {
|
|
714
714
|
// Unavailable is not "none": say which, so the agent knows the column may have a model format (ledger P2-20).
|
|
715
|
-
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 ${W(e.title)} may follow its model's format, which couldn't be read; state the whole format with its type.` : `${s} on ${W(e.title)} has no format to change; state the whole format with its type.`,
|
|
716
716
|
path: d,
|
|
717
717
|
fix: "Add `type` to the format.",
|
|
718
718
|
allowed: Oe(P),
|
|
@@ -722,12 +722,12 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
722
722
|
return;
|
|
723
723
|
}
|
|
724
724
|
const C = E ? { ...p.format, ...o } : o, k = String(C.type);
|
|
725
|
-
if (!
|
|
725
|
+
if (!S.includes(k)) {
|
|
726
726
|
i.push(
|
|
727
|
-
k === "string" ? wa(e, s, `${d}.type`, t, "text") :
|
|
728
|
-
message:
|
|
727
|
+
k === "string" ? wa(e, s, `${d}.type`, t, "text") : Q("format_invalid", {
|
|
728
|
+
message: x === "result" ? `${s} on ${W(e.title)} comes straight from the query, so it can't take a ${k.replace("_", " ")} format.` : `${s} on ${W(e.title)} is ${rs(t)}, so it can't take a ${k.replace("_", " ")} format.`,
|
|
729
729
|
path: `${d}.type`,
|
|
730
|
-
allowed: [...
|
|
730
|
+
allowed: [...S]
|
|
731
731
|
})
|
|
732
732
|
);
|
|
733
733
|
return;
|
|
@@ -736,59 +736,62 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
736
736
|
if (!y || !(F != null && F.success)) {
|
|
737
737
|
const P = F && !F.success ? F.error.issues[0] : void 0;
|
|
738
738
|
i.push(
|
|
739
|
-
|
|
739
|
+
Q("format_invalid", {
|
|
740
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.`,
|
|
741
741
|
path: d,
|
|
742
|
-
fix:
|
|
743
|
-
allowed: y ? Oe(k) : [...
|
|
742
|
+
fix: ai(k),
|
|
743
|
+
allowed: y ? Oe(k) : [...gn],
|
|
744
744
|
...p.format ? { suggestedChange: We(n, s, p.format) } : {}
|
|
745
745
|
})
|
|
746
746
|
);
|
|
747
747
|
return;
|
|
748
748
|
}
|
|
749
749
|
const w = F.data;
|
|
750
|
-
if (w.type === "temporal_bucket" && t.granularity
|
|
751
|
-
const G =
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
750
|
+
if (w.type === "temporal_bucket" && t.granularity) {
|
|
751
|
+
const P = t.granularity, G = va(w, P);
|
|
752
|
+
if (!G.ok) {
|
|
753
|
+
const B = Us(P) ? Qs(P).map((K) => ({ type: "temporal_bucket", presentation: { mode: "pattern", pattern: K } })) : bn.map((K) => ({ type: "temporal_bucket", presentation: { mode: "preset", preset: K } })).filter(
|
|
754
|
+
(K) => va(K, P).ok
|
|
755
|
+
);
|
|
756
|
+
i.push(
|
|
757
|
+
Q("date_finer_than_grain", {
|
|
758
|
+
message: `${s} on ${W(e.title)} is grouped by ${t.granularity}, which that date format doesn't fit: ${G.message}`,
|
|
759
|
+
path: d,
|
|
760
|
+
allowed: B.map(({ presentation: K }) => K.mode === "pattern" ? K.pattern : K.mode === "preset" ? K.preset : "auto"),
|
|
761
|
+
...B[0] ? { suggestedChange: We(n, s, B[0]) } : {}
|
|
762
|
+
})
|
|
763
|
+
);
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
763
766
|
}
|
|
764
767
|
if (w.type === "date") {
|
|
765
|
-
const P = o, G = p.format ?? {}, B = Object.keys(P).filter((
|
|
768
|
+
const P = o, G = p.format ?? {}, B = Object.keys(P).filter((K) => !ut.includes(K) && !Pe(P[K], G[K]));
|
|
766
769
|
if (B.length) {
|
|
767
|
-
const
|
|
770
|
+
const K = Object.fromEntries(Object.entries(w).filter(([te]) => !B.includes(te)));
|
|
768
771
|
i.push(
|
|
769
|
-
|
|
772
|
+
Q("format_invalid", {
|
|
770
773
|
message: `A date format set here takes a pattern or a preset; it doesn't set ${B.join(", ")}.`,
|
|
771
774
|
path: d,
|
|
772
775
|
fix: `Leave out ${B.join(", ")}.`,
|
|
773
776
|
allowed: ut.filter((te) => te !== "type"),
|
|
774
|
-
suggestedChange: We(n, s,
|
|
777
|
+
suggestedChange: We(n, s, K)
|
|
775
778
|
})
|
|
776
779
|
);
|
|
777
780
|
return;
|
|
778
781
|
}
|
|
779
782
|
}
|
|
780
|
-
const N = w.type === "date" && b.surface === "detail_table" && b.value === "date" ?
|
|
783
|
+
const N = w.type === "date" && b.surface === "detail_table" && b.value === "date" ? Hs(t, w, (M = e.dataSource) == null ? void 0 : M.connectionType) : void 0;
|
|
781
784
|
if (N) {
|
|
782
785
|
i.push(
|
|
783
|
-
|
|
786
|
+
Q(
|
|
784
787
|
"format_invalid",
|
|
785
788
|
N.reason === "connection" ? {
|
|
786
|
-
message: `${
|
|
789
|
+
message: `${W(e.title)} can't show ${s} that way: ${N.message}`,
|
|
787
790
|
path: d,
|
|
788
791
|
fix: "Write the pattern in uppercase letters (YYYY MM DD HH mm ss) with no dialect, for example 'DD MMM YYYY' or 'HH:mm'.",
|
|
789
792
|
allowed: ut.filter((P) => P !== "type")
|
|
790
793
|
} : {
|
|
791
|
-
message: `${
|
|
794
|
+
message: `${W(e.title)} can't draw that format on ${s}: ${N.message}.`,
|
|
792
795
|
path: d,
|
|
793
796
|
fix: "Change the format to one the column can show.",
|
|
794
797
|
allowed: Oe(k)
|
|
@@ -800,8 +803,8 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
800
803
|
const I = La(b, w);
|
|
801
804
|
if (!I.ok) {
|
|
802
805
|
i.push(
|
|
803
|
-
|
|
804
|
-
message: `${
|
|
806
|
+
Q("format_invalid", {
|
|
807
|
+
message: `${W(e.title)} can't draw that format on ${s}: ${I.reason}.`,
|
|
805
808
|
path: d,
|
|
806
809
|
fix: "Change the format to one the column can show.",
|
|
807
810
|
allowed: Oe(k)
|
|
@@ -811,15 +814,15 @@ function zn(e, a, t, s, o, n, i) {
|
|
|
811
814
|
}
|
|
812
815
|
return v && Pe(v, w) ? void 0 : w;
|
|
813
816
|
}
|
|
814
|
-
function
|
|
815
|
-
var
|
|
817
|
+
function Zn(e, a, t, s, o, n, i) {
|
|
818
|
+
var S, E;
|
|
816
819
|
const d = o.polarity;
|
|
817
820
|
if (d === void 0) return;
|
|
818
|
-
const l = `${
|
|
821
|
+
const l = `${xe(n.path, s)}.polarity`, c = t.ref;
|
|
819
822
|
if (!(a.settings.has("columns.polarity") && (c.kind === "sqlKpiValue" || c.kind === "field" && t.role === "measure"))) {
|
|
820
823
|
i.push(
|
|
821
|
-
|
|
822
|
-
message: t.role === "measure" || t.role === "value" ? `${
|
|
824
|
+
Q("setting_not_for_card", {
|
|
825
|
+
message: t.role === "measure" || t.role === "value" ? `${W(e.title)} shows no comparison, so ${s} has no favorable direction.` : `${s} on ${W(e.title)} isn't a measure, so it has no favorable direction.`,
|
|
823
826
|
path: l,
|
|
824
827
|
fix: "Leave out polarity.",
|
|
825
828
|
suggestedChange: kt(n, s, o, "polarity")
|
|
@@ -827,51 +830,51 @@ function Jn(e, a, t, s, o, n, i) {
|
|
|
827
830
|
);
|
|
828
831
|
return;
|
|
829
832
|
}
|
|
830
|
-
const p = c.kind === "field" ? (E = (
|
|
833
|
+
const p = c.kind === "field" ? (E = (S = e.config) == null ? void 0 : S.metricColumns) == null ? void 0 : E.find((C) => C.id === c.fieldId) : void 0, v = c.kind === "sqlKpiValue" ? Ma(e) : void 0, b = c.kind === "sqlKpiValue" ? (v == null ? void 0 : v.source) === "sql" && v.polarity !== _a ? v.polarity : void 0 : p == null ? void 0 : p.comparisonPolarity, x = p == null ? void 0 : p.semanticComparisonPolarity;
|
|
831
834
|
if (d === null) return b ? null : void 0;
|
|
832
|
-
if (
|
|
835
|
+
if (x && d !== x) {
|
|
833
836
|
i.push(
|
|
834
|
-
|
|
835
|
-
message: `The model says ${s} is ${
|
|
837
|
+
Q("polarity_set_by_model", {
|
|
838
|
+
message: `The model says ${s} is ${x.replace(/_/g, " ")}; a card can't say otherwise.`,
|
|
836
839
|
path: l,
|
|
837
840
|
fix: "Change it in the model, or leave polarity out.",
|
|
838
|
-
allowed: [
|
|
841
|
+
allowed: [x],
|
|
839
842
|
suggestedChange: kt(n, s, o, "polarity")
|
|
840
843
|
})
|
|
841
844
|
);
|
|
842
845
|
return;
|
|
843
846
|
}
|
|
844
|
-
return d === (
|
|
847
|
+
return d === (x ?? b ?? _a) ? void 0 : d;
|
|
845
848
|
}
|
|
846
|
-
function
|
|
849
|
+
function ei(e, a, t, s, o, n, i, d) {
|
|
847
850
|
var h, p, v;
|
|
848
851
|
if (o.hidden === void 0 && o.width === void 0) return {};
|
|
849
|
-
const l =
|
|
852
|
+
const l = xe(i.path, s);
|
|
850
853
|
if (!a.settings.has("columns.hidden") || t.resultKey === void 0) {
|
|
851
854
|
const b = a.pivoted && t.role === "measure";
|
|
852
855
|
return d.push(
|
|
853
|
-
|
|
854
|
-
message: b ? `${s} on ${
|
|
856
|
+
Q("setting_not_for_card", {
|
|
857
|
+
message: b ? `${s} on ${W(e.title)} has a column for each pivot value; hide or size them in the editor.` : `${W(e.title)} has no hidden columns or column widths; those are for tables.`,
|
|
855
858
|
path: `${l}.${o.hidden !== void 0 ? "hidden" : "width"}`,
|
|
856
|
-
allowed: b ? ["label", "format"] : ["label", "format"].filter((
|
|
857
|
-
suggestedChange:
|
|
859
|
+
allowed: b ? ["label", "format"] : ["label", "format"].filter((x) => a.settings.has(`columns.${x}`)),
|
|
860
|
+
suggestedChange: zn(i, s, o)
|
|
858
861
|
})
|
|
859
862
|
), {};
|
|
860
863
|
}
|
|
861
864
|
const c = {};
|
|
862
865
|
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)) {
|
|
863
|
-
const { minSize: b, maxSize:
|
|
864
|
-
o.width !== null && (!Number.isFinite(o.width) || o.width < b || o.width >
|
|
865
|
-
|
|
866
|
-
message: `${s} on ${
|
|
866
|
+
const { minSize: b, maxSize: x } = js((v = (p = (h = e.preferences) == null ? void 0 : h.tablePrefs) == null ? void 0 : p.columnSettingsMap) == null ? void 0 : v[t.resultKey]);
|
|
867
|
+
o.width !== null && (!Number.isFinite(o.width) || o.width < b || o.width > x) ? d.push(
|
|
868
|
+
Q("value_invalid", {
|
|
869
|
+
message: `${s} on ${W(e.title)} can be ${b} to ${x} pixels wide.`,
|
|
867
870
|
path: `${l}.width`,
|
|
868
|
-
fix: `Send a width from ${b} to ${
|
|
871
|
+
fix: `Send a width from ${b} to ${x} pixels, or null for automatic.`
|
|
869
872
|
})
|
|
870
873
|
) : c.width = o.width;
|
|
871
874
|
}
|
|
872
875
|
return c;
|
|
873
876
|
}
|
|
874
|
-
function
|
|
877
|
+
function ti(e, a, t) {
|
|
875
878
|
var E, C, k, y;
|
|
876
879
|
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);
|
|
877
880
|
if (!Object.keys(s).length && !i && !d) return { ok: !0, labels: [], settings: null, warnings: [] };
|
|
@@ -879,11 +882,11 @@ function Zn(e, a, t) {
|
|
|
879
882
|
if (!l)
|
|
880
883
|
return {
|
|
881
884
|
ok: !1,
|
|
882
|
-
problems: [
|
|
885
|
+
problems: [Q("setting_not_for_card", { message: `${W(e.title)} takes no card settings through this tool.`, path: t.path })]
|
|
883
886
|
};
|
|
884
|
-
const c =
|
|
887
|
+
const c = Qn(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 = [], x = [];
|
|
885
888
|
for (const [F, w] of Object.entries(s)) {
|
|
886
|
-
const N = Gs(h, F, { path:
|
|
889
|
+
const N = Gs(h, F, { path: xe(t.path, F), cardTitle: W(e.title) });
|
|
887
890
|
if (!N.ok) {
|
|
888
891
|
n.push(N.problem);
|
|
889
892
|
continue;
|
|
@@ -891,33 +894,33 @@ function Zn(e, a, t) {
|
|
|
891
894
|
const I = N.column;
|
|
892
895
|
if (I.sqlName === "inferred") {
|
|
893
896
|
n.push(
|
|
894
|
-
|
|
895
|
-
message: `${
|
|
896
|
-
path:
|
|
897
|
+
Q("columns_unavailable", {
|
|
898
|
+
message: `${W(e.title)}'s columns weren't read from its query, so ${F} can't be checked.`,
|
|
899
|
+
path: xe(t.path, F),
|
|
897
900
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
898
901
|
})
|
|
899
902
|
);
|
|
900
903
|
continue;
|
|
901
904
|
}
|
|
902
|
-
const _ =
|
|
905
|
+
const _ = Jn(e, l, I, F, w, t, n);
|
|
903
906
|
_ && b.push(_);
|
|
904
|
-
const D =
|
|
907
|
+
const D = ei(e, l, I, F, w, v.columns[I.name], t, n), M = w.format !== void 0 ? Xn(e, l, I, F, w.format, t, n) : void 0, P = Zn(e, l, I, F, w, t, n), G = {
|
|
905
908
|
column: I.ref,
|
|
906
909
|
...D,
|
|
907
910
|
...M !== void 0 ? { format: M } : {},
|
|
908
911
|
...P !== void 0 ? { polarity: P } : {}
|
|
909
912
|
};
|
|
910
|
-
Object.keys(G).length > 1 &&
|
|
913
|
+
Object.keys(G).length > 1 && x.push(G);
|
|
911
914
|
}
|
|
912
915
|
if (n.length) return { ok: !1, problems: n };
|
|
913
|
-
const
|
|
914
|
-
return { ok: !0, labels: b, settings: Object.keys(
|
|
916
|
+
const S = { ...c, ...x.length ? { columns: x } : {}, ...p ? { highlights: p } : {} };
|
|
917
|
+
return { ok: !0, labels: b, settings: Object.keys(S).length ? S : null, warnings: [] };
|
|
915
918
|
}
|
|
916
|
-
function
|
|
919
|
+
function ai(e) {
|
|
917
920
|
const a = Me(e), t = a && a === Me("number") ? ua.number : e === "temporal_bucket" || e === "date" ? ua[e] : void 0;
|
|
918
921
|
return t ? `Send a stored format: ${t}.` : "Send the format in the stored shape the outline shows.";
|
|
919
922
|
}
|
|
920
|
-
function
|
|
923
|
+
function si(e, a, t, s, o) {
|
|
921
924
|
var C, k, y, F, w, N;
|
|
922
925
|
const n = we(e, { sql: !0, calculations: !1 });
|
|
923
926
|
if (!n.editable) return [n.message];
|
|
@@ -942,33 +945,33 @@ function ti(e, a, t, s, o) {
|
|
|
942
945
|
b("dimensions", _(d.dimensions, t), _(i.dimensions, n.matrix)), b("matrix.columns", t == null ? void 0 : t.columns, (C = n.matrix) == null ? void 0 : C.columns);
|
|
943
946
|
} else
|
|
944
947
|
b("dimensions", d.dimensions, i.dimensions);
|
|
945
|
-
const
|
|
946
|
-
|
|
948
|
+
const x = d.timeWindow !== void 0 && !d.timeGrain, S = x && i.timeWindow === void 0 ? void 0 : x && d.dateField === void 0 ? c == null ? void 0 : c.dateField : d.dateField;
|
|
949
|
+
S !== void 0 && (i.dateField === void 0 || v(S) !== v(i.dateField)) && p.push("dateField"), d.timeGrain !== void 0 && d.timeGrain !== i.timeGrain && p.push("timeGrain");
|
|
947
950
|
const E = (k = e.config) != null && k.matrix ? e.config.matrix.spec.measures.map((I) => I.kind === "aggregate" ? { aggregate: I.aggregate } : {}) : ((y = e.config) == null ? void 0 : y.metricColumns) ?? [];
|
|
948
951
|
(d.measures ?? []).forEach((I, _) => {
|
|
949
952
|
const D = I && typeof I == "object" ? I.aggregate : void 0;
|
|
950
953
|
D && Ca(E[_] ?? {}) !== D && p.push(`the aggregate of measures[${_}]`);
|
|
951
954
|
});
|
|
952
955
|
for (const { key: I, label: _ } of Ne(a))
|
|
953
|
-
|
|
956
|
+
Ys(e, I) !== _ && p.push(`the label "${_}"`);
|
|
954
957
|
if (!o || o.aspects.includes("filters")) {
|
|
955
958
|
const I = d.filters ?? [];
|
|
956
959
|
let _ = i.filters ?? [];
|
|
957
960
|
const D = d.timeWindow, M = i.timeWindow, P = (G, B) => {
|
|
958
|
-
const
|
|
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 ||
|
|
961
|
+
const K = (te) => JSON.stringify((te ?? []).map(String));
|
|
962
|
+
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 || K(G.values) === K(B.values));
|
|
960
963
|
};
|
|
961
964
|
if (D && !M) {
|
|
962
965
|
const G = ((c == null ? void 0 : c.filters) ?? []).filter(
|
|
963
|
-
(B) => !(c != null && c.timeWindow) && !I.some((
|
|
966
|
+
(B) => !(c != null && c.timeWindow) && !I.some((K) => P(K, B))
|
|
964
967
|
);
|
|
965
|
-
(!G.length || G.some((B) => !_.some((
|
|
966
|
-
} else D ?
|
|
968
|
+
(!G.length || G.some((B) => !_.some((K) => P(B, K)))) && p.push("timeWindow"), _ = _.filter((B) => !G.some((K) => P(K, B)));
|
|
969
|
+
} else D ? rn(d.timeWindow, i.timeWindow) || p.push("timeWindow") : M && p.push("timeWindow");
|
|
967
970
|
(I.length !== _.length || I.some((G, B) => !P(G, _[B]))) && p.push("filters");
|
|
968
971
|
}
|
|
969
972
|
if (d.orderBy !== void 0) {
|
|
970
|
-
const I = d.orderBy, _ = (w = (F = e.config) == null ? void 0 : F.sortByColumns) == null ? void 0 : w[0], D = _ &&
|
|
971
|
-
(!_ || !D || _.direction !== I.direction || v(I.field) !==
|
|
973
|
+
const I = d.orderBy, _ = (w = (F = e.config) == null ? void 0 : F.sortByColumns) == null ? void 0 : w[0], D = _ && zs(e.config ?? {}, _), M = I.field && typeof I.field == "object" ? I.field.aggregate : void 0;
|
|
974
|
+
(!_ || !D || _.direction !== I.direction || v(I.field) !== Js(D.name, Pa(D)) || M !== void 0 && Ca(D) !== M) && p.push("orderBy");
|
|
972
975
|
}
|
|
973
976
|
return d.limit !== void 0 && ((N = e.config) == null ? void 0 : N.rowLimit) !== d.limit && p.push("limit"), p;
|
|
974
977
|
}
|
|
@@ -985,7 +988,7 @@ function Je(e, a) {
|
|
|
985
988
|
const t = e.variables ?? [];
|
|
986
989
|
return t.find((s) => s.name === a) ?? t.find((s) => s.id === a);
|
|
987
990
|
}
|
|
988
|
-
function
|
|
991
|
+
function oi(e, a, t, s) {
|
|
989
992
|
var i;
|
|
990
993
|
const o = Je(e, a);
|
|
991
994
|
o || s.problem(cs(e, a, t));
|
|
@@ -1017,7 +1020,7 @@ function us(e, a) {
|
|
|
1017
1020
|
...t.places ? { details: { places: t.places } } : {}
|
|
1018
1021
|
}));
|
|
1019
1022
|
}
|
|
1020
|
-
async function
|
|
1023
|
+
async function Sa(e, a, t) {
|
|
1021
1024
|
var y, F;
|
|
1022
1025
|
const { problem: s, need: o, services: n } = t, { path: i, query: d } = e, l = ls(e.get), c = {
|
|
1023
1026
|
id: e.id,
|
|
@@ -1045,7 +1048,7 @@ async function xa(e, a, t) {
|
|
|
1045
1048
|
const p = h.fields;
|
|
1046
1049
|
for (const w of Ba({ ...d, measures: d.measures ?? [] })) s({ ...w, path: `${i}.${w.path}` });
|
|
1047
1050
|
const v = (w, N) => {
|
|
1048
|
-
const I = wt(w), _ =
|
|
1051
|
+
const I = wt(w), _ = ao(w, d.datasetName);
|
|
1049
1052
|
_.toLowerCase() !== d.datasetName.toLowerCase() && s({
|
|
1050
1053
|
code: "field_not_found",
|
|
1051
1054
|
message: `A variable reads one dataset: "${I}" names ${_}, not ${d.datasetName}.`,
|
|
@@ -1060,22 +1063,22 @@ async function xa(e, a, t) {
|
|
|
1060
1063
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1061
1064
|
details: { available: p.slice(0, 20).map((M) => M.name) }
|
|
1062
1065
|
}), D;
|
|
1063
|
-
}, b = d.measures ?? [],
|
|
1066
|
+
}, b = d.measures ?? [], x = d.dimensions ?? [], S = {
|
|
1064
1067
|
...c,
|
|
1065
1068
|
mode: "data",
|
|
1066
1069
|
dataSource: h.dataSource,
|
|
1067
1070
|
connectionId: h.connectionId,
|
|
1068
1071
|
get: "only",
|
|
1069
|
-
...(y = d.filters) != null && y.length ? { conditions: await
|
|
1072
|
+
...(y = d.filters) != null && y.length ? { conditions: await ii(d, n, i, t.refuseAll) } : {}
|
|
1070
1073
|
};
|
|
1071
1074
|
if (l.kind === "aggregate") {
|
|
1072
|
-
(b.length !== 1 ||
|
|
1075
|
+
(b.length !== 1 || x.length) && s({
|
|
1073
1076
|
code: "invalid_change",
|
|
1074
1077
|
message: "An aggregate reads one measure and no dimension.",
|
|
1075
1078
|
path: `${i}.query`,
|
|
1076
1079
|
fix: `Send measures: [{ name, aggregate }] alone; for one field's value use get: "only", "first" or "list" with dimensions: [field].`
|
|
1077
1080
|
}), 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." });
|
|
1078
|
-
const w = v(b[0], `${i}.query.measures[0]`), N = typeof b[0] == "string" ? void 0 : b[0].aggregate, I =
|
|
1081
|
+
const w = v(b[0], `${i}.query.measures[0]`), N = typeof b[0] == "string" ? void 0 : b[0].aggregate, I = Cn(w).filter((M) => $a(M.value)), _ = N ?? (mt(w) ? "calculation" : $n(w));
|
|
1079
1082
|
if (!$a(_) || !I.some((M) => M.value === _)) {
|
|
1080
1083
|
const M = I.map((P) => P.value);
|
|
1081
1084
|
s({
|
|
@@ -1086,16 +1089,16 @@ async function xa(e, a, t) {
|
|
|
1086
1089
|
allowed: M
|
|
1087
1090
|
});
|
|
1088
1091
|
}
|
|
1089
|
-
const D =
|
|
1090
|
-
return k(ze({ ...
|
|
1092
|
+
const D = ni(b[0], { ...S, field: w, get: _ }, `${i}.query.measures[0].comparison`, s);
|
|
1093
|
+
return k(ze({ ...S, field: w, get: _, ...D ? { comparison: D } : {} }, a));
|
|
1091
1094
|
}
|
|
1092
|
-
(
|
|
1095
|
+
(x.length !== 1 || b.length) && s({
|
|
1093
1096
|
code: "invalid_change",
|
|
1094
1097
|
message: `The ${l.kind === "only" ? "only value" : l.kind === "first" ? "first value" : "list"} reads one dimension; a measure's one value is get: "aggregate".`,
|
|
1095
1098
|
path: `${i}.query`,
|
|
1096
1099
|
fix: "Send dimensions: [field] and no measures; order the first value or the list with orderBy."
|
|
1097
1100
|
});
|
|
1098
|
-
const E = v(
|
|
1101
|
+
const E = v(x[0], `${i}.query.dimensions[0]`);
|
|
1099
1102
|
mt(E) && s({
|
|
1100
1103
|
code: "invalid_change",
|
|
1101
1104
|
message: `${E.label || E.name} is an aggregate calculation, so it has one value, not rows.`,
|
|
@@ -1115,7 +1118,7 @@ async function xa(e, a, t) {
|
|
|
1115
1118
|
return k(
|
|
1116
1119
|
ze(
|
|
1117
1120
|
{
|
|
1118
|
-
...
|
|
1121
|
+
...S,
|
|
1119
1122
|
field: E,
|
|
1120
1123
|
get: l.kind,
|
|
1121
1124
|
...C ? { sortField: C } : {},
|
|
@@ -1131,7 +1134,7 @@ async function xa(e, a, t) {
|
|
|
1131
1134
|
return I.length && t.refuseAll(us(I, i)), N;
|
|
1132
1135
|
}
|
|
1133
1136
|
}
|
|
1134
|
-
function
|
|
1137
|
+
function ni(e, a, t, s) {
|
|
1135
1138
|
var n, i;
|
|
1136
1139
|
const o = typeof e == "string" ? void 0 : e.comparison;
|
|
1137
1140
|
if (!(!o || o.kind === "inherit" || o.kind === "off"))
|
|
@@ -1140,14 +1143,14 @@ function si(e, a, t, s) {
|
|
|
1140
1143
|
message: "A variable compares with an earlier period, not a target.",
|
|
1141
1144
|
path: t,
|
|
1142
1145
|
fix: "Send comparison: { kind: 'previous_period' } or { kind: 'previous_year' }; put a target in the words, or on a KPI card."
|
|
1143
|
-
}),
|
|
1146
|
+
}), Sn(a) || s({
|
|
1144
1147
|
code: "invalid_change",
|
|
1145
1148
|
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.`,
|
|
1146
1149
|
path: t,
|
|
1147
1150
|
fix: "Compare a count, or a numeric field's total, average, lowest or highest; leave comparison out here."
|
|
1148
|
-
}),
|
|
1151
|
+
}), so(o);
|
|
1149
1152
|
}
|
|
1150
|
-
async function
|
|
1153
|
+
async function ii(e, a, t, s) {
|
|
1151
1154
|
var n;
|
|
1152
1155
|
const o = await a.compileCardQuery({
|
|
1153
1156
|
query: { domainId: e.domainId, datasetName: e.datasetName, measures: ["__count"], filters: e.filters },
|
|
@@ -1155,8 +1158,8 @@ async function oi(e, a, t, s) {
|
|
|
1155
1158
|
});
|
|
1156
1159
|
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` })));
|
|
1157
1160
|
}
|
|
1158
|
-
function
|
|
1159
|
-
const n = ls(a), i =
|
|
1161
|
+
function ri(e, a, t, s, o) {
|
|
1162
|
+
const n = ls(a), i = wn(e);
|
|
1160
1163
|
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.' });
|
|
1161
1164
|
const d = ze(
|
|
1162
1165
|
{
|
|
@@ -1169,11 +1172,11 @@ function ni(e, a, t, s, o) {
|
|
|
1169
1172
|
);
|
|
1170
1173
|
return { query: d.query, get: d.get };
|
|
1171
1174
|
}
|
|
1172
|
-
function
|
|
1175
|
+
function di(e, a) {
|
|
1173
1176
|
const t = Ha(e).filter(({ ref: i }) => i.source === "data" && i.variableId === a), s = (i) => {
|
|
1174
1177
|
var d;
|
|
1175
1178
|
return `"${((d = (e.sheets ?? []).find((l) => l.id === i)) == null ? void 0 : d.title) ?? i}"`;
|
|
1176
|
-
}, o =
|
|
1179
|
+
}, o = Se(e);
|
|
1177
1180
|
return { words: [
|
|
1178
1181
|
...new Set(
|
|
1179
1182
|
t.map(
|
|
@@ -1185,7 +1188,7 @@ function ii(e, a) {
|
|
|
1185
1188
|
)
|
|
1186
1189
|
].join(", "), places: t };
|
|
1187
1190
|
}
|
|
1188
|
-
function
|
|
1191
|
+
function li(e, a, t, s, o) {
|
|
1189
1192
|
const { problem: n } = o;
|
|
1190
1193
|
(!Xe(t) || !t.document) && n({
|
|
1191
1194
|
code: "invalid_change",
|
|
@@ -1196,30 +1199,30 @@ function ri(e, a, t, s, o) {
|
|
|
1196
1199
|
const i = t.document, d = e.target;
|
|
1197
1200
|
let l, c;
|
|
1198
1201
|
if ("sectionId" in d) {
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1202
|
+
const S = i.sections.find((E) => E.id === d.sectionId);
|
|
1203
|
+
S || n({ code: "invalid_change", message: `No section ${d.sectionId} on "${t.title}".`, path: `${s}.target.sectionId`, fix: "Use a section id from the outline's textSections." }), S.type !== "text" && n({ code: "invalid_change", message: `Section ${d.sectionId} is a ${S.type} section, not text.`, path: `${s}.target.sectionId`, fix: "Name one of the outline's textSections." }), l = S.content, c = S.style;
|
|
1201
1204
|
} else {
|
|
1202
|
-
const { region:
|
|
1203
|
-
Ia[
|
|
1205
|
+
const { region: S, role: E } = d;
|
|
1206
|
+
Ia[S].includes(E) || n({
|
|
1204
1207
|
code: "invalid_change",
|
|
1205
|
-
message: `The ${
|
|
1208
|
+
message: `The ${S} has ${S === "header" ? "a title and a metadata line" : "a note and a page info line"}, not a ${E} line.`,
|
|
1206
1209
|
path: `${s}.target.role`,
|
|
1207
|
-
fix: `Send role: ${Ia[
|
|
1208
|
-
}), e.style !== void 0 && !
|
|
1210
|
+
fix: `Send role: ${Ia[S].map((k) => `"${k}"`).join(" or ")}.`
|
|
1211
|
+
}), e.style !== void 0 && !Xs(E) && n({
|
|
1209
1212
|
code: "invalid_change",
|
|
1210
1213
|
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.`,
|
|
1211
1214
|
path: `${s}.style`,
|
|
1212
1215
|
fix: "Leave style out for a footer line."
|
|
1213
1216
|
});
|
|
1214
|
-
const C = i[
|
|
1217
|
+
const C = i[S] ? Zo(i[S].blocks, E) : void 0;
|
|
1215
1218
|
l = (C == null ? void 0 : C.content) ?? [], c = C == null ? void 0 : C.style;
|
|
1216
1219
|
}
|
|
1217
|
-
const h = e.style !== void 0 ?
|
|
1220
|
+
const h = e.style !== void 0 ? Zs(e.style) : void 0, p = !h || Object.entries(h).every(([S, E]) => (c == null ? void 0 : c[S]) === E);
|
|
1218
1221
|
let v;
|
|
1219
1222
|
if (e.text !== void 0) {
|
|
1220
|
-
const
|
|
1221
|
-
if (JSON.stringify(
|
|
1222
|
-
const k =
|
|
1223
|
+
const S = { kind: "document", sheetId: t.id }, E = { catalog: $t({ dashboard: a, place: S }), inputs: a.inputs, variables: a.variables }, C = JSON.stringify(Ze(l, E));
|
|
1224
|
+
if (JSON.stringify(eo(e.text)) !== C) {
|
|
1225
|
+
const k = to(e.text, l, { dashboard: a, place: S, path: `${s}.text`, links: !0 });
|
|
1223
1226
|
k.ok || o.refuseAll(k.problems);
|
|
1224
1227
|
const y = k.content;
|
|
1225
1228
|
JSON.stringify(Ze(y, E)) !== C && (v = y);
|
|
@@ -1231,7 +1234,7 @@ function ri(e, a, t, s, o) {
|
|
|
1231
1234
|
};
|
|
1232
1235
|
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 };
|
|
1233
1236
|
}
|
|
1234
|
-
const
|
|
1237
|
+
const ci = {
|
|
1235
1238
|
matrix: "A Matrix",
|
|
1236
1239
|
pie: "A pie chart",
|
|
1237
1240
|
detail_table: "A detail table",
|
|
@@ -1239,10 +1242,10 @@ const di = {
|
|
|
1239
1242
|
};
|
|
1240
1243
|
class me extends Error {
|
|
1241
1244
|
}
|
|
1242
|
-
const
|
|
1245
|
+
const xa = "A text card takes title, description and text.", vt = (e) => e.cards.some((a) => {
|
|
1243
1246
|
var t, s;
|
|
1244
1247
|
return ((t = a.customCardPreferences) == null ? void 0 : t.visualType) === "multiple" || !!((s = a.customCardPreferences) != null && s.dataInputCardIds);
|
|
1245
|
-
}), Rt = (e) => (e ?? "").trim().toLowerCase(), at =
|
|
1248
|
+
}), Rt = (e) => (e ?? "").trim().toLowerCase(), at = co, ka = { measures: ho, records: mo, sql: fo }, Ue = {
|
|
1246
1249
|
measures: "a measures query (measures, with optional dimensions)",
|
|
1247
1250
|
records: "a records query (columns)",
|
|
1248
1251
|
sql: "a SQL query"
|
|
@@ -1250,14 +1253,14 @@ const Sa = "A text card takes title, description and text.", vt = (e) => e.cards
|
|
|
1250
1253
|
function fs(e, a) {
|
|
1251
1254
|
return a.path.reduce((t, s) => typeof s == "number" ? `${t}[${s}]` : `${t}.${s}`, e);
|
|
1252
1255
|
}
|
|
1253
|
-
const
|
|
1254
|
-
async function
|
|
1255
|
-
return ms(e, a, t, { limit:
|
|
1256
|
+
const ui = { max: To, what: "A proposal", fix: "Split the changes into several proposals." };
|
|
1257
|
+
async function Gr(e, a, t) {
|
|
1258
|
+
return ms(e, a, t, { limit: ui });
|
|
1256
1259
|
}
|
|
1257
1260
|
async function ms(e, a, t, s) {
|
|
1258
1261
|
var Qt, Ht, Yt, zt, Jt, Xt, Zt, ea, ta, aa, sa, oa, na, ia, ra, da;
|
|
1259
1262
|
const o = [], n = [], i = [], d = [], l = /* @__PURE__ */ new Set(), c = [], h = /* @__PURE__ */ new Map(), p = { calendar: t.calendar }, v = t.relationshipReach ? { relationshipReach: t.relationshipReach } : {};
|
|
1260
|
-
let b = e,
|
|
1263
|
+
let b = e, x, S = 0, E = 0;
|
|
1261
1264
|
const { limit: C } = s;
|
|
1262
1265
|
if (a.length > C.max)
|
|
1263
1266
|
return {
|
|
@@ -1273,13 +1276,13 @@ async function ms(e, a, t, s) {
|
|
|
1273
1276
|
};
|
|
1274
1277
|
const k = [];
|
|
1275
1278
|
if (a.forEach((m, r) => {
|
|
1276
|
-
const f =
|
|
1279
|
+
const f = oo.safeParse(m);
|
|
1277
1280
|
if (f.success) {
|
|
1278
1281
|
k.push(f.data);
|
|
1279
1282
|
return;
|
|
1280
1283
|
}
|
|
1281
1284
|
for (const u of f.error.issues) {
|
|
1282
|
-
const g =
|
|
1285
|
+
const g = dn(u.message);
|
|
1283
1286
|
o.push({
|
|
1284
1287
|
code: "invalid_change",
|
|
1285
1288
|
message: (g == null ? void 0 : g.message) ?? u.message,
|
|
@@ -1298,35 +1301,35 @@ async function ms(e, a, t, s) {
|
|
|
1298
1301
|
fix: "Use a measures or records query (a semantic dataset for a variable), or ask an administrator for SQL access."
|
|
1299
1302
|
}), l.add("sql");
|
|
1300
1303
|
}, w = (m, r) => {
|
|
1301
|
-
const f =
|
|
1304
|
+
const f = xt(b, [m], p);
|
|
1302
1305
|
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 } : {} });
|
|
1303
1306
|
}, N = async (m) => {
|
|
1304
|
-
var
|
|
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(([
|
|
1307
|
+
var X, j, ie, fe, Ae, Ie;
|
|
1308
|
+
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(([z, Z]) => z !== "columns" && Z !== void 0), A = !!((X = $ == null ? void 0 : $.add) != null && X.length);
|
|
1306
1309
|
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((
|
|
1310
|
+
const T = re(b, r).card, L = Object.values(O ?? {}).some((z) => z.label === null), q = Object.values(O ?? {}).some((z) => z.format !== void 0 && z.format !== null), V = {};
|
|
1308
1311
|
if (L && !((ie = T.sql) != null && ie.trim()))
|
|
1309
|
-
for (const
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1312
|
+
for (const z of Vn(T)) {
|
|
1313
|
+
const Z = await t.loadCardSource(z);
|
|
1314
|
+
Z && (V[Pt(z)] = Z.fields);
|
|
1312
1315
|
}
|
|
1313
|
-
let
|
|
1316
|
+
let U;
|
|
1314
1317
|
if (q && !((fe = T.sql) != null && fe.trim())) {
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1318
|
+
const z = t.readModelFormats ? await t.readModelFormats({ card: T }) : null;
|
|
1319
|
+
U = z ? { status: "read", formats: z } : { status: "unavailable" };
|
|
1317
1320
|
}
|
|
1318
|
-
const
|
|
1319
|
-
let
|
|
1320
|
-
if ((O || A ||
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1321
|
+
const J = !!((Ae = g.columnOrder) != null && Ae.length);
|
|
1322
|
+
let Y;
|
|
1323
|
+
if ((O || A || J) && ((Ie = T.sql) != null && Ie.trim()) && T.type !== "kpi") {
|
|
1324
|
+
const z = t.readSqlResultColumns ? await t.readSqlResultColumns({ cardId: r, dashboard: b }) : null;
|
|
1325
|
+
z || y({
|
|
1323
1326
|
code: "columns_unavailable",
|
|
1324
|
-
message: O ||
|
|
1325
|
-
path: O ? `${u}.columns` :
|
|
1327
|
+
message: O || J ? `"${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.`,
|
|
1328
|
+
path: O ? `${u}.columns` : J ? `${u}.columnOrder` : `${u}.column`,
|
|
1326
1329
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
1327
|
-
}),
|
|
1330
|
+
}), Y = z;
|
|
1328
1331
|
}
|
|
1329
|
-
const
|
|
1332
|
+
const H = ti(
|
|
1330
1333
|
T,
|
|
1331
1334
|
{
|
|
1332
1335
|
settings: { ...g, ...O ? { columns: O } : { columns: void 0 } },
|
|
@@ -1337,22 +1340,22 @@ async function ms(e, a, t, s) {
|
|
|
1337
1340
|
cardRef: m.cardRef,
|
|
1338
1341
|
catalogs: V,
|
|
1339
1342
|
newId: t.newId,
|
|
1340
|
-
...
|
|
1341
|
-
...
|
|
1343
|
+
...U ? { modelFormats: U } : {},
|
|
1344
|
+
...Y ? { sqlResultColumns: Y } : {}
|
|
1342
1345
|
}
|
|
1343
1346
|
);
|
|
1344
|
-
if (!
|
|
1345
|
-
throw o.push(...
|
|
1346
|
-
for (const
|
|
1347
|
-
const
|
|
1348
|
-
|
|
1347
|
+
if (!H.ok)
|
|
1348
|
+
throw o.push(...H.problems), new me();
|
|
1349
|
+
for (const z of H.labels) {
|
|
1350
|
+
const Z = m.queryLabels.find((ce) => Ye(ce.key, z.key) && ce.label !== z.label);
|
|
1351
|
+
Z && y({
|
|
1349
1352
|
code: "value_invalid",
|
|
1350
|
-
message: `Two labels are stated for one column of "${T.title || "Untitled"}": "${
|
|
1353
|
+
message: `Two labels are stated for one column of "${T.title || "Untitled"}": "${Z.label}" in the query and "${z.label}" in columns.`,
|
|
1351
1354
|
path: `${u}.columns`,
|
|
1352
1355
|
fix: "State the label once."
|
|
1353
1356
|
});
|
|
1354
1357
|
}
|
|
1355
|
-
return n.push(...
|
|
1358
|
+
return n.push(...H.warnings), H.labels.length && ga(T, H.labels).changed.length && w({ op: "card.update", cardId: r, update: { kind: "relabel", labels: H.labels }, changeIndex: f }, `${u}.columns`), H.settings && w({ op: "card.update", cardId: r, update: { kind: "settings", settings: H.settings }, changeIndex: f }, O ? `${u}.columns` : u), H.settings;
|
|
1356
1359
|
}, I = (m, r) => {
|
|
1357
1360
|
var g;
|
|
1358
1361
|
const f = re(b, m);
|
|
@@ -1389,7 +1392,7 @@ async function ms(e, a, t, s) {
|
|
|
1389
1392
|
{ op: "card.update", cardId: m.cardId, update: { kind: "calculations", calculations: $.update }, changeIndex: m.index },
|
|
1390
1393
|
`${m.path}.query`
|
|
1391
1394
|
), !0) : !1;
|
|
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])),
|
|
1395
|
+
}, 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])), K = (m, r, f, u) => {
|
|
1393
1396
|
const { card: g } = r, $ = [...m.type ? ["type"] : [], ...m.query ? ["query"] : [], ...m.matrix ? ["matrix"] : [], ...G(m)];
|
|
1394
1397
|
$.length && y({
|
|
1395
1398
|
code: "invalid_change",
|
|
@@ -1443,7 +1446,7 @@ async function ms(e, a, t, s) {
|
|
|
1443
1446
|
fix: "Define the handle with an earlier card.add, or use the card id from the outline."
|
|
1444
1447
|
}), f.id;
|
|
1445
1448
|
}
|
|
1446
|
-
return
|
|
1449
|
+
return Se(b).some((f) => f.cardId === m) || y({
|
|
1447
1450
|
code: "card_not_found",
|
|
1448
1451
|
message: `There's no card ${m} on this dashboard.`,
|
|
1449
1452
|
path: r,
|
|
@@ -1525,18 +1528,18 @@ async function ms(e, a, t, s) {
|
|
|
1525
1528
|
fix: "Send matrix: { columns: [...] } naming dimensions or the date field of the query (an empty list puts nothing across the top)."
|
|
1526
1529
|
}), !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") {
|
|
1527
1530
|
const A = r, T = A.datasetName, L = [...A.dimensions ?? [], ...A.timeGrain && A.dateField ? [A.dateField] : []];
|
|
1528
|
-
L.length && f.columns.length >= L.length && L.every((V) => f.columns.some((
|
|
1531
|
+
L.length && f.columns.length >= L.length && L.every((V) => f.columns.some((U) => ge(U, T) === ge(V, T))) && y({
|
|
1529
1532
|
code: "type_not_supported",
|
|
1530
1533
|
message: "A Matrix needs at least one field down the side.",
|
|
1531
1534
|
path: `${u}.matrix.columns`,
|
|
1532
1535
|
fix: "Leave one dimension or the date field out of matrix.columns."
|
|
1533
1536
|
});
|
|
1534
1537
|
const q = new Set([...A.dimensions ?? [], ...A.dateField ? [A.dateField] : []].map((V) => ge(V, T)));
|
|
1535
|
-
f.columns.forEach((V,
|
|
1538
|
+
f.columns.forEach((V, U) => {
|
|
1536
1539
|
q.has(ge(V, T)) || y({
|
|
1537
1540
|
code: "type_not_supported",
|
|
1538
1541
|
message: `"${wt(V)}" isn't one of the query's dimensions or its date field.`,
|
|
1539
|
-
path: `${u}.matrix.columns[${
|
|
1542
|
+
path: `${u}.matrix.columns[${U}]`,
|
|
1540
1543
|
fix: "Name dimensions or the date field of the query in matrix.columns."
|
|
1541
1544
|
});
|
|
1542
1545
|
});
|
|
@@ -1548,7 +1551,7 @@ async function ms(e, a, t, s) {
|
|
|
1548
1551
|
fix: m.code === "query_not_kept" ? "Tell the user to make this change in the editor." : "Read the outline again and propose again.",
|
|
1549
1552
|
details: { reason: "not_expressible", ..."parts" in m ? { parts: m.parts } : {} }
|
|
1550
1553
|
}), Wt = (m, r, f, u, g, $, O) => {
|
|
1551
|
-
const R =
|
|
1554
|
+
const R = si(m, r, f, $, O);
|
|
1552
1555
|
if (!R.length) return;
|
|
1553
1556
|
const A = r;
|
|
1554
1557
|
if (R.length === 1 && R[0] === "dateField" && A.dateField && !A.timeGrain && !A.timeWindow) {
|
|
@@ -1572,7 +1575,7 @@ async function ms(e, a, t, s) {
|
|
|
1572
1575
|
const $ = ft(m);
|
|
1573
1576
|
if ("sql" in r)
|
|
1574
1577
|
return F(`${u}.query`), { type: $, source: { kind: "sql", connectionId: r.connectionId, sql: r.sql } };
|
|
1575
|
-
"measures" in r && r.timeGrain ===
|
|
1578
|
+
"measures" in r && r.timeGrain === go && (bo({ cardType: $, configBacked: !0, shelf: "groupBy", dataType: "date" }).ok || y(
|
|
1576
1579
|
m === "kpi" ? {
|
|
1577
1580
|
code: "type_not_supported",
|
|
1578
1581
|
message: "A KPI's query can't group by a grain that follows the dashboard date.",
|
|
@@ -1580,7 +1583,7 @@ async function ms(e, a, t, s) {
|
|
|
1580
1583
|
fix: 'For a trend that follows the dashboard date, send trend: true and trendGrain: "automatic" with no Trend By.'
|
|
1581
1584
|
} : {
|
|
1582
1585
|
code: "type_not_supported",
|
|
1583
|
-
message: `${
|
|
1586
|
+
message: `${ci[m] ?? `A ${m.replace(/_/g, " ")}`} can't group by a grain that follows the dashboard date.`,
|
|
1584
1587
|
path: `${u}.query.timeGrain`,
|
|
1585
1588
|
fix: 'Use a bar, line or area chart or a table, or send a fixed timeGrain such as "month".'
|
|
1586
1589
|
}
|
|
@@ -1589,20 +1592,20 @@ async function ms(e, a, t, s) {
|
|
|
1589
1592
|
if (!R.ok)
|
|
1590
1593
|
throw o.push(...R.problems.map((q) => ({ ...q, path: q.path ? `${u}.query.${q.path}` : `${u}.query` }))), new me();
|
|
1591
1594
|
n.push(...R.warnings.map((q) => ({ ...q, path: q.path ?? `${u}.query` })));
|
|
1592
|
-
const A = !g && "timeWindow" in r && r.timeWindow ?
|
|
1593
|
-
A && "timeWindow" in r && r.timeWindow && ps(r.timeWindow, { use: "cardFilter", columnHasTime:
|
|
1595
|
+
const A = !g && "timeWindow" in r && r.timeWindow ? _i(R.part.config) : void 0;
|
|
1596
|
+
A && "timeWindow" in r && r.timeWindow && ps(r.timeWindow, { use: "cardFilter", columnHasTime: yo(A) }, `${u}.query.timeWindow`, y);
|
|
1594
1597
|
let T = { ...R.part, type: $ };
|
|
1595
1598
|
const L = T.config ?? {};
|
|
1596
1599
|
if ($ === "detailTable") {
|
|
1597
|
-
const q =
|
|
1598
|
-
T = { ...T, config:
|
|
1600
|
+
const q = vo(_o("table", "detailTable", L)) ?? {};
|
|
1601
|
+
T = { ...T, config: mi(q) };
|
|
1599
1602
|
}
|
|
1600
|
-
return $ === "matrixTable" && (T = await _s(T, L, r, f, u)),
|
|
1603
|
+
return $ === "matrixTable" && (T = await _s(T, L, r, f, u)), hi(T, Ne(r));
|
|
1601
1604
|
}, _s = async (m, r, f, u, g) => {
|
|
1602
1605
|
var q;
|
|
1603
1606
|
const $ = await t.loadCardSource({ domainId: f.domainId, datasetName: f.datasetName });
|
|
1604
1607
|
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();
|
|
1605
|
-
const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, R =
|
|
1608
|
+
const O = { id: "scratch", title: "", type: "table", dataSource: m.source.dataSource, config: r }, R = Co(O, "matrixTable", { catalog: $.fields, createId: t.newId }), A = R.status === "changed" ? (q = R.card.config) == null ? void 0 : q.matrix : void 0;
|
|
1606
1609
|
(R.status !== "changed" || R.leftOut.length || !A) && y({
|
|
1607
1610
|
code: "type_not_supported",
|
|
1608
1611
|
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.",
|
|
@@ -1611,11 +1614,11 @@ async function ms(e, a, t, s) {
|
|
|
1611
1614
|
});
|
|
1612
1615
|
let T = A;
|
|
1613
1616
|
const L = f.datasetName;
|
|
1614
|
-
for (const [V,
|
|
1615
|
-
const
|
|
1616
|
-
(
|
|
1617
|
+
for (const [V, U] of u.columns.entries()) {
|
|
1618
|
+
const J = [...T.spec.rows, ...T.spec.columns].find(
|
|
1619
|
+
(Y) => $o(Y.field) === ge(U, L)
|
|
1617
1620
|
);
|
|
1618
|
-
|
|
1621
|
+
J || y({ code: "type_not_supported", message: `"${wt(U)}" 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 = wo(T, So(T.spec, J.id, "columns")).config;
|
|
1619
1622
|
}
|
|
1620
1623
|
return { ...m, config: { matrix: T } };
|
|
1621
1624
|
}, dt = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ new Map();
|
|
@@ -1625,8 +1628,8 @@ async function ms(e, a, t, s) {
|
|
|
1625
1628
|
switch (r.op) {
|
|
1626
1629
|
case "card.add": {
|
|
1627
1630
|
const u = r.position && typeof r.position == "object" ? (() => {
|
|
1628
|
-
const
|
|
1629
|
-
(ie) => ie.cardId ===
|
|
1631
|
+
const X = te(r.position.after, `${f}.position.after`), j = Se(b).find(
|
|
1632
|
+
(ie) => ie.cardId === X && ie.kind === "frameCard"
|
|
1630
1633
|
);
|
|
1631
1634
|
return !j || j.kind !== "frameCard" ? y({
|
|
1632
1635
|
code: "card_not_found",
|
|
@@ -1640,24 +1643,24 @@ async function ms(e, a, t, s) {
|
|
|
1640
1643
|
fix: "Leave out sheetId, or name the card's sheet."
|
|
1641
1644
|
}), { sheetId: j.sheetId, frameId: j.frameId });
|
|
1642
1645
|
})() : void 0, g = u ? Re(u.sheetId, `${f}.position.after`) : r.sheetId ? Re(r.sheetId, `${f}.sheetId`) : (() => {
|
|
1643
|
-
const
|
|
1644
|
-
return
|
|
1645
|
-
code:
|
|
1646
|
-
message:
|
|
1646
|
+
const X = it();
|
|
1647
|
+
return X.length !== 1 && y({
|
|
1648
|
+
code: X.length ? "sheet_required" : "sheet_not_a_grid",
|
|
1649
|
+
message: X.length ? "This dashboard has several grid sheets; say which one gets the card." : "This dashboard has no grid sheet to add a card to.",
|
|
1647
1650
|
path: `${f}.sheetId`,
|
|
1648
|
-
fix:
|
|
1651
|
+
fix: X.length ? "Send sheetId: one of details.sheets." : "Add a sheet with sheet.add earlier in this list.",
|
|
1649
1652
|
details: { sheets: Ve() }
|
|
1650
|
-
}),
|
|
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 = (
|
|
1652
|
-
const j = r.handle ?? `$card_${++
|
|
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:
|
|
1653
|
+
}), X[0];
|
|
1654
|
+
})(), $ = u ? { after: u.frameId } : typeof r.position == "string" ? r.position : void 0, O = $ || r.width ? { ...$ ? { position: $ } : {}, ...r.width ? { width: r.width } : {} } : void 0, R = (X) => {
|
|
1655
|
+
const j = r.handle ?? `$card_${++S}`;
|
|
1656
|
+
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: X.id, title: r.title }), d.push({ ref: j, kind: "card", id: X.id, title: r.title, changeIndex: m }), j;
|
|
1654
1657
|
};
|
|
1655
1658
|
if (r.type === "text") {
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1659
|
+
const X = [...r.query ? ["query"] : [], ...r.matrix ? ["matrix"] : [], ...G(r)];
|
|
1660
|
+
X.length && y({ code: "invalid_change", message: `A text card takes no ${et(X)}.`, path: f, fix: xa }), r.text === void 0 && y({ code: "invalid_change", message: "A text card needs its words in text.", path: `${f}.text`, fix: xa });
|
|
1658
1661
|
const j = ba({ text: r.text, context: { dashboard: b, place: { kind: "sheet", sheetId: g.id } }, path: `${f}.text` });
|
|
1659
1662
|
j.ok || B(j.problems);
|
|
1660
|
-
const ie =
|
|
1663
|
+
const ie = tn({
|
|
1661
1664
|
id: t.newId(),
|
|
1662
1665
|
title: r.title,
|
|
1663
1666
|
...r.description ? { description: r.description } : {},
|
|
@@ -1675,18 +1678,18 @@ async function ms(e, a, t, s) {
|
|
|
1675
1678
|
const A = _t(r.query), T = A.query, L = r.type;
|
|
1676
1679
|
jt(L, T, r.matrix, f);
|
|
1677
1680
|
const q = await Ut(L, T, r.matrix, f), V = {
|
|
1678
|
-
...
|
|
1681
|
+
...an({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
|
|
1679
1682
|
type: q.type
|
|
1680
|
-
},
|
|
1681
|
-
|
|
1682
|
-
const
|
|
1683
|
-
Wt(
|
|
1684
|
-
const
|
|
1685
|
-
w({ op: "card.add", sheetId: g.id, frame:
|
|
1686
|
-
const
|
|
1687
|
-
c.push(
|
|
1688
|
-
cardId:
|
|
1689
|
-
cardRef:
|
|
1683
|
+
}, U = pa(V, q);
|
|
1684
|
+
U.ok || y({ code: "invalid_change", message: U.message, path: f });
|
|
1685
|
+
const J = U.ok ? U.card : V;
|
|
1686
|
+
Wt(J, T, r.matrix, f, r.title, q);
|
|
1687
|
+
const Y = { id: t.newId(), cards: [J], activeCardId: J.id };
|
|
1688
|
+
w({ op: "card.add", sheetId: g.id, frame: Y, ...O ? { placement: O } : {}, changeIndex: m }, f);
|
|
1689
|
+
const H = R(J);
|
|
1690
|
+
c.push(J.id), await M({ cardId: J.id, cardRef: H, stated: A.calculations, index: m, path: f }), await N({
|
|
1691
|
+
cardId: J.id,
|
|
1692
|
+
cardRef: H,
|
|
1690
1693
|
request: { settings: P(r) },
|
|
1691
1694
|
queryLabels: "sql" in T ? [] : Ne(T),
|
|
1692
1695
|
index: m,
|
|
@@ -1697,7 +1700,7 @@ async function ms(e, a, t, s) {
|
|
|
1697
1700
|
case "card.update": {
|
|
1698
1701
|
const u = te(r.cardId, `${f}.cardId`), g = re(b, u);
|
|
1699
1702
|
if ((g == null ? void 0 : g.card.type) === "text") {
|
|
1700
|
-
|
|
1703
|
+
K(r, g, m, f);
|
|
1701
1704
|
break;
|
|
1702
1705
|
}
|
|
1703
1706
|
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." });
|
|
@@ -1705,51 +1708,51 @@ async function ms(e, a, t, s) {
|
|
|
1705
1708
|
let R = !1, A = [];
|
|
1706
1709
|
const T = r.type && r.type !== ((Qt = qe($)) == null ? void 0 : Qt.type) ? ft(r.type) : void 0;
|
|
1707
1710
|
if (T && T !== $.type) {
|
|
1708
|
-
const q = O.editable ? O.source : void 0, V =
|
|
1709
|
-
...
|
|
1710
|
-
...V && !
|
|
1711
|
+
const q = O.editable ? O.source : void 0, V = no($, T), U = V && q && q.kind === "semantic" ? (Ht = await t.loadCardSource({ domainId: q.domainId, datasetName: q.datasetName })) == null ? void 0 : Ht.fields : void 0, J = [], Y = io($, T, {
|
|
1712
|
+
...U ? { catalog: U } : {},
|
|
1713
|
+
...V && !U ? { catalogLoading: !0 } : {},
|
|
1711
1714
|
createId: () => {
|
|
1712
|
-
const
|
|
1713
|
-
return
|
|
1715
|
+
const H = t.newId();
|
|
1716
|
+
return J.push(H), H;
|
|
1714
1717
|
}
|
|
1715
1718
|
});
|
|
1716
|
-
if (
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1719
|
+
if (Y.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." }), Y.status === "changed") {
|
|
1720
|
+
const H = [...Y.leftOut, ...Y.droppedPreferences];
|
|
1721
|
+
H.length && n.push({
|
|
1719
1722
|
code: "type_change_drops",
|
|
1720
|
-
message: `Changing "${$.title}" to ${r.type.replace(/_/g, " ")} leaves out ${
|
|
1723
|
+
message: `Changing "${$.title}" to ${r.type.replace(/_/g, " ")} leaves out ${H.join(", ")}.`,
|
|
1721
1724
|
path: `${f}.type`,
|
|
1722
|
-
details: { dropped:
|
|
1725
|
+
details: { dropped: H }
|
|
1723
1726
|
}), w(
|
|
1724
|
-
{ op: "card.update", cardId: u, update: { kind: "retype", type: T, ...
|
|
1727
|
+
{ op: "card.update", cardId: u, update: { kind: "retype", type: T, ...U ? { catalog: U } : {}, newIds: J }, changeIndex: m },
|
|
1725
1728
|
`${f}.type`
|
|
1726
1729
|
), R = !0;
|
|
1727
1730
|
}
|
|
1728
1731
|
}
|
|
1729
1732
|
const L = r.query ? _t(r.query) : void 0;
|
|
1730
1733
|
if (r.query || r.matrix) {
|
|
1731
|
-
const q = re(b, u).card, V = we(q, { sql: !0, calculations: !1 }),
|
|
1732
|
-
if (
|
|
1734
|
+
const q = re(b, u).card, V = we(q, { sql: !0, calculations: !1 }), U = V.editable ? _t(V.query).query : void 0, J = U, Y = yi(J, (L == null ? void 0 : L.query) ?? {}, `${f}.query`, (Z) => {
|
|
1735
|
+
if (Z.code === "query_form_mismatch" && (L != null && L.calculations.length)) {
|
|
1733
1736
|
const ce = D(q, L.calculations, f), Ce = ma({ card: q, stated: ce, context: { path: f, cardRef: r.cardId, dates: Ta(q) } });
|
|
1734
1737
|
if (!Ce.ok)
|
|
1735
1738
|
throw o.push(...Ce.problems), new me();
|
|
1736
1739
|
}
|
|
1737
|
-
return y(
|
|
1740
|
+
return y(Z);
|
|
1738
1741
|
});
|
|
1739
|
-
A =
|
|
1740
|
-
const
|
|
1741
|
-
jt(
|
|
1742
|
-
const j = V.editable &&
|
|
1742
|
+
A = bi((L == null ? void 0 : L.query) ?? {}, Y);
|
|
1743
|
+
const H = ((Yt = qe(q)) == null ? void 0 : Yt.type) ?? St(q.type), X = r.matrix ?? (V.editable ? V.matrix : void 0);
|
|
1744
|
+
jt(H, Y, X, f);
|
|
1745
|
+
const j = V.editable && U ? ro(U, Y, V.matrix, X) : void 0, ie = !j || j.aspects.length > 0, fe = j && !("sql" in Y) ? Ne(Y).filter((Z) => !ha(j, Z.key.role)) : [], Ae = lo(q, j, fe.map((Z) => Z.key.role));
|
|
1743
1746
|
Ae && Kt(Ae, f);
|
|
1744
|
-
let Ie =
|
|
1745
|
-
if (j && !("sql" in
|
|
1746
|
-
const { orderBy:
|
|
1747
|
+
let Ie = Y;
|
|
1748
|
+
if (j && !("sql" in Y) && Y.orderBy && !j.aspects.includes("order") && ["metric", "group_by", "detail"].some((Z) => ha(j, Z))) {
|
|
1749
|
+
const { orderBy: Z, ...ce } = Y;
|
|
1747
1750
|
Ie = ce;
|
|
1748
1751
|
}
|
|
1749
|
-
let
|
|
1752
|
+
let z;
|
|
1750
1753
|
if (ie) {
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1754
|
+
const Z = !!(J && hs(J, (L == null ? void 0 : L.query) ?? {}) && (j != null && j.keptWindow)), ce = await Ut(H, Ie, X, f, Z), Ce = ce.type === ft(H) ? { ...ce, type: q.type } : ce;
|
|
1755
|
+
z = Ce;
|
|
1753
1756
|
const la = j ? { ...Ce, change: j } : Ce, pe = pa(q, la);
|
|
1754
1757
|
if (pe.ok || Kt(pe, f), pe.ok && pe.droppedBindings.length && n.push({
|
|
1755
1758
|
code: "control_binding_dropped",
|
|
@@ -1768,7 +1771,7 @@ async function ms(e, a, t, s) {
|
|
|
1768
1771
|
});
|
|
1769
1772
|
w({ op: "card.update", cardId: u, update: { kind: "requery", query: la }, changeIndex: m }, `${f}.query`), R = !0;
|
|
1770
1773
|
}
|
|
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,
|
|
1774
|
+
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, X, f, q.title ?? "", z, j);
|
|
1772
1775
|
}
|
|
1773
1776
|
(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(
|
|
1774
1777
|
{
|
|
@@ -1813,7 +1816,7 @@ async function ms(e, a, t, s) {
|
|
|
1813
1816
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1814
1817
|
details: { available: u.fields.slice(0, 20).map((L) => L.name) }
|
|
1815
1818
|
});
|
|
1816
|
-
const $ = r.sheetIds ? Gt(r.sheetIds, f) : void 0, O = Ra($), R =
|
|
1819
|
+
const $ = r.sheetIds ? Gt(r.sheetIds, f) : void 0, O = Ra($), R = en({
|
|
1817
1820
|
field: g,
|
|
1818
1821
|
dataSource: u.dataSource,
|
|
1819
1822
|
connectionId: u.connectionId,
|
|
@@ -1853,7 +1856,7 @@ async function ms(e, a, t, s) {
|
|
|
1853
1856
|
...r.selection !== void 0 || R ? { definition: O } : {},
|
|
1854
1857
|
// A change of sheets states the sheets; what else the scope says (the cards it leaves out,
|
|
1855
1858
|
// whether it covers Document sheets) stays.
|
|
1856
|
-
...A ? { scope:
|
|
1859
|
+
...A ? { scope: Ko(
|
|
1857
1860
|
$.scope,
|
|
1858
1861
|
Ra(A === "all" ? void 0 : A),
|
|
1859
1862
|
new Set([...Et(b).values()].filter((L) => L.sheetKind === "document").map((L) => L.sheetId))
|
|
@@ -1876,7 +1879,7 @@ async function ms(e, a, t, s) {
|
|
|
1876
1879
|
path: `${f}.filterId`,
|
|
1877
1880
|
fix: "Tell the user to change it in the editor; removing or excluding it works."
|
|
1878
1881
|
});
|
|
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
|
|
1882
|
+
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 Ii(O, r.field, t, `${f}.field`, y, A ? g.label : void 0);
|
|
1880
1883
|
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 });
|
|
1881
1884
|
break;
|
|
1882
1885
|
}
|
|
@@ -1895,7 +1898,7 @@ async function ms(e, a, t, s) {
|
|
|
1895
1898
|
break;
|
|
1896
1899
|
}
|
|
1897
1900
|
case "layout.tabs": {
|
|
1898
|
-
const u = r.cardIds.map((q, V) => te(q, `${f}.cardIds[${V}]`)), g = (q, V,
|
|
1901
|
+
const u = r.cardIds.map((q, V) => te(q, `${f}.cardIds[${V}]`)), g = (q, V, U = `${f}.cardIds`) => y({ code: "layout_invalid", message: q, path: U, fix: V });
|
|
1899
1902
|
new Set(u).size !== u.length && g("Each card is named once in tabs.", "Name two or more different cards, each once.");
|
|
1900
1903
|
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
1904
|
$.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.");
|
|
@@ -1973,8 +1976,8 @@ async function ms(e, a, t, s) {
|
|
|
1973
1976
|
}
|
|
1974
1977
|
case "dashboard.style": {
|
|
1975
1978
|
const { op: u, ...g } = r;
|
|
1976
|
-
|
|
1977
|
-
const { style: $, organizationAppearance: O } = za(b, await
|
|
1979
|
+
x ?? (x = t.readOrganizationAppearance ? t.readOrganizationAppearance() : Promise.resolve(null));
|
|
1980
|
+
const { style: $, organizationAppearance: O } = za(b, await x), R = hn({ style: $, edit: g, layers: { organizationAppearance: O } });
|
|
1978
1981
|
if (R.ok)
|
|
1979
1982
|
R.sentences.length && w({ op: "dashboard.style", style: R.style, sentences: R.sentences, changeIndex: m }, f);
|
|
1980
1983
|
else {
|
|
@@ -1985,7 +1988,7 @@ async function ms(e, a, t, s) {
|
|
|
1985
1988
|
}
|
|
1986
1989
|
case "variable.add": {
|
|
1987
1990
|
Je(b, r.name) && y({ code: "variable_name_taken", message: `A variable named ${r.name} is already on this dashboard.`, path: `${f}.name`, fix: "Choose another name, or change it with variable.update." });
|
|
1988
|
-
const u = await
|
|
1991
|
+
const u = await Sa(
|
|
1989
1992
|
{
|
|
1990
1993
|
id: t.newId(),
|
|
1991
1994
|
name: r.name,
|
|
@@ -2003,14 +2006,14 @@ async function ms(e, a, t, s) {
|
|
|
2003
2006
|
break;
|
|
2004
2007
|
}
|
|
2005
2008
|
case "variable.update": {
|
|
2006
|
-
const u =
|
|
2009
|
+
const u = oi(b, r.name, `${f}.name`, Te), g = r.rename ?? u.name, $ = {
|
|
2007
2010
|
...r.rename !== void 0 ? { name: r.rename } : {},
|
|
2008
2011
|
...r.label !== void 0 ? { label: r.label } : {},
|
|
2009
2012
|
...r.presentation !== void 0 ? { presentation: r.presentation } : {},
|
|
2010
2013
|
...r.emptyText !== void 0 ? { emptyText: r.emptyText } : {}
|
|
2011
2014
|
}, O = { ...b, variables: (b.variables ?? []).filter((T) => T.id !== u.id) };
|
|
2012
2015
|
if (r.query) {
|
|
2013
|
-
const T = await
|
|
2016
|
+
const T = await Sa(
|
|
2014
2017
|
{
|
|
2015
2018
|
id: u.id,
|
|
2016
2019
|
name: g,
|
|
@@ -2026,7 +2029,7 @@ async function ms(e, a, t, s) {
|
|
|
2026
2029
|
);
|
|
2027
2030
|
$.query = T.query, $.get = T.get;
|
|
2028
2031
|
} else if (r.get !== void 0) {
|
|
2029
|
-
const T =
|
|
2032
|
+
const T = ri(u, r.get, O, Te, f);
|
|
2030
2033
|
$.query = T.query, $.get = T.get;
|
|
2031
2034
|
}
|
|
2032
2035
|
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." });
|
|
@@ -2037,7 +2040,7 @@ async function ms(e, a, t, s) {
|
|
|
2037
2040
|
case "variable.remove": {
|
|
2038
2041
|
const u = Je(b, r.name);
|
|
2039
2042
|
u || y(cs(b, r.name, `${f}.name`));
|
|
2040
|
-
const g = u, $ =
|
|
2043
|
+
const g = u, $ = di(b, g.id);
|
|
2041
2044
|
$.places.length && y({
|
|
2042
2045
|
code: "variable_in_use",
|
|
2043
2046
|
message: `${g.name} is shown in ${$.words}.`,
|
|
@@ -2048,7 +2051,7 @@ async function ms(e, a, t, s) {
|
|
|
2048
2051
|
break;
|
|
2049
2052
|
}
|
|
2050
2053
|
case "document.text.update": {
|
|
2051
|
-
const u = rt(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: g, unchanged: $ } =
|
|
2054
|
+
const u = rt(r.sheetId, `${f}.sheetId`, { grid: !1 }), { edit: g, unchanged: $ } = li(r, b, u, f, Te);
|
|
2052
2055
|
if (d.push({ ref: r.sheetId, kind: "sheet", id: u.id, title: u.title ?? "", changeIndex: m }), $) break;
|
|
2053
2056
|
w({ op: "document.text", sheetId: u.id, edit: g, changeIndex: m }, f);
|
|
2054
2057
|
break;
|
|
@@ -2063,7 +2066,7 @@ async function ms(e, a, t, s) {
|
|
|
2063
2066
|
}
|
|
2064
2067
|
}
|
|
2065
2068
|
if (o.length) return { ok: !1, problems: o };
|
|
2066
|
-
const ne =
|
|
2069
|
+
const ne = xt(e, i, { ...p, ...v });
|
|
2067
2070
|
if (!ne.ok)
|
|
2068
2071
|
return {
|
|
2069
2072
|
ok: !1,
|
|
@@ -2079,7 +2082,7 @@ async function ms(e, a, t, s) {
|
|
|
2079
2082
|
for (const m of c) {
|
|
2080
2083
|
const r = re(ne.dashboard, m);
|
|
2081
2084
|
if (!r) continue;
|
|
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) ??
|
|
2085
|
+
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) ?? St(r.card.type);
|
|
2083
2086
|
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({
|
|
2084
2087
|
code: "type_not_supported",
|
|
2085
2088
|
message: `As changed, "${r.card.title}" would have no query a ${g.replace(/_/g, " ")} can run.`,
|
|
@@ -2087,7 +2090,7 @@ async function ms(e, a, t, s) {
|
|
|
2087
2090
|
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"}.`
|
|
2088
2091
|
});
|
|
2089
2092
|
}
|
|
2090
|
-
if (o.push(...
|
|
2093
|
+
if (o.push(...pi(e, ne.dashboard, i, dt, v)), o.push(...gi(ne.dashboard, lt, t.calendar)), o.length) return { ok: !1, problems: o };
|
|
2091
2094
|
for (const m of i) {
|
|
2092
2095
|
if (m.op !== "filter.add" && !(m.op === "filter.update" && m.settings.scope)) continue;
|
|
2093
2096
|
const r = m.op === "filter.add" ? m.input.id : m.filterId, f = Le(ne.dashboard, r, void 0, v);
|
|
@@ -2150,7 +2153,7 @@ async function ms(e, a, t, s) {
|
|
|
2150
2153
|
fix: "Add a timeWindow on that date, or a dashboard date filter that reaches the card."
|
|
2151
2154
|
});
|
|
2152
2155
|
}
|
|
2153
|
-
const Is =
|
|
2156
|
+
const Is = fi(ne.dashboard, i, ne.descriptions, v);
|
|
2154
2157
|
return {
|
|
2155
2158
|
ok: !0,
|
|
2156
2159
|
operations: i,
|
|
@@ -2164,7 +2167,7 @@ async function ms(e, a, t, s) {
|
|
|
2164
2167
|
warnings: n
|
|
2165
2168
|
};
|
|
2166
2169
|
}
|
|
2167
|
-
function
|
|
2170
|
+
function fi(e, a, t, s) {
|
|
2168
2171
|
const o = a.filter((l) => l.op === "card.add");
|
|
2169
2172
|
if (!o.length) return [...t];
|
|
2170
2173
|
const n = ss(e, void 0, s);
|
|
@@ -2178,18 +2181,18 @@ function ci(e, a, t, s) {
|
|
|
2178
2181
|
var y;
|
|
2179
2182
|
return "notReached" in k && ((y = k.notReached) == null ? void 0 : y.some((F) => F.cardId === c && F.reason === "sql_no_filter_reference" === C));
|
|
2180
2183
|
}
|
|
2181
|
-
).map((k) => k.label), v = p(!1), b = p(!0),
|
|
2184
|
+
).map((k) => k.label), v = p(!1), b = p(!0), x = n.filter((C) => {
|
|
2182
2185
|
var k;
|
|
2183
2186
|
return (k = C.relationshipPending) == null ? void 0 : k.some((y) => y.cardId === c);
|
|
2184
|
-
}).map((C) => C.label),
|
|
2187
|
+
}).map((C) => C.label), S = n.filter((C) => {
|
|
2185
2188
|
var k;
|
|
2186
2189
|
return (k = C.sqlPending) == null ? void 0 : k.some((y) => y.cardId === c);
|
|
2187
2190
|
}).map((C) => C.label), E = [
|
|
2188
2191
|
...h.length ? [`The dashboard's ${i(h)} filter${h.length === 1 ? " applies" : "s apply"} to it.`] : [],
|
|
2189
2192
|
...v.length ? [`${i(v)} ${v.length === 1 ? "doesn't" : "don't"} reach it.`] : [],
|
|
2190
2193
|
...b.length ? [`${i(b)} ${b.length === 1 ? "doesn't" : "don't"} reach it: its SQL doesn't use dashboard filters.`] : [],
|
|
2191
|
-
...
|
|
2192
|
-
...
|
|
2194
|
+
...x.length ? [`${i(x)} may reach it through the domain's relationships.`] : [],
|
|
2195
|
+
...S.length ? [`${i(S)} may apply through its SQL.`] : []
|
|
2193
2196
|
];
|
|
2194
2197
|
E.length && d.set(l.changeIndex, E.join(" "));
|
|
2195
2198
|
}
|
|
@@ -2203,16 +2206,16 @@ function Lt(e) {
|
|
|
2203
2206
|
if (e.op === "card.update" || e.op === "card.remove") return e.cardId;
|
|
2204
2207
|
if (e.op === "card.add") return (a = e.frame.cards[0]) == null ? void 0 : a.id;
|
|
2205
2208
|
}
|
|
2206
|
-
function
|
|
2209
|
+
function mi(e) {
|
|
2207
2210
|
return Object.fromEntries(
|
|
2208
|
-
|
|
2211
|
+
Io.flatMap((a) => e[a] === void 0 ? [] : [[a, e[a]]])
|
|
2209
2212
|
);
|
|
2210
2213
|
}
|
|
2211
|
-
function
|
|
2214
|
+
function hi(e, a) {
|
|
2212
2215
|
if (!a.length || !e.config) return e;
|
|
2213
2216
|
const t = { ...e.config }, s = [];
|
|
2214
2217
|
if (t.matrix) {
|
|
2215
|
-
const n = t.matrix, i =
|
|
2218
|
+
const n = t.matrix, i = xo(n), d = [...n.spec.rows, ...n.spec.columns], l = { ...n.presentation.levelLabels }, c = { ...n.presentation.measureLabels };
|
|
2216
2219
|
for (const { key: h, label: p } of a) {
|
|
2217
2220
|
if (h.role === "metric") {
|
|
2218
2221
|
const v = i.measures.findIndex((b) => Ye(b, h));
|
|
@@ -2230,13 +2233,13 @@ function fi(e, a) {
|
|
|
2230
2233
|
const o = { metric: "metricColumns", group_by: "groupByColumns", detail: "detailColumns" };
|
|
2231
2234
|
for (const { key: n, label: i } of a) {
|
|
2232
2235
|
const d = [...t[o[n.role]] ?? []], l = Ka(n.role, d).findIndex((c) => Ye(c, n));
|
|
2233
|
-
l < 0 || (d[l] =
|
|
2236
|
+
l < 0 || (d[l] = vn(d[l], i), t[o[n.role]] = d, s.push(n));
|
|
2234
2237
|
}
|
|
2235
2238
|
return { ...e, config: t, statedLabels: s };
|
|
2236
2239
|
}
|
|
2237
|
-
function
|
|
2240
|
+
function pi(e, a, t, s, o) {
|
|
2238
2241
|
var E;
|
|
2239
|
-
const n = [], i = new Map(
|
|
2242
|
+
const n = [], i = new Map(Se(a).map((C) => [C.cardId, C])), d = Et(a), l = ve(a), c = (C) => {
|
|
2240
2243
|
var k, y;
|
|
2241
2244
|
return ((y = (k = a.sheets) == null ? void 0 : k.find((F) => F.id === C)) == null ? void 0 : y.title) ?? C;
|
|
2242
2245
|
}, h = (C, k) => {
|
|
@@ -2257,7 +2260,7 @@ function mi(e, a, t, s, o) {
|
|
|
2257
2260
|
message: `${N} isn't shown on "${c(F.sheetId)}", so it can't filter ${w}.`,
|
|
2258
2261
|
fix: "Show it on that sheet first with filter.update sheetIds (null for every sheet), in the same proposal."
|
|
2259
2262
|
};
|
|
2260
|
-
const _ =
|
|
2263
|
+
const _ = ko(y, F.card);
|
|
2261
2264
|
switch (_.status) {
|
|
2262
2265
|
case "incompatible":
|
|
2263
2266
|
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)." };
|
|
@@ -2335,13 +2338,13 @@ function mi(e, a, t, s, o) {
|
|
|
2335
2338
|
details: { reason: "filter_settings_override", ...w ? { sheetIds: w } : {} }
|
|
2336
2339
|
});
|
|
2337
2340
|
}
|
|
2338
|
-
const
|
|
2341
|
+
const x = ve(e), S = (C) => C === "blocked" || C === "ambiguous";
|
|
2339
2342
|
for (const C of l.inputs) {
|
|
2340
2343
|
const k = C.input.id;
|
|
2341
2344
|
for (const y of l.reachedCards({ inputId: k })) {
|
|
2342
|
-
if (v.has(`${k}|${y.cardId}`) || !
|
|
2343
|
-
const F =
|
|
2344
|
-
if (F && w &&
|
|
2345
|
+
if (v.has(`${k}|${y.cardId}`) || !S($e(C.input, y.card, o).reach)) continue;
|
|
2346
|
+
const F = x.findFilterInput({ inputId: k }), w = F && x.reachedCards({ inputId: k }).find((I) => I.cardId === y.cardId);
|
|
2347
|
+
if (F && w && S($e(F.input, w.card, o).reach)) continue;
|
|
2345
2348
|
const N = p(k, y.cardId);
|
|
2346
2349
|
n.push({
|
|
2347
2350
|
code: "invalid_change",
|
|
@@ -2354,7 +2357,7 @@ function mi(e, a, t, s, o) {
|
|
|
2354
2357
|
}
|
|
2355
2358
|
return n;
|
|
2356
2359
|
}
|
|
2357
|
-
function
|
|
2360
|
+
function gi(e, a, t) {
|
|
2358
2361
|
const s = [], o = ve(e);
|
|
2359
2362
|
for (const [n, i] of a) {
|
|
2360
2363
|
const d = o.findFilterInput({ inputId: n });
|
|
@@ -2368,7 +2371,7 @@ function hi(e, a, t) {
|
|
|
2368
2371
|
});
|
|
2369
2372
|
if (i.period) {
|
|
2370
2373
|
const v = Xa(l && "relativeMeta" in l ? l.relativeMeta : void 0);
|
|
2371
|
-
(!v ||
|
|
2374
|
+
(!v || ln(i.period) || !cn(v, i.period)) && p(
|
|
2372
2375
|
`"${d.input.label}" wouldn't load with that default${h ? `: ${h}` : ""}.`,
|
|
2373
2376
|
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."
|
|
2374
2377
|
);
|
|
@@ -2392,10 +2395,10 @@ function _t(e) {
|
|
|
2392
2395
|
}
|
|
2393
2396
|
function Ta(e) {
|
|
2394
2397
|
var t, s;
|
|
2395
|
-
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) =>
|
|
2398
|
+
const a = (s = (t = e.config) == null ? void 0 : t.groupByColumns) == null ? void 0 : s.find((o) => po(o.dataType || "") === "date");
|
|
2396
2399
|
return { comparisonDate: a ? { name: a.name, label: a.label || a.name } : null, dateWindow: "unknown" };
|
|
2397
2400
|
}
|
|
2398
|
-
function
|
|
2401
|
+
function bi(e, a) {
|
|
2399
2402
|
if ("sql" in a) return [];
|
|
2400
2403
|
const t = e, s = (...n) => new Set(n.flatMap((i) => Array.isArray(i) ? i : i ? [i] : []).map((i) => ge(i, a.datasetName))), o = {
|
|
2401
2404
|
metric: s(t.measures),
|
|
@@ -2404,7 +2407,7 @@ function pi(e, a) {
|
|
|
2404
2407
|
};
|
|
2405
2408
|
return Ne(a).filter((n) => o[n.key.role].has(n.key.field));
|
|
2406
2409
|
}
|
|
2407
|
-
function
|
|
2410
|
+
function yi(e, a, t, s) {
|
|
2408
2411
|
const o = Object.fromEntries(Object.entries(a).filter(([, p]) => p != null)), n = at(o), i = at(e), d = (p) => ka[p].safeParse(o);
|
|
2409
2412
|
if (!e || n && n !== i) {
|
|
2410
2413
|
const p = n ?? i, v = p ? d(p) : void 0;
|
|
@@ -2440,10 +2443,10 @@ function Ra(e) {
|
|
|
2440
2443
|
return e ? { kind: "sheets", sheetIds: e } : { kind: "allSheets", sheetKinds: ["dashboard"] };
|
|
2441
2444
|
}
|
|
2442
2445
|
function Aa(e, a, t, s) {
|
|
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:
|
|
2446
|
+
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: vi(a) }, t, s);
|
|
2444
2447
|
}
|
|
2445
2448
|
function ps(e, a, t, s) {
|
|
2446
|
-
const o =
|
|
2449
|
+
const o = un(e, a);
|
|
2447
2450
|
return o.ok ? o.window : s({
|
|
2448
2451
|
code: "invalid_change",
|
|
2449
2452
|
message: o.refusal.message,
|
|
@@ -2451,15 +2454,15 @@ function ps(e, a, t, s) {
|
|
|
2451
2454
|
path: o.refusal.path ? `${t}.${o.refusal.path}` : t
|
|
2452
2455
|
});
|
|
2453
2456
|
}
|
|
2454
|
-
function
|
|
2457
|
+
function vi(e) {
|
|
2455
2458
|
return Na({ dataType: e.dataType }) === "datetime";
|
|
2456
2459
|
}
|
|
2457
|
-
function
|
|
2460
|
+
function _i(e) {
|
|
2458
2461
|
var a, t, s;
|
|
2459
2462
|
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;
|
|
2460
2463
|
}
|
|
2461
|
-
async function
|
|
2462
|
-
const i =
|
|
2464
|
+
async function Ii(e, a, t, s, o, n) {
|
|
2465
|
+
const i = uo(e), d = i.kind === "config" ? i.executableSources : i.kind === "sql" ? i.pinnedCatalogSources.map((S) => S.source) : [], l = he(e), c = typeof a == "string" ? (l == null ? void 0 : l.kind) === "semantic" ? l.datasetName : void 0 : a.datasetName, h = d.find((S) => S.kind === "semantic" && Rt(S.datasetName) === Rt(c));
|
|
2463
2466
|
if ((!h || h.kind !== "semantic") && n)
|
|
2464
2467
|
return o({
|
|
2465
2468
|
code: "field_not_found",
|
|
@@ -2474,21 +2477,21 @@ async function vi(e, a, t, s, o, n) {
|
|
|
2474
2477
|
path: s,
|
|
2475
2478
|
fix: "Name a field of the card's own dataset, or { name, datasetName } for a dataset its query joins."
|
|
2476
2479
|
});
|
|
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,
|
|
2478
|
-
return
|
|
2480
|
+
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, x = b ? sn(h, { column_name: b.name, data_type: b.dataType, ...b.sourceField ? { sourceField: b.sourceField } : {} }) : void 0;
|
|
2481
|
+
return x || o({
|
|
2479
2482
|
code: "field_not_found",
|
|
2480
2483
|
message: `"${v}" isn't a field of ${h.datasetName}.`,
|
|
2481
2484
|
path: s,
|
|
2482
2485
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
2483
|
-
details: { available: ((p == null ? void 0 : p.fields) ?? []).slice(0, 20).map((
|
|
2486
|
+
details: { available: ((p == null ? void 0 : p.fields) ?? []).slice(0, 20).map((S) => S.name) }
|
|
2484
2487
|
});
|
|
2485
2488
|
}
|
|
2486
|
-
const
|
|
2489
|
+
const Ci = {
|
|
2487
2490
|
max: ya,
|
|
2488
2491
|
what: "A proposal that creates a dashboard",
|
|
2489
2492
|
fix: `Create with the first ${ya}, then change the new dashboard in a second proposal.`
|
|
2490
2493
|
};
|
|
2491
|
-
async function
|
|
2494
|
+
async function jr(e, a) {
|
|
2492
2495
|
const t = (d) => d && typeof d == "object" ? d.op : void 0, s = e.changes.flatMap(
|
|
2493
2496
|
(d, l) => t(d) === "dashboard.update" ? [
|
|
2494
2497
|
{
|
|
@@ -2500,12 +2503,12 @@ async function Vr(e, a) {
|
|
|
2500
2503
|
] : []
|
|
2501
2504
|
);
|
|
2502
2505
|
if (s.length) return { ok: !1, problems: s };
|
|
2503
|
-
const o =
|
|
2506
|
+
const o = wi(e, a), n = await ms(o, e.changes, a, { limit: Ci });
|
|
2504
2507
|
if (!n.ok) return n;
|
|
2505
|
-
const i =
|
|
2506
|
-
return { ...i, seed: o, sentence:
|
|
2508
|
+
const i = $i(n, e.changes);
|
|
2509
|
+
return { ...i, seed: o, sentence: Si(i.dashboard) };
|
|
2507
2510
|
}
|
|
2508
|
-
function
|
|
2511
|
+
function $i(e, a) {
|
|
2509
2512
|
if (a.some((n) => {
|
|
2510
2513
|
if (!n || typeof n != "object") return !1;
|
|
2511
2514
|
const { op: i } = n;
|
|
@@ -2513,7 +2516,7 @@ function Ii(e, a) {
|
|
|
2513
2516
|
})) return e;
|
|
2514
2517
|
const s = (e.dashboard.sheets ?? []).filter((n) => !Xe(n) && (n.frames ?? []).length > 0).map((n) => ({ op: "layout.arrange", sheetId: n.id }));
|
|
2515
2518
|
if (!s.length) return e;
|
|
2516
|
-
const o =
|
|
2519
|
+
const o = xt(e.dashboard, s, e.context);
|
|
2517
2520
|
if (!o.ok) throw new Error(`Arranging a new dashboard failed: ${o.failedAt.code}`);
|
|
2518
2521
|
return {
|
|
2519
2522
|
...e,
|
|
@@ -2522,7 +2525,7 @@ function Ii(e, a) {
|
|
|
2522
2525
|
descriptions: [...e.descriptions, ...o.descriptions]
|
|
2523
2526
|
};
|
|
2524
2527
|
}
|
|
2525
|
-
function
|
|
2528
|
+
function wi(e, a) {
|
|
2526
2529
|
const t = e.changes.some((s) => s && typeof s == "object" && s.op === "sheet.add");
|
|
2527
2530
|
return {
|
|
2528
2531
|
id: e.dashboardId,
|
|
@@ -2534,33 +2537,33 @@ function Ci(e, a) {
|
|
|
2534
2537
|
};
|
|
2535
2538
|
}
|
|
2536
2539
|
const It = (e, a) => `${e} ${a}${e === 1 ? "" : "s"}`;
|
|
2537
|
-
function
|
|
2540
|
+
function Si(e) {
|
|
2538
2541
|
const a = e.sheets ?? [], t = a.reduce((n, i) => n + (i.frames ?? []).reduce((d, l) => {
|
|
2539
2542
|
var c;
|
|
2540
2543
|
return d + (((c = l.cards) == null ? void 0 : c.length) ?? 0);
|
|
2541
2544
|
}, 0), 0), s = (e.inputs ?? []).filter((n) => n.kind === "filter").length, o = [It(a.length, "sheet"), It(t, "card"), ...s ? [It(s, "filter")] : []];
|
|
2542
2545
|
return `Creates a private dashboard ${Ga(e.title)} with ${et(o)}.`;
|
|
2543
2546
|
}
|
|
2544
|
-
const
|
|
2545
|
-
function
|
|
2547
|
+
const xi = 50;
|
|
2548
|
+
function Kr(e, a) {
|
|
2546
2549
|
var w, N;
|
|
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 =
|
|
2550
|
+
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 = Se(e).filter(
|
|
2548
2551
|
(I) => (!t || t.has(I.sheetId)) && (!s || s.has(I.cardId))
|
|
2549
|
-
), i = n.length > (a.maxQueryCards ??
|
|
2552
|
+
), i = n.length > (a.maxQueryCards ?? xi), d = new Map(
|
|
2550
2553
|
(e.sheets ?? []).flatMap((I) => (I.frames ?? []).map((_) => [_.id, _]))
|
|
2551
2554
|
), l = /* @__PURE__ */ new Map(), c = (I) => {
|
|
2552
2555
|
(I == null ? void 0 : I.kind) === "semantic" && l.set(`${I.domainId}|${I.datasetName}`, { domainId: I.domainId, datasetName: I.datasetName });
|
|
2553
2556
|
}, h = new Map(
|
|
2554
2557
|
(e.sheets ?? []).map((I) => [I.id, $t({ dashboard: e, place: { kind: I.kind === "document" ? "document" : "sheet", sheetId: I.id } })])
|
|
2555
|
-
), p = (I) => ({ catalog: I, inputs: e.inputs, variables: e.variables }), v = (I) => p(h.get(I)), b = /* @__PURE__ */ new Map(),
|
|
2558
|
+
), p = (I) => ({ catalog: I, inputs: e.inputs, variables: e.variables }), v = (I) => p(h.get(I)), b = /* @__PURE__ */ new Map(), x = (I, _) => {
|
|
2556
2559
|
if (I.kind === "document") return v(I.id);
|
|
2557
2560
|
const D = $t({ dashboard: e, place: { kind: "sheet", sheetId: I.id, cardId: _ } });
|
|
2558
2561
|
return b.set(`${I.id}:${_}`, D), p(D);
|
|
2559
|
-
},
|
|
2562
|
+
}, S = o.map((I) => ({
|
|
2560
2563
|
sheetId: I.id,
|
|
2561
2564
|
title: I.title ?? "",
|
|
2562
2565
|
kind: I.kind === "document" ? "document" : "dashboard",
|
|
2563
|
-
...I.kind === "document" ?
|
|
2566
|
+
...I.kind === "document" ? Ti(I, v(I.id)) : { layout: Di(I) },
|
|
2564
2567
|
cards: n.filter((_) => _.sheetId === I.id).map((_) => {
|
|
2565
2568
|
var te;
|
|
2566
2569
|
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 ?? "" };
|
|
@@ -2579,7 +2582,7 @@ function Gr(e, a) {
|
|
|
2579
2582
|
};
|
|
2580
2583
|
}
|
|
2581
2584
|
if (D.type === "text") {
|
|
2582
|
-
const oe = ja(D,
|
|
2585
|
+
const oe = ja(D, x(I, D.id));
|
|
2583
2586
|
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 } };
|
|
2584
2587
|
}
|
|
2585
2588
|
const B = we(D, { sql: a.sql });
|
|
@@ -2592,7 +2595,7 @@ function Gr(e, a) {
|
|
|
2592
2595
|
editable: !1,
|
|
2593
2596
|
notEditable: { reason: B.reason, message: B.message, ...B.detail ? { detail: B.detail } : {} }
|
|
2594
2597
|
};
|
|
2595
|
-
const
|
|
2598
|
+
const K = i ? void 0 : Ft(D);
|
|
2596
2599
|
return {
|
|
2597
2600
|
...G,
|
|
2598
2601
|
...Qe(D),
|
|
@@ -2605,7 +2608,7 @@ function Gr(e, a) {
|
|
|
2605
2608
|
...B.matrix ? { matrix: B.matrix } : {},
|
|
2606
2609
|
...B.timeWindowReadOnly ? { timeWindowReadOnly: B.timeWindowReadOnly } : {}
|
|
2607
2610
|
},
|
|
2608
|
-
...
|
|
2611
|
+
...K
|
|
2609
2612
|
};
|
|
2610
2613
|
})
|
|
2611
2614
|
})), E = ss(e, ts(a.calendar, a.updatedAt), {
|
|
@@ -2613,7 +2616,7 @@ function Gr(e, a) {
|
|
|
2613
2616
|
});
|
|
2614
2617
|
for (const I of E)
|
|
2615
2618
|
I.editable && l.set(`${I.domainId}|${I.datasetName}`, { domainId: I.domainId, datasetName: I.datasetName });
|
|
2616
|
-
const C =
|
|
2619
|
+
const C = Ri(e, a, new Map([...h, ...b]));
|
|
2617
2620
|
for (const I of e.variables ?? []) {
|
|
2618
2621
|
const _ = Tt(I);
|
|
2619
2622
|
(_ == null ? void 0 : _.kind) === "semantic" && l.set(`${_.domainId}|${_.datasetName}`, { domainId: _.domainId, datasetName: _.datasetName });
|
|
@@ -2648,23 +2651,23 @@ function Gr(e, a) {
|
|
|
2648
2651
|
updatedAt: a.updatedAt,
|
|
2649
2652
|
access: a.access,
|
|
2650
2653
|
datasets: [...l.values()],
|
|
2651
|
-
sheets:
|
|
2654
|
+
sheets: S,
|
|
2652
2655
|
filters: E,
|
|
2653
2656
|
variables: C,
|
|
2654
|
-
style:
|
|
2657
|
+
style: ki(e, a),
|
|
2655
2658
|
editorOnly: F,
|
|
2656
2659
|
...i ? { truncated: !0 } : {}
|
|
2657
2660
|
};
|
|
2658
2661
|
}
|
|
2659
|
-
function
|
|
2662
|
+
function ki(e, a) {
|
|
2660
2663
|
const { style: t, organizationAppearance: s } = za(e, a.organizationAppearance);
|
|
2661
|
-
return { set:
|
|
2664
|
+
return { set: Nn(t), shows: pn({ organizationAppearance: s, dashboardStyle: t }, "light").shows };
|
|
2662
2665
|
}
|
|
2663
2666
|
function Da(e, a) {
|
|
2664
|
-
const t =
|
|
2667
|
+
const t = Ao(a);
|
|
2665
2668
|
return t ? { ...e, style: t } : e;
|
|
2666
2669
|
}
|
|
2667
|
-
function
|
|
2670
|
+
function Ti(e, a) {
|
|
2668
2671
|
const t = e.document;
|
|
2669
2672
|
if (!t) return {};
|
|
2670
2673
|
const s = (o) => {
|
|
@@ -2681,7 +2684,7 @@ function Si(e, a) {
|
|
|
2681
2684
|
)
|
|
2682
2685
|
};
|
|
2683
2686
|
}
|
|
2684
|
-
function
|
|
2687
|
+
function Ri(e, a, t) {
|
|
2685
2688
|
const s = Ha(e), o = (c) => s.filter(({ ref: h }) => c(h)).map(({ place: h, where: p }) => ({
|
|
2686
2689
|
sheetId: h.sheetId,
|
|
2687
2690
|
where: p.kind,
|
|
@@ -2702,17 +2705,17 @@ function ki(e, a, t) {
|
|
|
2702
2705
|
})), d = [...n.values()].filter((c) => c.kind === "report").map((c) => ({
|
|
2703
2706
|
name: c.name,
|
|
2704
2707
|
kind: "report",
|
|
2705
|
-
words:
|
|
2708
|
+
words: Ai[c.reportKey],
|
|
2706
2709
|
parts: [],
|
|
2707
2710
|
usedIn: o((h) => h.source === "documentMeta" && h.key === c.reportKey),
|
|
2708
2711
|
editable: !1
|
|
2709
2712
|
})), l = (e.variables ?? []).map((c) => {
|
|
2710
|
-
const h = ds(c, { sql: a.sql }), p = Ot(c, e)[0], v =
|
|
2713
|
+
const h = ds(c, { sql: a.sql }), p = Ot(c, e)[0], v = Ro(c.presentation);
|
|
2711
2714
|
return {
|
|
2712
2715
|
name: c.name,
|
|
2713
2716
|
kind: "data",
|
|
2714
|
-
words:
|
|
2715
|
-
parts:
|
|
2717
|
+
words: on(c),
|
|
2718
|
+
parts: Wo(c),
|
|
2716
2719
|
...v ? { presentation: v } : {},
|
|
2717
2720
|
usedIn: o((b) => b.source === "data" && b.variableId === c.id),
|
|
2718
2721
|
editable: h.editable,
|
|
@@ -2722,18 +2725,18 @@ function ki(e, a, t) {
|
|
|
2722
2725
|
});
|
|
2723
2726
|
return [...i, ...d, ...l];
|
|
2724
2727
|
}
|
|
2725
|
-
const
|
|
2728
|
+
const Ai = {
|
|
2726
2729
|
generatedAt: "When the report was generated",
|
|
2727
2730
|
pageNumber: "The page number (Documents)",
|
|
2728
2731
|
pageCount: "The page count (Documents)"
|
|
2729
2732
|
};
|
|
2730
2733
|
function Qe(e) {
|
|
2731
2734
|
const a = qe(e);
|
|
2732
|
-
return a ? { type: a.type, ...a.properties } : { type:
|
|
2735
|
+
return a ? { type: a.type, ...a.properties } : { type: St(e.type) };
|
|
2733
2736
|
}
|
|
2734
|
-
function
|
|
2737
|
+
function Di(e) {
|
|
2735
2738
|
const a = new Map((e.frames ?? []).map((t) => [t.id, t]));
|
|
2736
|
-
return
|
|
2739
|
+
return In(e).rows.map((t) => ({
|
|
2737
2740
|
tiles: t.tiles.map((s) => {
|
|
2738
2741
|
const o = a.get(s.frameId);
|
|
2739
2742
|
return { cardIds: o ? Va(o) : [], width: s.width };
|
|
@@ -2746,13 +2749,13 @@ function ae(e) {
|
|
|
2746
2749
|
function ue(e, a) {
|
|
2747
2750
|
return ae(e) && Object.prototype.hasOwnProperty.call(e, a) && e[a] !== void 0;
|
|
2748
2751
|
}
|
|
2749
|
-
const de = ue,
|
|
2750
|
-
function
|
|
2752
|
+
const de = ue, Fi = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], Oi = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], Ei = '`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";
|
|
2753
|
+
function qi(e) {
|
|
2751
2754
|
return Me(String(e.type)) ?? qt;
|
|
2752
2755
|
}
|
|
2753
2756
|
function Ee(e, a, t) {
|
|
2754
2757
|
if (t === void 0) return;
|
|
2755
|
-
const s = ae(t) ?
|
|
2758
|
+
const s = ae(t) ? qi(t).safeParse(t) : qt.safeParse(t);
|
|
2756
2759
|
if (!s.success)
|
|
2757
2760
|
for (const o of s.error.issues) {
|
|
2758
2761
|
const n = o.code === "unrecognized_keys" ? o.keys : [o.path.length ? String(o.path[o.path.length - 1]) : "type"];
|
|
@@ -2773,29 +2776,29 @@ function Ct(e, a, t) {
|
|
|
2773
2776
|
}
|
|
2774
2777
|
function gs(e, a) {
|
|
2775
2778
|
const t = [], s = e.config;
|
|
2776
|
-
for (const
|
|
2777
|
-
const
|
|
2778
|
-
Array.isArray(
|
|
2779
|
+
for (const x of Fi) {
|
|
2780
|
+
const S = s == null ? void 0 : s[x];
|
|
2781
|
+
Array.isArray(S) && S.forEach((E, C) => Ct(t, `${a}.config.${x}[${C}]`, E));
|
|
2779
2782
|
}
|
|
2780
2783
|
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;
|
|
2781
|
-
for (const
|
|
2782
|
-
const
|
|
2783
|
-
if (ae(
|
|
2784
|
+
for (const x of ["measureFormats", "levelFormats"]) {
|
|
2785
|
+
const S = n == null ? void 0 : n[x];
|
|
2786
|
+
if (ae(S)) for (const [E, C] of Object.entries(S)) Ee(t, `${a}.config.matrix.presentation.${x}.${E}`, C);
|
|
2784
2787
|
}
|
|
2785
2788
|
de(n, "conditionalFormatting") && t.push({ path: `${a}.config.matrix.presentation.conditionalFormatting`, field: "conditionalFormatting", replacement: He });
|
|
2786
2789
|
const i = e.interactionConfig, d = i == null ? void 0 : i.drillHierarchies;
|
|
2787
|
-
Array.isArray(d) && d.forEach((
|
|
2788
|
-
ae(
|
|
2789
|
-
ae(E) && Ct(t, `${a}.interactionConfig.drillHierarchies[${
|
|
2790
|
+
Array.isArray(d) && d.forEach((x, S) => {
|
|
2791
|
+
ae(x) && (Ct(t, `${a}.interactionConfig.drillHierarchies[${S}].baseField`, x.baseField), Array.isArray(x.steps) && x.steps.forEach((E, C) => {
|
|
2792
|
+
ae(E) && Ct(t, `${a}.interactionConfig.drillHierarchies[${S}].steps[${C}].field`, E.field);
|
|
2790
2793
|
}));
|
|
2791
2794
|
});
|
|
2792
2795
|
const l = e.preferences;
|
|
2793
2796
|
if (!l) return t;
|
|
2794
2797
|
const c = `${a}.preferences`;
|
|
2795
2798
|
if (de(l, "formatNumber")) {
|
|
2796
|
-
const
|
|
2799
|
+
const x = l.formatNumber, S = ae(x) && Object.keys(x).every((E) => E === "colorRanges");
|
|
2797
2800
|
t.push(
|
|
2798
|
-
|
|
2801
|
+
S ? { 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`" }
|
|
2799
2802
|
);
|
|
2800
2803
|
}
|
|
2801
2804
|
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" });
|
|
@@ -2805,28 +2808,28 @@ function gs(e, a) {
|
|
|
2805
2808
|
de(p, "conditionalFormatting") && t.push({ path: `${c}.tablePrefs.conditionalFormatting`, field: "conditionalFormatting", replacement: He });
|
|
2806
2809
|
const v = p == null ? void 0 : p.columnSettingsMap;
|
|
2807
2810
|
if (ae(v))
|
|
2808
|
-
for (const [
|
|
2809
|
-
if (!ae(
|
|
2810
|
-
const E = `${c}.tablePrefs.columnSettingsMap.${
|
|
2811
|
+
for (const [x, S] of Object.entries(v)) {
|
|
2812
|
+
if (!ae(S)) continue;
|
|
2813
|
+
const E = `${c}.tablePrefs.columnSettingsMap.${x}`;
|
|
2811
2814
|
for (const C of ["numberFormat", "dateFormat", "inheritMetricFormat"])
|
|
2812
|
-
de(
|
|
2813
|
-
de(
|
|
2815
|
+
de(S, C) && t.push({ path: `${E}.${C}`, field: C, replacement: C === "inheritMetricFormat" ? "nothing: a column follows its `format`" : Ei });
|
|
2816
|
+
de(S, "colorRanges") && t.push({ path: `${E}.colorRanges`, field: "colorRanges", replacement: He });
|
|
2814
2817
|
}
|
|
2815
|
-
for (const
|
|
2816
|
-
const
|
|
2817
|
-
if (ae(
|
|
2818
|
+
for (const x of Oi) {
|
|
2819
|
+
const S = l[x];
|
|
2820
|
+
if (ae(S)) {
|
|
2818
2821
|
for (const E of ["formatMode", "mode", "formatOptions"])
|
|
2819
|
-
de(
|
|
2820
|
-
|
|
2822
|
+
de(S, E) && t.push({ path: `${c}.${x}.${E}`, field: E, replacement: `\`preferences.${x}.valueFormat\` (absent means the column's format)` });
|
|
2823
|
+
x === "dataLabelsConfig" && de(S, "format") && t.push({ path: `${c}.${x}.format`, field: "format", replacement: "`preferences.dataLabelsConfig.valueFormat`" }), Ee(t, `${c}.${x}.valueFormat`, S.valueFormat);
|
|
2821
2824
|
}
|
|
2822
2825
|
}
|
|
2823
2826
|
const b = l.sqlColumns;
|
|
2824
2827
|
if (ae(b))
|
|
2825
|
-
for (const [
|
|
2826
|
-
ae(
|
|
2828
|
+
for (const [x, S] of Object.entries(b))
|
|
2829
|
+
ae(S) && Ee(t, `${c}.sqlColumns.${x}.format`, S.format);
|
|
2827
2830
|
return ae(l.sqlKpiValue) && Ee(t, `${c}.sqlKpiValue.format`, l.sqlKpiValue.format), t;
|
|
2828
2831
|
}
|
|
2829
|
-
function
|
|
2832
|
+
function Ni(e) {
|
|
2830
2833
|
const a = `sheets[id=${e.sheetId}]`;
|
|
2831
2834
|
switch (e.kind) {
|
|
2832
2835
|
case "sheetCard":
|
|
@@ -2840,22 +2843,22 @@ function Ei(e) {
|
|
|
2840
2843
|
function bs(e) {
|
|
2841
2844
|
if (!ae(e)) return [];
|
|
2842
2845
|
if (Array.isArray(e.sheets))
|
|
2843
|
-
return
|
|
2846
|
+
return Se(e).map((t) => ({
|
|
2844
2847
|
card: t.card,
|
|
2845
|
-
at:
|
|
2848
|
+
at: Ni(t)
|
|
2846
2849
|
}));
|
|
2847
2850
|
const a = e;
|
|
2848
2851
|
return Array.isArray(a.cards) ? a.cards.map((t) => ({ card: t, at: `cards[id=${t.id}]` })) : [];
|
|
2849
2852
|
}
|
|
2850
|
-
function
|
|
2853
|
+
function Wr(e) {
|
|
2851
2854
|
return bs(e).flatMap(({ card: a, at: t }) => gs(a, t));
|
|
2852
2855
|
}
|
|
2853
|
-
function
|
|
2856
|
+
function Pi(e, a) {
|
|
2854
2857
|
var n;
|
|
2855
2858
|
const t = (n = e.preferences) == null ? void 0 : n.conditionalFormatting;
|
|
2856
2859
|
if (t === void 0) return [];
|
|
2857
|
-
const s = `${a}.preferences.conditionalFormatting`, o =
|
|
2858
|
-
return o.success ?
|
|
2860
|
+
const s = `${a}.preferences.conditionalFormatting`, o = Do.safeParse(t);
|
|
2861
|
+
return o.success ? Fo(e).map((i) => ({
|
|
2859
2862
|
code: "invalid_conditional_formatting",
|
|
2860
2863
|
path: `${s}.rules[id=${i.ruleId}].${i.path}`,
|
|
2861
2864
|
message: i.message
|
|
@@ -2865,14 +2868,14 @@ function qi(e, a) {
|
|
|
2865
2868
|
message: i.message
|
|
2866
2869
|
}));
|
|
2867
2870
|
}
|
|
2868
|
-
function
|
|
2871
|
+
function Ur(e) {
|
|
2869
2872
|
return bs(e).flatMap(({ card: a, at: t }) => [
|
|
2870
2873
|
...gs(a, t).map((s) => ({
|
|
2871
2874
|
code: "retired_presentation_field",
|
|
2872
2875
|
path: s.path,
|
|
2873
2876
|
message: `\`${s.field}\` is retired: use ${s.replacement}.`
|
|
2874
2877
|
})),
|
|
2875
|
-
...
|
|
2878
|
+
...Pi(a, t)
|
|
2876
2879
|
]);
|
|
2877
2880
|
}
|
|
2878
2881
|
const Mt = [
|
|
@@ -2881,7 +2884,7 @@ const Mt = [
|
|
|
2881
2884
|
"detailColumns",
|
|
2882
2885
|
"pivotByColumns",
|
|
2883
2886
|
"sortByColumns"
|
|
2884
|
-
],
|
|
2887
|
+
], Li = [
|
|
2885
2888
|
"xAxisConfig",
|
|
2886
2889
|
"yAxisConfig",
|
|
2887
2890
|
"secondaryYAxisConfig",
|
|
@@ -2901,15 +2904,15 @@ function _e(e, a) {
|
|
|
2901
2904
|
return ys(t(e), t(a));
|
|
2902
2905
|
}
|
|
2903
2906
|
function st(e) {
|
|
2904
|
-
const a =
|
|
2907
|
+
const a = fn(e);
|
|
2905
2908
|
return a === "date" || a === "datetime";
|
|
2906
2909
|
}
|
|
2907
2910
|
function vs(e) {
|
|
2908
2911
|
var a, t;
|
|
2909
2912
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
2910
2913
|
}
|
|
2911
|
-
function
|
|
2912
|
-
return e.type === "kpi" &&
|
|
2914
|
+
function Mi(e) {
|
|
2915
|
+
return e.type === "kpi" && Bo(e);
|
|
2913
2916
|
}
|
|
2914
2917
|
function At(e) {
|
|
2915
2918
|
return e.type === "table" || e.type === "detailTable";
|
|
@@ -2919,7 +2922,7 @@ function se(e, a) {
|
|
|
2919
2922
|
const t = (s = e.config) == null ? void 0 : s[a];
|
|
2920
2923
|
return Array.isArray(t) ? t : [];
|
|
2921
2924
|
}
|
|
2922
|
-
function
|
|
2925
|
+
function Bi(e, a) {
|
|
2923
2926
|
for (const t of Mt) {
|
|
2924
2927
|
const s = se(e, t).indexOf(a);
|
|
2925
2928
|
if (s >= 0) return `config.${t}[${s}]`;
|
|
@@ -2935,7 +2938,7 @@ function ot(e, a, t, s) {
|
|
|
2935
2938
|
a.format = t, a.formatOrigin = "override", e.changes.push({
|
|
2936
2939
|
path: s,
|
|
2937
2940
|
action: "moved",
|
|
2938
|
-
to: `${
|
|
2941
|
+
to: `${Bi(e.card, a) ?? "config"}.format`
|
|
2939
2942
|
});
|
|
2940
2943
|
}
|
|
2941
2944
|
function Bt(e) {
|
|
@@ -2945,7 +2948,7 @@ function Bt(e) {
|
|
|
2945
2948
|
function Dt(e, a, t) {
|
|
2946
2949
|
if (!(!ue(a, "dateFormat") && !ue(a, "customFormat"))) {
|
|
2947
2950
|
if (st(a.dataType) && a.format == null && a.dateFormat != null) {
|
|
2948
|
-
const s =
|
|
2951
|
+
const s = Lo({
|
|
2949
2952
|
fieldId: a.id,
|
|
2950
2953
|
dataType: a.dataType,
|
|
2951
2954
|
granularity: a.granularity,
|
|
@@ -2961,7 +2964,7 @@ function Dt(e, a, t) {
|
|
|
2961
2964
|
ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2962
2965
|
}
|
|
2963
2966
|
}
|
|
2964
|
-
function
|
|
2967
|
+
function Vi(e, a, t) {
|
|
2965
2968
|
if (!ue(a, "dateFormat") && !ue(a, "customFormat")) return;
|
|
2966
2969
|
const s = a.dateFormat === "custom" ? a.customFormat : a.dateFormat;
|
|
2967
2970
|
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({
|
|
@@ -2974,14 +2977,14 @@ function Mi(e, a, t) {
|
|
|
2974
2977
|
detail: "A detail date pattern on a column that has a format of its own."
|
|
2975
2978
|
}), ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2976
2979
|
}
|
|
2977
|
-
function
|
|
2980
|
+
function Gi(e, a, t, s) {
|
|
2978
2981
|
if (a.format !== void 0) {
|
|
2979
2982
|
const o = Bt(a.format);
|
|
2980
2983
|
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" }));
|
|
2981
2984
|
}
|
|
2982
|
-
t === "groupByColumns" || t === "pivotByColumns" ? Dt(e, a, s) : t === "detailColumns" ?
|
|
2985
|
+
t === "groupByColumns" || t === "pivotByColumns" ? Dt(e, a, s) : t === "detailColumns" ? Vi(e, a, s) : ke(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
|
|
2983
2986
|
}
|
|
2984
|
-
function
|
|
2987
|
+
function ji(e, a) {
|
|
2985
2988
|
for (const t of Mt)
|
|
2986
2989
|
se(e.card, t).forEach((s, o) => {
|
|
2987
2990
|
var i;
|
|
@@ -2993,7 +2996,7 @@ function Vi(e, a) {
|
|
|
2993
2996
|
});
|
|
2994
2997
|
});
|
|
2995
2998
|
}
|
|
2996
|
-
function
|
|
2999
|
+
function Ki(e) {
|
|
2997
3000
|
var t;
|
|
2998
3001
|
const a = (t = e.card.interactionConfig) == null ? void 0 : t.drillHierarchies;
|
|
2999
3002
|
Array.isArray(a) && a.forEach((s, o) => {
|
|
@@ -3011,13 +3014,13 @@ function Gi(e) {
|
|
|
3011
3014
|
});
|
|
3012
3015
|
});
|
|
3013
3016
|
}
|
|
3014
|
-
const
|
|
3017
|
+
const Wi = [
|
|
3015
3018
|
"numberFormat",
|
|
3016
3019
|
"dateFormat",
|
|
3017
3020
|
"inheritMetricFormat",
|
|
3018
3021
|
"colorRanges"
|
|
3019
3022
|
];
|
|
3020
|
-
function
|
|
3023
|
+
function Ui(e, a) {
|
|
3021
3024
|
const t = (o) => o == null ? void 0 : o.trim().toLowerCase(), s = t(a);
|
|
3022
3025
|
return [
|
|
3023
3026
|
e.id,
|
|
@@ -3025,32 +3028,32 @@ function Ki(e, a) {
|
|
|
3025
3028
|
e.name,
|
|
3026
3029
|
e.qualifiedFieldName,
|
|
3027
3030
|
e.label,
|
|
3028
|
-
e.role === "metric" ?
|
|
3031
|
+
e.role === "metric" ? Jo(e) : void 0
|
|
3029
3032
|
].some((o) => o !== void 0 && t(o) === s);
|
|
3030
3033
|
}
|
|
3031
3034
|
function Fa(e, a) {
|
|
3032
|
-
const t =
|
|
3035
|
+
const t = Mo(e, { columnId: a });
|
|
3033
3036
|
if (t) return t;
|
|
3034
3037
|
const s = [
|
|
3035
3038
|
...se(e, "detailColumns"),
|
|
3036
3039
|
...se(e, "metricColumns"),
|
|
3037
3040
|
...se(e, "groupByColumns")
|
|
3038
|
-
].filter((o) =>
|
|
3041
|
+
].filter((o) => Ui(o, a));
|
|
3039
3042
|
return s.length === 1 ? s[0] : void 0;
|
|
3040
3043
|
}
|
|
3041
|
-
function
|
|
3044
|
+
function Qi(e) {
|
|
3042
3045
|
return e.type === "number" && ee(e.numberFormat) && e.inheritMetricFormat !== !0;
|
|
3043
3046
|
}
|
|
3044
|
-
function
|
|
3047
|
+
function Hi(e, a) {
|
|
3045
3048
|
var t;
|
|
3046
|
-
return st(a.dataType) ? se(e, "detailColumns").includes(a) ? e.type === "detailTable" :
|
|
3049
|
+
return st(a.dataType) ? se(e, "detailColumns").includes(a) ? e.type === "detailTable" : yn(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
|
|
3047
3050
|
}
|
|
3048
3051
|
function Oa(e, a, t, s) {
|
|
3049
3052
|
var i;
|
|
3050
3053
|
const o = (i = e.card).preferences ?? (i.preferences = {}), n = o.sqlColumns ?? (o.sqlColumns = {});
|
|
3051
3054
|
n[a] = { ...n[a], format: t }, e.changes.push({ path: s, action: "moved", to: `preferences.sqlColumns[${JSON.stringify(a)}].format` });
|
|
3052
3055
|
}
|
|
3053
|
-
function
|
|
3056
|
+
function Yi(e) {
|
|
3054
3057
|
const [a, ...t] = e;
|
|
3055
3058
|
if (!a) return;
|
|
3056
3059
|
const s = Object.fromEntries(
|
|
@@ -3058,8 +3061,8 @@ function Qi(e) {
|
|
|
3058
3061
|
);
|
|
3059
3062
|
return qt.safeParse(s).success ? s : void 0;
|
|
3060
3063
|
}
|
|
3061
|
-
function
|
|
3062
|
-
const t = e.card, s =
|
|
3064
|
+
function zi(e, a) {
|
|
3065
|
+
const t = e.card, s = Uo({
|
|
3063
3066
|
groupByColumns: se(t, "groupByColumns"),
|
|
3064
3067
|
metricColumns: se(t, "metricColumns"),
|
|
3065
3068
|
pivotByColumns: se(t, "pivotByColumns"),
|
|
@@ -3076,10 +3079,10 @@ function Hi(e, a) {
|
|
|
3076
3079
|
});
|
|
3077
3080
|
}
|
|
3078
3081
|
}
|
|
3079
|
-
function
|
|
3082
|
+
function Ji(e, a) {
|
|
3080
3083
|
var n;
|
|
3081
3084
|
if (!a.length) return;
|
|
3082
|
-
const t = se(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ?
|
|
3085
|
+
const t = se(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, o = s && !s.format ? Yi(a.map((i) => i.format)) : void 0;
|
|
3083
3086
|
s && o && ot(e, s, o, a[0].from);
|
|
3084
3087
|
for (const i of a)
|
|
3085
3088
|
if (!(s != null && s.format && _e(i.format, s.format))) {
|
|
@@ -3104,7 +3107,7 @@ function Yi(e, a) {
|
|
|
3104
3107
|
);
|
|
3105
3108
|
}
|
|
3106
3109
|
}
|
|
3107
|
-
function
|
|
3110
|
+
function Xi(e) {
|
|
3108
3111
|
var l;
|
|
3109
3112
|
const a = (l = e.card.preferences) == null ? void 0 : l.tablePrefs, t = a == null ? void 0 : a.columnSettingsMap;
|
|
3110
3113
|
if (!ee(t)) return;
|
|
@@ -3112,19 +3115,19 @@ function zi(e) {
|
|
|
3112
3115
|
for (const [c, h] of Object.entries(t)) {
|
|
3113
3116
|
if (!ee(h)) continue;
|
|
3114
3117
|
const p = h, v = `preferences.tablePrefs.columnSettingsMap[${JSON.stringify(c)}]`;
|
|
3115
|
-
if (
|
|
3116
|
-
const b =
|
|
3118
|
+
if (Qi(p)) {
|
|
3119
|
+
const b = Oo(p.numberFormat);
|
|
3117
3120
|
if (b && o)
|
|
3118
3121
|
Oa(e, c, b, `${v}.numberFormat`);
|
|
3119
3122
|
else if (b && At(s)) {
|
|
3120
|
-
const
|
|
3121
|
-
|
|
3122
|
-
path:
|
|
3123
|
+
const x = Fa(s, c), S = { key: c, format: b, from: `${v}.numberFormat` };
|
|
3124
|
+
x ? i.set(x, [...i.get(x) ?? [], S]) : n ? d.push(S) : e.unconverted.push({
|
|
3125
|
+
path: S.from,
|
|
3123
3126
|
reason: "unmatched_column_setting",
|
|
3124
3127
|
detail: `"${c}" names no card column.`
|
|
3125
3128
|
});
|
|
3126
3129
|
} else b && s.type !== "matrixTable" && s.type !== "kpi" && se(s, "metricColumns").some(
|
|
3127
|
-
(
|
|
3130
|
+
(S) => S.comparison != null
|
|
3128
3131
|
) && e.unconverted.push({
|
|
3129
3132
|
path: `${v}.numberFormat`,
|
|
3130
3133
|
reason: "chart_comparison_column_setting",
|
|
@@ -3134,39 +3137,39 @@ function zi(e) {
|
|
|
3134
3137
|
if (ee(p.dateFormat)) {
|
|
3135
3138
|
const b = p.type === "date";
|
|
3136
3139
|
if (b && o)
|
|
3137
|
-
Oa(e, c,
|
|
3140
|
+
Oa(e, c, Eo(p.dateFormat), `${v}.dateFormat`);
|
|
3138
3141
|
else if (b && At(s)) {
|
|
3139
|
-
const
|
|
3140
|
-
(!
|
|
3142
|
+
const x = Fa(s, c);
|
|
3143
|
+
(!x || !Hi(s, x)) && e.unconverted.push({
|
|
3141
3144
|
path: `${v}.dateFormat`,
|
|
3142
3145
|
reason: "config_column_date_setting",
|
|
3143
3146
|
detail: `"${c}"'s download formats its dates with this setting.`
|
|
3144
3147
|
});
|
|
3145
3148
|
}
|
|
3146
3149
|
}
|
|
3147
|
-
for (const b of
|
|
3150
|
+
for (const b of Wi)
|
|
3148
3151
|
Object.prototype.hasOwnProperty.call(p, b) && (delete p[b], e.changes.push({ path: `${v}.${b}`, action: "removed" }));
|
|
3149
3152
|
}
|
|
3150
|
-
|
|
3153
|
+
zi(e, i), Ji(e, d);
|
|
3151
3154
|
}
|
|
3152
|
-
function
|
|
3155
|
+
function Zi(e) {
|
|
3153
3156
|
return Object.keys(e).some(
|
|
3154
3157
|
(a) => a !== "enabled" && a !== "colorRanges" && e[a] !== void 0
|
|
3155
3158
|
);
|
|
3156
3159
|
}
|
|
3157
|
-
function
|
|
3160
|
+
function er(e) {
|
|
3158
3161
|
return (e == null ? void 0 : e.enabled) === !1 || (e == null ? void 0 : e.enabled) === "false";
|
|
3159
3162
|
}
|
|
3160
|
-
function
|
|
3163
|
+
function tr(e) {
|
|
3161
3164
|
const a = e.card, t = a.preferences;
|
|
3162
3165
|
if (!t) return;
|
|
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(
|
|
3166
|
+
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(qo(o)) : void 0, l = i && Zi(i) ? Be(No(i)) : void 0;
|
|
3164
3167
|
if (a.type === "kpi") {
|
|
3165
|
-
if (
|
|
3168
|
+
if (er(i) && e.unconverted.push({
|
|
3166
3169
|
path: "preferences.formatNumber.enabled",
|
|
3167
3170
|
reason: "raw_display",
|
|
3168
3171
|
detail: "Formatting is switched off on this KPI."
|
|
3169
|
-
}),
|
|
3172
|
+
}), Mi(a)) {
|
|
3170
3173
|
const c = d ?? l, h = s == null ? void 0 : s.queryComparisonPolarity;
|
|
3171
3174
|
(c || h) && (t.sqlKpiValue = {
|
|
3172
3175
|
...t.sqlKpiValue,
|
|
@@ -3181,7 +3184,7 @@ function Zi(e) {
|
|
|
3181
3184
|
se(a, "metricColumns").forEach((h) => {
|
|
3182
3185
|
d ? ot(e, h, d, "preferences.kpiVisualOptions.formatOptions") : l && !h.format && ot(e, h, l, "preferences.formatNumber");
|
|
3183
3186
|
});
|
|
3184
|
-
|
|
3187
|
+
ar(e, i);
|
|
3185
3188
|
} else if (l) {
|
|
3186
3189
|
const c = se(a, "metricColumns");
|
|
3187
3190
|
vs(a) ? e.unconverted.push({
|
|
@@ -3202,11 +3205,11 @@ function Zi(e) {
|
|
|
3202
3205
|
for (const c of ["numberAxisFormat", "columnSettings"])
|
|
3203
3206
|
ke(t, [c]) && e.changes.push({ path: `preferences.${c}`, action: "removed" });
|
|
3204
3207
|
}
|
|
3205
|
-
function
|
|
3208
|
+
function ar(e, a) {
|
|
3206
3209
|
var n;
|
|
3207
3210
|
const t = a == null ? void 0 : a.decimalPlaces, s = e.card.preferences;
|
|
3208
3211
|
if (typeof t != "number" || ((n = s.comparisonPresentation) == null ? void 0 : n.precision) !== void 0) return;
|
|
3209
|
-
const o =
|
|
3212
|
+
const o = Qo(t);
|
|
3210
3213
|
o !== void 0 && (s.comparisonPresentation = {
|
|
3211
3214
|
...s.comparisonPresentation,
|
|
3212
3215
|
precision: o
|
|
@@ -3216,24 +3219,24 @@ function er(e, a) {
|
|
|
3216
3219
|
to: "preferences.comparisonPresentation.precision"
|
|
3217
3220
|
}));
|
|
3218
3221
|
}
|
|
3219
|
-
const
|
|
3220
|
-
function
|
|
3222
|
+
const sr = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
|
|
3223
|
+
function or(e) {
|
|
3221
3224
|
const a = e.card.preferences;
|
|
3222
3225
|
if (a)
|
|
3223
|
-
for (const t of
|
|
3226
|
+
for (const t of Li) {
|
|
3224
3227
|
const s = a[t];
|
|
3225
3228
|
if (!ee(s)) continue;
|
|
3226
3229
|
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");
|
|
3227
3230
|
if (l === "raw" || d === void 0 && i === "none")
|
|
3228
3231
|
e.unconverted.push({ path: `${o}.format`, reason: "raw_display", detail: "Data labels show raw values." });
|
|
3229
3232
|
else if (l === "override") {
|
|
3230
|
-
const c = n && n.type ? n : i &&
|
|
3233
|
+
const c = n && n.type ? n : i && sr.has(i) ? { ...n, type: i } : n, h = c ? Be(Po(c, { preserveOmittedProperties: !0 })) : void 0;
|
|
3231
3234
|
h && (s.valueFormat = h, e.changes.push({ path: `${o}.formatOptions`, action: "moved", to: `${o}.valueFormat` }));
|
|
3232
3235
|
}
|
|
3233
3236
|
ke(s, ["formatMode", "mode", "formatOptions", ...t === "dataLabelsConfig" ? ["format"] : []]) && e.changes.push({ path: `${o}.formatMode`, action: "removed" });
|
|
3234
3237
|
}
|
|
3235
3238
|
}
|
|
3236
|
-
function
|
|
3239
|
+
function nr(e) {
|
|
3237
3240
|
var s;
|
|
3238
3241
|
const a = (s = e.card.config) == null ? void 0 : s.matrix, t = ee(a) && ee(a.presentation) ? a.presentation : void 0;
|
|
3239
3242
|
if (t)
|
|
@@ -3246,27 +3249,27 @@ function sr(e) {
|
|
|
3246
3249
|
}
|
|
3247
3250
|
}
|
|
3248
3251
|
}
|
|
3249
|
-
function
|
|
3252
|
+
function ir(e, a = {}) {
|
|
3250
3253
|
const t = { card: structuredClone(e), changes: [], unconverted: [] };
|
|
3251
3254
|
for (const s of Mt)
|
|
3252
3255
|
se(t.card, s).forEach((o, n) => {
|
|
3253
|
-
ee(o) &&
|
|
3256
|
+
ee(o) && Gi(t, o, s, `config.${s}[${n}]`);
|
|
3254
3257
|
});
|
|
3255
|
-
return
|
|
3258
|
+
return Ki(t), Xi(t), tr(t), or(t), nr(t), ji(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
|
|
3256
3259
|
}
|
|
3257
|
-
const
|
|
3258
|
-
function
|
|
3260
|
+
const rr = "__semaphor_unassigned_trigger__", dr = "__NULL__";
|
|
3261
|
+
function lr(e) {
|
|
3259
3262
|
var a, t;
|
|
3260
3263
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
3261
3264
|
}
|
|
3262
|
-
function
|
|
3265
|
+
function cr(e) {
|
|
3263
3266
|
const a = e.config;
|
|
3264
3267
|
return a ? e.type === "detailTable" ? a.detailColumns ?? [] : [...a.detailColumns ?? [], ...a.metricColumns ?? [], ...a.groupByColumns ?? []] : [];
|
|
3265
3268
|
}
|
|
3266
3269
|
function Ea(e) {
|
|
3267
3270
|
return [e.id, e.alias, e.name, e.qualifiedFieldName, e.label];
|
|
3268
3271
|
}
|
|
3269
|
-
function
|
|
3272
|
+
function ur(e, a) {
|
|
3270
3273
|
var c, h;
|
|
3271
3274
|
const t = ((c = e.config) == null ? void 0 : c.metricColumns) ?? [], s = ((h = e.config) == null ? void 0 : h.pivotByColumns) ?? [];
|
|
3272
3275
|
if (t.length !== 1 || s.length !== 1) return { reason: "pivot_key_form" };
|
|
@@ -3275,16 +3278,16 @@ function lr(e, a) {
|
|
|
3275
3278
|
ref: {
|
|
3276
3279
|
kind: "pivot",
|
|
3277
3280
|
metricId: o.id,
|
|
3278
|
-
members: [{ fieldId: n.id, value: a ===
|
|
3281
|
+
members: [{ fieldId: n.id, value: a === dr ? null : a }]
|
|
3279
3282
|
}
|
|
3280
3283
|
};
|
|
3281
3284
|
}
|
|
3282
|
-
function
|
|
3285
|
+
function fr(e, a) {
|
|
3283
3286
|
var i, d;
|
|
3284
|
-
if (a ===
|
|
3285
|
-
if (
|
|
3286
|
-
const t =
|
|
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 ?
|
|
3287
|
+
if (a === rr) return { reason: "unassigned_trigger" };
|
|
3288
|
+
if (lr(e)) return { ref: { kind: "result", key: a } };
|
|
3289
|
+
const t = cr(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))];
|
|
3290
|
+
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 ? ur(e, a) : { reason: "no_matching_column" };
|
|
3288
3291
|
}
|
|
3289
3292
|
function qa(e, a, t, s, o) {
|
|
3290
3293
|
const n = (I, _, D) => {
|
|
@@ -3305,8 +3308,8 @@ function qa(e, a, t, s, o) {
|
|
|
3305
3308
|
columnIds: p,
|
|
3306
3309
|
applyToColumnIds: v,
|
|
3307
3310
|
conditionColumnId: b,
|
|
3308
|
-
matrix:
|
|
3309
|
-
rowRoles:
|
|
3311
|
+
matrix: x,
|
|
3312
|
+
rowRoles: S,
|
|
3310
3313
|
depth: E,
|
|
3311
3314
|
includeTotals: C,
|
|
3312
3315
|
includeSubtotals: k,
|
|
@@ -3316,8 +3319,8 @@ function qa(e, a, t, s, o) {
|
|
|
3316
3319
|
...h.length ? { columns: h } : {},
|
|
3317
3320
|
// The Matrix scope means something only on a Matrix card.
|
|
3318
3321
|
...o ? {
|
|
3319
|
-
...
|
|
3320
|
-
...
|
|
3322
|
+
...x !== void 0 ? { matrix: x } : {},
|
|
3323
|
+
...S !== void 0 ? { rowRoles: S } : {},
|
|
3321
3324
|
...E !== void 0 ? { depth: E } : {},
|
|
3322
3325
|
...C !== void 0 ? { includeTotals: C } : {},
|
|
3323
3326
|
...k !== void 0 ? { includeSubtotals: k } : {}
|
|
@@ -3329,7 +3332,7 @@ function qa(e, a, t, s, o) {
|
|
|
3329
3332
|
target: N
|
|
3330
3333
|
};
|
|
3331
3334
|
}
|
|
3332
|
-
function
|
|
3335
|
+
function mr(e, a) {
|
|
3333
3336
|
var o;
|
|
3334
3337
|
const t = (o = Ma(e)) == null ? void 0 : o.value;
|
|
3335
3338
|
if (!t) return [];
|
|
@@ -3338,12 +3341,12 @@ function ur(e, a) {
|
|
|
3338
3341
|
if (!n || typeof n != "object") return [];
|
|
3339
3342
|
const { start: d, end: l, color: c } = n, h = s(d), p = s(l);
|
|
3340
3343
|
if (Number.isNaN(h) || Number.isNaN(p) || h > p || h === 1 / 0 || p === -1 / 0) return [];
|
|
3341
|
-
const v = h === -1 / 0 ? void 0 : h, b = p === 1 / 0 ? void 0 : p,
|
|
3342
|
-
return [{ id: `kpi-color-range-${i + 1}`, condition:
|
|
3344
|
+
const v = h === -1 / 0 ? void 0 : h, b = p === 1 / 0 ? void 0 : p, x = v !== void 0 && b !== void 0 ? { kind: "between", column: t, min: v, max: b, inclusive: !0 } : v !== void 0 ? { kind: "comparison", column: t, operator: "gte", value: v } : b !== void 0 ? { kind: "comparison", column: t, operator: "lte", value: b } : { kind: "blank", column: t, isBlank: !1 }, S = typeof c == "string" ? c : "";
|
|
3345
|
+
return [{ id: `kpi-color-range-${i + 1}`, condition: x, target: { level: "cell" }, style: { textColor: S } }];
|
|
3343
3346
|
}).reverse();
|
|
3344
3347
|
}
|
|
3345
|
-
function
|
|
3346
|
-
var h, p, v, b,
|
|
3348
|
+
function hr(e) {
|
|
3349
|
+
var h, p, v, b, x, S, E;
|
|
3347
3350
|
const a = structuredClone(e), t = [], s = [], o = [], n = (C) => {
|
|
3348
3351
|
t.some((k) => k.from.startsWith(C)) || t.push({ ruleId: "", action: "removed", from: C });
|
|
3349
3352
|
}, i = (h = a.preferences) == null ? void 0 : h.tablePrefs;
|
|
@@ -3355,13 +3358,13 @@ function fr(e) {
|
|
|
3355
3358
|
t.push({ ruleId: F.id, action: "removed", from: `${k}.rules[${w}]` });
|
|
3356
3359
|
return;
|
|
3357
3360
|
}
|
|
3358
|
-
const N = qa(F, (_) =>
|
|
3361
|
+
const N = qa(F, (_) => fr(a, _), `${k}.rules[${w}]`, s, !1);
|
|
3359
3362
|
N && (o.push(N), t.push({ ruleId: F.id, action: "moved", from: `${k}.rules[${w}]` }));
|
|
3360
3363
|
}), delete i.conditionalFormatting, s.some((F) => F.path.startsWith(k)) || n(k);
|
|
3361
3364
|
}
|
|
3362
3365
|
const d = (v = (p = a.config) == null ? void 0 : p.matrix) == null ? void 0 : v.presentation;
|
|
3363
3366
|
if (d && ue(d, "conditionalFormatting")) {
|
|
3364
|
-
const C = d.conditionalFormatting, k = "config.matrix.presentation.conditionalFormatting", y = new Set((
|
|
3367
|
+
const C = d.conditionalFormatting, k = "config.matrix.presentation.conditionalFormatting", y = new Set((x = (b = a.config) == null ? void 0 : b.matrix) == null ? void 0 : x.spec.measures.map((F) => F.id));
|
|
3365
3368
|
((C == null ? void 0 : C.rules) ?? []).forEach((F, w) => {
|
|
3366
3369
|
const N = qa(
|
|
3367
3370
|
F,
|
|
@@ -3377,14 +3380,14 @@ function fr(e) {
|
|
|
3377
3380
|
if (c && ue(c, "colorRanges")) {
|
|
3378
3381
|
const C = Array.isArray(c.colorRanges) ? c.colorRanges : [];
|
|
3379
3382
|
if (a.type === "kpi") {
|
|
3380
|
-
const k =
|
|
3383
|
+
const k = mr(a, C);
|
|
3381
3384
|
o.push(...k), k.forEach((y) => t.push({ ruleId: y.id, action: "moved", from: "preferences.formatNumber.colorRanges" }));
|
|
3382
3385
|
}
|
|
3383
3386
|
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" });
|
|
3384
3387
|
}
|
|
3385
3388
|
if (!t.length && !s.length) return { card: e, changes: [], unresolved: [] };
|
|
3386
3389
|
if (o.length) {
|
|
3387
|
-
const C = ((E = (
|
|
3390
|
+
const C = ((E = (S = a.preferences) == null ? void 0 : S.conditionalFormatting) == null ? void 0 : E.rules) ?? [], k = new Set(C.map((y) => y.id));
|
|
3388
3391
|
a.preferences = {
|
|
3389
3392
|
...a.preferences,
|
|
3390
3393
|
conditionalFormatting: {
|
|
@@ -3395,14 +3398,14 @@ function fr(e) {
|
|
|
3395
3398
|
}
|
|
3396
3399
|
return { card: a, changes: t, unresolved: s };
|
|
3397
3400
|
}
|
|
3398
|
-
function
|
|
3399
|
-
const { only: t, ...s } = a, o = t === "rules" ? void 0 :
|
|
3401
|
+
function Qr(e, a = {}) {
|
|
3402
|
+
const { only: t, ...s } = a, o = t === "rules" ? void 0 : ir(e, s), n = t === "formats" ? void 0 : hr((o == null ? void 0 : o.card) ?? e);
|
|
3400
3403
|
return { card: (n == null ? void 0 : n.card) ?? (o == null ? void 0 : o.card) ?? e, formats: o, rules: n };
|
|
3401
3404
|
}
|
|
3402
|
-
function
|
|
3405
|
+
function Hr(e) {
|
|
3403
3406
|
return e.kind === "metric" ? e.resultId : e.measureId;
|
|
3404
3407
|
}
|
|
3405
|
-
function
|
|
3408
|
+
function pr(e) {
|
|
3406
3409
|
if (e.op === "dashboard.update" || e.op === "dashboard.style" || e.op === "sheet.update") return !0;
|
|
3407
3410
|
if (e.op !== "card.update") return !1;
|
|
3408
3411
|
switch (e.update.kind) {
|
|
@@ -3414,536 +3417,546 @@ function mr(e) {
|
|
|
3414
3417
|
return !1;
|
|
3415
3418
|
}
|
|
3416
3419
|
}
|
|
3417
|
-
function
|
|
3418
|
-
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(
|
|
3420
|
+
function Yr(e) {
|
|
3421
|
+
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(pr) ? "not_needed" : "needed";
|
|
3419
3422
|
}
|
|
3420
3423
|
export {
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3424
|
+
Xr as AGGREGATES,
|
|
3425
|
+
Zr as AUTOMATIC_FALLBACK_GRAIN,
|
|
3426
|
+
ed as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
3427
|
+
go as AUTOMATIC_TIME_GRAIN,
|
|
3428
|
+
td as CALCULATED_FIELDS_GROUP_ID,
|
|
3429
|
+
ad as CALCULATED_FIELDS_GROUP_NAME,
|
|
3430
|
+
sd as CARD_CONFIG_KEY_CLASSES,
|
|
3431
|
+
od as CARD_KEY_CLASSES,
|
|
3432
|
+
Io as CARD_QUERY_CONFIG_KEYS,
|
|
3433
|
+
Lr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
3434
|
+
Pr as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
3435
|
+
Sp as CARD_SURFACES,
|
|
3436
|
+
nd as CARD_TYPES,
|
|
3434
3437
|
De as CARD_TYPE_RULES,
|
|
3435
3438
|
je as CHART_COLORS_BOUNDS,
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3439
|
+
id as CHIP_VALUE_COLUMN,
|
|
3440
|
+
rd as COLUMN_KEY_CLASSES,
|
|
3441
|
+
dd as COLUMN_PRESENTATION_KEYS,
|
|
3442
|
+
ld as COMPARISON_POLARITIES,
|
|
3443
|
+
fm as COMPARISON_SIGN_WORDS,
|
|
3444
|
+
cd as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
3445
|
+
ud as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
3446
|
+
fd as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
3447
|
+
md as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
3448
|
+
hd as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
3449
|
+
pd as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
3450
|
+
gd as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
3451
|
+
bd as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
3452
|
+
yd as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
3453
|
+
vd as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
3454
|
+
xp as CORNER_STEPS,
|
|
3452
3455
|
le as CardQueryRequestError,
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3456
|
+
_d as ControlResolutionError,
|
|
3457
|
+
Id as DASHBOARD_CHANGE_OPS,
|
|
3458
|
+
Cd as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
3459
|
+
mm as DASHBOARD_FILTER_OPERATIONS,
|
|
3460
|
+
$d as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
|
|
3461
|
+
mn as DASHBOARD_STYLE_NUMBER_BOUNDS,
|
|
3462
|
+
wd as DEFAULT_DETAIL_DATE_STYLE,
|
|
3463
|
+
Sd as DETAIL_DATE_STYLES,
|
|
3464
|
+
hm as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
3465
|
+
pm as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
3466
|
+
xd as DOMAIN_EDIT_CHANGE_OPS,
|
|
3467
|
+
kd as DYNAMIC_TEXT_MESSAGE,
|
|
3468
|
+
Td as DashboardFilterMappingContractError,
|
|
3469
|
+
Rd as ExecutionControlContractError,
|
|
3470
|
+
Ad as FILTER_OPERATORS,
|
|
3468
3471
|
ua as FORMAT_WORDS,
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3472
|
+
Dd as FilterModelError,
|
|
3473
|
+
Fd as KPI_MEASURES_SHOWN,
|
|
3474
|
+
qp as KPI_TREND_GRAINS,
|
|
3475
|
+
Np as KPI_TREND_PERIODS,
|
|
3476
|
+
Od as LEGACY_TABLE_CARD_TYPES,
|
|
3477
|
+
rh as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
|
|
3475
3478
|
ya as MAX_CREATE_CHANGES,
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
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
|
-
|
|
3479
|
+
Ed as MAX_DATE_GRAIN_POINTS,
|
|
3480
|
+
qd as MAX_NEXT_STEP_CHARS,
|
|
3481
|
+
To as MAX_PROPOSED_CHANGES,
|
|
3482
|
+
Nd as MAX_QUERY_LIMIT,
|
|
3483
|
+
Pd as MAX_TEXT_WORDS,
|
|
3484
|
+
Ld as MEASURE_CALCULATION_SUMMARIES,
|
|
3485
|
+
Nh as NEW_CARD_TYPE,
|
|
3486
|
+
Md as NON_ADDITIVE_SUM_OF_ROWS_HINT,
|
|
3487
|
+
Bd as PUBLIC_TRANSFORM_KIND,
|
|
3488
|
+
Vd as QUERY_ASPECTS,
|
|
3489
|
+
Gd as QUERY_CONFIG_KEY_ASPECTS,
|
|
3490
|
+
Ph as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
|
|
3491
|
+
jd as RESERVED_VARIABLE_NAMES,
|
|
3492
|
+
Kd as SEE_RECORDS_CARD_TYPES,
|
|
3493
|
+
Wd as SEE_RECORDS_LIMITS,
|
|
3494
|
+
Ud as SEE_RECORDS_MAX_PAGE,
|
|
3495
|
+
Lh as SEE_RECORDS_MESSAGES,
|
|
3496
|
+
Qd as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
3497
|
+
Hd as SETTINGS_BY_KIND,
|
|
3498
|
+
Rp as SHELF_FIELD_KEYS,
|
|
3499
|
+
kp as SPACING_STEPS,
|
|
3500
|
+
Yd as TIME_GRAINS,
|
|
3501
|
+
zd as TOOLBAR_FILTER_REACH_FIELDS,
|
|
3502
|
+
gm as VARIABLE_CARD_TYPE,
|
|
3503
|
+
bm as VARIABLE_COMPARISON_PARTS,
|
|
3504
|
+
Jd as VARIABLE_GETS,
|
|
3505
|
+
ym as VARIABLE_LIST_CAP,
|
|
3506
|
+
vm as VARIABLE_LIST_SHOWN,
|
|
3507
|
+
Xd as VARIABLE_NAME_PATTERN,
|
|
3508
|
+
_m as VARIABLE_VALUE_PART,
|
|
3509
|
+
Zd as WINDOW_ERROR_CODES,
|
|
3510
|
+
el as WINDOW_WARNING_CODES,
|
|
3511
|
+
tl as acceptedColumnRefKinds,
|
|
3512
|
+
al as acceptsGrainThatRan,
|
|
3513
|
+
sl as analyticsFilterSchema,
|
|
3514
|
+
ol as appliedBindingControlValue,
|
|
3515
|
+
dh as applyCardReferenceRemapping,
|
|
3516
|
+
nl as applyCardSettings,
|
|
3517
|
+
xt as applyDashboardOperations,
|
|
3518
|
+
il as applyFilterApplicability,
|
|
3519
|
+
Mh as applyFilterSettingsChange,
|
|
3520
|
+
lh as applyGroupByOverride,
|
|
3521
|
+
rl as applyLinkedClickToFilterOverrides,
|
|
3522
|
+
dl as applyMeasureCalculations,
|
|
3523
|
+
ll as applyOptionDependencyOverride,
|
|
3524
|
+
cl as applyVariableChange,
|
|
3525
|
+
ul as asDateDefaultPointCondition,
|
|
3526
|
+
fl as automaticDateGrain,
|
|
3527
|
+
bo as automaticGrainSupport,
|
|
3528
|
+
ml as blockClause,
|
|
3529
|
+
hl as blockSentence,
|
|
3530
|
+
Vp as bookmarkImpactSentence,
|
|
3531
|
+
Bh as buildCardExportFormatOptions,
|
|
3532
|
+
ch as buildCardExportQueryContext,
|
|
3533
|
+
Vh as buildCardExportRequest,
|
|
3534
|
+
Gh as buildCardExportRequestFromOptions,
|
|
3535
|
+
jh as buildColumnCatalog,
|
|
3536
|
+
pl as buildControlDefinitionIndex,
|
|
3537
|
+
uo as buildDashboardCardSourceIndex,
|
|
3538
|
+
Kh as buildEntityColumnGroup,
|
|
3539
|
+
Wh as buildFilterInputFromDefinition,
|
|
3540
|
+
en as buildFilterInputFromField,
|
|
3541
|
+
gl as buildLinkedClickToFilterOverrides,
|
|
3542
|
+
bl as buildProposeChangeInputSchema,
|
|
3543
|
+
yl as buildSavedEditorCard,
|
|
3544
|
+
Uh as buildTableExportFormatOptions,
|
|
3545
|
+
vl as calculationAddSchema,
|
|
3546
|
+
Qh as cardColumnRefForKey,
|
|
3547
|
+
_l as cardColumnRefSchema,
|
|
3548
|
+
Do as cardConditionalFormattingSchema,
|
|
3549
|
+
Il as cardConfigAsRan,
|
|
3550
|
+
Cl as cardQueryPatchSchema,
|
|
3551
|
+
$l as cardReachesDatasetThroughRelationships,
|
|
3549
3552
|
Ms as cardSettingsKind,
|
|
3550
3553
|
Ps as cardTypeSentenceName,
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3554
|
+
wl as carryColumnSettings,
|
|
3555
|
+
Co as changeCardType,
|
|
3556
|
+
Sl as changeMatrixEditor,
|
|
3557
|
+
Fo as checkConditionalRuleColumns,
|
|
3555
3558
|
Ot as checkDataVariable,
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3559
|
+
xl as checkDetailDateFormat,
|
|
3560
|
+
Ur as checkPresentationStores,
|
|
3561
|
+
kl as chipOverVariable,
|
|
3562
|
+
Tl as clickToFilterSettingsSchema,
|
|
3563
|
+
Rl as collectJoinPlanIdentifiers,
|
|
3561
3564
|
Ha as collectVariableReferences,
|
|
3562
3565
|
Pa as columnDataset,
|
|
3563
|
-
|
|
3566
|
+
$o as columnFieldKey,
|
|
3564
3567
|
Ka as columnKeys,
|
|
3565
|
-
|
|
3568
|
+
Al as columnRefIssue,
|
|
3566
3569
|
ca as columnRefKey,
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3570
|
+
Dl as columnSettingsInputSchema,
|
|
3571
|
+
Im as comparisonPartPresentation,
|
|
3572
|
+
uh as composeCardReferenceRemapping,
|
|
3573
|
+
Fl as conditionalRuleSchema,
|
|
3574
|
+
Yr as confirmClassFor,
|
|
3575
|
+
Ol as contextChangeSchema,
|
|
3576
|
+
El as controlBindingExecutionSchema,
|
|
3577
|
+
ql as controlDefinitionExecutionSchema,
|
|
3578
|
+
lo as controlRefusal,
|
|
3579
|
+
Vr as convertLegacyStyle,
|
|
3580
|
+
Nl as createDashboardFilterBindingId,
|
|
3581
|
+
Rh as createMatrixAuthoringDraft,
|
|
3582
|
+
Ah as createMatrixConfig,
|
|
3583
|
+
an as createNewCard,
|
|
3584
|
+
Pl as createTargetSchema,
|
|
3585
|
+
tn as createTextCard,
|
|
3586
|
+
Ll as customDetailDateFormat,
|
|
3587
|
+
Ml as customGroupedDateFormat,
|
|
3588
|
+
Bl as dashboardCardFilterSourceInventoryContains,
|
|
3589
|
+
oo as dashboardChangeSchema,
|
|
3590
|
+
Vl as dashboardFilterTargetMatchesLogicalValue,
|
|
3591
|
+
Cm as dashboardFilterValueTypeForDataType,
|
|
3592
|
+
jo as dashboardInputScopeIncludesDocumentSheets,
|
|
3593
|
+
Nn as dashboardStyleAsEdit,
|
|
3594
|
+
Gl as dashboardStyleChangeSchema,
|
|
3591
3595
|
za as dashboardStyleLayers,
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3596
|
+
jl as dateDefaultPointCondition,
|
|
3597
|
+
Kl as decideClickToFilterCardLevel,
|
|
3598
|
+
Wl as decideClickToFilterField,
|
|
3599
|
+
Ul as defaultClickToFilterSettings,
|
|
3600
|
+
$n as defaultVariableGet,
|
|
3601
|
+
Ap as defaultVariableName,
|
|
3602
|
+
Gp as describeBookmarkImpact,
|
|
3603
|
+
Ql as describeDashboardFilterCardReach,
|
|
3600
3604
|
$e as describeDashboardFilterCardReachDetail,
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3605
|
+
Hh as describeDateWindow,
|
|
3606
|
+
Yh as describeFilterReachEntry,
|
|
3607
|
+
zh as describeKpiDateSection,
|
|
3608
|
+
Jh as describeKpiTileDate,
|
|
3609
|
+
Pp as describeKpiTrendRow,
|
|
3610
|
+
Hl as describeMeasureCalculations,
|
|
3611
|
+
ro as describeQueryChange,
|
|
3612
|
+
Xh as describeRelationshipRoute,
|
|
3613
|
+
Zh as describeRelationshipSkip,
|
|
3614
|
+
Yl as describeTableColumnTotal,
|
|
3615
|
+
zl as detailDateDisplayFormat,
|
|
3616
|
+
Jl as detailDateFormatProblem,
|
|
3617
|
+
Xl as detailDateTwelveHourAvailable,
|
|
3618
|
+
$m as documentInputTextUsage,
|
|
3619
|
+
wm as doesDashboardInputApplyToTarget,
|
|
3620
|
+
Sm as doesDashboardInputReachFilterTarget,
|
|
3621
|
+
xm as doesDashboardInputSurviveCarriedContext,
|
|
3622
|
+
Zl as doesToolbarFilterReachTab,
|
|
3623
|
+
ep as domainCalculatedFields,
|
|
3624
|
+
ec as domainEditChangeSchema,
|
|
3625
|
+
tc as domainEditChangeSchemas,
|
|
3626
|
+
Dp as draftBlocker,
|
|
3627
|
+
wn as draftFromVariable,
|
|
3628
|
+
ac as drawsDetailDatesInBrowser,
|
|
3629
|
+
sc as dropMatrixEditorField,
|
|
3630
|
+
Kp as editBrandStyle,
|
|
3631
|
+
hn as editDashboardStyle,
|
|
3632
|
+
oc as estimateDateGrainPoints,
|
|
3633
|
+
nc as evaluateConditionalRules,
|
|
3634
|
+
ic as explicitComparisonSchema,
|
|
3635
|
+
rc as fieldAsRan,
|
|
3636
|
+
Js as fieldIdentityKey,
|
|
3637
|
+
dc as fieldRef,
|
|
3638
|
+
lc as fieldRefSchema,
|
|
3639
|
+
cc as fillFrameSemanticCardDomains,
|
|
3640
|
+
uc as fillSemanticCardDomain,
|
|
3641
|
+
fc as fillSemanticCardDomains,
|
|
3642
|
+
mc as filterApplicabilityContextForCard,
|
|
3643
|
+
tp as filterReachPreviewAnswers,
|
|
3644
|
+
hc as filterValueReachForCard,
|
|
3645
|
+
pc as filterValueSemanticDataset,
|
|
3646
|
+
gc as findBorrowedSelectionBinding,
|
|
3640
3647
|
nt as findCatalogField,
|
|
3641
|
-
|
|
3642
|
-
|
|
3648
|
+
bc as findDashboardCardExecutableSource,
|
|
3649
|
+
yc as findDashboardCardPinnedCatalogSource,
|
|
3643
3650
|
Ua as findDashboardFilterTarget,
|
|
3644
|
-
|
|
3651
|
+
vc as findDashboardSqlPinnedCatalogSource,
|
|
3645
3652
|
gs as findRetiredCardPresentationFields,
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3653
|
+
Wr as findRetiredPresentationFields,
|
|
3654
|
+
zs as findSortedColumn,
|
|
3655
|
+
ap as flattenEntityColumns,
|
|
3656
|
+
_c as foldPrototypeDocumentInputs,
|
|
3657
|
+
Ic as formatFilterModelIssues,
|
|
3658
|
+
Ss as formatResolvedPrimaryDateFieldIssues,
|
|
3659
|
+
Cc as formatSkippedFilterWarnings,
|
|
3660
|
+
$c as fromEditableRules,
|
|
3661
|
+
sp as getCalculatedFieldAggregateOverrides,
|
|
3662
|
+
wc as getCalculatedFieldNamespace,
|
|
3663
|
+
op as getCalculatedFieldParameters,
|
|
3664
|
+
np as getCalculatedFieldShelfOverrides,
|
|
3665
|
+
Sc as getCardDefinition,
|
|
3666
|
+
ip as getClickContextFromTable,
|
|
3667
|
+
xc as getColumnCatalogFieldId,
|
|
3668
|
+
kc as getDashboardFilterSubscriptionHint,
|
|
3669
|
+
Tc as getDashboardGlobalDateFilter,
|
|
3670
|
+
km as getDocumentKpiSectionShapeIssues,
|
|
3671
|
+
Tm as getDocumentSectionCards,
|
|
3672
|
+
rp as getDomainCalculatedSelectionOverrides,
|
|
3673
|
+
Rc as getFieldAggregationOptions,
|
|
3674
|
+
Ac as getMatrixBindingTargets,
|
|
3675
|
+
Dh as getMatrixLevelLabel,
|
|
3676
|
+
Fh as getMatrixMeasureLabel,
|
|
3677
|
+
Dc as getStableDomainCalculatedFieldId,
|
|
3678
|
+
Fc as getTemporalBucketAuthoringOptions,
|
|
3679
|
+
Oc as getTemporalBucketAuthoringSelection,
|
|
3680
|
+
Ec as grainChoicePatch,
|
|
3681
|
+
qc as grainControlApplies,
|
|
3682
|
+
Nc as groupedDateDisplayFormat,
|
|
3683
|
+
Qs as groupedDateDisplayPatterns,
|
|
3684
|
+
Pc as handleSchema,
|
|
3685
|
+
Lc as hasDashboardFilterSubscription,
|
|
3686
|
+
dp as hasSeeRecordsMeasureFilter,
|
|
3678
3687
|
ue as hasStoredKey,
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3688
|
+
Mc as hasTextCardRichWords,
|
|
3689
|
+
Bc as hasToolbarFilterReachField,
|
|
3690
|
+
fh as hostFilterValueFor,
|
|
3691
|
+
mh as hostFilterValuesToSlots,
|
|
3692
|
+
Vc as inferSemanticDomainIdFromSelectedEntities,
|
|
3693
|
+
Gc as inspectMatrixCardConfig,
|
|
3694
|
+
hh as isAdHocFilterValueOnTab,
|
|
3685
3695
|
$a as isAggregateGet,
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3696
|
+
jc as isAllowedDashboardInputScopeCombination,
|
|
3697
|
+
Kc as isCardType,
|
|
3698
|
+
Rm as isDashboardFilterOperationCompatible,
|
|
3689
3699
|
Qa as isDashboardInputOnTab,
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3700
|
+
Am as isDashboardInputOwnedBySheet,
|
|
3701
|
+
Dm as isDashboardInputScopeEmpty,
|
|
3702
|
+
Fm as isDashboardTargetIdTaken,
|
|
3703
|
+
Wc as isDatabaseEntityReference,
|
|
3704
|
+
Uc as isGroupedDate,
|
|
3705
|
+
Us as isGroupedTimeGrain,
|
|
3706
|
+
Qc as isLegacyTableCard,
|
|
3707
|
+
Hc as isPresentationCurrencyBinding,
|
|
3708
|
+
Yc as isSeeRecordsCardType,
|
|
3709
|
+
zc as isSemanticAutoJoinCard,
|
|
3710
|
+
Jc as isSemaphorCartesianChartType,
|
|
3711
|
+
Bo as isSqlKpi,
|
|
3712
|
+
Xc as isStructuralControlBinding,
|
|
3713
|
+
Zc as isTextCardRichContent,
|
|
3714
|
+
eu as isValidControlOptionPresentation,
|
|
3715
|
+
Om as isVariableComparisonPart,
|
|
3716
|
+
tu as isWhenRun,
|
|
3717
|
+
au as kpiSegmentMetricId,
|
|
3718
|
+
su as kpiShowsTrend,
|
|
3708
3719
|
Ns as kpiTrendBy,
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3720
|
+
lp as kpiTrendByHint,
|
|
3721
|
+
Ys as labelAt,
|
|
3722
|
+
ou as layoutArrangeSchema,
|
|
3723
|
+
ph as legacyTableRoutingIds,
|
|
3724
|
+
gh as legacyTableRoutingTarget,
|
|
3725
|
+
nu as linkedClickToFilterOverridesSchema,
|
|
3726
|
+
bh as listAdHocFilterValuesOnTab,
|
|
3727
|
+
Se as listDashboardCardLocations,
|
|
3728
|
+
iu as listDashboardFilterDefinitions,
|
|
3729
|
+
ru as listDashboardFilterInputsOnTab,
|
|
3719
3730
|
Wa as listDashboardFilterTargets,
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3731
|
+
Em as listDashboardInputReachKeys,
|
|
3732
|
+
Vo as listDashboardInputScopeExceptedCardIds,
|
|
3733
|
+
Go as listDashboardInputScopeExceptedSheetIds,
|
|
3734
|
+
du as listDashboardInputsTolerantly,
|
|
3724
3735
|
Et as listDashboardTabTargets,
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3736
|
+
qm as listDataVariablePlaces,
|
|
3737
|
+
yh as listFilterInputValueTargets,
|
|
3738
|
+
Nm as listFilterTargetScopeTargets,
|
|
3739
|
+
Pm as listReachedVariableTargets,
|
|
3740
|
+
Lm as listReferencedDataVariableIds,
|
|
3741
|
+
lu as listStoredFilterDefinitions,
|
|
3742
|
+
Mm as listVariableScopeTargets,
|
|
3743
|
+
Bm as mapDashboardCards,
|
|
3744
|
+
Vm as mapDocumentSectionCards,
|
|
3745
|
+
cu as mapRuleColumns,
|
|
3746
|
+
uu as matchColumns,
|
|
3747
|
+
vh as matrixCatalogSources,
|
|
3748
|
+
xo as matrixColumnKeys,
|
|
3749
|
+
fu as matrixColumnsSchema,
|
|
3750
|
+
mu as matrixDefinitionFieldRefs,
|
|
3751
|
+
hu as matrixDefinitionFields,
|
|
3752
|
+
pu as matrixDefinitionSources,
|
|
3753
|
+
gu as matrixEditorCatalogFromFields,
|
|
3754
|
+
_h as matrixExecutionSources,
|
|
3755
|
+
bu as measureCalculationOptions,
|
|
3756
|
+
yu as measureComparisonSchema,
|
|
3757
|
+
vu as measureRefSchema,
|
|
3758
|
+
_u as measureTransformSchema,
|
|
3759
|
+
Oh as mergeMatrixSorts,
|
|
3760
|
+
ho as metricCardQuerySchema,
|
|
3761
|
+
So as moveMatrixLevel,
|
|
3762
|
+
Fp as newVariableDraft,
|
|
3763
|
+
Op as newVariableId,
|
|
3764
|
+
Iu as normalizeClickToFilterSettings,
|
|
3765
|
+
Cu as normalizeDashboardInputs,
|
|
3766
|
+
$u as normalizeLegacyLinkedTargetOverrides,
|
|
3767
|
+
wu as occurrenceKeys,
|
|
3757
3768
|
ts as outlineCalendar,
|
|
3758
|
-
|
|
3769
|
+
Kr as outlineDashboard,
|
|
3759
3770
|
Le as outlineFilter,
|
|
3760
3771
|
ss as outlineFilters,
|
|
3761
3772
|
mt as ownsItsAggregate,
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3773
|
+
Br as parseCardQueryRequest,
|
|
3774
|
+
Dn as parseCardQueryRequestContext,
|
|
3775
|
+
Mr as parseCardQueryRequestExtras,
|
|
3776
|
+
Su as parseColumnRefKey,
|
|
3777
|
+
cp as parseDashboardStyle,
|
|
3778
|
+
xu as parseExecutionControlBindingsShallow,
|
|
3768
3779
|
ks as parseExecutionControlContext,
|
|
3769
|
-
|
|
3780
|
+
ku as parseExecutionControlContract,
|
|
3770
3781
|
ga as planCardLabels,
|
|
3771
3782
|
pa as planCardRequery,
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3783
|
+
up as pluralDatasetLabel,
|
|
3784
|
+
Ih as prepareLoadedDashboard,
|
|
3785
|
+
Tu as previewTemporalBucketAuthoringFormat,
|
|
3786
|
+
Gm as projectDataVariableToCard,
|
|
3787
|
+
Ru as pruneUnrelatedCalculatedFilters,
|
|
3788
|
+
co as queryForm,
|
|
3789
|
+
Au as queryMeasureSchema,
|
|
3790
|
+
Du as readCardConditionalRules,
|
|
3780
3791
|
we as readCardQuery,
|
|
3781
3792
|
Ft as readCardSettings,
|
|
3782
3793
|
he as readCardSource,
|
|
3783
3794
|
qe as readCardTypeProperties,
|
|
3784
|
-
|
|
3795
|
+
Lp as readComparisonDates,
|
|
3785
3796
|
ve as readDashboardFilterModel,
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3797
|
+
Mp as readDefaultComparisonDates,
|
|
3798
|
+
Fu as readDetailDateChoice,
|
|
3799
|
+
Ou as readExactDomainCalculatedFieldReference,
|
|
3800
|
+
fp as readFilterReachResponse,
|
|
3801
|
+
Ch as readFilterValueList,
|
|
3802
|
+
Eu as readGroupedDateChoice,
|
|
3803
|
+
mp as readKpiDateContext,
|
|
3804
|
+
qu as readKpiFigure,
|
|
3805
|
+
Nu as readKpiNumber,
|
|
3806
|
+
Pu as readMatrixCardConfig,
|
|
3807
|
+
Lu as readMeasureCalculations,
|
|
3808
|
+
Mu as readSqlFilterUse,
|
|
3809
|
+
Bu as readStoredTransform,
|
|
3798
3810
|
ja as readTextCardWords,
|
|
3799
3811
|
Ze as readTextWords,
|
|
3800
|
-
|
|
3801
|
-
|
|
3812
|
+
Vu as readTransform,
|
|
3813
|
+
jm as readVariableAnswer,
|
|
3802
3814
|
ds as readVariableEditability,
|
|
3803
3815
|
Tt as readVariableSource,
|
|
3804
|
-
|
|
3805
|
-
|
|
3816
|
+
Ro as readablePresentation,
|
|
3817
|
+
Gu as rebindDashboardOptionDependencyInputId,
|
|
3806
3818
|
ha as rebuildsRole,
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3819
|
+
ju as reconcileMatrixSpecStructure,
|
|
3820
|
+
Ku as reconcileTemporalBucketAuthoringFormat,
|
|
3821
|
+
mo as recordsCardQuerySchema,
|
|
3822
|
+
ao as refDataset,
|
|
3811
3823
|
ge as refKey,
|
|
3812
3824
|
wt as refName,
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3825
|
+
Wu as registeredDomainEditChangeSchemas,
|
|
3826
|
+
Uu as relationshipAddSchema,
|
|
3827
|
+
Qu as relationshipRouteTarget,
|
|
3828
|
+
Hu as remapClickToFilterReferences,
|
|
3829
|
+
Yu as remapLinkedClickToFilterOverrides,
|
|
3830
|
+
zu as requireNormalizedDashboardInputs,
|
|
3831
|
+
Ju as resolveBindingControlValue,
|
|
3832
|
+
Km as resolveCanonicalDetailResultRawKey,
|
|
3833
|
+
Wm as resolveCanonicalResultOutputKey,
|
|
3834
|
+
Uo as resolveCanonicalResultOutputKeys,
|
|
3835
|
+
Um as resolveCanonicalResultRawKey,
|
|
3836
|
+
hp as resolveCardColumnRef,
|
|
3837
|
+
ti as resolveCardSettings,
|
|
3838
|
+
pp as resolveConditionalRules,
|
|
3839
|
+
Gr as resolveDashboardChanges,
|
|
3840
|
+
jr as resolveDashboardCreate,
|
|
3841
|
+
Xu as resolveDashboardEntitySource,
|
|
3842
|
+
Zu as resolveDashboardFilterAutomaticTarget,
|
|
3843
|
+
ef as resolveDashboardFilterInheritedTarget,
|
|
3844
|
+
tf as resolveDashboardOptionDependencies,
|
|
3845
|
+
af as resolveDashboardOptionPopulation,
|
|
3846
|
+
sf as resolveDashboardSqlFilterTarget,
|
|
3847
|
+
pn as resolveDashboardStyle,
|
|
3848
|
+
of as resolveDetailTableRawTemporalPresentation,
|
|
3849
|
+
Qm as resolveDistinctDetailRawKeys,
|
|
3850
|
+
nf as resolveFieldSelectedSource,
|
|
3851
|
+
rf as resolveGroupByFieldTarget,
|
|
3852
|
+
df as resolveKpiLayout,
|
|
3841
3853
|
Ma as resolveKpiShape,
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3854
|
+
lf as resolveKpiValueStyle,
|
|
3855
|
+
$h as resolveMatrixControlBindings,
|
|
3856
|
+
Eh as resolveMatrixDefinition,
|
|
3845
3857
|
ma as resolveMeasureCalculations,
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3858
|
+
cf as resolveMeasureTransform,
|
|
3859
|
+
uf as resolveMetricFieldTarget,
|
|
3860
|
+
ff as resolveScalarMappedValue,
|
|
3861
|
+
mf as resolveTableColumnTotal,
|
|
3862
|
+
hf as resolveTemporalBucketAuthoringFormat,
|
|
3863
|
+
xs as resolveTemporalResultOwner,
|
|
3852
3864
|
ba as resolveTextCardWords,
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3865
|
+
pf as resolveValueStyle,
|
|
3866
|
+
gf as respondsToSelectionsSchema,
|
|
3867
|
+
bf as retainConditionalRules,
|
|
3868
|
+
yf as retainedMatrixPath,
|
|
3869
|
+
Hm as rewriteDashboardInputScopeIds,
|
|
3870
|
+
wh as routeLegacyTableCard,
|
|
3871
|
+
Sh as routeLegacyTableCards,
|
|
3872
|
+
xh as routeLegacyTableFrame,
|
|
3861
3873
|
Ye as sameColumnKey,
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3874
|
+
vf as sanitizeTextCardUrl,
|
|
3875
|
+
gp as seeRecordsAvailability,
|
|
3876
|
+
bp as seeRecordsCardAvailability,
|
|
3877
|
+
Hr as seeRecordsMeasureId,
|
|
3878
|
+
yp as seeRecordsMeasureKind,
|
|
3879
|
+
vp as seeRecordsReasonHidesOffer,
|
|
3880
|
+
_f as seeRecordsRequestSchema,
|
|
3881
|
+
_p as seeRecordsRowField,
|
|
3882
|
+
If as selectDashboardOptionDependencyInputIds,
|
|
3883
|
+
Cf as selectionFieldFromExplorerField,
|
|
3884
|
+
Ip as selectionTupleFromClickContext,
|
|
3885
|
+
$f as semanticDomainIdsOfSelectedEntities,
|
|
3886
|
+
Cp as setMeasureCalculations,
|
|
3887
|
+
wf as settableCardType,
|
|
3888
|
+
Sf as sharedCardPreferences,
|
|
3889
|
+
xf as sharedTableDialect,
|
|
3890
|
+
kf as sheetChangeSchemas,
|
|
3891
|
+
fo as sqlCardQuerySchema,
|
|
3892
|
+
Tf as sqlKpiResultKeys,
|
|
3880
3893
|
Ne as statedLabelsOf,
|
|
3881
3894
|
As as storedCardTypeFor,
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3895
|
+
Rf as storedRunPresentation,
|
|
3896
|
+
Ym as storedTextRefs,
|
|
3897
|
+
Af as stripInstanceTargetsForLibrarySave,
|
|
3898
|
+
Df as structuralControlOverride,
|
|
3886
3899
|
as as summarizeFilter,
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3900
|
+
Ff as supportsCanonicalDashboardTemporalResult,
|
|
3901
|
+
Of as tabChangeSchemas,
|
|
3902
|
+
Ef as tableColumnTotalLabel,
|
|
3903
|
+
qf as textCardExcerpt,
|
|
3904
|
+
Nf as textCardWordingClauses,
|
|
3892
3905
|
$t as textCatalogAt,
|
|
3893
3906
|
ft as toChartType,
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3907
|
+
Pf as toEditableRules,
|
|
3908
|
+
Lf as toFiniteKpiNumber,
|
|
3909
|
+
St as toPublicCardType,
|
|
3910
|
+
so as toStoredComparison,
|
|
3911
|
+
Mf as toolbarFilterInputFields,
|
|
3912
|
+
Bf as toolbarFilterScope,
|
|
3913
|
+
Vf as transformComparisonDocument,
|
|
3914
|
+
Gf as transformGroupings,
|
|
3915
|
+
jf as transformOrderSchema,
|
|
3916
|
+
wo as updateMatrixConfig,
|
|
3917
|
+
ir as upgradeCardFormats,
|
|
3918
|
+
Qr as upgradeCardPresentation,
|
|
3919
|
+
hr as upgradeConditionalFormatting,
|
|
3920
|
+
kh as upgradeToStoredDashboard,
|
|
3921
|
+
Kf as validateAndResolveWindowTransforms,
|
|
3922
|
+
Wf as validateControlValue,
|
|
3923
|
+
zm as validateDashboardFilterValues,
|
|
3911
3924
|
ws as validateResolvedPrimaryDateFieldShape,
|
|
3912
|
-
|
|
3913
|
-
|
|
3925
|
+
Jm as variableCardKeepsComparison,
|
|
3926
|
+
Xm as variableComparison,
|
|
3914
3927
|
ze as variableFromDraft,
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3928
|
+
Cn as variableGetOptions,
|
|
3929
|
+
Zm as variablePartCell,
|
|
3930
|
+
eh as variablePartType,
|
|
3931
|
+
Wo as variableParts,
|
|
3932
|
+
th as variableQueryResponseOf,
|
|
3933
|
+
$p as variableSourceWords,
|
|
3934
|
+
Sn as variableTakesComparison,
|
|
3935
|
+
on as variableWords,
|
|
3936
|
+
Uf as withCardConditionalRules,
|
|
3937
|
+
Qf as withCardConfigSqlDatePatterns,
|
|
3938
|
+
ah as withCardExcludedFromScope,
|
|
3939
|
+
sh as withCardIncludedInScope,
|
|
3940
|
+
Hf as withDashboardOptionDependencyOverride,
|
|
3941
|
+
Yf as withDetailSqlDatePattern,
|
|
3942
|
+
oh as withDistinctDetailColumnAliases,
|
|
3943
|
+
nh as withDraftCard,
|
|
3944
|
+
zf as withFormatOverride,
|
|
3945
|
+
Jf as withGrainChoice,
|
|
3946
|
+
Xf as withSqlDatePattern,
|
|
3947
|
+
Zf as withStartingGrain,
|
|
3948
|
+
Ko as withUnstatedScopeParts,
|
|
3949
|
+
em as withoutSqlDatePattern,
|
|
3950
|
+
tm as withoutToolbarFilterReachFields,
|
|
3951
|
+
am as wordingBlocks,
|
|
3952
|
+
sm as wordingClauses,
|
|
3953
|
+
om as writeColumnFormat,
|
|
3954
|
+
nm as writeColumnPolarity,
|
|
3955
|
+
im as writeComparisonDisplay,
|
|
3956
|
+
rm as writeComparisonPresentation,
|
|
3944
3957
|
fa as writeDateFilterDefault,
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3958
|
+
dm as writeDateSelectionMode,
|
|
3959
|
+
lm as writeInheritComparison,
|
|
3960
|
+
cm as writeSeeRecords,
|
|
3961
|
+
to as writeTextWords
|
|
3949
3962
|
};
|