react-semaphor 0.1.498 → 0.1.499
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-C8eAX-JN.js → dashboard-briefing-launcher-Bp6SBVb6.js} +9 -9
- package/dist/chunks/{dashboard-briefing-launcher-BEmyxEd8.cjs → dashboard-briefing-launcher-Dtzn9Tqg.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-YvJe7cPL.cjs → dashboard-controls-CLw5VQ2x.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-C_v7sbq4.js → dashboard-controls-DDI3atQf.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-CSp5bXIV.cjs → dashboard-json-BnT6W7Lt.cjs} +1 -1
- package/dist/chunks/{dashboard-json-BaT3Yy8x.js → dashboard-json-rHLrTBbN.js} +7 -7
- package/dist/chunks/{edit-dashboard-visual-GWiW0jjy.js → edit-dashboard-visual-BH2LkjHV.js} +6858 -6893
- package/dist/chunks/edit-dashboard-visual-DqAMe8XW.cjs +172 -0
- package/dist/chunks/{editor-action-buttons-BSC0nwgV.cjs → editor-action-buttons-Boq8MLya.cjs} +1 -1
- package/dist/chunks/{editor-action-buttons-CfZITZwQ.js → editor-action-buttons-DUEK2-kM.js} +6 -6
- 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-DjbQVfS6.js → index-CEm8bwwd.js} +26924 -26927
- package/dist/chunks/{index-DhBGtRkR.cjs → index-Gos2ij10.cjs} +219 -219
- 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-B8DdDM7q.js → report-preferences-dialog-8nfXNWvl.js} +6 -6
- package/dist/chunks/{report-preferences-dialog-BcaEOgn2.cjs → report-preferences-dialog-CW59SyVZ.cjs} +1 -1
- 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/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
package/dist/chunks/{matrix-operation-contract-BFumahBa.js → matrix-operation-contract-CPgckXxm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as r } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { K as g, E as W, U as N, ba as V, S as v, M as be, b2 as J, bb as ve, aL as $e, F as Se, m as we, l as ke, b0 as Ie, aQ as Ae, aR as _e, aU as Re, aV as qe, aE as C, aJ as D, ax as Ce, aO as je, aP as X, av as Ee, at as m, au as xe, aK as Fe } from "./validators-CHlnnHuS.js";
|
|
3
3
|
const T = {
|
|
4
4
|
answerSummary: "string",
|
|
5
5
|
responseDetail: "responseDetail",
|
|
@@ -78,7 +78,7 @@ const Ne = r.object({
|
|
|
78
78
|
for (const t of ["rows", "columns"])
|
|
79
79
|
for (const n of e[t].pageIds)
|
|
80
80
|
i.pages.some(
|
|
81
|
-
(
|
|
81
|
+
(o) => o.id === n && o.axis === t
|
|
82
82
|
) || c(
|
|
83
83
|
s,
|
|
84
84
|
["blocks", e.id, t],
|
|
@@ -100,10 +100,10 @@ const Ne = r.object({
|
|
|
100
100
|
"Cannot request children of a leaf or empty axis."
|
|
101
101
|
);
|
|
102
102
|
for (const t of s.blocks) {
|
|
103
|
-
t.measureIds.some((n) => !i.measures.some((
|
|
103
|
+
t.measureIds.some((n) => !i.measures.some((o) => o.id === n)) && c(e, ["blocks", t.id], "Unknown block measure.");
|
|
104
104
|
for (const n of ["rows", "columns"])
|
|
105
|
-
for (const
|
|
106
|
-
V(i, n,
|
|
105
|
+
for (const o of t[n].paths)
|
|
106
|
+
V(i, n, o, e, ["blocks", t.id, n]);
|
|
107
107
|
}
|
|
108
108
|
}), Be = r.object({
|
|
109
109
|
requestId: p,
|
|
@@ -148,7 +148,7 @@ const Ne = r.object({
|
|
|
148
148
|
}).strict().superRefine((i, s) => {
|
|
149
149
|
const e = i.coverage.rowPaths.map(v), t = i.coverage.columnPaths.map(v);
|
|
150
150
|
y(e, s, ["coverage", "rowPaths"]), y(t, s, ["coverage", "columnPaths"]), y(i.coverage.measureIds, s, ["coverage", "measureIds"]);
|
|
151
|
-
const n = new Set(e),
|
|
151
|
+
const n = new Set(e), o = new Set(t), d = new Set(i.coverage.measureIds);
|
|
152
152
|
y(
|
|
153
153
|
i.cells.map(
|
|
154
154
|
(u) => JSON.stringify([
|
|
@@ -161,7 +161,7 @@ const Ne = r.object({
|
|
|
161
161
|
["cells"]
|
|
162
162
|
);
|
|
163
163
|
for (const u of i.cells)
|
|
164
|
-
(!n.has(v(u.rowPath)) || !
|
|
164
|
+
(!n.has(v(u.rowPath)) || !o.has(v(u.columnPath)) || !d.has(u.measureId)) && c(s, ["cells"], "Cell is outside certified coverage.");
|
|
165
165
|
}), z = r.object({
|
|
166
166
|
id: k,
|
|
167
167
|
column: $e,
|
|
@@ -201,45 +201,45 @@ const Ne = r.object({
|
|
|
201
201
|
failures: r.array(M).readonly()
|
|
202
202
|
}).strict().superRefine((i, s) => {
|
|
203
203
|
const e = new Set(
|
|
204
|
-
i.descriptors.levels.map((
|
|
204
|
+
i.descriptors.levels.map((o) => o.id)
|
|
205
205
|
), t = new Set(
|
|
206
|
-
i.descriptors.measures.map((
|
|
207
|
-
), n = i.pages.flatMap((
|
|
208
|
-
|
|
209
|
-
...
|
|
206
|
+
i.descriptors.measures.map((o) => o.id)
|
|
207
|
+
), n = i.pages.flatMap((o) => [
|
|
208
|
+
o.parent,
|
|
209
|
+
...o.members.map((d) => d.path)
|
|
210
210
|
]);
|
|
211
|
-
for (const
|
|
212
|
-
n.push(...
|
|
211
|
+
for (const o of i.blocks)
|
|
212
|
+
n.push(...o.coverage.rowPaths, ...o.coverage.columnPaths), o.coverage.measureIds.some((d) => !t.has(d)) && c(
|
|
213
213
|
s,
|
|
214
|
-
["blocks",
|
|
214
|
+
["blocks", o.requestId],
|
|
215
215
|
"Coverage references an unknown measure descriptor."
|
|
216
216
|
);
|
|
217
|
-
n.some((
|
|
217
|
+
n.some((o) => o.some((d) => !e.has(d.levelId))) && c(s, ["descriptors"], "Acquired paths require level descriptors."), y(
|
|
218
218
|
[...i.descriptors.levels, ...i.descriptors.measures].map(
|
|
219
|
-
(
|
|
219
|
+
(o) => o.id
|
|
220
220
|
),
|
|
221
221
|
s,
|
|
222
222
|
["descriptors"]
|
|
223
223
|
), y(
|
|
224
|
-
[...i.pages, ...i.blocks].map((
|
|
224
|
+
[...i.pages, ...i.blocks].map((o) => o.requestId),
|
|
225
225
|
s,
|
|
226
226
|
[]
|
|
227
227
|
), y(
|
|
228
228
|
i.failures.map(
|
|
229
|
-
(
|
|
229
|
+
(o) => o.scope.kind === "operation" ? "operation" : o.scope.requestId
|
|
230
230
|
),
|
|
231
231
|
s,
|
|
232
232
|
["failures"]
|
|
233
233
|
);
|
|
234
|
-
for (const
|
|
235
|
-
if (
|
|
234
|
+
for (const o of i.failures)
|
|
235
|
+
if (o.scope.kind === "operation")
|
|
236
236
|
c(
|
|
237
237
|
s,
|
|
238
238
|
["failures"],
|
|
239
239
|
"Operation failure cannot accompany acquired data."
|
|
240
240
|
);
|
|
241
241
|
else {
|
|
242
|
-
const d =
|
|
242
|
+
const d = o.scope.requestId;
|
|
243
243
|
[...i.pages, ...i.blocks].some(
|
|
244
244
|
(u) => u.requestId === d
|
|
245
245
|
) && c(
|
|
@@ -421,9 +421,9 @@ const Ne = r.object({
|
|
|
421
421
|
"unsupported_sdk_capability"
|
|
422
422
|
]);
|
|
423
423
|
function Xs(i) {
|
|
424
|
-
return
|
|
424
|
+
return oe(i).ok;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function oe(i) {
|
|
427
427
|
const s = [];
|
|
428
428
|
if (!i || typeof i != "object")
|
|
429
429
|
return { ok: !1, issues: ["Summary must be an object."] };
|
|
@@ -455,21 +455,21 @@ function Xe(i) {
|
|
|
455
455
|
const s = Array.isArray(i.unsupportedInsights) && i.unsupportedInsights.some(
|
|
456
456
|
(d) => {
|
|
457
457
|
var u;
|
|
458
|
-
return L.has((u =
|
|
458
|
+
return L.has((u = a(d)) == null ? void 0 : u.reason);
|
|
459
459
|
}
|
|
460
460
|
), e = Array.isArray(i.views) && i.views.some((d) => {
|
|
461
461
|
var l;
|
|
462
|
-
const u =
|
|
462
|
+
const u = a((l = a(d)) == null ? void 0 : l.computation);
|
|
463
463
|
return (u == null ? void 0 : u.kind) === "unsupported" && L.has(u.reason);
|
|
464
464
|
});
|
|
465
465
|
if (!s && !e)
|
|
466
466
|
return [];
|
|
467
|
-
const t = [], n =
|
|
467
|
+
const t = [], n = a(i.validation);
|
|
468
468
|
(n == null ? void 0 : n.status) !== "blocked" && t.push(
|
|
469
469
|
"validation.status must be blocked when semantic model repair gaps are present."
|
|
470
470
|
);
|
|
471
|
-
const
|
|
472
|
-
return (
|
|
471
|
+
const o = a(i.nextRequiredTool);
|
|
472
|
+
return (o == null ? void 0 : o.name) !== "semaphor_propose_semantic_model_change" && t.push(
|
|
473
473
|
"nextRequiredTool.name must be semaphor_propose_semantic_model_change when semantic model repair gaps are present."
|
|
474
474
|
), t;
|
|
475
475
|
}
|
|
@@ -478,11 +478,11 @@ const L = /* @__PURE__ */ new Set([
|
|
|
478
478
|
"raw_identifier_filter_options"
|
|
479
479
|
]);
|
|
480
480
|
function R(i, s) {
|
|
481
|
-
const e =
|
|
481
|
+
const e = a(i);
|
|
482
482
|
return e ? e.kind === "semantic" ? typeof e.domainId == "string" && e.domainId.trim() && typeof e.datasetName == "string" && e.datasetName.trim() ? [] : [`${s} must include sourceKey or a supported source identity.`] : typeof e.sourceKey == "string" && e.sourceKey.trim() ? [] : e.kind === "physical" && typeof e.tableName == "string" && e.tableName.trim() && typeof e.connectionId == "string" && e.connectionId.trim() ? [] : e.kind === "sql" && typeof e.connectionId == "string" && e.connectionId.trim() ? [] : [`${s} must include sourceKey or a supported source identity.`] : [`${s} must be an object.`];
|
|
483
483
|
}
|
|
484
484
|
function Ze(i) {
|
|
485
|
-
const s =
|
|
485
|
+
const s = a(i);
|
|
486
486
|
if (!s)
|
|
487
487
|
return ["implementationChecklist must be an object."];
|
|
488
488
|
const e = [], t = [
|
|
@@ -493,42 +493,42 @@ function Ze(i) {
|
|
|
493
493
|
"validationCommands",
|
|
494
494
|
"browserSmokeChecks"
|
|
495
495
|
];
|
|
496
|
-
for (const
|
|
497
|
-
|
|
498
|
-
const n =
|
|
496
|
+
for (const o of t)
|
|
497
|
+
o in s || e.push(`implementationChecklist.${o} is required.`);
|
|
498
|
+
const n = a(s.requiredDevtools);
|
|
499
499
|
return n ? typeof n.mountRootDevtools != "boolean" && e.push(
|
|
500
500
|
"implementationChecklist.requiredDevtools.mountRootDevtools must be a boolean."
|
|
501
501
|
) : e.push("implementationChecklist.requiredDevtools must be an object."), Array.isArray(s.requiredInputOptions) || e.push(
|
|
502
502
|
"implementationChecklist.requiredInputOptions must be an array."
|
|
503
|
-
), Array.isArray(s.filterScopeByInput) || e.push("implementationChecklist.filterScopeByInput must be an array."),
|
|
503
|
+
), Array.isArray(s.filterScopeByInput) || e.push("implementationChecklist.filterScopeByInput must be an array."), a(s.bindingsByView) || e.push("implementationChecklist.bindingsByView must be an object."), h(s.validationCommands) || e.push(
|
|
504
504
|
"implementationChecklist.validationCommands must be an array of strings."
|
|
505
505
|
), h(s.browserSmokeChecks) || e.push(
|
|
506
506
|
"implementationChecklist.browserSmokeChecks must be an array of strings."
|
|
507
507
|
), e;
|
|
508
508
|
}
|
|
509
509
|
function es(i, s) {
|
|
510
|
-
const e =
|
|
510
|
+
const e = a(i);
|
|
511
511
|
if (!e)
|
|
512
512
|
return [`${s} must be an object.`];
|
|
513
513
|
const t = [];
|
|
514
|
-
return (typeof e.id != "string" || !e.id.trim()) && t.push(`${s}.id is required.`), e.fieldRef && t.push(...f(e.fieldRef, `${s}.fieldRef`)), t.push(...ue(e.optionQuery, `${s}.optionQuery`)), h(e.appliesToViewIds) || t.push(`${s}.appliesToViewIds must be an array of strings.`), e.bindings !== void 0 && !Array.isArray(e.bindings) && t.push(`${s}.bindings must be an array.`), Array.isArray(e.bindings) && e.bindings.forEach((n,
|
|
515
|
-
const d =
|
|
514
|
+
return (typeof e.id != "string" || !e.id.trim()) && t.push(`${s}.id is required.`), e.fieldRef && t.push(...f(e.fieldRef, `${s}.fieldRef`)), t.push(...ue(e.optionQuery, `${s}.optionQuery`)), h(e.appliesToViewIds) || t.push(`${s}.appliesToViewIds must be an array of strings.`), e.bindings !== void 0 && !Array.isArray(e.bindings) && t.push(`${s}.bindings must be an array.`), Array.isArray(e.bindings) && e.bindings.forEach((n, o) => {
|
|
515
|
+
const d = a(n);
|
|
516
516
|
if (!d) {
|
|
517
|
-
t.push(`${s}.bindings.${
|
|
517
|
+
t.push(`${s}.bindings.${o} must be an object.`);
|
|
518
518
|
return;
|
|
519
519
|
}
|
|
520
520
|
h(d.appliesToViewIds) || t.push(
|
|
521
|
-
`${s}.bindings.${
|
|
521
|
+
`${s}.bindings.${o}.appliesToViewIds must be an array of strings.`
|
|
522
522
|
), t.push(
|
|
523
523
|
...f(
|
|
524
524
|
d.fieldRef,
|
|
525
|
-
`${s}.bindings.${
|
|
525
|
+
`${s}.bindings.${o}.fieldRef`
|
|
526
526
|
)
|
|
527
527
|
);
|
|
528
528
|
}), t;
|
|
529
529
|
}
|
|
530
530
|
function ss(i, s) {
|
|
531
|
-
const e =
|
|
531
|
+
const e = a(i);
|
|
532
532
|
if (!e)
|
|
533
533
|
return [`${s} must be an object.`];
|
|
534
534
|
const t = [];
|
|
@@ -549,13 +549,13 @@ function ss(i, s) {
|
|
|
549
549
|
}), w(e.queryKind) || t.push(`${s}.queryKind must be a supported codegen query kind.`), e.sdkBuilder !== void 0 && !le(e.sdkBuilder) && t.push(`${s}.sdkBuilder must be a supported SDK builder.`), e.metricBindingKeys !== void 0 && (Array.isArray(e.metricBindingKeys) ? e.metricBindingKeys.some(
|
|
550
550
|
(l) => typeof l != "string" || l.trim().length === 0
|
|
551
551
|
) && t.push(`${s}.metricBindingKeys must be an array of strings.`) : t.push(`${s}.metricBindingKeys must be an array of strings.`));
|
|
552
|
-
const n =
|
|
553
|
-
|
|
552
|
+
const n = a(e.sdkSpec), o = (n == null ? void 0 : n.builder) === "semaphor.metric";
|
|
553
|
+
o && (!Array.isArray(e.metricBindingKeys) || e.metricBindingKeys.length === 0) && t.push(`${s}.metricBindingKeys is required for metric views.`);
|
|
554
554
|
const d = ts(e);
|
|
555
|
-
|
|
555
|
+
o && Array.isArray(e.metricBindingKeys) && d && JSON.stringify(e.metricBindingKeys) !== JSON.stringify(d) && t.push(
|
|
556
556
|
`${s}.metricBindingKeys must match the generated metric field binding keys in order.`
|
|
557
557
|
);
|
|
558
|
-
const u =
|
|
558
|
+
const u = a(e.computation);
|
|
559
559
|
return (u == null ? void 0 : u.kind) === "server_query" && w(e.queryKind) && w(u.queryKind) && u.queryKind !== e.queryKind && t.push(`${s}.computation.queryKind must match queryKind.`), t.push(
|
|
560
560
|
...ps({
|
|
561
561
|
value: e.sdkSpec,
|
|
@@ -567,24 +567,24 @@ function ss(i, s) {
|
|
|
567
567
|
), t;
|
|
568
568
|
}
|
|
569
569
|
function ts(i) {
|
|
570
|
-
const s =
|
|
570
|
+
const s = a(i.sdkSpec);
|
|
571
571
|
if ((s == null ? void 0 : s.builder) !== "semaphor.metric")
|
|
572
572
|
return;
|
|
573
|
-
const e =
|
|
573
|
+
const e = a(s.spec);
|
|
574
574
|
if (!e)
|
|
575
575
|
return;
|
|
576
576
|
const n = [
|
|
577
577
|
e.primaryMeasure,
|
|
578
578
|
...Array.isArray(e.measures) ? e.measures : []
|
|
579
579
|
].map(is).filter(
|
|
580
|
-
(
|
|
580
|
+
(o) => !!o
|
|
581
581
|
);
|
|
582
582
|
return Array.from(
|
|
583
|
-
new Map(n.map((
|
|
583
|
+
new Map(n.map((o) => [o.identity, o.bindingKey])).values()
|
|
584
584
|
);
|
|
585
585
|
}
|
|
586
586
|
function is(i) {
|
|
587
|
-
const s =
|
|
587
|
+
const s = a(i);
|
|
588
588
|
if (!s || typeof s.name != "string" || !s.name.trim())
|
|
589
589
|
return;
|
|
590
590
|
const e = rs(s);
|
|
@@ -592,7 +592,7 @@ function is(i) {
|
|
|
592
592
|
identity: JSON.stringify({
|
|
593
593
|
source: e,
|
|
594
594
|
name: s.name,
|
|
595
|
-
aggregate:
|
|
595
|
+
aggregate: ae(s)
|
|
596
596
|
}),
|
|
597
597
|
bindingKey: ns(s)
|
|
598
598
|
} : void 0;
|
|
@@ -600,7 +600,7 @@ function is(i) {
|
|
|
600
600
|
function rs(i) {
|
|
601
601
|
if (typeof i.sourceKey == "string" && i.sourceKey.trim())
|
|
602
602
|
return { sourceKey: i.sourceKey };
|
|
603
|
-
const s =
|
|
603
|
+
const s = a(i.source);
|
|
604
604
|
if (s)
|
|
605
605
|
return {
|
|
606
606
|
kind: s.kind,
|
|
@@ -611,25 +611,25 @@ function rs(i) {
|
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
function ns(i) {
|
|
614
|
-
return typeof i.sourceKey == "string" && i.sourceKey.trim() ? [i.sourceKey,
|
|
614
|
+
return typeof i.sourceKey == "string" && i.sourceKey.trim() ? [i.sourceKey, ae(i), i.name].filter(Boolean).join(":") : Ie(i);
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function ae(i) {
|
|
617
617
|
return ke(i);
|
|
618
618
|
}
|
|
619
619
|
function j(i, s) {
|
|
620
620
|
var b;
|
|
621
|
-
const e =
|
|
621
|
+
const e = a((b = a(i.visualSpec)) == null ? void 0 : b.tableBehavior), t = a(i.sdkSpec), n = a(t == null ? void 0 : t.spec), o = typeof (t == null ? void 0 : t.builder) == "string" ? t.builder : void 0, d = o === "semaphor.records" ? a(n == null ? void 0 : n.totals) : void 0, u = [];
|
|
622
622
|
if (!e)
|
|
623
623
|
return d && u.push(
|
|
624
624
|
`${s}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`
|
|
625
625
|
), u;
|
|
626
|
-
const l =
|
|
627
|
-
return l ? (l.mode === "server" && (
|
|
626
|
+
const l = a(e.totals);
|
|
627
|
+
return l ? (l.mode === "server" && (o !== "semaphor.records" && u.push(
|
|
628
628
|
`${s}.visualSpec.tableBehavior.totals.mode server is only supported for semaphor.records views.`
|
|
629
629
|
), !d || d.mode !== "server" ? u.push(
|
|
630
630
|
`${s}.sdkSpec.spec.totals.mode must be server when tableBehavior.totals.mode is server.`
|
|
631
631
|
) : u.push(
|
|
632
|
-
...
|
|
632
|
+
...os({
|
|
633
633
|
left: l.measures,
|
|
634
634
|
right: d.measures,
|
|
635
635
|
leftPath: `${s}.visualSpec.tableBehavior.totals.measures`,
|
|
@@ -637,15 +637,15 @@ function j(i, s) {
|
|
|
637
637
|
})
|
|
638
638
|
)), l.mode !== "server" && d && u.push(
|
|
639
639
|
`${s}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`
|
|
640
|
-
),
|
|
640
|
+
), o === "semaphor.sql" && l.mode !== "none" && u.push(
|
|
641
641
|
`${s}.visualSpec.tableBehavior.totals.mode must be none for semaphor.sql views.`
|
|
642
|
-
),
|
|
642
|
+
), o === "semaphor.sql" && a(n == null ? void 0 : n.totals) && u.push(
|
|
643
643
|
`${s}.sdkSpec.spec.totals is not supported for semaphor.sql.`
|
|
644
644
|
), u) : (d && u.push(
|
|
645
645
|
`${s}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`
|
|
646
646
|
), u);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function os({
|
|
649
649
|
left: i,
|
|
650
650
|
right: s,
|
|
651
651
|
leftPath: e,
|
|
@@ -654,24 +654,24 @@ function as({
|
|
|
654
654
|
if (!Array.isArray(i) || !Array.isArray(s))
|
|
655
655
|
return [`${t} must match ${e}.`];
|
|
656
656
|
const n = [];
|
|
657
|
-
return i.length !== s.length ? (n.push(`${t} must match ${e}.`), n) : (i.forEach((
|
|
658
|
-
|
|
657
|
+
return i.length !== s.length ? (n.push(`${t} must match ${e}.`), n) : (i.forEach((o, d) => {
|
|
658
|
+
as(a(o), a(s[d])) || n.push(`${t}.${d} must match ${e}.${d}.`);
|
|
659
659
|
}), n);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function as(i, s) {
|
|
662
662
|
return !i || !s ? !1 : i.name === s.name && (i.role || "measure") === (s.role || "measure") && Q(i) === Q(s) && us(i, s);
|
|
663
663
|
}
|
|
664
664
|
function Q(i) {
|
|
665
665
|
return typeof i.aggregate == "string" ? i.aggregate.toUpperCase() : "SUM";
|
|
666
666
|
}
|
|
667
667
|
function us(i, s) {
|
|
668
|
-
const e =
|
|
668
|
+
const e = a(i.source), t = a(s.source);
|
|
669
669
|
if (ds(e, t))
|
|
670
670
|
return !1;
|
|
671
|
-
const n = H(i),
|
|
672
|
-
if (n.size > 0 ||
|
|
671
|
+
const n = H(i), o = H(s);
|
|
672
|
+
if (n.size > 0 || o.size > 0) {
|
|
673
673
|
for (const d of n)
|
|
674
|
-
if (
|
|
674
|
+
if (o.has(d))
|
|
675
675
|
return !0;
|
|
676
676
|
return !1;
|
|
677
677
|
}
|
|
@@ -685,7 +685,7 @@ function ds(i, s) {
|
|
|
685
685
|
}
|
|
686
686
|
function H(i) {
|
|
687
687
|
const s = typeof i.sourceKey == "string" ? i.sourceKey.trim() : "";
|
|
688
|
-
return s ? /* @__PURE__ */ new Set([s]) : ls(
|
|
688
|
+
return s ? /* @__PURE__ */ new Set([s]) : ls(a(i.source));
|
|
689
689
|
}
|
|
690
690
|
function ls(i) {
|
|
691
691
|
const s = /* @__PURE__ */ new Set();
|
|
@@ -693,25 +693,25 @@ function ls(i) {
|
|
|
693
693
|
return s;
|
|
694
694
|
const e = typeof i.sourceKey == "string" ? i.sourceKey.trim() : "";
|
|
695
695
|
if (e && s.add(e), i.kind === "semantic") {
|
|
696
|
-
const t = typeof i.domainId == "string" ? i.domainId : "", n = typeof i.datasetName == "string" ? i.datasetName : "",
|
|
697
|
-
t &&
|
|
696
|
+
const t = typeof i.domainId == "string" ? i.domainId : "", n = typeof i.datasetName == "string" ? i.datasetName : "", o = typeof i.datasetId == "string" ? i.datasetId : "";
|
|
697
|
+
t && o && s.add(`semantic:${t}:datasetId:${o}`), t && n && s.add(`semantic:${t}:datasetName:${n}`);
|
|
698
698
|
}
|
|
699
699
|
if (i.kind === "physical") {
|
|
700
|
-
const t = typeof i.connectionId == "string" ? i.connectionId : "", n = typeof i.tableName == "string" ? i.tableName : "",
|
|
700
|
+
const t = typeof i.connectionId == "string" ? i.connectionId : "", n = typeof i.tableName == "string" ? i.tableName : "", o = typeof i.databaseName == "string" ? i.databaseName : "", d = typeof i.schemaName == "string" ? i.schemaName : "";
|
|
701
701
|
t && n && (s.add(
|
|
702
|
-
["physical", t,
|
|
702
|
+
["physical", t, o, d, n].join(
|
|
703
703
|
":"
|
|
704
704
|
)
|
|
705
705
|
), s.add(`physical:${t}:${n}`));
|
|
706
706
|
}
|
|
707
707
|
if (i.kind === "sql") {
|
|
708
|
-
const t = typeof i.connectionId == "string" ? i.connectionId : "", n = typeof i.dialect == "string" ? i.dialect : "",
|
|
709
|
-
t && (s.add(["sql", t, n,
|
|
708
|
+
const t = typeof i.connectionId == "string" ? i.connectionId : "", n = typeof i.dialect == "string" ? i.dialect : "", o = typeof i.label == "string" ? i.label : "";
|
|
709
|
+
t && (s.add(["sql", t, n, o].join(":")), s.add(`sql:${t}`));
|
|
710
710
|
}
|
|
711
711
|
return s;
|
|
712
712
|
}
|
|
713
713
|
function cs(i, s) {
|
|
714
|
-
const e =
|
|
714
|
+
const e = a(i);
|
|
715
715
|
if (!e)
|
|
716
716
|
return [`${s} must be an object.`];
|
|
717
717
|
const t = [];
|
|
@@ -722,18 +722,18 @@ function cs(i, s) {
|
|
|
722
722
|
), h(e.appliesToViewIds) || t.push(`${s}.appliesToViewIds must be an array of strings.`), h(e.notAppliedToViewIds) || t.push(`${s}.notAppliedToViewIds must be an array of strings.`), !Array.isArray(e.bindings))
|
|
723
723
|
t.push(`${s}.bindings must be an array.`);
|
|
724
724
|
else {
|
|
725
|
-
const n = h(e.appliesToViewIds) ? new Set(e.appliesToViewIds) : void 0,
|
|
725
|
+
const n = h(e.appliesToViewIds) ? new Set(e.appliesToViewIds) : void 0, o = h(
|
|
726
726
|
e.notAppliedToViewIds
|
|
727
727
|
) ? new Set(e.notAppliedToViewIds) : void 0;
|
|
728
728
|
e.bindings.forEach((d, u) => {
|
|
729
|
-
const l =
|
|
729
|
+
const l = a(d);
|
|
730
730
|
if (!l) {
|
|
731
731
|
t.push(`${s}.bindings.${u} must be an object.`);
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
734
|
typeof l.viewId != "string" || !l.viewId ? t.push(`${s}.bindings.${u}.viewId is required.`) : (n && !n.has(l.viewId) && t.push(
|
|
735
735
|
`${s}.bindings.${u}.viewId must be included in appliesToViewIds.`
|
|
736
|
-
),
|
|
736
|
+
), o != null && o.has(l.viewId) && t.push(
|
|
737
737
|
`${s}.bindings.${u}.viewId must not be listed in notAppliedToViewIds.`
|
|
738
738
|
)), t.push(
|
|
739
739
|
...f(
|
|
@@ -748,7 +748,7 @@ function cs(i, s) {
|
|
|
748
748
|
function ue(i, s) {
|
|
749
749
|
if (i === void 0)
|
|
750
750
|
return [];
|
|
751
|
-
const e =
|
|
751
|
+
const e = a(i);
|
|
752
752
|
if (!e)
|
|
753
753
|
return [`${s} must be an object.`];
|
|
754
754
|
const t = [
|
|
@@ -766,21 +766,21 @@ function ue(i, s) {
|
|
|
766
766
|
)
|
|
767
767
|
];
|
|
768
768
|
if (e.builder !== "semaphor.inputOptions" && t.push(`${s}.builder must be semaphor.inputOptions.`), typeof e.sourceKey != "string" && e.source === void 0 && t.push(`${s} must include source or sourceKey.`), e.source !== void 0) {
|
|
769
|
-
const n =
|
|
769
|
+
const n = a(e.source);
|
|
770
770
|
!n || n.kind !== "semantic" && n.kind !== "physical" ? t.push(`${s}.source.kind must be semantic or physical.`) : t.push(...R(e.source, `${s}.source`));
|
|
771
771
|
}
|
|
772
|
-
return
|
|
772
|
+
return a(e.valueFieldRef) || t.push(`${s}.valueFieldRef is required.`), a(e.labelFieldRef) || t.push(`${s}.labelFieldRef is required.`), e.limit !== void 0 && (typeof e.limit != "number" || !Number.isInteger(e.limit) || e.limit <= 0) && t.push(`${s}.limit must be a positive integer.`), t;
|
|
773
773
|
}
|
|
774
774
|
function ps(i) {
|
|
775
775
|
var n;
|
|
776
|
-
const s =
|
|
776
|
+
const s = a(i.value);
|
|
777
777
|
if (!s)
|
|
778
778
|
return [`${i.path} is required for executable views.`];
|
|
779
779
|
const e = [];
|
|
780
780
|
if (!le(s.builder))
|
|
781
781
|
return e.push(`${i.path}.builder must be a supported SDK builder.`), e;
|
|
782
782
|
i.sdkBuilder && s.builder !== i.sdkBuilder && e.push(`${i.path}.builder must match sdkBuilder.`), i.queryKind && w(i.queryKind) && s.builder !== gs(i.queryKind) && e.push(`${i.path}.builder must match queryKind.`);
|
|
783
|
-
const t =
|
|
783
|
+
const t = a(s.spec);
|
|
784
784
|
if (!t)
|
|
785
785
|
return e.push(`${i.path}.spec must be an object.`), e;
|
|
786
786
|
switch (s.builder) {
|
|
@@ -857,8 +857,8 @@ function ps(i) {
|
|
|
857
857
|
);
|
|
858
858
|
break;
|
|
859
859
|
case "semaphor.matrix": {
|
|
860
|
-
const { id:
|
|
861
|
-
for (const [I, q] of Object.entries({ id:
|
|
860
|
+
const { id: o, label: d, matrixWindowRequest: u, ...l } = t;
|
|
861
|
+
for (const [I, q] of Object.entries({ id: o, label: d }))
|
|
862
862
|
q !== void 0 && (typeof q != "string" || !q.trim()) && e.push(`${i.path}.spec.${I} must be a nonempty string.`);
|
|
863
863
|
const b = re.safeParse({
|
|
864
864
|
intent: { ...l, kind: "matrix" },
|
|
@@ -875,7 +875,7 @@ function ps(i) {
|
|
|
875
875
|
`${i.path}.spec`
|
|
876
876
|
),
|
|
877
877
|
..._(t, i.path)
|
|
878
|
-
), ((n =
|
|
878
|
+
), ((n = a(t.source)) == null ? void 0 : n.kind) !== "sql" && e.push(`${i.path}.spec.source.kind must be sql.`), (typeof t.sql != "string" || !t.sql.trim()) && e.push(`${i.path}.spec.sql is required.`), e.push(
|
|
879
879
|
...x(
|
|
880
880
|
t.fields,
|
|
881
881
|
`${i.path}.spec.fields`
|
|
@@ -888,7 +888,7 @@ function ps(i) {
|
|
|
888
888
|
function ms(i, s) {
|
|
889
889
|
const e = [];
|
|
890
890
|
if (i.driverMode !== void 0 && !Le.has(i.driverMode) && e.push(`${s}.driverMode must be a supported analysis driver mode.`), i.includePopulation !== void 0 && typeof i.includePopulation != "boolean" && e.push(`${s}.includePopulation must be a boolean.`), i.calendarContext !== void 0) {
|
|
891
|
-
const t =
|
|
891
|
+
const t = a(i.calendarContext);
|
|
892
892
|
if (!t)
|
|
893
893
|
e.push(`${s}.calendarContext must be an object.`);
|
|
894
894
|
else {
|
|
@@ -897,8 +897,8 @@ function ms(i, s) {
|
|
|
897
897
|
);
|
|
898
898
|
const n = t.anchor;
|
|
899
899
|
if (n !== void 0 && n !== "now") {
|
|
900
|
-
const
|
|
901
|
-
(!
|
|
900
|
+
const o = a(n);
|
|
901
|
+
(!o || typeof o.iso != "string" || !o.iso.trim()) && e.push(`${s}.calendarContext.anchor must be now or { iso }.`);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
}
|
|
@@ -907,18 +907,18 @@ function ms(i, s) {
|
|
|
907
907
|
function fs(i, s) {
|
|
908
908
|
if (i === void 0)
|
|
909
909
|
return [];
|
|
910
|
-
const e =
|
|
910
|
+
const e = a(i);
|
|
911
911
|
if (!e)
|
|
912
912
|
return [`${s} must be an object.`];
|
|
913
913
|
const t = [];
|
|
914
|
-
return e.mode !== "server" && t.push(`${s}.mode must be server.`), !Array.isArray(e.measures) || e.measures.length === 0 ? t.push(`${s}.measures must include at least one measure.`) : e.measures.forEach((n,
|
|
914
|
+
return e.mode !== "server" && t.push(`${s}.mode must be server.`), !Array.isArray(e.measures) || e.measures.length === 0 ? t.push(`${s}.measures must include at least one measure.`) : e.measures.forEach((n, o) => {
|
|
915
915
|
var d;
|
|
916
916
|
t.push(
|
|
917
917
|
...ce(
|
|
918
918
|
n,
|
|
919
|
-
`${s}.measures.${
|
|
919
|
+
`${s}.measures.${o}`
|
|
920
920
|
)
|
|
921
|
-
), ((d =
|
|
921
|
+
), ((d = a(n)) == null ? void 0 : d.role) !== "measure" && t.push(`${s}.measures.${o}.role must be measure.`);
|
|
922
922
|
}), t;
|
|
923
923
|
}
|
|
924
924
|
function A(i, s, e) {
|
|
@@ -928,7 +928,7 @@ function A(i, s, e) {
|
|
|
928
928
|
}), t;
|
|
929
929
|
}
|
|
930
930
|
function _(i, s) {
|
|
931
|
-
return
|
|
931
|
+
return a(i.source) ? R(i.source, `${s}.spec.source`) : [`${s}.spec.source must be an object.`];
|
|
932
932
|
}
|
|
933
933
|
function E(i, s) {
|
|
934
934
|
const e = hs(i, s);
|
|
@@ -949,7 +949,7 @@ function x(i, s) {
|
|
|
949
949
|
function F(i, s) {
|
|
950
950
|
if (i === void 0)
|
|
951
951
|
return [];
|
|
952
|
-
const e =
|
|
952
|
+
const e = a(i);
|
|
953
953
|
return e ? [
|
|
954
954
|
...f(e.field, `${s}.field`),
|
|
955
955
|
...ys(e.direction, `${s}.direction`)
|
|
@@ -965,13 +965,13 @@ function K(i, s) {
|
|
|
965
965
|
return [`${s} must be an array.`];
|
|
966
966
|
const e = [];
|
|
967
967
|
return i.forEach((t, n) => {
|
|
968
|
-
const
|
|
969
|
-
if (!
|
|
968
|
+
const o = a(t);
|
|
969
|
+
if (!o) {
|
|
970
970
|
e.push(`${s}.${n} must be an object.`);
|
|
971
971
|
return;
|
|
972
972
|
}
|
|
973
973
|
e.push(
|
|
974
|
-
...f(
|
|
974
|
+
...f(o.field, `${s}.${n}.field`)
|
|
975
975
|
);
|
|
976
976
|
}), e;
|
|
977
977
|
}
|
|
@@ -993,11 +993,11 @@ function gs(i) {
|
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
995
|
function bs(i) {
|
|
996
|
-
const s =
|
|
996
|
+
const s = a(i.computation), e = a(i.visualSpec);
|
|
997
997
|
return (s == null ? void 0 : s.kind) === "presentation_only" || (s == null ? void 0 : s.kind) === "derived" || (s == null ? void 0 : s.kind) === "unsupported" || i.visual === "text_block" || (e == null ? void 0 : e.visualType) === "text_block";
|
|
998
998
|
}
|
|
999
999
|
function vs(i, s) {
|
|
1000
|
-
const e =
|
|
1000
|
+
const e = a(i);
|
|
1001
1001
|
if (!e)
|
|
1002
1002
|
return [`${s} must be an object.`];
|
|
1003
1003
|
const t = [];
|
|
@@ -1009,7 +1009,7 @@ function vs(i, s) {
|
|
|
1009
1009
|
), t;
|
|
1010
1010
|
}
|
|
1011
1011
|
function $s(i, s) {
|
|
1012
|
-
const e =
|
|
1012
|
+
const e = a(i);
|
|
1013
1013
|
if (!e)
|
|
1014
1014
|
return [`${s} must be an object.`];
|
|
1015
1015
|
const t = [];
|
|
@@ -1021,47 +1021,47 @@ function $s(i, s) {
|
|
|
1021
1021
|
), typeof e.serverSideRequired != "boolean" && t.push(`${s}.serverSideRequired must be a boolean.`), t;
|
|
1022
1022
|
}
|
|
1023
1023
|
function Ss(i, s) {
|
|
1024
|
-
const e =
|
|
1024
|
+
const e = a(i);
|
|
1025
1025
|
if (!e)
|
|
1026
1026
|
return [`${s} must be an object.`];
|
|
1027
1027
|
const t = [];
|
|
1028
1028
|
return (typeof e.maxPx != "number" || !Number.isInteger(e.maxPx) || e.maxPx <= 0) && t.push(`${s}.maxPx must be a positive integer.`), e.scroll !== "vertical" && e.scroll !== "both" && t.push(`${s}.scroll must be vertical or both.`), typeof e.stickyHeader != "boolean" && t.push(`${s}.stickyHeader must be a boolean.`), t;
|
|
1029
1029
|
}
|
|
1030
1030
|
function ws(i, s) {
|
|
1031
|
-
const e =
|
|
1031
|
+
const e = a(i);
|
|
1032
1032
|
if (!e)
|
|
1033
1033
|
return [`${s} must be an object.`];
|
|
1034
1034
|
const t = [];
|
|
1035
1035
|
return e.mode !== "none" && e.mode !== "server" && e.mode !== "client_for_bounded_rows" && t.push(`${s}.mode must be a supported pagination mode.`), e.pageSize !== void 0 && (typeof e.pageSize != "number" || !Number.isInteger(e.pageSize) || e.pageSize <= 0) && t.push(`${s}.pageSize must be a positive integer.`), e.readsFrom !== void 0 && e.readsFrom !== "result.pagination" && t.push(`${s}.readsFrom must be result.pagination.`), t;
|
|
1036
1036
|
}
|
|
1037
1037
|
function ks(i, s) {
|
|
1038
|
-
const e =
|
|
1038
|
+
const e = a(i);
|
|
1039
1039
|
if (!e)
|
|
1040
1040
|
return [`${s} must be an object.`];
|
|
1041
1041
|
const t = [];
|
|
1042
1042
|
return e.mode !== "server" && e.mode !== "client_for_bounded_rows" && t.push(`${s}.mode must be a supported sorting mode.`), e.defaultField !== void 0 && (typeof e.defaultField != "string" || !e.defaultField.trim()) && t.push(`${s}.defaultField must be a non-empty string.`), e.defaultDirection !== void 0 && e.defaultDirection !== "asc" && e.defaultDirection !== "desc" && t.push(`${s}.defaultDirection must be asc or desc.`), e.resetPageOnChange !== void 0 && typeof e.resetPageOnChange != "boolean" && t.push(`${s}.resetPageOnChange must be a boolean.`), t;
|
|
1043
1043
|
}
|
|
1044
1044
|
function Is(i, s) {
|
|
1045
|
-
const e =
|
|
1045
|
+
const e = a(i);
|
|
1046
1046
|
if (!e)
|
|
1047
1047
|
return [`${s} must be an object.`];
|
|
1048
1048
|
const t = [];
|
|
1049
1049
|
return e.mode !== "none" && e.mode !== "server" && e.mode !== "local" ? (t.push(`${s}.mode must be none, server, or local.`), t) : e.mode === "none" ? (e.measures !== void 0 && t.push(`${s}.measures is not allowed when mode is none.`), e.label !== void 0 && t.push(`${s}.label is not allowed when mode is none.`), t) : e.mode === "server" ? (!Array.isArray(e.measures) || e.measures.length === 0 ? t.push(
|
|
1050
1050
|
`${s}.measures must include at least one measure when mode is server.`
|
|
1051
|
-
) : e.measures.forEach((n,
|
|
1051
|
+
) : e.measures.forEach((n, o) => {
|
|
1052
1052
|
var d;
|
|
1053
1053
|
t.push(
|
|
1054
1054
|
...ce(
|
|
1055
1055
|
n,
|
|
1056
|
-
`${s}.measures.${
|
|
1056
|
+
`${s}.measures.${o}`
|
|
1057
1057
|
)
|
|
1058
|
-
), ((d =
|
|
1058
|
+
), ((d = a(n)) == null ? void 0 : d.role) !== "measure" && t.push(`${s}.measures.${o}.role must be measure.`);
|
|
1059
1059
|
}), e.label !== void 0 && t.push(`${s}.label is not allowed when mode is server.`), t) : (e.mode === "local" && (e.label !== "Displayed rows" && e.label !== "Current page" && t.push(
|
|
1060
1060
|
`${s}.label must be Displayed rows or Current page when mode is local.`
|
|
1061
1061
|
), e.measures !== void 0 && t.push(`${s}.measures is not allowed when mode is local.`)), t);
|
|
1062
1062
|
}
|
|
1063
1063
|
function As(i, s) {
|
|
1064
|
-
const e =
|
|
1064
|
+
const e = a(i);
|
|
1065
1065
|
if (!e)
|
|
1066
1066
|
return [`${s} must be an object.`];
|
|
1067
1067
|
const t = [];
|
|
@@ -1087,12 +1087,12 @@ function As(i, s) {
|
|
|
1087
1087
|
return t;
|
|
1088
1088
|
}
|
|
1089
1089
|
function _s(i, s) {
|
|
1090
|
-
const e =
|
|
1090
|
+
const e = a(i);
|
|
1091
1091
|
if (!e)
|
|
1092
1092
|
return [`${s} must be an object.`];
|
|
1093
1093
|
const t = [];
|
|
1094
|
-
for (const
|
|
1095
|
-
(typeof e[
|
|
1094
|
+
for (const o of ["title", "requestedQuestion", "suggestedModelingFix"])
|
|
1095
|
+
(typeof e[o] != "string" || !e[o].trim()) && t.push(`${s}.${o} is required.`);
|
|
1096
1096
|
return Je.has(e.reason) || t.push(
|
|
1097
1097
|
`${s}.reason must be a supported unsupported insight reason.`
|
|
1098
1098
|
), (e.relationshipCandidate !== void 0 || e.nextRepairAction !== void 0) && e.reason !== "missing_relationship" && t.push(
|
|
@@ -1116,10 +1116,10 @@ function _s(i, s) {
|
|
|
1116
1116
|
), t;
|
|
1117
1117
|
}
|
|
1118
1118
|
function Rs(i, s, e) {
|
|
1119
|
-
const t =
|
|
1119
|
+
const t = a(i);
|
|
1120
1120
|
if (!t)
|
|
1121
1121
|
return [`${s} must be an object.`];
|
|
1122
|
-
const n = [],
|
|
1122
|
+
const n = [], o = /* @__PURE__ */ new Set([
|
|
1123
1123
|
"kind",
|
|
1124
1124
|
"inputId",
|
|
1125
1125
|
"inputLabel",
|
|
@@ -1128,7 +1128,7 @@ function Rs(i, s, e) {
|
|
|
1128
1128
|
"missingEvidence"
|
|
1129
1129
|
]);
|
|
1130
1130
|
Object.keys(t).forEach((u) => {
|
|
1131
|
-
|
|
1131
|
+
o.has(u) || n.push(
|
|
1132
1132
|
`${s}.${u} is not supported; raw identifier diagnostics support only kind, inputId, inputLabel, optionSource, optionField, and missingEvidence.`
|
|
1133
1133
|
);
|
|
1134
1134
|
}), e !== "raw_identifier_filter_options" && n.push(
|
|
@@ -1158,18 +1158,18 @@ function Rs(i, s, e) {
|
|
|
1158
1158
|
}), n;
|
|
1159
1159
|
}
|
|
1160
1160
|
function qs(i, s) {
|
|
1161
|
-
const e =
|
|
1161
|
+
const e = a(i);
|
|
1162
1162
|
if (!e)
|
|
1163
1163
|
return [`${s} must be an object.`];
|
|
1164
1164
|
const t = [], n = /* @__PURE__ */ new Set(["tool", "reason"]);
|
|
1165
|
-
return Object.keys(e).forEach((
|
|
1166
|
-
n.has(
|
|
1167
|
-
`${s}.${
|
|
1165
|
+
return Object.keys(e).forEach((o) => {
|
|
1166
|
+
n.has(o) || t.push(
|
|
1167
|
+
`${s}.${o} is not supported; repair actions support only tool and reason.`
|
|
1168
1168
|
);
|
|
1169
1169
|
}), e.tool !== "semaphor_propose_semantic_model_change" && t.push(`${s}.tool must be semaphor_propose_semantic_model_change.`), e.reason !== "missing_relationship" && t.push(`${s}.reason must be missing_relationship.`), t;
|
|
1170
1170
|
}
|
|
1171
1171
|
function Cs(i, s) {
|
|
1172
|
-
const e =
|
|
1172
|
+
const e = a(i);
|
|
1173
1173
|
if (!e)
|
|
1174
1174
|
return [`${s} must be an object.`];
|
|
1175
1175
|
const t = [], n = /* @__PURE__ */ new Set([
|
|
@@ -1178,37 +1178,37 @@ function Cs(i, s) {
|
|
|
1178
1178
|
"target",
|
|
1179
1179
|
"targetFields"
|
|
1180
1180
|
]);
|
|
1181
|
-
Object.keys(e).forEach((
|
|
1182
|
-
n.has(
|
|
1183
|
-
`${s}.${
|
|
1181
|
+
Object.keys(e).forEach((o) => {
|
|
1182
|
+
n.has(o) || t.push(
|
|
1183
|
+
`${s}.${o} is not supported; relationship candidates support only source, sourceFields, target, and targetFields.`
|
|
1184
1184
|
);
|
|
1185
1185
|
}), t.push(
|
|
1186
1186
|
...B(e.source, `${s}.source`)
|
|
1187
1187
|
), t.push(
|
|
1188
1188
|
...B(e.target, `${s}.target`)
|
|
1189
1189
|
);
|
|
1190
|
-
for (const
|
|
1191
|
-
const d = e[
|
|
1190
|
+
for (const o of ["sourceFields", "targetFields"]) {
|
|
1191
|
+
const d = e[o];
|
|
1192
1192
|
if (!Array.isArray(d) || d.length === 0) {
|
|
1193
|
-
t.push(`${s}.${
|
|
1193
|
+
t.push(`${s}.${o} must be a non-empty endpoint field array.`);
|
|
1194
1194
|
continue;
|
|
1195
1195
|
}
|
|
1196
1196
|
d.forEach((u, l) => {
|
|
1197
1197
|
t.push(
|
|
1198
|
-
...de(u, `${s}.${
|
|
1198
|
+
...de(u, `${s}.${o}.${l}`)
|
|
1199
1199
|
);
|
|
1200
1200
|
});
|
|
1201
1201
|
}
|
|
1202
1202
|
return t;
|
|
1203
1203
|
}
|
|
1204
1204
|
function de(i, s) {
|
|
1205
|
-
const e =
|
|
1205
|
+
const e = a(i);
|
|
1206
1206
|
if (!e)
|
|
1207
1207
|
return [`${s} must be an object.`];
|
|
1208
1208
|
const t = [], n = /* @__PURE__ */ new Set(["name", "label", "role", "dataType"]);
|
|
1209
|
-
return Object.keys(e).forEach((
|
|
1210
|
-
n.has(
|
|
1211
|
-
`${s}.${
|
|
1209
|
+
return Object.keys(e).forEach((o) => {
|
|
1210
|
+
n.has(o) || t.push(
|
|
1211
|
+
`${s}.${o} is not supported; relationship candidate fields are scoped by their endpoint and support only name, label, role, and dataType.`
|
|
1212
1212
|
);
|
|
1213
1213
|
}), (typeof e.name != "string" || !e.name.trim()) && t.push(`${s}.name must be a non-empty string.`), e.role !== void 0 && (typeof e.role != "string" || !["dimension", "measure", "date", "id", "unknown"].includes(e.role)) && t.push(
|
|
1214
1214
|
`${s}.role must be dimension, measure, date, id, or unknown.`
|
|
@@ -1219,7 +1219,7 @@ function de(i, s) {
|
|
|
1219
1219
|
), t;
|
|
1220
1220
|
}
|
|
1221
1221
|
function B(i, s) {
|
|
1222
|
-
const e =
|
|
1222
|
+
const e = a(i);
|
|
1223
1223
|
if (!e)
|
|
1224
1224
|
return [`${s} must be an object.`];
|
|
1225
1225
|
const t = [], n = /* @__PURE__ */ new Set([
|
|
@@ -1230,9 +1230,9 @@ function B(i, s) {
|
|
|
1230
1230
|
"label",
|
|
1231
1231
|
"sourceKey"
|
|
1232
1232
|
]);
|
|
1233
|
-
return Object.keys(e).forEach((
|
|
1234
|
-
n.has(
|
|
1235
|
-
`${s}.${
|
|
1233
|
+
return Object.keys(e).forEach((o) => {
|
|
1234
|
+
n.has(o) || t.push(
|
|
1235
|
+
`${s}.${o} is not supported; relationship candidate sources support only semantic identity fields.`
|
|
1236
1236
|
);
|
|
1237
1237
|
}), e.kind !== "semantic" && t.push(`${s} must use semantic source identity.`), (typeof e.domainId != "string" || !e.domainId.trim() || typeof e.datasetName != "string" || !e.datasetName.trim()) && t.push(`${s} must include semantic domainId and datasetName.`), t;
|
|
1238
1238
|
}
|
|
@@ -1246,26 +1246,26 @@ function $(i, s) {
|
|
|
1246
1246
|
return i === void 0 ? [] : f(i, s);
|
|
1247
1247
|
}
|
|
1248
1248
|
function f(i, s) {
|
|
1249
|
-
const e =
|
|
1249
|
+
const e = a(i);
|
|
1250
1250
|
if (!e)
|
|
1251
1251
|
return [`${s} must be an object.`];
|
|
1252
1252
|
const t = [];
|
|
1253
1253
|
return (typeof e.name != "string" || !e.name.trim()) && t.push(`${s}.name is required.`), !e.source && typeof e.sourceKey != "string" && t.push(`${s} must include source or sourceKey.`), e.aggregate !== void 0 && !Ge.has(e.aggregate) && t.push(`${s}.aggregate must be a supported aggregate function.`), t;
|
|
1254
1254
|
}
|
|
1255
1255
|
function ce(i, s) {
|
|
1256
|
-
const e =
|
|
1256
|
+
const e = a(i), t = f(i, s);
|
|
1257
1257
|
if (!e || typeof e.sourceKey == "string" && e.sourceKey.trim())
|
|
1258
1258
|
return t;
|
|
1259
1259
|
if (e.source !== void 0) {
|
|
1260
|
-
const
|
|
1260
|
+
const o = R(
|
|
1261
1261
|
e.source,
|
|
1262
1262
|
`${s}.source`
|
|
1263
1263
|
);
|
|
1264
|
-
return
|
|
1264
|
+
return o.length === 0 || t.push(...o), t;
|
|
1265
1265
|
}
|
|
1266
1266
|
return t.includes(`${s} must include source or sourceKey.`) || t.push(`${s} must include source or sourceKey.`), t;
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function a(i) {
|
|
1269
1269
|
return i && typeof i == "object" && !Array.isArray(i) ? i : void 0;
|
|
1270
1270
|
}
|
|
1271
1271
|
function h(i) {
|
|
@@ -1547,7 +1547,7 @@ const Ks = Object.fromEntries(
|
|
|
1547
1547
|
assumptions: r.array(r.string()).optional(),
|
|
1548
1548
|
validation: m.optional()
|
|
1549
1549
|
}).passthrough().superRefine((i, s) => {
|
|
1550
|
-
const e =
|
|
1550
|
+
const e = oe(i);
|
|
1551
1551
|
for (const t of e.issues)
|
|
1552
1552
|
s.addIssue({
|
|
1553
1553
|
code: r.ZodIssueCode.custom,
|
|
@@ -1630,7 +1630,7 @@ export {
|
|
|
1630
1630
|
js as s,
|
|
1631
1631
|
Oe as t,
|
|
1632
1632
|
Z as u,
|
|
1633
|
-
|
|
1633
|
+
oe as v,
|
|
1634
1634
|
Hs as w,
|
|
1635
1635
|
Be as x,
|
|
1636
1636
|
De as y,
|