react-semaphor 0.1.469 → 0.1.471
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/README.md +10 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +107 -106
- 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 +4 -4
- package/dist/chunks/{analyze-result-contract-kaCNxjA7.js → analyze-result-contract-B3agc2XU.js} +1 -1
- package/dist/chunks/{analyze-result-contract-CMwVg9w2.cjs → analyze-result-contract-OgPk-zGu.cjs} +1 -1
- package/dist/chunks/{common-types-tRK8fhXV.cjs → common-types-C1IM7gao.cjs} +1 -1
- package/dist/chunks/{common-types-BgI-ymBp.js → common-types-g_1fKJLK.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-kKSBCRLE.js → dashboard-briefing-launcher-C2-b7rZU.js} +10 -10
- package/dist/chunks/dashboard-briefing-launcher-ChHmLu0F.cjs +26 -0
- package/dist/chunks/{dashboard-controls-DP2rftVR.js → dashboard-controls-Db7VOHdj.js} +9 -9
- package/dist/chunks/{dashboard-controls-Z8ow3GV6.cjs → dashboard-controls-kw4QQDSz.cjs} +1 -1
- package/dist/chunks/dashboard-filter-value-compatibility-Dmh-NaPK.cjs +1 -0
- package/dist/chunks/dashboard-filter-value-compatibility-ilbH2A31.js +836 -0
- package/dist/chunks/{dashboard-input-contract-12mPNhCF.cjs → dashboard-input-contract-JFJZgenC.cjs} +1 -1
- package/dist/chunks/{dashboard-input-contract-Ciboc347.js → dashboard-input-contract-Vr_3ApfF.js} +1 -1
- package/dist/chunks/{dashboard-json-CPq7IMvR.cjs → dashboard-json-Cu37kF4Q.cjs} +1 -1
- package/dist/chunks/{dashboard-json-3qT123Xa.js → dashboard-json-Dp-38lll.js} +7 -7
- package/dist/chunks/{edit-dashboard-visual-7eUCTZnx.cjs → edit-dashboard-visual-Cbtpwhlp.cjs} +33 -33
- package/dist/chunks/{edit-dashboard-visual-Clz6LQOX.js → edit-dashboard-visual-CffII05Z.js} +3611 -3713
- package/dist/chunks/{editor-action-buttons-WJFWflfs.cjs → editor-action-buttons-DcTGZa2C.cjs} +1 -1
- package/dist/chunks/{editor-action-buttons-CFbMRQSE.js → editor-action-buttons-DqwDHxFv.js} +6 -6
- package/dist/chunks/{index-CQN-X1jN.cjs → index-B4VxBoJg.cjs} +1 -1
- package/dist/chunks/{index-8Cm77joZ.js → index-CUf0lwSP.js} +24824 -24881
- package/dist/chunks/{index-DKaQRhKm.cjs → index-DUYREWSl.cjs} +227 -227
- package/dist/chunks/{index-DO4BESNy.js → index-oVXvCLH-.js} +9 -9
- package/dist/chunks/{matrix-result-contract-ClC6Pd_g.js → matrix-result-contract-DoU9diAh.js} +3 -3
- package/dist/chunks/{matrix-result-contract-DF-qt0jx.cjs → matrix-result-contract-SrzyG_KQ.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-OpY8xzdT.js → pivot-header-presentation-7XrwJYDm.js} +102 -95
- package/dist/chunks/pivot-header-presentation-Cr6pU5JL.cjs +4 -0
- package/dist/chunks/{pivot-result-identity-CCMpd8ZA.js → pivot-result-identity-5v4hRVbc.js} +1 -1
- package/dist/chunks/{pivot-result-identity-gsOwOjHi.cjs → pivot-result-identity-DRUlTWUq.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-CEfU43GZ.cjs → pivot-result-lifecycle-DJgO2P0H.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-B38AZx4a.js → pivot-result-lifecycle-O_roVguV.js} +7 -7
- package/dist/chunks/{raw-temporal-contract-r_EMdR85.js → raw-temporal-contract-BEMf3avg.js} +1 -1
- package/dist/chunks/{raw-temporal-contract-UdblxoVB.cjs → raw-temporal-contract-D8YuxTAg.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-C5UOCTwt.cjs → report-preferences-dialog-BEe2cTT-.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-D-NDYRrk.js → report-preferences-dialog-C_FTOmOg.js} +6 -6
- package/dist/chunks/{report-runtime-context-CcXUjpb-.js → report-runtime-context-DnNbpkGo.js} +1 -1
- package/dist/chunks/{report-runtime-context-CLtzrZdC.cjs → report-runtime-context-RFiWq4wK.cjs} +1 -1
- package/dist/chunks/{saved-temporal-bucket-format-hylaofsQ.js → saved-temporal-bucket-format-CygnBDO2.js} +24 -24
- package/dist/chunks/{saved-temporal-bucket-format-Ca4hUfTo.cjs → saved-temporal-bucket-format-DNMtD77o.cjs} +1 -1
- package/dist/chunks/{switch-DyE2_OmQ.cjs → switch-CQN9Hzho.cjs} +19 -19
- package/dist/chunks/{switch-BagpmPNw.js → switch-n2yUNY8i.js} +177 -164
- package/dist/chunks/{temporal-bucket-BDRcWdVv.cjs → temporal-bucket-9Wz9Ds6H.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-Cc9fmx8s.js → temporal-bucket-CUKJktCl.js} +1 -1
- package/dist/chunks/{temporal-bucket-authoring-DjPFtRSF.js → temporal-bucket-authoring-CZoJV2L6.js} +3 -3
- package/dist/chunks/{temporal-bucket-authoring-C6sZAVqS.cjs → temporal-bucket-authoring-DSpzgXHc.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-contract-vrOkax-r.cjs → temporal-bucket-contract-BD862TAa.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-contract-DT4kU0VY.js → temporal-bucket-contract-Cno9TlYr.js} +1 -1
- package/dist/chunks/{token-types-DALtlgbG.cjs → token-types-CoHsSJ4E.cjs} +1 -1
- package/dist/chunks/{token-types-Z889rD6g.js → token-types-W3EHNW-D.js} +1 -1
- package/dist/chunks/{update-policy-Cyufdviq.cjs → update-policy-BGNXFgBU.cjs} +1 -1
- package/dist/chunks/{update-policy-Bu5Tw43R.js → update-policy-kRNJwwUV.js} +1 -1
- package/dist/chunks/{validators-DhTaCK1O.js → validators-B5t1s8oh.js} +274 -266
- package/dist/chunks/validators-DcshgK7w.cjs +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +4 -4
- 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 +3 -3
- 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 +3 -3
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +72 -69
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -14
- 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 +3 -3
- package/dist/types/analytics-protocol.d.ts +13 -0
- package/dist/types/format-utils.d.ts +9 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunks/dashboard-briefing-launcher-BqxcYhO2.cjs +0 -26
- package/dist/chunks/dashboard-filter-value-compatibility-Ce7jUVh-.js +0 -692
- package/dist/chunks/dashboard-filter-value-compatibility-iCPBcrRS.cjs +0 -1
- package/dist/chunks/pivot-header-presentation-DyV0iOZ_.cjs +0 -4
- package/dist/chunks/validators-DO-YuzgO.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as a } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const B = [
|
|
3
3
|
"second",
|
|
4
4
|
"minute",
|
|
5
5
|
"hour",
|
|
@@ -10,11 +10,11 @@ const P = [
|
|
|
10
10
|
"year"
|
|
11
11
|
];
|
|
12
12
|
function Ri(e) {
|
|
13
|
-
return typeof e == "string" &&
|
|
13
|
+
return typeof e == "string" && B.includes(e);
|
|
14
14
|
}
|
|
15
|
-
const [, , ...
|
|
15
|
+
const [, , ...he] = B;
|
|
16
16
|
function Mi(e) {
|
|
17
|
-
return Ri(e) &&
|
|
17
|
+
return Ri(e) && he.includes(e);
|
|
18
18
|
}
|
|
19
19
|
const Ti = [
|
|
20
20
|
"week_of_short",
|
|
@@ -82,16 +82,23 @@ const Ci = {
|
|
|
82
82
|
sql: "unknown",
|
|
83
83
|
omitted: "stringArray"
|
|
84
84
|
}, Fi = "SUM";
|
|
85
|
-
function
|
|
85
|
+
function $(e) {
|
|
86
86
|
return typeof e == "string" && e.trim().length > 0;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function F(e) {
|
|
89
|
+
return $(e) ? e.trim().toLowerCase() : "";
|
|
90
|
+
}
|
|
91
|
+
function Cn(e) {
|
|
92
|
+
const i = $(e.id) ? e.id.trim() : void 0;
|
|
93
|
+
if (!i) return;
|
|
94
|
+
const t = F(i), n = $(e.table) ? e.table.trim() : void 0;
|
|
95
|
+
if (!(t === F(e.name) || n && t === F(n)))
|
|
96
|
+
return i;
|
|
90
97
|
}
|
|
91
98
|
function A(e) {
|
|
92
|
-
const i =
|
|
99
|
+
const i = $(e.datasetId) ? e.datasetId.trim() : void 0;
|
|
93
100
|
if (i)
|
|
94
|
-
return
|
|
101
|
+
return F(i) === F(e.datasetName) ? void 0 : i;
|
|
95
102
|
}
|
|
96
103
|
function Ue(e) {
|
|
97
104
|
if (e.kind !== "semantic") return e;
|
|
@@ -101,10 +108,10 @@ function Ue(e) {
|
|
|
101
108
|
...i ? { datasetId: i } : {}
|
|
102
109
|
};
|
|
103
110
|
}
|
|
104
|
-
function
|
|
105
|
-
return e ? e.kind === "semantic" ? !!(
|
|
111
|
+
function Fn(e) {
|
|
112
|
+
return e ? e.kind === "semantic" ? !!($(e.domainId) && ($(e.datasetId) || $(e.datasetName))) : e.kind === "physical" ? $(e.connectionId) && $(e.tableName) : $(e.connectionId) : !1;
|
|
106
113
|
}
|
|
107
|
-
function
|
|
114
|
+
function se(e) {
|
|
108
115
|
if (!e)
|
|
109
116
|
return "";
|
|
110
117
|
if (e.kind === "semantic") {
|
|
@@ -128,7 +135,7 @@ function ne(e) {
|
|
|
128
135
|
e.label || ""
|
|
129
136
|
].join(":");
|
|
130
137
|
}
|
|
131
|
-
function
|
|
138
|
+
function ye(e, i) {
|
|
132
139
|
if (!e || !i)
|
|
133
140
|
return e === i;
|
|
134
141
|
if (e.kind !== i.kind)
|
|
@@ -139,7 +146,7 @@ function he(e, i) {
|
|
|
139
146
|
const t = A(e), n = A(i);
|
|
140
147
|
return t && n ? t === n : e.datasetName === i.datasetName;
|
|
141
148
|
}
|
|
142
|
-
return
|
|
149
|
+
return se(e) === se(i);
|
|
143
150
|
}
|
|
144
151
|
function Ge(e, i) {
|
|
145
152
|
return e.kind !== "semantic" || i.kind !== "semantic" ? e : Ue({
|
|
@@ -150,13 +157,13 @@ function Ge(e, i) {
|
|
|
150
157
|
connectionId: e.connectionId || i.connectionId
|
|
151
158
|
});
|
|
152
159
|
}
|
|
153
|
-
function
|
|
160
|
+
function Dn(e) {
|
|
154
161
|
const i = [];
|
|
155
162
|
for (const t of e) {
|
|
156
163
|
const n = Ue(
|
|
157
164
|
t
|
|
158
165
|
), s = i.findIndex(
|
|
159
|
-
(r) =>
|
|
166
|
+
(r) => ye(r, n)
|
|
160
167
|
);
|
|
161
168
|
if (s === -1) {
|
|
162
169
|
i.push(n);
|
|
@@ -170,16 +177,16 @@ function Fn(e) {
|
|
|
170
177
|
return i;
|
|
171
178
|
}
|
|
172
179
|
function Di(e, i) {
|
|
173
|
-
return e.name === i.name &&
|
|
180
|
+
return e.name === i.name && ye(e.source, i.source);
|
|
174
181
|
}
|
|
175
182
|
function Ni(e) {
|
|
176
183
|
return [
|
|
177
|
-
e.source ?
|
|
178
|
-
|
|
184
|
+
e.source ? se(e.source) : "unknown",
|
|
185
|
+
be(e),
|
|
179
186
|
e.name
|
|
180
187
|
].filter(Boolean).join(":");
|
|
181
188
|
}
|
|
182
|
-
function
|
|
189
|
+
function be(e) {
|
|
183
190
|
return qi(
|
|
184
191
|
e.aggregate || Fi
|
|
185
192
|
);
|
|
@@ -187,7 +194,7 @@ function ye(e) {
|
|
|
187
194
|
function qi(e) {
|
|
188
195
|
return e.trim().toUpperCase();
|
|
189
196
|
}
|
|
190
|
-
function
|
|
197
|
+
function Nn(e, i) {
|
|
191
198
|
return {
|
|
192
199
|
...e,
|
|
193
200
|
label: e.label || i.label,
|
|
@@ -196,7 +203,7 @@ function Dn(e, i) {
|
|
|
196
203
|
source: e.source && i.source ? Ge(e.source, i.source) : e.source || i.source
|
|
197
204
|
};
|
|
198
205
|
}
|
|
199
|
-
const
|
|
206
|
+
const oe = "semaphor-data-app-codegen-summary/v1", qn = "semaphor-data-app-codegen-summary-validator/v2", Oi = /* @__PURE__ */ new Set([
|
|
200
207
|
"metric",
|
|
201
208
|
"records",
|
|
202
209
|
"matrix",
|
|
@@ -317,7 +324,7 @@ const se = "semaphor-data-app-codegen-summary/v1", Nn = "semaphor-data-app-codeg
|
|
|
317
324
|
"requires_sql_escape_hatch",
|
|
318
325
|
"unsupported_sdk_capability"
|
|
319
326
|
]);
|
|
320
|
-
function
|
|
327
|
+
function On(e) {
|
|
321
328
|
return Ye(e).ok;
|
|
322
329
|
}
|
|
323
330
|
function Ye(e) {
|
|
@@ -325,12 +332,12 @@ function Ye(e) {
|
|
|
325
332
|
if (!e || typeof e != "object")
|
|
326
333
|
return { ok: !1, issues: ["Summary must be an object."] };
|
|
327
334
|
const t = e;
|
|
328
|
-
return t.schemaVersion !==
|
|
329
|
-
`schemaVersion must be ${
|
|
335
|
+
return t.schemaVersion !== oe && i.push(
|
|
336
|
+
`schemaVersion must be ${oe}.`
|
|
330
337
|
), (typeof t.title != "string" || !t.title.trim()) && i.push("title is required."), Array.isArray(t.sources) || i.push("sources must be an array."), Array.isArray(t.inputs) || i.push("inputs must be an array."), Array.isArray(t.views) || i.push("views must be an array."), Array.isArray(t.filterContracts) || i.push("filterContracts must be an array."), (!t.implementationChecklist || typeof t.implementationChecklist != "object") && i.push("implementationChecklist must be an object."), t.implementationChecklist && typeof t.implementationChecklist == "object" && i.push(
|
|
331
338
|
...Qi(t.implementationChecklist)
|
|
332
339
|
), Array.isArray(t.sources) && t.sources.forEach((n, s) => {
|
|
333
|
-
i.push(...
|
|
340
|
+
i.push(...K(n, `sources.${s}`));
|
|
334
341
|
}), Array.isArray(t.inputs) && t.inputs.forEach((n, s) => {
|
|
335
342
|
i.push(...Zi(n, `inputs.${s}`));
|
|
336
343
|
}), Array.isArray(t.views) && t.views.forEach((n, s) => {
|
|
@@ -374,7 +381,7 @@ const Re = /* @__PURE__ */ new Set([
|
|
|
374
381
|
"missing_relationship",
|
|
375
382
|
"raw_identifier_filter_options"
|
|
376
383
|
]);
|
|
377
|
-
function
|
|
384
|
+
function K(e, i) {
|
|
378
385
|
const t = c(e);
|
|
379
386
|
return t ? t.kind === "semantic" ? typeof t.domainId == "string" && t.domainId.trim() && typeof t.datasetName == "string" && t.datasetName.trim() ? [] : [`${i} must include sourceKey or a supported source identity.`] : typeof t.sourceKey == "string" && t.sourceKey.trim() ? [] : t.kind === "physical" && typeof t.tableName == "string" && t.tableName.trim() && typeof t.connectionId == "string" && t.connectionId.trim() ? [] : t.kind === "sql" && typeof t.connectionId == "string" && t.connectionId.trim() ? [] : [`${i} must include sourceKey or a supported source identity.`] : [`${i} must be an object.`];
|
|
380
387
|
}
|
|
@@ -397,9 +404,9 @@ function Qi(e) {
|
|
|
397
404
|
"implementationChecklist.requiredDevtools.mountRootDevtools must be a boolean."
|
|
398
405
|
) : t.push("implementationChecklist.requiredDevtools must be an object."), Array.isArray(i.requiredInputOptions) || t.push(
|
|
399
406
|
"implementationChecklist.requiredInputOptions must be an array."
|
|
400
|
-
), Array.isArray(i.filterScopeByInput) || t.push("implementationChecklist.filterScopeByInput must be an array."), c(i.bindingsByView) || t.push("implementationChecklist.bindingsByView must be an object."),
|
|
407
|
+
), Array.isArray(i.filterScopeByInput) || t.push("implementationChecklist.filterScopeByInput must be an array."), c(i.bindingsByView) || t.push("implementationChecklist.bindingsByView must be an object."), S(i.validationCommands) || t.push(
|
|
401
408
|
"implementationChecklist.validationCommands must be an array of strings."
|
|
402
|
-
),
|
|
409
|
+
), S(i.browserSmokeChecks) || t.push(
|
|
403
410
|
"implementationChecklist.browserSmokeChecks must be an array of strings."
|
|
404
411
|
), t;
|
|
405
412
|
}
|
|
@@ -408,13 +415,13 @@ function Zi(e, i) {
|
|
|
408
415
|
if (!t)
|
|
409
416
|
return [`${i} must be an object.`];
|
|
410
417
|
const n = [];
|
|
411
|
-
return (typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.fieldRef && n.push(...h(t.fieldRef, `${i}.fieldRef`)), n.push(...Ze(t.optionQuery, `${i}.optionQuery`)),
|
|
418
|
+
return (typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.fieldRef && n.push(...h(t.fieldRef, `${i}.fieldRef`)), n.push(...Ze(t.optionQuery, `${i}.optionQuery`)), S(t.appliesToViewIds) || n.push(`${i}.appliesToViewIds must be an array of strings.`), t.bindings !== void 0 && !Array.isArray(t.bindings) && n.push(`${i}.bindings must be an array.`), Array.isArray(t.bindings) && t.bindings.forEach((s, r) => {
|
|
412
419
|
const l = c(s);
|
|
413
420
|
if (!l) {
|
|
414
421
|
n.push(`${i}.bindings.${r} must be an object.`);
|
|
415
422
|
return;
|
|
416
423
|
}
|
|
417
|
-
|
|
424
|
+
S(l.appliesToViewIds) || n.push(
|
|
418
425
|
`${i}.bindings.${r}.appliesToViewIds must be an array of strings.`
|
|
419
426
|
), n.push(
|
|
420
427
|
...h(
|
|
@@ -432,7 +439,7 @@ function Xi(e, i) {
|
|
|
432
439
|
if ((typeof t.id != "string" || !t.id.trim()) && n.push(`${i}.id is required.`), t.visualSpec !== void 0 && n.push(...vt(t.visualSpec, `${i}.visualSpec`)), t.computation !== void 0 && n.push(
|
|
433
440
|
...xt(t.computation, `${i}.computation`)
|
|
434
441
|
), _t(t))
|
|
435
|
-
return n.push(...
|
|
442
|
+
return n.push(...J(t, `${i}`)), t.fields !== void 0 && (Array.isArray(t.fields) ? t.fields.forEach((u, p) => {
|
|
436
443
|
n.push(
|
|
437
444
|
...h(u, `${i}.fields.${p}`)
|
|
438
445
|
);
|
|
@@ -440,10 +447,10 @@ function Xi(e, i) {
|
|
|
440
447
|
`${i}.sdkBuilder is not allowed for non-executable views.`
|
|
441
448
|
), t.sdkSpec !== void 0 && n.push(`${i}.sdkSpec is not allowed for non-executable views.`), n;
|
|
442
449
|
if (!Array.isArray(t.fields))
|
|
443
|
-
return n.push(`${i}.fields must be an array.`), (t.sdkSpec !== void 0 || t.sdkBuilder !== void 0) && n.push(`${i}.fields must be an array for executable views.`), n.push(...
|
|
450
|
+
return n.push(`${i}.fields must be an array.`), (t.sdkSpec !== void 0 || t.sdkBuilder !== void 0) && n.push(`${i}.fields must be an array for executable views.`), n.push(...J(t, `${i}`)), n;
|
|
444
451
|
t.fields.forEach((u, p) => {
|
|
445
452
|
n.push(...h(u, `${i}.fields.${p}`));
|
|
446
|
-
}),
|
|
453
|
+
}), D(t.queryKind) || n.push(`${i}.queryKind must be a supported codegen query kind.`), t.sdkBuilder !== void 0 && !Je(t.sdkBuilder) && n.push(`${i}.sdkBuilder must be a supported SDK builder.`), t.metricBindingKeys !== void 0 && (Array.isArray(t.metricBindingKeys) ? t.metricBindingKeys.some(
|
|
447
454
|
(u) => typeof u != "string" || u.trim().length === 0
|
|
448
455
|
) && n.push(`${i}.metricBindingKeys must be an array of strings.`) : n.push(`${i}.metricBindingKeys must be an array of strings.`));
|
|
449
456
|
const s = c(t.sdkSpec), r = (s == null ? void 0 : s.builder) === "semaphor.metric";
|
|
@@ -453,14 +460,14 @@ function Xi(e, i) {
|
|
|
453
460
|
`${i}.metricBindingKeys must match the generated metric field binding keys in order.`
|
|
454
461
|
);
|
|
455
462
|
const d = c(t.computation);
|
|
456
|
-
return (d == null ? void 0 : d.kind) === "server_query" &&
|
|
463
|
+
return (d == null ? void 0 : d.kind) === "server_query" && D(t.queryKind) && D(d.queryKind) && d.queryKind !== t.queryKind && n.push(`${i}.computation.queryKind must match queryKind.`), n.push(
|
|
457
464
|
...lt({
|
|
458
465
|
value: t.sdkSpec,
|
|
459
466
|
path: `${i}.sdkSpec`,
|
|
460
467
|
queryKind: typeof t.queryKind == "string" ? t.queryKind : void 0,
|
|
461
468
|
sdkBuilder: typeof t.sdkBuilder == "string" ? t.sdkBuilder : void 0
|
|
462
469
|
}),
|
|
463
|
-
...
|
|
470
|
+
...J(t, `${i}`)
|
|
464
471
|
), n;
|
|
465
472
|
}
|
|
466
473
|
function Wi(e) {
|
|
@@ -511,9 +518,9 @@ function it(e) {
|
|
|
511
518
|
return typeof e.sourceKey == "string" && e.sourceKey.trim() ? [e.sourceKey, Qe(e), e.name].filter(Boolean).join(":") : Ni(e);
|
|
512
519
|
}
|
|
513
520
|
function Qe(e) {
|
|
514
|
-
return
|
|
521
|
+
return be(e);
|
|
515
522
|
}
|
|
516
|
-
function
|
|
523
|
+
function J(e, i) {
|
|
517
524
|
var p;
|
|
518
525
|
const t = c((p = c(e.visualSpec)) == null ? void 0 : p.tableBehavior), n = c(e.sdkSpec), s = c(n == null ? void 0 : n.spec), r = typeof (n == null ? void 0 : n.builder) == "string" ? n.builder : void 0, l = r === "semaphor.records" ? c(s == null ? void 0 : s.totals) : void 0, d = [];
|
|
519
526
|
if (!t)
|
|
@@ -616,10 +623,10 @@ function rt(e, i) {
|
|
|
616
623
|
...h(t.fieldRef, `${i}.fieldRef`)
|
|
617
624
|
), (typeof t.inputId != "string" || !t.inputId.trim()) && n.push(`${i}.inputId is required.`), n.push(
|
|
618
625
|
...Ze(t.optionQuery, `${i}.optionQuery`)
|
|
619
|
-
),
|
|
626
|
+
), S(t.appliesToViewIds) || n.push(`${i}.appliesToViewIds must be an array of strings.`), S(t.notAppliedToViewIds) || n.push(`${i}.notAppliedToViewIds must be an array of strings.`), !Array.isArray(t.bindings))
|
|
620
627
|
n.push(`${i}.bindings must be an array.`);
|
|
621
628
|
else {
|
|
622
|
-
const s =
|
|
629
|
+
const s = S(t.appliesToViewIds) ? new Set(t.appliesToViewIds) : void 0, r = S(
|
|
623
630
|
t.notAppliedToViewIds
|
|
624
631
|
) ? new Set(t.notAppliedToViewIds) : void 0;
|
|
625
632
|
t.bindings.forEach((l, d) => {
|
|
@@ -664,7 +671,7 @@ function Ze(e, i) {
|
|
|
664
671
|
];
|
|
665
672
|
if (t.builder !== "semaphor.inputOptions" && n.push(`${i}.builder must be semaphor.inputOptions.`), typeof t.sourceKey != "string" && t.source === void 0 && n.push(`${i} must include source or sourceKey.`), t.source !== void 0) {
|
|
666
673
|
const s = c(t.source);
|
|
667
|
-
!s || s.kind !== "semantic" && s.kind !== "physical" ? n.push(`${i}.source.kind must be semantic or physical.`) : n.push(...
|
|
674
|
+
!s || s.kind !== "semantic" && s.kind !== "physical" ? n.push(`${i}.source.kind must be semantic or physical.`) : n.push(...K(t.source, `${i}.source`));
|
|
668
675
|
}
|
|
669
676
|
return c(t.valueFieldRef) || n.push(`${i}.valueFieldRef is required.`), c(t.labelFieldRef) || n.push(`${i}.labelFieldRef is required.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && n.push(`${i}.limit must be a positive integer.`), n;
|
|
670
677
|
}
|
|
@@ -676,7 +683,7 @@ function lt(e) {
|
|
|
676
683
|
const t = [];
|
|
677
684
|
if (!Je(i.builder))
|
|
678
685
|
return t.push(`${e.path}.builder must be a supported SDK builder.`), t;
|
|
679
|
-
e.sdkBuilder && i.builder !== e.sdkBuilder && t.push(`${e.path}.builder must match sdkBuilder.`), e.queryKind &&
|
|
686
|
+
e.sdkBuilder && i.builder !== e.sdkBuilder && t.push(`${e.path}.builder must match sdkBuilder.`), e.queryKind && D(e.queryKind) && i.builder !== bt(e.queryKind) && t.push(`${e.path}.builder must match queryKind.`);
|
|
680
687
|
const n = c(i.spec);
|
|
681
688
|
if (!n)
|
|
682
689
|
return t.push(`${e.path}.spec must be an object.`), t;
|
|
@@ -688,8 +695,8 @@ function lt(e) {
|
|
|
688
695
|
ze,
|
|
689
696
|
`${e.path}.spec`
|
|
690
697
|
),
|
|
691
|
-
...
|
|
692
|
-
...
|
|
698
|
+
...H(n, e.path),
|
|
699
|
+
...ee(n.measures, `${e.path}.spec.measures`),
|
|
693
700
|
...w(
|
|
694
701
|
n.primaryMeasure,
|
|
695
702
|
`${e.path}.spec.primaryMeasure`
|
|
@@ -698,12 +705,12 @@ function lt(e) {
|
|
|
698
705
|
n.dateField,
|
|
699
706
|
`${e.path}.spec.dateField`
|
|
700
707
|
),
|
|
701
|
-
...
|
|
708
|
+
...ie(
|
|
702
709
|
n.dimensions,
|
|
703
710
|
`${e.path}.spec.dimensions`
|
|
704
711
|
),
|
|
705
|
-
...
|
|
706
|
-
...
|
|
712
|
+
...te(n.orderBy, `${e.path}.spec.orderBy`),
|
|
713
|
+
...U(n.filters, `${e.path}.spec.filters`)
|
|
707
714
|
);
|
|
708
715
|
break;
|
|
709
716
|
case "semaphor.analysis":
|
|
@@ -713,8 +720,8 @@ function lt(e) {
|
|
|
713
720
|
Vi,
|
|
714
721
|
`${e.path}.spec`
|
|
715
722
|
),
|
|
716
|
-
...
|
|
717
|
-
...
|
|
723
|
+
...H(n, e.path),
|
|
724
|
+
...ee(n.measures, `${e.path}.spec.measures`),
|
|
718
725
|
...w(
|
|
719
726
|
n.primaryMeasure,
|
|
720
727
|
`${e.path}.spec.primaryMeasure`
|
|
@@ -723,12 +730,12 @@ function lt(e) {
|
|
|
723
730
|
n.dateField,
|
|
724
731
|
`${e.path}.spec.dateField`
|
|
725
732
|
),
|
|
726
|
-
...
|
|
733
|
+
...ie(
|
|
727
734
|
n.dimensions,
|
|
728
735
|
`${e.path}.spec.dimensions`
|
|
729
736
|
),
|
|
730
|
-
...
|
|
731
|
-
...
|
|
737
|
+
...te(n.orderBy, `${e.path}.spec.orderBy`),
|
|
738
|
+
...U(n.filters, `${e.path}.spec.filters`),
|
|
732
739
|
...ut(n, `${e.path}.spec`)
|
|
733
740
|
);
|
|
734
741
|
break;
|
|
@@ -739,14 +746,14 @@ function lt(e) {
|
|
|
739
746
|
Li,
|
|
740
747
|
`${e.path}.spec`
|
|
741
748
|
),
|
|
742
|
-
...
|
|
743
|
-
...
|
|
749
|
+
...H(n, e.path),
|
|
750
|
+
...ee(n.fields, `${e.path}.spec.fields`),
|
|
744
751
|
...w(
|
|
745
752
|
n.dateField,
|
|
746
753
|
`${e.path}.spec.dateField`
|
|
747
754
|
),
|
|
748
|
-
...
|
|
749
|
-
...
|
|
755
|
+
...te(n.orderBy, `${e.path}.spec.orderBy`),
|
|
756
|
+
...U(n.filters, `${e.path}.spec.filters`),
|
|
750
757
|
...ct(
|
|
751
758
|
n.totals,
|
|
752
759
|
`${e.path}.spec.totals`
|
|
@@ -768,7 +775,7 @@ function lt(e) {
|
|
|
768
775
|
),
|
|
769
776
|
...gt(n.values, `${e.path}.spec.values`),
|
|
770
777
|
...ht(n.sort, `${e.path}.spec.sort`),
|
|
771
|
-
...
|
|
778
|
+
...U(n.filters, `${e.path}.spec.filters`),
|
|
772
779
|
...dt(
|
|
773
780
|
n.displayLimits,
|
|
774
781
|
`${e.path}.spec.displayLimits`
|
|
@@ -782,9 +789,9 @@ function lt(e) {
|
|
|
782
789
|
Ui,
|
|
783
790
|
`${e.path}.spec`
|
|
784
791
|
),
|
|
785
|
-
...
|
|
792
|
+
...H(n, e.path)
|
|
786
793
|
), ((s = c(n.source)) == null ? void 0 : s.kind) !== "sql" && t.push(`${e.path}.spec.source.kind must be sql.`), (typeof n.sql != "string" || !n.sql.trim()) && t.push(`${e.path}.spec.sql is required.`), t.push(
|
|
787
|
-
...
|
|
794
|
+
...ie(
|
|
788
795
|
n.fields,
|
|
789
796
|
`${e.path}.spec.fields`
|
|
790
797
|
)
|
|
@@ -870,23 +877,23 @@ function C(e, i, t) {
|
|
|
870
877
|
i.has(s) || n.push(`${t}.${s} is not supported for this SDK builder.`);
|
|
871
878
|
}), n;
|
|
872
879
|
}
|
|
873
|
-
function
|
|
874
|
-
return c(e.source) ?
|
|
880
|
+
function H(e, i) {
|
|
881
|
+
return c(e.source) ? K(e.source, `${i}.spec.source`) : [`${i}.spec.source must be an object.`];
|
|
875
882
|
}
|
|
876
883
|
function pt(e, i) {
|
|
877
884
|
const t = c(e.source);
|
|
878
885
|
if (!t)
|
|
879
886
|
return [`${i}.spec.source must be an object.`];
|
|
880
|
-
const n =
|
|
887
|
+
const n = K(e.source, `${i}.spec.source`);
|
|
881
888
|
return t.kind !== "semantic" && t.kind !== "physical" && n.push(`${i}.spec.source.kind must be semantic or physical.`), n;
|
|
882
889
|
}
|
|
883
|
-
function
|
|
884
|
-
const t =
|
|
890
|
+
function ee(e, i) {
|
|
891
|
+
const t = _e(e, i);
|
|
885
892
|
return Array.isArray(e) && e.forEach((n, s) => {
|
|
886
893
|
t.push(...h(n, `${i}.${s}`));
|
|
887
894
|
}), t;
|
|
888
895
|
}
|
|
889
|
-
function
|
|
896
|
+
function ie(e, i) {
|
|
890
897
|
if (e === void 0)
|
|
891
898
|
return [];
|
|
892
899
|
if (!Array.isArray(e))
|
|
@@ -896,7 +903,7 @@ function ee(e, i) {
|
|
|
896
903
|
t.push(...h(n, `${i}.${s}`));
|
|
897
904
|
}), t;
|
|
898
905
|
}
|
|
899
|
-
function
|
|
906
|
+
function te(e, i) {
|
|
900
907
|
if (e === void 0)
|
|
901
908
|
return [];
|
|
902
909
|
const t = c(e);
|
|
@@ -906,7 +913,7 @@ function ie(e, i) {
|
|
|
906
913
|
] : [`${i} must be an object.`];
|
|
907
914
|
}
|
|
908
915
|
function mt(e, i) {
|
|
909
|
-
const t =
|
|
916
|
+
const t = _e(e, i);
|
|
910
917
|
return Array.isArray(e) && e.forEach((n, s) => {
|
|
911
918
|
const r = c(n);
|
|
912
919
|
if (!r) {
|
|
@@ -934,7 +941,7 @@ function ft(e, i) {
|
|
|
934
941
|
}), t) : [`${i} must be an array.`];
|
|
935
942
|
}
|
|
936
943
|
function gt(e, i) {
|
|
937
|
-
const t =
|
|
944
|
+
const t = _e(e, i);
|
|
938
945
|
return Array.isArray(e) && e.forEach((n, s) => {
|
|
939
946
|
const r = c(n);
|
|
940
947
|
if (!r) {
|
|
@@ -985,7 +992,7 @@ function yt(e, i) {
|
|
|
985
992
|
function Xe(e, i) {
|
|
986
993
|
return e === "asc" || e === "desc" ? [] : [`${i} must be asc or desc.`];
|
|
987
994
|
}
|
|
988
|
-
function
|
|
995
|
+
function U(e, i) {
|
|
989
996
|
if (e === void 0)
|
|
990
997
|
return [];
|
|
991
998
|
if (!Array.isArray(e))
|
|
@@ -1002,7 +1009,7 @@ function H(e, i) {
|
|
|
1002
1009
|
);
|
|
1003
1010
|
}), t;
|
|
1004
1011
|
}
|
|
1005
|
-
function
|
|
1012
|
+
function _e(e, i) {
|
|
1006
1013
|
return !Array.isArray(e) || e.length === 0 ? [`${i} must be a non-empty array.`] : [];
|
|
1007
1014
|
}
|
|
1008
1015
|
function bt(e) {
|
|
@@ -1094,11 +1101,11 @@ function xt(e, i) {
|
|
|
1094
1101
|
const n = [];
|
|
1095
1102
|
switch (t.kind) {
|
|
1096
1103
|
case "server_query":
|
|
1097
|
-
|
|
1104
|
+
D(t.queryKind) || n.push(
|
|
1098
1105
|
`${i}.queryKind must be a supported codegen query kind.`
|
|
1099
1106
|
), t.queryOwnership !== void 0 && t.queryOwnership !== "view_owned" && t.queryOwnership !== "shared_query" && n.push(
|
|
1100
1107
|
`${i}.queryOwnership must be view_owned or shared_query.`
|
|
1101
|
-
), t.sourceKeys !== void 0 &&
|
|
1108
|
+
), t.sourceKeys !== void 0 && !S(t.sourceKeys) && n.push(`${i}.sourceKeys must be an array of strings.`), t.fieldNames !== void 0 && !S(t.fieldNames) && n.push(`${i}.fieldNames must be an array of strings.`);
|
|
1102
1109
|
break;
|
|
1103
1110
|
case "derived":
|
|
1104
1111
|
(typeof t.upstreamViewId != "string" || !t.upstreamViewId.trim()) && n.push(`${i}.upstreamViewId is required.`), (typeof t.derivation != "string" || !t.derivation.trim()) && n.push(`${i}.derivation is required.`);
|
|
@@ -1164,7 +1171,7 @@ function Rt(e, i, t) {
|
|
|
1164
1171
|
for (const d of ["inputId", "inputLabel"])
|
|
1165
1172
|
(typeof n[d] != "string" || !n[d].trim()) && s.push(`${i}.${d} must be a non-empty string.`);
|
|
1166
1173
|
s.push(
|
|
1167
|
-
...
|
|
1174
|
+
...re(
|
|
1168
1175
|
n.optionSource,
|
|
1169
1176
|
`${i}.optionSource`
|
|
1170
1177
|
)
|
|
@@ -1210,9 +1217,9 @@ function Tt(e, i) {
|
|
|
1210
1217
|
`${i}.${r} is not supported; relationship candidates support only source, sourceFields, target, and targetFields.`
|
|
1211
1218
|
);
|
|
1212
1219
|
}), n.push(
|
|
1213
|
-
...
|
|
1220
|
+
...re(t.source, `${i}.source`)
|
|
1214
1221
|
), n.push(
|
|
1215
|
-
...
|
|
1222
|
+
...re(t.target, `${i}.target`)
|
|
1216
1223
|
);
|
|
1217
1224
|
for (const r of ["sourceFields", "targetFields"]) {
|
|
1218
1225
|
const l = t[r];
|
|
@@ -1245,7 +1252,7 @@ function We(e, i) {
|
|
|
1245
1252
|
`${i}.dataType must be string, number, boolean, date, datetime, or unknown.`
|
|
1246
1253
|
), n;
|
|
1247
1254
|
}
|
|
1248
|
-
function
|
|
1255
|
+
function re(e, i) {
|
|
1249
1256
|
const t = c(e);
|
|
1250
1257
|
if (!t)
|
|
1251
1258
|
return [`${i} must be an object.`];
|
|
@@ -1263,7 +1270,7 @@ function oe(e, i) {
|
|
|
1263
1270
|
);
|
|
1264
1271
|
}), t.kind !== "semantic" && n.push(`${i} must use semantic source identity.`), (typeof t.domainId != "string" || !t.domainId.trim() || typeof t.datasetName != "string" || !t.datasetName.trim()) && n.push(`${i} must include semantic domainId and datasetName.`), n;
|
|
1265
1272
|
}
|
|
1266
|
-
function
|
|
1273
|
+
function D(e) {
|
|
1267
1274
|
return Oi.has(e);
|
|
1268
1275
|
}
|
|
1269
1276
|
function Je(e) {
|
|
@@ -1284,7 +1291,7 @@ function ei(e, i) {
|
|
|
1284
1291
|
if (!t || typeof t.sourceKey == "string" && t.sourceKey.trim())
|
|
1285
1292
|
return n;
|
|
1286
1293
|
if (t.source !== void 0) {
|
|
1287
|
-
const r =
|
|
1294
|
+
const r = K(
|
|
1288
1295
|
t.source,
|
|
1289
1296
|
`${i}.source`
|
|
1290
1297
|
);
|
|
@@ -1295,7 +1302,7 @@ function ei(e, i) {
|
|
|
1295
1302
|
function c(e) {
|
|
1296
1303
|
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
1297
1304
|
}
|
|
1298
|
-
function
|
|
1305
|
+
function S(e) {
|
|
1299
1306
|
return Array.isArray(e) && e.every((i) => typeof i == "string");
|
|
1300
1307
|
}
|
|
1301
1308
|
const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
@@ -1306,7 +1313,7 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
|
1306
1313
|
"MAX",
|
|
1307
1314
|
"MEDIAN",
|
|
1308
1315
|
"DISTINCT"
|
|
1309
|
-
]),
|
|
1316
|
+
]), Z = a.enum([
|
|
1310
1317
|
"postgres",
|
|
1311
1318
|
"mysql",
|
|
1312
1319
|
"mssql",
|
|
@@ -1317,20 +1324,20 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
|
1317
1324
|
"duckdb",
|
|
1318
1325
|
"sqlite",
|
|
1319
1326
|
"unknown"
|
|
1320
|
-
]), jt = a.enum(
|
|
1327
|
+
]), jt = a.enum(B), ii = a.enum(he), X = a.enum([
|
|
1321
1328
|
"dimension",
|
|
1322
1329
|
"measure",
|
|
1323
1330
|
"date",
|
|
1324
1331
|
"id",
|
|
1325
1332
|
"unknown"
|
|
1326
|
-
]),
|
|
1333
|
+
]), W = a.enum([
|
|
1327
1334
|
"string",
|
|
1328
1335
|
"number",
|
|
1329
1336
|
"boolean",
|
|
1330
1337
|
"date",
|
|
1331
1338
|
"datetime",
|
|
1332
1339
|
"unknown"
|
|
1333
|
-
]),
|
|
1340
|
+
]), Y = a.union([a.number(), a.string(), a.null()]), ae = a.enum([
|
|
1334
1341
|
"millisecond",
|
|
1335
1342
|
"second",
|
|
1336
1343
|
"minute",
|
|
@@ -1346,7 +1353,7 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
|
1346
1353
|
mode: a.literal("pattern"),
|
|
1347
1354
|
pattern: a.string().min(1)
|
|
1348
1355
|
}).strict()
|
|
1349
|
-
]),
|
|
1356
|
+
]), le = a.object({
|
|
1350
1357
|
type: a.literal("temporal_bucket"),
|
|
1351
1358
|
presentation: Ct
|
|
1352
1359
|
}).strict(), Ft = a.object({
|
|
@@ -1358,7 +1365,7 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
|
1358
1365
|
kind: a.literal("month_aligned"),
|
|
1359
1366
|
yearStartMonth: a.number().int().min(1).max(12)
|
|
1360
1367
|
}).strict().optional()
|
|
1361
|
-
}).strict(),
|
|
1368
|
+
}).strict(), de = a.object({
|
|
1362
1369
|
kind: a.literal("temporal_bucket"),
|
|
1363
1370
|
granularity: jt,
|
|
1364
1371
|
calendar: Ft
|
|
@@ -1404,10 +1411,10 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
|
1404
1411
|
}).passthrough(),
|
|
1405
1412
|
a.object({
|
|
1406
1413
|
type: a.literal("duration"),
|
|
1407
|
-
inputUnit:
|
|
1414
|
+
inputUnit: ae.optional(),
|
|
1408
1415
|
outputStyle: a.enum(["compact", "digital", "long"]).optional(),
|
|
1409
|
-
largestUnit:
|
|
1410
|
-
smallestUnit:
|
|
1416
|
+
largestUnit: ae.optional(),
|
|
1417
|
+
smallestUnit: ae.optional(),
|
|
1411
1418
|
maxUnits: a.number().optional(),
|
|
1412
1419
|
prefix: a.string().optional(),
|
|
1413
1420
|
suffix: a.string().optional(),
|
|
@@ -1436,7 +1443,7 @@ const b = a.record(a.string(), a.unknown()), M = a.array(b), _ = a.enum([
|
|
|
1436
1443
|
expressionId: a.string()
|
|
1437
1444
|
}).passthrough()
|
|
1438
1445
|
]);
|
|
1439
|
-
function
|
|
1446
|
+
function V(e, i) {
|
|
1440
1447
|
return a.object(e).passthrough().superRefine((t, n) => {
|
|
1441
1448
|
for (const s of i)
|
|
1442
1449
|
Object.prototype.hasOwnProperty.call(t, s) || n.addIssue({
|
|
@@ -1461,22 +1468,22 @@ const ai = a.object({
|
|
|
1461
1468
|
databaseName: a.string().optional(),
|
|
1462
1469
|
schemaName: a.string().optional(),
|
|
1463
1470
|
label: a.string().optional(),
|
|
1464
|
-
dialect:
|
|
1471
|
+
dialect: Z.optional()
|
|
1465
1472
|
}).passthrough(), Ot = a.object({
|
|
1466
1473
|
kind: a.literal("sql"),
|
|
1467
1474
|
connectionId: a.string(),
|
|
1468
|
-
dialect:
|
|
1475
|
+
dialect: Z.optional(),
|
|
1469
1476
|
label: a.string().optional()
|
|
1470
|
-
}).passthrough(),
|
|
1477
|
+
}).passthrough(), N = a.union([
|
|
1471
1478
|
ai,
|
|
1472
1479
|
qt,
|
|
1473
1480
|
Ot
|
|
1474
1481
|
]), T = a.object({
|
|
1475
1482
|
name: a.string(),
|
|
1476
1483
|
label: a.string().optional(),
|
|
1477
|
-
role:
|
|
1478
|
-
dataType:
|
|
1479
|
-
source:
|
|
1484
|
+
role: X.optional(),
|
|
1485
|
+
dataType: W.optional(),
|
|
1486
|
+
source: N.optional(),
|
|
1480
1487
|
aggregate: _.optional()
|
|
1481
1488
|
}).passthrough(), Pt = a.object({
|
|
1482
1489
|
kind: a.literal("field"),
|
|
@@ -1487,8 +1494,8 @@ const ai = a.object({
|
|
|
1487
1494
|
name: a.string(),
|
|
1488
1495
|
label: a.string(),
|
|
1489
1496
|
description: a.string().optional(),
|
|
1490
|
-
resultRole:
|
|
1491
|
-
dataType:
|
|
1497
|
+
resultRole: X,
|
|
1498
|
+
dataType: W,
|
|
1492
1499
|
computeStage: a.enum(["row", "aggregate"]),
|
|
1493
1500
|
expression: a.string(),
|
|
1494
1501
|
expressionLanguage: a.literal("semaphor_sql_template").optional(),
|
|
@@ -1510,7 +1517,7 @@ const ai = a.object({
|
|
|
1510
1517
|
]).optional(),
|
|
1511
1518
|
format: ti.optional(),
|
|
1512
1519
|
tags: a.array(a.string()).optional()
|
|
1513
|
-
}).passthrough(),
|
|
1520
|
+
}).passthrough(), ve = T.and(
|
|
1514
1521
|
a.object({
|
|
1515
1522
|
derivedField: ni.optional()
|
|
1516
1523
|
}).passthrough()
|
|
@@ -1522,11 +1529,11 @@ const ai = a.object({
|
|
|
1522
1529
|
databaseName: a.string().optional(),
|
|
1523
1530
|
schemaName: a.string().optional(),
|
|
1524
1531
|
label: a.string().optional(),
|
|
1525
|
-
dialect:
|
|
1532
|
+
dialect: Z.optional()
|
|
1526
1533
|
}).passthrough(), Vt = a.object({
|
|
1527
1534
|
kind: a.literal("sql"),
|
|
1528
1535
|
connectionId: a.string().optional(),
|
|
1529
|
-
dialect:
|
|
1536
|
+
dialect: Z.optional(),
|
|
1530
1537
|
label: a.string().optional()
|
|
1531
1538
|
}).passthrough(), Lt = a.union([
|
|
1532
1539
|
Bt,
|
|
@@ -1536,21 +1543,21 @@ const ai = a.object({
|
|
|
1536
1543
|
key: a.string().optional(),
|
|
1537
1544
|
name: a.string(),
|
|
1538
1545
|
label: a.string().optional(),
|
|
1539
|
-
role:
|
|
1540
|
-
dataType:
|
|
1546
|
+
role: X.optional(),
|
|
1547
|
+
dataType: W.optional(),
|
|
1541
1548
|
source: Lt.optional(),
|
|
1542
1549
|
aggregate: _.optional(),
|
|
1543
1550
|
derivedField: a.never().optional()
|
|
1544
|
-
}).passthrough(),
|
|
1551
|
+
}).passthrough(), O = a.object({
|
|
1545
1552
|
key: a.string(),
|
|
1546
1553
|
name: a.string(),
|
|
1547
1554
|
label: a.string(),
|
|
1548
|
-
role:
|
|
1549
|
-
dataType:
|
|
1555
|
+
role: X.optional(),
|
|
1556
|
+
dataType: W.optional(),
|
|
1550
1557
|
aggregate: _.optional(),
|
|
1551
|
-
source:
|
|
1558
|
+
source: N.optional(),
|
|
1552
1559
|
derivedField: ni.optional(),
|
|
1553
|
-
temporalBucket:
|
|
1560
|
+
temporalBucket: de.optional(),
|
|
1554
1561
|
rawTemporal: Dt.optional(),
|
|
1555
1562
|
pivotIdentity: a.object({
|
|
1556
1563
|
metricId: a.string().min(1),
|
|
@@ -1559,7 +1566,7 @@ const ai = a.object({
|
|
|
1559
1566
|
a.object({
|
|
1560
1567
|
fieldId: a.string().min(1),
|
|
1561
1568
|
value: a.string().nullable(),
|
|
1562
|
-
temporalBucket:
|
|
1569
|
+
temporalBucket: de.optional()
|
|
1563
1570
|
}).strict()
|
|
1564
1571
|
)
|
|
1565
1572
|
}).strict().optional()
|
|
@@ -1586,12 +1593,12 @@ const ai = a.object({
|
|
|
1586
1593
|
message: `${e.rawTemporal.valueKind} raw temporal values require dataType ${t}.`
|
|
1587
1594
|
});
|
|
1588
1595
|
}
|
|
1589
|
-
}),
|
|
1596
|
+
}), Pn = a.object({
|
|
1590
1597
|
records: M,
|
|
1591
|
-
columns: a.array(
|
|
1592
|
-
}).passthrough(),
|
|
1598
|
+
columns: a.array(O).optional()
|
|
1599
|
+
}).passthrough(), Bn = a.object({
|
|
1593
1600
|
records: M,
|
|
1594
|
-
columns: a.array(
|
|
1601
|
+
columns: a.array(O)
|
|
1595
1602
|
}).passthrough(), si = a.object({
|
|
1596
1603
|
code: a.string(),
|
|
1597
1604
|
message: a.string().optional(),
|
|
@@ -1601,7 +1608,7 @@ const ai = a.object({
|
|
|
1601
1608
|
validDateCandidates: a.array(a.string()).optional(),
|
|
1602
1609
|
validDimensionCandidates: a.array(a.string()).optional(),
|
|
1603
1610
|
recommendedNextStep: a.string()
|
|
1604
|
-
}).passthrough(),
|
|
1611
|
+
}).passthrough(), ue = a.object({
|
|
1605
1612
|
code: a.string(),
|
|
1606
1613
|
message: a.string(),
|
|
1607
1614
|
path: a.string().optional(),
|
|
@@ -1609,8 +1616,8 @@ const ai = a.object({
|
|
|
1609
1616
|
repairHint: si.optional()
|
|
1610
1617
|
}).passthrough(), oi = a.object({
|
|
1611
1618
|
ok: a.boolean(),
|
|
1612
|
-
errors: a.array(
|
|
1613
|
-
warnings: a.array(
|
|
1619
|
+
errors: a.array(ue),
|
|
1620
|
+
warnings: a.array(ue),
|
|
1614
1621
|
repairHints: a.array(si)
|
|
1615
1622
|
}).passthrough(), Ut = a.object({
|
|
1616
1623
|
page: a.number(),
|
|
@@ -1619,7 +1626,7 @@ const ai = a.object({
|
|
|
1619
1626
|
totalCount: a.number(),
|
|
1620
1627
|
hasNextPage: a.boolean(),
|
|
1621
1628
|
hasPrevPage: a.boolean()
|
|
1622
|
-
}).passthrough(),
|
|
1629
|
+
}).passthrough(), L = {
|
|
1623
1630
|
intentId: a.string().optional(),
|
|
1624
1631
|
queryPath: a.enum(["query_spec", "sql", "sql_python"]),
|
|
1625
1632
|
warnings: a.array(a.string()).optional(),
|
|
@@ -1628,34 +1635,34 @@ const ai = a.object({
|
|
|
1628
1635
|
limit: a.number().optional(),
|
|
1629
1636
|
pagination: Ut.optional()
|
|
1630
1637
|
}, Gt = a.object({
|
|
1631
|
-
...
|
|
1638
|
+
...L,
|
|
1632
1639
|
kind: a.literal("metric"),
|
|
1633
|
-
primaryValue:
|
|
1634
|
-
measures: a.record(
|
|
1640
|
+
primaryValue: Y,
|
|
1641
|
+
measures: a.record(Y).optional(),
|
|
1635
1642
|
missingMeasures: a.array(a.string()).optional(),
|
|
1636
1643
|
comparison: a.object({
|
|
1637
1644
|
kind: a.enum(["previous_period", "previous_year", "target"]),
|
|
1638
|
-
value:
|
|
1645
|
+
value: Y.optional(),
|
|
1639
1646
|
delta: a.union([a.number(), a.null()]).optional(),
|
|
1640
1647
|
deltaPercent: a.union([a.number(), a.null()]).optional()
|
|
1641
1648
|
}).passthrough().optional(),
|
|
1642
1649
|
records: M.optional()
|
|
1643
1650
|
}).passthrough(), zt = a.object({
|
|
1644
|
-
...
|
|
1651
|
+
...L,
|
|
1645
1652
|
kind: a.literal("records"),
|
|
1646
|
-
columns: a.array(
|
|
1653
|
+
columns: a.array(O),
|
|
1647
1654
|
records: M,
|
|
1648
1655
|
totals: a.object({
|
|
1649
1656
|
mode: a.literal("server"),
|
|
1650
1657
|
scope: a.literal("filtered_result"),
|
|
1651
1658
|
row: a.record(a.string(), a.unknown()),
|
|
1652
|
-
columns: a.array(
|
|
1659
|
+
columns: a.array(O).optional()
|
|
1653
1660
|
}).passthrough().optional()
|
|
1654
1661
|
}).passthrough(), Yt = a.object({
|
|
1655
|
-
...
|
|
1662
|
+
...L,
|
|
1656
1663
|
kind: a.literal("inputOptions"),
|
|
1657
1664
|
options: a.array(
|
|
1658
|
-
|
|
1665
|
+
V(
|
|
1659
1666
|
{
|
|
1660
1667
|
label: a.string(),
|
|
1661
1668
|
value: a.unknown(),
|
|
@@ -1666,9 +1673,9 @@ const ai = a.object({
|
|
|
1666
1673
|
)
|
|
1667
1674
|
)
|
|
1668
1675
|
}).passthrough(), Qt = a.object({
|
|
1669
|
-
...
|
|
1676
|
+
...L,
|
|
1670
1677
|
kind: a.literal("sql"),
|
|
1671
|
-
columns: a.array(
|
|
1678
|
+
columns: a.array(O),
|
|
1672
1679
|
records: M,
|
|
1673
1680
|
sqlShape: a.object({
|
|
1674
1681
|
statementType: a.string().optional(),
|
|
@@ -1688,12 +1695,12 @@ const ai = a.object({
|
|
|
1688
1695
|
label: a.string(),
|
|
1689
1696
|
field: T,
|
|
1690
1697
|
grain: ii.optional(),
|
|
1691
|
-
temporalBucket:
|
|
1698
|
+
temporalBucket: de.optional(),
|
|
1692
1699
|
subtotal: Zt.optional()
|
|
1693
1700
|
}).passthrough()
|
|
1694
1701
|
),
|
|
1695
1702
|
nodeIds: a.array(a.string())
|
|
1696
|
-
}).passthrough(), R =
|
|
1703
|
+
}).passthrough(), R = V(
|
|
1697
1704
|
{
|
|
1698
1705
|
instanceId: a.string(),
|
|
1699
1706
|
fieldKey: a.string(),
|
|
@@ -1790,7 +1797,7 @@ const ai = a.object({
|
|
|
1790
1797
|
kind: a.string(),
|
|
1791
1798
|
label: a.string().optional(),
|
|
1792
1799
|
payload: a.record(a.string(), a.unknown()).optional()
|
|
1793
|
-
}).passthrough(), sa =
|
|
1800
|
+
}).passthrough(), sa = V(
|
|
1794
1801
|
{
|
|
1795
1802
|
id: a.string(),
|
|
1796
1803
|
axis: a.enum(["row", "column"]),
|
|
@@ -1848,7 +1855,7 @@ const ai = a.object({
|
|
|
1848
1855
|
role: a.enum(["value", "columnSubtotal", "columnGrandTotal"])
|
|
1849
1856
|
}).passthrough()
|
|
1850
1857
|
)
|
|
1851
|
-
}).passthrough(), ra =
|
|
1858
|
+
}).passthrough(), ra = V(
|
|
1852
1859
|
{
|
|
1853
1860
|
rowId: a.string(),
|
|
1854
1861
|
columnId: a.string().optional(),
|
|
@@ -1875,7 +1882,7 @@ const ai = a.object({
|
|
|
1875
1882
|
columns: a.boolean().optional()
|
|
1876
1883
|
}).passthrough()
|
|
1877
1884
|
]).optional()
|
|
1878
|
-
}).passthrough(), da =
|
|
1885
|
+
}).passthrough(), da = V(
|
|
1879
1886
|
{
|
|
1880
1887
|
id: a.string(),
|
|
1881
1888
|
axis: a.enum(["row", "column"]),
|
|
@@ -1912,7 +1919,7 @@ const ai = a.object({
|
|
|
1912
1919
|
).optional(),
|
|
1913
1920
|
rules: a.array(a.record(a.string(), a.unknown())).optional()
|
|
1914
1921
|
}).passthrough(), fa = a.object({
|
|
1915
|
-
...
|
|
1922
|
+
...L,
|
|
1916
1923
|
kind: a.literal("matrix"),
|
|
1917
1924
|
schemaVersion: a.literal(2),
|
|
1918
1925
|
shape: a.enum(["hierarchical", "pivot"]),
|
|
@@ -1948,15 +1955,15 @@ const ai = a.object({
|
|
|
1948
1955
|
"fanout_risk",
|
|
1949
1956
|
"unknown"
|
|
1950
1957
|
]),
|
|
1951
|
-
requiredSources: a.array(
|
|
1958
|
+
requiredSources: a.array(N).optional(),
|
|
1952
1959
|
relationshipsUsed: a.array(a.string()).optional(),
|
|
1953
1960
|
missingSources: a.array(a.string()).optional(),
|
|
1954
1961
|
warnings: a.array(a.string()).optional(),
|
|
1955
1962
|
message: a.string().optional(),
|
|
1956
1963
|
recommendedNextStep: a.string().optional(),
|
|
1957
1964
|
joinPlanSummary: a.object({
|
|
1958
|
-
baseSource:
|
|
1959
|
-
joinedSources: a.array(
|
|
1965
|
+
baseSource: N.optional(),
|
|
1966
|
+
joinedSources: a.array(N).optional(),
|
|
1960
1967
|
joinCount: a.number().optional()
|
|
1961
1968
|
}).passthrough().optional(),
|
|
1962
1969
|
fanoutRisk: a.object({
|
|
@@ -1983,7 +1990,7 @@ const ai = a.object({
|
|
|
1983
1990
|
queryId: a.string().optional(),
|
|
1984
1991
|
summary: a.string(),
|
|
1985
1992
|
evidenceIds: a.array(a.string()).optional(),
|
|
1986
|
-
fieldsUsed: a.array(
|
|
1993
|
+
fieldsUsed: a.array(ve).optional()
|
|
1987
1994
|
}).passthrough()
|
|
1988
1995
|
),
|
|
1989
1996
|
blocked: a.array(
|
|
@@ -2010,11 +2017,11 @@ const ai = a.object({
|
|
|
2010
2017
|
).optional()
|
|
2011
2018
|
}).passthrough(), li = a.object({
|
|
2012
2019
|
scope: a.literal("filtered_query"),
|
|
2013
|
-
measures: a.record(
|
|
2020
|
+
measures: a.record(Y)
|
|
2014
2021
|
}).passthrough(), di = a.object({
|
|
2015
2022
|
answeredObligations: a.array(a.string()),
|
|
2016
2023
|
missingObligations: a.array(a.string()),
|
|
2017
|
-
warnings: a.array(
|
|
2024
|
+
warnings: a.array(ue).optional()
|
|
2018
2025
|
}).passthrough(), ya = a.object({
|
|
2019
2026
|
intentId: a.string().optional(),
|
|
2020
2027
|
queryId: a.string().optional(),
|
|
@@ -2030,7 +2037,7 @@ const ai = a.object({
|
|
|
2030
2037
|
]).optional(),
|
|
2031
2038
|
intent: a.unknown().optional(),
|
|
2032
2039
|
compiledQuery: a.unknown().optional(),
|
|
2033
|
-
fieldsUsed: a.array(
|
|
2040
|
+
fieldsUsed: a.array(ve).optional(),
|
|
2034
2041
|
result: ga.optional(),
|
|
2035
2042
|
validation: oi,
|
|
2036
2043
|
coverage: di.optional(),
|
|
@@ -2052,7 +2059,7 @@ function ba(e) {
|
|
|
2052
2059
|
case "diagnosticFeedback":
|
|
2053
2060
|
return ri.optional();
|
|
2054
2061
|
case "executionFieldArray":
|
|
2055
|
-
return a.array(
|
|
2062
|
+
return a.array(ve).optional();
|
|
2056
2063
|
case "executionResult":
|
|
2057
2064
|
return ya.optional();
|
|
2058
2065
|
case "number":
|
|
@@ -2081,7 +2088,7 @@ const _a = Object.fromEntries(
|
|
|
2081
2088
|
Object.entries(Ci).map(
|
|
2082
2089
|
([e, i]) => [e, ba(i)]
|
|
2083
2090
|
)
|
|
2084
|
-
),
|
|
2091
|
+
), Kn = a.object(_a).strict(), $e = a.object({
|
|
2085
2092
|
sourceKey: a.string().optional(),
|
|
2086
2093
|
kind: a.enum(["semantic", "physical", "sql"]).optional(),
|
|
2087
2094
|
domainId: a.string().optional(),
|
|
@@ -2097,11 +2104,11 @@ const _a = Object.fromEntries(
|
|
|
2097
2104
|
dataType: a.enum(["string", "number", "boolean", "date", "datetime", "unknown"]).optional(),
|
|
2098
2105
|
aggregate: _.optional(),
|
|
2099
2106
|
sourceKey: a.string().optional(),
|
|
2100
|
-
source:
|
|
2107
|
+
source: $e.optional()
|
|
2101
2108
|
}).passthrough(), ui = a.object({
|
|
2102
2109
|
id: a.string().optional(),
|
|
2103
2110
|
builder: a.literal("semaphor.inputOptions"),
|
|
2104
|
-
source:
|
|
2111
|
+
source: $e.optional(),
|
|
2105
2112
|
sourceKey: a.string().optional(),
|
|
2106
2113
|
valueFieldRef: k,
|
|
2107
2114
|
labelFieldRef: k,
|
|
@@ -2170,13 +2177,13 @@ const _a = Object.fromEntries(
|
|
|
2170
2177
|
bindings: a.array(ci),
|
|
2171
2178
|
appliesToViewIds: a.array(a.string()),
|
|
2172
2179
|
notAppliedToViewIds: a.array(a.string())
|
|
2173
|
-
}).passthrough(),
|
|
2174
|
-
schemaVersion: a.literal(
|
|
2180
|
+
}).passthrough(), Vn = a.object({
|
|
2181
|
+
schemaVersion: a.literal(oe),
|
|
2175
2182
|
title: a.string(),
|
|
2176
2183
|
purpose: a.string().optional(),
|
|
2177
2184
|
userGoal: a.string().optional(),
|
|
2178
2185
|
nextStep: a.string().optional(),
|
|
2179
|
-
sources: a.array(
|
|
2186
|
+
sources: a.array($e),
|
|
2180
2187
|
inputs: a.array(va),
|
|
2181
2188
|
views: a.array(Sa),
|
|
2182
2189
|
filterContracts: a.array(wa),
|
|
@@ -2216,7 +2223,7 @@ const _a = Object.fromEntries(
|
|
|
2216
2223
|
message: n
|
|
2217
2224
|
});
|
|
2218
2225
|
});
|
|
2219
|
-
function
|
|
2226
|
+
function Se(e) {
|
|
2220
2227
|
return typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
2221
2228
|
}
|
|
2222
2229
|
function ka(e) {
|
|
@@ -2233,7 +2240,7 @@ function Ia(e) {
|
|
|
2233
2240
|
)
|
|
2234
2241
|
);
|
|
2235
2242
|
}
|
|
2236
|
-
function
|
|
2243
|
+
function we(e) {
|
|
2237
2244
|
const i = Ma(e);
|
|
2238
2245
|
return i ? Ra(i) ? "number" : i.includes("timestamp") || i.includes("datetime") || i.startsWith("time") ? "datetime" : i.includes("date") ? "date" : i.includes("bool") ? "boolean" : "string" : "unknown";
|
|
2239
2246
|
}
|
|
@@ -2268,7 +2275,7 @@ function Ra(e) {
|
|
|
2268
2275
|
});
|
|
2269
2276
|
}
|
|
2270
2277
|
function Ma(e) {
|
|
2271
|
-
let i =
|
|
2278
|
+
let i = Se(e), t = "";
|
|
2272
2279
|
for (; i && i !== t; )
|
|
2273
2280
|
t = i, i = Fe(i, "nullable"), i = Fe(i, "lowcardinality");
|
|
2274
2281
|
return i;
|
|
@@ -2278,7 +2285,7 @@ function Fe(e, i) {
|
|
|
2278
2285
|
return !e.startsWith(t) || !e.endsWith(")") ? e : e.slice(t.length, -1).trim();
|
|
2279
2286
|
}
|
|
2280
2287
|
function Ta(e) {
|
|
2281
|
-
const i =
|
|
2288
|
+
const i = we(e);
|
|
2282
2289
|
return i === "date" || i === "datetime";
|
|
2283
2290
|
}
|
|
2284
2291
|
function pi(e) {
|
|
@@ -2293,20 +2300,20 @@ function De(e) {
|
|
|
2293
2300
|
return mi(e) || i.endsWith("_id") || i.endsWith("_key") || i.endsWith("_number");
|
|
2294
2301
|
}
|
|
2295
2302
|
function fi(e) {
|
|
2296
|
-
return
|
|
2303
|
+
return Se(
|
|
2297
2304
|
ka(e) || e.name || e.alias
|
|
2298
2305
|
).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
2299
2306
|
}
|
|
2300
2307
|
function gi(e, i = {}) {
|
|
2301
|
-
const t =
|
|
2302
|
-
return t === "metric" || t === "measure" ? !i.excludeIdentifiers || !De(e) : t === "groupby" || t === "dimension" || t === "date" || t === "id" ? !1 :
|
|
2308
|
+
const t = Se(e.role);
|
|
2309
|
+
return t === "metric" || t === "measure" ? !i.excludeIdentifiers || !De(e) : t === "groupby" || t === "dimension" || t === "date" || t === "id" ? !1 : we(
|
|
2303
2310
|
e.dataType || e.data_type
|
|
2304
2311
|
) === "number" && (!i.excludeIdentifiers || !De(e));
|
|
2305
2312
|
}
|
|
2306
|
-
function
|
|
2313
|
+
function Ln(e) {
|
|
2307
2314
|
return !gi(e) && !pi(e);
|
|
2308
2315
|
}
|
|
2309
|
-
function
|
|
2316
|
+
function Hn(e) {
|
|
2310
2317
|
const i = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
2311
2318
|
for (const s of e) {
|
|
2312
2319
|
if (mi(s))
|
|
@@ -2348,7 +2355,7 @@ const ja = [
|
|
|
2348
2355
|
fiscal_quarter_short: "quarter",
|
|
2349
2356
|
fiscal_year: "year"
|
|
2350
2357
|
};
|
|
2351
|
-
function
|
|
2358
|
+
function Un(e) {
|
|
2352
2359
|
return typeof e == "string" && Object.prototype.hasOwnProperty.call(hi, e);
|
|
2353
2360
|
}
|
|
2354
2361
|
function Ca(e, i) {
|
|
@@ -2408,7 +2415,7 @@ function Da(e) {
|
|
|
2408
2415
|
function Ne(e, i) {
|
|
2409
2416
|
return e.filter((t) => i.includes(t)).length === 1;
|
|
2410
2417
|
}
|
|
2411
|
-
function
|
|
2418
|
+
function G(e, i) {
|
|
2412
2419
|
return e.some((t) => i.includes(t));
|
|
2413
2420
|
}
|
|
2414
2421
|
function Na(e) {
|
|
@@ -2416,14 +2423,14 @@ function Na(e) {
|
|
|
2416
2423
|
}
|
|
2417
2424
|
function qa(e, i) {
|
|
2418
2425
|
if (Na(e)) return !1;
|
|
2419
|
-
const t = ["YYYY", "YY"], n = ["MMMM", "MMM", "MM"], s = ["HH", "mm", "ss"], r = Ne(e, t), l = Ne(e, n), d = e.includes("DD"), u =
|
|
2426
|
+
const t = ["YYYY", "YY"], n = ["MMMM", "MMM", "MM"], s = ["HH", "mm", "ss"], r = Ne(e, t), l = Ne(e, n), d = e.includes("DD"), u = G(e, s);
|
|
2420
2427
|
switch (i) {
|
|
2421
2428
|
case "second":
|
|
2422
|
-
return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!
|
|
2429
|
+
return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!G(e, [...t, ...n, "DD"]) || r && l && d);
|
|
2423
2430
|
case "minute":
|
|
2424
|
-
return e.includes("HH") && e.includes("mm") && (!
|
|
2431
|
+
return e.includes("HH") && e.includes("mm") && (!G(e, [...t, ...n, "DD"]) || r && l && d);
|
|
2425
2432
|
case "hour":
|
|
2426
|
-
return e.includes("HH") && (!
|
|
2433
|
+
return e.includes("HH") && (!G(e, [...t, ...n, "DD"]) || r && l && d);
|
|
2427
2434
|
case "day":
|
|
2428
2435
|
case "week":
|
|
2429
2436
|
return r && l && d && !u;
|
|
@@ -2435,7 +2442,7 @@ function qa(e, i) {
|
|
|
2435
2442
|
return r && !l && !d && !u;
|
|
2436
2443
|
}
|
|
2437
2444
|
}
|
|
2438
|
-
function
|
|
2445
|
+
function ce(e, i) {
|
|
2439
2446
|
if (e.presentation.mode === "auto")
|
|
2440
2447
|
return { ok: !0 };
|
|
2441
2448
|
if (e.presentation.mode === "preset") {
|
|
@@ -2456,9 +2463,9 @@ function ue(e, i) {
|
|
|
2456
2463
|
message: `Pattern ${e.presentation.pattern} is not compatible with ${i} granularity.`
|
|
2457
2464
|
} : t;
|
|
2458
2465
|
}
|
|
2459
|
-
function
|
|
2466
|
+
function Gn(e, i) {
|
|
2460
2467
|
if (!(!e || !i))
|
|
2461
|
-
return
|
|
2468
|
+
return ce(e, i).ok ? e : void 0;
|
|
2462
2469
|
}
|
|
2463
2470
|
function o(e, i, t) {
|
|
2464
2471
|
return t ? { code: e, message: i, path: t } : { code: e, message: i };
|
|
@@ -2477,10 +2484,10 @@ function yi(e, i) {
|
|
|
2477
2484
|
return Di(e, i);
|
|
2478
2485
|
}
|
|
2479
2486
|
function bi(e, i) {
|
|
2480
|
-
return yi(e, i) &&
|
|
2487
|
+
return yi(e, i) && P(e) === P(i);
|
|
2481
2488
|
}
|
|
2482
2489
|
function Pa(e) {
|
|
2483
|
-
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${
|
|
2490
|
+
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${P(e)}). Use different aggregates to request both, or remove one entry.`;
|
|
2484
2491
|
}
|
|
2485
2492
|
function qe(e) {
|
|
2486
2493
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
@@ -2519,12 +2526,12 @@ function Ba(e, i, t) {
|
|
|
2519
2526
|
}
|
|
2520
2527
|
}
|
|
2521
2528
|
function Ka(e, i) {
|
|
2522
|
-
return
|
|
2529
|
+
return ke(e, i).length === 1;
|
|
2523
2530
|
}
|
|
2524
2531
|
function Va(e, i) {
|
|
2525
|
-
return
|
|
2532
|
+
return ke(e, i).length === 1;
|
|
2526
2533
|
}
|
|
2527
|
-
function
|
|
2534
|
+
function ke(e, i) {
|
|
2528
2535
|
return i.filter(
|
|
2529
2536
|
(n) => La(e, n)
|
|
2530
2537
|
);
|
|
@@ -2533,16 +2540,16 @@ function La(e, i) {
|
|
|
2533
2540
|
return Ha(e, i) ? e.source ? yi(i, e) : !0 : !1;
|
|
2534
2541
|
}
|
|
2535
2542
|
function Ha(e, i) {
|
|
2536
|
-
return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || Ua(e, i) &&
|
|
2543
|
+
return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || Ua(e, i) && P(i) !== P(e));
|
|
2537
2544
|
}
|
|
2538
2545
|
function Ua(e, i) {
|
|
2539
2546
|
return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
|
|
2540
2547
|
}
|
|
2541
|
-
function
|
|
2542
|
-
return
|
|
2548
|
+
function P(e) {
|
|
2549
|
+
return be(e);
|
|
2543
2550
|
}
|
|
2544
2551
|
const Ga = /^(\d{4})-(\d{2})-(\d{2})$/, _i = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
2545
|
-
function
|
|
2552
|
+
function pe(e) {
|
|
2546
2553
|
if (typeof e != "string")
|
|
2547
2554
|
return null;
|
|
2548
2555
|
const i = e.trim(), t = Ga.exec(i);
|
|
@@ -2554,13 +2561,13 @@ function ce(e) {
|
|
|
2554
2561
|
if (!n)
|
|
2555
2562
|
return null;
|
|
2556
2563
|
const [, s, r, l, d, u, p = "00", , y] = n;
|
|
2557
|
-
if (!Oe(s, r, l) || !
|
|
2564
|
+
if (!Oe(s, r, l) || !q(d, 0, 23) || !q(u, 0, 59) || !q(p, 0, 59) || !za(y))
|
|
2558
2565
|
return null;
|
|
2559
2566
|
const x = new Date(i);
|
|
2560
2567
|
return Number.isFinite(x.getTime()) ? x : null;
|
|
2561
2568
|
}
|
|
2562
|
-
function
|
|
2563
|
-
return typeof e != "string" || !_i.test(e.trim()) ? null :
|
|
2569
|
+
function zn(e) {
|
|
2570
|
+
return typeof e != "string" || !_i.test(e.trim()) ? null : pe(e);
|
|
2564
2571
|
}
|
|
2565
2572
|
function Oe(e, i, t) {
|
|
2566
2573
|
const n = Number(e), s = Number(i), r = Number(t);
|
|
@@ -2569,7 +2576,7 @@ function Oe(e, i, t) {
|
|
|
2569
2576
|
const l = new Date(Date.UTC(n, s - 1, r));
|
|
2570
2577
|
return l.getUTCFullYear() === n && l.getUTCMonth() === s - 1 && l.getUTCDate() === r;
|
|
2571
2578
|
}
|
|
2572
|
-
function
|
|
2579
|
+
function q(e, i, t) {
|
|
2573
2580
|
const n = Number(e);
|
|
2574
2581
|
return Number.isInteger(n) && n >= i && n <= t;
|
|
2575
2582
|
}
|
|
@@ -2577,7 +2584,7 @@ function za(e) {
|
|
|
2577
2584
|
if (e === "Z")
|
|
2578
2585
|
return !0;
|
|
2579
2586
|
const i = /^([+-])(\d{2}):(\d{2})$/.exec(e);
|
|
2580
|
-
return !!(i &&
|
|
2587
|
+
return !!(i && q(i[2], 0, 23) && q(i[3], 0, 59));
|
|
2581
2588
|
}
|
|
2582
2589
|
function f(e) {
|
|
2583
2590
|
return typeof e == "string" && e.trim().length > 0;
|
|
@@ -2650,7 +2657,7 @@ function Pe(e, i, t) {
|
|
|
2650
2657
|
);
|
|
2651
2658
|
}
|
|
2652
2659
|
}
|
|
2653
|
-
function
|
|
2660
|
+
function me(e) {
|
|
2654
2661
|
const i = /* @__PURE__ */ new Set();
|
|
2655
2662
|
for (const t of e) {
|
|
2656
2663
|
if (i.has(t))
|
|
@@ -2659,8 +2666,8 @@ function pe(e) {
|
|
|
2659
2666
|
}
|
|
2660
2667
|
return null;
|
|
2661
2668
|
}
|
|
2662
|
-
function
|
|
2663
|
-
|
|
2669
|
+
function ne(e, i, t, n) {
|
|
2670
|
+
me(
|
|
2664
2671
|
e.filter((r) => f(r))
|
|
2665
2672
|
) && n.push(
|
|
2666
2673
|
o(
|
|
@@ -2679,7 +2686,7 @@ const Za = /* @__PURE__ */ new Set([
|
|
|
2679
2686
|
"MEDIAN",
|
|
2680
2687
|
"DISTINCT"
|
|
2681
2688
|
]);
|
|
2682
|
-
function
|
|
2689
|
+
function Ie(e, i, t) {
|
|
2683
2690
|
if (!e || typeof e != "object") {
|
|
2684
2691
|
t.push(
|
|
2685
2692
|
o("missing_source", "Analytics intent needs a source.", i)
|
|
@@ -2745,7 +2752,7 @@ function g(e, i, t, n = {}) {
|
|
|
2745
2752
|
"Field reference needs a name.",
|
|
2746
2753
|
`${i}.name`
|
|
2747
2754
|
)
|
|
2748
|
-
), e.source !== void 0 &&
|
|
2755
|
+
), e.source !== void 0 && Ie(e.source, `${i}.source`, t), I(e.aggregate, `${i}.aggregate`, t);
|
|
2749
2756
|
}
|
|
2750
2757
|
function Xa(e, i, t) {
|
|
2751
2758
|
if (!m(e)) {
|
|
@@ -2770,13 +2777,13 @@ function Xa(e, i, t) {
|
|
|
2770
2777
|
"Input binding kind must be filter or control.",
|
|
2771
2778
|
`${i}.kind`
|
|
2772
2779
|
)
|
|
2773
|
-
), e.field !== void 0 && g(e.field, `${i}.field`, t), e.relationshipHint !== void 0 &&
|
|
2780
|
+
), e.field !== void 0 && g(e.field, `${i}.field`, t), e.relationshipHint !== void 0 && xe(
|
|
2774
2781
|
e.relationshipHint,
|
|
2775
2782
|
`${i}.relationshipHint`,
|
|
2776
2783
|
t
|
|
2777
2784
|
);
|
|
2778
2785
|
}
|
|
2779
|
-
function
|
|
2786
|
+
function xe(e, i, t) {
|
|
2780
2787
|
if (!m(e)) {
|
|
2781
2788
|
t.push(
|
|
2782
2789
|
o(
|
|
@@ -2858,7 +2865,7 @@ function Wa(e, i) {
|
|
|
2858
2865
|
path: `disambiguationFields.${l}`
|
|
2859
2866
|
})) : []
|
|
2860
2867
|
].forEach(({ field: r, path: l }) => {
|
|
2861
|
-
r != null && r.source && !
|
|
2868
|
+
r != null && r.source && !ye(r.source, e.source) && i.push(
|
|
2862
2869
|
o(
|
|
2863
2870
|
"input_options_field_source_mismatch",
|
|
2864
2871
|
"Input option fields must belong to the declared option source.",
|
|
@@ -2926,11 +2933,11 @@ function Wa(e, i) {
|
|
|
2926
2933
|
"Input options population relationshipHint is only valid for related_population.",
|
|
2927
2934
|
"population.relationshipHint"
|
|
2928
2935
|
)
|
|
2929
|
-
), l === "related_population" && (
|
|
2936
|
+
), l === "related_population" && (Ie(
|
|
2930
2937
|
r.baseSource,
|
|
2931
2938
|
"population.baseSource",
|
|
2932
2939
|
i
|
|
2933
|
-
), r.relationshipHint !== void 0 &&
|
|
2940
|
+
), r.relationshipHint !== void 0 && xe(
|
|
2934
2941
|
r.relationshipHint,
|
|
2935
2942
|
"population.relationshipHint",
|
|
2936
2943
|
i
|
|
@@ -3013,7 +3020,7 @@ const tn = /* @__PURE__ */ new Set([
|
|
|
3013
3020
|
"duration",
|
|
3014
3021
|
"string",
|
|
3015
3022
|
"temporal_bucket"
|
|
3016
|
-
]), sn = new Set(
|
|
3023
|
+
]), sn = new Set(B), on = /* @__PURE__ */ new Set([
|
|
3017
3024
|
"millisecond",
|
|
3018
3025
|
"second",
|
|
3019
3026
|
"minute",
|
|
@@ -3040,7 +3047,7 @@ function $i(e, i, t) {
|
|
|
3040
3047
|
"Value format type must be number, currency, percent, percentage, scientific, date, datetime, duration, string, or temporal_bucket.",
|
|
3041
3048
|
`${i}.type`
|
|
3042
3049
|
)
|
|
3043
|
-
), n.type === "temporal_bucket" && !
|
|
3050
|
+
), n.type === "temporal_bucket" && !le.safeParse(e).success && t.push(
|
|
3044
3051
|
o(
|
|
3045
3052
|
"invalid_temporal_bucket_format",
|
|
3046
3053
|
"Temporal bucket format must contain a valid auto, preset, or pattern presentation.",
|
|
@@ -3052,15 +3059,15 @@ function $i(e, i, t) {
|
|
|
3052
3059
|
"Numeric value formats cannot define viewer locale.",
|
|
3053
3060
|
`${i}.locale`
|
|
3054
3061
|
)
|
|
3055
|
-
),
|
|
3062
|
+
), z(
|
|
3056
3063
|
e.minimumFractionDigits,
|
|
3057
3064
|
`${i}.minimumFractionDigits`,
|
|
3058
3065
|
t
|
|
3059
|
-
),
|
|
3066
|
+
), z(
|
|
3060
3067
|
e.maximumFractionDigits,
|
|
3061
3068
|
`${i}.maximumFractionDigits`,
|
|
3062
3069
|
t
|
|
3063
|
-
),
|
|
3070
|
+
), z(e.scale, `${i}.scale`, t), z(e.maxUnits, `${i}.maxUnits`, t), e.useGrouping !== void 0 && typeof e.useGrouping != "boolean" && t.push(
|
|
3064
3071
|
o(
|
|
3065
3072
|
"invalid_value_format_use_grouping",
|
|
3066
3073
|
"Value format useGrouping must be boolean.",
|
|
@@ -3110,7 +3117,7 @@ function Si(e, i, t) {
|
|
|
3110
3117
|
}
|
|
3111
3118
|
$i(e, i, t);
|
|
3112
3119
|
}
|
|
3113
|
-
function
|
|
3120
|
+
function z(e, i, t) {
|
|
3114
3121
|
e !== void 0 && (typeof e != "number" || !Number.isFinite(e)) && t.push(
|
|
3115
3122
|
o(
|
|
3116
3123
|
"invalid_value_format_number",
|
|
@@ -3210,7 +3217,7 @@ function pn(e, i, t) {
|
|
|
3210
3217
|
e !== void 0 && (Mi(e) || t.push(
|
|
3211
3218
|
o(
|
|
3212
3219
|
"invalid_time_grain",
|
|
3213
|
-
`Matrix time grain must be one of: ${
|
|
3220
|
+
`Matrix time grain must be one of: ${he.join(", ")}.`,
|
|
3214
3221
|
i
|
|
3215
3222
|
)
|
|
3216
3223
|
));
|
|
@@ -3341,7 +3348,7 @@ function Ve(e, i, t, n) {
|
|
|
3341
3348
|
), g(u.field, `${d}.field`, t, {
|
|
3342
3349
|
required: !0
|
|
3343
3350
|
}), pn(u.grain, `${d}.grain`, t);
|
|
3344
|
-
const p =
|
|
3351
|
+
const p = we(
|
|
3345
3352
|
(j = u.field) == null ? void 0 : j.dataType
|
|
3346
3353
|
), y = ((E = u.field) == null ? void 0 : E.role) === "date" || p === "date" || p === "datetime", x = p === "string" || p === "number" || p === "boolean";
|
|
3347
3354
|
y && !u.grain && t.push(
|
|
@@ -3356,13 +3363,13 @@ function Ve(e, i, t, n) {
|
|
|
3356
3363
|
"Matrix grain is valid only for temporal axis fields.",
|
|
3357
3364
|
`${d}.grain`
|
|
3358
3365
|
)
|
|
3359
|
-
), u.format !== void 0 && (!u.grain || !
|
|
3366
|
+
), u.format !== void 0 && (!u.grain || !le.safeParse(u.format).success ? t.push(
|
|
3360
3367
|
o(
|
|
3361
3368
|
"invalid_matrix_temporal_format",
|
|
3362
3369
|
"Matrix temporal presentation requires a valid structured format and explicit grain.",
|
|
3363
3370
|
`${d}.format`
|
|
3364
3371
|
)
|
|
3365
|
-
) :
|
|
3372
|
+
) : ce(
|
|
3366
3373
|
u.format,
|
|
3367
3374
|
u.grain
|
|
3368
3375
|
).ok || t.push(
|
|
@@ -3374,15 +3381,15 @@ function Ve(e, i, t, n) {
|
|
|
3374
3381
|
));
|
|
3375
3382
|
const v = u.semanticTemporalPresentation;
|
|
3376
3383
|
if (v !== void 0) {
|
|
3377
|
-
const
|
|
3378
|
-
!u.grain || (v == null ? void 0 : v.granularity) !== u.grain || !
|
|
3384
|
+
const Ae = v == null ? void 0 : v.format;
|
|
3385
|
+
!u.grain || (v == null ? void 0 : v.granularity) !== u.grain || !le.safeParse(Ae).success ? t.push(
|
|
3379
3386
|
o(
|
|
3380
3387
|
"invalid_matrix_temporal_format",
|
|
3381
3388
|
"Matrix semantic temporal presentation must match the selected grain.",
|
|
3382
3389
|
`${d}.semanticTemporalPresentation`
|
|
3383
3390
|
)
|
|
3384
|
-
) :
|
|
3385
|
-
|
|
3391
|
+
) : ce(
|
|
3392
|
+
Ae,
|
|
3386
3393
|
u.grain
|
|
3387
3394
|
).ok || t.push(
|
|
3388
3395
|
o(
|
|
@@ -3569,7 +3576,7 @@ function yn(e, i, t) {
|
|
|
3569
3576
|
)
|
|
3570
3577
|
);
|
|
3571
3578
|
}
|
|
3572
|
-
function
|
|
3579
|
+
function fe(e, i, t, n) {
|
|
3573
3580
|
if (!Array.isArray(e)) {
|
|
3574
3581
|
n.push(
|
|
3575
3582
|
o(
|
|
@@ -3642,7 +3649,7 @@ function Le(e, i, t, n) {
|
|
|
3642
3649
|
`${i}.lazy`
|
|
3643
3650
|
)
|
|
3644
3651
|
), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((s, r) => {
|
|
3645
|
-
|
|
3652
|
+
fe(
|
|
3646
3653
|
s,
|
|
3647
3654
|
`${i}.expandedPaths.${r}`,
|
|
3648
3655
|
t,
|
|
@@ -3763,12 +3770,12 @@ function _n(e, i, t, n, s) {
|
|
|
3763
3770
|
"Matrix value sort must reference an explicit public value id.",
|
|
3764
3771
|
`${d}.by.valueId`
|
|
3765
3772
|
)
|
|
3766
|
-
), u.by.rowPath !== void 0 &&
|
|
3773
|
+
), u.by.rowPath !== void 0 && fe(
|
|
3767
3774
|
u.by.rowPath,
|
|
3768
3775
|
`${d}.by.rowPath`,
|
|
3769
3776
|
i,
|
|
3770
3777
|
s
|
|
3771
|
-
), u.by.columnPath !== void 0 &&
|
|
3778
|
+
), u.by.columnPath !== void 0 && fe(
|
|
3772
3779
|
u.by.columnPath,
|
|
3773
3780
|
`${d}.by.columnPath`,
|
|
3774
3781
|
t,
|
|
@@ -3898,17 +3905,17 @@ function Sn(e, i) {
|
|
|
3898
3905
|
}), n = Ve(e.columns, "columns", i, {
|
|
3899
3906
|
required: !1
|
|
3900
3907
|
}), s = hn(e.values, "values", i);
|
|
3901
|
-
|
|
3908
|
+
Q(e.filters, "filters", i), e.totals !== void 0 && yn(e.totals, "totals", i), ne(
|
|
3902
3909
|
t.map((p) => p.id),
|
|
3903
3910
|
"rows",
|
|
3904
3911
|
"row axis level",
|
|
3905
3912
|
i
|
|
3906
|
-
),
|
|
3913
|
+
), ne(
|
|
3907
3914
|
n.map((p) => p.id),
|
|
3908
3915
|
"columns",
|
|
3909
3916
|
"column axis level",
|
|
3910
3917
|
i
|
|
3911
|
-
),
|
|
3918
|
+
), ne(
|
|
3912
3919
|
s.map((p) => p.id),
|
|
3913
3920
|
"values",
|
|
3914
3921
|
"value",
|
|
@@ -3977,9 +3984,9 @@ function wn(e, i) {
|
|
|
3977
3984
|
)
|
|
3978
3985
|
);
|
|
3979
3986
|
const { timeWindow: t } = e.analysis;
|
|
3980
|
-
t !== void 0 &&
|
|
3987
|
+
t !== void 0 && ge(t, "analysis.timeWindow", i);
|
|
3981
3988
|
}
|
|
3982
|
-
function
|
|
3989
|
+
function ge(e, i, t) {
|
|
3983
3990
|
if (!m(e)) {
|
|
3984
3991
|
t.push(
|
|
3985
3992
|
o(
|
|
@@ -4010,7 +4017,7 @@ function fe(e, i, t) {
|
|
|
4010
4017
|
`${i}.end`
|
|
4011
4018
|
)
|
|
4012
4019
|
), f(e.start) && f(e.end)) {
|
|
4013
|
-
const n =
|
|
4020
|
+
const n = pe(e.start), s = pe(e.end);
|
|
4014
4021
|
n || t.push(
|
|
4015
4022
|
o(
|
|
4016
4023
|
"invalid_time_window",
|
|
@@ -4036,7 +4043,7 @@ function fe(e, i, t) {
|
|
|
4036
4043
|
(typeof e.unit != "string" || !sn.has(e.unit)) && t.push(
|
|
4037
4044
|
o(
|
|
4038
4045
|
"invalid_time_window",
|
|
4039
|
-
`Time window unit must be one of: ${
|
|
4046
|
+
`Time window unit must be one of: ${B.join(", ")}.`,
|
|
4040
4047
|
`${i}.unit`
|
|
4041
4048
|
)
|
|
4042
4049
|
), (typeof e.value != "number" || !Number.isFinite(e.value) || e.value <= 0) && t.push(
|
|
@@ -4059,7 +4066,7 @@ function fe(e, i, t) {
|
|
|
4059
4066
|
)
|
|
4060
4067
|
);
|
|
4061
4068
|
}
|
|
4062
|
-
function
|
|
4069
|
+
function Q(e, i, t) {
|
|
4063
4070
|
if (e !== void 0) {
|
|
4064
4071
|
if (!Array.isArray(e)) {
|
|
4065
4072
|
t.push(
|
|
@@ -4312,7 +4319,7 @@ function kn(e) {
|
|
|
4312
4319
|
)
|
|
4313
4320
|
), { ok: i.length === 0, errors: i, warnings: [] };
|
|
4314
4321
|
}
|
|
4315
|
-
function
|
|
4322
|
+
function Yn(e) {
|
|
4316
4323
|
const i = [];
|
|
4317
4324
|
if (!m(e))
|
|
4318
4325
|
return i.push(
|
|
@@ -4343,7 +4350,7 @@ function zn(e) {
|
|
|
4343
4350
|
const t = e.denominator;
|
|
4344
4351
|
t !== void 0 && (m(t) ? t.scope === "population" ? (g(t.metric, "denominator.metric", i, {
|
|
4345
4352
|
required: !0
|
|
4346
|
-
}),
|
|
4353
|
+
}), Q(
|
|
4347
4354
|
t.filters,
|
|
4348
4355
|
"denominator.filters",
|
|
4349
4356
|
i
|
|
@@ -4395,7 +4402,7 @@ function xi(e) {
|
|
|
4395
4402
|
"Analytics intent version must be 1.",
|
|
4396
4403
|
"version"
|
|
4397
4404
|
)
|
|
4398
|
-
),
|
|
4405
|
+
), Ie(e.source, "source", i), In(e, i), Ja(e, i), "relationshipHint" in e && e.relationshipHint !== void 0 && xe(
|
|
4399
4406
|
e.relationshipHint,
|
|
4400
4407
|
"relationshipHint",
|
|
4401
4408
|
i
|
|
@@ -4435,7 +4442,7 @@ function xi(e) {
|
|
|
4435
4442
|
)
|
|
4436
4443
|
);
|
|
4437
4444
|
}
|
|
4438
|
-
if (m(e.primaryMeasure) && f(e.primaryMeasure.name) &&
|
|
4445
|
+
if (m(e.primaryMeasure) && f(e.primaryMeasure.name) && ke(
|
|
4439
4446
|
e.primaryMeasure,
|
|
4440
4447
|
s
|
|
4441
4448
|
).length > 1 && i.push(
|
|
@@ -4469,13 +4476,13 @@ function xi(e) {
|
|
|
4469
4476
|
"Metric intent dimensions must be an array of field references with names.",
|
|
4470
4477
|
"dimensions"
|
|
4471
4478
|
)
|
|
4472
|
-
), e.dateField !== void 0 && g(e.dateField, "dateField", i), e.timeWindow !== void 0 && (
|
|
4479
|
+
), e.dateField !== void 0 && g(e.dateField, "dateField", i), e.timeWindow !== void 0 && (ge(e.timeWindow, "timeWindow", i), e.dateField || i.push(
|
|
4473
4480
|
o(
|
|
4474
4481
|
"missing_time_window_date_field",
|
|
4475
4482
|
"Metric timeWindow needs a dateField.",
|
|
4476
4483
|
"dateField"
|
|
4477
4484
|
)
|
|
4478
|
-
)),
|
|
4485
|
+
)), Q(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((r, l) => {
|
|
4479
4486
|
g(r, `dimensions.${l}`, i);
|
|
4480
4487
|
}), e.orderBy !== void 0) {
|
|
4481
4488
|
if (!m(e.orderBy))
|
|
@@ -4532,13 +4539,13 @@ function xi(e) {
|
|
|
4532
4539
|
)
|
|
4533
4540
|
), Array.isArray(e.fields) && e.fields.forEach((s, r) => {
|
|
4534
4541
|
g(s, `fields.${r}`, i);
|
|
4535
|
-
}), e.dateField !== void 0 && g(e.dateField, "dateField", i), Pe(e.pagination, "pagination", i), e.timeWindow !== void 0 && (
|
|
4542
|
+
}), e.dateField !== void 0 && g(e.dateField, "dateField", i), Pe(e.pagination, "pagination", i), e.timeWindow !== void 0 && (ge(e.timeWindow, "timeWindow", i), e.dateField || i.push(
|
|
4536
4543
|
o(
|
|
4537
4544
|
"missing_time_window_date_field",
|
|
4538
4545
|
"Records timeWindow needs a dateField.",
|
|
4539
4546
|
"dateField"
|
|
4540
4547
|
)
|
|
4541
|
-
)),
|
|
4548
|
+
)), Q(e.filters, "filters", i), Array.isArray(e.filters) && e.filters.forEach((s, r) => {
|
|
4542
4549
|
m(s) && s.scope === "aggregate" && i.push(
|
|
4543
4550
|
o(
|
|
4544
4551
|
"unsupported_record_filter_scope",
|
|
@@ -4723,7 +4730,7 @@ function xn(e) {
|
|
|
4723
4730
|
repairHints: Ai(i)
|
|
4724
4731
|
};
|
|
4725
4732
|
}
|
|
4726
|
-
function
|
|
4733
|
+
function Qn(e) {
|
|
4727
4734
|
const i = [], t = [];
|
|
4728
4735
|
if (!e || typeof e != "object")
|
|
4729
4736
|
return {
|
|
@@ -4920,7 +4927,7 @@ function Rn(e, i, t, n) {
|
|
|
4920
4927
|
)
|
|
4921
4928
|
);
|
|
4922
4929
|
}
|
|
4923
|
-
function
|
|
4930
|
+
function Zn(e) {
|
|
4924
4931
|
const i = [], t = [];
|
|
4925
4932
|
if (!e || typeof e != "object")
|
|
4926
4933
|
return {
|
|
@@ -4940,7 +4947,7 @@ function Qn(e) {
|
|
|
4940
4947
|
), f(e.title) || i.push(
|
|
4941
4948
|
o("missing_title", "Dashboard intent needs a title.", "title")
|
|
4942
4949
|
);
|
|
4943
|
-
const n = Array.isArray(e.inputs) ? e.inputs : [], s =
|
|
4950
|
+
const n = Array.isArray(e.inputs) ? e.inputs : [], s = me(
|
|
4944
4951
|
n.filter(m).map((u) => u.id).filter((u) => typeof u == "string")
|
|
4945
4952
|
);
|
|
4946
4953
|
s && i.push(
|
|
@@ -4976,7 +4983,7 @@ function Qn(e) {
|
|
|
4976
4983
|
);
|
|
4977
4984
|
const l = r.flatMap(
|
|
4978
4985
|
(u) => u && typeof u == "object" && Array.isArray(u.views) ? u.views.filter(m).map((p) => p.id).filter((p) => !!p) : []
|
|
4979
|
-
), d =
|
|
4986
|
+
), d = me(l);
|
|
4980
4987
|
d && i.push(
|
|
4981
4988
|
o(
|
|
4982
4989
|
"duplicate_view_id",
|
|
@@ -5023,36 +5030,36 @@ function Qn(e) {
|
|
|
5023
5030
|
return { ok: i.length === 0, errors: i, warnings: t };
|
|
5024
5031
|
}
|
|
5025
5032
|
export {
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5033
|
+
Bn as $,
|
|
5034
|
+
Zn as A,
|
|
5035
|
+
Se as B,
|
|
5029
5036
|
ka as C,
|
|
5030
5037
|
Ia as D,
|
|
5031
|
-
|
|
5038
|
+
we as E,
|
|
5032
5039
|
Ta as F,
|
|
5033
5040
|
pi as G,
|
|
5034
5041
|
mi as H,
|
|
5035
5042
|
De as I,
|
|
5036
5043
|
gi as J,
|
|
5037
|
-
|
|
5038
|
-
|
|
5044
|
+
Ln as K,
|
|
5045
|
+
Hn as L,
|
|
5039
5046
|
jt as M,
|
|
5040
|
-
|
|
5047
|
+
le as N,
|
|
5041
5048
|
Dt as O,
|
|
5042
5049
|
ai as P,
|
|
5043
5050
|
qt as Q,
|
|
5044
5051
|
Tn as R,
|
|
5045
|
-
|
|
5052
|
+
oe as S,
|
|
5046
5053
|
jn as T,
|
|
5047
5054
|
Ot as U,
|
|
5048
|
-
|
|
5055
|
+
N as V,
|
|
5049
5056
|
T as W,
|
|
5050
5057
|
ni as X,
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5058
|
+
ve as Y,
|
|
5059
|
+
O as Z,
|
|
5060
|
+
Pn as _,
|
|
5061
|
+
qn as a,
|
|
5062
|
+
ue as a0,
|
|
5056
5063
|
oi as a1,
|
|
5057
5064
|
Gt as a2,
|
|
5058
5065
|
zt as a3,
|
|
@@ -5066,41 +5073,42 @@ export {
|
|
|
5066
5073
|
di as ab,
|
|
5067
5074
|
ya as ac,
|
|
5068
5075
|
_a as ad,
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5076
|
+
Vn as ae,
|
|
5077
|
+
Cn as af,
|
|
5078
|
+
A as ag,
|
|
5079
|
+
Ue as ah,
|
|
5080
|
+
ye as ai,
|
|
5081
|
+
Ge as aj,
|
|
5082
|
+
Dn as ak,
|
|
5083
|
+
Ni as al,
|
|
5084
|
+
ce as am,
|
|
5085
|
+
Un as an,
|
|
5086
|
+
Fa as ao,
|
|
5087
|
+
ja as ap,
|
|
5088
|
+
Gn as aq,
|
|
5081
5089
|
Ei as b,
|
|
5082
|
-
|
|
5090
|
+
be as c,
|
|
5083
5091
|
ji as d,
|
|
5084
5092
|
Ci as e,
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5093
|
+
Kn as f,
|
|
5094
|
+
zn as g,
|
|
5095
|
+
Fn as h,
|
|
5096
|
+
On as i,
|
|
5097
|
+
se as j,
|
|
5098
|
+
B as k,
|
|
5091
5099
|
Ri as l,
|
|
5092
|
-
|
|
5100
|
+
he as m,
|
|
5093
5101
|
Mi as n,
|
|
5094
5102
|
Ti as o,
|
|
5095
|
-
|
|
5103
|
+
Nn as p,
|
|
5096
5104
|
En as q,
|
|
5097
|
-
|
|
5105
|
+
pe as r,
|
|
5098
5106
|
Di as s,
|
|
5099
|
-
|
|
5107
|
+
de as t,
|
|
5100
5108
|
kn as u,
|
|
5101
5109
|
Ye as v,
|
|
5102
|
-
|
|
5110
|
+
Yn as w,
|
|
5103
5111
|
xi as x,
|
|
5104
5112
|
xn as y,
|
|
5105
|
-
|
|
5113
|
+
Qn as z
|
|
5106
5114
|
};
|