react-semaphor 0.1.563 → 0.1.564
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 +1 -1
- package/dist/chunks/{assistant-chat-iIp02_77.js → assistant-chat-D1BEEHUF.js} +103 -103
- package/dist/chunks/{bookmark-impact-D4Kl4amw.js → bookmark-impact-XOsVUAqW.js} +1 -1
- package/dist/chunks/{dashboard-CmqeP3QZ.js → dashboard-DfYsASNd.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-TYlSW77S.js → dashboard-briefing-launcher-lvYfJoUQ.js} +1429 -1379
- package/dist/chunks/{dashboard-controls-B253nJS-.js → dashboard-controls-CJ8Dz50D.js} +58 -58
- package/dist/chunks/{dashboard-json-osQuinUZ.js → dashboard-json-D3uZxGO-.js} +1 -1
- package/dist/chunks/{dates-DFY7Gfss.js → dates-EvDtT25n.js} +5 -5
- package/dist/chunks/{edit-dashboard-visual-CMar-NhA.js → edit-dashboard-visual-CgHJXBQv.js} +8 -8
- package/dist/chunks/{filter-reach-copy-CvV7W5dd.js → filter-reach-copy-Cmb05jlE.js} +106 -106
- package/dist/chunks/{global-date-filter-utils-N1kcsOFE.js → global-date-filter-utils-ruJYwjgZ.js} +3034 -3023
- package/dist/chunks/{index-CNGkfUp4.js → index-CAgf2x4E.js} +2 -2
- package/dist/chunks/index-RNaTnE3m.js +585 -0
- package/dist/chunks/{report-preferences-dialog-l54wJyYE.js → report-preferences-dialog-DMqxSU4X.js} +7 -7
- package/dist/chunks/{resolve-dashboard-input-context-DaDrZGuA.js → resolve-dashboard-input-context-i_jCSYae.js} +370 -370
- package/dist/chunks/{saved-dashboard-context-DFYBrE6O.js → saved-dashboard-context-Dg3oDmH_.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-C3EQEiD9.js → semaphor-ready-indicator-CFeCIuaw.js} +8045 -8041
- package/dist/chunks/{shelf-drop-preview-context-BODiBlqT.js → shelf-drop-preview-context-cEyVkKTF.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-BXY8-Cyz.js → use-create-flow-overlay-state-Dl6DCxh8.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +615 -594
- package/dist/index.js +13 -13
- package/dist/layouts/index.js +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/components/activity/activity-bell.d.ts +5 -1
- package/dist/types/components/activity/activity-types.d.ts +12 -4
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -1
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-CJW5BdWT.js +0 -583
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
var La = Object.defineProperty;
|
|
2
2
|
var Ma = (e, a, t) => a in e ? La(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
3
3
|
var Xe = (e, a, t) => Ma(e, typeof a != "symbol" ? a + "" : a, t);
|
|
4
|
-
import { a0 as Ba, a1 as Ka, a2 as ja, a3 as Ua, a4 as Va, a5 as _e, a6 as Ga, a7 as Wa, a8 as Ce, a9 as Qa, aa as Ya, ab as
|
|
5
|
-
import {
|
|
4
|
+
import { a0 as Ba, a1 as Ka, a2 as ja, a3 as Ua, a4 as Va, a5 as _e, a6 as Ga, a7 as Wa, a8 as Ce, a9 as Qa, aa as Ya, ab as mt, ac as fa, ad as Ut, ae as ht, af as ma, ag as W, ah as G, ai as De, aj as Ha, ak as za, al as pt, am as Ja, an as pe, ao as Xa, ap as Za, aq as es, ar as ha, as as ts, at as as, au as ss, av as os, aw as ns, ax as is, ay as rs, az as Vt, aA as pa, aB as Gt, aC as Ie, aD as he, aE as Oe, aF as ds, aG as ls, aH as cs, aI as us, aJ as ne, aK as ga, aL as ba, aM as fs, aN as Ze, aO as ms, aP as hs, aQ as Wt, aR as nt, aS as ps, aT as Qt, aU as gs, aV as Yt, aW as Ht, aX as Ge, aY as zt, aZ as Fe, a_ as bs, a$ as it, b0 as je, j as ys, b1 as ya, b2 as vs, b3 as Cs, b4 as Is, b5 as va, g as _s, b6 as $s, b7 as Jt, b8 as ws, b9 as xs, ba as Ss, bb as ks, bc as Ts, bd as Fs, be as Rs, bf as Ds, bg as Os, bh as Xt, bi as As, bj as Es, bk as qs, bl as Ns, bm as Ps, bn as Ls, bo as Ms, bp as Bs, bq as Ks, U as js, br as Us, bs as Vs } from "../chunks/global-date-filter-utils-ruJYwjgZ.js";
|
|
5
|
+
import { dv as li, bF as ci, d5 as ui, d6 as fi, dk as mi, dj as hi, de as pi, dl as gi, dm as bi, cL as yi, cM as vi, cN as Ci, cI as Ii, cJ as _i, cK as $i, cE as wi, cF as xi, cH as Si, cG as ki, cO as Ti, dL as Fi, d7 as Ri, b$ as Di, dO as Oi, b_ as Ai, c$ as Ei, dx as qi, cb as Ni, e8 as Pi, bV as Li, dB as Mi, dP as Bi, er as Ki, ew as ji, dh as Ui, di as Vi, bB as Gi, em as Wi, dA as Qi, ce as Yi, eD as Hi, eE as zi, d$ as Ji, dy as Xi, ee as Zi, cv as er, ex as tr, dd as ar, cP as sr, cw as or, dN as nr, bv as ir, dZ as rr, dD as dr, ef as lr, bw as cr, bE as ur, cq as fr, e0 as mr, dG as hr, d_ as pr, c_ as gr, cZ as br, c3 as yr, dM as vr, bR as Cr, bX as Ir, cn as _r, ey as $r, d as wr, e as xr, cf as Sr, dV as kr, bx as Tr, en as Fr, ds as Rr, du as Dr, eG as Or, bS as Ar, bT as Er, bU as qr, ca as Nr, cc as Pr, e6 as Lr, d2 as Mr, c as Br, cD as Kr, ck as jr, cC as Ur, cz as Vr, d3 as Gr, bH as Wr, bI as Qr, dF as Yr, dR as Hr, cg as zr, c0 as Jr, df as Xr, c6 as Zr, c7 as ed, dr as td, bW as ad, cV as sd, eF as od, bC as nd, cX as id, dS as rd, cY as dd, ea as ld, dI as cd, cs as ud, cj as fd, cl as md, c4 as hd, cm as pd, e4 as gd, dn as bd, dE as yd, by as vd, eu as Cd, eo as Id, dw as _d, ep as $d, cp as wd, c1 as xd, cy as Sd, dp as kd, e3 as Td, d0 as Fd, d1 as Rd, bG as Dd, dC as Od, e1 as Ad, d4 as Ed, ed as qd, et as Nd, ez as Pd, eA as Ld, db as Md, cB as Bd, bK as Kd, dq as jd, dH as Ud, bt as Vd, dt as Gd, ct as Wd, cu as Qd, c2 as Yd, cR as Hd, bM as zd, bN as Jd, bL as Xd, bQ as Zd, bY as el, bZ as tl, d8 as al, d9 as sl, bz as ol, bP as nl, cT as il, e9 as rl, eB as dl, cU as ll, cS as cl, bJ as ul, cr as fl, e7 as ml, cA as hl, c5 as pl, dT as gl, da as bl, co as yl, dg as vl, bu as Cl, bO as Il, dJ as _l, ec as $l, cx as wl, cW as xl, bD as Sl, dK as kl, dQ as Tl, dz as Fl, e5 as Rl, eb as Dl, es as Ol, cd as Al, ci as El, bA as ql, ev as Nl, eq as Pl, eC as Ll, cQ as Ml, e2 as Bl, dY as Kl, c9 as jl, c8 as Ul, dc as Vl, dX as Gl, eh as Wl, dU as Ql, dW as Yl, ch as Hl, eg as zl, ei as Jl, ej as Xl, ek as Zl, el as ec } from "../chunks/global-date-filter-utils-ruJYwjgZ.js";
|
|
6
6
|
import { z as ge } from "../chunks/bookmark-state-CWeoGbrx.js";
|
|
7
|
-
import { L as
|
|
8
|
-
import { H as Ue, I as Gs } from "../chunks/resolve-dashboard-input-context-
|
|
9
|
-
import { M as
|
|
10
|
-
import { r as Ca, b as Ws, c as Qs, a as Ys, d as
|
|
11
|
-
import { N as
|
|
7
|
+
import { L as ac, D as sc, F as oc, J as nc, I as ic, A as rc, K as dc, H as lc, G as cc, M as uc } from "../chunks/bookmark-state-CWeoGbrx.js";
|
|
8
|
+
import { H as Ue, I as Gs } from "../chunks/resolve-dashboard-input-context-i_jCSYae.js";
|
|
9
|
+
import { M as mc, $ as hc, a5 as pc, a0 as gc, k as bc, a3 as yc, _ as vc, L as Cc, a6 as Ic, a7 as _c, a2 as $c, U as wc, V as xc, Y as Sc, N as kc, O as Tc, Z as Fc, X as Rc, J as Dc, K as Oc, p as Ac, a4 as Ec, W as qc, S as Nc, a1 as Pc, P as Lc, R as Mc, Q as Bc, T as Kc } from "../chunks/resolve-dashboard-input-context-i_jCSYae.js";
|
|
10
|
+
import { r as Ca, b as Ws, c as Qs, a as Ys, d as rt, e as Hs } from "../chunks/filter-reach-copy-Cmb05jlE.js";
|
|
11
|
+
import { N as Uc, R as Vc, h as Gc, m as Wc, o as Qc, n as Yc, y as Hc, v as zc, f as Jc, l as Xc, B as Zc, I as eu, J as tu, w as au, C as su, F as ou, x as nu, p as iu, q as ru, u as du, i as lu, k as cu, t as uu, j as fu, H as mu, G as hu, z as pu, A as gu, D as bu, s as yu, E as vu } from "../chunks/filter-reach-copy-Cmb05jlE.js";
|
|
12
12
|
import { r as zs, a3 as Zt, at as Js } from "../chunks/temporal-input-presentation-sk9gqLi6.js";
|
|
13
|
-
import { ax as
|
|
13
|
+
import { ax as Iu, aw as _u, au as $u, av as wu, ay as xu, as as Su } from "../chunks/temporal-input-presentation-sk9gqLi6.js";
|
|
14
14
|
import { e as Xs, w as Zs, D as ea, r as eo } from "../chunks/metric-comparison-Bnso1cm1.js";
|
|
15
15
|
import { p as to } from "../chunks/report-runtime-context-BITkNSDa.js";
|
|
16
|
-
import { i as
|
|
16
|
+
import { i as Tu, a as Fu, m as Ru, b as Du, r as Ou } from "../chunks/matrix-card-CCh9JjP1.js";
|
|
17
17
|
import { am as Ia, aQ as ao, aO as _a, aP as so, H as oo } from "../chunks/validators-BIM0FE31.js";
|
|
18
18
|
import "../chunks/matrix-operation-contract-DsLdFdSa.js";
|
|
19
|
-
import { A as Ee, B as Ve, z as no, f as io, y as
|
|
19
|
+
import { A as Ee, B as Ve, z as no, f as io, y as gt, t as $e, e as ro } from "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
20
20
|
import { n as ta, t as lo } from "../chunks/matrix-analytical-definition-hEucouWM.js";
|
|
21
21
|
import "zod";
|
|
22
22
|
import "../value-format-preferences/index.js";
|
|
23
23
|
import "../chunks/index-CuHybtft.js";
|
|
24
24
|
import "../chunks/_commonjsHelpers-DimLPMtv.js";
|
|
25
|
-
import { r as co } from "../chunks/index-
|
|
25
|
+
import { r as co } from "../chunks/index-RNaTnE3m.js";
|
|
26
26
|
import "../chunks/context-R31TSL5V.js";
|
|
27
|
-
import { r as
|
|
28
|
-
import { b as
|
|
29
|
-
const
|
|
27
|
+
import { r as Eu, a as qu } from "../chunks/dates-EvDtT25n.js";
|
|
28
|
+
import { b as Pu, d as Lu } from "../chunks/bookmark-impact-XOsVUAqW.js";
|
|
29
|
+
const zn = [
|
|
30
30
|
"cardType",
|
|
31
31
|
"sql",
|
|
32
32
|
"python",
|
|
@@ -41,7 +41,7 @@ const Hn = [
|
|
|
41
41
|
"resolvedPrimaryDateField",
|
|
42
42
|
"globalDateComparison",
|
|
43
43
|
"calendarContext"
|
|
44
|
-
],
|
|
44
|
+
], Jn = [
|
|
45
45
|
"cardId",
|
|
46
46
|
"cardTitle",
|
|
47
47
|
"cache_config",
|
|
@@ -56,7 +56,7 @@ class de extends Error {
|
|
|
56
56
|
Object.setPrototypeOf(this, de.prototype), this.name = "CardQueryRequestError", this.field = s, this.details = n;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function bt(e) {
|
|
60
60
|
return e.label ? `${e.label}.` : "";
|
|
61
61
|
}
|
|
62
62
|
function be(e) {
|
|
@@ -66,7 +66,7 @@ function Pe(e) {
|
|
|
66
66
|
return typeof e == "string" ? e : "";
|
|
67
67
|
}
|
|
68
68
|
function uo(e, a = {}) {
|
|
69
|
-
const t = be(e), s =
|
|
69
|
+
const t = be(e), s = bt(a), n = {};
|
|
70
70
|
if (t.calendarContext !== void 0) {
|
|
71
71
|
const i = to(t.calendarContext);
|
|
72
72
|
if (!i.ok)
|
|
@@ -98,8 +98,8 @@ function uo(e, a = {}) {
|
|
|
98
98
|
}
|
|
99
99
|
return n;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const t = be(e), s =
|
|
101
|
+
function Xn(e, a = {}) {
|
|
102
|
+
const t = be(e), s = bt(a), n = {};
|
|
103
103
|
if (t.pagination !== void 0) {
|
|
104
104
|
const o = be(t.pagination), i = o.page, d = o.pageSize;
|
|
105
105
|
if (!Number.isInteger(i) || i < 1 || !Number.isInteger(d) || d < 1)
|
|
@@ -130,8 +130,8 @@ function Jn(e, a = {}) {
|
|
|
130
130
|
}
|
|
131
131
|
return n;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
const t = be(e), s =
|
|
133
|
+
function Zn(e, a = {}) {
|
|
134
|
+
const t = be(e), s = bt(a), n = (x) => new de(`${s}${x} is required`, x), o = Pe(t.connection_id).trim();
|
|
135
135
|
if (!o) throw n("connection_id");
|
|
136
136
|
const i = Pe(t.cardType).trim();
|
|
137
137
|
if (!i) throw n("cardType");
|
|
@@ -246,7 +246,7 @@ function ho(e, a) {
|
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
if (t.kind !== "sheets") return;
|
|
249
|
-
const s = [...
|
|
249
|
+
const s = [...mt(e).values()].filter((o) => fa(a, o));
|
|
250
250
|
return {
|
|
251
251
|
sheetIds: s.filter((o) => o.sheetKind === "dashboard").map((o) => o.sheetId),
|
|
252
252
|
// Document sheets it names stay through a change of sheets (`withUnstatedScopeParts`).
|
|
@@ -301,7 +301,7 @@ function Ae(e, a, t, s) {
|
|
|
301
301
|
const n = _e(e).findFilterInput({ inputId: a });
|
|
302
302
|
return n ? wa(e, n, t, s) : void 0;
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const yt = (e) => `${e.domainId}\0${e.datasetName}`;
|
|
305
305
|
function Sa(e, a) {
|
|
306
306
|
var s;
|
|
307
307
|
if (((s = e.source) == null ? void 0 : s.kind) === "semantic") return { domainId: e.source.domainId, datasetName: e.source.datasetName };
|
|
@@ -329,18 +329,18 @@ function po(e) {
|
|
|
329
329
|
const a = ka(e), t = /* @__PURE__ */ new Map();
|
|
330
330
|
for (const { field: s } of Ta(e)) {
|
|
331
331
|
const n = Sa(s, a);
|
|
332
|
-
n && t.set(
|
|
332
|
+
n && t.set(yt(n), n);
|
|
333
333
|
}
|
|
334
334
|
return [...t.values()];
|
|
335
335
|
}
|
|
336
336
|
function go(e, a, t) {
|
|
337
337
|
if (!t) return;
|
|
338
|
-
const s =
|
|
338
|
+
const s = Ut(a), n = Ta(e).find((d) => Ut(d.ref) === s);
|
|
339
339
|
if (!n) return;
|
|
340
|
-
const o = Sa(n.field, ka(e)), i = o ? t[
|
|
341
|
-
return i ?
|
|
340
|
+
const o = Sa(n.field, ka(e)), i = o ? t[yt(o)] : void 0;
|
|
341
|
+
return i ? ht(i, n.field.name, o.datasetName) : void 0;
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const dt = ["orientation", "stack", "donut", "totals", "dataLabels", "legend", "axes", "comparisonDisplay", "inheritComparison"], bo = {
|
|
344
344
|
orientation: "orientation",
|
|
345
345
|
stack: "stacking",
|
|
346
346
|
donut: "donut hole",
|
|
@@ -361,9 +361,9 @@ function Co(e, a, t) {
|
|
|
361
361
|
}
|
|
362
362
|
function Io(e, a, t, s, n) {
|
|
363
363
|
var y, b, x, O, $, p, R, _, E;
|
|
364
|
-
const o =
|
|
364
|
+
const o = dt.filter((S) => t[S] !== void 0);
|
|
365
365
|
if (!o.length) return {};
|
|
366
|
-
const i =
|
|
366
|
+
const i = dt.filter((S) => a.settings.has(S)), d = o.filter((S) => !a.settings.has(S));
|
|
367
367
|
for (const S of d)
|
|
368
368
|
n.push(
|
|
369
369
|
W("setting_not_for_card", {
|
|
@@ -382,7 +382,7 @@ function Io(e, a, t, s, n) {
|
|
|
382
382
|
...t.donut !== void 0 ? { donut: t.donut } : {}
|
|
383
383
|
};
|
|
384
384
|
["orientation", "stack", "donut"].some((S) => g[S] !== c[S]) && (l.variant = Ha(a.type, g));
|
|
385
|
-
const v = l.variant ? za(e, l.variant) : e, C =
|
|
385
|
+
const v = l.variant ? za(e, l.variant) : e, C = pt(v);
|
|
386
386
|
if (t.totals && t.totals.row !== (((b = C.totals) == null ? void 0 : b.row) ?? !1) && (l.totals = { row: t.totals.row }), t.dataLabels) {
|
|
387
387
|
const S = {};
|
|
388
388
|
t.dataLabels.show !== Ja(v) && (S.show = t.dataLabels.show);
|
|
@@ -486,7 +486,7 @@ const Fa = (e) => e.granularity ? `a date grouped by ${e.granularity}` : e.dataT
|
|
|
486
486
|
function we(e, a) {
|
|
487
487
|
return `${e}.columns[${JSON.stringify(a)}]`;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function lt(e, a, t, s) {
|
|
490
490
|
const { [s]: n, ...o } = t;
|
|
491
491
|
return Object.keys(o).length ? { op: "card.update", cardId: e.cardRef, columns: { [a]: o } } : void 0;
|
|
492
492
|
}
|
|
@@ -508,7 +508,7 @@ function xo(e, a, t, s, n, o, i) {
|
|
|
508
508
|
message: a.sql ? `${G(e.title)}'s column ${s} takes its header from the query; rename it in the SQL.` : `${s} on ${G(e.title)} takes no header of its own.`,
|
|
509
509
|
path: l,
|
|
510
510
|
allowed: ["hidden", "width", "format"].filter((g) => g !== "hidden" || a.settings.has("columns.hidden")),
|
|
511
|
-
suggestedChange:
|
|
511
|
+
suggestedChange: lt(o, s, n, "label")
|
|
512
512
|
})
|
|
513
513
|
);
|
|
514
514
|
return;
|
|
@@ -599,7 +599,7 @@ function So(e, a, t, s, n, o, i) {
|
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
if (E.type === "date") {
|
|
602
|
-
const A = n, M = v.format ?? {}, Q = Object.keys(A).filter((j) => !
|
|
602
|
+
const A = n, M = v.format ?? {}, Q = Object.keys(A).filter((j) => !Vt.includes(j) && !pe(A[j], M[j]));
|
|
603
603
|
if (Q.length) {
|
|
604
604
|
const j = Object.fromEntries(Object.entries(E).filter(([U]) => !Q.includes(U)));
|
|
605
605
|
i.push(
|
|
@@ -607,7 +607,7 @@ function So(e, a, t, s, n, o, i) {
|
|
|
607
607
|
message: `A date format set here takes a pattern or a preset; it doesn't set ${Q.join(", ")}.`,
|
|
608
608
|
path: d,
|
|
609
609
|
fix: `Leave out ${Q.join(", ")}.`,
|
|
610
|
-
allowed:
|
|
610
|
+
allowed: Vt.filter((U) => U !== "type"),
|
|
611
611
|
suggestedChange: Le(o, s, j)
|
|
612
612
|
})
|
|
613
613
|
);
|
|
@@ -639,7 +639,7 @@ function ko(e, a, t, s, n, o, i) {
|
|
|
639
639
|
message: t.role === "measure" || t.role === "value" ? `${G(e.title)} shows no comparison, so ${s} has no favorable direction.` : `${s} on ${G(e.title)} isn't a measure, so it has no favorable direction.`,
|
|
640
640
|
path: l,
|
|
641
641
|
fix: "Leave out polarity.",
|
|
642
|
-
suggestedChange:
|
|
642
|
+
suggestedChange: lt(o, s, n, "polarity")
|
|
643
643
|
})
|
|
644
644
|
);
|
|
645
645
|
return;
|
|
@@ -653,7 +653,7 @@ function ko(e, a, t, s, n, o, i) {
|
|
|
653
653
|
path: l,
|
|
654
654
|
fix: "Change it in the model, or leave polarity out.",
|
|
655
655
|
allowed: [b],
|
|
656
|
-
suggestedChange:
|
|
656
|
+
suggestedChange: lt(o, s, n, "polarity")
|
|
657
657
|
})
|
|
658
658
|
);
|
|
659
659
|
return;
|
|
@@ -690,7 +690,7 @@ function To(e, a, t, s, n, o, i, d) {
|
|
|
690
690
|
}
|
|
691
691
|
function Fo(e, a, t) {
|
|
692
692
|
var O, $, p, R;
|
|
693
|
-
const { columns: s = {}, ...n } = a.settings ?? {}, o = [], i =
|
|
693
|
+
const { columns: s = {}, ...n } = a.settings ?? {}, o = [], i = dt.some((_) => n[_] !== void 0), d = !!(($ = (O = a.highlights) == null ? void 0 : O.add) != null && $.length || (R = (p = a.highlights) == null ? void 0 : p.remove) != null && R.length);
|
|
694
694
|
if (!Object.keys(s).length && !i && !d) return { ok: !0, labels: [], settings: null, warnings: [] };
|
|
695
695
|
const l = ts(e);
|
|
696
696
|
if (!l)
|
|
@@ -698,7 +698,7 @@ function Fo(e, a, t) {
|
|
|
698
698
|
ok: !1,
|
|
699
699
|
problems: [W("setting_not_for_card", { message: `${G(e.title)} takes no card settings through this tool.`, path: t.path })]
|
|
700
700
|
};
|
|
701
|
-
const c = Io(e, l, n, t, o), g = as(e, l, t.sqlResultColumns), v = d ? ss(e, l, g, a.highlights, t, o) : void 0, C =
|
|
701
|
+
const c = Io(e, l, n, t, o), g = as(e, l, t.sqlResultColumns), v = d ? ss(e, l, g, a.highlights, t, o) : void 0, C = pt(e), y = [], b = [];
|
|
702
702
|
for (const [_, E] of Object.entries(s)) {
|
|
703
703
|
const S = os(g, _, { path: we(t.path, _), cardTitle: G(e.title) });
|
|
704
704
|
if (!S.ok) {
|
|
@@ -731,7 +731,7 @@ function Fo(e, a, t) {
|
|
|
731
731
|
return { ok: !0, labels: y, settings: Object.keys(x).length ? x : null, warnings: [] };
|
|
732
732
|
}
|
|
733
733
|
function Ro(e) {
|
|
734
|
-
const a = Ee(e), t = a && a === Ee("number") ?
|
|
734
|
+
const a = Ee(e), t = a && a === Ee("number") ? Gt.number : e === "temporal_bucket" || e === "date" ? Gt[e] : void 0;
|
|
735
735
|
return t ? `Send a stored format: ${t}.` : "Send the format in the stored shape the outline shows.";
|
|
736
736
|
}
|
|
737
737
|
function Do(e, a, t, s, n) {
|
|
@@ -794,7 +794,7 @@ class ue extends Error {
|
|
|
794
794
|
const sa = "A text card takes title, description and text.", tt = (e) => e.cards.some((a) => {
|
|
795
795
|
var t, s;
|
|
796
796
|
return ((t = a.customCardPreferences) == null ? void 0 : t.visualType) === "multiple" || !!((s = a.customCardPreferences) != null && s.dataInputCardIds);
|
|
797
|
-
}),
|
|
797
|
+
}), ct = (e) => (e ?? "").trim().toLowerCase(), We = bs, oa = { measures: Is, records: Cs, sql: vs }, Me = {
|
|
798
798
|
measures: "a measures query (measures, with optional dimensions)",
|
|
799
799
|
records: "a records query (columns)",
|
|
800
800
|
sql: "a SQL query"
|
|
@@ -803,11 +803,11 @@ function Ra(e, a) {
|
|
|
803
803
|
return a.path.reduce((t, s) => typeof s == "number" ? `${t}[${s}]` : `${t}.${s}`, e);
|
|
804
804
|
}
|
|
805
805
|
const Oo = { max: Os, what: "A proposal", fix: "Split the changes into several proposals." };
|
|
806
|
-
async function
|
|
806
|
+
async function ei(e, a, t) {
|
|
807
807
|
return Da(e, a, t, { limit: Oo });
|
|
808
808
|
}
|
|
809
809
|
async function Da(e, a, t, s) {
|
|
810
|
-
var
|
|
810
|
+
var Tt, Ft, Rt, Dt, Ot, At, Et, qt, Nt, Pt, Lt, Mt, Bt, Kt, jt;
|
|
811
811
|
const n = [], o = [], i = [], d = [], l = /* @__PURE__ */ new Set(), c = [], g = /* @__PURE__ */ new Map(), v = { calendar: t.calendar }, C = t.relationshipReach ? { relationshipReach: t.relationshipReach } : {};
|
|
812
812
|
let y = e, b = 0, x = 0;
|
|
813
813
|
const { limit: O } = s;
|
|
@@ -848,17 +848,17 @@ async function Da(e, a, t, s) {
|
|
|
848
848
|
fix: "Use a measures or records query, or ask an administrator for SQL access."
|
|
849
849
|
}), l.add("sql");
|
|
850
850
|
}, _ = (u, r) => {
|
|
851
|
-
const f =
|
|
851
|
+
const f = rt(y, [u], v);
|
|
852
852
|
f.ok ? (y = f.dashboard, i.push(u)) : p({ code: "invalid_change", message: f.failedAt.message, path: r, ...f.failedAt.fix ? { fix: f.failedAt.fix } : {} });
|
|
853
853
|
}, E = async (u) => {
|
|
854
854
|
var Z, H, B, oe, ce;
|
|
855
|
-
const { cardId: r, index: f, path: m } = u, { settings: h = {}, highlights: I } = u.request,
|
|
856
|
-
if (!
|
|
857
|
-
const k = ne(y, r).card, L = Object.values(
|
|
855
|
+
const { cardId: r, index: f, path: m } = u, { settings: h = {}, highlights: I } = u.request, T = h.columns && Object.keys(h.columns).length ? h.columns : void 0, D = Object.entries(h).some(([Y, re]) => Y !== "columns" && re !== void 0), F = !!((Z = I == null ? void 0 : I.add) != null && Z.length);
|
|
856
|
+
if (!T && !D && !F && !((H = I == null ? void 0 : I.remove) != null && H.length)) return null;
|
|
857
|
+
const k = ne(y, r).card, L = Object.values(T ?? {}).some((Y) => Y.label === null), N = Object.values(T ?? {}).some((Y) => Y.format !== void 0 && Y.format !== null), P = {};
|
|
858
858
|
if (L && !((B = k.sql) != null && B.trim()))
|
|
859
859
|
for (const Y of po(k)) {
|
|
860
860
|
const re = await t.loadCardSource(Y);
|
|
861
|
-
re && (P[
|
|
861
|
+
re && (P[yt(Y)] = re.fields);
|
|
862
862
|
}
|
|
863
863
|
let V;
|
|
864
864
|
if (N && !((oe = k.sql) != null && oe.trim())) {
|
|
@@ -866,19 +866,19 @@ async function Da(e, a, t, s) {
|
|
|
866
866
|
V = Y ? { status: "read", formats: Y } : { status: "unavailable" };
|
|
867
867
|
}
|
|
868
868
|
let z;
|
|
869
|
-
if ((
|
|
869
|
+
if ((T || F) && ((ce = k.sql) != null && ce.trim()) && k.type !== "kpi") {
|
|
870
870
|
const Y = t.readSqlResultColumns ? await t.readSqlResultColumns({ cardId: r, dashboard: y }) : null;
|
|
871
871
|
Y || p({
|
|
872
872
|
code: "columns_unavailable",
|
|
873
|
-
message:
|
|
874
|
-
path:
|
|
873
|
+
message: T ? `"${k.title || "Untitled"}" couldn't be run to read its columns, so their names can't be checked.` : `"${k.title || "Untitled"}" couldn't be run to read its columns, so the highlight's column can't be checked.`,
|
|
874
|
+
path: T ? `${m}.columns` : `${m}.column`,
|
|
875
875
|
fix: "Check that the card runs and returns rows, then propose again."
|
|
876
876
|
}), z = Y;
|
|
877
877
|
}
|
|
878
878
|
const K = Fo(
|
|
879
879
|
k,
|
|
880
880
|
{
|
|
881
|
-
settings: { ...h, ...
|
|
881
|
+
settings: { ...h, ...T ? { columns: T } : { columns: void 0 } },
|
|
882
882
|
...I ? { highlights: I } : {}
|
|
883
883
|
},
|
|
884
884
|
{
|
|
@@ -901,7 +901,7 @@ async function Da(e, a, t, s) {
|
|
|
901
901
|
fix: "State the label once."
|
|
902
902
|
});
|
|
903
903
|
}
|
|
904
|
-
return o.push(...K.warnings), K.labels.length &&
|
|
904
|
+
return o.push(...K.warnings), K.labels.length && Ht(k, K.labels).changed.length && _({ op: "card.update", cardId: r, update: { kind: "relabel", labels: K.labels }, changeIndex: f }, `${m}.columns`), K.settings && _({ op: "card.update", cardId: r, update: { kind: "settings", settings: K.settings }, changeIndex: f }, T ? `${m}.columns` : m), K.settings;
|
|
905
905
|
}, S = (u, r) => {
|
|
906
906
|
var h;
|
|
907
907
|
const f = ne(y, u);
|
|
@@ -922,16 +922,16 @@ async function Da(e, a, t, s) {
|
|
|
922
922
|
}, w = /* @__PURE__ */ new Map(), q = (u, r, f) => {
|
|
923
923
|
var h;
|
|
924
924
|
const m = va("metric", ((h = u.config) == null ? void 0 : h.metricColumns) ?? []);
|
|
925
|
-
return r.map(({ index: I, calculations:
|
|
926
|
-
...
|
|
925
|
+
return r.map(({ index: I, calculations: T }) => ({
|
|
926
|
+
...T,
|
|
927
927
|
measure: m[I] ?? { role: "metric", field: "", ordinal: I },
|
|
928
928
|
path: `${f}.query.measures[${I}]`
|
|
929
929
|
}));
|
|
930
930
|
}, A = async (u) => {
|
|
931
|
-
const r = ne(y, u.cardId).card, f = q(r, u.stated, u.path), m = f.some((
|
|
932
|
-
var D,
|
|
933
|
-
return ((D =
|
|
934
|
-
}), h = m && t.readComparisonDates ? await t.readComparisonDates({ card: r, dashboard: y }) : na(r), I =
|
|
931
|
+
const r = ne(y, u.cardId).card, f = q(r, u.stated, u.path), m = f.some((T) => {
|
|
932
|
+
var D, F;
|
|
933
|
+
return ((D = T.comparison) == null ? void 0 : D.kind) === "previous_period" || ((F = T.comparison) == null ? void 0 : F.kind) === "previous_year";
|
|
934
|
+
}), h = m && t.readComparisonDates ? await t.readComparisonDates({ card: r, dashboard: y }) : na(r), I = Wt({ card: r, stated: f, context: { path: u.path, cardRef: u.cardRef, dates: h } });
|
|
935
935
|
if (!I.ok)
|
|
936
936
|
throw n.push(...I.problems), new ue();
|
|
937
937
|
return o.push(...I.warnings), m && w.set(u.cardId, u.path), I.update ? (_(
|
|
@@ -957,25 +957,25 @@ async function Da(e, a, t, s) {
|
|
|
957
957
|
path: m,
|
|
958
958
|
fix: "Change a card to or from text in the editor, or add a new card and remove this one."
|
|
959
959
|
});
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
const D =
|
|
960
|
+
const T = ya(h, y.inputs);
|
|
961
|
+
T.editable || p({ code: "card_not_editable", message: T.message, path: `${m}.cardId`, fix: "Tell the user to change it in the editor.", details: { reason: "text" } });
|
|
962
|
+
const D = T.editable && (T.form === "legacy_html" || T.form === "legacy_runs");
|
|
963
963
|
D && u.description !== void 0 && u.text === void 0 && p({
|
|
964
964
|
code: "invalid_change",
|
|
965
965
|
message: `"${h.title}" keeps its words in its description, so a description change would replace them.`,
|
|
966
966
|
path: `${m}.description`,
|
|
967
967
|
fix: "Send the words in text with it: they are stored as rich text, and the description becomes the subtitle."
|
|
968
968
|
}), d.push({ ref: u.cardId, kind: "card", id: h.id, title: u.title ?? h.title ?? "", changeIndex: f });
|
|
969
|
-
let
|
|
969
|
+
let F = !1, k = !1;
|
|
970
970
|
if (u.text !== void 0) {
|
|
971
|
-
const P =
|
|
971
|
+
const P = zt({
|
|
972
972
|
text: u.text,
|
|
973
973
|
card: h,
|
|
974
974
|
inputs: y.inputs,
|
|
975
975
|
path: `${m}.text`,
|
|
976
976
|
storeAsRichText: D && u.description !== void 0
|
|
977
977
|
});
|
|
978
|
-
P.ok || j(P.problems), P.ok && !P.unchanged && (_({ op: "card.update", cardId: h.id, update: { kind: "text", richContent: P.richContent, clearsLegacy: P.clearsLegacy }, changeIndex: f }, m),
|
|
978
|
+
P.ok || j(P.problems), P.ok && !P.unchanged && (_({ op: "card.update", cardId: h.id, update: { kind: "text", richContent: P.richContent, clearsLegacy: P.clearsLegacy }, changeIndex: f }, m), F = !0, k = P.clearsLegacy);
|
|
979
979
|
}
|
|
980
980
|
const L = u.title !== void 0 && u.title !== h.title, N = u.description !== void 0 && (D ? k : (u.description ?? void 0) !== (h.description ?? void 0));
|
|
981
981
|
(L || N) && (_(
|
|
@@ -986,7 +986,7 @@ async function Da(e, a, t, s) {
|
|
|
986
986
|
changeIndex: f
|
|
987
987
|
},
|
|
988
988
|
m
|
|
989
|
-
),
|
|
989
|
+
), F = !0), F && r.frame.visualId && o.push({
|
|
990
990
|
code: "detaches_linked_visual",
|
|
991
991
|
message: `"${h.title}" will stop following its library visual and become local to this dashboard.`,
|
|
992
992
|
path: m,
|
|
@@ -1024,7 +1024,7 @@ async function Da(e, a, t, s) {
|
|
|
1024
1024
|
path: r,
|
|
1025
1025
|
fix: "Read the outline again and use its filter ids."
|
|
1026
1026
|
}), u;
|
|
1027
|
-
}, He = () => (y.sheets ?? []).filter((u) => !
|
|
1027
|
+
}, He = () => (y.sheets ?? []).filter((u) => !it(u)), qe = () => He().map((u) => ({ sheetId: u.id, title: u.title ?? "" })), _t = (u, r, f) => {
|
|
1028
1028
|
let m = u;
|
|
1029
1029
|
if (u.startsWith("$")) {
|
|
1030
1030
|
const I = g.get(u);
|
|
@@ -1036,38 +1036,38 @@ async function Da(e, a, t, s) {
|
|
|
1036
1036
|
}), m = I.id;
|
|
1037
1037
|
}
|
|
1038
1038
|
const h = (y.sheets ?? []).find((I) => I.id === m);
|
|
1039
|
-
return h || p({ code: "sheet_not_found", message: `There's no sheet ${m} on this dashboard.`, path: r, fix: "Read the outline again and use its sheet ids.", details: { sheets: qe() } }), f.grid &&
|
|
1040
|
-
}, Se = (u, r) =>
|
|
1039
|
+
return h || p({ code: "sheet_not_found", message: `There's no sheet ${m} on this dashboard.`, path: r, fix: "Read the outline again and use its sheet ids.", details: { sheets: qe() } }), f.grid && it(h) && p({ code: "sheet_not_a_grid", message: `"${h.title}" is a Document sheet.`, path: r, fix: "Add the card to a grid sheet; Document sheets are changed in the editor.", details: { sheets: qe() } }), h;
|
|
1040
|
+
}, Se = (u, r) => _t(u, r, { grid: !0 }), $t = (u, r) => u.map((f, m) => Se(f, `${r}.sheetIds[${m}]`).id), wt = (u, r, f, m) => {
|
|
1041
1041
|
var D;
|
|
1042
|
-
for (const
|
|
1043
|
-
const h = Fe[u], I = We(r),
|
|
1044
|
-
if (
|
|
1042
|
+
for (const F of $s(r, f)) p({ ...F, path: `${m}.${F.path}` });
|
|
1043
|
+
const h = Fe[u], I = We(r), T = r.dateField;
|
|
1044
|
+
if (T && typeof T != "string" && T.label && !r.timeGrain && p({
|
|
1045
1045
|
code: "invalid_change",
|
|
1046
1046
|
message: "A label names a column, and the date field is a column only when the card groups by it.",
|
|
1047
1047
|
path: `${m}.query.dateField.label`,
|
|
1048
1048
|
fix: "Send timeGrain to group by the date, or leave the label out."
|
|
1049
1049
|
}), !h.forms.includes(I)) {
|
|
1050
|
-
const
|
|
1050
|
+
const F = Object.keys(Fe).filter((k) => Fe[k].forms.includes(I));
|
|
1051
1051
|
p({
|
|
1052
1052
|
code: "type_not_supported",
|
|
1053
1053
|
message: `A ${u.replace(/_/g, " ")} card takes ${h.forms.map((k) => Me[k]).join(" or ")}, not ${Me[I]}.`,
|
|
1054
1054
|
path: `${m}.query`,
|
|
1055
|
-
fix: `Send ${h.forms.map((k) => Me[k]).join(" or ")}, or use a type this query fits: ${
|
|
1055
|
+
fix: `Send ${h.forms.map((k) => Me[k]).join(" or ")}, or use a type this query fits: ${F.join(", ")}.`
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
1058
|
if (I === "measures") {
|
|
1059
|
-
const
|
|
1059
|
+
const F = r, k = F.measures.length;
|
|
1060
1060
|
h.measures && (k < h.measures.min || h.measures.max !== void 0 && k > h.measures.max) && p({
|
|
1061
1061
|
code: "type_not_supported",
|
|
1062
1062
|
message: `A ${u.replace(/_/g, " ")} card shows exactly ${h.measures.max} measure.`,
|
|
1063
1063
|
path: `${m}.query.measures`,
|
|
1064
1064
|
fix: "Send one measure, or use a table or chart for several."
|
|
1065
|
-
}), !h.dimensions && ((D =
|
|
1065
|
+
}), !h.dimensions && ((D = F.dimensions) != null && D.length) && p({
|
|
1066
1066
|
code: "type_not_supported",
|
|
1067
1067
|
message: `A ${u.replace(/_/g, " ")} card shows one number, so it has no dimensions.`,
|
|
1068
1068
|
path: `${m}.query.dimensions`,
|
|
1069
1069
|
fix: "Remove the dimensions, or use a table or chart."
|
|
1070
|
-
}), u === "matrix" && (
|
|
1070
|
+
}), u === "matrix" && (F.orderBy || F.limit) && p({
|
|
1071
1071
|
code: "type_not_supported",
|
|
1072
1072
|
message: "A Matrix's sorting and top N are set in the editor.",
|
|
1073
1073
|
path: `${m}.query`,
|
|
@@ -1080,34 +1080,34 @@ async function Da(e, a, t, s) {
|
|
|
1080
1080
|
path: `${m}.matrix`,
|
|
1081
1081
|
fix: "Send matrix: { columns: [...] } naming dimensions or the date field of the query (an empty list puts nothing across the top)."
|
|
1082
1082
|
}), !h.matrixColumns && f && p({ code: "type_not_supported", message: "matrix.columns is only for Matrix cards.", path: `${m}.matrix`, fix: 'Leave out matrix, or use type "matrix".' }), f && I === "measures") {
|
|
1083
|
-
const
|
|
1083
|
+
const F = r, k = F.datasetName, L = [...F.dimensions ?? [], ...F.timeGrain && F.dateField ? [F.dateField] : []];
|
|
1084
1084
|
L.length && f.columns.length >= L.length && L.every((P) => f.columns.some((V) => he(V, k) === he(P, k))) && p({
|
|
1085
1085
|
code: "type_not_supported",
|
|
1086
1086
|
message: "A Matrix needs at least one field down the side.",
|
|
1087
1087
|
path: `${m}.matrix.columns`,
|
|
1088
1088
|
fix: "Leave one dimension or the date field out of matrix.columns."
|
|
1089
1089
|
});
|
|
1090
|
-
const N = new Set([...
|
|
1090
|
+
const N = new Set([...F.dimensions ?? [], ...F.dateField ? [F.dateField] : []].map((P) => he(P, k)));
|
|
1091
1091
|
f.columns.forEach((P, V) => {
|
|
1092
1092
|
N.has(he(P, k)) || p({
|
|
1093
1093
|
code: "type_not_supported",
|
|
1094
|
-
message: `"${
|
|
1094
|
+
message: `"${Jt(P)}" isn't one of the query's dimensions or its date field.`,
|
|
1095
1095
|
path: `${m}.matrix.columns[${V}]`,
|
|
1096
1096
|
fix: "Name dimensions or the date field of the query in matrix.columns."
|
|
1097
1097
|
});
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
|
-
},
|
|
1100
|
+
}, xt = (u, r) => p({
|
|
1101
1101
|
code: u.code === "query_not_kept" ? "card_not_editable" : "invalid_change",
|
|
1102
1102
|
message: u.message,
|
|
1103
1103
|
path: `${r}.query`,
|
|
1104
1104
|
fix: u.code === "query_not_kept" ? "Tell the user to make this change in the editor." : "Read the outline again and propose again.",
|
|
1105
1105
|
details: { reason: "not_expressible", ..."parts" in u ? { parts: u.parts } : {} }
|
|
1106
|
-
}),
|
|
1107
|
-
const D = Do(u, r, f, I,
|
|
1106
|
+
}), St = (u, r, f, m, h, I, T) => {
|
|
1107
|
+
const D = Do(u, r, f, I, T);
|
|
1108
1108
|
if (!D.length) return;
|
|
1109
|
-
const
|
|
1110
|
-
if (D.length === 1 && D[0] === "dateField" &&
|
|
1109
|
+
const F = r;
|
|
1110
|
+
if (D.length === 1 && D[0] === "dateField" && F.dateField && !F.timeGrain && !F.timeWindow) {
|
|
1111
1111
|
p({
|
|
1112
1112
|
code: "value_invalid",
|
|
1113
1113
|
message: `A dateField on its own doesn't change "${h}": it needs timeGrain to group by the date (a KPI's Trend By) or a timeWindow to filter by it.`,
|
|
@@ -1116,46 +1116,47 @@ async function Da(e, a, t, s) {
|
|
|
1116
1116
|
});
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
+
const k = D.join(", ");
|
|
1119
1120
|
p({
|
|
1120
1121
|
code: "card_not_editable",
|
|
1121
|
-
message: `As changed, "${h}" wouldn't
|
|
1122
|
+
message: T ? `As changed, "${h}" wouldn't hold ${k} as asked, so make this change in the editor.` : `"${h}" can't be built holding ${k} as asked.`,
|
|
1122
1123
|
path: `${m}.query`,
|
|
1123
|
-
fix: "Tell the user to make this change in the editor."
|
|
1124
|
-
details: { reason: "not_expressible", detail: `doesn't hold: ${
|
|
1124
|
+
fix: T ? "Tell the user to make this change in the editor." : `Leave out ${k}; the rest of the card can be added.`,
|
|
1125
|
+
details: { reason: "not_expressible", detail: `doesn't hold: ${k}` }
|
|
1125
1126
|
});
|
|
1126
|
-
},
|
|
1127
|
+
}, kt = async (u, r, f, m) => {
|
|
1127
1128
|
const h = Ze(u);
|
|
1128
1129
|
if ("sql" in r)
|
|
1129
1130
|
return R(`${m}.query`), { type: h, source: { kind: "sql", connectionId: r.connectionId, sql: r.sql } };
|
|
1130
|
-
const I = h === "matrixTable" || h === "detailTable" ? "table" : h,
|
|
1131
|
-
if (!
|
|
1132
|
-
throw n.push(...
|
|
1133
|
-
o.push(...
|
|
1134
|
-
let D = { ...
|
|
1135
|
-
const
|
|
1131
|
+
const I = h === "matrixTable" || h === "detailTable" ? "table" : h, T = await t.compileCardQuery({ query: r, chartType: I });
|
|
1132
|
+
if (!T.ok)
|
|
1133
|
+
throw n.push(...T.problems.map((k) => ({ ...k, path: k.path ? `${m}.query.${k.path}` : `${m}.query` }))), new ue();
|
|
1134
|
+
o.push(...T.warnings.map((k) => ({ ...k, path: k.path ?? `${m}.query` })));
|
|
1135
|
+
let D = { ...T.part, type: h };
|
|
1136
|
+
const F = D.config ?? {};
|
|
1136
1137
|
if (h === "detailTable") {
|
|
1137
|
-
const k = ws(xs("table", "detailTable",
|
|
1138
|
+
const k = ws(xs("table", "detailTable", F)) ?? {};
|
|
1138
1139
|
D = { ...D, config: Eo(k) };
|
|
1139
1140
|
}
|
|
1140
|
-
return h === "matrixTable" && (D = await Na(D,
|
|
1141
|
+
return h === "matrixTable" && (D = await Na(D, F, r, f, m)), qo(D, Oe(r));
|
|
1141
1142
|
}, Na = async (u, r, f, m, h) => {
|
|
1142
1143
|
var N;
|
|
1143
1144
|
const I = await t.loadCardSource({ domainId: f.domainId, datasetName: f.datasetName });
|
|
1144
1145
|
if (I || p({ code: "field_not_found", message: `The dataset "${f.datasetName}" isn't available.`, path: `${h}.query.datasetName`, fix: "Find datasets with semaphor_list_datasets." }), u.source.kind !== "semantic") throw new ue();
|
|
1145
|
-
const
|
|
1146
|
-
(D.status !== "changed" || D.leftOut.length || !
|
|
1146
|
+
const T = { id: "scratch", title: "", type: "table", dataSource: u.source.dataSource, config: r }, D = ks(T, "matrixTable", { catalog: I.fields, createId: t.newId }), F = D.status === "changed" ? (N = D.card.config) == null ? void 0 : N.matrix : void 0;
|
|
1147
|
+
(D.status !== "changed" || D.leftOut.length || !F) && p({
|
|
1147
1148
|
code: "type_not_supported",
|
|
1148
1149
|
message: D.status === "changed" && D.leftOut.length ? `These fields can't run in a Matrix: ${D.leftOut.join(", ")}.` : "This query can't be shown as a Matrix.",
|
|
1149
1150
|
path: `${h}.query`,
|
|
1150
1151
|
fix: "Use plain dataset fields for a Matrix, or use a table."
|
|
1151
1152
|
});
|
|
1152
|
-
let k =
|
|
1153
|
+
let k = F;
|
|
1153
1154
|
const L = f.datasetName;
|
|
1154
1155
|
for (const [P, V] of m.columns.entries()) {
|
|
1155
1156
|
const z = [...k.spec.rows, ...k.spec.columns].find(
|
|
1156
1157
|
(K) => Ts(K.field) === he(V, L)
|
|
1157
1158
|
);
|
|
1158
|
-
z || p({ code: "type_not_supported", message: `"${
|
|
1159
|
+
z || p({ code: "type_not_supported", message: `"${Jt(V)}" isn't a level of this Matrix.`, path: `${h}.matrix.columns[${P}]`, fix: "Name dimensions or the date field of the query in matrix.columns." }), k = Fs(k, Rs(k.spec, z.id, "columns")).config;
|
|
1159
1160
|
}
|
|
1160
1161
|
return { ...u, config: { matrix: k } };
|
|
1161
1162
|
}, ze = /* @__PURE__ */ new Map(), Je = /* @__PURE__ */ new Map();
|
|
@@ -1188,14 +1189,14 @@ async function Da(e, a, t, s) {
|
|
|
1188
1189
|
fix: H.length ? "Send sheetId: one of details.sheets." : "Add a sheet with sheet.add earlier in this list.",
|
|
1189
1190
|
details: { sheets: qe() }
|
|
1190
1191
|
}), H[0];
|
|
1191
|
-
})(), I = m ? { after: m.frameId } : typeof r.position == "string" ? r.position : void 0,
|
|
1192
|
+
})(), I = m ? { after: m.frameId } : typeof r.position == "string" ? r.position : void 0, T = I || r.width ? { ...I ? { position: I } : {}, ...r.width ? { width: r.width } : {} } : void 0, D = (H) => {
|
|
1192
1193
|
const B = r.handle ?? `$card_${++b}`;
|
|
1193
1194
|
return g.has(B) && p({ code: "invalid_change", message: `The handle ${B} is defined twice.`, path: `${f}.handle`, fix: "Give each new card, filter or sheet its own handle." }), g.set(B, { kind: "card", id: H.id, title: r.title }), d.push({ ref: B, kind: "card", id: H.id, title: r.title, changeIndex: u }), B;
|
|
1194
1195
|
};
|
|
1195
1196
|
if (r.type === "text") {
|
|
1196
1197
|
const H = [...r.query ? ["query"] : [], ...r.matrix ? ["matrix"] : [], ...Q(r)];
|
|
1197
1198
|
H.length && p({ code: "invalid_change", message: `A text card takes no ${Ge(H)}.`, path: f, fix: sa }), r.text === void 0 && p({ code: "invalid_change", message: "A text card needs its words in text.", path: `${f}.text`, fix: sa });
|
|
1198
|
-
const B =
|
|
1199
|
+
const B = zt({ text: r.text, inputs: y.inputs, path: `${f}.text` });
|
|
1199
1200
|
B.ok || j(B.problems);
|
|
1200
1201
|
const oe = Qs({
|
|
1201
1202
|
id: t.newId(),
|
|
@@ -1203,7 +1204,7 @@ async function Da(e, a, t, s) {
|
|
|
1203
1204
|
...r.description ? { description: r.description } : {},
|
|
1204
1205
|
richContent: B.ok && !B.unchanged ? B.richContent : { version: 1, blocks: [{ type: "paragraph", children: [] }] }
|
|
1205
1206
|
});
|
|
1206
|
-
_({ op: "card.add", sheetId: h.id, frame: { id: t.newId(), cards: [oe], activeCardId: oe.id }, ...
|
|
1207
|
+
_({ op: "card.add", sheetId: h.id, frame: { id: t.newId(), cards: [oe], activeCardId: oe.id }, ...T ? { placement: T } : {}, changeIndex: u }, f), D(oe);
|
|
1207
1208
|
break;
|
|
1208
1209
|
}
|
|
1209
1210
|
(r.text !== void 0 || !r.query) && p({
|
|
@@ -1212,19 +1213,19 @@ async function Da(e, a, t, s) {
|
|
|
1212
1213
|
path: r.text !== void 0 ? `${f}.text` : `${f}.query`,
|
|
1213
1214
|
fix: "Send query; text is for type text."
|
|
1214
1215
|
});
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
const N = await
|
|
1216
|
+
const F = at(r.query), k = F.query, L = r.type;
|
|
1217
|
+
wt(L, k, r.matrix, f);
|
|
1218
|
+
const N = await kt(L, k, r.matrix, f), P = {
|
|
1218
1219
|
...Ys({ id: t.newId(), title: r.title, ...r.description ? { description: r.description } : {} }),
|
|
1219
1220
|
type: N.type
|
|
1220
|
-
}, V =
|
|
1221
|
+
}, V = Yt(P, N);
|
|
1221
1222
|
V.ok || p({ code: "invalid_change", message: V.message, path: f });
|
|
1222
1223
|
const z = V.ok ? V.card : P;
|
|
1223
|
-
|
|
1224
|
+
St(z, k, r.matrix, f, r.title, N);
|
|
1224
1225
|
const K = { id: t.newId(), cards: [z], activeCardId: z.id };
|
|
1225
|
-
_({ op: "card.add", sheetId: h.id, frame: K, ...
|
|
1226
|
+
_({ op: "card.add", sheetId: h.id, frame: K, ...T ? { placement: T } : {}, changeIndex: u }, f);
|
|
1226
1227
|
const Z = D(z);
|
|
1227
|
-
c.push(z.id), await A({ cardId: z.id, cardRef: Z, stated:
|
|
1228
|
+
c.push(z.id), await A({ cardId: z.id, cardRef: Z, stated: F.calculations, index: u, path: f }), await E({
|
|
1228
1229
|
cardId: z.id,
|
|
1229
1230
|
cardRef: Z,
|
|
1230
1231
|
request: { settings: M(r) },
|
|
@@ -1241,11 +1242,11 @@ async function Da(e, a, t, s) {
|
|
|
1241
1242
|
break;
|
|
1242
1243
|
}
|
|
1243
1244
|
r.text !== void 0 && p({ code: "invalid_change", message: `"${(h == null ? void 0 : h.card.title) ?? m}" isn't a text card, so it takes no text.`, path: `${f}.text`, fix: "Change its query; text is for text cards." });
|
|
1244
|
-
const { card: I, read:
|
|
1245
|
-
let D = !1,
|
|
1246
|
-
const k = r.type && r.type !== ((
|
|
1245
|
+
const { card: I, read: T } = S(m, f);
|
|
1246
|
+
let D = !1, F = [];
|
|
1247
|
+
const k = r.type && r.type !== ((Tt = De(I)) == null ? void 0 : Tt.type) ? Ze(r.type) : void 0;
|
|
1247
1248
|
if (k && k !== I.type) {
|
|
1248
|
-
const N =
|
|
1249
|
+
const N = T.editable ? T.source : void 0, P = ms(I, k), V = P && N && N.kind === "semantic" ? (Ft = await t.loadCardSource({ domainId: N.domainId, datasetName: N.datasetName })) == null ? void 0 : Ft.fields : void 0, z = [], K = hs(I, k, {
|
|
1249
1250
|
...V ? { catalog: V } : {},
|
|
1250
1251
|
...P && !V ? { catalogLoading: !0 } : {},
|
|
1251
1252
|
createId: () => {
|
|
@@ -1270,28 +1271,28 @@ async function Da(e, a, t, s) {
|
|
|
1270
1271
|
if (r.query || r.matrix) {
|
|
1271
1272
|
const N = ne(y, m).card, P = Ie(N, { sql: !0, calculations: !1 }), V = P.editable ? at(P.query).query : void 0, K = Mo(V, (L == null ? void 0 : L.query) ?? {}, `${f}.query`, (se) => {
|
|
1272
1273
|
if (se.code === "query_form_mismatch" && (L != null && L.calculations.length)) {
|
|
1273
|
-
const fe = q(N, L.calculations, f), Te =
|
|
1274
|
+
const fe = q(N, L.calculations, f), Te = Wt({ card: N, stated: fe, context: { path: f, cardRef: r.cardId, dates: na(N) } });
|
|
1274
1275
|
if (!Te.ok)
|
|
1275
1276
|
throw n.push(...Te.problems), new ue();
|
|
1276
1277
|
}
|
|
1277
1278
|
return p(se);
|
|
1278
1279
|
});
|
|
1279
|
-
|
|
1280
|
-
const Z = ((
|
|
1281
|
-
|
|
1282
|
-
const B = P.editable && V ? ps(V, K, P.matrix, H) : void 0, oe = !B || B.aspects.length > 0, ce = B && !("sql" in K) ? Oe(K).filter((se) => !
|
|
1283
|
-
Y &&
|
|
1280
|
+
F = Lo((L == null ? void 0 : L.query) ?? {}, K);
|
|
1281
|
+
const Z = ((Rt = De(N)) == null ? void 0 : Rt.type) ?? nt(N.type), H = r.matrix ?? (P.editable ? P.matrix : void 0);
|
|
1282
|
+
wt(Z, K, H, f);
|
|
1283
|
+
const B = P.editable && V ? ps(V, K, P.matrix, H) : void 0, oe = !B || B.aspects.length > 0, ce = B && !("sql" in K) ? Oe(K).filter((se) => !Qt(B, se.key.role)) : [], Y = gs(N, B, ce.map((se) => se.key.role));
|
|
1284
|
+
Y && xt(Y, f);
|
|
1284
1285
|
let re = K;
|
|
1285
|
-
if (B && !("sql" in K) && K.orderBy && !B.aspects.includes("order") && ["metric", "group_by", "detail"].some((se) =>
|
|
1286
|
+
if (B && !("sql" in K) && K.orderBy && !B.aspects.includes("order") && ["metric", "group_by", "detail"].some((se) => Qt(B, se))) {
|
|
1286
1287
|
const { orderBy: se, ...fe } = K;
|
|
1287
1288
|
re = fe;
|
|
1288
1289
|
}
|
|
1289
1290
|
let ke;
|
|
1290
1291
|
if (oe) {
|
|
1291
|
-
const se = await
|
|
1292
|
+
const se = await kt(Z, re, H, f), fe = se.type === Ze(Z) ? { ...se, type: N.type } : se;
|
|
1292
1293
|
ke = fe;
|
|
1293
|
-
const Te = B ? { ...fe, change: B } : fe, me =
|
|
1294
|
-
if (me.ok ||
|
|
1294
|
+
const Te = B ? { ...fe, change: B } : fe, me = Yt(N, Te);
|
|
1295
|
+
if (me.ok || xt(me, f), me.ok && me.droppedBindings.length && o.push({
|
|
1295
1296
|
code: "control_binding_dropped",
|
|
1296
1297
|
message: `"${N.title}" loses the controls bound to the levels or measures this change removes; they stop changing this card.`,
|
|
1297
1298
|
path: `${f}.query`,
|
|
@@ -1308,7 +1309,7 @@ async function Da(e, a, t, s) {
|
|
|
1308
1309
|
});
|
|
1309
1310
|
_({ op: "card.update", cardId: m, update: { kind: "requery", query: Te }, changeIndex: u }, `${f}.query`), D = !0;
|
|
1310
1311
|
}
|
|
1311
|
-
ce.length &&
|
|
1312
|
+
ce.length && Ht(ne(y, m).card, ce).changed.length && _({ op: "card.update", cardId: m, update: { kind: "relabel", labels: ce }, changeIndex: u }, `${f}.query`), (oe || ce.length) && St(ne(y, m).card, re, H, f, N.title ?? "", ke, B);
|
|
1312
1313
|
}
|
|
1313
1314
|
(r.query || k) && await A({ cardId: m, cardRef: r.cardId, stated: (L == null ? void 0 : L.calculations) ?? [], index: u, path: f }) && (D = !0), (r.title !== void 0 || r.description !== void 0) && _(
|
|
1314
1315
|
{
|
|
@@ -1326,7 +1327,7 @@ async function Da(e, a, t, s) {
|
|
|
1326
1327
|
cardId: m,
|
|
1327
1328
|
cardRef: r.cardId,
|
|
1328
1329
|
request: { settings: M(r) },
|
|
1329
|
-
queryLabels:
|
|
1330
|
+
queryLabels: F,
|
|
1330
1331
|
index: u,
|
|
1331
1332
|
path: f
|
|
1332
1333
|
}), D && !c.includes(m) && c.push(m), d.push({ ref: r.cardId, kind: "card", id: m, title: I.title ?? "", changeIndex: u });
|
|
@@ -1345,7 +1346,7 @@ async function Da(e, a, t, s) {
|
|
|
1345
1346
|
case "filter.add": {
|
|
1346
1347
|
const m = await t.loadCardSource({ domainId: r.domainId, datasetName: r.datasetName });
|
|
1347
1348
|
m || p({ code: "field_not_found", message: `The dataset "${r.datasetName}" isn't available in this domain.`, path: `${f}.datasetName`, fix: "Find datasets with semaphor_list_datasets." });
|
|
1348
|
-
const h =
|
|
1349
|
+
const h = ht(m.fields, r.field, r.datasetName);
|
|
1349
1350
|
h || p({
|
|
1350
1351
|
code: "field_not_found",
|
|
1351
1352
|
message: `"${r.field}" isn't a field of ${r.datasetName}.`,
|
|
@@ -1353,17 +1354,17 @@ async function Da(e, a, t, s) {
|
|
|
1353
1354
|
fix: "Use one of details.available, or read semaphor_get_dataset_schema.",
|
|
1354
1355
|
details: { available: m.fields.slice(0, 20).map((L) => L.name) }
|
|
1355
1356
|
});
|
|
1356
|
-
const I = r.sheetIds ?
|
|
1357
|
+
const I = r.sheetIds ? $t(r.sheetIds, f) : void 0, T = ia(I), D = Ws({
|
|
1357
1358
|
field: h,
|
|
1358
1359
|
dataSource: m.dataSource,
|
|
1359
1360
|
connectionId: m.connectionId,
|
|
1360
1361
|
connectionType: m.connectionType,
|
|
1361
|
-
scope:
|
|
1362
|
+
scope: T,
|
|
1362
1363
|
existingInputs: Array.isArray(y.inputs) ? y.inputs : [],
|
|
1363
1364
|
createId: t.newId,
|
|
1364
1365
|
label: r.label
|
|
1365
|
-
}),
|
|
1366
|
-
|
|
1366
|
+
}), F = { ...D.filter };
|
|
1367
|
+
F.dateSelectionMode || (F.type = r.selection ?? "multiple"), r.defaultValues && (F.defaultValues = r.defaultValues), r.defaultPeriod && (F.defaultDateFilter = ra(r.defaultPeriod, h, `${f}.defaultPeriod`, p)), _({ op: "filter.add", input: { ...D, filter: F }, changeIndex: u }, f), ze.set(D.id, { sheetIds: I ?? "all", changeIndex: u }), (r.defaultValues !== void 0 || r.defaultPeriod !== void 0) && Je.set(D.id, { values: r.defaultValues, period: r.defaultPeriod, changeIndex: u });
|
|
1367
1368
|
const k = r.handle;
|
|
1368
1369
|
k && (g.has(k) && p({ code: "invalid_change", message: `The handle ${k} is defined twice.`, path: `${f}.handle`, fix: "Give each new card, filter or sheet its own handle." }), g.set(k, { kind: "filter", id: D.id, title: r.label })), d.push({ ref: k ?? D.id, kind: "filter", id: D.id, title: r.label, changeIndex: u });
|
|
1369
1370
|
break;
|
|
@@ -1378,31 +1379,31 @@ async function Da(e, a, t, s) {
|
|
|
1378
1379
|
});
|
|
1379
1380
|
const I = (y.inputs ?? []).find((L) => L.id === m);
|
|
1380
1381
|
if ((I == null ? void 0 : I.kind) !== "filter" || !I.filter) throw new ue();
|
|
1381
|
-
const
|
|
1382
|
+
const T = { ...I.filter };
|
|
1382
1383
|
let D = !1;
|
|
1383
|
-
r.selection && (
|
|
1384
|
+
r.selection && (T.type = r.selection), r.defaultValues !== void 0 && (D = !0, r.defaultValues === null ? delete T.defaultValues : T.defaultValues = r.defaultValues), r.defaultPeriod !== void 0 && (D = !0, r.defaultPeriod === null ? delete T.defaultDateFilter : T.defaultDateFilter = ra(
|
|
1384
1385
|
r.defaultPeriod,
|
|
1385
|
-
{ dataType:
|
|
1386
|
+
{ dataType: T.dataType },
|
|
1386
1387
|
`${f}.defaultPeriod`,
|
|
1387
1388
|
p
|
|
1388
1389
|
));
|
|
1389
|
-
const
|
|
1390
|
+
const F = r.sheetIds === void 0 ? void 0 : r.sheetIds ? $t(r.sheetIds, f) : "all", k = {
|
|
1390
1391
|
...r.label !== void 0 ? { label: r.label } : {},
|
|
1391
|
-
...r.selection !== void 0 || D ? { definition:
|
|
1392
|
+
...r.selection !== void 0 || D ? { definition: T } : {},
|
|
1392
1393
|
// A change of sheets states the sheets; what else the scope says (the cards it leaves out,
|
|
1393
1394
|
// whether it covers Document sheets) stays.
|
|
1394
|
-
...
|
|
1395
|
+
...F ? { scope: fs(
|
|
1395
1396
|
I.scope,
|
|
1396
|
-
ia(
|
|
1397
|
-
new Set([...
|
|
1397
|
+
ia(F === "all" ? void 0 : F),
|
|
1398
|
+
new Set([...mt(y).values()].filter((L) => L.sheetKind === "document").map((L) => L.sheetId))
|
|
1398
1399
|
) } : {},
|
|
1399
1400
|
...D ? { values: { defaultChanged: !0, target: {} } } : {}
|
|
1400
1401
|
};
|
|
1401
|
-
_({ op: "filter.update", filterId: m, settings: k, changeIndex: u }, f),
|
|
1402
|
+
_({ op: "filter.update", filterId: m, settings: k, changeIndex: u }, f), F && ze.set(m, { sheetIds: F, changeIndex: u }), D && Je.set(m, { values: r.defaultValues, period: r.defaultPeriod, changeIndex: u }), d.push({ ref: r.filterId, kind: "filter", id: m, title: I.label, changeIndex: u });
|
|
1402
1403
|
break;
|
|
1403
1404
|
}
|
|
1404
1405
|
case "filter.remove": {
|
|
1405
|
-
const m = ve(r.filterId, `${f}.filterId`), h = ((
|
|
1406
|
+
const m = ve(r.filterId, `${f}.filterId`), h = ((Dt = (y.inputs ?? []).find((I) => I.id === m)) == null ? void 0 : Dt.label) ?? "";
|
|
1406
1407
|
_({ op: "filter.remove", filterId: m, changeIndex: u }, f), d.push({ ref: r.filterId, kind: "filter", id: m, title: h, changeIndex: u });
|
|
1407
1408
|
break;
|
|
1408
1409
|
}
|
|
@@ -1414,7 +1415,7 @@ async function Da(e, a, t, s) {
|
|
|
1414
1415
|
path: `${f}.filterId`,
|
|
1415
1416
|
fix: "Tell the user to change it in the editor; removing or excluding it works."
|
|
1416
1417
|
});
|
|
1417
|
-
const I = X(r.cardId, `${f}.cardId`),
|
|
1418
|
+
const I = X(r.cardId, `${f}.cardId`), T = ge(y).find((F) => F.cardId === I).card, D = await Bo(T, r.field, t, `${f}.field`, p);
|
|
1418
1419
|
_({ op: "filter.bind", filterId: m, cardId: I, binding: { kind: "bound", cardId: I, bindingId: t.newId(), target: D }, changeIndex: u }, f), d.push({ ref: r.filterId, kind: "filter", id: m, title: h.label, changeIndex: u });
|
|
1419
1420
|
break;
|
|
1420
1421
|
}
|
|
@@ -1435,10 +1436,10 @@ async function Da(e, a, t, s) {
|
|
|
1435
1436
|
case "layout.tabs": {
|
|
1436
1437
|
const m = r.cardIds.map((N, P) => X(N, `${f}.cardIds[${P}]`)), h = (N, P, V = `${f}.cardIds`) => p({ code: "layout_invalid", message: N, path: V, fix: P });
|
|
1437
1438
|
new Set(m).size !== m.length && h("Each card is named once in tabs.", "Name two or more different cards, each once.");
|
|
1438
|
-
const I = m.map((N, P) => ne(y, N) ?? h("A Document section's card can't be a tab.", "Name cards on a grid sheet.", `${f}.cardIds[${P}]`)),
|
|
1439
|
-
I.some((N) => N.sheet.id !==
|
|
1440
|
-
const D = I[0].frame,
|
|
1441
|
-
d.push({ ref: r.cardIds[0], kind: "card", id:
|
|
1439
|
+
const I = m.map((N, P) => ne(y, N) ?? h("A Document section's card can't be a tab.", "Name cards on a grid sheet.", `${f}.cardIds[${P}]`)), T = I[0].sheet;
|
|
1440
|
+
I.some((N) => N.sheet.id !== T.id) && h("Tabs are cards on one sheet.", "Name cards on one sheet; a card moves to another sheet in the editor."), I.some((N) => tt(N.frame) && N.frame.cards.length > 1) && h("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.");
|
|
1441
|
+
const D = I[0].frame, F = I[0].card;
|
|
1442
|
+
d.push({ ref: r.cardIds[0], kind: "card", id: F.id, title: F.title ?? "", changeIndex: u });
|
|
1442
1443
|
const k = ga(D);
|
|
1443
1444
|
if (m.every((N, P) => k[P] === N)) break;
|
|
1444
1445
|
const L = [...new Map(I.map((N) => [N.frame.id, N.frame])).values()].filter((N) => N.visualId);
|
|
@@ -1447,12 +1448,12 @@ async function Da(e, a, t, s) {
|
|
|
1447
1448
|
message: "Moving these cards makes the tiles they leave or join local to this dashboard; they stop following their library visuals.",
|
|
1448
1449
|
path: f,
|
|
1449
1450
|
details: { cardIds: L.flatMap((N) => N.cards.map((P) => P.id)) }
|
|
1450
|
-
}),
|
|
1451
|
+
}), F.type === "kpi" && I.slice(1).some((N) => N.card.type === "text") && o.push({
|
|
1451
1452
|
code: "tabs_show_as_kpi_info",
|
|
1452
|
-
message: `A text card in ${ba(
|
|
1453
|
+
message: `A text card in ${ba(F.title)}'s spot shows as the KPI's info, not as a tab.`,
|
|
1453
1454
|
path: f,
|
|
1454
1455
|
fix: "Put another card first if the text should be a tab of its own."
|
|
1455
|
-
}), _({ op: "layout.tabs", sheetId:
|
|
1456
|
+
}), _({ op: "layout.tabs", sheetId: T.id, cardIds: m, changeIndex: u }, f);
|
|
1456
1457
|
break;
|
|
1457
1458
|
}
|
|
1458
1459
|
case "layout.untab": {
|
|
@@ -1467,20 +1468,20 @@ async function Da(e, a, t, s) {
|
|
|
1467
1468
|
break;
|
|
1468
1469
|
}
|
|
1469
1470
|
case "filter.exclude": {
|
|
1470
|
-
const m = ve(r.filterId, `${f}.filterId`), h = X(r.cardId, `${f}.cardId`), I = ((
|
|
1471
|
+
const m = ve(r.filterId, `${f}.filterId`), h = X(r.cardId, `${f}.cardId`), I = ((Ot = (y.inputs ?? []).find((T) => T.id === m)) == null ? void 0 : Ot.label) ?? "";
|
|
1471
1472
|
_({ op: "filter.exclude", filterId: m, cardId: h, changeIndex: u }, f), d.push({ ref: r.filterId, kind: "filter", id: m, title: I, changeIndex: u });
|
|
1472
1473
|
break;
|
|
1473
1474
|
}
|
|
1474
1475
|
case "highlight.add":
|
|
1475
1476
|
case "highlight.remove": {
|
|
1476
|
-
const m = X(r.cardId, `${f}.cardId`), { card: h } = S(m, f), { op: I, cardId:
|
|
1477
|
+
const m = X(r.cardId, `${f}.cardId`), { card: h } = S(m, f), { op: I, cardId: T, ...D } = r, F = await E({
|
|
1477
1478
|
cardId: m,
|
|
1478
1479
|
cardRef: r.cardId,
|
|
1479
1480
|
request: { highlights: r.op === "highlight.add" ? { add: [D] } : { remove: [r.ruleId] } },
|
|
1480
1481
|
queryLabels: [],
|
|
1481
1482
|
index: u,
|
|
1482
1483
|
path: f
|
|
1483
|
-
}), k = (
|
|
1484
|
+
}), k = (Et = (At = F == null ? void 0 : F.highlights) == null ? void 0 : At.add) == null ? void 0 : Et[0];
|
|
1484
1485
|
d.push({ ref: r.cardId, kind: "card", id: m, title: h.title ?? "", changeIndex: u, ...k ? { ruleId: k.id } : {} });
|
|
1485
1486
|
break;
|
|
1486
1487
|
}
|
|
@@ -1492,7 +1493,7 @@ async function Da(e, a, t, s) {
|
|
|
1492
1493
|
break;
|
|
1493
1494
|
}
|
|
1494
1495
|
case "sheet.update": {
|
|
1495
|
-
const m =
|
|
1496
|
+
const m = _t(r.sheetId, `${f}.sheetId`, { grid: !1 });
|
|
1496
1497
|
(m.title ?? "") !== r.title && _({ op: "sheet.update", sheetId: m.id, title: r.title, changeIndex: u }, f), d.push({ ref: r.sheetId, kind: "sheet", id: m.id, title: r.title, changeIndex: u });
|
|
1497
1498
|
break;
|
|
1498
1499
|
}
|
|
@@ -1519,7 +1520,7 @@ async function Da(e, a, t, s) {
|
|
|
1519
1520
|
}
|
|
1520
1521
|
}
|
|
1521
1522
|
if (n.length) return { ok: !1, problems: n };
|
|
1522
|
-
const ae =
|
|
1523
|
+
const ae = rt(e, i, v);
|
|
1523
1524
|
if (!ae.ok)
|
|
1524
1525
|
return {
|
|
1525
1526
|
ok: !1,
|
|
@@ -1527,7 +1528,7 @@ async function Da(e, a, t, s) {
|
|
|
1527
1528
|
{
|
|
1528
1529
|
code: "invalid_change",
|
|
1529
1530
|
message: ae.failedAt.message,
|
|
1530
|
-
path: `changes[${((
|
|
1531
|
+
path: `changes[${((qt = i[ae.failedAt.index]) == null ? void 0 : qt.changeIndex) ?? 0}]`,
|
|
1531
1532
|
fix: "Read the outline again and propose again."
|
|
1532
1533
|
}
|
|
1533
1534
|
]
|
|
@@ -1535,12 +1536,12 @@ async function Da(e, a, t, s) {
|
|
|
1535
1536
|
for (const u of c) {
|
|
1536
1537
|
const r = ne(ae.dashboard, u);
|
|
1537
1538
|
if (!r) continue;
|
|
1538
|
-
const f = ((
|
|
1539
|
-
m.editable && ("sql" in m.query ? !!m.query.sql : "measures" in m.query ? m.query.measures.length > 0 : m.query.columns.length > 0) && ((
|
|
1539
|
+
const f = ((Nt = i.find((T) => vt(T) === u)) == null ? void 0 : Nt.changeIndex) ?? 0, m = Ie(r.card, { sql: !0 }), h = ((Pt = De(r.card)) == null ? void 0 : Pt.type) ?? nt(r.card.type);
|
|
1540
|
+
m.editable && ("sql" in m.query ? !!m.query.sql : "measures" in m.query ? m.query.measures.length > 0 : m.query.columns.length > 0) && ((Lt = Fe[h]) == null ? void 0 : Lt.forms.includes(We(m.query))) || n.push({
|
|
1540
1541
|
code: "type_not_supported",
|
|
1541
1542
|
message: `As changed, "${r.card.title}" would have no query a ${h.replace(/_/g, " ")} can run.`,
|
|
1542
1543
|
path: `changes[${f}]`,
|
|
1543
|
-
fix: `Send a complete query with the type change: ${((
|
|
1544
|
+
fix: `Send a complete query with the type change: ${((Mt = Fe[h]) == null ? void 0 : Mt.forms.map((T) => Me[T]).join(" or ")) ?? "a measures query"}.`
|
|
1544
1545
|
});
|
|
1545
1546
|
}
|
|
1546
1547
|
if (n.push(...No(e, ae.dashboard, i, ze, C)), n.push(...Po(ae.dashboard, Je, t.calendar)), n.length) return { ok: !1, problems: n };
|
|
@@ -1549,18 +1550,18 @@ async function Da(e, a, t, s) {
|
|
|
1549
1550
|
const r = u.op === "filter.add" ? u.input.id : u.filterId, f = Ae(ae.dashboard, r, void 0, C);
|
|
1550
1551
|
if (!(f != null && f.editable)) continue;
|
|
1551
1552
|
const m = async (I) => {
|
|
1552
|
-
const
|
|
1553
|
+
const T = [];
|
|
1553
1554
|
for (const D of I) {
|
|
1554
|
-
const
|
|
1555
|
+
const F = D.datasetName ? await t.findRelationshipFields({
|
|
1555
1556
|
domainId: f.domainId,
|
|
1556
1557
|
fromDataset: f.datasetName,
|
|
1557
1558
|
field: f.field,
|
|
1558
1559
|
toDataset: D.datasetName
|
|
1559
1560
|
}) : [];
|
|
1560
|
-
|
|
1561
|
+
T.push({ ...D, suggestedFields: F });
|
|
1561
1562
|
}
|
|
1562
|
-
return
|
|
1563
|
-
}, h = (I) => I.map((
|
|
1563
|
+
return T;
|
|
1564
|
+
}, h = (I) => I.map((T) => `"${T.title}"`).join(", ");
|
|
1564
1565
|
if (f.notReached.length) {
|
|
1565
1566
|
const I = await m(f.notReached);
|
|
1566
1567
|
o.push({
|
|
@@ -1571,7 +1572,7 @@ async function Da(e, a, t, s) {
|
|
|
1571
1572
|
details: { cards: I }
|
|
1572
1573
|
});
|
|
1573
1574
|
}
|
|
1574
|
-
if ((
|
|
1575
|
+
if ((Bt = f.relationshipPending) != null && Bt.length) {
|
|
1575
1576
|
const I = await m(f.relationshipPending);
|
|
1576
1577
|
o.push({
|
|
1577
1578
|
code: "filter_reach_through_relationships",
|
|
@@ -1584,12 +1585,12 @@ async function Da(e, a, t, s) {
|
|
|
1584
1585
|
}
|
|
1585
1586
|
if (t.readComparisonDates)
|
|
1586
1587
|
for (const [u, r] of w) {
|
|
1587
|
-
const f = (
|
|
1588
|
+
const f = (Kt = ne(ae.dashboard, u)) == null ? void 0 : Kt.card;
|
|
1588
1589
|
if (!f) continue;
|
|
1589
1590
|
const m = await t.readComparisonDates({ card: f, dashboard: ae.dashboard });
|
|
1590
1591
|
m.dateWindow === "none" && o.push({
|
|
1591
1592
|
code: "comparison_without_date_window",
|
|
1592
|
-
message: `"${f.title || "Untitled"}" compares with an earlier period only while a date range applies to ${((
|
|
1593
|
+
message: `"${f.title || "Untitled"}" compares with an earlier period only while a date range applies to ${((jt = m.comparisonDate) == null ? void 0 : jt.label) ?? "its date"}; none does yet.`,
|
|
1593
1594
|
path: r,
|
|
1594
1595
|
fix: "Add a timeWindow on that date, or a dashboard date filter that reaches the card."
|
|
1595
1596
|
});
|
|
@@ -1615,7 +1616,7 @@ function Ao(e, a, t, s) {
|
|
|
1615
1616
|
if (!o.length) return [...t];
|
|
1616
1617
|
const i = (l) => Ge(l.map((c) => `"${c}"`)), d = /* @__PURE__ */ new Map();
|
|
1617
1618
|
for (const l of n) {
|
|
1618
|
-
const c =
|
|
1619
|
+
const c = vt(l);
|
|
1619
1620
|
if (!c || l.changeIndex === void 0) continue;
|
|
1620
1621
|
const g = o.filter((b) => b.reaches.includes(c)).map((b) => b.label), v = o.filter((b) => {
|
|
1621
1622
|
var x;
|
|
@@ -1635,7 +1636,7 @@ function Ao(e, a, t, s) {
|
|
|
1635
1636
|
return c ? { ...l, sentence: `${l.sentence} ${c}` } : l;
|
|
1636
1637
|
});
|
|
1637
1638
|
}
|
|
1638
|
-
function
|
|
1639
|
+
function vt(e) {
|
|
1639
1640
|
var a;
|
|
1640
1641
|
if (e.op === "card.update" || e.op === "card.remove") return e.cardId;
|
|
1641
1642
|
if (e.op === "card.add") return (a = e.frame.cards[0]) == null ? void 0 : a.id;
|
|
@@ -1673,12 +1674,12 @@ function qo(e, a) {
|
|
|
1673
1674
|
}
|
|
1674
1675
|
function No(e, a, t, s, n) {
|
|
1675
1676
|
var O;
|
|
1676
|
-
const o = [], i = new Map(ge(a).map(($) => [$.cardId, $])), d =
|
|
1677
|
+
const o = [], i = new Map(ge(a).map(($) => [$.cardId, $])), d = mt(a), l = _e(a), c = ($) => {
|
|
1677
1678
|
var p, R;
|
|
1678
1679
|
return ((R = (p = a.sheets) == null ? void 0 : p.find((_) => _.id === $)) == null ? void 0 : R.title) ?? $;
|
|
1679
1680
|
}, g = ($, p) => {
|
|
1680
1681
|
var R;
|
|
1681
|
-
return ((R = [...t].reverse().find((_) =>
|
|
1682
|
+
return ((R = [...t].reverse().find((_) => vt(_) === p || "filterId" in _ && _.filterId === $)) == null ? void 0 : R.changeIndex) ?? 0;
|
|
1682
1683
|
}, v = ($, p) => {
|
|
1683
1684
|
const R = l.findFilterInput({ inputId: $ }).input, _ = i.get(p), E = `"${_.card.title ?? ""}"`, S = `"${R.label}"`;
|
|
1684
1685
|
if (_.kind === "documentSectionCard")
|
|
@@ -1871,7 +1872,7 @@ function ia(e) {
|
|
|
1871
1872
|
return e ? { kind: "sheets", sheetIds: e } : { kind: "allSheets", sheetKinds: ["dashboard"] };
|
|
1872
1873
|
}
|
|
1873
1874
|
function ra(e, a, t, s) {
|
|
1874
|
-
["date", "datetime", "timestamp"].some((i) =>
|
|
1875
|
+
["date", "datetime", "timestamp"].some((i) => ct(a.dataType).includes(i)) || s({ code: "invalid_change", message: "defaultPeriod is for date filters.", path: t, fix: "Use defaultValues for this field." });
|
|
1875
1876
|
const o = _a(e);
|
|
1876
1877
|
if (!o) {
|
|
1877
1878
|
const i = "anchor" in e && e.anchor === "latest_available";
|
|
@@ -1894,7 +1895,7 @@ function ra(e, a, t, s) {
|
|
|
1894
1895
|
return o;
|
|
1895
1896
|
}
|
|
1896
1897
|
async function Bo(e, a, t, s, n) {
|
|
1897
|
-
const o = ys(e), i = o.kind === "config" ? o.executableSources : o.kind === "sql" ? o.pinnedCatalogSources.map((b) => b.source) : [], d = Ce(e), l = typeof a == "string" ? (d == null ? void 0 : d.kind) === "semantic" ? d.datasetName : void 0 : a.datasetName, c = i.find((b) => b.kind === "semantic" &&
|
|
1898
|
+
const o = ys(e), i = o.kind === "config" ? o.executableSources : o.kind === "sql" ? o.pinnedCatalogSources.map((b) => b.source) : [], d = Ce(e), l = typeof a == "string" ? (d == null ? void 0 : d.kind) === "semantic" ? d.datasetName : void 0 : a.datasetName, c = i.find((b) => b.kind === "semantic" && ct(b.datasetName) === ct(l));
|
|
1898
1899
|
if (!c || c.kind !== "semantic")
|
|
1899
1900
|
return n({
|
|
1900
1901
|
code: "field_not_found",
|
|
@@ -1902,7 +1903,7 @@ async function Bo(e, a, t, s, n) {
|
|
|
1902
1903
|
path: s,
|
|
1903
1904
|
fix: "Name a field of the card's own dataset, or { name, datasetName } for a dataset its query joins."
|
|
1904
1905
|
});
|
|
1905
|
-
const g = await t.loadCardSource({ domainId: c.domainId, datasetName: c.datasetName }), v = typeof a == "string" ? a : a.name, C = g ?
|
|
1906
|
+
const g = await t.loadCardSource({ domainId: c.domainId, datasetName: c.datasetName }), v = typeof a == "string" ? a : a.name, C = g ? ht(g.fields, v, c.datasetName) : void 0, y = C ? Hs(c, { column_name: C.name, data_type: C.dataType, ...C.sourceField ? { sourceField: C.sourceField } : {} }) : void 0;
|
|
1906
1907
|
return y || n({
|
|
1907
1908
|
code: "field_not_found",
|
|
1908
1909
|
message: `"${v}" isn't a field of ${c.datasetName}.`,
|
|
@@ -1912,26 +1913,45 @@ async function Bo(e, a, t, s, n) {
|
|
|
1912
1913
|
});
|
|
1913
1914
|
}
|
|
1914
1915
|
const Ko = {
|
|
1915
|
-
max:
|
|
1916
|
+
max: Xt,
|
|
1916
1917
|
what: "A proposal that creates a dashboard",
|
|
1917
|
-
fix: `Create with the first ${
|
|
1918
|
+
fix: `Create with the first ${Xt}, then change the new dashboard in a second proposal.`
|
|
1918
1919
|
};
|
|
1919
|
-
async function
|
|
1920
|
-
const t = (
|
|
1921
|
-
(
|
|
1920
|
+
async function ti(e, a) {
|
|
1921
|
+
const t = (d) => d && typeof d == "object" ? d.op : void 0, s = e.changes.flatMap(
|
|
1922
|
+
(d, l) => t(d) === "dashboard.update" ? [
|
|
1922
1923
|
{
|
|
1923
1924
|
code: "invalid_change",
|
|
1924
1925
|
message: "A create names its dashboard in create, not with dashboard.update.",
|
|
1925
|
-
path: `changes[${
|
|
1926
|
+
path: `changes[${l}].op`,
|
|
1926
1927
|
fix: "State the title and description in create."
|
|
1927
1928
|
}
|
|
1928
1929
|
] : []
|
|
1929
1930
|
);
|
|
1930
1931
|
if (s.length) return { ok: !1, problems: s };
|
|
1931
|
-
const n =
|
|
1932
|
-
|
|
1932
|
+
const n = Uo(e, a), o = await Da(n, e.changes, a, { limit: Ko });
|
|
1933
|
+
if (!o.ok) return o;
|
|
1934
|
+
const i = jo(o, e.changes);
|
|
1935
|
+
return { ...i, seed: n, sentence: Vo(i.dashboard) };
|
|
1933
1936
|
}
|
|
1934
1937
|
function jo(e, a) {
|
|
1938
|
+
if (a.some((o) => {
|
|
1939
|
+
if (!o || typeof o != "object") return !1;
|
|
1940
|
+
const { op: i } = o;
|
|
1941
|
+
return i === "layout.arrange" || i === "card.add" && ("width" in o || "position" in o);
|
|
1942
|
+
})) return e;
|
|
1943
|
+
const s = (e.dashboard.sheets ?? []).filter((o) => !it(o) && (o.frames ?? []).length > 0).map((o) => ({ op: "layout.arrange", sheetId: o.id }));
|
|
1944
|
+
if (!s.length) return e;
|
|
1945
|
+
const n = rt(e.dashboard, s, e.context);
|
|
1946
|
+
if (!n.ok) throw new Error(`Arranging a new dashboard failed: ${n.failedAt.code}`);
|
|
1947
|
+
return {
|
|
1948
|
+
...e,
|
|
1949
|
+
operations: [...e.operations, ...s],
|
|
1950
|
+
dashboard: n.dashboard,
|
|
1951
|
+
descriptions: [...e.descriptions, ...n.descriptions]
|
|
1952
|
+
};
|
|
1953
|
+
}
|
|
1954
|
+
function Uo(e, a) {
|
|
1935
1955
|
const t = e.changes.some((s) => s && typeof s == "object" && s.op === "sheet.add");
|
|
1936
1956
|
return {
|
|
1937
1957
|
id: e.dashboardId,
|
|
@@ -1943,19 +1963,19 @@ function jo(e, a) {
|
|
|
1943
1963
|
};
|
|
1944
1964
|
}
|
|
1945
1965
|
const st = (e, a) => `${e} ${a}${e === 1 ? "" : "s"}`;
|
|
1946
|
-
function
|
|
1966
|
+
function Vo(e) {
|
|
1947
1967
|
const a = e.sheets ?? [], t = a.reduce((o, i) => o + (i.frames ?? []).reduce((d, l) => {
|
|
1948
1968
|
var c;
|
|
1949
1969
|
return d + (((c = l.cards) == null ? void 0 : c.length) ?? 0);
|
|
1950
1970
|
}, 0), 0), s = (e.inputs ?? []).filter((o) => o.kind === "filter").length, n = [st(a.length, "sheet"), st(t, "card"), ...s ? [st(s, "filter")] : []];
|
|
1951
1971
|
return `Creates a private dashboard ${ba(e.title)} with ${Ge(n)}.`;
|
|
1952
1972
|
}
|
|
1953
|
-
const
|
|
1954
|
-
function
|
|
1973
|
+
const Go = 50;
|
|
1974
|
+
function ai(e, a) {
|
|
1955
1975
|
var C, y;
|
|
1956
1976
|
const t = (C = a.sheetIds) != null && C.length ? new Set(a.sheetIds) : void 0, s = (y = a.cardIds) != null && y.length ? new Set(a.cardIds) : void 0, n = (e.sheets ?? []).filter((b) => !t || t.has(b.id)), o = ge(e).filter(
|
|
1957
1977
|
(b) => (!t || t.has(b.sheetId)) && (!s || s.has(b.cardId))
|
|
1958
|
-
), i = o.length > (a.maxQueryCards ??
|
|
1978
|
+
), i = o.length > (a.maxQueryCards ?? Go), d = new Map(
|
|
1959
1979
|
(e.sheets ?? []).flatMap((b) => (b.frames ?? []).map((x) => [x.id, x]))
|
|
1960
1980
|
), l = /* @__PURE__ */ new Map(), c = (b) => {
|
|
1961
1981
|
(b == null ? void 0 : b.kind) === "semantic" && l.set(`${b.domainId}|${b.datasetName}`, { domainId: b.domainId, datasetName: b.datasetName });
|
|
@@ -1963,7 +1983,7 @@ function ti(e, a) {
|
|
|
1963
1983
|
sheetId: b.id,
|
|
1964
1984
|
title: b.title ?? "",
|
|
1965
1985
|
kind: b.kind === "document" ? "document" : "dashboard",
|
|
1966
|
-
...b.kind === "document" ? {} : { layout:
|
|
1986
|
+
...b.kind === "document" ? {} : { layout: Wo(b) },
|
|
1967
1987
|
cards: o.filter((x) => x.sheetId === b.id).map((x) => {
|
|
1968
1988
|
var S;
|
|
1969
1989
|
const O = x.card, $ = x.kind === "frameCard" ? (S = d.get(x.frameId)) == null ? void 0 : S.visualId : void 0, p = $ ? { linkedVisualId: $ } : {}, R = { cardId: x.cardId, title: O.title ?? "" };
|
|
@@ -1995,7 +2015,7 @@ function ti(e, a) {
|
|
|
1995
2015
|
editable: !1,
|
|
1996
2016
|
notEditable: { reason: _.reason, message: _.message, ..._.detail ? { detail: _.detail } : {} }
|
|
1997
2017
|
};
|
|
1998
|
-
const E = i ? void 0 :
|
|
2018
|
+
const E = i ? void 0 : pt(O);
|
|
1999
2019
|
return {
|
|
2000
2020
|
...R,
|
|
2001
2021
|
...Be(O),
|
|
@@ -2029,7 +2049,7 @@ function Be(e) {
|
|
|
2029
2049
|
const a = De(e);
|
|
2030
2050
|
return a ? { type: a.type, ...a.properties } : { type: nt(e.type) };
|
|
2031
2051
|
}
|
|
2032
|
-
function
|
|
2052
|
+
function Wo(e) {
|
|
2033
2053
|
const a = new Map((e.frames ?? []).map((t) => [t.id, t]));
|
|
2034
2054
|
return co(e).rows.map((t) => ({
|
|
2035
2055
|
tiles: t.tiles.map((s) => {
|
|
@@ -2044,13 +2064,13 @@ function ee(e) {
|
|
|
2044
2064
|
function le(e, a) {
|
|
2045
2065
|
return ee(e) && Object.prototype.hasOwnProperty.call(e, a) && e[a] !== void 0;
|
|
2046
2066
|
}
|
|
2047
|
-
const ie = le,
|
|
2048
|
-
function
|
|
2049
|
-
return Ee(String(e.type)) ??
|
|
2067
|
+
const ie = le, Qo = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns", "sortByColumns"], Yo = ["xAxisConfig", "yAxisConfig", "secondaryYAxisConfig", "tooltipConfig", "dataLabelsConfig"], Ho = '`format` on the matching column in `config.metricColumns`, `groupByColumns` or `detailColumns`; for a SQL or Python card, `preferences.sqlColumns["<column>"].format`', Ke = "`preferences.conditionalFormatting`, with columns named by card column id";
|
|
2068
|
+
function zo(e) {
|
|
2069
|
+
return Ee(String(e.type)) ?? gt;
|
|
2050
2070
|
}
|
|
2051
2071
|
function Re(e, a, t) {
|
|
2052
2072
|
if (t === void 0) return;
|
|
2053
|
-
const s = ee(t) ?
|
|
2073
|
+
const s = ee(t) ? zo(t).safeParse(t) : gt.safeParse(t);
|
|
2054
2074
|
if (!s.success)
|
|
2055
2075
|
for (const n of s.error.issues) {
|
|
2056
2076
|
const o = n.code === "unrecognized_keys" ? n.keys : [n.path.length ? String(n.path[n.path.length - 1]) : "type"];
|
|
@@ -2071,7 +2091,7 @@ function ot(e, a, t) {
|
|
|
2071
2091
|
}
|
|
2072
2092
|
function Oa(e, a) {
|
|
2073
2093
|
const t = [], s = e.config;
|
|
2074
|
-
for (const b of
|
|
2094
|
+
for (const b of Qo) {
|
|
2075
2095
|
const x = s == null ? void 0 : s[b];
|
|
2076
2096
|
Array.isArray(x) && x.forEach((O, $) => ot(t, `${a}.config.${b}[${$}]`, O));
|
|
2077
2097
|
}
|
|
@@ -2107,10 +2127,10 @@ function Oa(e, a) {
|
|
|
2107
2127
|
if (!ee(x)) continue;
|
|
2108
2128
|
const O = `${c}.tablePrefs.columnSettingsMap.${b}`;
|
|
2109
2129
|
for (const $ of ["numberFormat", "dateFormat", "inheritMetricFormat"])
|
|
2110
|
-
ie(x, $) && t.push({ path: `${O}.${$}`, field: $, replacement: $ === "inheritMetricFormat" ? "nothing: a column follows its `format`" :
|
|
2130
|
+
ie(x, $) && t.push({ path: `${O}.${$}`, field: $, replacement: $ === "inheritMetricFormat" ? "nothing: a column follows its `format`" : Ho });
|
|
2111
2131
|
ie(x, "colorRanges") && t.push({ path: `${O}.colorRanges`, field: "colorRanges", replacement: Ke });
|
|
2112
2132
|
}
|
|
2113
|
-
for (const b of
|
|
2133
|
+
for (const b of Yo) {
|
|
2114
2134
|
const x = l[b];
|
|
2115
2135
|
if (ee(x)) {
|
|
2116
2136
|
for (const O of ["formatMode", "mode", "formatOptions"])
|
|
@@ -2124,7 +2144,7 @@ function Oa(e, a) {
|
|
|
2124
2144
|
ee(x) && Re(t, `${c}.sqlColumns.${b}.format`, x.format);
|
|
2125
2145
|
return ee(l.sqlKpiValue) && Re(t, `${c}.sqlKpiValue.format`, l.sqlKpiValue.format), t;
|
|
2126
2146
|
}
|
|
2127
|
-
function
|
|
2147
|
+
function Jo(e) {
|
|
2128
2148
|
const a = `sheets[id=${e.sheetId}]`;
|
|
2129
2149
|
switch (e.kind) {
|
|
2130
2150
|
case "sheetCard":
|
|
@@ -2140,15 +2160,15 @@ function Aa(e) {
|
|
|
2140
2160
|
if (Array.isArray(e.sheets))
|
|
2141
2161
|
return ge(e).map((t) => ({
|
|
2142
2162
|
card: t.card,
|
|
2143
|
-
at:
|
|
2163
|
+
at: Jo(t)
|
|
2144
2164
|
}));
|
|
2145
2165
|
const a = e;
|
|
2146
2166
|
return Array.isArray(a.cards) ? a.cards.map((t) => ({ card: t, at: `cards[id=${t.id}]` })) : [];
|
|
2147
2167
|
}
|
|
2148
|
-
function
|
|
2168
|
+
function si(e) {
|
|
2149
2169
|
return Aa(e).flatMap(({ card: a, at: t }) => Oa(a, t));
|
|
2150
2170
|
}
|
|
2151
|
-
function
|
|
2171
|
+
function Xo(e, a) {
|
|
2152
2172
|
var o;
|
|
2153
2173
|
const t = (o = e.preferences) == null ? void 0 : o.conditionalFormatting;
|
|
2154
2174
|
if (t === void 0) return [];
|
|
@@ -2163,23 +2183,23 @@ function Jo(e, a) {
|
|
|
2163
2183
|
message: i.message
|
|
2164
2184
|
}));
|
|
2165
2185
|
}
|
|
2166
|
-
function
|
|
2186
|
+
function oi(e) {
|
|
2167
2187
|
return Aa(e).flatMap(({ card: a, at: t }) => [
|
|
2168
2188
|
...Oa(a, t).map((s) => ({
|
|
2169
2189
|
code: "retired_presentation_field",
|
|
2170
2190
|
path: s.path,
|
|
2171
2191
|
message: `\`${s.field}\` is retired: use ${s.replacement}.`
|
|
2172
2192
|
})),
|
|
2173
|
-
...
|
|
2193
|
+
...Xo(a, t)
|
|
2174
2194
|
]);
|
|
2175
2195
|
}
|
|
2176
|
-
const
|
|
2196
|
+
const Ct = [
|
|
2177
2197
|
"metricColumns",
|
|
2178
2198
|
"groupByColumns",
|
|
2179
2199
|
"detailColumns",
|
|
2180
2200
|
"pivotByColumns",
|
|
2181
2201
|
"sortByColumns"
|
|
2182
|
-
],
|
|
2202
|
+
], Zo = [
|
|
2183
2203
|
"xAxisConfig",
|
|
2184
2204
|
"yAxisConfig",
|
|
2185
2205
|
"secondaryYAxisConfig",
|
|
@@ -2206,10 +2226,10 @@ function qa(e) {
|
|
|
2206
2226
|
var a, t;
|
|
2207
2227
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
2208
2228
|
}
|
|
2209
|
-
function
|
|
2229
|
+
function en(e) {
|
|
2210
2230
|
return e.type === "kpi" && Us(e);
|
|
2211
2231
|
}
|
|
2212
|
-
function
|
|
2232
|
+
function ut(e) {
|
|
2213
2233
|
return e.type === "table" || e.type === "detailTable";
|
|
2214
2234
|
}
|
|
2215
2235
|
function te(e, a) {
|
|
@@ -2217,8 +2237,8 @@ function te(e, a) {
|
|
|
2217
2237
|
const t = (s = e.config) == null ? void 0 : s[a];
|
|
2218
2238
|
return Array.isArray(t) ? t : [];
|
|
2219
2239
|
}
|
|
2220
|
-
function
|
|
2221
|
-
for (const t of
|
|
2240
|
+
function tn(e, a) {
|
|
2241
|
+
for (const t of Ct) {
|
|
2222
2242
|
const s = te(e, t).indexOf(a);
|
|
2223
2243
|
if (s >= 0) return `config.${t}[${s}]`;
|
|
2224
2244
|
}
|
|
@@ -2233,16 +2253,16 @@ function Ye(e, a, t, s) {
|
|
|
2233
2253
|
a.format = t, a.formatOrigin = "override", e.changes.push({
|
|
2234
2254
|
path: s,
|
|
2235
2255
|
action: "moved",
|
|
2236
|
-
to: `${
|
|
2256
|
+
to: `${tn(e.card, a) ?? "config"}.format`
|
|
2237
2257
|
});
|
|
2238
2258
|
}
|
|
2239
|
-
function
|
|
2259
|
+
function It(e) {
|
|
2240
2260
|
if (!J(e)) return;
|
|
2241
2261
|
if (e.type === "temporal_bucket") return $e(e);
|
|
2242
2262
|
const a = $e(e);
|
|
2243
2263
|
return (a == null ? void 0 : a.type) === "currency" && a.currency === void 0 && Js(e) ? { ...a, currency: "USD" } : a;
|
|
2244
2264
|
}
|
|
2245
|
-
function
|
|
2265
|
+
function ft(e, a, t) {
|
|
2246
2266
|
if (!(!le(a, "dateFormat") && !le(a, "customFormat"))) {
|
|
2247
2267
|
if (Qe(a.dataType) && a.format == null && a.dateFormat != null) {
|
|
2248
2268
|
const s = Bs({
|
|
@@ -2261,7 +2281,7 @@ function ct(e, a, t) {
|
|
|
2261
2281
|
xe(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2262
2282
|
}
|
|
2263
2283
|
}
|
|
2264
|
-
function
|
|
2284
|
+
function an(e, a, t) {
|
|
2265
2285
|
if (!le(a, "dateFormat") && !le(a, "customFormat")) return;
|
|
2266
2286
|
const s = a.dateFormat === "custom" ? a.customFormat : a.dateFormat;
|
|
2267
2287
|
e.card.type === "detailTable" && Qe(a.dataType) && !a.format && typeof s == "string" && s.trim() ? (a.format = { type: "date", pattern: s }, a.formatOrigin = "override", e.changes.push({
|
|
@@ -2274,15 +2294,15 @@ function tn(e, a, t) {
|
|
|
2274
2294
|
detail: "A detail date pattern on a column that has a format of its own."
|
|
2275
2295
|
}), xe(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${t}.dateFormat`, action: "removed" });
|
|
2276
2296
|
}
|
|
2277
|
-
function
|
|
2297
|
+
function sn(e, a, t, s) {
|
|
2278
2298
|
if (a.format !== void 0) {
|
|
2279
|
-
const n =
|
|
2299
|
+
const n = It(a.format);
|
|
2280
2300
|
n ? ye(n, a.format) || (a.format = n, e.changes.push({ path: `${s}.format`, action: "cleaned" })) : (delete a.format, e.changes.push({ path: `${s}.format`, action: "removed" }));
|
|
2281
2301
|
}
|
|
2282
|
-
t === "groupByColumns" || t === "pivotByColumns" ?
|
|
2302
|
+
t === "groupByColumns" || t === "pivotByColumns" ? ft(e, a, s) : t === "detailColumns" ? an(e, a, s) : xe(a, ["dateFormat", "customFormat"]) && e.changes.push({ path: `${s}.dateFormat`, action: "removed" });
|
|
2283
2303
|
}
|
|
2284
|
-
function
|
|
2285
|
-
for (const t of
|
|
2304
|
+
function on(e, a) {
|
|
2305
|
+
for (const t of Ct)
|
|
2286
2306
|
te(e.card, t).forEach((s, n) => {
|
|
2287
2307
|
var i;
|
|
2288
2308
|
if (!s.format || s.formatOrigin) return;
|
|
@@ -2293,31 +2313,31 @@ function sn(e, a) {
|
|
|
2293
2313
|
});
|
|
2294
2314
|
});
|
|
2295
2315
|
}
|
|
2296
|
-
function
|
|
2316
|
+
function nn(e) {
|
|
2297
2317
|
var t;
|
|
2298
2318
|
const a = (t = e.card.interactionConfig) == null ? void 0 : t.drillHierarchies;
|
|
2299
2319
|
Array.isArray(a) && a.forEach((s, n) => {
|
|
2300
2320
|
if (!J(s)) return;
|
|
2301
2321
|
const o = `interactionConfig.drillHierarchies[${n}]`;
|
|
2302
|
-
J(s.baseField) &&
|
|
2322
|
+
J(s.baseField) && ft(e, s.baseField, `${o}.baseField`), Array.isArray(s.steps) && s.steps.forEach((i, d) => {
|
|
2303
2323
|
if (J(i) && J(i.field)) {
|
|
2304
2324
|
const l = i.field, c = `${o}.steps[${d}].field`;
|
|
2305
2325
|
if (l.format !== void 0) {
|
|
2306
|
-
const g =
|
|
2326
|
+
const g = It(l.format);
|
|
2307
2327
|
g && !ye(g, l.format) && (l.format = g, e.changes.push({ path: `${c}.format`, action: "cleaned" }));
|
|
2308
2328
|
}
|
|
2309
|
-
|
|
2329
|
+
ft(e, l, c);
|
|
2310
2330
|
}
|
|
2311
2331
|
});
|
|
2312
2332
|
});
|
|
2313
2333
|
}
|
|
2314
|
-
const
|
|
2334
|
+
const rn = [
|
|
2315
2335
|
"numberFormat",
|
|
2316
2336
|
"dateFormat",
|
|
2317
2337
|
"inheritMetricFormat",
|
|
2318
2338
|
"colorRanges"
|
|
2319
2339
|
];
|
|
2320
|
-
function
|
|
2340
|
+
function dn(e, a) {
|
|
2321
2341
|
const t = (n) => n == null ? void 0 : n.trim().toLowerCase(), s = t(a);
|
|
2322
2342
|
return [
|
|
2323
2343
|
e.id,
|
|
@@ -2335,13 +2355,13 @@ function da(e, a) {
|
|
|
2335
2355
|
...te(e, "detailColumns"),
|
|
2336
2356
|
...te(e, "metricColumns"),
|
|
2337
2357
|
...te(e, "groupByColumns")
|
|
2338
|
-
].filter((n) =>
|
|
2358
|
+
].filter((n) => dn(n, a));
|
|
2339
2359
|
return s.length === 1 ? s[0] : void 0;
|
|
2340
2360
|
}
|
|
2341
|
-
function
|
|
2361
|
+
function ln(e) {
|
|
2342
2362
|
return e.type === "number" && J(e.numberFormat) && e.inheritMetricFormat !== !0;
|
|
2343
2363
|
}
|
|
2344
|
-
function
|
|
2364
|
+
function cn(e, a) {
|
|
2345
2365
|
var t;
|
|
2346
2366
|
return Qe(a.dataType) ? te(e, "detailColumns").includes(a) ? e.type === "detailTable" : ro(a.granularity) || ((t = a.format) == null ? void 0 : t.type) === "temporal_bucket" || a.semanticTemporalPresentation != null : !1;
|
|
2347
2367
|
}
|
|
@@ -2350,15 +2370,15 @@ function la(e, a, t, s) {
|
|
|
2350
2370
|
const n = (i = e.card).preferences ?? (i.preferences = {}), o = n.sqlColumns ?? (n.sqlColumns = {});
|
|
2351
2371
|
o[a] = { ...o[a], format: t }, e.changes.push({ path: s, action: "moved", to: `preferences.sqlColumns[${JSON.stringify(a)}].format` });
|
|
2352
2372
|
}
|
|
2353
|
-
function
|
|
2373
|
+
function un(e) {
|
|
2354
2374
|
const [a, ...t] = e;
|
|
2355
2375
|
if (!a) return;
|
|
2356
2376
|
const s = Object.fromEntries(
|
|
2357
2377
|
Object.entries(a).filter(([n, o]) => t.every((i) => Ea(i[n], o)))
|
|
2358
2378
|
);
|
|
2359
|
-
return
|
|
2379
|
+
return gt.safeParse(s).success ? s : void 0;
|
|
2360
2380
|
}
|
|
2361
|
-
function
|
|
2381
|
+
function fn(e, a) {
|
|
2362
2382
|
const t = e.card, s = js({
|
|
2363
2383
|
groupByColumns: te(t, "groupByColumns"),
|
|
2364
2384
|
metricColumns: te(t, "metricColumns"),
|
|
@@ -2376,10 +2396,10 @@ function un(e, a) {
|
|
|
2376
2396
|
});
|
|
2377
2397
|
}
|
|
2378
2398
|
}
|
|
2379
|
-
function
|
|
2399
|
+
function mn(e, a) {
|
|
2380
2400
|
var o;
|
|
2381
2401
|
if (!a.length) return;
|
|
2382
|
-
const t = te(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, n = s && !s.format ?
|
|
2402
|
+
const t = te(e.card, "metricColumns"), s = t.length === 1 ? t[0] : void 0, n = s && !s.format ? un(a.map((i) => i.format)) : void 0;
|
|
2383
2403
|
s && n && Ye(e, s, n, a[0].from);
|
|
2384
2404
|
for (const i of a)
|
|
2385
2405
|
if (!(s != null && s.format && ye(i.format, s.format))) {
|
|
@@ -2404,7 +2424,7 @@ function fn(e, a) {
|
|
|
2404
2424
|
);
|
|
2405
2425
|
}
|
|
2406
2426
|
}
|
|
2407
|
-
function
|
|
2427
|
+
function hn(e) {
|
|
2408
2428
|
var l;
|
|
2409
2429
|
const a = (l = e.card.preferences) == null ? void 0 : l.tablePrefs, t = a == null ? void 0 : a.columnSettingsMap;
|
|
2410
2430
|
if (!J(t)) return;
|
|
@@ -2412,11 +2432,11 @@ function mn(e) {
|
|
|
2412
2432
|
for (const [c, g] of Object.entries(t)) {
|
|
2413
2433
|
if (!J(g)) continue;
|
|
2414
2434
|
const v = g, C = `preferences.tablePrefs.columnSettingsMap[${JSON.stringify(c)}]`;
|
|
2415
|
-
if (
|
|
2435
|
+
if (ln(v)) {
|
|
2416
2436
|
const y = qs(v.numberFormat);
|
|
2417
2437
|
if (y && n)
|
|
2418
2438
|
la(e, c, y, `${C}.numberFormat`);
|
|
2419
|
-
else if (y &&
|
|
2439
|
+
else if (y && ut(s)) {
|
|
2420
2440
|
const b = da(s, c), x = { key: c, format: y, from: `${C}.numberFormat` };
|
|
2421
2441
|
b ? i.set(b, [...i.get(b) ?? [], x]) : o ? d.push(x) : e.unconverted.push({
|
|
2422
2442
|
path: x.from,
|
|
@@ -2435,38 +2455,38 @@ function mn(e) {
|
|
|
2435
2455
|
const y = v.type === "date";
|
|
2436
2456
|
if (y && n)
|
|
2437
2457
|
la(e, c, Ns(v.dateFormat), `${C}.dateFormat`);
|
|
2438
|
-
else if (y &&
|
|
2458
|
+
else if (y && ut(s)) {
|
|
2439
2459
|
const b = da(s, c);
|
|
2440
|
-
(!b || !
|
|
2460
|
+
(!b || !cn(s, b)) && e.unconverted.push({
|
|
2441
2461
|
path: `${C}.dateFormat`,
|
|
2442
2462
|
reason: "config_column_date_setting",
|
|
2443
2463
|
detail: `"${c}"'s download formats its dates with this setting.`
|
|
2444
2464
|
});
|
|
2445
2465
|
}
|
|
2446
2466
|
}
|
|
2447
|
-
for (const y of
|
|
2467
|
+
for (const y of rn)
|
|
2448
2468
|
Object.prototype.hasOwnProperty.call(v, y) && (delete v[y], e.changes.push({ path: `${C}.${y}`, action: "removed" }));
|
|
2449
2469
|
}
|
|
2450
|
-
|
|
2470
|
+
fn(e, i), mn(e, d);
|
|
2451
2471
|
}
|
|
2452
|
-
function
|
|
2472
|
+
function pn(e) {
|
|
2453
2473
|
return Object.keys(e).some(
|
|
2454
2474
|
(a) => a !== "enabled" && a !== "colorRanges" && e[a] !== void 0
|
|
2455
2475
|
);
|
|
2456
2476
|
}
|
|
2457
|
-
function
|
|
2477
|
+
function gn(e) {
|
|
2458
2478
|
return (e == null ? void 0 : e.enabled) === !1 || (e == null ? void 0 : e.enabled) === "false";
|
|
2459
2479
|
}
|
|
2460
|
-
function
|
|
2480
|
+
function bn(e) {
|
|
2461
2481
|
const a = e.card, t = a.preferences;
|
|
2462
2482
|
if (!t) return;
|
|
2463
|
-
const s = t.kpiVisualOptions, n = J(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, o = t, i = J(o.formatNumber) ? o.formatNumber : void 0, d = n ? $e(Ps(n)) : void 0, l = i &&
|
|
2483
|
+
const s = t.kpiVisualOptions, n = J(s == null ? void 0 : s.formatOptions) ? s.formatOptions : void 0, o = t, i = J(o.formatNumber) ? o.formatNumber : void 0, d = n ? $e(Ps(n)) : void 0, l = i && pn(i) ? $e(Ls(i)) : void 0;
|
|
2464
2484
|
if (a.type === "kpi") {
|
|
2465
|
-
if (
|
|
2485
|
+
if (gn(i) && e.unconverted.push({
|
|
2466
2486
|
path: "preferences.formatNumber.enabled",
|
|
2467
2487
|
reason: "raw_display",
|
|
2468
2488
|
detail: "Formatting is switched off on this KPI."
|
|
2469
|
-
}),
|
|
2489
|
+
}), en(a)) {
|
|
2470
2490
|
const c = d ?? l, g = s == null ? void 0 : s.queryComparisonPolarity;
|
|
2471
2491
|
(c || g) && (t.sqlKpiValue = {
|
|
2472
2492
|
...t.sqlKpiValue,
|
|
@@ -2481,14 +2501,14 @@ function gn(e) {
|
|
|
2481
2501
|
te(a, "metricColumns").forEach((g) => {
|
|
2482
2502
|
d ? Ye(e, g, d, "preferences.kpiVisualOptions.formatOptions") : l && !g.format && Ye(e, g, l, "preferences.formatNumber");
|
|
2483
2503
|
});
|
|
2484
|
-
|
|
2504
|
+
yn(e, i);
|
|
2485
2505
|
} else if (l) {
|
|
2486
2506
|
const c = te(a, "metricColumns");
|
|
2487
2507
|
qa(a) ? e.unconverted.push({
|
|
2488
2508
|
path: "preferences.formatNumber",
|
|
2489
2509
|
reason: "sql_card_wide_format",
|
|
2490
2510
|
detail: "A card-wide number format on a SQL or Python card."
|
|
2491
|
-
}) : !
|
|
2511
|
+
}) : !ut(a) && a.type !== "matrixTable" && c.some((g) => !g.format) && e.unconverted.push({
|
|
2492
2512
|
path: "preferences.formatNumber",
|
|
2493
2513
|
reason: "chart_card_wide_format",
|
|
2494
2514
|
detail: "A card-wide number format on a chart measure without a format of its own."
|
|
@@ -2502,7 +2522,7 @@ function gn(e) {
|
|
|
2502
2522
|
for (const c of ["numberAxisFormat", "columnSettings"])
|
|
2503
2523
|
xe(t, [c]) && e.changes.push({ path: `preferences.${c}`, action: "removed" });
|
|
2504
2524
|
}
|
|
2505
|
-
function
|
|
2525
|
+
function yn(e, a) {
|
|
2506
2526
|
var o;
|
|
2507
2527
|
const t = a == null ? void 0 : a.decimalPlaces, s = e.card.preferences;
|
|
2508
2528
|
if (typeof t != "number" || ((o = s.comparisonPresentation) == null ? void 0 : o.precision) !== void 0) return;
|
|
@@ -2516,24 +2536,24 @@ function bn(e, a) {
|
|
|
2516
2536
|
to: "preferences.comparisonPresentation.precision"
|
|
2517
2537
|
}));
|
|
2518
2538
|
}
|
|
2519
|
-
const
|
|
2520
|
-
function
|
|
2539
|
+
const vn = /* @__PURE__ */ new Set(["number", "currency", "percent", "scientific", "date", "duration"]);
|
|
2540
|
+
function Cn(e) {
|
|
2521
2541
|
const a = e.card.preferences;
|
|
2522
2542
|
if (a)
|
|
2523
|
-
for (const t of
|
|
2543
|
+
for (const t of Zo) {
|
|
2524
2544
|
const s = a[t];
|
|
2525
2545
|
if (!J(s)) continue;
|
|
2526
2546
|
const n = `preferences.${t}`, o = J(s.formatOptions) ? s.formatOptions : void 0, i = t === "dataLabelsConfig" && typeof s.format == "string" ? s.format : void 0, d = s.formatMode === "override" || s.formatMode === "inherit" ? s.formatMode : s.mode === "override" || s.mode === "inherit" ? s.mode : void 0, l = d ?? (i === "none" ? "raw" : i && i !== "auto" || o ? "override" : "inherit");
|
|
2527
2547
|
if (l === "raw" || d === void 0 && i === "none")
|
|
2528
2548
|
e.unconverted.push({ path: `${n}.format`, reason: "raw_display", detail: "Data labels show raw values." });
|
|
2529
2549
|
else if (l === "override") {
|
|
2530
|
-
const c = o && o.type ? o : i &&
|
|
2550
|
+
const c = o && o.type ? o : i && vn.has(i) ? { ...o, type: i } : o, g = c ? $e(Ms(c, { preserveOmittedProperties: !0 })) : void 0;
|
|
2531
2551
|
g && (s.valueFormat = g, e.changes.push({ path: `${n}.formatOptions`, action: "moved", to: `${n}.valueFormat` }));
|
|
2532
2552
|
}
|
|
2533
2553
|
xe(s, ["formatMode", "mode", "formatOptions", ...t === "dataLabelsConfig" ? ["format"] : []]) && e.changes.push({ path: `${n}.formatMode`, action: "removed" });
|
|
2534
2554
|
}
|
|
2535
2555
|
}
|
|
2536
|
-
function
|
|
2556
|
+
function In(e) {
|
|
2537
2557
|
var s;
|
|
2538
2558
|
const a = (s = e.card.config) == null ? void 0 : s.matrix, t = J(a) && J(a.presentation) ? a.presentation : void 0;
|
|
2539
2559
|
if (t)
|
|
@@ -2541,32 +2561,32 @@ function Cn(e) {
|
|
|
2541
2561
|
const o = t[n];
|
|
2542
2562
|
if (J(o))
|
|
2543
2563
|
for (const [i, d] of Object.entries(o)) {
|
|
2544
|
-
const l =
|
|
2564
|
+
const l = It(d);
|
|
2545
2565
|
l && !ye(l, d) && (o[i] = l, e.changes.push({ path: `config.matrix.presentation.${n}[${JSON.stringify(i)}]`, action: "cleaned" }));
|
|
2546
2566
|
}
|
|
2547
2567
|
}
|
|
2548
2568
|
}
|
|
2549
|
-
function
|
|
2569
|
+
function _n(e, a = {}) {
|
|
2550
2570
|
const t = { card: structuredClone(e), changes: [], unconverted: [] };
|
|
2551
|
-
for (const s of
|
|
2571
|
+
for (const s of Ct)
|
|
2552
2572
|
te(t.card, s).forEach((n, o) => {
|
|
2553
|
-
J(n) &&
|
|
2573
|
+
J(n) && sn(t, n, s, `config.${s}[${o}]`);
|
|
2554
2574
|
});
|
|
2555
|
-
return
|
|
2575
|
+
return nn(t), hn(t), bn(t), Cn(t), In(t), on(t, a), t.changes.length === 0 && t.unconverted.length === 0 ? { card: e, changes: [], unconverted: [] } : t;
|
|
2556
2576
|
}
|
|
2557
|
-
const
|
|
2558
|
-
function
|
|
2577
|
+
const $n = "__semaphor_unassigned_trigger__", wn = "__NULL__";
|
|
2578
|
+
function xn(e) {
|
|
2559
2579
|
var a, t;
|
|
2560
2580
|
return !!((a = e.sql) != null && a.trim() || (t = e.python) != null && t.trim());
|
|
2561
2581
|
}
|
|
2562
|
-
function
|
|
2582
|
+
function Sn(e) {
|
|
2563
2583
|
const a = e.config;
|
|
2564
2584
|
return a ? e.type === "detailTable" ? a.detailColumns ?? [] : [...a.detailColumns ?? [], ...a.metricColumns ?? [], ...a.groupByColumns ?? []] : [];
|
|
2565
2585
|
}
|
|
2566
2586
|
function ca(e) {
|
|
2567
2587
|
return [e.id, e.alias, e.name, e.qualifiedFieldName, e.label];
|
|
2568
2588
|
}
|
|
2569
|
-
function
|
|
2589
|
+
function kn(e, a) {
|
|
2570
2590
|
var c, g;
|
|
2571
2591
|
const t = ((c = e.config) == null ? void 0 : c.metricColumns) ?? [], s = ((g = e.config) == null ? void 0 : g.pivotByColumns) ?? [];
|
|
2572
2592
|
if (t.length !== 1 || s.length !== 1) return { reason: "pivot_key_form" };
|
|
@@ -2575,16 +2595,16 @@ function Sn(e, a) {
|
|
|
2575
2595
|
ref: {
|
|
2576
2596
|
kind: "pivot",
|
|
2577
2597
|
metricId: n.id,
|
|
2578
|
-
members: [{ fieldId: o.id, value: a ===
|
|
2598
|
+
members: [{ fieldId: o.id, value: a === wn ? null : a }]
|
|
2579
2599
|
}
|
|
2580
2600
|
};
|
|
2581
2601
|
}
|
|
2582
|
-
function
|
|
2602
|
+
function Tn(e, a) {
|
|
2583
2603
|
var i, d;
|
|
2584
|
-
if (a ===
|
|
2585
|
-
if (
|
|
2586
|
-
const t =
|
|
2587
|
-
return o.length === 1 ? { ref: { kind: "field", fieldId: o[0] } } : o.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ?
|
|
2604
|
+
if (a === $n) return { reason: "unassigned_trigger" };
|
|
2605
|
+
if (xn(e)) return { ref: { kind: "result", key: a } };
|
|
2606
|
+
const t = Sn(e), s = t.filter((l) => ca(l).includes(a)), n = s.length ? s : t.filter((l) => ca(l).some((c) => (c == null ? void 0 : c.trim().toLowerCase()) === a.trim().toLowerCase())), o = [...new Set(n.map((l) => l.id))];
|
|
2607
|
+
return o.length === 1 ? { ref: { kind: "field", fieldId: o[0] } } : o.length > 1 ? { reason: "ambiguous_column" } : (d = (i = e.config) == null ? void 0 : i.pivotByColumns) != null && d.length ? kn(e, a) : { reason: "no_matching_column" };
|
|
2588
2608
|
}
|
|
2589
2609
|
function ua(e, a, t, s, n) {
|
|
2590
2610
|
const o = (w, q, A) => {
|
|
@@ -2629,7 +2649,7 @@ function ua(e, a, t, s, n) {
|
|
|
2629
2649
|
target: S
|
|
2630
2650
|
};
|
|
2631
2651
|
}
|
|
2632
|
-
function
|
|
2652
|
+
function Fn(e, a) {
|
|
2633
2653
|
var n;
|
|
2634
2654
|
const t = (n = pa(e)) == null ? void 0 : n.value;
|
|
2635
2655
|
if (!t) return [];
|
|
@@ -2642,7 +2662,7 @@ function Tn(e, a) {
|
|
|
2642
2662
|
return [{ id: `kpi-color-range-${i + 1}`, condition: b, target: { level: "cell" }, style: { textColor: x } }];
|
|
2643
2663
|
}).reverse();
|
|
2644
2664
|
}
|
|
2645
|
-
function
|
|
2665
|
+
function Rn(e) {
|
|
2646
2666
|
var g, v, C, y, b, x, O;
|
|
2647
2667
|
const a = structuredClone(e), t = [], s = [], n = [], o = ($) => {
|
|
2648
2668
|
t.some((p) => p.from.startsWith($)) || t.push({ ruleId: "", action: "removed", from: $ });
|
|
@@ -2655,7 +2675,7 @@ function Fn(e) {
|
|
|
2655
2675
|
t.push({ ruleId: _.id, action: "removed", from: `${p}.rules[${E}]` });
|
|
2656
2676
|
return;
|
|
2657
2677
|
}
|
|
2658
|
-
const S = ua(_, (q) =>
|
|
2678
|
+
const S = ua(_, (q) => Tn(a, q), `${p}.rules[${E}]`, s, !1);
|
|
2659
2679
|
S && (n.push(S), t.push({ ruleId: _.id, action: "moved", from: `${p}.rules[${E}]` }));
|
|
2660
2680
|
}), delete i.conditionalFormatting, s.some((_) => _.path.startsWith(p)) || o(p);
|
|
2661
2681
|
}
|
|
@@ -2677,7 +2697,7 @@ function Fn(e) {
|
|
|
2677
2697
|
if (c && le(c, "colorRanges")) {
|
|
2678
2698
|
const $ = Array.isArray(c.colorRanges) ? c.colorRanges : [];
|
|
2679
2699
|
if (a.type === "kpi") {
|
|
2680
|
-
const p =
|
|
2700
|
+
const p = Fn(a, $);
|
|
2681
2701
|
n.push(...p), p.forEach((R) => t.push({ ruleId: R.id, action: "moved", from: "preferences.formatNumber.colorRanges" }));
|
|
2682
2702
|
}
|
|
2683
2703
|
delete c.colorRanges, Object.keys(c).length === 0 && delete l.formatNumber, t.some((p) => p.from === "preferences.formatNumber.colorRanges") || t.push({ ruleId: "", action: "removed", from: "preferences.formatNumber.colorRanges" });
|
|
@@ -2695,11 +2715,11 @@ function Fn(e) {
|
|
|
2695
2715
|
}
|
|
2696
2716
|
return { card: a, changes: t, unresolved: s };
|
|
2697
2717
|
}
|
|
2698
|
-
function
|
|
2699
|
-
const { only: t, ...s } = a, n = t === "rules" ? void 0 :
|
|
2718
|
+
function ni(e, a = {}) {
|
|
2719
|
+
const { only: t, ...s } = a, n = t === "rules" ? void 0 : _n(e, s), o = t === "formats" ? void 0 : Rn((n == null ? void 0 : n.card) ?? e);
|
|
2700
2720
|
return { card: (o == null ? void 0 : o.card) ?? (n == null ? void 0 : n.card) ?? e, formats: n, rules: o };
|
|
2701
2721
|
}
|
|
2702
|
-
function
|
|
2722
|
+
function Dn(e) {
|
|
2703
2723
|
if (e.op === "dashboard.update" || e.op === "sheet.update") return !0;
|
|
2704
2724
|
if (e.op !== "card.update") return !1;
|
|
2705
2725
|
switch (e.update.kind) {
|
|
@@ -2711,389 +2731,390 @@ function Rn(e) {
|
|
|
2711
2731
|
return !1;
|
|
2712
2732
|
}
|
|
2713
2733
|
}
|
|
2714
|
-
function
|
|
2715
|
-
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(
|
|
2734
|
+
function ii(e) {
|
|
2735
|
+
return e.impact.length || e.detaches ? "needed" : e.operations.length > 0 && e.operations.every(Dn) ? "not_needed" : "needed";
|
|
2716
2736
|
}
|
|
2717
2737
|
export {
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2738
|
+
li as AGGREGATES,
|
|
2739
|
+
ci as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
2740
|
+
ui as CALCULATED_FIELDS_GROUP_ID,
|
|
2741
|
+
fi as CALCULATED_FIELDS_GROUP_NAME,
|
|
2742
|
+
mi as CARD_CONFIG_KEY_CLASSES,
|
|
2743
|
+
hi as CARD_KEY_CLASSES,
|
|
2724
2744
|
Ss as CARD_QUERY_CONFIG_KEYS,
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2745
|
+
Jn as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
|
|
2746
|
+
zn as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
|
|
2747
|
+
pi as CARD_TYPES,
|
|
2728
2748
|
Fe as CARD_TYPE_RULES,
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2749
|
+
gi as COLUMN_KEY_CLASSES,
|
|
2750
|
+
bi as COLUMN_PRESENTATION_KEYS,
|
|
2751
|
+
yi as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
2752
|
+
vi as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
2753
|
+
Ci as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
2754
|
+
Ii as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
2755
|
+
_i as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
2756
|
+
$i as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
2757
|
+
wi as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
2758
|
+
xi as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
2759
|
+
Si as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
2760
|
+
ki as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
2741
2761
|
de as CardQueryRequestError,
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2762
|
+
Ti as ControlResolutionError,
|
|
2763
|
+
Fi as DASHBOARD_CHANGE_OPS,
|
|
2764
|
+
Ri as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
2765
|
+
ac as DASHBOARD_FILTER_OPERATIONS,
|
|
2766
|
+
Di as DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS,
|
|
2767
|
+
sc as DOCUMENT_KPI_SECTION_MAX_CARDS,
|
|
2768
|
+
oc as DOCUMENT_KPI_SECTION_MAX_TILES,
|
|
2769
|
+
Oi as DYNAMIC_TEXT_MESSAGE,
|
|
2770
|
+
Ai as DashboardFilterMappingContractError,
|
|
2771
|
+
Ei as ExecutionControlContractError,
|
|
2772
|
+
qi as FILTER_OPERATORS,
|
|
2773
|
+
Gt as FORMAT_WORDS,
|
|
2774
|
+
Ni as FilterModelError,
|
|
2775
|
+
Pi as KPI_MEASURES_SHOWN,
|
|
2776
|
+
Li as LEGACY_TABLE_CARD_TYPES,
|
|
2777
|
+
mc as LEGACY_TABLE_ROUTING_ID_NAMESPACE,
|
|
2778
|
+
Xt as MAX_CREATE_CHANGES,
|
|
2759
2779
|
Os as MAX_PROPOSED_CHANGES,
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2780
|
+
Mi as MAX_QUERY_LIMIT,
|
|
2781
|
+
Bi as MAX_TEXT_WORDS,
|
|
2782
|
+
Ki as MEASURE_CALCULATION_SUMMARIES,
|
|
2783
|
+
Uc as NEW_CARD_TYPE,
|
|
2784
|
+
ji as PUBLIC_TRANSFORM_KIND,
|
|
2785
|
+
Ui as QUERY_ASPECTS,
|
|
2786
|
+
Vi as QUERY_CONFIG_KEY_ASPECTS,
|
|
2787
|
+
Vc as RELATIONSHIP_ROUTE_CHANGED_MESSAGE,
|
|
2788
|
+
Gi as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
2789
|
+
Wi as SETTINGS_BY_KIND,
|
|
2790
|
+
Qi as TIME_GRAINS,
|
|
2791
|
+
Yi as TOOLBAR_FILTER_REACH_FIELDS,
|
|
2792
|
+
Hi as WINDOW_ERROR_CODES,
|
|
2793
|
+
zi as WINDOW_WARNING_CODES,
|
|
2794
|
+
Ji as acceptedColumnRefKinds,
|
|
2795
|
+
Xi as analyticsFilterSchema,
|
|
2796
|
+
hc as applyCardReferenceRemapping,
|
|
2797
|
+
Zi as applyCardSettings,
|
|
2798
|
+
rt as applyDashboardOperations,
|
|
2799
|
+
pc as applyFilterApplicability,
|
|
2800
|
+
Gc as applyFilterSettingsChange,
|
|
2801
|
+
gc as applyGroupByOverride,
|
|
2802
|
+
er as applyLinkedClickToFilterOverrides,
|
|
2803
|
+
tr as applyMeasureCalculations,
|
|
2804
|
+
ar as applyOptionDependencyOverride,
|
|
2805
|
+
Pu as bookmarkImpactSentence,
|
|
2806
|
+
Wc as buildCardExportFormatOptions,
|
|
2807
|
+
bc as buildCardExportQueryContext,
|
|
2808
|
+
Qc as buildCardExportRequest,
|
|
2809
|
+
Yc as buildCardExportRequestFromOptions,
|
|
2810
|
+
Hc as buildColumnCatalog,
|
|
2811
|
+
sr as buildControlDefinitionIndex,
|
|
2792
2812
|
ys as buildDashboardCardSourceIndex,
|
|
2793
|
-
|
|
2794
|
-
|
|
2813
|
+
zc as buildEntityColumnGroup,
|
|
2814
|
+
Jc as buildFilterInputFromDefinition,
|
|
2795
2815
|
Ws as buildFilterInputFromField,
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2816
|
+
or as buildLinkedClickToFilterOverrides,
|
|
2817
|
+
nr as buildProposeChangeInputSchema,
|
|
2818
|
+
ir as buildSavedEditorCard,
|
|
2819
|
+
Xc as buildTableExportFormatOptions,
|
|
2820
|
+
Zc as cardColumnRefForKey,
|
|
2821
|
+
rr as cardColumnRefSchema,
|
|
2802
2822
|
As as cardConditionalFormattingSchema,
|
|
2803
|
-
|
|
2823
|
+
dr as cardQueryPatchSchema,
|
|
2804
2824
|
ts as cardSettingsKind,
|
|
2805
2825
|
Za as cardTypeSentenceName,
|
|
2806
|
-
|
|
2826
|
+
lr as carryColumnSettings,
|
|
2807
2827
|
ks as changeCardType,
|
|
2808
|
-
|
|
2828
|
+
cr as changeMatrixEditor,
|
|
2809
2829
|
Es as checkConditionalRuleColumns,
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2830
|
+
ur as checkDetailDateFormat,
|
|
2831
|
+
oi as checkPresentationStores,
|
|
2832
|
+
fr as clickToFilterSettingsSchema,
|
|
2833
|
+
yc as collectJoinPlanIdentifiers,
|
|
2814
2834
|
ma as columnDataset,
|
|
2815
2835
|
Ts as columnFieldKey,
|
|
2816
2836
|
va as columnKeys,
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2837
|
+
mr as columnRefIssue,
|
|
2838
|
+
Ut as columnRefKey,
|
|
2839
|
+
hr as columnSettingsInputSchema,
|
|
2840
|
+
vc as composeCardReferenceRemapping,
|
|
2841
|
+
pr as conditionalRuleSchema,
|
|
2842
|
+
ii as confirmClassFor,
|
|
2843
|
+
gr as controlBindingExecutionSchema,
|
|
2844
|
+
br as controlDefinitionExecutionSchema,
|
|
2825
2845
|
gs as controlRefusal,
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2846
|
+
yr as createDashboardFilterBindingId,
|
|
2847
|
+
Iu as createMatrixAuthoringDraft,
|
|
2848
|
+
_u as createMatrixConfig,
|
|
2829
2849
|
Ys as createNewCard,
|
|
2830
|
-
|
|
2850
|
+
vr as createTargetSchema,
|
|
2831
2851
|
Qs as createTextCard,
|
|
2832
|
-
|
|
2852
|
+
Cr as dashboardCardFilterSourceInventoryContains,
|
|
2833
2853
|
us as dashboardChangeSchema,
|
|
2834
|
-
|
|
2835
|
-
|
|
2854
|
+
Ir as dashboardFilterTargetMatchesLogicalValue,
|
|
2855
|
+
nc as dashboardFilterValueTypeForDataType,
|
|
2836
2856
|
Ya as dashboardInputScopeIncludesDocumentSheets,
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2857
|
+
_r as defaultClickToFilterSettings,
|
|
2858
|
+
Lu as describeBookmarkImpact,
|
|
2859
|
+
Cc as describeDashboardFilterCardReach,
|
|
2840
2860
|
Ue as describeDashboardFilterCardReachDetail,
|
|
2841
|
-
|
|
2861
|
+
$r as describeMeasureCalculations,
|
|
2842
2862
|
ps as describeQueryChange,
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2863
|
+
eu as describeRelationshipRoute,
|
|
2864
|
+
tu as describeRelationshipSkip,
|
|
2865
|
+
wr as doesDashboardInputApplyToTarget,
|
|
2866
|
+
xr as doesDashboardInputSurviveCarriedContext,
|
|
2867
|
+
Sr as doesToolbarFilterReachTab,
|
|
2868
|
+
au as domainCalculatedFields,
|
|
2869
|
+
kr as drawsDetailDatesInBrowser,
|
|
2870
|
+
Tr as dropMatrixEditorField,
|
|
2871
|
+
su as evaluateConditionalRules,
|
|
2872
|
+
Fr as explicitComparisonSchema,
|
|
2853
2873
|
cs as fieldIdentityKey,
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2874
|
+
Rr as fieldRef,
|
|
2875
|
+
Dr as fieldRefSchema,
|
|
2876
|
+
Ic as filterApplicabilityContextForCard,
|
|
2877
|
+
ou as filterReachPreviewAnswers,
|
|
2878
|
+
_c as filterValueReachForCard,
|
|
2879
|
+
Or as filterValueSemanticDataset,
|
|
2880
|
+
ht as findCatalogField,
|
|
2881
|
+
Ar as findDashboardCardExecutableSource,
|
|
2882
|
+
Er as findDashboardCardPinnedCatalogSource,
|
|
2883
|
+
qr as findDashboardSqlPinnedCatalogSource,
|
|
2863
2884
|
Oa as findRetiredCardPresentationFields,
|
|
2864
|
-
|
|
2885
|
+
si as findRetiredPresentationFields,
|
|
2865
2886
|
ls as findSortedColumn,
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2887
|
+
nu as flattenEntityColumns,
|
|
2888
|
+
Nr as foldPrototypeDocumentInputs,
|
|
2889
|
+
Pr as formatFilterModelIssues,
|
|
2869
2890
|
Ka as formatResolvedPrimaryDateFieldIssues,
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2891
|
+
$c as formatSkippedFilterWarnings,
|
|
2892
|
+
Lr as fromEditableRules,
|
|
2893
|
+
iu as getCalculatedFieldAggregateOverrides,
|
|
2894
|
+
Mr as getCalculatedFieldNamespace,
|
|
2895
|
+
ru as getCalculatedFieldParameters,
|
|
2896
|
+
du as getCalculatedFieldShelfOverrides,
|
|
2897
|
+
Br as getCardDefinition,
|
|
2898
|
+
lu as getClickContextFromTable,
|
|
2899
|
+
Kr as getColumnCatalogFieldId,
|
|
2900
|
+
cu as getDashboardFilterSubscriptionHint,
|
|
2901
|
+
jr as getDashboardGlobalDateFilter,
|
|
2902
|
+
ic as getDocumentKpiSectionShapeIssues,
|
|
2903
|
+
rc as getDocumentSectionCards,
|
|
2904
|
+
uu as getDomainCalculatedSelectionOverrides,
|
|
2905
|
+
Ur as getFieldAggregationOptions,
|
|
2906
|
+
Vr as getMatrixBindingTargets,
|
|
2907
|
+
$u as getMatrixLevelLabel,
|
|
2908
|
+
wu as getMatrixMeasureLabel,
|
|
2909
|
+
Gr as getStableDomainCalculatedFieldId,
|
|
2910
|
+
Wr as getTemporalBucketAuthoringOptions,
|
|
2911
|
+
Qr as getTemporalBucketAuthoringSelection,
|
|
2912
|
+
Yr as handleSchema,
|
|
2913
|
+
fu as hasDashboardFilterSubscription,
|
|
2893
2914
|
le as hasStoredKey,
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2915
|
+
Hr as hasTextCardRichWords,
|
|
2916
|
+
zr as hasToolbarFilterReachField,
|
|
2917
|
+
wc as hostFilterValueFor,
|
|
2918
|
+
xc as hostFilterValuesToSlots,
|
|
2919
|
+
Tu as inspectMatrixCardConfig,
|
|
2920
|
+
Sc as isAdHocFilterValueOnTab,
|
|
2921
|
+
Jr as isAllowedDashboardInputScopeCombination,
|
|
2922
|
+
Xr as isCardType,
|
|
2923
|
+
dc as isDashboardFilterOperationCompatible,
|
|
2903
2924
|
fa as isDashboardInputOnTab,
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2925
|
+
Zr as isDashboardInputOwnedBySheet,
|
|
2926
|
+
ed as isDashboardInputScopeEmpty,
|
|
2927
|
+
td as isGroupedDate,
|
|
2928
|
+
ad as isLegacyTableCard,
|
|
2929
|
+
sd as isPresentationCurrencyBinding,
|
|
2930
|
+
od as isSemanticAutoJoinCard,
|
|
2931
|
+
nd as isSemaphorCartesianChartType,
|
|
2911
2932
|
Us as isSqlKpi,
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2933
|
+
id as isStructuralControlBinding,
|
|
2934
|
+
rd as isTextCardRichContent,
|
|
2935
|
+
dd as isValidControlOptionPresentation,
|
|
2936
|
+
ld as kpiSegmentMetricId,
|
|
2916
2937
|
ds as labelAt,
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2938
|
+
cd as layoutArrangeSchema,
|
|
2939
|
+
kc as legacyTableRoutingIds,
|
|
2940
|
+
Tc as legacyTableRoutingTarget,
|
|
2941
|
+
ud as linkedClickToFilterOverridesSchema,
|
|
2942
|
+
Fc as listAdHocFilterValuesOnTab,
|
|
2922
2943
|
ge as listDashboardCardLocations,
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2944
|
+
fd as listDashboardFilterDefinitions,
|
|
2945
|
+
md as listDashboardFilterInputsOnTab,
|
|
2946
|
+
hd as listDashboardInputReachKeys,
|
|
2926
2947
|
Ga as listDashboardInputScopeExceptedCardIds,
|
|
2927
2948
|
Qa as listDashboardInputScopeExceptedSheetIds,
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2949
|
+
mt as listDashboardTabTargets,
|
|
2950
|
+
Rc as listFilterInputValueTargets,
|
|
2951
|
+
pd as listStoredFilterDefinitions,
|
|
2952
|
+
lc as mapDashboardCards,
|
|
2953
|
+
cc as mapDocumentSectionCards,
|
|
2954
|
+
gd as mapRuleColumns,
|
|
2955
|
+
bd as matchColumns,
|
|
2956
|
+
Dc as matrixCatalogSources,
|
|
2936
2957
|
Ds as matrixColumnKeys,
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2958
|
+
yd as matrixColumnsSchema,
|
|
2959
|
+
Fu as matrixDefinitionFieldRefs,
|
|
2960
|
+
Ru as matrixDefinitionFields,
|
|
2961
|
+
Du as matrixDefinitionSources,
|
|
2962
|
+
vd as matrixEditorCatalogFromFields,
|
|
2963
|
+
Oc as matrixExecutionSources,
|
|
2964
|
+
Cd as measureCalculationOptions,
|
|
2965
|
+
Id as measureComparisonSchema,
|
|
2966
|
+
_d as measureRefSchema,
|
|
2967
|
+
$d as measureTransformSchema,
|
|
2968
|
+
xu as mergeMatrixSorts,
|
|
2948
2969
|
Is as metricCardQuerySchema,
|
|
2949
2970
|
Rs as moveMatrixLevel,
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2971
|
+
wd as normalizeClickToFilterSettings,
|
|
2972
|
+
xd as normalizeDashboardInputs,
|
|
2973
|
+
Sd as normalizeLegacyLinkedTargetOverrides,
|
|
2974
|
+
kd as occurrenceKeys,
|
|
2954
2975
|
$a as outlineCalendar,
|
|
2955
|
-
|
|
2976
|
+
ai as outlineDashboard,
|
|
2956
2977
|
Ae as outlineFilter,
|
|
2957
2978
|
xa as outlineFilters,
|
|
2958
|
-
|
|
2979
|
+
Zn as parseCardQueryRequest,
|
|
2959
2980
|
uo as parseCardQueryRequestContext,
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2981
|
+
Xn as parseCardQueryRequestExtras,
|
|
2982
|
+
Td as parseColumnRefKey,
|
|
2983
|
+
Fd as parseExecutionControlBindingsShallow,
|
|
2963
2984
|
Ua as parseExecutionControlContext,
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2985
|
+
Rd as parseExecutionControlContract,
|
|
2986
|
+
Ht as planCardLabels,
|
|
2987
|
+
Yt as planCardRequery,
|
|
2988
|
+
mu as pluralDatasetLabel,
|
|
2989
|
+
Ac as prepareLoadedDashboard,
|
|
2990
|
+
Dd as previewTemporalBucketAuthoringFormat,
|
|
2991
|
+
Ec as pruneUnrelatedCalculatedFilters,
|
|
2971
2992
|
bs as queryForm,
|
|
2972
|
-
|
|
2973
|
-
|
|
2993
|
+
Od as queryMeasureSchema,
|
|
2994
|
+
Ad as readCardConditionalRules,
|
|
2974
2995
|
Ie as readCardQuery,
|
|
2975
|
-
|
|
2996
|
+
pt as readCardSettings,
|
|
2976
2997
|
Ce as readCardSource,
|
|
2977
2998
|
De as readCardTypeProperties,
|
|
2978
|
-
|
|
2999
|
+
Eu as readComparisonDates,
|
|
2979
3000
|
_e as readDashboardFilterModel,
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3001
|
+
qu as readDefaultComparisonDates,
|
|
3002
|
+
Ed as readExactDomainCalculatedFieldReference,
|
|
3003
|
+
hu as readFilterReachResponse,
|
|
3004
|
+
qc as readFilterValueList,
|
|
3005
|
+
qd as readKpiFigure,
|
|
3006
|
+
Ou as readMatrixCardConfig,
|
|
3007
|
+
Nd as readMeasureCalculations,
|
|
3008
|
+
Pd as readStoredTransform,
|
|
2988
3009
|
ya as readTextCardWords,
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
3010
|
+
Ld as readTransform,
|
|
3011
|
+
Md as rebindDashboardOptionDependencyInputId,
|
|
3012
|
+
Qt as rebuildsRole,
|
|
3013
|
+
Bd as reconcileMatrixSpecStructure,
|
|
3014
|
+
Kd as reconcileTemporalBucketAuthoringFormat,
|
|
2994
3015
|
Cs as recordsCardQuerySchema,
|
|
2995
|
-
|
|
3016
|
+
jd as refDataset,
|
|
2996
3017
|
he as refKey,
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3018
|
+
Jt as refName,
|
|
3019
|
+
Ud as relationshipAddSchema,
|
|
3020
|
+
Vd as relationshipRouteTarget,
|
|
3021
|
+
Gd as relativeToTimeWindow,
|
|
3022
|
+
Wd as remapClickToFilterReferences,
|
|
3023
|
+
Qd as remapLinkedClickToFilterOverrides,
|
|
3024
|
+
Yd as requireNormalizedDashboardInputs,
|
|
3025
|
+
Hd as resolveBindingControlValue,
|
|
3026
|
+
zd as resolveCanonicalDetailResultRawKey,
|
|
3027
|
+
Jd as resolveCanonicalResultOutputKey,
|
|
3007
3028
|
js as resolveCanonicalResultOutputKeys,
|
|
3008
|
-
|
|
3009
|
-
|
|
3029
|
+
Xd as resolveCanonicalResultRawKey,
|
|
3030
|
+
pu as resolveCardColumnRef,
|
|
3010
3031
|
Fo as resolveCardSettings,
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3032
|
+
gu as resolveConditionalRules,
|
|
3033
|
+
ei as resolveDashboardChanges,
|
|
3034
|
+
ti as resolveDashboardCreate,
|
|
3035
|
+
Zd as resolveDashboardEntitySource,
|
|
3036
|
+
el as resolveDashboardFilterAutomaticTarget,
|
|
3037
|
+
tl as resolveDashboardFilterInheritedTarget,
|
|
3038
|
+
al as resolveDashboardOptionDependencies,
|
|
3039
|
+
sl as resolveDashboardOptionPopulation,
|
|
3040
|
+
Nc as resolveDashboardSqlFilterTarget,
|
|
3041
|
+
ol as resolveDetailTableRawTemporalPresentation,
|
|
3042
|
+
nl as resolveFieldSelectedSource,
|
|
3043
|
+
il as resolveGroupByFieldTarget,
|
|
3044
|
+
rl as resolveKpiLayout,
|
|
3024
3045
|
pa as resolveKpiShape,
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3046
|
+
bu as resolveKpiValueStyle,
|
|
3047
|
+
Pc as resolveMatrixControlBindings,
|
|
3048
|
+
Su as resolveMatrixDefinition,
|
|
3049
|
+
Wt as resolveMeasureCalculations,
|
|
3050
|
+
dl as resolveMeasureTransform,
|
|
3051
|
+
ll as resolveMetricFieldTarget,
|
|
3052
|
+
cl as resolveScalarMappedValue,
|
|
3053
|
+
ul as resolveTemporalBucketAuthoringFormat,
|
|
3033
3054
|
ja as resolveTemporalResultOwner,
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3055
|
+
zt as resolveTextCardWords,
|
|
3056
|
+
fl as respondsToSelectionsSchema,
|
|
3057
|
+
ml as retainConditionalRules,
|
|
3058
|
+
hl as retainedMatrixPath,
|
|
3059
|
+
pl as rewriteDashboardInputScopeIds,
|
|
3060
|
+
Lc as routeLegacyTableCard,
|
|
3061
|
+
Mc as routeLegacyTableCards,
|
|
3062
|
+
Bc as routeLegacyTableFrame,
|
|
3042
3063
|
je as sameColumnKey,
|
|
3043
3064
|
pe as sameValue,
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3065
|
+
gl as sanitizeTextCardUrl,
|
|
3066
|
+
bl as selectDashboardOptionDependencyInputIds,
|
|
3067
|
+
yl as selectionFieldFromExplorerField,
|
|
3068
|
+
yu as selectionTupleFromClickContext,
|
|
3069
|
+
vu as setMeasureCalculations,
|
|
3070
|
+
vl as settableCardType,
|
|
3071
|
+
Cl as sharedCardPreferences,
|
|
3072
|
+
Il as sharedTableDialect,
|
|
3073
|
+
_l as sheetChangeSchemas,
|
|
3053
3074
|
vs as sqlCardQuerySchema,
|
|
3054
|
-
|
|
3075
|
+
$l as sqlKpiResultKeys,
|
|
3055
3076
|
Oe as statedLabelsOf,
|
|
3056
3077
|
Ha as storedCardTypeFor,
|
|
3057
|
-
|
|
3058
|
-
|
|
3078
|
+
wl as stripInstanceTargetsForLibrarySave,
|
|
3079
|
+
xl as structuralControlOverride,
|
|
3059
3080
|
wa as summarizeFilter,
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3081
|
+
Sl as supportsCanonicalDashboardTemporalResult,
|
|
3082
|
+
kl as tabChangeSchemas,
|
|
3083
|
+
Tl as textCardExcerpt,
|
|
3084
|
+
Fl as timeWindowSchema,
|
|
3064
3085
|
Ze as toChartType,
|
|
3065
|
-
|
|
3066
|
-
|
|
3086
|
+
Rl as toEditableRules,
|
|
3087
|
+
Dl as toFiniteKpiNumber,
|
|
3067
3088
|
nt as toPublicCardType,
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3089
|
+
Ol as toStoredComparison,
|
|
3090
|
+
Al as toolbarFilterInputFields,
|
|
3091
|
+
El as toolbarFilterScope,
|
|
3092
|
+
ql as transformComparisonDocument,
|
|
3093
|
+
Nl as transformGroupings,
|
|
3094
|
+
Pl as transformOrderSchema,
|
|
3074
3095
|
Fs as updateMatrixConfig,
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3096
|
+
_n as upgradeCardFormats,
|
|
3097
|
+
ni as upgradeCardPresentation,
|
|
3098
|
+
Rn as upgradeConditionalFormatting,
|
|
3099
|
+
Kc as upgradeToStoredDashboard,
|
|
3100
|
+
Ll as validateAndResolveWindowTransforms,
|
|
3101
|
+
Ml as validateControlValue,
|
|
3102
|
+
uc as validateDashboardFilterValues,
|
|
3082
3103
|
Ba as validateResolvedPrimaryDateFieldShape,
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3104
|
+
Bl as withCardConditionalRules,
|
|
3105
|
+
Kl as withCardConfigSqlDatePatterns,
|
|
3106
|
+
jl as withCardExcludedFromScope,
|
|
3107
|
+
Ul as withCardIncludedInScope,
|
|
3108
|
+
Vl as withDashboardOptionDependencyOverride,
|
|
3109
|
+
Gl as withDetailSqlDatePattern,
|
|
3110
|
+
Wl as withFormatOverride,
|
|
3111
|
+
Ql as withSqlDatePattern,
|
|
3091
3112
|
fs as withUnstatedScopeParts,
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3113
|
+
Yl as withoutSqlDatePattern,
|
|
3114
|
+
Hl as withoutToolbarFilterReachFields,
|
|
3115
|
+
zl as writeColumnFormat,
|
|
3116
|
+
Jl as writeColumnPolarity,
|
|
3117
|
+
Xl as writeComparisonDisplay,
|
|
3118
|
+
Zl as writeComparisonPresentation,
|
|
3119
|
+
ec as writeInheritComparison
|
|
3099
3120
|
};
|