react-semaphor 0.1.417 → 0.1.418
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 +49 -50
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/chunks/analyze-result-contract-Akysi2ML.js +2003 -0
- package/dist/chunks/analyze-result-contract-COjyJzYm.js +1 -0
- package/dist/chunks/{calendar-preferences-dialog-BOfryj8P.js → calendar-preferences-dialog-BbuLgela.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-Rq9qiG3X.js → calendar-preferences-dialog-CInkkhl_.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D_P0cNQ_.js → dashboard-briefing-launcher-B4OWNsVD.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DgvlOcRI.js → dashboard-briefing-launcher-D7FNuDuc.js} +4 -4
- package/dist/chunks/{dashboard-controls-DzVA-wWu.js → dashboard-controls-DTC1eCz0.js} +1 -1
- package/dist/chunks/{dashboard-controls-JYTKRokc.js → dashboard-controls-DcX7Mid4.js} +5 -5
- package/dist/chunks/{dashboard-json-h6YMk_-l.js → dashboard-json-BHWbQS6I.js} +3 -3
- package/dist/chunks/{dashboard-json-D5TEri2w.js → dashboard-json-vu38P5pV.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-kfbu03n9.js → edit-dashboard-visual-CkBhJBhp.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DOtCYmDn.js → edit-dashboard-visual-DsCr90_3.js} +4 -4
- package/dist/chunks/{index-BgESS5r7.js → index-C56DuHI8.js} +163 -164
- package/dist/chunks/{index-Beol8cOo.js → index-C8thRvkW.js} +4 -4
- package/dist/chunks/{switch--FHwRAOL.js → switch-BXuyni6l.js} +1 -1
- package/dist/chunks/{switch-C8_t4Pio.js → switch-Dsx-IwBE.js} +1 -1
- package/dist/chunks/{update-policy-CQLHKQ_h.js → update-policy-B5S_LfEu.js} +161 -142
- package/dist/chunks/update-policy-BqBKUk3Q.js +3 -0
- package/dist/chunks/{use-create-flow-overlay-state-BEPWzqQn.js → use-create-flow-overlay-state-BDv_VpL6.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-NEs9ePDy.js → use-create-flow-overlay-state-CzftV84t.js} +3 -3
- package/dist/chunks/{validators-UqQI3Cg_.js → validators-CLzrE2N_.js} +1 -1
- package/dist/chunks/validators-CPFcUMrV.js +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 +28 -29
- 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 +154 -125
- package/dist/data-app-codegen-node/index.js +695 -613
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +171 -157
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +26 -27
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +17 -18
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +5 -0
- package/dist/types/dashboard-assistant.d.ts +1 -0
- package/dist/types/data-app-codegen-node.d.ts +2 -1
- package/dist/types/data-app-codegen.d.ts +2 -1
- package/dist/types/data-app-sdk-validation.d.ts +1 -0
- package/dist/types/data-app-sdk.d.ts +6 -0
- package/package.json +1 -1
- package/dist/chunks/analyze-result-contract-B0O3oIYu.js +0 -1870
- package/dist/chunks/analyze-result-contract-CL97m8X8.js +0 -1
- package/dist/chunks/source-identity-BM2FvJDP.js +0 -1
- package/dist/chunks/source-identity-Cv4Nm3TM.js +0 -75
- package/dist/chunks/update-policy-B50M0Jeg.js +0 -3
- package/dist/chunks/validators-JzI7olk4.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as Q, a as X, v as Z } from "./analyze-result-contract-
|
|
1
|
+
import { S as Q, a as X, v as Z } from "./analyze-result-contract-Akysi2ML.js";
|
|
2
2
|
import { toSemaphorInputOptionsIntent as ee, toSemaphorAnalysisQueryOptions as te, toSemaphorAnalysisIntent as re, toSemaphorMetricIntent as ne, toSemaphorRecordsIntent as ae, toSemaphorMatrixIntent as se, toSemaphorSqlIntent as ie } from "../data-app-sdk-adapters/index.js";
|
|
3
|
-
const
|
|
3
|
+
const Ue = Q, j = X, x = "semaphor-generated-data-app-contract/v1", M = "semaphor-generated-data-app-contract-manifest/v1";
|
|
4
4
|
function L(e) {
|
|
5
|
-
return
|
|
5
|
+
return w(e) ? [
|
|
6
6
|
...Z(e).issues,
|
|
7
7
|
...oe(e)
|
|
8
8
|
] : ["Plan artifact must be a Semaphor codegenSummary object."];
|
|
@@ -16,26 +16,26 @@ function ze(e) {
|
|
|
16
16
|
}
|
|
17
17
|
function oe(e) {
|
|
18
18
|
var r;
|
|
19
|
-
const t =
|
|
19
|
+
const t = w(e);
|
|
20
20
|
if (!t)
|
|
21
21
|
return [];
|
|
22
22
|
const n = [];
|
|
23
|
-
return ((r =
|
|
23
|
+
return ((r = w(t.validation)) == null ? void 0 : r.status) === "blocked" && n.push(
|
|
24
24
|
"validation.status blocked cannot be generated. Resolve blocked semantic model gaps and replan before generating contract files."
|
|
25
25
|
), Array.isArray(t.unsupportedInsights) && t.unsupportedInsights.forEach((s, o) => {
|
|
26
26
|
var a;
|
|
27
|
-
((a =
|
|
27
|
+
((a = w(s)) == null ? void 0 : a.reason) === "missing_relationship" && n.push(
|
|
28
28
|
`unsupportedInsights.${o}.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`
|
|
29
29
|
);
|
|
30
30
|
}), Array.isArray(t.views) && t.views.forEach((s, o) => {
|
|
31
31
|
var i;
|
|
32
|
-
const a =
|
|
32
|
+
const a = w((i = w(s)) == null ? void 0 : i.computation);
|
|
33
33
|
(a == null ? void 0 : a.kind) === "unsupported" && a.reason === "missing_relationship" && n.push(
|
|
34
34
|
`views.${o}.computation.reason missing_relationship blocks contract generation. Call semaphor_propose_semantic_model_change, apply an approved semantic model patch, and replan before generating contract files.`
|
|
35
35
|
);
|
|
36
36
|
}), n;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function w(e) {
|
|
39
39
|
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
40
40
|
}
|
|
41
41
|
const ce = [
|
|
@@ -55,7 +55,7 @@ async function Je({
|
|
|
55
55
|
manifest: e,
|
|
56
56
|
generatedFiles: t
|
|
57
57
|
}) {
|
|
58
|
-
const n = [], r =
|
|
58
|
+
const n = [], r = h(e);
|
|
59
59
|
if (!r)
|
|
60
60
|
return {
|
|
61
61
|
issues: [
|
|
@@ -65,16 +65,16 @@ async function Je({
|
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
};
|
|
68
|
-
r.schemaVersion !==
|
|
68
|
+
r.schemaVersion !== M && n.push({
|
|
69
69
|
path: "schemaVersion",
|
|
70
|
-
message: `schemaVersion must be ${
|
|
70
|
+
message: `schemaVersion must be ${M}. Regenerate the contract with semaphor_create_data_app_contract.`,
|
|
71
71
|
repairHint: "Regenerate the contract with semaphor_create_data_app_contract."
|
|
72
|
-
}), r.generatedContractSchemaVersion !==
|
|
72
|
+
}), r.generatedContractSchemaVersion !== x && n.push({
|
|
73
73
|
path: "generatedContractSchemaVersion",
|
|
74
|
-
message: `generatedContractSchemaVersion must be ${
|
|
74
|
+
message: `generatedContractSchemaVersion must be ${x}. Regenerate the contract with semaphor_generate_data_app_contract.`,
|
|
75
75
|
repairHint: "Regenerate the contract with semaphor_generate_data_app_contract."
|
|
76
76
|
});
|
|
77
|
-
const s =
|
|
77
|
+
const s = h(r.generator);
|
|
78
78
|
S(s == null ? void 0 : s.name) || n.push({
|
|
79
79
|
path: "generator.name",
|
|
80
80
|
message: "generator.name is required.",
|
|
@@ -100,7 +100,7 @@ async function Je({
|
|
|
100
100
|
message: "codegenSummaryHash is required.",
|
|
101
101
|
repairHint: "Regenerate the generated contract so manifest hashes are written deterministically."
|
|
102
102
|
});
|
|
103
|
-
else if (
|
|
103
|
+
else if (h(r.codegenSummary)) {
|
|
104
104
|
const a = await pe(
|
|
105
105
|
r.codegenSummary
|
|
106
106
|
);
|
|
@@ -150,35 +150,35 @@ function ue(e) {
|
|
|
150
150
|
return t;
|
|
151
151
|
}
|
|
152
152
|
function fe(e) {
|
|
153
|
-
const t =
|
|
153
|
+
const t = h(e);
|
|
154
154
|
if (!t)
|
|
155
155
|
return [];
|
|
156
156
|
const n = [], r = new Set(
|
|
157
|
-
|
|
157
|
+
V(t.inputs).map((o) => {
|
|
158
158
|
var a;
|
|
159
|
-
return (a =
|
|
159
|
+
return (a = h(o)) == null ? void 0 : a.id;
|
|
160
160
|
}).filter(S)
|
|
161
161
|
), s = new Set(
|
|
162
|
-
|
|
162
|
+
V(t.views).map((o) => {
|
|
163
163
|
var a;
|
|
164
|
-
return (a =
|
|
164
|
+
return (a = h(o)) == null ? void 0 : a.id;
|
|
165
165
|
}).filter(S)
|
|
166
166
|
);
|
|
167
|
-
return
|
|
168
|
-
const i =
|
|
167
|
+
return V(t.filterContracts).forEach((o, a) => {
|
|
168
|
+
const i = h(o), c = i == null ? void 0 : i.inputId;
|
|
169
169
|
(!S(c) || !r.has(c)) && n.push({
|
|
170
170
|
path: `codegenSummary.filterContracts.${a}.inputId`,
|
|
171
171
|
message: `codegenSummary.filterContracts.${a}.inputId must reference a generated input.`,
|
|
172
172
|
repairHint: "Regenerate the generated contract from a valid planner output."
|
|
173
173
|
}), Array.isArray(i == null ? void 0 : i.bindings) && i.bindings.forEach((u, f) => {
|
|
174
|
-
const g =
|
|
174
|
+
const g = h(u), m = g == null ? void 0 : g.viewId;
|
|
175
175
|
(!S(m) || !s.has(m)) && n.push({
|
|
176
176
|
path: `codegenSummary.filterContracts.${a}.bindings.${f}.viewId`,
|
|
177
177
|
message: `codegenSummary.filterContracts.${a}.bindings.${f}.viewId must reference a generated view.`,
|
|
178
178
|
repairHint: "Regenerate the generated contract from a valid planner output."
|
|
179
179
|
});
|
|
180
|
-
const
|
|
181
|
-
S(
|
|
180
|
+
const y = h(g == null ? void 0 : g.fieldRef);
|
|
181
|
+
S(y == null ? void 0 : y.name) || n.push({
|
|
182
182
|
path: `codegenSummary.filterContracts.${a}.bindings.${f}.fieldRef`,
|
|
183
183
|
message: `codegenSummary.filterContracts.${a}.bindings.${f}.fieldRef is required.`,
|
|
184
184
|
repairHint: "Regenerate the generated contract from a valid planner output."
|
|
@@ -191,38 +191,38 @@ async function ge(e) {
|
|
|
191
191
|
let n = "";
|
|
192
192
|
for (const r of t)
|
|
193
193
|
n += `${r}\0${e[r]}\0`;
|
|
194
|
-
return `sha256:${await
|
|
194
|
+
return `sha256:${await U(n)}`;
|
|
195
195
|
}
|
|
196
196
|
async function pe(e) {
|
|
197
|
-
return `sha256:${await
|
|
197
|
+
return `sha256:${await U(k(e))}`;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function k(e) {
|
|
200
200
|
if (e === null || typeof e != "object")
|
|
201
201
|
return JSON.stringify(e);
|
|
202
202
|
if (Array.isArray(e))
|
|
203
|
-
return `[${e.map((r) =>
|
|
203
|
+
return `[${e.map((r) => k(r)).join(",")}]`;
|
|
204
204
|
const t = e;
|
|
205
|
-
return `{${Object.keys(t).sort().filter((r) => t[r] !== void 0).map((r) => `${JSON.stringify(r)}:${
|
|
205
|
+
return `{${Object.keys(t).sort().filter((r) => t[r] !== void 0).map((r) => `${JSON.stringify(r)}:${k(t[r])}`).join(",")}}`;
|
|
206
206
|
}
|
|
207
|
-
async function
|
|
207
|
+
async function U(e) {
|
|
208
208
|
var r;
|
|
209
209
|
if (!((r = globalThis.crypto) != null && r.subtle))
|
|
210
210
|
throw new Error("SHA-256 digest support is required for generated contract validation.");
|
|
211
211
|
const t = new TextEncoder().encode(e), n = await globalThis.crypto.subtle.digest("SHA-256", t);
|
|
212
212
|
return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function h(e) {
|
|
215
215
|
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function V(e) {
|
|
218
218
|
return Array.isArray(e) ? e : [];
|
|
219
219
|
}
|
|
220
220
|
function S(e) {
|
|
221
221
|
return typeof e == "string" && e.length > 0;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const t = d(e), n =
|
|
225
|
-
return
|
|
223
|
+
function Ye(e) {
|
|
224
|
+
const t = d(e), n = E(t), r = [], s = [];
|
|
225
|
+
return $(t == null ? void 0 : t.views).filter((o) => {
|
|
226
226
|
var i;
|
|
227
227
|
const a = d((i = d(o)) == null ? void 0 : i.sdkSpec);
|
|
228
228
|
return !!(a != null && a.builder && (a != null && a.spec));
|
|
@@ -247,14 +247,14 @@ function le(e, t) {
|
|
|
247
247
|
const n = d(e), r = d(n == null ? void 0 : n.sdkSpec), s = d(r == null ? void 0 : r.spec);
|
|
248
248
|
if (!n || !(r != null && r.builder) || !s)
|
|
249
249
|
return null;
|
|
250
|
-
const o = me(t) ? t :
|
|
250
|
+
const o = me(t) ? t : E(d(t)), a = Ne(r.builder), i = d(A(s, o)) || {}, c = he({
|
|
251
251
|
view: n,
|
|
252
252
|
builder: a,
|
|
253
253
|
rawSpec: s,
|
|
254
254
|
spec: {
|
|
255
255
|
...i,
|
|
256
256
|
id: n.id,
|
|
257
|
-
label:
|
|
257
|
+
label: Ve(n, s)
|
|
258
258
|
},
|
|
259
259
|
context: o
|
|
260
260
|
});
|
|
@@ -292,7 +292,7 @@ function le(e, t) {
|
|
|
292
292
|
}
|
|
293
293
|
return null;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function We({
|
|
296
296
|
input: e,
|
|
297
297
|
filterContract: t,
|
|
298
298
|
codegenSummary: n
|
|
@@ -300,12 +300,12 @@ function Ye({
|
|
|
300
300
|
const r = d(e), s = d(t), o = d(r == null ? void 0 : r.optionQuery) || d(s == null ? void 0 : s.optionQuery);
|
|
301
301
|
if (!r || !o)
|
|
302
302
|
return null;
|
|
303
|
-
const a =
|
|
303
|
+
const a = E(d(n)), i = d(o.spec), c = ye(o, i, a), u = o.valueFieldRef || o.valueField || (i == null ? void 0 : i.valueField), f = o.labelFieldRef || o.labelField || (i == null ? void 0 : i.labelField);
|
|
304
304
|
if (!c || !u || !f)
|
|
305
305
|
return null;
|
|
306
306
|
const m = {
|
|
307
307
|
...d(
|
|
308
|
-
|
|
308
|
+
A(i || {}, a)
|
|
309
309
|
) || {},
|
|
310
310
|
id: o.id || (i == null ? void 0 : i.id) || `${r.id}-options`,
|
|
311
311
|
inputId: r.id,
|
|
@@ -318,20 +318,20 @@ function Ye({
|
|
|
318
318
|
};
|
|
319
319
|
try {
|
|
320
320
|
return ee(
|
|
321
|
-
|
|
321
|
+
A(m, a)
|
|
322
322
|
);
|
|
323
323
|
} catch {
|
|
324
324
|
return null;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Qe({
|
|
328
328
|
input: e,
|
|
329
329
|
filterContract: t,
|
|
330
330
|
binding: n,
|
|
331
331
|
option: r,
|
|
332
332
|
codegenSummary: s
|
|
333
333
|
}) {
|
|
334
|
-
const o =
|
|
334
|
+
const o = E(d(s)), a = d(e), i = d(t), c = d(n), u = A(
|
|
335
335
|
(c == null ? void 0 : c.fieldRef) || (i == null ? void 0 : i.fieldRef) || (a == null ? void 0 : a.fieldRef),
|
|
336
336
|
o
|
|
337
337
|
), f = String(
|
|
@@ -347,10 +347,10 @@ function We({
|
|
|
347
347
|
...g ? { relationshipHint: g } : {}
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function E(e) {
|
|
351
351
|
return {
|
|
352
352
|
sourcesByKey: new Map(
|
|
353
|
-
|
|
353
|
+
$(e == null ? void 0 : e.sources).map(d).filter(xe).filter((t) => typeof t.sourceKey == "string").map((t) => [String(t.sourceKey), J(t)])
|
|
354
354
|
)
|
|
355
355
|
};
|
|
356
356
|
}
|
|
@@ -358,7 +358,7 @@ function me(e) {
|
|
|
358
358
|
var t;
|
|
359
359
|
return e instanceof Object && ((t = d(e)) == null ? void 0 : t.sourcesByKey) instanceof Map;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function ye(e, t, n) {
|
|
362
362
|
if (typeof e.sourceKey == "string")
|
|
363
363
|
return n.sourcesByKey.get(e.sourceKey) || { sourceKey: e.sourceKey };
|
|
364
364
|
if (e.source)
|
|
@@ -368,7 +368,7 @@ function he(e, t, n) {
|
|
|
368
368
|
if (typeof (t == null ? void 0 : t.sourceKey) == "string")
|
|
369
369
|
return n.sourcesByKey.get(t.sourceKey) || { sourceKey: t.sourceKey };
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function he({
|
|
372
372
|
view: e,
|
|
373
373
|
builder: t,
|
|
374
374
|
rawSpec: n,
|
|
@@ -382,11 +382,11 @@ function ye({
|
|
|
382
382
|
if (!o)
|
|
383
383
|
return r;
|
|
384
384
|
const a = { ...r };
|
|
385
|
-
if (
|
|
385
|
+
if (Ee(o) === "server" && (a.pagination = {
|
|
386
386
|
page: 1,
|
|
387
387
|
pageSize: Se({ tableBehavior: o, spec: r })
|
|
388
|
-
}), t === "records" &&
|
|
389
|
-
const c =
|
|
388
|
+
}), t === "records" && Ce(o) === "server") {
|
|
389
|
+
const c = _e({
|
|
390
390
|
view: e,
|
|
391
391
|
rawSpec: n,
|
|
392
392
|
tableBehavior: o,
|
|
@@ -401,9 +401,9 @@ function Se({
|
|
|
401
401
|
spec: t
|
|
402
402
|
}) {
|
|
403
403
|
const n = d(e.pagination), r = d(t.pagination);
|
|
404
|
-
return
|
|
404
|
+
return N(n == null ? void 0 : n.pageSize) || N(r == null ? void 0 : r.pageSize) || N(t.limit) || 100;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function _e({
|
|
407
407
|
view: e,
|
|
408
408
|
rawSpec: t,
|
|
409
409
|
tableBehavior: n,
|
|
@@ -412,12 +412,12 @@ function Ae({
|
|
|
412
412
|
const s = d(n.sorting), o = p(s == null ? void 0 : s.defaultField);
|
|
413
413
|
if (!o)
|
|
414
414
|
return;
|
|
415
|
-
const i =
|
|
415
|
+
const i = Ae({
|
|
416
416
|
view: e,
|
|
417
417
|
rawSpec: t,
|
|
418
418
|
context: r
|
|
419
419
|
}).filter(
|
|
420
|
-
(c) =>
|
|
420
|
+
(c) => we(c.lookup).includes(o)
|
|
421
421
|
);
|
|
422
422
|
if (i.length === 1)
|
|
423
423
|
return {
|
|
@@ -425,55 +425,55 @@ function Ae({
|
|
|
425
425
|
direction: (s == null ? void 0 : s.defaultDirection) === "desc" ? "desc" : "asc"
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Ae({
|
|
429
429
|
view: e,
|
|
430
430
|
rawSpec: t,
|
|
431
431
|
context: n
|
|
432
432
|
}) {
|
|
433
433
|
var s;
|
|
434
434
|
const r = [];
|
|
435
|
-
for (const o of
|
|
436
|
-
|
|
437
|
-
for (const o of
|
|
438
|
-
|
|
435
|
+
for (const o of $(t.fields)) R(r, o, n);
|
|
436
|
+
R(r, t.dateField, n), R(r, (s = d(t.orderBy)) == null ? void 0 : s.field, n);
|
|
437
|
+
for (const o of $(e.fields))
|
|
438
|
+
R(r, o, n);
|
|
439
439
|
return Fe(
|
|
440
440
|
r,
|
|
441
|
-
(o) =>
|
|
441
|
+
(o) => ve(o.lookup)
|
|
442
442
|
);
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function R(e, t, n) {
|
|
445
445
|
const r = d(t);
|
|
446
446
|
if (typeof (r == null ? void 0 : r.name) != "string" || r.name.length === 0)
|
|
447
447
|
return;
|
|
448
|
-
const s = d(
|
|
448
|
+
const s = d(A(r, n)) || r;
|
|
449
449
|
e.push({
|
|
450
450
|
lookup: r,
|
|
451
451
|
field: s
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function we(e) {
|
|
455
455
|
return Ke([
|
|
456
456
|
p(e.name),
|
|
457
|
-
|
|
457
|
+
z(e),
|
|
458
458
|
Ie(e)
|
|
459
459
|
]);
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function ve(e) {
|
|
462
462
|
return [
|
|
463
|
-
|
|
463
|
+
z(e),
|
|
464
464
|
p(e.name),
|
|
465
465
|
p(e.role),
|
|
466
466
|
p(e.aggregate)
|
|
467
467
|
].join("|");
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function z(e) {
|
|
470
470
|
return [
|
|
471
|
-
p(e.sourceKey) ||
|
|
471
|
+
p(e.sourceKey) || $e(e.source),
|
|
472
472
|
p(e.name),
|
|
473
473
|
p(e.aggregate)
|
|
474
474
|
].filter(Boolean).join(":");
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function $e(e) {
|
|
477
477
|
const t = d(e);
|
|
478
478
|
if (!t)
|
|
479
479
|
return "";
|
|
@@ -503,36 +503,36 @@ function Oe(e) {
|
|
|
503
503
|
const t = String(e).split(":");
|
|
504
504
|
return t[t.length - 1] || String(e);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Ee(e) {
|
|
507
507
|
var t;
|
|
508
508
|
return p((t = d(e.pagination)) == null ? void 0 : t.mode);
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Ce(e) {
|
|
511
511
|
var t;
|
|
512
512
|
return p((t = d(e.sorting)) == null ? void 0 : t.mode);
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function A(e, t) {
|
|
515
515
|
if (!e || typeof e != "object")
|
|
516
516
|
return e;
|
|
517
517
|
if (Array.isArray(e))
|
|
518
|
-
return e.map((s) =>
|
|
518
|
+
return e.map((s) => A(s, t));
|
|
519
519
|
const n = e;
|
|
520
520
|
if (typeof n.sourceKey == "string" && typeof n.kind == "string" && (typeof n.datasetName == "string" || typeof n.datasetId == "string"))
|
|
521
|
-
return
|
|
521
|
+
return J(n);
|
|
522
522
|
const r = {};
|
|
523
523
|
for (const [s, o] of Object.entries(n))
|
|
524
|
-
s !== "sourceKey" && (r[s] =
|
|
524
|
+
s !== "sourceKey" && (r[s] = A(o, t));
|
|
525
525
|
if (typeof n.sourceKey == "string") {
|
|
526
526
|
const s = t.sourcesByKey.get(n.sourceKey);
|
|
527
527
|
s && !r.source && (r.source = s);
|
|
528
528
|
}
|
|
529
529
|
return r;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function J(e) {
|
|
532
532
|
const { sourceKey: t, ...n } = e;
|
|
533
533
|
return n;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Ve(e, t) {
|
|
536
536
|
const n = d(e.visualSpec);
|
|
537
537
|
return (n == null ? void 0 : n.title) || e.title || t.label;
|
|
538
538
|
}
|
|
@@ -543,7 +543,7 @@ function Ne(e) {
|
|
|
543
543
|
function He(e) {
|
|
544
544
|
if (e != null && e.relationshipHint)
|
|
545
545
|
return e.relationshipHint;
|
|
546
|
-
const t =
|
|
546
|
+
const t = $(e == null ? void 0 : e.relationshipsUsed).map((n) => {
|
|
547
547
|
var r;
|
|
548
548
|
return (r = d(n)) == null ? void 0 : r.id;
|
|
549
549
|
}).filter((n) => typeof n == "string" && n.length > 0);
|
|
@@ -552,7 +552,7 @@ function He(e) {
|
|
|
552
552
|
function ke(e, t) {
|
|
553
553
|
return e === "in" || e === "not_in" ? [t] : e === "between" ? Array.isArray(t) ? t : [t, t] : t;
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function N(e) {
|
|
556
556
|
return typeof e == "number" && Number.isFinite(e) ? e : void 0;
|
|
557
557
|
}
|
|
558
558
|
function p(e) {
|
|
@@ -578,23 +578,29 @@ function je(e) {
|
|
|
578
578
|
function d(e) {
|
|
579
579
|
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function $(e) {
|
|
582
582
|
return Array.isArray(e) ? e : [];
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function xe(e) {
|
|
585
585
|
return e !== void 0;
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const Me = /* @__PURE__ */ new Set([
|
|
588
588
|
"diagnostic_fix",
|
|
589
589
|
"fix_diagnostics",
|
|
590
590
|
"fix_inspector_warnings",
|
|
591
591
|
"fix_runtime_warnings",
|
|
592
592
|
"fix_warnings"
|
|
593
|
-
]),
|
|
593
|
+
]), De = /* @__PURE__ */ new Set([
|
|
594
|
+
"add",
|
|
595
|
+
"edit",
|
|
596
|
+
"mixed",
|
|
597
|
+
"remove"
|
|
598
|
+
]), D = /* @__PURE__ */ new Set([
|
|
594
599
|
"fields",
|
|
600
|
+
"metricBindingKeys",
|
|
595
601
|
"sdkSpec"
|
|
596
602
|
]);
|
|
597
|
-
function
|
|
603
|
+
function Xe({
|
|
598
604
|
beforeSummary: e,
|
|
599
605
|
afterSummary: t,
|
|
600
606
|
migrationReport: n,
|
|
@@ -602,8 +608,21 @@ function Qe({
|
|
|
602
608
|
constraints: s,
|
|
603
609
|
preferences: o
|
|
604
610
|
}) {
|
|
605
|
-
const a = l(r), i = typeof (a == null ? void 0 : a.kind) == "string" ? a.kind.trim() : "
|
|
606
|
-
return
|
|
611
|
+
const a = l(r), i = typeof (a == null ? void 0 : a.kind) == "string" ? a.kind.trim() : "";
|
|
612
|
+
return De.has(i) ? {
|
|
613
|
+
ok: !1,
|
|
614
|
+
policy: {
|
|
615
|
+
kind: i,
|
|
616
|
+
mode: "invalid_operation_kind",
|
|
617
|
+
reason: "Retired Data App operation aliases are not accepted. Use the hard-migrated analytics/layout/style operationIntent kinds."
|
|
618
|
+
},
|
|
619
|
+
violations: [
|
|
620
|
+
{
|
|
621
|
+
path: "operationIntent.kind",
|
|
622
|
+
reason: "Use analytics_add, analytics_edit, analytics_remove, input_add, input_edit, layout_only, style_only, runtime_debug, semantic_model_repair, save_or_publish, or greenfield_create."
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
} : T(o) ? {
|
|
607
626
|
ok: !1,
|
|
608
627
|
policy: {
|
|
609
628
|
kind: i,
|
|
@@ -616,7 +635,7 @@ function Qe({
|
|
|
616
635
|
reason: "preferences is retired. Move measureAggregateOverrides to operationIntent.measureAggregateOverrides for update calls."
|
|
617
636
|
}
|
|
618
637
|
]
|
|
619
|
-
} :
|
|
638
|
+
} : T(s) ? {
|
|
620
639
|
ok: !1,
|
|
621
640
|
policy: {
|
|
622
641
|
kind: i,
|
|
@@ -629,22 +648,22 @@ function Qe({
|
|
|
629
648
|
reason: "Move measureAggregateOverrides to operationIntent.measureAggregateOverrides for update calls."
|
|
630
649
|
}
|
|
631
650
|
]
|
|
632
|
-
} :
|
|
651
|
+
} : Me.has(i) ? B({
|
|
633
652
|
beforeSummary: e,
|
|
634
653
|
afterSummary: t,
|
|
635
654
|
migrationReport: n,
|
|
636
655
|
operationIntent: a,
|
|
637
656
|
mode: "diagnostic_warning_fix",
|
|
638
|
-
allowedViewChangeReasons:
|
|
657
|
+
allowedViewChangeReasons: D,
|
|
639
658
|
label: "Diagnostic warning fixes",
|
|
640
659
|
reason: "Diagnostic warning fixes are preserve-by-default and may not add/remove views, inputs, or filter contracts."
|
|
641
|
-
}) : i === "
|
|
660
|
+
}) : i === "analytics_edit" && Array.isArray(a == null ? void 0 : a.measureAggregateOverrides) && a.measureAggregateOverrides.length > 0 ? B({
|
|
642
661
|
beforeSummary: e,
|
|
643
662
|
afterSummary: t,
|
|
644
663
|
migrationReport: n,
|
|
645
664
|
operationIntent: a,
|
|
646
665
|
mode: "metric_aggregate_override_edit",
|
|
647
|
-
allowedViewChangeReasons:
|
|
666
|
+
allowedViewChangeReasons: D,
|
|
648
667
|
label: "Metric aggregate override edits",
|
|
649
668
|
reason: "Metric aggregate override edits are preserve-by-default and may only adjust fields/sdkSpec on targeted views."
|
|
650
669
|
}) : {
|
|
@@ -657,11 +676,11 @@ function Qe({
|
|
|
657
676
|
violations: []
|
|
658
677
|
};
|
|
659
678
|
}
|
|
660
|
-
function
|
|
679
|
+
function T(e) {
|
|
661
680
|
var t;
|
|
662
681
|
return Array.isArray((t = l(e)) == null ? void 0 : t.measureAggregateOverrides);
|
|
663
682
|
}
|
|
664
|
-
function
|
|
683
|
+
function B({
|
|
665
684
|
beforeSummary: e,
|
|
666
685
|
afterSummary: t,
|
|
667
686
|
migrationReport: n,
|
|
@@ -671,47 +690,47 @@ function G({
|
|
|
671
690
|
label: a,
|
|
672
691
|
reason: i
|
|
673
692
|
}) {
|
|
674
|
-
const c = [], u =
|
|
693
|
+
const c = [], u = Be(r == null ? void 0 : r.targetViewIds), f = l(n) || {};
|
|
675
694
|
u.size === 0 && c.push({
|
|
676
695
|
path: "operationIntent.targetViewIds",
|
|
677
696
|
reason: `${a} must declare targetViewIds so the update cannot broaden to unrelated views.`
|
|
678
|
-
}),
|
|
697
|
+
}), H({
|
|
679
698
|
bucket: l(f.views),
|
|
680
699
|
label: "views",
|
|
681
700
|
operationLabel: a,
|
|
682
701
|
violations: c
|
|
683
|
-
}),
|
|
702
|
+
}), H({
|
|
684
703
|
bucket: l(f.inputs),
|
|
685
704
|
label: "inputs",
|
|
686
705
|
operationLabel: a,
|
|
687
706
|
violations: c
|
|
688
|
-
}),
|
|
707
|
+
}), q({
|
|
689
708
|
bucket: l(f.inputs),
|
|
690
709
|
label: "inputs",
|
|
691
710
|
operationLabel: a,
|
|
692
711
|
violations: c
|
|
693
|
-
}),
|
|
712
|
+
}), H({
|
|
694
713
|
bucket: l(f.filterContracts),
|
|
695
714
|
label: "filterContracts",
|
|
696
715
|
operationLabel: a,
|
|
697
716
|
violations: c
|
|
698
|
-
}),
|
|
717
|
+
}), q({
|
|
699
718
|
bucket: l(f.filterContracts),
|
|
700
719
|
label: "filterContracts",
|
|
701
720
|
operationLabel: a,
|
|
702
721
|
violations: c
|
|
703
722
|
});
|
|
704
723
|
for (const m of Y(l(f.views))) {
|
|
705
|
-
u.size > 0 && !u.has(
|
|
706
|
-
path: `views.${
|
|
724
|
+
u.size > 0 && !u.has(_(m.id)) && c.push({
|
|
725
|
+
path: `views.${_(m.id) || "<unknown>"}`,
|
|
707
726
|
reason: `${a} may only change explicitly targeted views.`
|
|
708
727
|
});
|
|
709
|
-
const
|
|
710
|
-
(
|
|
728
|
+
const y = Array.isArray(m.reasons) ? m.reasons.filter(
|
|
729
|
+
(v) => typeof v != "string" || !o.has(v)
|
|
711
730
|
) : [];
|
|
712
|
-
|
|
713
|
-
path: `views.${
|
|
714
|
-
reason: `${a} may only adjust fields/sdkSpec; changed ${
|
|
731
|
+
y.length > 0 && c.push({
|
|
732
|
+
path: `views.${_(m.id) || "<unknown>"}`,
|
|
733
|
+
reason: `${a} may only adjust fields/sdkSpec/metricBindingKeys; changed ${y.join(", ")}.`
|
|
715
734
|
});
|
|
716
735
|
}
|
|
717
736
|
const g = Te({
|
|
@@ -723,7 +742,7 @@ function G({
|
|
|
723
742
|
return g && c.push(g), {
|
|
724
743
|
ok: c.length === 0,
|
|
725
744
|
policy: {
|
|
726
|
-
kind:
|
|
745
|
+
kind: _(r == null ? void 0 : r.kind) || "diagnostic_fix",
|
|
727
746
|
mode: s,
|
|
728
747
|
allowedViewChangeReasons: Array.from(o).sort(),
|
|
729
748
|
targetViewIds: Array.from(u).sort(),
|
|
@@ -744,30 +763,30 @@ function Te({
|
|
|
744
763
|
path: "codegenSummary",
|
|
745
764
|
reason: `${r} require before/after codegen summaries for full-scope verification.`
|
|
746
765
|
};
|
|
747
|
-
const a =
|
|
766
|
+
const a = G(s), i = G(o), c = P(s.views), u = P(o.views), f = Array.isArray(a.views) ? a.views : [];
|
|
748
767
|
a.views = f;
|
|
749
768
|
for (const g of n) {
|
|
750
|
-
const m = c.get(g),
|
|
751
|
-
if (!m || !
|
|
769
|
+
const m = c.get(g), y = u.get(g);
|
|
770
|
+
if (!m || !y)
|
|
752
771
|
continue;
|
|
753
|
-
const
|
|
772
|
+
const v = f.find(
|
|
754
773
|
(W) => {
|
|
755
774
|
var K;
|
|
756
775
|
return ((K = l(W)) == null ? void 0 : K.id) === g;
|
|
757
776
|
}
|
|
758
|
-
),
|
|
759
|
-
if (
|
|
777
|
+
), I = l(y);
|
|
778
|
+
if (!v || !I)
|
|
760
779
|
continue;
|
|
761
|
-
const
|
|
762
|
-
|
|
780
|
+
const C = v;
|
|
781
|
+
C.fields = b(I.fields), C.metricBindingKeys = b(I.metricBindingKeys), C.sdkSpec = b(I.sdkSpec);
|
|
763
782
|
}
|
|
764
|
-
return
|
|
783
|
+
return O(a) === O(i) ? null : {
|
|
765
784
|
path: "codegenSummary",
|
|
766
|
-
reason: `${r} may only change fields/sdkSpec on targetViewIds; another generated contract section changed.`
|
|
785
|
+
reason: `${r} may only change fields/sdkSpec/metricBindingKeys on targetViewIds; another generated contract section changed.`
|
|
767
786
|
};
|
|
768
787
|
}
|
|
769
|
-
function
|
|
770
|
-
const t =
|
|
788
|
+
function G(e) {
|
|
789
|
+
const t = b(e);
|
|
771
790
|
for (const n of [
|
|
772
791
|
"implementationChecklist",
|
|
773
792
|
"assumptions",
|
|
@@ -778,24 +797,24 @@ function q(e) {
|
|
|
778
797
|
delete t[n];
|
|
779
798
|
return qe(t.unsupportedInsights) && delete t.unsupportedInsights, t;
|
|
780
799
|
}
|
|
781
|
-
function
|
|
800
|
+
function H({
|
|
782
801
|
bucket: e,
|
|
783
802
|
label: t,
|
|
784
803
|
operationLabel: n,
|
|
785
804
|
violations: r
|
|
786
805
|
}) {
|
|
787
|
-
for (const s of
|
|
806
|
+
for (const s of F(e == null ? void 0 : e.added))
|
|
788
807
|
r.push({
|
|
789
|
-
path: `${t}.${
|
|
808
|
+
path: `${t}.${_(s.id) || "<unknown>"}`,
|
|
790
809
|
reason: `${n} may not add ${t}.`
|
|
791
810
|
});
|
|
792
|
-
for (const s of
|
|
811
|
+
for (const s of F(e == null ? void 0 : e.removed))
|
|
793
812
|
r.push({
|
|
794
|
-
path: `${t}.${
|
|
813
|
+
path: `${t}.${_(s.id) || "<unknown>"}`,
|
|
795
814
|
reason: `${n} may not remove ${t}.`
|
|
796
815
|
});
|
|
797
816
|
}
|
|
798
|
-
function
|
|
817
|
+
function q({
|
|
799
818
|
bucket: e,
|
|
800
819
|
label: t,
|
|
801
820
|
operationLabel: n,
|
|
@@ -803,17 +822,17 @@ function B({
|
|
|
803
822
|
}) {
|
|
804
823
|
for (const s of Y(e))
|
|
805
824
|
r.push({
|
|
806
|
-
path: `${t}.${
|
|
825
|
+
path: `${t}.${_(s.id) || "<unknown>"}`,
|
|
807
826
|
reason: `${n} may not change ${t}.`
|
|
808
827
|
});
|
|
809
828
|
}
|
|
810
829
|
function Y(e) {
|
|
811
|
-
return
|
|
830
|
+
return F(e == null ? void 0 : e.changed);
|
|
812
831
|
}
|
|
813
|
-
function
|
|
832
|
+
function F(e) {
|
|
814
833
|
return Array.isArray(e) ? e.map(l).filter(Ge) : [];
|
|
815
834
|
}
|
|
816
|
-
function
|
|
835
|
+
function Be(e) {
|
|
817
836
|
return Array.isArray(e) ? new Set(
|
|
818
837
|
e.filter((t) => typeof t == "string" && t.trim().length > 0).map((t) => t.trim())
|
|
819
838
|
) : /* @__PURE__ */ new Set();
|
|
@@ -827,16 +846,16 @@ function P(e) {
|
|
|
827
846
|
}
|
|
828
847
|
return t;
|
|
829
848
|
}
|
|
830
|
-
function
|
|
849
|
+
function b(e) {
|
|
831
850
|
return e === void 0 ? e : JSON.parse(JSON.stringify(e));
|
|
832
851
|
}
|
|
833
|
-
function
|
|
852
|
+
function O(e) {
|
|
834
853
|
if (e === null || typeof e != "object")
|
|
835
854
|
return JSON.stringify(e);
|
|
836
855
|
if (Array.isArray(e))
|
|
837
|
-
return `[${e.map((n) =>
|
|
856
|
+
return `[${e.map((n) => O(n)).join(",")}]`;
|
|
838
857
|
const t = e;
|
|
839
|
-
return `{${Object.keys(t).sort().filter((n) => t[n] !== void 0).map((n) => `${JSON.stringify(n)}:${
|
|
858
|
+
return `{${Object.keys(t).sort().filter((n) => t[n] !== void 0).map((n) => `${JSON.stringify(n)}:${O(t[n])}`).join(",")}}`;
|
|
840
859
|
}
|
|
841
860
|
function l(e) {
|
|
842
861
|
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
@@ -847,22 +866,22 @@ function Ge(e) {
|
|
|
847
866
|
function qe(e) {
|
|
848
867
|
return Array.isArray(e) && e.length === 0;
|
|
849
868
|
}
|
|
850
|
-
function
|
|
869
|
+
function _(e) {
|
|
851
870
|
return typeof e == "string" ? e : "";
|
|
852
871
|
}
|
|
853
872
|
export {
|
|
854
|
-
|
|
855
|
-
|
|
873
|
+
Ue as C,
|
|
874
|
+
x as G,
|
|
856
875
|
de as R,
|
|
857
876
|
j as a,
|
|
858
|
-
|
|
877
|
+
M as b,
|
|
859
878
|
ze as c,
|
|
860
879
|
Je as d,
|
|
861
880
|
ce as e,
|
|
862
|
-
|
|
863
|
-
|
|
881
|
+
Qe as f,
|
|
882
|
+
We as g,
|
|
864
883
|
le as h,
|
|
865
|
-
|
|
866
|
-
|
|
884
|
+
Ye as i,
|
|
885
|
+
Xe as j,
|
|
867
886
|
L as v
|
|
868
887
|
};
|