react-semaphor 0.1.498 → 0.1.500
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +22 -22
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{calculated-field-identity-BGIPbwBx.js → calculated-field-identity-BC2NViZZ.js} +73 -63
- package/dist/chunks/{calculated-field-identity-CEzmY7Bi.cjs → calculated-field-identity-CtYhhZoG.cjs} +1 -1
- package/dist/chunks/{constants-CKoIADZx.js → constants-CTRduy1g.js} +9 -9
- package/dist/chunks/{constants-CpBVuEea.cjs → constants-DNgpRMaX.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BEmyxEd8.cjs → dashboard-briefing-launcher-BLJZ3Qgs.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-C8eAX-JN.js → dashboard-briefing-launcher-BXUyvRSV.js} +9 -9
- package/dist/chunks/{dashboard-controls-YvJe7cPL.cjs → dashboard-controls-Cd7otu4d.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-C_v7sbq4.js → dashboard-controls-Cpwyyh9l.js} +11 -11
- package/dist/chunks/{dashboard-date-comparison-definition-aANgeL-E.js → dashboard-date-comparison-definition-C1vJshiP.js} +6 -6
- package/dist/chunks/{dashboard-date-comparison-definition-Er8D33iq.cjs → dashboard-date-comparison-definition-CWz_Yte8.cjs} +1 -1
- package/dist/chunks/{dashboard-json-BaT3Yy8x.js → dashboard-json-BInzxESW.js} +7 -7
- package/dist/chunks/{dashboard-json-CSp5bXIV.cjs → dashboard-json-DCC670oo.cjs} +1 -1
- package/dist/chunks/edit-dashboard-visual-CIQ2Ow3V.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-GWiW0jjy.js → edit-dashboard-visual-Dfmk5Qmc.js} +6183 -6212
- package/dist/chunks/{editor-action-buttons-CfZITZwQ.js → editor-action-buttons-DjP4MzoJ.js} +6 -6
- package/dist/chunks/{editor-action-buttons-BSC0nwgV.cjs → editor-action-buttons-fiZSPjDC.cjs} +1 -1
- package/dist/chunks/{field-aggregations-DLWbqnBW.cjs → field-aggregations-mlkON_QA.cjs} +1 -1
- package/dist/chunks/{field-aggregations-CxJWY4Ny.js → field-aggregations-tLaXZ2VJ.js} +13 -13
- package/dist/chunks/{field-dependencies-BiyQuGxZ.cjs → field-dependencies-R7MrlW6D.cjs} +1 -1
- package/dist/chunks/{field-dependencies-CNOgt39w.js → field-dependencies-ZE2klbHO.js} +1 -1
- package/dist/chunks/{index-BJfUMDHc.js → index-BVIet238.js} +42 -42
- package/dist/chunks/{index-C3RHKD3d.cjs → index-Bh3SlWJS.cjs} +1 -1
- package/dist/chunks/{index-DhBGtRkR.cjs → index-C6KtprFE.cjs} +233 -233
- package/dist/chunks/{index-DjbQVfS6.js → index-CBUb9M4R.js} +26553 -26545
- package/dist/chunks/{matrix-analytical-definition-s10yOPft.js → matrix-analytical-definition-CIVFNNnF.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-DbaMwlWM.cjs → matrix-analytical-definition-wIEDXvV5.cjs} +1 -1
- package/dist/chunks/{matrix-card-DGpXdK_Y.js → matrix-card-BVvKHL7s.js} +2 -2
- package/dist/chunks/{matrix-card-BitrcBVw.cjs → matrix-card-Dh0J0_Of.cjs} +1 -1
- package/dist/chunks/matrix-control-sources-CjnsBREg.js +605 -0
- package/dist/chunks/matrix-control-sources-a67fwoOO.cjs +1 -0
- package/dist/chunks/{matrix-definition-AP5W3wGc.js → matrix-definition-BEXCfZAe.js} +3 -3
- package/dist/chunks/{matrix-definition-C33isJ3k.cjs → matrix-definition-CKVi4VVg.cjs} +1 -1
- package/dist/chunks/{matrix-formatter-CZYFhdZ0.js → matrix-formatter-BTPfthsa.js} +41 -41
- package/dist/chunks/{matrix-formatter-UCXQxvV3.cjs → matrix-formatter-CWtdnbfv.cjs} +1 -1
- package/dist/chunks/{matrix-member-presentation-5-M0obIa.js → matrix-member-presentation-DiDUvZts.js} +1 -1
- package/dist/chunks/{matrix-member-presentation-DgIq9UG9.cjs → matrix-member-presentation-e_KZoZOx.cjs} +1 -1
- package/dist/chunks/{matrix-operation-contract-BFumahBa.js → matrix-operation-contract-CPgckXxm.js} +144 -144
- package/dist/chunks/{matrix-operation-contract-C0-V685e.cjs → matrix-operation-contract-thtFuUYf.cjs} +1 -1
- package/dist/chunks/{metric-comparison-ClKUI7Tu.cjs → metric-comparison-CAqV6VnZ.cjs} +1 -1
- package/dist/chunks/{metric-comparison-Df3HmmUE.js → metric-comparison-Dgyq1I3d.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-CGWDx1V_.cjs → pivot-header-presentation-DUXM-VOP.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-CAmKYLgn.js → pivot-header-presentation-DcCO8-Ij.js} +3 -3
- package/dist/chunks/{pivot-result-identity-DBeK76wx.js → pivot-result-identity-Be1zm0AV.js} +1 -1
- package/dist/chunks/{pivot-result-identity-0grcK7bY.cjs → pivot-result-identity-DJyF4I2K.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DVPJg7Gg.js → pivot-result-lifecycle-DpSZOMOZ.js} +7 -7
- package/dist/chunks/{pivot-result-lifecycle-CC0jWMFT.cjs → pivot-result-lifecycle-E_huAPev.cjs} +1 -1
- package/dist/chunks/{raw-temporal-Kc3mdzH7.cjs → raw-temporal-DYoPBY6B.cjs} +1 -1
- package/dist/chunks/{raw-temporal-T3PEaGmJ.js → raw-temporal-DfnRBxQn.js} +2 -2
- package/dist/chunks/{raw-temporal-contract-Ck5vJoQ6.js → raw-temporal-contract-CNwYygW2.js} +1 -1
- package/dist/chunks/{raw-temporal-contract-SwtP1jSh.cjs → raw-temporal-contract-D1_n2pBj.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-BcaEOgn2.cjs → report-preferences-dialog-BMs2Bt9t.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-B8DdDM7q.js → report-preferences-dialog-CWK7wxW6.js} +6 -6
- package/dist/chunks/{report-runtime-context-D3t8vyl9.cjs → report-runtime-context-CqFbgZq9.cjs} +1 -1
- package/dist/chunks/{report-runtime-context-BziN1eg9.js → report-runtime-context-Dln1qvGS.js} +5 -5
- package/dist/chunks/{semantic-format-Ca-sdETk.cjs → semantic-format-C7Goni6h.cjs} +1 -1
- package/dist/chunks/{semantic-format-A3k--fpE.js → semantic-format-PKQt2EAz.js} +2 -2
- package/dist/chunks/{source-entity-resolution-CTUzMH2S.cjs → source-entity-resolution-BMKxwdKN.cjs} +1 -1
- package/dist/chunks/{source-entity-resolution-DX9C1ebK.js → source-entity-resolution-BSZ07Sl6.js} +19 -19
- package/dist/chunks/{switch-DV8zX7rV.js → switch-B4wVqV4L.js} +51 -50
- package/dist/chunks/{switch-CgycqpWv.cjs → switch-DVjKkt22.cjs} +12 -12
- package/dist/chunks/{temporal-bucket-contract-BBdvWsY0.cjs → temporal-bucket-contract-CSdspcYj.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-contract-lq7Jrif0.js → temporal-bucket-contract-_WCvDnvn.js} +1 -1
- package/dist/chunks/{update-policy-DIw_H9RT.cjs → update-policy-BESKAspa.cjs} +1 -1
- package/dist/chunks/{update-policy-EgZ1nRbd.js → update-policy-BWbXhkk-.js} +2 -2
- package/dist/chunks/{validators-CvLOGzT3.js → validators-CHlnnHuS.js} +1102 -1043
- package/dist/chunks/validators-D2F_uxxP.cjs +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +112 -107
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +4 -4
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +16 -16
- package/dist/index.cjs +1 -1
- package/dist/index.js +81 -78
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +15 -0
- package/dist/types/briefings.d.ts +16 -1
- package/dist/types/dashboard-assistant.d.ts +15 -0
- package/dist/types/dashboard-authoring.d.ts +49 -1
- package/dist/types/dashboard.d.ts +23 -1
- package/dist/types/data-app-builder.d.ts +15 -0
- package/dist/types/data-app-codegen-node.d.ts +15 -0
- package/dist/types/data-app-codegen.d.ts +15 -0
- package/dist/types/data-app-sdk-adapters.d.ts +15 -0
- package/dist/types/data-app-sdk-validation.d.ts +15 -0
- package/dist/types/data-app-sdk.d.ts +15 -0
- package/dist/types/format-utils.d.ts +15 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +30 -27
- package/dist/types/main.d.ts +67 -8
- package/dist/types/shared.d.ts +16 -1
- package/dist/types/surfboard.d.ts +23 -1
- package/dist/types/types.d.ts +67 -8
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-_Wap0YGu.cjs +0 -172
- package/dist/chunks/matrix-control-sources-DdfST7Fo.cjs +0 -1
- package/dist/chunks/matrix-control-sources-Dxh6hOU9.js +0 -523
- package/dist/chunks/validators-mhiJSia7.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { D as E, a as _e } from "../chunks/matrix-control-sources-
|
|
2
|
-
import { j as Nt, k as Mt, l as Et, f as
|
|
3
|
-
import { A as
|
|
4
|
-
import {
|
|
5
|
-
import "../chunks/matrix-operation-contract-
|
|
6
|
-
import { m as B } from "../chunks/calculated-field-identity-
|
|
7
|
-
import {
|
|
1
|
+
import { D as E, a as _e } from "../chunks/matrix-control-sources-CjnsBREg.js";
|
|
2
|
+
import { j as Nt, k as Mt, l as Et, f as $t, h as Lt, i as Bt, C as Pt, c as Vt, e as qt, d as zt, n as jt, o as Ht, t as Gt, u as Ut, x as Wt, g as Kt, w as Qt, m as Xt, b as Yt, r as Jt, q as Zt, y as ea, s as ta, p as aa, v as ra } from "../chunks/matrix-control-sources-CjnsBREg.js";
|
|
3
|
+
import { A as ia, S as oa, f as sa, h as da, j as ca, k as la, l as ua, g as fa, a as pa, b as ha, i as ma, p as ga, d as ba, e as Ia, c as _a, r as ya, s as Ca, t as Da } from "../chunks/field-aggregations-tLaXZ2VJ.js";
|
|
4
|
+
import { q as ye, a_ as G, a$ as Ce, ac as ie, ak as De, af as ve } from "../chunks/validators-CHlnnHuS.js";
|
|
5
|
+
import "../chunks/matrix-operation-contract-CPgckXxm.js";
|
|
6
|
+
import { m as B } from "../chunks/calculated-field-identity-BC2NViZZ.js";
|
|
7
|
+
import { x as Sa, D as wa, p as xa, E as Aa, o as Ta, j as Fa, d as ka, k as Oa, t as Ra, e as Na, g as Ma, v as Ea, h as $a, l as La, q as Ba, n as Pa, w as Va, B as qa, r as za, i as ja, a as Ha, b as Ga, y as Ua, z as Wa, f as Ka, s as Qa, A as Xa, u as Ya, C as Ja } from "../chunks/calculated-field-identity-BC2NViZZ.js";
|
|
8
8
|
import { n as Se } from "../chunks/operators-B3zZoskU.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { b as
|
|
11
|
-
import { m as
|
|
9
|
+
import { a as er, b as tr, r as ar } from "../chunks/canonical-result-keys-CEQefvdO.js";
|
|
10
|
+
import { b as nr, c as ir, g as or, a as sr, m as dr, r as cr } from "../chunks/matrix-definition-BEXCfZAe.js";
|
|
11
|
+
import { m as ur, a as fr, r as pr } from "../chunks/matrix-card-BVvKHL7s.js";
|
|
12
12
|
function y(e) {
|
|
13
13
|
return e && typeof e == "object" ? e : null;
|
|
14
14
|
}
|
|
@@ -31,7 +31,7 @@ function oe(e, t) {
|
|
|
31
31
|
function xe(e, t) {
|
|
32
32
|
return Ce(e, t);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function $(e) {
|
|
35
35
|
const t = [];
|
|
36
36
|
for (const a of e) {
|
|
37
37
|
const r = t.findIndex(
|
|
@@ -45,9 +45,9 @@ function L(e) {
|
|
|
45
45
|
return t;
|
|
46
46
|
}
|
|
47
47
|
function wt(e) {
|
|
48
|
-
return
|
|
48
|
+
return $(e)[0];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function z(e, t) {
|
|
51
51
|
return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !G(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
|
|
52
52
|
}
|
|
53
53
|
function j(e) {
|
|
@@ -61,7 +61,7 @@ function re(e, t) {
|
|
|
61
61
|
}
|
|
62
62
|
function v(e, t) {
|
|
63
63
|
const a = j(e == null ? void 0 : e.source);
|
|
64
|
-
return a ?
|
|
64
|
+
return a ? z(a, t) : void 0;
|
|
65
65
|
}
|
|
66
66
|
function Ae({
|
|
67
67
|
explicitSource: e,
|
|
@@ -69,7 +69,7 @@ function Ae({
|
|
|
69
69
|
defaultSource: a,
|
|
70
70
|
fallbackSources: r
|
|
71
71
|
}) {
|
|
72
|
-
const o = [a, ...r || []], i = j(e), n = i ?
|
|
72
|
+
const o = [a, ...r || []], i = j(e), n = i ? z(
|
|
73
73
|
i,
|
|
74
74
|
re(i, o)
|
|
75
75
|
) : void 0;
|
|
@@ -77,7 +77,7 @@ function Ae({
|
|
|
77
77
|
return n;
|
|
78
78
|
if (e !== void 0)
|
|
79
79
|
return;
|
|
80
|
-
const d = v(t, a), s = d ?
|
|
80
|
+
const d = v(t, a), s = d ? z(
|
|
81
81
|
d,
|
|
82
82
|
re(d, o)
|
|
83
83
|
) : void 0;
|
|
@@ -206,7 +206,7 @@ function ne(e) {
|
|
|
206
206
|
(t) => !!(t && typeof t == "object")
|
|
207
207
|
) : [];
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function $e(e) {
|
|
210
210
|
var a, r;
|
|
211
211
|
if (!e)
|
|
212
212
|
return [];
|
|
@@ -241,7 +241,7 @@ function ce({
|
|
|
241
241
|
errors: a
|
|
242
242
|
}) {
|
|
243
243
|
if (e.type !== "text") {
|
|
244
|
-
for (const r of
|
|
244
|
+
for (const r of $e(e.analyticsIntent))
|
|
245
245
|
if (r && !t.some(
|
|
246
246
|
(o) => U(o, r)
|
|
247
247
|
)) {
|
|
@@ -312,7 +312,7 @@ function fe({
|
|
|
312
312
|
)
|
|
313
313
|
);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Le(e) {
|
|
316
316
|
var f, g;
|
|
317
317
|
const t = [];
|
|
318
318
|
if (!e || typeof e != "object")
|
|
@@ -477,11 +477,11 @@ function Ve(e, t) {
|
|
|
477
477
|
return a += n, o = Math.max(o, i.h), d;
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function qe(e) {
|
|
481
481
|
const t = [...e].sort((s, u) => s.priority - u.priority), a = t.filter((s) => s.role === "kpi"), r = t.filter((s) => s.role === "chart"), o = t.filter((s) => s.role === "table"), i = t.filter((s) => s.role === "text"), n = i.slice(0, 1), d = i.slice(n.length);
|
|
482
482
|
return { kpis: a, introText: n, charts: r, tables: o, supportingText: d };
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function ze(e, t, a) {
|
|
485
485
|
return t === "xxs" || t === "xs" ? a : t === "sm" ? Math.min(12, a) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
|
|
486
486
|
}
|
|
487
487
|
function je(e, t, a, r) {
|
|
@@ -492,7 +492,7 @@ function He(e) {
|
|
|
492
492
|
return a === "kpi" ? {
|
|
493
493
|
...t,
|
|
494
494
|
band: a,
|
|
495
|
-
w:
|
|
495
|
+
w: ze(o, i, n),
|
|
496
496
|
h: 15,
|
|
497
497
|
minW: Math.min(6, n),
|
|
498
498
|
minH: 12
|
|
@@ -539,7 +539,7 @@ function T(e, t, a, r) {
|
|
|
539
539
|
);
|
|
540
540
|
}
|
|
541
541
|
function W(e) {
|
|
542
|
-
const t =
|
|
542
|
+
const t = qe(e);
|
|
543
543
|
return Object.fromEntries(
|
|
544
544
|
_e.map((a) => {
|
|
545
545
|
const r = Pe[a], o = [
|
|
@@ -713,7 +713,7 @@ function Ze(e, t) {
|
|
|
713
713
|
}
|
|
714
714
|
function Tt(e) {
|
|
715
715
|
var D, _;
|
|
716
|
-
const t =
|
|
716
|
+
const t = Le(e.plan);
|
|
717
717
|
if (!t.ok)
|
|
718
718
|
throw new Error(
|
|
719
719
|
t.errors.map((c) => c.message).join(`
|
|
@@ -1097,7 +1097,7 @@ function dt(e) {
|
|
|
1097
1097
|
return t;
|
|
1098
1098
|
}
|
|
1099
1099
|
function ct(e, t) {
|
|
1100
|
-
const a =
|
|
1100
|
+
const a = $(e).filter(k);
|
|
1101
1101
|
if (a.length === 0)
|
|
1102
1102
|
return t.push(
|
|
1103
1103
|
b(
|
|
@@ -1118,7 +1118,7 @@ function ct(e, t) {
|
|
|
1118
1118
|
), [a[0]]) : a;
|
|
1119
1119
|
}
|
|
1120
1120
|
function lt(e, t) {
|
|
1121
|
-
const a = Q(e), r = be(e), o =
|
|
1121
|
+
const a = Q(e), r = be(e), o = $(st(e)), i = $(
|
|
1122
1122
|
dt(e)
|
|
1123
1123
|
);
|
|
1124
1124
|
return {
|
|
@@ -1259,7 +1259,7 @@ function bt(e, t, a, r, o, i) {
|
|
|
1259
1259
|
)
|
|
1260
1260
|
};
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function q(e) {
|
|
1263
1263
|
const t = [], a = [];
|
|
1264
1264
|
for (const r of e.viewIds) {
|
|
1265
1265
|
const o = e.viewIdToCardId.get(r);
|
|
@@ -1282,7 +1282,7 @@ function It(e) {
|
|
|
1282
1282
|
if (!((r = e.protocolScope.excludeViewIds) != null && r.length))
|
|
1283
1283
|
return;
|
|
1284
1284
|
const i = new Set(
|
|
1285
|
-
|
|
1285
|
+
q({
|
|
1286
1286
|
inputLabel: e.inputLabel,
|
|
1287
1287
|
viewIds: e.protocolScope.excludeViewIds,
|
|
1288
1288
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1295,7 +1295,7 @@ function It(e) {
|
|
|
1295
1295
|
};
|
|
1296
1296
|
}
|
|
1297
1297
|
if (e.protocolScope.level === "view") {
|
|
1298
|
-
const i =
|
|
1298
|
+
const i = q({
|
|
1299
1299
|
inputLabel: e.inputLabel,
|
|
1300
1300
|
viewIds: e.protocolScope.viewIds,
|
|
1301
1301
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1319,7 +1319,7 @@ function It(e) {
|
|
|
1319
1319
|
if (!((o = e.protocolScope.excludeViewIds) != null && o.length))
|
|
1320
1320
|
return { kind: "cards", cardIds: t };
|
|
1321
1321
|
const a = new Set(
|
|
1322
|
-
|
|
1322
|
+
q({
|
|
1323
1323
|
inputLabel: e.inputLabel,
|
|
1324
1324
|
viewIds: e.protocolScope.excludeViewIds,
|
|
1325
1325
|
viewIdToCardId: e.viewIdToCardId,
|
|
@@ -1344,7 +1344,7 @@ function kt(e) {
|
|
|
1344
1344
|
const l = typeof g.title == "string" ? g.title : `Section ${f + 1}`, Y = g.id || F(l, `section-${f + 1}`);
|
|
1345
1345
|
n.set(Y, []);
|
|
1346
1346
|
for (const [J, m] of X(g).entries()) {
|
|
1347
|
-
const Z = ft(m),
|
|
1347
|
+
const Z = ft(m), L = F(
|
|
1348
1348
|
m.id || `${l}-${m.title || `View ${J + 1}`}`,
|
|
1349
1349
|
`card-${f + 1}-${J + 1}`
|
|
1350
1350
|
);
|
|
@@ -1353,7 +1353,7 @@ function kt(e) {
|
|
|
1353
1353
|
b(
|
|
1354
1354
|
"unsupported_presentation",
|
|
1355
1355
|
`Dashboard presentation "${((D = m.presentation) == null ? void 0 : D.kind) || "unknown"}" is not supported by the dashboard authoring adapter.`,
|
|
1356
|
-
`card-${
|
|
1356
|
+
`card-${L}`
|
|
1357
1357
|
)
|
|
1358
1358
|
);
|
|
1359
1359
|
continue;
|
|
@@ -1363,12 +1363,12 @@ function kt(e) {
|
|
|
1363
1363
|
b(
|
|
1364
1364
|
"sql_intent_deferred",
|
|
1365
1365
|
"SQL analytics intent is valid protocol, but the current dashboard authoring adapter only materializes semantic and physical config-card intents.",
|
|
1366
|
-
`card-${
|
|
1366
|
+
`card-${L}`
|
|
1367
1367
|
)
|
|
1368
1368
|
);
|
|
1369
1369
|
continue;
|
|
1370
1370
|
}
|
|
1371
|
-
const ee = ge(
|
|
1371
|
+
const ee = ge(L, s), R = `card-${ee}`;
|
|
1372
1372
|
m.id && i.set(m.id, R), (c = n.get(Y)) == null || c.push(R);
|
|
1373
1373
|
const Ie = m.analytics && "inputs" in m.analytics ? m.analytics.inputs : void 0;
|
|
1374
1374
|
for (const te of Ie || []) {
|
|
@@ -1429,105 +1429,110 @@ function kt(e) {
|
|
|
1429
1429
|
}, warnings: t };
|
|
1430
1430
|
}
|
|
1431
1431
|
export {
|
|
1432
|
-
|
|
1432
|
+
ia as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
|
|
1433
1433
|
Nt as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
|
|
1434
1434
|
Mt as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
|
|
1435
1435
|
Et as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
|
|
1436
|
-
|
|
1437
|
-
|
|
1436
|
+
$t as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
|
|
1437
|
+
Lt as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
|
|
1438
1438
|
Bt as CONTROL_DEFINITION_INVALID_ERROR_CODE,
|
|
1439
1439
|
Pt as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
|
|
1440
1440
|
Vt as CONTROL_REFERENCE_MISSING_ERROR_CODE,
|
|
1441
|
-
|
|
1442
|
-
|
|
1441
|
+
qt as CONTROL_VALUE_INVALID_ERROR_CODE,
|
|
1442
|
+
zt as CONTROL_VALUE_MISSING_ERROR_CODE,
|
|
1443
1443
|
jt as ControlResolutionError,
|
|
1444
1444
|
_e as DASHBOARD_AUTHORING_BREAKPOINTS,
|
|
1445
1445
|
E as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1446
|
+
Sa as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
|
|
1447
|
+
wa as DashboardFilterMappingContractError,
|
|
1448
|
+
oa as SEMAPHOR_CARTESIAN_CHART_TYPES,
|
|
1449
|
+
xa as applyCardReferenceRemapping,
|
|
1450
1450
|
Ft as applyDashboardChangePlan,
|
|
1451
|
-
|
|
1451
|
+
Aa as applyOptionDependencyOverride,
|
|
1452
1452
|
Ht as buildControlDefinitionIndex,
|
|
1453
|
-
|
|
1453
|
+
sa as buildDashboardCardSourceIndex,
|
|
1454
1454
|
Tt as compileDashboardFromPlan,
|
|
1455
1455
|
W as compileResponsiveDashboardLayouts,
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1456
|
+
Ta as composeCardReferenceRemapping,
|
|
1457
|
+
Fa as createDashboardFilterBindingId,
|
|
1458
|
+
nr as createMatrixAuthoringDraft,
|
|
1459
|
+
ir as createMatrixConfig,
|
|
1460
1460
|
U as dashboardAuthoringDatasetMatchesSource,
|
|
1461
1461
|
xt as dashboardAuthoringFieldsReferToSameTarget,
|
|
1462
1462
|
v as dashboardAuthoringSourceFromField,
|
|
1463
1463
|
St as dashboardAuthoringSourceKey,
|
|
1464
1464
|
oe as dashboardAuthoringSourcesReferToSameDataset,
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1465
|
+
da as dashboardCardFilterSourceInventoryContains,
|
|
1466
|
+
ka as dashboardFilterTargetMatchesLogicalValue,
|
|
1467
|
+
Oa as dashboardFilterValueTypeForDataType,
|
|
1468
1468
|
kt as dashboardPlanFromSemaphorDashboardIntent,
|
|
1469
1469
|
At as findDashboardAuthoringDatasetForSource,
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1470
|
+
ca as findDashboardCardExecutableSource,
|
|
1471
|
+
la as findDashboardCardPinnedCatalogSource,
|
|
1472
|
+
ua as findDashboardSqlPinnedCatalogSource,
|
|
1473
|
+
Gt as getCalculatedFieldAggregateOverrides,
|
|
1474
|
+
Ra as getCalculatedFieldNamespace,
|
|
1475
|
+
Ut as getCalculatedFieldParameters,
|
|
1476
|
+
Wt as getCalculatedFieldShelfOverrides,
|
|
1477
|
+
Kt as getColumnCatalogFieldId,
|
|
1475
1478
|
Me as getDashboardAuthoringCardSource,
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1479
|
+
Na as getDashboardFilterSubscriptionHint,
|
|
1480
|
+
Qt as getDomainCalculatedSelectionOverrides,
|
|
1481
|
+
fa as getFieldAggregationOptions,
|
|
1482
|
+
Ma as getMatrixBindingTargets,
|
|
1483
|
+
or as getMatrixLevelLabel,
|
|
1484
|
+
sr as getMatrixMeasureLabel,
|
|
1485
|
+
Ea as getStableDomainCalculatedFieldId,
|
|
1486
|
+
pa as getTemporalBucketAuthoringOptions,
|
|
1487
|
+
ha as getTemporalBucketAuthoringSelection,
|
|
1488
|
+
$a as hasDashboardFilterSubscription,
|
|
1489
|
+
La as isDashboardFilterOperationCompatible,
|
|
1486
1490
|
k as isMaterializableDashboardAuthoringSource,
|
|
1487
|
-
|
|
1491
|
+
ma as isSemaphorCartesianChartType,
|
|
1488
1492
|
we as isSemaphorSourceRef,
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1493
|
+
Xt as matrixCatalogSources,
|
|
1494
|
+
ur as matrixDefinitionFields,
|
|
1495
|
+
fr as matrixDefinitionSources,
|
|
1496
|
+
Yt as matrixExecutionSources,
|
|
1497
|
+
$ as mergeDashboardAuthoringSources,
|
|
1498
|
+
dr as mergeMatrixSorts,
|
|
1499
|
+
Ba as moveMatrixLevel,
|
|
1500
|
+
Pa as normalizeDashboardInputs,
|
|
1497
1501
|
xe as preferDashboardAuthoringSourceMetadata,
|
|
1498
1502
|
wt as preferredDashboardAuthoringSource,
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1503
|
+
ga as previewTemporalBucketAuthoringFormat,
|
|
1504
|
+
Va as readExactDomainCalculatedFieldReference,
|
|
1505
|
+
pr as readMatrixCardConfig,
|
|
1506
|
+
qa as rebindDashboardOptionDependencyInputId,
|
|
1507
|
+
za as reconcileMatrixSpecStructure,
|
|
1508
|
+
ba as reconcileTemporalBucketAuthoringFormat,
|
|
1509
|
+
ja as requireNormalizedDashboardInputs,
|
|
1510
|
+
Jt as resolveBindingControlValue,
|
|
1511
|
+
er as resolveCanonicalDetailResultRawKey,
|
|
1512
|
+
tr as resolveCanonicalResultOutputKey,
|
|
1513
|
+
ar as resolveCanonicalResultRawKey,
|
|
1509
1514
|
Ae as resolveDashboardAuthoringSource,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1515
|
+
Ia as resolveDashboardEntitySource,
|
|
1516
|
+
Ha as resolveDashboardFilterAutomaticTarget,
|
|
1517
|
+
Ga as resolveDashboardFilterInheritedTarget,
|
|
1518
|
+
Ua as resolveDashboardOptionDependencies,
|
|
1519
|
+
Wa as resolveDashboardOptionPopulation,
|
|
1520
|
+
Ka as resolveDashboardSqlFilterTarget,
|
|
1521
|
+
Zt as resolveGroupByFieldTarget,
|
|
1522
|
+
ea as resolveMatrixControlBindings,
|
|
1523
|
+
cr as resolveMatrixDefinition,
|
|
1524
|
+
ta as resolveMetricFieldTarget,
|
|
1525
|
+
aa as resolveScalarMappedValue,
|
|
1526
|
+
_a as resolveTemporalBucketAuthoringFormat,
|
|
1527
|
+
ya as resolveTemporalResultOwner,
|
|
1528
|
+
Qa as retainMatrixConditionalFormatting,
|
|
1529
|
+
Xa as selectDashboardOptionDependencyInputIds,
|
|
1530
|
+
Ca as supportsCanonicalDashboardTemporalResult,
|
|
1531
|
+
Da as transformComparisonDocument,
|
|
1532
|
+
Ya as updateMatrixConfig,
|
|
1533
|
+
ra as validateControlValue,
|
|
1529
1534
|
Ee as validateDashboardAuthoringDatasetScope,
|
|
1530
1535
|
Be as validateDashboardChangePlan,
|
|
1531
|
-
|
|
1532
|
-
|
|
1536
|
+
Le as validateDashboardPlan,
|
|
1537
|
+
Ja as withDashboardOptionDependencyOverride
|
|
1533
1538
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-C6KtprFE.cjs"),w=require("../chunks/switch-DVjKkt22.cjs"),Ze=require("../data-app-builder-browser-runtime/index.cjs"),te=require("../chunks/x-B6ghREd2.cjs"),Cn=require("../chunks/save-3dYRmehL.cjs"),Rn=require("../chunks/mouse-pointer-2-DX4A_XZw.cjs"),tt=require("../chunks/search-BqqhaMx9.cjs");function Tr(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const Bn=Tr(p),Dn=Tr(An);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -2,8 +2,8 @@ import { jsx as r, jsxs as c, Fragment as re } from "react/jsx-runtime";
|
|
|
2
2
|
import * as Zn from "react";
|
|
3
3
|
import { useContext as qn, useState as x, useRef as oe, useMemo as je, useEffect as W, useCallback as Ot } from "react";
|
|
4
4
|
import * as Xn from "react-dom/client";
|
|
5
|
-
import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, R as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-
|
|
6
|
-
import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-
|
|
5
|
+
import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, R as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-CBUb9M4R.js";
|
|
6
|
+
import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-B4wVqV4L.js";
|
|
7
7
|
import { loadSemaphorBrowserRuntime as ot } from "../data-app-builder-browser-runtime/index.js";
|
|
8
8
|
import { c as Ve, X as He } from "../chunks/x-CXDkqdur.js";
|
|
9
9
|
import { S as fa } from "../chunks/save-DgMfP0j8.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/matrix-operation-contract-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/matrix-operation-contract-thtFuUYf.cjs"),e=require("../chunks/update-policy-BESKAspa.cjs");exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION=a.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_SCHEMA_VERSION;exports.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION=a.SEMAPHOR_DATA_APP_CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.isSemaphorDataAppCodegenSummary=a.isSemaphorDataAppCodegenSummary;exports.validateSemaphorDataAppCodegenSummary=a.validateSemaphorDataAppCodegenSummary;exports.CODEGEN_SUMMARY_SCHEMA_VERSION=e.CODEGEN_SUMMARY_SCHEMA_VERSION;exports.CODEGEN_SUMMARY_VALIDATOR_VERSION=e.CODEGEN_SUMMARY_VALIDATOR_VERSION;exports.CONTRACT_MANIFEST_SCHEMA_VERSION=e.CONTRACT_MANIFEST_SCHEMA_VERSION;exports.GENERATED_CONTRACT_SCHEMA_VERSION=e.GENERATED_CONTRACT_SCHEMA_VERSION;exports.GENERATED_CONTRACT_TYPESCRIPT_FILES=e.GENERATED_CONTRACT_TYPESCRIPT_FILES;exports.REQUIRED_GENERATED_CONTRACT_FILES=e.REQUIRED_GENERATED_CONTRACT_FILES;exports.assertValidCodegenSummary=e.assertValidCodegenSummary;exports.buildSemaphorGeneratedActiveInput=e.buildSemaphorGeneratedActiveInput;exports.buildSemaphorGeneratedInputOptionIntent=e.buildSemaphorGeneratedInputOptionIntent;exports.buildSemaphorGeneratedViewExecutionRequest=e.buildSemaphorGeneratedViewExecutionRequest;exports.buildSemaphorGeneratedViewExecutionRequests=e.buildSemaphorGeneratedViewExecutionRequests;exports.evaluateSemaphorDataAppContractUpdatePolicy=e.evaluateSemaphorDataAppContractUpdatePolicy;exports.validateCodegenSummary=e.validateCodegenSummary;exports.validateSemaphorGeneratedContract=e.validateSemaphorGeneratedContract;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as E, a as S, i as A, v as t } from "../chunks/matrix-operation-contract-
|
|
2
|
-
import { C as R, a as r, b as s, G as C, e as o, R as p, c as d, f as O, g as i, h as m, i as n, j as N, v as T, d as I } from "../chunks/update-policy-
|
|
1
|
+
import { S as E, a as S, i as A, v as t } from "../chunks/matrix-operation-contract-CPgckXxm.js";
|
|
2
|
+
import { C as R, a as r, b as s, G as C, e as o, R as p, c as d, f as O, g as i, h as m, i as n, j as N, v as T, d as I } from "../chunks/update-policy-BWbXhkk-.js";
|
|
3
3
|
export {
|
|
4
4
|
R as CODEGEN_SUMMARY_SCHEMA_VERSION,
|
|
5
5
|
r as CODEGEN_SUMMARY_VALIDATOR_VERSION,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../chunks/matrix-operation-contract-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("../chunks/matrix-operation-contract-thtFuUYf.cjs"),R=require("../chunks/update-policy-BESKAspa.cjs"),he=require("node:crypto"),Ce="src/semaphor/generated",H=`// Generated by Semaphor Agent Plugin. Do not hand-edit analytics wiring here.
|
|
2
2
|
// Regenerate from the accepted semaphor_plan_data_app codegenSummary when the plan changes.
|
|
3
3
|
`;function Oe(e,n={}){R.assertValidCodegenSummary(e);const r=Me(e);if(r.views.length===0&&!n.allowEmpty)throw new Error("Contract generation produced zero executable views. Stop and ask for a different domain/goal or semantic model improvement; pass --allow-empty only for an explicit model-gap report.");const t=ke(r),o=Ne({contract:r,files:t,generatorName:n.generatorName||"react-semaphor/data-app-codegen/node",generatorVersion:n.generatorVersion||"unknown"}),a={...t,"contract.manifest.json":`${JSON.stringify(o,null,2)}
|
|
4
4
|
`};return{schemaVersion:R.GENERATED_CONTRACT_SCHEMA_VERSION,files:a,manifest:o,contentHash:String(o.generatedContentHash||""),usageExample:Te(r),warnings:r.warnings,stats:{inputCount:r.inputs.length,executableViewCount:r.views.length,presentationViewCount:r.presentationViews.length,queryCount:r.views.length,optionQueryCount:r.optionQueries.length}}}function Me(e){var d,p,m,i,l,g,h,I,$,M,b,E;const n=[],r=[];for(const s of e.inputs){S(r,s.fieldRef);for(const V of s.bindings||[])S(r,V.fieldRef);S(r,(d=s.optionQuery)==null?void 0:d.valueFieldRef),S(r,(p=s.optionQuery)==null?void 0:p.labelFieldRef),S(r,(m=s.optionQuery)==null?void 0:m.filterFieldRef),D(r,(i=s.optionQuery)==null?void 0:i.spec)}for(const s of e.filterContracts){S(r,s.fieldRef),S(r,(l=s.optionQuery)==null?void 0:l.valueFieldRef),S(r,(g=s.optionQuery)==null?void 0:g.labelFieldRef),S(r,(h=s.optionQuery)==null?void 0:h.filterFieldRef),D(r,(I=s.optionQuery)==null?void 0:I.spec);for(const V of s.bindings||[])S(r,V.fieldRef)}for(const s of e.views){for(const V of s.fields||[])S(r,V);D(r,($=s.sdkSpec)==null?void 0:$.spec),D(r,s.visualSpec)}const t=e.implementationChecklist||{};for(const s of Object.values(t.bindingsByView||{}))for(const V of Array.isArray(s)?s:[])S(r,V.fieldRef),S(r,V.optionValueField),S(r,V.optionLabelField);for(const s of t.requiredInputOptions||[])S(r,s.visibleLabelField),S(r,s.optionValueField),S(r,s.runtimeFilterField);const o=pn([...e.sources.map(s=>({raw:s,key:Ie(s),aliases:Ve(s),name:""})),...r.map(s=>an(s)).filter(x)]);P(o,s=>{const V=F(s.raw);return j(s.raw.label||(V==null?void 0:V.datasetName)||(V==null?void 0:V.datasetId)||(V==null?void 0:V.name)||s.raw.kind||"source")});const a=ln(o),u=ne(r.filter(s=>s.name).map(s=>({raw:s,key:X(s),name:""})),s=>s.key);P(u,s=>j([s.raw.sourceKey?yn(s.raw.sourceKey):"",s.raw.aggregate?s.raw.aggregate.toLowerCase():"",s.raw.name].filter(Boolean).join("_")));const c=new Map(u.map(s=>[s.key,s.name])),w=e.inputs.map(s=>({raw:s,name:j(s.id||s.label||"input")}));P(w,s=>s.name);const f=w.filter(s=>!!s.raw.optionQuery).map(s=>({input:s,name:`${s.name}Options`,raw:s.raw.optionQuery}));P(f,s=>s.name);for(const s of f)un(s.raw.labelFieldRef,s.raw.valueFieldRef)&&dn(s.raw.valueFieldRef)&&n.push(`Input option query ${((M=s.raw.spec)==null?void 0:M.inputId)||s.input.raw.id||s.name} uses identifier field ${s.raw.valueFieldRef.name} as both label and value. It can execute, but the UI will show key values unless the semantic model exposes a human-readable label through a modeled relationship.`);const y=e.views.filter(s=>{var V,K;return!!((V=s.sdkSpec)!=null&&V.builder&&((K=s.sdkSpec)!=null&&K.spec))}).map(s=>({raw:s,name:j(s.id||s.title||"query")}));P(y,s=>s.name);const k=e.views.filter(s=>fe(s)&&!("sdkSpec"in s)).map(s=>sn(s));for(const s of e.views)(!("sdkSpec"in s)||!((b=s.sdkSpec)!=null&&b.builder)||!((E=s.sdkSpec)!=null&&E.spec))&&!fe(s)&&n.push(`Skipped view ${s.id||s.title||"unknown"} because it has no sdkSpec.`);return Ee({inputs:w,views:y,filterContracts:e.filterContracts}),{summary:e,title:e.title||"Semaphor Data App",sources:o,fields:u,inputs:w,optionQueries:f,views:y,presentationViews:k,filterContracts:e.filterContracts,checklist:t,sourceNameByKey:a,fieldNameByKey:c,warnings:n}}function Ee({inputs:e,views:n,filterContracts:r}){const t=new Set(e.map(a=>a.raw.id).filter(Boolean)),o=new Set(n.map(a=>a.raw.id).filter(Boolean));for(const[a,u]of r.entries()){if(!t.has(u.inputId))throw new Error(`filterContracts.${a}.inputId must reference a generated input.`);const c=new Set(u.appliesToViewIds||[]),w=new Set(u.notAppliedToViewIds||[]);for(const[f,y]of(u.appliesToViewIds||[]).entries())if(!o.has(y))throw new Error(`filterContracts.${a}.appliesToViewIds.${f} must reference an executable generated view.`);for(const[f,y]of(u.notAppliedToViewIds||[]).entries())if(!o.has(y))throw new Error(`filterContracts.${a}.notAppliedToViewIds.${f} must reference an executable generated view.`);for(const[f,y]of(u.bindings||[]).entries()){if(!o.has(y.viewId))throw new Error(`filterContracts.${a}.bindings.${f}.viewId must reference an executable generated view.`);if(!c.has(y.viewId))throw new Error(`filterContracts.${a}.bindings.${f}.viewId must be included in appliesToViewIds.`);if(w.has(y.viewId))throw new Error(`filterContracts.${a}.bindings.${f}.viewId must not be listed in notAppliedToViewIds.`)}}}function ke(e){return{"sources.ts":ve(e),"fields.ts":qe(e),"inputs.ts":De(e),"queries.ts":Pe(e),"bindings.ts":Le(e),"accessors.ts":Ye(e),"metadata.ts":We(e),"index.ts":Xe(),"USAGE.md":Ae(e)}}function Ne({contract:e,files:n,generatorName:r,generatorVersion:t}){return{schemaVersion:R.CONTRACT_MANIFEST_SCHEMA_VERSION,generatedContractSchemaVersion:R.GENERATED_CONTRACT_SCHEMA_VERSION,generator:{name:r,version:t},generatedContentHash:Ge(n),codegenSummaryValidatorVersion:R.CODEGEN_SUMMARY_VALIDATOR_VERSION,codegenSummaryHash:xe(e.summary),codegenSummary:e.summary}}function Ge(e){const n=he.createHash("sha256");for(const r of Object.keys(e).filter(t=>t.endsWith(".ts")).sort())n.update(r),n.update("\0"),n.update(e[r]),n.update("\0");return`sha256:${n.digest("hex")}`}function Ae(e){const n=["# Semaphor Generated Data App Contract","","Generated files in this directory are governed Semaphor analytics wiring. Do not hand-edit them.","","Use the app-facing exports from `index.ts`:","","- `queries`: generated governed query factories.","- `queryOptionsForView`: active-input wiring for each generated view.","- `rowsForView`: table/records row readers.","- `rowValuesForView`: friendly row object readers for chart/table views.","- `metricValuesForView`: friendly metric-value readers.","- `kpiPropsForView`: KPI component props derived from runtime metric results.","- `roleValuesForView`: canonical dimension/measure/date/id role readers.","- `appInputSpecs`: generated input/filter specs.","- `inputOptionQueries`: option-list query factories for generated inputs.","- `semaphorGeneratedContractMetadata`: generated view/input metadata and presentation-only views.","","Start with these exports before opening large generated internals such as `metadata.ts`.",""];return e.views.length>0&&(n.push("Generated executable views:"),e.views.forEach(r=>{n.push(`- \`${r.raw.id}\`: ${r.raw.title||r.name}`)}),n.push("")),e.inputs.length>0&&(n.push("Generated inputs:"),e.inputs.forEach(r=>{n.push(`- \`${r.raw.id}\`: ${r.raw.label||r.name}`)}),n.push("")),`${n.join(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as Vn, a as Fn, i as bn, v as kn } from "../chunks/matrix-operation-contract-
|
|
2
|
-
import { c as ke, G as fe, a as Re, b as Me } from "../chunks/update-policy-
|
|
3
|
-
import { C as Mn, e as Cn, R as On, f as Gn, g as xn, h as Nn, i as En, j as An, v as jn, d as vn } from "../chunks/update-policy-
|
|
1
|
+
import { S as Vn, a as Fn, i as bn, v as kn } from "../chunks/matrix-operation-contract-CPgckXxm.js";
|
|
2
|
+
import { c as ke, G as fe, a as Re, b as Me } from "../chunks/update-policy-BWbXhkk-.js";
|
|
3
|
+
import { C as Mn, e as Cn, R as On, f as Gn, g as xn, h as Nn, i as En, j as An, v as jn, d as vn } from "../chunks/update-policy-BWbXhkk-.js";
|
|
4
4
|
import { createHash as ye } from "node:crypto";
|
|
5
5
|
const wn = "src/semaphor/generated", v = `// Generated by Semaphor Agent Plugin. Do not hand-edit analytics wiring here.
|
|
6
6
|
// Regenerate from the accepted semaphor_plan_data_app codegenSummary when the plan changes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../data-app-sdk-adapters/index.cjs"),i=require("react/jsx-runtime"),u=require("react"),B=require("../chunks/validators-mhiJSia7.cjs"),Re=require("../chunks/matrix-operation-contract-C0-V685e.cjs"),rr=require("../chunks/matrix-formatter-UCXQxvV3.cjs"),ie=require("../chunks/search-BqqhaMx9.cjs"),Ke=require("../chunks/x-B6ghREd2.cjs");function ue(e,r,t){return{...t,name:e,role:r}}function zr(e){return e}function Pr(e){return e}const Hr={source:{semantic(e){return{...e,kind:"semantic"}},sql(e){return{...e,kind:"sql"}}},field:{measure(e,r={}){return ue(e,"measure",r)},dimension(e,r={}){return ue(e,"dimension",r)},date(e,r={}){return ue(e,"date",r)},id(e,r={}){return ue(e,"id",r)}},filter(e){return{...e,kind:"filter"}},bindInput(e,r){return{toAnalyticsInput(){const[t]=w.toSemaphorInputSnapshots([e]),n=w.toSemaphorInputBinding({...r,inputId:r.inputId||t.inputId});return{...t,inputId:n.inputId,...n.kind?{kind:n.kind}:{},...n.controlRole?{controlRole:n.controlRole}:{},...n.operator?{operator:n.operator}:{},...n.field?{field:n.field}:{},...n.relationshipHint?{relationshipHint:n.relationshipHint}:{}}}}},control(e){return{...e,kind:"control"}},sqlParam(e){return{...e,kind:"control",role:"sqlParam"}},derivedField(e){return{...e,kind:"derived_field",expressionLanguage:e.expressionLanguage||"semaphor_sql_template"}},metric(e){return{...e,queryKind:"metric"}},analysis(e){return{...e,queryKind:"analysis"}},records(e){return{...e,queryKind:"records"}},inputOptions(e){return{...e,queryKind:"inputOptions"}},sql(e){return{...e,queryKind:"sql"}},matrix(e){return{...e,queryKind:"matrix"}}},oe=10,Le=8;function We(e,r){const t=e==null?void 0:e.result;if(t)switch(t.kind){case"records":return ne({title:"Records",rowNoun:"rows",records:t.records,columns:t.columns,rowCount:t.rowCount});case"sql":return ne({title:"SQL Rows",rowNoun:"rows",records:t.records,columns:t.columns,rowCount:t.rowCount});case"inputOptions":return ne({title:"Options",rowNoun:"options",records:t.options.slice(0,oe).map(n=>{var s;return{label:n.label,value:n.value,count:n.count,disambiguation:(s=n.disambiguation)==null?void 0:s.join(" / ")}}),columns:[{key:"label",label:"Label"},{key:"value",label:"Value"},{key:"count",label:"Count"},{key:"disambiguation",label:"Disambiguation"}],rowCount:t.rowCount??t.options.length});case"metric":return Vr(t,r);case"matrix":return ne({title:"Matrix Cells",rowNoun:"cells",records:t.window.blocks.flatMap(n=>n.cells).slice(0,oe).map(n=>{const s=t.window.descriptors.measures.find(o=>o.id===n.measureId);return{row:rr.matrixMemberLabel(n.rowPath),column:rr.matrixMemberLabel(n.columnPath),measure:(s==null?void 0:s.column.label)||n.measureId,value:n.value}}),columns:[{key:"row",label:"Row"},{key:"column",label:"Column"},{key:"measure",label:"Measure"},{key:"value",label:"Value"}],rowCount:t.window.blocks.reduce((n,s)=>n+s.cells.length,0)});default:return Ur(t)}}function Vr(e,r){var o,a,f,c,p;const t=[{metric:"primaryValue",value:(r==null?void 0:r.primaryValue)??e.primaryValue}],n=(r==null?void 0:r.comparisonKind)??((o=e.comparison)==null?void 0:o.kind);return n&&t.push({metric:`${n} value`,value:(r==null?void 0:r.comparisonValue)??((a=e.comparison)==null?void 0:a.value)},{metric:"delta",value:(r==null?void 0:r.delta)??((f=e.comparison)==null?void 0:f.delta)},{metric:"deltaPercent",value:(r==null?void 0:r.deltaPercent)??((c=e.comparison)==null?void 0:c.deltaPercent)}),(((p=r==null?void 0:r.missingMeasures)==null?void 0:p.filter(Boolean))??[]).forEach(g=>{t.push({metric:`missing:${g}`,value:"missing"})}),Object.entries((r==null?void 0:r.measures)??{}).sort(([g],[m])=>g.localeCompare(m)).forEach(([g,m])=>{t.push({metric:`measure:${g}`,value:m})}),Object.entries((r==null?void 0:r.measureBindings)??{}).sort(([g],[m])=>g.localeCompare(m)).forEach(([g,m])=>{t.push({metric:`binding:${g}`,value:m})}),ne({title:"Metric",rowNoun:"values",records:t,columns:[{key:"metric",label:"Metric"},{key:"value",label:"Value"}],rowCount:t.length})}function ne({title:e,rowNoun:r,records:t,columns:n,rowCount:s}){const o=Qr(n,t);if(!o.length)return;const a=s??t.length,f=t.slice(0,oe);return{title:e,summary:`${Jr(a)} ${r}`,columns:o.slice(0,Le),rows:f,truncatedRows:a>f.length,truncatedColumns:o.length>Le}}function Qr(e,r){if(e!=null&&e.length)return e.filter(n=>n.key).map(n=>({key:n.key,label:n.label||n.key}));const t=new Set;return r.slice(0,oe).forEach(n=>{Object.keys(n).forEach(s=>t.add(s))}),[...t].map(n=>({key:n,label:n}))}function Ur(e){throw new Error(`Unhandled Semaphor result kind: ${mr(e)}`)}function Gr(e){return e===null?"null":e===void 0?"":typeof e=="string"?tr(e):typeof e=="number"||typeof e=="boolean"?String(e):tr(mr(e))}function Jr(e){return typeof e=="number"?e.toLocaleString():"-"}function mr(e){return JSON.stringify(e,null,2)??"undefined"}function tr(e){return e.length>80?`${e.slice(0,77)}...`:e}function he(e){return e.viewTitle||e.queryLabel||e.viewId||e.queryId}function Yr(e){if(e.label)return e.label;if(e.queryKind!=="inputOptions")return;const t=e.labelField.label||e.valueField.label||e.labelField.name||e.valueField.name||e.inputId;return`${Xr(t)} Options`}function Xr(e){return(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\bfilter\b/gi," ").replace(/\boptions?\b/gi," ").replace(/\bid\b/gi," ").replace(/\s+/g," ").trim()||e).split(" ").filter(Boolean).map(n=>n===n.toUpperCase()&&n.length>1?n:`${n.slice(0,1).toUpperCase()}${n.slice(1)}`).join(" ")}function Ne(e){return e.flatMap(r=>{var g,m,v,y;const t=r.latestAttempt,n=t==null?void 0:t.executionResult,s=Se((g=n==null?void 0:n.validation)==null?void 0:g.warnings),o=Se((m=n==null?void 0:n.validation)==null?void 0:m.errors),a=tt((v=n==null?void 0:n.coverage)==null?void 0:v.missingObligations),f=Se((y=n==null?void 0:n.coverage)==null?void 0:y.warnings),c=[],p=he(r);(t==null?void 0:t.status)==="error"&&c.push({trace:r,tone:"error",title:p,message:t.errorMessage||"Query attempt failed."});for(const b of r.clientWarnings)c.push({trace:r,tone:"warning",title:p,message:b});for(const b of s)c.push({trace:r,tone:"warning",title:p,...b});for(const b of o)c.push({trace:r,tone:"error",title:p,...b});for(const b of a)c.push({trace:r,tone:"warning",title:p,message:b});for(const b of f)c.push({trace:r,tone:"warning",title:p,...b});return c})}function Zr(e){return{traceId:e.trace.traceId,queryId:e.trace.queryId,viewId:e.trace.viewId,viewTitle:e.trace.viewTitle,queryLabel:e.trace.queryLabel,severity:e.tone,title:e.title,message:e.message,code:e.code,path:e.path}}function et(e,r){return e.filter(t=>t.trace.traceId===r.traceId).length}function rt(e){const r=Ne(e),t=e.filter(a=>{var f;return((f=a.latestAttempt)==null?void 0:f.status)==="error"}).length,n=e.filter(a=>{var f;return((f=a.latestAttempt)==null?void 0:f.status)==="loading"}).length,s=r.filter(a=>a.tone==="error").length,o=r.filter(a=>a.tone==="warning").length;return{total:e.length,failed:t,loading:n,errorCount:s,warningCount:o,issueCount:r.length,severity:t||s?"error":o?"warning":n?"loading":"ok"}}function tt(e){return Array.isArray(e)?e.filter(r=>typeof r=="string"):[]}function Se(e){return Array.isArray(e)?e.map(nt).filter(r=>!!r):[]}function nt(e){if(typeof e=="string")return{message:e};if(!e||typeof e!="object"||Array.isArray(e))return;const r=e,t=typeof r.message=="string"?r.message:"",n=typeof r.code=="string"?r.code:"",s=typeof r.path=="string"?r.path:"";return t&&n?{message:s?`${t} (${n}, ${s})`:`${t} (${n})`,code:n,...s?{path:s}:{}}:t?{message:t,...s?{path:s}:{}}:n?{message:n,code:n}:void 0}function st(e){if(!e.enabled)return e;const r=e.queries.map(yr);return{enabled:e.enabled,queries:r,issues:e.issues,getQuery:t=>r.find(n=>n.queryId===t),getQueries:t=>r.filter(n=>n.queryId===t)}}function nr(e){return e?yr(e):void 0}function yr(e){var r;return(r=e==null?void 0:e.latestAttempt)!=null&&r.executionResult?{...e,latestAttempt:{...e.latestAttempt,resultPreview:e.latestAttempt.resultPreview||We(e.latestAttempt.executionResult),executionResult:it(e.latestAttempt.executionResult)}}:e}function it(e){const{compiledQuery:r,intent:t,result:n,...s}=e,o=ot(s.metadata);return{...s,...o?{metadata:o}:{}}}function ot(e){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e.dataAppDebug;if(!r||typeof r!="object"||Array.isArray(r))return e;const{compiledSql:t,...n}=r;return{...e,dataAppDebug:n}}function at(e){return e==="relative"?{position:"relative",top:"auto",right:"auto",bottom:"auto",left:"auto"}:{top:e.startsWith("top")?20:"auto",right:e.endsWith("right")?20:"auto",bottom:e.startsWith("bottom")?20:"auto",left:e.endsWith("left")?20:"auto"}}function lt(e){return e==="error"?{borderColor:"var(--sd-error-border)",background:"var(--sd-error-bg)",color:"var(--sd-error-fg)"}:e==="warning"?{borderColor:"var(--sd-warning-border)",background:"var(--sd-warning-bg)",color:"var(--sd-warning-fg)"}:e==="loading"?{borderColor:"var(--sd-loading-border)",background:"var(--sd-loading-bg)",color:"var(--sd-loading-fg)"}:{borderColor:"var(--sd-success-border)",background:"var(--sd-success-bg)",color:"var(--sd-success-fg)"}}function dt(e){return e==="right"?{top:16,right:16,bottom:16,left:"auto",width:"min(720px, calc(100vw - 32px))",height:"auto",borderRadius:6}:{top:"auto",right:16,bottom:16,left:16,width:"auto",height:"min(420px, 45vh)",borderRadius:6}}function ut(e){return e==="right"?{gridTemplateColumns:"minmax(210px, 280px) minmax(0, 1fr)"}:{gridTemplateColumns:"minmax(260px, 340px) minmax(0, 1fr)"}}function ct(e){return{borderRight:"1px solid var(--sd-border)",borderBottom:0}}function hr(e){return e==="error"?{background:"var(--sd-error-dot)"}:e==="success"?{background:"var(--sd-success-dot)"}:e==="loading"?{background:"var(--sd-loading-dot)"}:{background:"var(--sd-idle-dot)"}}function ft(e){return e==="error"?{borderColor:"var(--sd-error-border)",color:"var(--sd-error-fg)"}:e==="success"?{borderColor:"var(--sd-success-border)",color:"var(--sd-success-fg)"}:e==="loading"?{borderColor:"var(--sd-loading-border)",color:"var(--sd-loading-fg)"}:{borderColor:"var(--sd-border)",color:"var(--sd-fg-muted)"}}const sr="semaphor-devtools-stylesheet",E="semaphor-devtools",pt=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../data-app-sdk-adapters/index.cjs"),i=require("react/jsx-runtime"),u=require("react"),B=require("../chunks/validators-D2F_uxxP.cjs"),Re=require("../chunks/matrix-operation-contract-thtFuUYf.cjs"),rr=require("../chunks/matrix-formatter-CWtdnbfv.cjs"),ie=require("../chunks/search-BqqhaMx9.cjs"),Ke=require("../chunks/x-B6ghREd2.cjs");function ue(e,r,t){return{...t,name:e,role:r}}function zr(e){return e}function Pr(e){return e}const Hr={source:{semantic(e){return{...e,kind:"semantic"}},sql(e){return{...e,kind:"sql"}}},field:{measure(e,r={}){return ue(e,"measure",r)},dimension(e,r={}){return ue(e,"dimension",r)},date(e,r={}){return ue(e,"date",r)},id(e,r={}){return ue(e,"id",r)}},filter(e){return{...e,kind:"filter"}},bindInput(e,r){return{toAnalyticsInput(){const[t]=w.toSemaphorInputSnapshots([e]),n=w.toSemaphorInputBinding({...r,inputId:r.inputId||t.inputId});return{...t,inputId:n.inputId,...n.kind?{kind:n.kind}:{},...n.controlRole?{controlRole:n.controlRole}:{},...n.operator?{operator:n.operator}:{},...n.field?{field:n.field}:{},...n.relationshipHint?{relationshipHint:n.relationshipHint}:{}}}}},control(e){return{...e,kind:"control"}},sqlParam(e){return{...e,kind:"control",role:"sqlParam"}},derivedField(e){return{...e,kind:"derived_field",expressionLanguage:e.expressionLanguage||"semaphor_sql_template"}},metric(e){return{...e,queryKind:"metric"}},analysis(e){return{...e,queryKind:"analysis"}},records(e){return{...e,queryKind:"records"}},inputOptions(e){return{...e,queryKind:"inputOptions"}},sql(e){return{...e,queryKind:"sql"}},matrix(e){return{...e,queryKind:"matrix"}}},oe=10,Le=8;function We(e,r){const t=e==null?void 0:e.result;if(t)switch(t.kind){case"records":return ne({title:"Records",rowNoun:"rows",records:t.records,columns:t.columns,rowCount:t.rowCount});case"sql":return ne({title:"SQL Rows",rowNoun:"rows",records:t.records,columns:t.columns,rowCount:t.rowCount});case"inputOptions":return ne({title:"Options",rowNoun:"options",records:t.options.slice(0,oe).map(n=>{var s;return{label:n.label,value:n.value,count:n.count,disambiguation:(s=n.disambiguation)==null?void 0:s.join(" / ")}}),columns:[{key:"label",label:"Label"},{key:"value",label:"Value"},{key:"count",label:"Count"},{key:"disambiguation",label:"Disambiguation"}],rowCount:t.rowCount??t.options.length});case"metric":return Vr(t,r);case"matrix":return ne({title:"Matrix Cells",rowNoun:"cells",records:t.window.blocks.flatMap(n=>n.cells).slice(0,oe).map(n=>{const s=t.window.descriptors.measures.find(o=>o.id===n.measureId);return{row:rr.matrixMemberLabel(n.rowPath),column:rr.matrixMemberLabel(n.columnPath),measure:(s==null?void 0:s.column.label)||n.measureId,value:n.value}}),columns:[{key:"row",label:"Row"},{key:"column",label:"Column"},{key:"measure",label:"Measure"},{key:"value",label:"Value"}],rowCount:t.window.blocks.reduce((n,s)=>n+s.cells.length,0)});default:return Ur(t)}}function Vr(e,r){var o,a,f,c,p;const t=[{metric:"primaryValue",value:(r==null?void 0:r.primaryValue)??e.primaryValue}],n=(r==null?void 0:r.comparisonKind)??((o=e.comparison)==null?void 0:o.kind);return n&&t.push({metric:`${n} value`,value:(r==null?void 0:r.comparisonValue)??((a=e.comparison)==null?void 0:a.value)},{metric:"delta",value:(r==null?void 0:r.delta)??((f=e.comparison)==null?void 0:f.delta)},{metric:"deltaPercent",value:(r==null?void 0:r.deltaPercent)??((c=e.comparison)==null?void 0:c.deltaPercent)}),(((p=r==null?void 0:r.missingMeasures)==null?void 0:p.filter(Boolean))??[]).forEach(g=>{t.push({metric:`missing:${g}`,value:"missing"})}),Object.entries((r==null?void 0:r.measures)??{}).sort(([g],[m])=>g.localeCompare(m)).forEach(([g,m])=>{t.push({metric:`measure:${g}`,value:m})}),Object.entries((r==null?void 0:r.measureBindings)??{}).sort(([g],[m])=>g.localeCompare(m)).forEach(([g,m])=>{t.push({metric:`binding:${g}`,value:m})}),ne({title:"Metric",rowNoun:"values",records:t,columns:[{key:"metric",label:"Metric"},{key:"value",label:"Value"}],rowCount:t.length})}function ne({title:e,rowNoun:r,records:t,columns:n,rowCount:s}){const o=Qr(n,t);if(!o.length)return;const a=s??t.length,f=t.slice(0,oe);return{title:e,summary:`${Jr(a)} ${r}`,columns:o.slice(0,Le),rows:f,truncatedRows:a>f.length,truncatedColumns:o.length>Le}}function Qr(e,r){if(e!=null&&e.length)return e.filter(n=>n.key).map(n=>({key:n.key,label:n.label||n.key}));const t=new Set;return r.slice(0,oe).forEach(n=>{Object.keys(n).forEach(s=>t.add(s))}),[...t].map(n=>({key:n,label:n}))}function Ur(e){throw new Error(`Unhandled Semaphor result kind: ${mr(e)}`)}function Gr(e){return e===null?"null":e===void 0?"":typeof e=="string"?tr(e):typeof e=="number"||typeof e=="boolean"?String(e):tr(mr(e))}function Jr(e){return typeof e=="number"?e.toLocaleString():"-"}function mr(e){return JSON.stringify(e,null,2)??"undefined"}function tr(e){return e.length>80?`${e.slice(0,77)}...`:e}function he(e){return e.viewTitle||e.queryLabel||e.viewId||e.queryId}function Yr(e){if(e.label)return e.label;if(e.queryKind!=="inputOptions")return;const t=e.labelField.label||e.valueField.label||e.labelField.name||e.valueField.name||e.inputId;return`${Xr(t)} Options`}function Xr(e){return(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\bfilter\b/gi," ").replace(/\boptions?\b/gi," ").replace(/\bid\b/gi," ").replace(/\s+/g," ").trim()||e).split(" ").filter(Boolean).map(n=>n===n.toUpperCase()&&n.length>1?n:`${n.slice(0,1).toUpperCase()}${n.slice(1)}`).join(" ")}function Ne(e){return e.flatMap(r=>{var g,m,v,y;const t=r.latestAttempt,n=t==null?void 0:t.executionResult,s=Se((g=n==null?void 0:n.validation)==null?void 0:g.warnings),o=Se((m=n==null?void 0:n.validation)==null?void 0:m.errors),a=tt((v=n==null?void 0:n.coverage)==null?void 0:v.missingObligations),f=Se((y=n==null?void 0:n.coverage)==null?void 0:y.warnings),c=[],p=he(r);(t==null?void 0:t.status)==="error"&&c.push({trace:r,tone:"error",title:p,message:t.errorMessage||"Query attempt failed."});for(const b of r.clientWarnings)c.push({trace:r,tone:"warning",title:p,message:b});for(const b of s)c.push({trace:r,tone:"warning",title:p,...b});for(const b of o)c.push({trace:r,tone:"error",title:p,...b});for(const b of a)c.push({trace:r,tone:"warning",title:p,message:b});for(const b of f)c.push({trace:r,tone:"warning",title:p,...b});return c})}function Zr(e){return{traceId:e.trace.traceId,queryId:e.trace.queryId,viewId:e.trace.viewId,viewTitle:e.trace.viewTitle,queryLabel:e.trace.queryLabel,severity:e.tone,title:e.title,message:e.message,code:e.code,path:e.path}}function et(e,r){return e.filter(t=>t.trace.traceId===r.traceId).length}function rt(e){const r=Ne(e),t=e.filter(a=>{var f;return((f=a.latestAttempt)==null?void 0:f.status)==="error"}).length,n=e.filter(a=>{var f;return((f=a.latestAttempt)==null?void 0:f.status)==="loading"}).length,s=r.filter(a=>a.tone==="error").length,o=r.filter(a=>a.tone==="warning").length;return{total:e.length,failed:t,loading:n,errorCount:s,warningCount:o,issueCount:r.length,severity:t||s?"error":o?"warning":n?"loading":"ok"}}function tt(e){return Array.isArray(e)?e.filter(r=>typeof r=="string"):[]}function Se(e){return Array.isArray(e)?e.map(nt).filter(r=>!!r):[]}function nt(e){if(typeof e=="string")return{message:e};if(!e||typeof e!="object"||Array.isArray(e))return;const r=e,t=typeof r.message=="string"?r.message:"",n=typeof r.code=="string"?r.code:"",s=typeof r.path=="string"?r.path:"";return t&&n?{message:s?`${t} (${n}, ${s})`:`${t} (${n})`,code:n,...s?{path:s}:{}}:t?{message:t,...s?{path:s}:{}}:n?{message:n,code:n}:void 0}function st(e){if(!e.enabled)return e;const r=e.queries.map(yr);return{enabled:e.enabled,queries:r,issues:e.issues,getQuery:t=>r.find(n=>n.queryId===t),getQueries:t=>r.filter(n=>n.queryId===t)}}function nr(e){return e?yr(e):void 0}function yr(e){var r;return(r=e==null?void 0:e.latestAttempt)!=null&&r.executionResult?{...e,latestAttempt:{...e.latestAttempt,resultPreview:e.latestAttempt.resultPreview||We(e.latestAttempt.executionResult),executionResult:it(e.latestAttempt.executionResult)}}:e}function it(e){const{compiledQuery:r,intent:t,result:n,...s}=e,o=ot(s.metadata);return{...s,...o?{metadata:o}:{}}}function ot(e){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e.dataAppDebug;if(!r||typeof r!="object"||Array.isArray(r))return e;const{compiledSql:t,...n}=r;return{...e,dataAppDebug:n}}function at(e){return e==="relative"?{position:"relative",top:"auto",right:"auto",bottom:"auto",left:"auto"}:{top:e.startsWith("top")?20:"auto",right:e.endsWith("right")?20:"auto",bottom:e.startsWith("bottom")?20:"auto",left:e.endsWith("left")?20:"auto"}}function lt(e){return e==="error"?{borderColor:"var(--sd-error-border)",background:"var(--sd-error-bg)",color:"var(--sd-error-fg)"}:e==="warning"?{borderColor:"var(--sd-warning-border)",background:"var(--sd-warning-bg)",color:"var(--sd-warning-fg)"}:e==="loading"?{borderColor:"var(--sd-loading-border)",background:"var(--sd-loading-bg)",color:"var(--sd-loading-fg)"}:{borderColor:"var(--sd-success-border)",background:"var(--sd-success-bg)",color:"var(--sd-success-fg)"}}function dt(e){return e==="right"?{top:16,right:16,bottom:16,left:"auto",width:"min(720px, calc(100vw - 32px))",height:"auto",borderRadius:6}:{top:"auto",right:16,bottom:16,left:16,width:"auto",height:"min(420px, 45vh)",borderRadius:6}}function ut(e){return e==="right"?{gridTemplateColumns:"minmax(210px, 280px) minmax(0, 1fr)"}:{gridTemplateColumns:"minmax(260px, 340px) minmax(0, 1fr)"}}function ct(e){return{borderRight:"1px solid var(--sd-border)",borderBottom:0}}function hr(e){return e==="error"?{background:"var(--sd-error-dot)"}:e==="success"?{background:"var(--sd-success-dot)"}:e==="loading"?{background:"var(--sd-loading-dot)"}:{background:"var(--sd-idle-dot)"}}function ft(e){return e==="error"?{borderColor:"var(--sd-error-border)",color:"var(--sd-error-fg)"}:e==="success"?{borderColor:"var(--sd-success-border)",color:"var(--sd-success-fg)"}:e==="loading"?{borderColor:"var(--sd-loading-border)",color:"var(--sd-loading-fg)"}:{borderColor:"var(--sd-border)",color:"var(--sd-fg-muted)"}}const sr="semaphor-devtools-stylesheet",E="semaphor-devtools",pt=`
|
|
2
2
|
.${E} {
|
|
3
3
|
--sd-bg: #ffffff;
|
|
4
4
|
--sd-bg-muted: #fafafa;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { toSemaphorInputSnapshots as Gr, toSemaphorInputBinding as Jr, toSemaphorActiveInputSnapshots as Y, toSemaphorMatrixIntent as Yr, toSemaphorSqlIntent as Xr, toSemaphorInputOptionsIntent as Zr, toSemaphorRecordsIntent as et, toSemaphorAnalysisQueryOptions as rt, toSemaphorAnalysisIntent as tt, toSemaphorMetricIntent as nt, hasSemaphorInputValue as ue, normalizeSemaphorInputOptions as vr, toSemaphorInputSpec as wr } from "../data-app-sdk-adapters/index.js";
|
|
2
2
|
import { jsxs as p, Fragment as Sr, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as xe, useContext as Q, useState as z, useRef as E, useEffect as B, useMemo as I, Fragment as it, useId as Ir, useCallback as D, useReducer as ot } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as dt, N as ut, L as ct } from "../chunks/matrix-operation-contract-
|
|
7
|
-
import { m as or } from "../chunks/matrix-formatter-
|
|
4
|
+
import { q as st, u as at, ac as lt, aW as Se } from "../chunks/validators-CHlnnHuS.js";
|
|
5
|
+
import { l as ho, b0 as bo } from "../chunks/validators-CHlnnHuS.js";
|
|
6
|
+
import { u as dt, N as ut, L as ct } from "../chunks/matrix-operation-contract-CPgckXxm.js";
|
|
7
|
+
import { m as or } from "../chunks/matrix-formatter-BTPfthsa.js";
|
|
8
8
|
import { M as ft, a as pt, S as gt, E as mt, C as yt } from "../chunks/search-BHsQIWBV.js";
|
|
9
9
|
import { X as ht, C as bt, j as vt } from "../chunks/x-CXDkqdur.js";
|
|
10
10
|
function me(e, r, t) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../chunks/operators-DEfKaU_V.cjs"),l=require("../chunks/validators-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../chunks/operators-DEfKaU_V.cjs"),l=require("../chunks/validators-D2F_uxxP.cjs");require("../chunks/matrix-operation-contract-thtFuUYf.cjs");function g(i){var e,r,o;const t=b(i);return{version:1,kind:"metric",id:i.id,label:i.label,source:h(i),measures:t,primaryMeasure:M(i,t),dateField:i.dateField?a(i.dateField,"date"):void 0,timeGrain:i.timeGrain,dimensions:(e=i.dimensions)==null?void 0:e.map(n=>a(n,"dimension")),comparison:$(i.comparison),orderBy:i.orderBy?{field:a(i.orderBy.field),direction:i.orderBy.direction}:void 0,inputs:u(i.inputs),...(r=i.filters)!=null&&r.length?{filters:i.filters}:{},...i.relationshipHint?{relationshipHint:i.relationshipHint}:{},limit:i.limit,...(o=i.derivedFields)!=null&&o.length?{derivedFields:i.derivedFields}:{}}}function v(i){return{...g(i),...i.timeWindow?{timeWindow:i.timeWindow}:{},...i.analysis?{analysis:i.analysis}:{}}}function F(i){return{...i.chartTitle?{chartTitle:i.chartTitle}:{},...i.chartType?{chartType:i.chartType}:{},...i.driverMode?{driverMode:i.driverMode}:{},...i.includePopulation!==void 0?{includePopulation:i.includePopulation}:{},...i.calendarContext?{calendarContext:i.calendarContext}:{}}}function M(i,t){if(!i.primaryMeasure)return t[0]||{name:"",role:"measure"};const e=a(i.primaryMeasure,"measure"),r=H(e,t),o=r.length===1?r[0]:void 0;return o?p(e,o):e}function b(i){const t=[];for(const e of i.measures.map(r=>a(r,"measure"))){if(!e.name)continue;const r=t.findIndex(o=>R(o,e));if(r===-1){t.push(e);continue}t[r]=p(t[r],e)}return t}function R(i,t){return l.semaphorFieldRefsMatch(i,t)&&d(i)===d(t)}function w(i,t){return d(t)===d(i)}function k(i,t){return t.name!==i.name||i.source&&!l.semaphorFieldRefsMatch(t,i)?!1:w(i,t)}function H(i,t){const e=t.filter(r=>k(i,r));return i.aggregate!==void 0,e}function d(i){return l.semaphorMetricAggregate(i)}function p(i,t){if(i.aggregate&&t.aggregate&&i.aggregate!==t.aggregate)throw new Error(`Measure "${i.name}" was requested with conflicting aggregate semantics: ${i.aggregate} and ${t.aggregate}.`);return{...l.preferSemaphorFieldRefMetadata(i,t),aggregate:i.aggregate||t.aggregate}}function A(i){var e,r;if("sort"in i)throw new Error("semaphor.records supports orderBy for a single deterministic sort. Multiple sort clauses are not supported by the analytics protocol yet.");if(!E(i))throw new Error("semaphor.records needs at least one field.");const t=B(i.fields);return{version:1,kind:"records",id:i.id,label:i.label,source:h(i),fields:t,dateField:i.dateField?a(i.dateField,"date"):void 0,timeGrain:i.timeGrain,...i.timeWindow?{timeWindow:i.timeWindow}:{},...(e=i.filters)!=null&&e.length?{filters:i.filters}:{},orderBy:i.orderBy?{field:a(i.orderBy.field),direction:i.orderBy.direction}:void 0,inputs:u(i.inputs),...i.relationshipHint?{relationshipHint:i.relationshipHint}:{},limit:i.limit,...i.pagination?{pagination:i.pagination}:{},...i.totals?{totals:{mode:"server",measures:i.totals.measures.map(o=>a(o,"measure"))}}:{},...(r=i.derivedFields)!=null&&r.length?{derivedFields:i.derivedFields}:{}}}function B(i){return i.map(t=>{const e=a(t);if(!e.role)throw new Error(`semaphor.records field "${e.name}" needs an explicit role.`);return e})}function O(i){var e,r,o;const t=h(i);if(t.kind==="sql")throw new Error("semaphor.inputOptions requires a semantic or physical option source.");return{version:1,kind:"inputOptions",id:i.id,label:i.label,inputId:i.inputId,source:t,labelField:a(i.labelField,"dimension"),valueField:a(i.valueField,"dimension"),...i.searchField?{searchField:a(i.searchField,"dimension")}:{},...(e=i.disambiguationFields)!=null&&e.length?{disambiguationFields:i.disambiguationFields.map(n=>a(n,"dimension"))}:{},...i.population?{population:i.population}:{},...i.dependencies?{dependencies:i.dependencies}:{},search:i.search,limit:i.limit,...(r=i.inputs)!=null&&r.length?{inputs:i.inputs.map(n=>m(n))}:{},...(o=i.derivedFields)!=null&&o.length?{derivedFields:i.derivedFields}:{}}}function q(i){var t;return{version:1,kind:"sql",id:i.id,label:i.label,source:i.source,sql:i.sql,...i.defaultParameters?{defaultParameters:i.defaultParameters}:{},...i.pythonCode?{pythonCode:i.pythonCode}:{},...(t=i.fields)!=null&&t.length?{fields:i.fields.map(e=>a(e))}:{},inputs:u(i.inputs),limit:i.limit,...i.pagination?{pagination:i.pagination}:{},rationale:i.rationale}}function P(i){const{id:t,label:e,inputs:r,matrixWindowRequest:o,...n}=i,{queryKind:_,...S}=n;return l.matrixAnalyticalIntentSchema.parse({...S,kind:"matrix"})}function m(i){if("toAnalyticsInput"in i){const n=i.toAnalyticsInput();return{inputId:n.inputId,kind:n.kind,...n.controlRole?{controlRole:n.controlRole}:{},...n.operator?{operator:n.operator}:{},...n.field?{field:n.field}:{},...n.relationshipHint?{relationshipHint:n.relationshipHint}:{}}}if("id"in i){const n=f(i);return{inputId:n.inputId,kind:n.kind,...n.controlRole?{controlRole:n.controlRole}:{},...n.operator?{operator:n.operator}:{},...n.field?{field:n.field}:{},...n.relationshipHint?{relationshipHint:n.relationshipHint}:{}}}const t="kind"in i?i.kind:void 0,e="operator"in i?I(i.operator,i.inputId):void 0,r="controlRole"in i?i.controlRole:"role"in i?i.role:void 0,o=z(r)?r:void 0;return{inputId:i.inputId,...t?{kind:t}:{},...o?{controlRole:o}:{},...e?{operator:e}:{},...i.field?{field:i.field}:{},...i.relationshipHint?{relationshipHint:i.relationshipHint}:{}}}function z(i){return i==="grain"||i==="measure"||i==="dimension"||i==="aggregation"||i==="sqlParam"}function C(i){const t=u(i);return t.length>0?t:void 0}function c(i){return(i||[]).map(W)}function T(i){return c(i).filter(t=>t.isActive)}function f(i){if(i.kind==="filter"){const t=I(i.operator,i.id);return{inputId:i.id,kind:i.kind,label:i.label,field:a(i.field,"dimension"),operator:t||"in",...i.relationshipHint?{relationshipHint:i.relationshipHint}:{}}}return{inputId:i.id,kind:i.kind,label:i.label,controlRole:i.role}}function x(i=[]){return i.map(t=>typeof t=="object"?t:{label:String(t),value:t})}function s(i){return i==null?!1:Array.isArray(i)?i.length>0:typeof i=="string"?i.trim().length>0:!0}function W(i){if("toAnalyticsInput"in i)return i.toAnalyticsInput();if("kind"in i&&"isActive"in i)return i;if("id"in i){const t=f(i),e=Object.prototype.hasOwnProperty.call(i,"value")?i.value:i.defaultValue;return{inputId:t.inputId,kind:t.kind,label:t.label,...t.field?{field:t.field}:{},...t.operator?{operator:t.operator}:{},...t.controlRole?{controlRole:t.controlRole}:{},...t.relationshipHint?{relationshipHint:t.relationshipHint}:{},value:e,isActive:s(e)}}return{...i,kind:"filter",isActive:s(i.value),value:i.value}}function h(i){return i.source}function E(i){var t;return!!((t=i.fields)!=null&&t.length)}function a(i,t){return{...i,role:i.role||t}}function u(i){return(i||[]).map(m)}function $(i){if(i)return i}function I(i,t){if(i===void 0)return;const e=y.normalizeSemaphorInputOperator(i);if(!e)throw new Error(`useSemaphorInput "${t}" uses unsupported filter operator "${i}".`);return e}exports.hasSemaphorInputValue=s;exports.normalizeSemaphorInputOptions=x;exports.toSemaphorActiveInputSnapshots=T;exports.toSemaphorAnalysisIntent=v;exports.toSemaphorAnalysisQueryOptions=F;exports.toSemaphorInputBinding=m;exports.toSemaphorInputBindings=C;exports.toSemaphorInputOptionsIntent=O;exports.toSemaphorInputSnapshots=c;exports.toSemaphorInputSpec=f;exports.toSemaphorMatrixIntent=P;exports.toSemaphorMetricIntent=g;exports.toSemaphorRecordsIntent=A;exports.toSemaphorSqlIntent=q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as y } from "../chunks/operators-B3zZoskU.js";
|
|
2
|
-
import { m as v,
|
|
3
|
-
import "../chunks/matrix-operation-contract-
|
|
2
|
+
import { m as v, k as m, p as I, l as S } from "../chunks/validators-CHlnnHuS.js";
|
|
3
|
+
import "../chunks/matrix-operation-contract-CPgckXxm.js";
|
|
4
4
|
function F(i) {
|
|
5
5
|
var e, r, o;
|
|
6
6
|
const t = w(i);
|