@milaboratories/uikit 2.4.1 → 2.4.2
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/.turbo/turbo-build.log +30 -29
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/components/PlAccordion/{ExpandTransition.vue.js → ExpandTransition.vue2.js} +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -0
- package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +1 -1
- package/dist/components/PlFileDialog/Local.vue.js +4 -4
- package/dist/components/PlFileInput/PlFileInput.vue.js +14 -14
- package/dist/components/PlLogView/PlLogView.vue.d.ts +8 -0
- package/dist/components/PlLogView/PlLogView.vue.d.ts.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js +85 -59
- package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
- package/dist/components/PlTextArea/PlTextArea.vue.js +1 -1
- package/dist/components/PlTextField/PlTextField.vue.js +1 -1
- package/dist/generated/components/svg/images/{SvgRequired.vue.js → SvgRequired.vue2.js} +1 -1
- package/dist/generated/components/svg/images/SvgRequired.vue2.js.map +1 -0
- package/dist/helpers/dom.d.ts +1 -0
- package/dist/helpers/dom.d.ts.map +1 -1
- package/dist/helpers/dom.js.map +1 -1
- package/dist/helpers/downloadContent.d.ts +5 -0
- package/dist/helpers/downloadContent.d.ts.map +1 -0
- package/dist/helpers/downloadContent.js +32 -0
- package/dist/helpers/downloadContent.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/model/common/dist/index.js +258 -198
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/sdk/model/dist/index.js +486 -482
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/PlLogView/PlLogView.vue +29 -6
- package/src/components/PlLogView/pl-log-view.scss +3 -7
- package/src/helpers/dom.ts +2 -0
- package/src/helpers/downloadContent.ts +75 -0
- package/dist/components/PlAccordion/ExpandTransition.vue.js.map +0 -1
- package/dist/generated/components/svg/images/SvgRequired.vue.js.map +0 -1
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { isDataInfo as ae, extractAllColumns as
|
|
2
|
-
import { PlIdLength as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { BasePlErrorLike as
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
return { type: "Immediate", value:
|
|
1
|
+
import { isDataInfo as ae, extractAllColumns as Fe, mapPTableDef as Oe, selectorsToPredicate as J, withEnrichments as de, AnchoredIdDeriver as pe, isPlRef as ke, mapValueInVOE as De, mapPObjectData as le, ensurePColumn as Re, isPColumnSpec as q, isPColumn as we, PColumnName as $e, readAnnotation as ee, parseJson as Ke, resolveAnchors as fe, deriveNativeId as Ne, isPartitionedDataInfoEntries as je, getAxisId as ge, Annotation as te, entriesToDataInfo as Be, isDataInfoEntries as Pe, dataInfoToEntries as Ve, canonicalizeAxisId as Je, mapDataInfo as Ue } from "../../../lib/model/common/dist/index.js";
|
|
2
|
+
import { AxisSpec as Pt, PlIdLength as At, ValueType as xt, canonicalizeJson as It, getAxesId as St, getFileNameFromHandle as Lt, getFilePathFromHandle as Ct, isImportFileHandleIndex as Et, isImportFileHandleUpload as Tt, mapJoinEntry as Ft, matchAxis as Ot, matchAxisId as kt, matchPColumn as Dt, readMetadata as Rt, stringifyColumnId as $t } from "../../../lib/model/common/dist/index.js";
|
|
3
|
+
import Ae from "../../../_virtual/canonicalize.js";
|
|
4
|
+
import D from "../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
|
|
5
|
+
import { BasePlErrorLike as Nt, ErrorLike as jt, PlErrorLike as Bt, StandardErrorLike as Vt } from "../../../lib/model/pl-error-like/dist/index.js";
|
|
6
|
+
var Me = Object.defineProperty, We = (n, e, t) => e in n ? Me(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, x = (n, e, t) => We(n, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
+
function X(n) {
|
|
8
|
+
return { type: "Immediate", value: n };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function He() {
|
|
11
11
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
return globalThis.getPlatforma(
|
|
13
|
+
function xe(n) {
|
|
14
|
+
if (n && typeof globalThis.getPlatforma == "function")
|
|
15
|
+
return globalThis.getPlatforma(n);
|
|
16
16
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
17
17
|
throw new Error("Can't get platforma instance.");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function qe() {
|
|
20
20
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
21
21
|
}
|
|
22
22
|
function c() {
|
|
23
23
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
24
24
|
throw new Error("Not in config rendering context");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
26
|
+
function j(n, e) {
|
|
27
|
+
const t = qe();
|
|
28
28
|
if (t === void 0) return !1;
|
|
29
|
-
if (
|
|
30
|
-
return t.callbackRegistry[
|
|
29
|
+
if (n in t.callbackRegistry) throw new Error(`Callback with key ${n} already registered.`);
|
|
30
|
+
return t.callbackRegistry[n] = e, !0;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
for (const r of
|
|
32
|
+
const Q = /* @__PURE__ */ new Map();
|
|
33
|
+
function ze(n, e) {
|
|
34
|
+
n in c().callbackRegistry || (c().callbackRegistry[n] = (t) => {
|
|
35
|
+
for (const r of Q.get(n))
|
|
36
36
|
r(t);
|
|
37
|
-
},
|
|
37
|
+
}, Q.set(n, [])), Q.get(n).push(e);
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class P {
|
|
40
40
|
constructor(e, t = (r) => r) {
|
|
41
|
-
|
|
41
|
+
x(this, "isResolved", !1), x(this, "resolvedValue"), this.handle = e, this.postProcess = t, ze(e, (r) => {
|
|
42
42
|
this.resolvedValue = t(r), this.isResolved = !0;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
map(e) {
|
|
46
|
-
return new
|
|
46
|
+
return new P(this.handle, (t) => e(this.postProcess(t)));
|
|
47
47
|
}
|
|
48
48
|
mapDefined(e) {
|
|
49
|
-
return new
|
|
49
|
+
return new P(this.handle, (t) => {
|
|
50
50
|
const r = this.postProcess(t);
|
|
51
51
|
return r ? e(r) : void 0;
|
|
52
52
|
});
|
|
@@ -55,10 +55,10 @@ class w {
|
|
|
55
55
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function re(
|
|
59
|
-
return
|
|
58
|
+
function re(n, e) {
|
|
59
|
+
return n === void 0 ? void 0 : e(n);
|
|
60
60
|
}
|
|
61
|
-
class
|
|
61
|
+
class L {
|
|
62
62
|
constructor(e, t) {
|
|
63
63
|
this.handle = e, this.resolvePath = t;
|
|
64
64
|
}
|
|
@@ -95,11 +95,11 @@ class S {
|
|
|
95
95
|
resolveWithCommon(e, ...t) {
|
|
96
96
|
const r = [
|
|
97
97
|
...this.resolvePath,
|
|
98
|
-
...t.map((
|
|
98
|
+
...t.map((i) => typeof i == "string" ? i : i.field)
|
|
99
99
|
];
|
|
100
100
|
return re(
|
|
101
101
|
c().resolveWithCommon(this.handle, e, ...t),
|
|
102
|
-
(
|
|
102
|
+
(i) => new L(i, r)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
get resourceType() {
|
|
@@ -121,7 +121,7 @@ class S {
|
|
|
121
121
|
const e = [...this.resolvePath, "error"];
|
|
122
122
|
return re(
|
|
123
123
|
c().getError(this.handle),
|
|
124
|
-
(t) => new
|
|
124
|
+
(t) => new L(t, e)
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
listInputFields() {
|
|
@@ -160,9 +160,9 @@ class S {
|
|
|
160
160
|
*/
|
|
161
161
|
getPColumns(e = !1, t = "") {
|
|
162
162
|
const r = this.parsePObjectCollection(e, t);
|
|
163
|
-
return r === void 0 ? void 0 : Object.entries(r).map(([,
|
|
164
|
-
if (!
|
|
165
|
-
return
|
|
163
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
|
|
164
|
+
if (!we(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
165
|
+
return i;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
@@ -176,21 +176,21 @@ class S {
|
|
|
176
176
|
...this.resolvePath
|
|
177
177
|
);
|
|
178
178
|
if (r === void 0) return;
|
|
179
|
-
const
|
|
179
|
+
const i = {};
|
|
180
180
|
for (const [o, s] of Object.entries(r)) {
|
|
181
181
|
const a = [...this.resolvePath, o];
|
|
182
|
-
|
|
182
|
+
i[o] = le(s, (l) => new L(l, a));
|
|
183
183
|
}
|
|
184
|
-
return
|
|
184
|
+
return i;
|
|
185
185
|
}
|
|
186
186
|
getFileContentAsBase64(e) {
|
|
187
|
-
return new
|
|
187
|
+
return new P(c().getBlobContentAsBase64(this.handle, e));
|
|
188
188
|
}
|
|
189
189
|
getFileContentAsString(e) {
|
|
190
|
-
return new
|
|
190
|
+
return new P(c().getBlobContentAsString(this.handle, e));
|
|
191
191
|
}
|
|
192
192
|
getFileContentAsJson(e) {
|
|
193
|
-
return new
|
|
193
|
+
return new P(
|
|
194
194
|
c().getBlobContentAsString(this.handle, e)
|
|
195
195
|
).mapDefined((t) => JSON.parse(t));
|
|
196
196
|
}
|
|
@@ -210,7 +210,7 @@ class S {
|
|
|
210
210
|
* @returns downloaded file handle
|
|
211
211
|
*/
|
|
212
212
|
getFileHandle() {
|
|
213
|
-
return new
|
|
213
|
+
return new P(c().getDownloadedBlobContentHandle(this.handle));
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* @deprecated use getFileHandle
|
|
@@ -222,7 +222,7 @@ class S {
|
|
|
222
222
|
* @returns downloaded file handle
|
|
223
223
|
*/
|
|
224
224
|
getRemoteFileHandle() {
|
|
225
|
-
return new
|
|
225
|
+
return new P(c().getOnDemandBlobContentHandle(this.handle));
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* @deprecated use getRemoteFileHandle
|
|
@@ -234,22 +234,22 @@ class S {
|
|
|
234
234
|
* @returns the url to the extracted folder
|
|
235
235
|
*/
|
|
236
236
|
extractArchiveAndGetURL(e) {
|
|
237
|
-
return new
|
|
237
|
+
return new P(c().extractArchiveAndGetURL(this.handle, e));
|
|
238
238
|
}
|
|
239
239
|
getImportProgress() {
|
|
240
|
-
return new
|
|
240
|
+
return new P(c().getImportProgress(this.handle));
|
|
241
241
|
}
|
|
242
242
|
getLastLogs(e) {
|
|
243
|
-
return new
|
|
243
|
+
return new P(c().getLastLogs(this.handle, e));
|
|
244
244
|
}
|
|
245
245
|
getProgressLog(e) {
|
|
246
|
-
return new
|
|
246
|
+
return new P(c().getProgressLog(this.handle, e));
|
|
247
247
|
}
|
|
248
248
|
getProgressLogWithInfo(e) {
|
|
249
|
-
return new
|
|
249
|
+
return new P(c().getProgressLogWithInfo(this.handle, e));
|
|
250
250
|
}
|
|
251
251
|
getLogHandle() {
|
|
252
|
-
return new
|
|
252
|
+
return new P(c().getLogHandle(this.handle));
|
|
253
253
|
}
|
|
254
254
|
allFieldsResolved(e = "Input") {
|
|
255
255
|
switch (e) {
|
|
@@ -264,160 +264,159 @@ class S {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
mapFields(e, t) {
|
|
267
|
-
const { fieldType: r, requireLocked:
|
|
267
|
+
const { fieldType: r, requireLocked: i, skipUnresolved: o } = {
|
|
268
268
|
fieldType: "Input",
|
|
269
269
|
requireLocked: !0,
|
|
270
270
|
skipUnresolved: !1,
|
|
271
271
|
...t
|
|
272
272
|
}, s = e;
|
|
273
|
-
if (
|
|
273
|
+
if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
274
274
|
return;
|
|
275
275
|
let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
276
276
|
(l) => [l, this.resolve({ field: l, assertFieldType: r })]
|
|
277
277
|
);
|
|
278
|
-
return o && (a = a.filter((l) => l[1] !== void 0)), a.map(([l,
|
|
278
|
+
return o && (a = a.filter((l) => l[1] !== void 0)), a.map(([l, g]) => s(l, g));
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
const
|
|
282
|
-
type:
|
|
283
|
-
importance:
|
|
284
|
-
id:
|
|
285
|
-
label:
|
|
286
|
-
}), Ye =
|
|
287
|
-
function
|
|
288
|
-
const r = /* @__PURE__ */ new Map(),
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
...
|
|
295
|
-
...
|
|
296
|
-
...C ?? []
|
|
281
|
+
const Ge = "staging", Xe = "main", Qe = D.object({
|
|
282
|
+
type: D.string(),
|
|
283
|
+
importance: D.number().optional(),
|
|
284
|
+
id: D.string().optional(),
|
|
285
|
+
label: D.string()
|
|
286
|
+
}), Ye = D.array(Qe), Ze = 1e-3, et = "__LABEL__", me = "__LABEL__@1";
|
|
287
|
+
function Ie(n, e, t = {}) {
|
|
288
|
+
const r = /* @__PURE__ */ new Map(), i = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = n.map((p) => {
|
|
289
|
+
const m = e(p);
|
|
290
|
+
let u, y, _;
|
|
291
|
+
"spec" in m && typeof m.spec == "object" ? (u = m.spec, y = m.prefixTrace, _ = m.suffixTrace) : u = m;
|
|
292
|
+
const I = ee(u, te.Label), C = ee(u, te.Trace), v = (C ? Ye.safeParse(Ke(C)).data : void 0) ?? [], f = [
|
|
293
|
+
...y ?? [],
|
|
294
|
+
...v,
|
|
295
|
+
..._ ?? []
|
|
297
296
|
];
|
|
298
|
-
if (
|
|
299
|
-
const
|
|
300
|
-
t.addLabelAsSuffix ?
|
|
297
|
+
if (I !== void 0) {
|
|
298
|
+
const h = { label: I, type: et, importance: -2 };
|
|
299
|
+
t.addLabelAsSuffix ? f.push(h) : f.splice(0, 0, h);
|
|
301
300
|
}
|
|
302
|
-
const
|
|
303
|
-
for (let
|
|
304
|
-
const { type:
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
o.set(
|
|
308
|
-
|
|
301
|
+
const d = [], A = /* @__PURE__ */ new Map();
|
|
302
|
+
for (let h = f.length - 1; h >= 0; --h) {
|
|
303
|
+
const { type: E } = f[h], M = f[h].importance ?? 0, K = (A.get(E) ?? 0) + 1;
|
|
304
|
+
A.set(E, K);
|
|
305
|
+
const S = `${E}@${K}`;
|
|
306
|
+
o.set(S, (o.get(S) ?? 0) + 1), r.set(
|
|
307
|
+
S,
|
|
309
308
|
Math.max(
|
|
310
|
-
r.get(
|
|
311
|
-
|
|
309
|
+
r.get(S) ?? Number.NEGATIVE_INFINITY,
|
|
310
|
+
M - (f.length - h) * Ze
|
|
312
311
|
)
|
|
313
|
-
),
|
|
312
|
+
), d.push({ ...f[h], fullType: S, occurrenceIndex: K });
|
|
314
313
|
}
|
|
315
|
-
return
|
|
316
|
-
value:
|
|
317
|
-
spec:
|
|
318
|
-
label:
|
|
319
|
-
fullTrace:
|
|
314
|
+
return d.reverse(), {
|
|
315
|
+
value: p,
|
|
316
|
+
spec: u,
|
|
317
|
+
label: I,
|
|
318
|
+
fullTrace: d
|
|
320
319
|
};
|
|
321
|
-
}), a = [], l = [],
|
|
322
|
-
|
|
323
|
-
for (const [
|
|
324
|
-
|
|
325
|
-
const
|
|
320
|
+
}), a = [], l = [], g = [...r];
|
|
321
|
+
g.sort(([, p], [, m]) => m - p);
|
|
322
|
+
for (const [p] of g)
|
|
323
|
+
p.endsWith("@1") || o.get(p) === n.length ? a.push(p) : l.push(p);
|
|
324
|
+
const $ = (p, m = !1) => {
|
|
326
325
|
const u = [];
|
|
327
|
-
for (let
|
|
328
|
-
const
|
|
329
|
-
if (
|
|
330
|
-
if (
|
|
326
|
+
for (let y = 0; y < s.length; y++) {
|
|
327
|
+
const _ = s[y], I = _.fullTrace.filter((f) => p.has(f.fullType) || i && i.has(f.type));
|
|
328
|
+
if (I.length === 0)
|
|
329
|
+
if (m)
|
|
331
330
|
u.push({
|
|
332
331
|
label: "Unlabeled",
|
|
333
|
-
value:
|
|
332
|
+
value: _.value
|
|
334
333
|
});
|
|
335
334
|
else return;
|
|
336
|
-
const C =
|
|
335
|
+
const C = I.map((f) => f.label), v = t.separator ?? " / ";
|
|
337
336
|
u.push({
|
|
338
|
-
label: C.join(
|
|
339
|
-
value:
|
|
337
|
+
label: C.join(v),
|
|
338
|
+
value: _.value
|
|
340
339
|
});
|
|
341
340
|
}
|
|
342
341
|
return u;
|
|
343
342
|
};
|
|
344
343
|
if (a.length === 0) {
|
|
345
344
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
346
|
-
return
|
|
347
|
-
}
|
|
348
|
-
let
|
|
349
|
-
for (;
|
|
350
|
-
const
|
|
351
|
-
t.includeNativeLabel &&
|
|
352
|
-
for (let u = 0; u <
|
|
353
|
-
F >= 0 &&
|
|
354
|
-
const
|
|
355
|
-
if (
|
|
356
|
-
F++, F >= a.length && (
|
|
357
|
-
}
|
|
358
|
-
return
|
|
345
|
+
return $(new Set(me), !0);
|
|
346
|
+
}
|
|
347
|
+
let T = 0, F = -1;
|
|
348
|
+
for (; T < a.length; ) {
|
|
349
|
+
const p = /* @__PURE__ */ new Set();
|
|
350
|
+
t.includeNativeLabel && p.add(me);
|
|
351
|
+
for (let u = 0; u < T; ++u) p.add(a[u]);
|
|
352
|
+
F >= 0 && p.add(a[F]);
|
|
353
|
+
const m = $(p);
|
|
354
|
+
if (m !== void 0 && new Set(m.map((u) => u.label)).size === n.length) return m;
|
|
355
|
+
F++, F >= a.length && (T++, F = T);
|
|
356
|
+
}
|
|
357
|
+
return $(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
359
358
|
}
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
362
|
-
return { baseKey:
|
|
363
|
-
if (
|
|
364
|
-
return { baseKey:
|
|
365
|
-
throw new Error(`key must ends on .index/.values for binary p-column, got: ${
|
|
359
|
+
const U = "PColumnData/", ne = U + "ResourceMap", ie = U + "Partitioned/ResourceMap", B = U + "JsonPartitioned", R = U + "BinaryPartitioned", Se = U + "Partitioned/", G = Se + "JsonPartitioned", V = Se + "BinaryPartitioned", se = (n) => {
|
|
360
|
+
if (n.endsWith(".index"))
|
|
361
|
+
return { baseKey: n.substring(0, n.length - 6), type: "index" };
|
|
362
|
+
if (n.endsWith(".values"))
|
|
363
|
+
return { baseKey: n.substring(0, n.length - 7), type: "values" };
|
|
364
|
+
throw new Error(`key must ends on .index/.values for binary p-column, got: ${n}`);
|
|
366
365
|
};
|
|
367
|
-
function
|
|
368
|
-
if (!
|
|
369
|
-
const e =
|
|
370
|
-
let
|
|
366
|
+
function tt(n) {
|
|
367
|
+
if (!n) return;
|
|
368
|
+
const e = n.resourceType.name, t = n.getDataAsJson(), r = [];
|
|
369
|
+
let i = 0;
|
|
371
370
|
switch (e) {
|
|
372
371
|
case ne:
|
|
373
|
-
|
|
372
|
+
i = t.keyLength;
|
|
374
373
|
break;
|
|
375
374
|
case ie:
|
|
376
|
-
|
|
375
|
+
i = t.partitionKeyLength + t.keyLength;
|
|
377
376
|
break;
|
|
378
|
-
case
|
|
379
|
-
case
|
|
380
|
-
|
|
377
|
+
case B:
|
|
378
|
+
case R:
|
|
379
|
+
i = t.partitionKeyLength;
|
|
381
380
|
break;
|
|
382
|
-
case
|
|
383
|
-
case
|
|
384
|
-
|
|
381
|
+
case V:
|
|
382
|
+
case G:
|
|
383
|
+
i = t.superPartitionKeyLength + t.partitionKeyLength;
|
|
385
384
|
break;
|
|
386
385
|
}
|
|
387
386
|
switch (e) {
|
|
388
387
|
case ne:
|
|
389
|
-
case
|
|
390
|
-
case
|
|
391
|
-
for (let o of
|
|
392
|
-
e ===
|
|
388
|
+
case B:
|
|
389
|
+
case R:
|
|
390
|
+
for (let o of n.listInputFields()) {
|
|
391
|
+
e === R && (o = se(o).baseKey);
|
|
393
392
|
const s = [...JSON.parse(o)];
|
|
394
393
|
r.push(s);
|
|
395
394
|
}
|
|
396
395
|
break;
|
|
397
396
|
case ie:
|
|
398
|
-
case
|
|
399
|
-
case
|
|
400
|
-
for (const o of
|
|
401
|
-
const s = [...JSON.parse(o)], a =
|
|
397
|
+
case V:
|
|
398
|
+
case G:
|
|
399
|
+
for (const o of n.listInputFields()) {
|
|
400
|
+
const s = [...JSON.parse(o)], a = n.resolve({ field: o, assertFieldType: "Input" });
|
|
402
401
|
if (a !== void 0)
|
|
403
402
|
for (let l of a.listInputFields()) {
|
|
404
|
-
e ===
|
|
405
|
-
const
|
|
406
|
-
r.push(
|
|
403
|
+
e === V && (l = se(l).baseKey);
|
|
404
|
+
const g = [...s, ...JSON.parse(l)];
|
|
405
|
+
r.push(g);
|
|
407
406
|
}
|
|
408
407
|
}
|
|
409
408
|
break;
|
|
410
409
|
}
|
|
411
|
-
return { data: r, keyLength:
|
|
410
|
+
return { data: r, keyLength: i };
|
|
412
411
|
}
|
|
413
|
-
function
|
|
414
|
-
if (
|
|
415
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${
|
|
416
|
-
const { parts: e, partitionKeyLength: t } =
|
|
417
|
-
for (let
|
|
412
|
+
function rt(n) {
|
|
413
|
+
if (n.type !== "JsonPartitioned" && n.type !== "BinaryPartitioned")
|
|
414
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${n.type}`);
|
|
415
|
+
const { parts: e, partitionKeyLength: t } = n, r = [];
|
|
416
|
+
for (let i = 0; i < t; ++i)
|
|
418
417
|
r.push(/* @__PURE__ */ new Set());
|
|
419
|
-
for (const
|
|
420
|
-
const o =
|
|
418
|
+
for (const i of e) {
|
|
419
|
+
const o = i.key;
|
|
421
420
|
if (o.length !== t)
|
|
422
421
|
throw new Error(
|
|
423
422
|
`Key length (${o.length}) does not match partition length (${t}) for key: ${JSON.stringify(
|
|
@@ -427,64 +426,64 @@ function et(i) {
|
|
|
427
426
|
for (let s = 0; s < t; ++s)
|
|
428
427
|
r[s].add(o[s]);
|
|
429
428
|
}
|
|
430
|
-
return r.map((
|
|
429
|
+
return r.map((i) => Array.from(i.values()));
|
|
431
430
|
}
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
434
|
-
if (
|
|
435
|
-
return
|
|
436
|
-
const e =
|
|
431
|
+
function nt(n) {
|
|
432
|
+
if (n === void 0) return;
|
|
433
|
+
if (Pe(n))
|
|
434
|
+
return rt(n);
|
|
435
|
+
const e = tt(n);
|
|
437
436
|
if (!e) return;
|
|
438
|
-
const { data: t, keyLength: r } = e,
|
|
437
|
+
const { data: t, keyLength: r } = e, i = [];
|
|
439
438
|
for (let o = 0; o < r; ++o)
|
|
440
|
-
|
|
439
|
+
i.push(/* @__PURE__ */ new Set());
|
|
441
440
|
for (const o of t) {
|
|
442
441
|
if (o.length !== r)
|
|
443
442
|
throw new Error("key length does not match partition length");
|
|
444
443
|
for (let s = 0; s < r; ++s)
|
|
445
|
-
|
|
444
|
+
i[s].add(o[s]);
|
|
446
445
|
}
|
|
447
|
-
return
|
|
446
|
+
return i.map((o) => Array.from(o.values()));
|
|
448
447
|
}
|
|
449
|
-
function oe(
|
|
450
|
-
if (
|
|
451
|
-
const t =
|
|
452
|
-
if (e.length > 0 && (t ===
|
|
448
|
+
function oe(n, e = []) {
|
|
449
|
+
if (n === void 0 || !n.getIsReadyOrError()) return;
|
|
450
|
+
const t = n.resourceType.name, r = n.getDataAsJson();
|
|
451
|
+
if (e.length > 0 && (t === G || t === V))
|
|
453
452
|
throw new Error(`Unexpected nested super-partitioned resource: ${t}`);
|
|
454
453
|
switch (t) {
|
|
455
454
|
case ne:
|
|
456
455
|
case ie:
|
|
457
456
|
throw new Error(`Only data columns are supported, got: ${t}`);
|
|
458
|
-
case
|
|
457
|
+
case B: {
|
|
459
458
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
460
459
|
throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
|
|
461
|
-
const
|
|
462
|
-
for (const o of
|
|
463
|
-
const s =
|
|
460
|
+
const i = [];
|
|
461
|
+
for (const o of n.listInputFields()) {
|
|
462
|
+
const s = n.resolve({ field: o, assertFieldType: "Input" });
|
|
464
463
|
if (s === void 0) return;
|
|
465
464
|
const a = [...e, ...JSON.parse(o)];
|
|
466
|
-
|
|
465
|
+
i.push({ key: a, value: s });
|
|
467
466
|
}
|
|
468
467
|
return {
|
|
469
468
|
type: "JsonPartitioned",
|
|
470
469
|
partitionKeyLength: r.partitionKeyLength,
|
|
471
|
-
parts:
|
|
470
|
+
parts: i
|
|
472
471
|
};
|
|
473
472
|
}
|
|
474
|
-
case
|
|
473
|
+
case R: {
|
|
475
474
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
476
475
|
throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
|
|
477
|
-
const
|
|
478
|
-
for (const s of
|
|
479
|
-
const a = se(s), l =
|
|
476
|
+
const i = [], o = /* @__PURE__ */ new Map();
|
|
477
|
+
for (const s of n.listInputFields()) {
|
|
478
|
+
const a = se(s), l = n.resolve({ field: s, assertFieldType: "Input" });
|
|
480
479
|
if (l === void 0) return;
|
|
481
|
-
let
|
|
482
|
-
|
|
480
|
+
let g = o.get(a.baseKey);
|
|
481
|
+
g || (g = {}, o.set(a.baseKey, g)), a.type === "index" ? g.index = l : g.values = l;
|
|
483
482
|
}
|
|
484
483
|
for (const [s, a] of o.entries()) {
|
|
485
484
|
if (!a.index || !a.values) return;
|
|
486
485
|
const l = [...e, ...JSON.parse(s)];
|
|
487
|
-
|
|
486
|
+
i.push({
|
|
488
487
|
key: l,
|
|
489
488
|
value: {
|
|
490
489
|
index: a.index,
|
|
@@ -495,18 +494,18 @@ function oe(i, e = []) {
|
|
|
495
494
|
return {
|
|
496
495
|
type: "BinaryPartitioned",
|
|
497
496
|
partitionKeyLength: r.partitionKeyLength,
|
|
498
|
-
parts:
|
|
497
|
+
parts: i
|
|
499
498
|
};
|
|
500
499
|
}
|
|
501
|
-
case
|
|
500
|
+
case G: {
|
|
502
501
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
503
502
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
|
|
504
|
-
const
|
|
505
|
-
for (const s of
|
|
506
|
-
const a =
|
|
503
|
+
const i = r.superPartitionKeyLength + r.partitionKeyLength, o = [];
|
|
504
|
+
for (const s of n.listInputFields()) {
|
|
505
|
+
const a = n.resolve({ field: s, assertFieldType: "Input" });
|
|
507
506
|
if (a === void 0) return;
|
|
508
|
-
if (a.resourceType.name !==
|
|
509
|
-
throw new Error(`Expected ${
|
|
507
|
+
if (a.resourceType.name !== B)
|
|
508
|
+
throw new Error(`Expected ${B} inside ${t}, but got ${a.resourceType.name}`);
|
|
510
509
|
const l = oe(a, JSON.parse(s));
|
|
511
510
|
if (l === void 0) return;
|
|
512
511
|
if (l.type !== "JsonPartitioned")
|
|
@@ -515,19 +514,19 @@ function oe(i, e = []) {
|
|
|
515
514
|
}
|
|
516
515
|
return {
|
|
517
516
|
type: "JsonPartitioned",
|
|
518
|
-
partitionKeyLength:
|
|
517
|
+
partitionKeyLength: i,
|
|
519
518
|
parts: o
|
|
520
519
|
};
|
|
521
520
|
}
|
|
522
|
-
case
|
|
521
|
+
case V: {
|
|
523
522
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
524
523
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
|
|
525
|
-
const
|
|
526
|
-
for (const s of
|
|
527
|
-
const a =
|
|
524
|
+
const i = r.superPartitionKeyLength + r.partitionKeyLength, o = [];
|
|
525
|
+
for (const s of n.listInputFields()) {
|
|
526
|
+
const a = n.resolve({ field: s, assertFieldType: "Input" });
|
|
528
527
|
if (a === void 0) return;
|
|
529
|
-
if (a.resourceType.name !==
|
|
530
|
-
throw new Error(`Expected ${
|
|
528
|
+
if (a.resourceType.name !== R)
|
|
529
|
+
throw new Error(`Expected ${R} inside ${t}, but got ${a.resourceType.name}`);
|
|
531
530
|
const l = oe(a, JSON.parse(s));
|
|
532
531
|
if (l === void 0) return;
|
|
533
532
|
if (l.type !== "BinaryPartitioned")
|
|
@@ -536,7 +535,7 @@ function oe(i, e = []) {
|
|
|
536
535
|
}
|
|
537
536
|
return {
|
|
538
537
|
type: "BinaryPartitioned",
|
|
539
|
-
partitionKeyLength:
|
|
538
|
+
partitionKeyLength: i,
|
|
540
539
|
parts: o
|
|
541
540
|
};
|
|
542
541
|
}
|
|
@@ -544,19 +543,19 @@ function oe(i, e = []) {
|
|
|
544
543
|
throw new Error(`Unknown resource type: ${t}`);
|
|
545
544
|
}
|
|
546
545
|
}
|
|
547
|
-
function
|
|
548
|
-
if (
|
|
549
|
-
if (
|
|
550
|
-
if (ae(
|
|
551
|
-
if (
|
|
552
|
-
throw new Error(`Unexpected input type: ${typeof
|
|
546
|
+
function it(n) {
|
|
547
|
+
if (n !== void 0) {
|
|
548
|
+
if (Pe(n)) return n;
|
|
549
|
+
if (ae(n)) return Ve(n);
|
|
550
|
+
if (n instanceof L) return oe(n);
|
|
551
|
+
throw new Error(`Unexpected input type: ${typeof n}`);
|
|
553
552
|
}
|
|
554
553
|
}
|
|
555
|
-
function
|
|
556
|
-
const t = [...e].sort((s, a) => a[0] - s[0]), { type: r } =
|
|
554
|
+
function st(n, e) {
|
|
555
|
+
const t = [...e].sort((s, a) => a[0] - s[0]), { type: r } = n;
|
|
557
556
|
switch (r) {
|
|
558
557
|
case "Json": {
|
|
559
|
-
const { keyLength: s } =
|
|
558
|
+
const { keyLength: s } = n;
|
|
560
559
|
for (const [a] of e)
|
|
561
560
|
if (a >= s)
|
|
562
561
|
throw new Error(`Can't filter on non-data axis ${a}. Must be >= ${s}`);
|
|
@@ -565,7 +564,7 @@ function nt(i, e) {
|
|
|
565
564
|
case "JsonPartitioned":
|
|
566
565
|
case "BinaryPartitioned":
|
|
567
566
|
case "ParquetPartitioned": {
|
|
568
|
-
const { partitionKeyLength: s } =
|
|
567
|
+
const { partitionKeyLength: s } = n;
|
|
569
568
|
for (const [a] of e)
|
|
570
569
|
if (a >= s)
|
|
571
570
|
throw new Error(`Can't filter on non-partitioned axis ${a}. Must be >= ${s}`);
|
|
@@ -574,7 +573,7 @@ function nt(i, e) {
|
|
|
574
573
|
default:
|
|
575
574
|
throw new Error(`Unsupported data info type: ${r}`);
|
|
576
575
|
}
|
|
577
|
-
const
|
|
576
|
+
const i = (s) => {
|
|
578
577
|
for (const [a, l] of t)
|
|
579
578
|
if (s[a] !== l)
|
|
580
579
|
return !1;
|
|
@@ -585,12 +584,12 @@ function nt(i, e) {
|
|
|
585
584
|
a.splice(l, 1);
|
|
586
585
|
return a;
|
|
587
586
|
};
|
|
588
|
-
switch (
|
|
587
|
+
switch (n.type) {
|
|
589
588
|
case "Json":
|
|
590
589
|
return {
|
|
591
590
|
type: "Json",
|
|
592
|
-
keyLength:
|
|
593
|
-
data:
|
|
591
|
+
keyLength: n.keyLength - e.length,
|
|
592
|
+
data: n.data.filter((s) => i(s.key)).map((s) => ({
|
|
594
593
|
key: o(s.key),
|
|
595
594
|
value: s.value
|
|
596
595
|
}))
|
|
@@ -598,8 +597,8 @@ function nt(i, e) {
|
|
|
598
597
|
case "JsonPartitioned":
|
|
599
598
|
return {
|
|
600
599
|
type: "JsonPartitioned",
|
|
601
|
-
partitionKeyLength:
|
|
602
|
-
parts:
|
|
600
|
+
partitionKeyLength: n.partitionKeyLength - e.length,
|
|
601
|
+
parts: n.parts.filter((s) => i(s.key)).map((s) => ({
|
|
603
602
|
key: o(s.key),
|
|
604
603
|
value: s.value
|
|
605
604
|
}))
|
|
@@ -607,8 +606,8 @@ function nt(i, e) {
|
|
|
607
606
|
case "BinaryPartitioned":
|
|
608
607
|
return {
|
|
609
608
|
type: "BinaryPartitioned",
|
|
610
|
-
partitionKeyLength:
|
|
611
|
-
parts:
|
|
609
|
+
partitionKeyLength: n.partitionKeyLength - e.length,
|
|
610
|
+
parts: n.parts.filter((s) => i(s.key)).map((s) => ({
|
|
612
611
|
key: o(s.key),
|
|
613
612
|
value: s.value
|
|
614
613
|
}))
|
|
@@ -616,63 +615,63 @@ function nt(i, e) {
|
|
|
616
615
|
case "ParquetPartitioned":
|
|
617
616
|
return {
|
|
618
617
|
type: "ParquetPartitioned",
|
|
619
|
-
partitionKeyLength:
|
|
620
|
-
parts:
|
|
618
|
+
partitionKeyLength: n.partitionKeyLength - e.length,
|
|
619
|
+
parts: n.parts.filter((s) => i(s.key)).map((s) => ({
|
|
621
620
|
key: o(s.key),
|
|
622
621
|
value: s.value
|
|
623
622
|
}))
|
|
624
623
|
};
|
|
625
624
|
}
|
|
626
625
|
}
|
|
627
|
-
function
|
|
628
|
-
if (!Array.isArray(
|
|
629
|
-
if (
|
|
630
|
-
const e =
|
|
626
|
+
function ot(n) {
|
|
627
|
+
if (!Array.isArray(n)) return !1;
|
|
628
|
+
if (n.length === 0) return !0;
|
|
629
|
+
const e = n[0];
|
|
631
630
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
632
631
|
}
|
|
633
|
-
class
|
|
632
|
+
class at {
|
|
634
633
|
constructor(e) {
|
|
635
634
|
this.columns = e;
|
|
636
635
|
}
|
|
637
636
|
selectColumns(e) {
|
|
638
|
-
const t = typeof e == "function" ? e :
|
|
637
|
+
const t = typeof e == "function" ? e : J(e);
|
|
639
638
|
return this.columns.filter((r) => t(r.spec));
|
|
640
639
|
}
|
|
641
640
|
}
|
|
642
|
-
function
|
|
643
|
-
if (
|
|
644
|
-
return
|
|
645
|
-
type: `split:${
|
|
641
|
+
function lt(n) {
|
|
642
|
+
if (n)
|
|
643
|
+
return n.map((e) => ({
|
|
644
|
+
type: `split:${Je(e.axisId)}`,
|
|
646
645
|
label: e.label,
|
|
647
646
|
importance: 1e6
|
|
648
647
|
// High importance for split filters in labels
|
|
649
648
|
}));
|
|
650
649
|
}
|
|
651
|
-
function
|
|
652
|
-
if (
|
|
653
|
-
return
|
|
650
|
+
function ut(n) {
|
|
651
|
+
if (n)
|
|
652
|
+
return n.map((e) => [e.axisIdx, e.value]);
|
|
654
653
|
}
|
|
655
|
-
function
|
|
656
|
-
if (!e || e.length === 0) return
|
|
657
|
-
const t = [...e].sort((r,
|
|
658
|
-
return
|
|
654
|
+
function ct(n, e) {
|
|
655
|
+
if (!e || e.length === 0) return n;
|
|
656
|
+
const t = [...e].sort((r, i) => r[0] - i[0]);
|
|
657
|
+
return Ae({ id: n, axisFilters: t });
|
|
659
658
|
}
|
|
660
|
-
function
|
|
661
|
-
if (!
|
|
662
|
-
const e =
|
|
659
|
+
function ye(n) {
|
|
660
|
+
if (!n || typeof n != "object") return !1;
|
|
661
|
+
const e = n, t = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
663
662
|
return !!e.domainAnchor || t || r;
|
|
664
663
|
}
|
|
665
|
-
function
|
|
666
|
-
if (typeof
|
|
664
|
+
function ht(n) {
|
|
665
|
+
if (typeof n != "object" || !("axes" in n) || n.axes === void 0)
|
|
667
666
|
return [];
|
|
668
|
-
const e =
|
|
669
|
-
if (e.length > 0 &&
|
|
667
|
+
const e = n.axes.map((t, r) => typeof t == "object" && "split" in t && t.split === !0 ? r : -1).filter((t) => t !== -1);
|
|
668
|
+
if (e.length > 0 && n.partialAxesMatch !== void 0)
|
|
670
669
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
671
670
|
return e.sort((t, r) => t - r), e;
|
|
672
671
|
}
|
|
673
|
-
class
|
|
672
|
+
class ve {
|
|
674
673
|
constructor() {
|
|
675
|
-
|
|
674
|
+
x(this, "defaultProviderStore", []), x(this, "providers", [new at(this.defaultProviderStore)]), x(this, "axisLabelProviders", []);
|
|
676
675
|
}
|
|
677
676
|
addColumnProvider(e) {
|
|
678
677
|
return this.providers.push(e), this;
|
|
@@ -694,135 +693,135 @@ class me {
|
|
|
694
693
|
}
|
|
695
694
|
}
|
|
696
695
|
getUniversalEntries(e, t) {
|
|
697
|
-
const { anchorCtx: r, labelOps:
|
|
698
|
-
...s && (
|
|
699
|
-
...
|
|
696
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: o = !1, overrideLabelAnnotation: s = !1, exclude: a } = t ?? {}, l = {
|
|
697
|
+
...s && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
698
|
+
...i ?? {}
|
|
700
699
|
};
|
|
701
|
-
let
|
|
700
|
+
let g = () => !1;
|
|
702
701
|
if (a) {
|
|
703
|
-
const u = (Array.isArray(a) ? a : [a]).map((
|
|
704
|
-
if (
|
|
702
|
+
const u = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
703
|
+
if (ye(y)) {
|
|
705
704
|
if (!r)
|
|
706
705
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
707
|
-
return
|
|
706
|
+
return J(fe(r.anchors, y, t));
|
|
708
707
|
} else
|
|
709
|
-
return
|
|
708
|
+
return J(y);
|
|
710
709
|
});
|
|
711
|
-
|
|
710
|
+
g = (y) => u.some((_) => _(y));
|
|
712
711
|
}
|
|
713
|
-
const
|
|
714
|
-
for (const u of
|
|
715
|
-
const
|
|
716
|
-
let
|
|
717
|
-
if (
|
|
712
|
+
const $ = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], T = [], F = /* @__PURE__ */ new Set();
|
|
713
|
+
for (const u of $) {
|
|
714
|
+
const y = ye(u);
|
|
715
|
+
let _;
|
|
716
|
+
if (y) {
|
|
718
717
|
if (!r)
|
|
719
718
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
720
|
-
|
|
719
|
+
_ = fe(r.anchors, u, t);
|
|
721
720
|
} else
|
|
722
|
-
|
|
723
|
-
const
|
|
721
|
+
_ = u;
|
|
722
|
+
const I = /* @__PURE__ */ new Set(), C = [];
|
|
724
723
|
for (const d of this.providers) {
|
|
725
|
-
const
|
|
726
|
-
for (const
|
|
727
|
-
if (
|
|
728
|
-
if (
|
|
729
|
-
throw new Error(`Duplicate column id ${
|
|
730
|
-
const
|
|
731
|
-
F.has(
|
|
724
|
+
const A = d.selectColumns(_);
|
|
725
|
+
for (const h of A) {
|
|
726
|
+
if (g(h.spec)) continue;
|
|
727
|
+
if (I.has(h.id))
|
|
728
|
+
throw new Error(`Duplicate column id ${h.id} in provider ${d.constructor.name}`);
|
|
729
|
+
const E = Ne(h.spec);
|
|
730
|
+
F.has(E) || (I.add(h.id), F.add(E), C.push(h));
|
|
732
731
|
}
|
|
733
732
|
}
|
|
734
733
|
if (C.length === 0) continue;
|
|
735
|
-
const
|
|
734
|
+
const v = ht(u), f = v.length > 0;
|
|
736
735
|
for (const d of C) {
|
|
737
|
-
if (!
|
|
738
|
-
const
|
|
739
|
-
if (
|
|
740
|
-
if (
|
|
736
|
+
if (!q(d.spec)) continue;
|
|
737
|
+
const A = d.spec;
|
|
738
|
+
if (f) {
|
|
739
|
+
if (ot(d.data))
|
|
741
740
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${d.id}`);
|
|
742
|
-
const
|
|
743
|
-
if (!
|
|
741
|
+
const h = it(d.data);
|
|
742
|
+
if (!h) {
|
|
744
743
|
if (o) continue;
|
|
745
744
|
return;
|
|
746
745
|
}
|
|
747
|
-
if (!
|
|
748
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
751
|
-
throw new Error(`Not enough partition keys (${
|
|
752
|
-
const
|
|
753
|
-
if (
|
|
754
|
-
if (
|
|
746
|
+
if (!je(h))
|
|
747
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${h.type} for column ${d.id}`);
|
|
748
|
+
const E = nt(h), M = v[v.length - 1];
|
|
749
|
+
if (M >= h.partitionKeyLength)
|
|
750
|
+
throw new Error(`Not enough partition keys (${h.partitionKeyLength}) for requested split axes (max index ${M}) in column ${A.name}`);
|
|
751
|
+
const K = v.map((w) => this.findLabels(ge(A.axesSpec[w]))), S = [], ue = (w, N) => {
|
|
752
|
+
if (N >= v.length) {
|
|
753
|
+
if (S.push([...w]), S.length > 1e4)
|
|
755
754
|
throw new Error("Too many key combinations, aborting.");
|
|
756
755
|
return;
|
|
757
756
|
}
|
|
758
|
-
const
|
|
759
|
-
if (
|
|
760
|
-
throw new Error(`Axis index ${
|
|
761
|
-
const
|
|
762
|
-
if (!
|
|
763
|
-
|
|
757
|
+
const O = v[N];
|
|
758
|
+
if (O >= E.length)
|
|
759
|
+
throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${E.length}) during split key generation for column ${d.id}`);
|
|
760
|
+
const k = E[O];
|
|
761
|
+
if (!k || k.length === 0) {
|
|
762
|
+
S.length = 0;
|
|
764
763
|
return;
|
|
765
764
|
}
|
|
766
|
-
for (const
|
|
767
|
-
|
|
765
|
+
for (const W of k)
|
|
766
|
+
w.push(W), ue(w, N + 1), w.pop();
|
|
768
767
|
};
|
|
769
|
-
if (
|
|
768
|
+
if (ue([], 0), S.length === 0)
|
|
770
769
|
continue;
|
|
771
|
-
const
|
|
772
|
-
for (let
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
for (const
|
|
776
|
-
const
|
|
777
|
-
const
|
|
778
|
-
return { axisIdx:
|
|
770
|
+
const ce = [...A.axesSpec], Le = v.map((w) => w);
|
|
771
|
+
for (let w = v.length - 1; w >= 0; w--)
|
|
772
|
+
ce.splice(v[w], 1);
|
|
773
|
+
const Ce = { ...A, axesSpec: ce };
|
|
774
|
+
for (const w of S) {
|
|
775
|
+
const N = w.map((O, k) => {
|
|
776
|
+
const W = Le[k], Ee = ge(A.axesSpec[W]), he = K[k], Te = (he == null ? void 0 : he[O]) ?? String(O);
|
|
777
|
+
return { axisIdx: W, axisId: Ee, value: O, label: Te };
|
|
779
778
|
});
|
|
780
|
-
|
|
779
|
+
T.push({
|
|
781
780
|
type: "split",
|
|
782
781
|
originalColumn: d,
|
|
783
|
-
spec:
|
|
784
|
-
adjustedSpec:
|
|
785
|
-
dataEntries:
|
|
786
|
-
axisFilters:
|
|
782
|
+
spec: A,
|
|
783
|
+
adjustedSpec: Ce,
|
|
784
|
+
dataEntries: h,
|
|
785
|
+
axisFilters: N
|
|
787
786
|
});
|
|
788
787
|
}
|
|
789
788
|
} else
|
|
790
|
-
|
|
789
|
+
T.push({
|
|
791
790
|
type: "direct",
|
|
792
791
|
originalColumn: d,
|
|
793
|
-
spec:
|
|
794
|
-
adjustedSpec:
|
|
792
|
+
spec: A,
|
|
793
|
+
adjustedSpec: A
|
|
795
794
|
});
|
|
796
795
|
}
|
|
797
796
|
}
|
|
798
|
-
if (
|
|
799
|
-
const
|
|
800
|
-
|
|
797
|
+
if (T.length === 0) return [];
|
|
798
|
+
const p = Ie(
|
|
799
|
+
T,
|
|
801
800
|
(u) => ({
|
|
802
801
|
spec: u.spec,
|
|
803
|
-
suffixTrace: u.type === "split" ?
|
|
802
|
+
suffixTrace: u.type === "split" ? lt(u.axisFilters) : void 0
|
|
804
803
|
}),
|
|
805
804
|
l
|
|
806
|
-
),
|
|
807
|
-
for (const { value: u, label:
|
|
808
|
-
const { originalColumn:
|
|
809
|
-
let
|
|
810
|
-
r ?
|
|
805
|
+
), m = [];
|
|
806
|
+
for (const { value: u, label: y } of p) {
|
|
807
|
+
const { originalColumn: _, spec: I } = u, C = u.type === "split" ? u.axisFilters : void 0, v = ut(C);
|
|
808
|
+
let f;
|
|
809
|
+
r ? f = r.deriveS(I, v) : f = ct(_.id, v);
|
|
811
810
|
let d = { ...u.adjustedSpec };
|
|
812
811
|
s && (d = {
|
|
813
812
|
...d,
|
|
814
813
|
annotations: {
|
|
815
814
|
...d.annotations ?? {},
|
|
816
|
-
|
|
815
|
+
[te.Label]: y
|
|
817
816
|
}
|
|
818
|
-
}),
|
|
819
|
-
id:
|
|
817
|
+
}), m.push({
|
|
818
|
+
id: f,
|
|
820
819
|
spec: d,
|
|
821
|
-
data: () => u.type === "split" ?
|
|
822
|
-
label:
|
|
820
|
+
data: () => u.type === "split" ? Be(st(u.dataEntries, v)) : u.originalColumn.data,
|
|
821
|
+
label: y
|
|
823
822
|
});
|
|
824
823
|
}
|
|
825
|
-
return
|
|
824
|
+
return m;
|
|
826
825
|
}
|
|
827
826
|
getColumns(e, t) {
|
|
828
827
|
const r = this.getUniversalEntries(e, {
|
|
@@ -831,68 +830,68 @@ class me {
|
|
|
831
830
|
...t ?? {}
|
|
832
831
|
});
|
|
833
832
|
if (!r) return;
|
|
834
|
-
const
|
|
833
|
+
const i = [];
|
|
835
834
|
for (const o of r) {
|
|
836
835
|
const s = o.data();
|
|
837
836
|
if (!s) {
|
|
838
837
|
if (t != null && t.dontWaitAllData) continue;
|
|
839
838
|
return;
|
|
840
839
|
}
|
|
841
|
-
|
|
840
|
+
i.push({
|
|
842
841
|
id: o.id,
|
|
843
842
|
spec: o.spec,
|
|
844
843
|
data: s
|
|
845
844
|
});
|
|
846
845
|
}
|
|
847
|
-
return
|
|
846
|
+
return i;
|
|
848
847
|
}
|
|
849
848
|
}
|
|
850
|
-
function
|
|
851
|
-
const e = (
|
|
849
|
+
function be(n) {
|
|
850
|
+
const e = (i) => i.operator !== "InSet" ? i : {
|
|
852
851
|
operator: "Or",
|
|
853
|
-
operands:
|
|
852
|
+
operands: i.references.map((o) => ({
|
|
854
853
|
operator: "Equal",
|
|
855
854
|
reference: o
|
|
856
855
|
}))
|
|
857
|
-
}, t = (
|
|
858
|
-
switch (
|
|
856
|
+
}, t = (i, o) => {
|
|
857
|
+
switch (i.operator) {
|
|
859
858
|
case "And":
|
|
860
859
|
return {
|
|
861
|
-
...
|
|
862
|
-
operands:
|
|
860
|
+
...i,
|
|
861
|
+
operands: i.operands.map((s) => t(s, o))
|
|
863
862
|
};
|
|
864
863
|
case "Or":
|
|
865
864
|
return {
|
|
866
|
-
...
|
|
867
|
-
operands:
|
|
865
|
+
...i,
|
|
866
|
+
operands: i.operands.map((s) => t(s, o))
|
|
868
867
|
};
|
|
869
868
|
case "Not":
|
|
870
869
|
return {
|
|
871
|
-
...
|
|
872
|
-
operand: t(
|
|
870
|
+
...i,
|
|
871
|
+
operand: t(i.operand, o)
|
|
873
872
|
};
|
|
874
873
|
default:
|
|
875
|
-
return o(
|
|
874
|
+
return o(i);
|
|
876
875
|
}
|
|
877
|
-
}, r = (
|
|
878
|
-
...
|
|
879
|
-
predicate: t(
|
|
876
|
+
}, r = (i, o) => ({
|
|
877
|
+
...i,
|
|
878
|
+
predicate: t(i.predicate, o)
|
|
880
879
|
});
|
|
881
|
-
return
|
|
880
|
+
return n.map((i) => r(i, e));
|
|
882
881
|
}
|
|
883
|
-
function
|
|
884
|
-
if (
|
|
882
|
+
function Y(n, e) {
|
|
883
|
+
if (n === void 0) return e === void 0;
|
|
885
884
|
if (e === void 0) return !0;
|
|
886
885
|
for (const t in e)
|
|
887
|
-
if (
|
|
886
|
+
if (n[t] !== e[t]) return !1;
|
|
888
887
|
return !0;
|
|
889
888
|
}
|
|
890
|
-
function
|
|
891
|
-
return le(
|
|
889
|
+
function _e(n) {
|
|
890
|
+
return le(n, (e) => e instanceof L ? e.handle : ae(e) ? Ue(e, (t) => t.handle) : e);
|
|
892
891
|
}
|
|
893
|
-
class
|
|
892
|
+
class dt {
|
|
894
893
|
constructor() {
|
|
895
|
-
|
|
894
|
+
x(this, "ctx", c());
|
|
896
895
|
}
|
|
897
896
|
/**
|
|
898
897
|
* @deprecated use getOptions()
|
|
@@ -901,28 +900,28 @@ class ct {
|
|
|
901
900
|
return this.ctx.calculateOptions(e);
|
|
902
901
|
}
|
|
903
902
|
getOptions(e, t) {
|
|
904
|
-
const r = typeof e == "function" ? e :
|
|
903
|
+
const r = typeof e == "function" ? e : J(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
905
904
|
let o = {}, s = !1;
|
|
906
|
-
return typeof t < "u" && (typeof t == "function" ? o = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? o = t : (t = t, o = t.label ?? {}, s = t.refsWithEnrichments ?? !1))), typeof o == "object" ?
|
|
907
|
-
ref:
|
|
905
|
+
return typeof t < "u" && (typeof t == "function" ? o = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? o = t : (t = t, o = t.label ?? {}, s = t.refsWithEnrichments ?? !1))), typeof o == "object" ? Ie(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
906
|
+
ref: de(a, s),
|
|
908
907
|
label: l
|
|
909
|
-
})) :
|
|
910
|
-
ref:
|
|
908
|
+
})) : i.map(({ ref: a, obj: l }) => ({
|
|
909
|
+
ref: de(a, s),
|
|
911
910
|
label: o(l, a)
|
|
912
911
|
}));
|
|
913
912
|
}
|
|
914
913
|
resolveAnchorCtx(e) {
|
|
915
|
-
if (e instanceof
|
|
914
|
+
if (e instanceof pe) return e;
|
|
916
915
|
const t = {};
|
|
917
|
-
for (const [r,
|
|
918
|
-
if (
|
|
919
|
-
const o = this.getPColumnSpecByRef(
|
|
916
|
+
for (const [r, i] of Object.entries(e))
|
|
917
|
+
if (ke(i)) {
|
|
918
|
+
const o = this.getPColumnSpecByRef(i);
|
|
920
919
|
if (!o)
|
|
921
920
|
return;
|
|
922
921
|
t[r] = o;
|
|
923
922
|
} else
|
|
924
|
-
t[r] =
|
|
925
|
-
return new
|
|
923
|
+
t[r] = i;
|
|
924
|
+
return new pe(t);
|
|
926
925
|
}
|
|
927
926
|
/**
|
|
928
927
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -933,11 +932,11 @@ class ct {
|
|
|
933
932
|
* @returns A PFrameHandle for the created PFrame, or undefined if any required data is missing
|
|
934
933
|
*/
|
|
935
934
|
getAnchoredPColumns(e, t, r) {
|
|
936
|
-
const
|
|
937
|
-
if (
|
|
938
|
-
return new
|
|
935
|
+
const i = this.resolveAnchorCtx(e);
|
|
936
|
+
if (i)
|
|
937
|
+
return new ve().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t, {
|
|
939
938
|
...r,
|
|
940
|
-
anchorCtx:
|
|
939
|
+
anchorCtx: i
|
|
941
940
|
});
|
|
942
941
|
}
|
|
943
942
|
/**
|
|
@@ -970,11 +969,11 @@ class ct {
|
|
|
970
969
|
* or undefined if any PlRef resolution fails.
|
|
971
970
|
*/
|
|
972
971
|
getCanonicalOptions(e, t, r) {
|
|
973
|
-
const
|
|
974
|
-
if (!
|
|
975
|
-
const o = new
|
|
972
|
+
const i = this.resolveAnchorCtx(e);
|
|
973
|
+
if (!i) return;
|
|
974
|
+
const o = new ve().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t, {
|
|
976
975
|
...r,
|
|
977
|
-
anchorCtx:
|
|
976
|
+
anchorCtx: i
|
|
978
977
|
});
|
|
979
978
|
if (o)
|
|
980
979
|
return o.map((s) => ({
|
|
@@ -996,7 +995,7 @@ class ct {
|
|
|
996
995
|
ref: t.ref,
|
|
997
996
|
obj: {
|
|
998
997
|
...t.obj,
|
|
999
|
-
data: new
|
|
998
|
+
data: new L(t.obj.data, [t.ref.blockId, t.ref.name])
|
|
1000
999
|
}
|
|
1001
1000
|
}))
|
|
1002
1001
|
};
|
|
@@ -1015,9 +1014,9 @@ class ct {
|
|
|
1015
1014
|
ref: t.ref,
|
|
1016
1015
|
obj: {
|
|
1017
1016
|
...t.obj,
|
|
1018
|
-
data:
|
|
1017
|
+
data: De(
|
|
1019
1018
|
t.obj.data,
|
|
1020
|
-
(r) => new
|
|
1019
|
+
(r) => new L(r, [t.ref.blockId, t.ref.name])
|
|
1021
1020
|
)
|
|
1022
1021
|
}
|
|
1023
1022
|
}))
|
|
@@ -1040,13 +1039,13 @@ class ct {
|
|
|
1040
1039
|
var t;
|
|
1041
1040
|
if (typeof this.ctx.getDataFromResultPoolByRef > "u")
|
|
1042
1041
|
return (t = this.getData().entries.find(
|
|
1043
|
-
(
|
|
1042
|
+
(i) => i.ref.blockId === e.blockId && i.ref.name === e.name
|
|
1044
1043
|
)) == null ? void 0 : t.obj;
|
|
1045
1044
|
const r = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1046
1045
|
if (r)
|
|
1047
1046
|
return le(
|
|
1048
1047
|
r,
|
|
1049
|
-
(
|
|
1048
|
+
(i) => new L(i, [e.blockId, e.name])
|
|
1050
1049
|
);
|
|
1051
1050
|
}
|
|
1052
1051
|
/**
|
|
@@ -1057,7 +1056,7 @@ class ct {
|
|
|
1057
1056
|
getPColumnByRef(e) {
|
|
1058
1057
|
const t = this.getDataByRef(e);
|
|
1059
1058
|
if (t)
|
|
1060
|
-
return
|
|
1059
|
+
return Re(t);
|
|
1061
1060
|
}
|
|
1062
1061
|
/**
|
|
1063
1062
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1067,7 +1066,7 @@ class ct {
|
|
|
1067
1066
|
getPColumnSpecByRef(e) {
|
|
1068
1067
|
const t = this.getSpecByRef(e);
|
|
1069
1068
|
if (t) {
|
|
1070
|
-
if (!
|
|
1069
|
+
if (!q(t)) throw new Error(`not a PColumn spec (kind = ${t.kind})`);
|
|
1071
1070
|
return t;
|
|
1072
1071
|
}
|
|
1073
1072
|
}
|
|
@@ -1086,13 +1085,13 @@ class ct {
|
|
|
1086
1085
|
findDataWithCompatibleSpec(e) {
|
|
1087
1086
|
const t = [];
|
|
1088
1087
|
e: for (const r of this.getData().entries) {
|
|
1089
|
-
if (!
|
|
1088
|
+
if (!q(r.obj.spec))
|
|
1090
1089
|
continue;
|
|
1091
|
-
const
|
|
1092
|
-
if (e.name ===
|
|
1090
|
+
const i = r.obj.spec;
|
|
1091
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && Y(e.domain, i.domain)) {
|
|
1093
1092
|
for (let o = 0; o < e.axesSpec.length; ++o) {
|
|
1094
|
-
const s = e.axesSpec[o], a =
|
|
1095
|
-
if (s.name !== a.name || s.type !== a.type || !
|
|
1093
|
+
const s = e.axesSpec[o], a = i.axesSpec[o];
|
|
1094
|
+
if (s.name !== a.name || s.type !== a.type || !Y(s.domain, a.domain))
|
|
1096
1095
|
continue e;
|
|
1097
1096
|
}
|
|
1098
1097
|
t.push(r.obj);
|
|
@@ -1107,9 +1106,9 @@ class ct {
|
|
|
1107
1106
|
findLabels(e) {
|
|
1108
1107
|
const t = this.getData();
|
|
1109
1108
|
for (const r of t.entries) {
|
|
1110
|
-
if (!
|
|
1111
|
-
const
|
|
1112
|
-
if (
|
|
1109
|
+
if (!we(r.obj)) continue;
|
|
1110
|
+
const i = r.obj.spec;
|
|
1111
|
+
if (i.name === $e.Label && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && Y(e.domain, i.axesSpec[0].domain)) {
|
|
1113
1112
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1114
1113
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1115
1114
|
return Object.fromEntries(
|
|
@@ -1128,13 +1127,13 @@ class ct {
|
|
|
1128
1127
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1129
1128
|
*/
|
|
1130
1129
|
selectColumns(e) {
|
|
1131
|
-
const t = typeof e == "function" ? e :
|
|
1132
|
-
return this.getSpecs().entries.filter(({ obj: r }) =>
|
|
1133
|
-
const o =
|
|
1130
|
+
const t = typeof e == "function" ? e : J(e);
|
|
1131
|
+
return this.getSpecs().entries.filter(({ obj: r }) => q(r) ? t(r) : !1).map(({ ref: r, obj: i }) => {
|
|
1132
|
+
const o = i;
|
|
1134
1133
|
let s = null;
|
|
1135
1134
|
const a = this;
|
|
1136
1135
|
return {
|
|
1137
|
-
id:
|
|
1136
|
+
id: Ae(r),
|
|
1138
1137
|
spec: o,
|
|
1139
1138
|
get data() {
|
|
1140
1139
|
var l;
|
|
@@ -1148,20 +1147,19 @@ class ct {
|
|
|
1148
1147
|
* @returns a map of axis value => label
|
|
1149
1148
|
*/
|
|
1150
1149
|
findLabelsForColumnAxis(e, t) {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
return Object.fromEntries(s.map((a) => [a, n[a] ?? "Unlabelled"]));
|
|
1150
|
+
const r = this.findLabels(e.axesSpec[t]);
|
|
1151
|
+
if (!r) return;
|
|
1152
|
+
const i = ee(e, `pl7.app/axisKeys/${t}`);
|
|
1153
|
+
if (i !== void 0) {
|
|
1154
|
+
const o = JSON.parse(i);
|
|
1155
|
+
return Object.fromEntries(o.map((s) => [s, r[s] ?? "Unlabelled"]));
|
|
1158
1156
|
} else
|
|
1159
|
-
return
|
|
1157
|
+
return r;
|
|
1160
1158
|
}
|
|
1161
1159
|
}
|
|
1162
|
-
class
|
|
1160
|
+
class H {
|
|
1163
1161
|
constructor() {
|
|
1164
|
-
|
|
1162
|
+
x(this, "ctx"), x(this, "_argsCache"), x(this, "_uiStateCache"), x(this, "_activeArgsCache"), x(this, "resultPool", new dt()), this.ctx = c();
|
|
1165
1163
|
}
|
|
1166
1164
|
get args() {
|
|
1167
1165
|
if (this._argsCache === void 0) {
|
|
@@ -1197,14 +1195,14 @@ class G {
|
|
|
1197
1195
|
getNamedAccessor(e) {
|
|
1198
1196
|
return re(
|
|
1199
1197
|
this.ctx.getAccessorHandleByName(e),
|
|
1200
|
-
(t) => new
|
|
1198
|
+
(t) => new L(t, [e])
|
|
1201
1199
|
);
|
|
1202
1200
|
}
|
|
1203
1201
|
get prerun() {
|
|
1204
|
-
return this.getNamedAccessor(
|
|
1202
|
+
return this.getNamedAccessor(Ge);
|
|
1205
1203
|
}
|
|
1206
1204
|
get outputs() {
|
|
1207
|
-
return this.getNamedAccessor(
|
|
1205
|
+
return this.getNamedAccessor(Xe);
|
|
1208
1206
|
}
|
|
1209
1207
|
/**
|
|
1210
1208
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1216,8 +1214,8 @@ class G {
|
|
|
1216
1214
|
}
|
|
1217
1215
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1218
1216
|
var t;
|
|
1219
|
-
const r = e.some((o) => !(o.data instanceof
|
|
1220
|
-
if (r && !
|
|
1217
|
+
const r = e.some((o) => !(o.data instanceof L) || ae(o.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
|
|
1218
|
+
if (r && !i) throw Error("Inline or explicit columns not supported");
|
|
1221
1219
|
}
|
|
1222
1220
|
patchPTableDef(e) {
|
|
1223
1221
|
var t, r;
|
|
@@ -1227,14 +1225,14 @@ class G {
|
|
|
1227
1225
|
filters: [...e.partitionFilters, ...e.filters]
|
|
1228
1226
|
}), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
1229
1227
|
...e,
|
|
1230
|
-
partitionFilters:
|
|
1231
|
-
filters:
|
|
1228
|
+
partitionFilters: be(e.partitionFilters),
|
|
1229
|
+
filters: be(e.filters)
|
|
1232
1230
|
}), e;
|
|
1233
1231
|
}
|
|
1234
1232
|
// TODO remove all non-PColumn fields
|
|
1235
1233
|
createPFrame(e) {
|
|
1236
1234
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1237
|
-
e.map((t) =>
|
|
1235
|
+
e.map((t) => _e(t))
|
|
1238
1236
|
);
|
|
1239
1237
|
}
|
|
1240
1238
|
createPTable(e) {
|
|
@@ -1247,8 +1245,8 @@ class G {
|
|
|
1247
1245
|
partitionFilters: e.filters ?? [],
|
|
1248
1246
|
filters: [],
|
|
1249
1247
|
sorting: e.sorting ?? []
|
|
1250
|
-
}) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
1251
|
-
|
|
1248
|
+
}) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Fe(t.src)), this.ctx.createPTable(
|
|
1249
|
+
Oe(t, (r) => _e(r))
|
|
1252
1250
|
);
|
|
1253
1251
|
}
|
|
1254
1252
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1268,17 +1266,17 @@ class G {
|
|
|
1268
1266
|
this.ctx.logError(e);
|
|
1269
1267
|
}
|
|
1270
1268
|
}
|
|
1271
|
-
const
|
|
1272
|
-
function
|
|
1273
|
-
return
|
|
1269
|
+
const pt = "1.42.16", z = pt;
|
|
1270
|
+
function ft(n) {
|
|
1271
|
+
return n.__renderLambda === !0;
|
|
1274
1272
|
}
|
|
1275
|
-
function
|
|
1276
|
-
if (
|
|
1277
|
-
return
|
|
1273
|
+
function Z(n) {
|
|
1274
|
+
if (n !== void 0)
|
|
1275
|
+
return ft(n) ? n.handle : n;
|
|
1278
1276
|
}
|
|
1279
|
-
const
|
|
1280
|
-
constructor(e, t, r,
|
|
1281
|
-
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs =
|
|
1277
|
+
const gt = class b {
|
|
1278
|
+
constructor(e, t, r, i, o, s, a, l, g) {
|
|
1279
|
+
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s, this._title = a, this._enrichmentTargets = l, this._featureFlags = g;
|
|
1282
1280
|
}
|
|
1283
1281
|
static create(e = "Heavy") {
|
|
1284
1282
|
return new b(
|
|
@@ -1286,8 +1284,8 @@ const dt = class b {
|
|
|
1286
1284
|
void 0,
|
|
1287
1285
|
{},
|
|
1288
1286
|
{},
|
|
1289
|
-
|
|
1290
|
-
|
|
1287
|
+
X(!0),
|
|
1288
|
+
X([]),
|
|
1291
1289
|
void 0,
|
|
1292
1290
|
void 0,
|
|
1293
1291
|
{ ...b.INITIAL_BLOCK_FEATURE_FLAGS }
|
|
@@ -1295,8 +1293,8 @@ const dt = class b {
|
|
|
1295
1293
|
}
|
|
1296
1294
|
output(e, t, r = {}) {
|
|
1297
1295
|
if (typeof t == "function") {
|
|
1298
|
-
const
|
|
1299
|
-
return
|
|
1296
|
+
const i = `output#${e}`;
|
|
1297
|
+
return j(i, () => t(new H())), new b(
|
|
1300
1298
|
this._renderingMode,
|
|
1301
1299
|
this._initialArgs,
|
|
1302
1300
|
this._initialUiState,
|
|
@@ -1304,7 +1302,7 @@ const dt = class b {
|
|
|
1304
1302
|
...this._outputs,
|
|
1305
1303
|
[e]: {
|
|
1306
1304
|
__renderLambda: !0,
|
|
1307
|
-
handle:
|
|
1305
|
+
handle: i,
|
|
1308
1306
|
...r
|
|
1309
1307
|
}
|
|
1310
1308
|
},
|
|
@@ -1335,7 +1333,7 @@ const dt = class b {
|
|
|
1335
1333
|
return this.output(e, t, { retentive: !0 });
|
|
1336
1334
|
}
|
|
1337
1335
|
argsValid(e) {
|
|
1338
|
-
return typeof e == "function" ? (
|
|
1336
|
+
return typeof e == "function" ? (j("inputsValid", () => e(new H())), new b(
|
|
1339
1337
|
this._renderingMode,
|
|
1340
1338
|
this._initialArgs,
|
|
1341
1339
|
this._initialUiState,
|
|
@@ -1361,7 +1359,7 @@ const dt = class b {
|
|
|
1361
1359
|
);
|
|
1362
1360
|
}
|
|
1363
1361
|
sections(e) {
|
|
1364
|
-
return Array.isArray(e) ? this.sections(
|
|
1362
|
+
return Array.isArray(e) ? this.sections(X(e)) : typeof e == "function" ? (j("sections", () => e(new H())), new b(
|
|
1365
1363
|
this._renderingMode,
|
|
1366
1364
|
this._initialArgs,
|
|
1367
1365
|
this._initialUiState,
|
|
@@ -1385,7 +1383,7 @@ const dt = class b {
|
|
|
1385
1383
|
}
|
|
1386
1384
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1387
1385
|
title(e) {
|
|
1388
|
-
return
|
|
1386
|
+
return j("title", () => e(new H())), new b(
|
|
1389
1387
|
this._renderingMode,
|
|
1390
1388
|
this._initialArgs,
|
|
1391
1389
|
this._initialUiState,
|
|
@@ -1461,7 +1459,7 @@ const dt = class b {
|
|
|
1461
1459
|
* Influences dependency graph construction.
|
|
1462
1460
|
*/
|
|
1463
1461
|
enriches(e) {
|
|
1464
|
-
return
|
|
1462
|
+
return j("enrichmentTargets", e), new b(
|
|
1465
1463
|
this._renderingMode,
|
|
1466
1464
|
this._initialArgs,
|
|
1467
1465
|
this._initialUiState,
|
|
@@ -1487,7 +1485,7 @@ const dt = class b {
|
|
|
1487
1485
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1488
1486
|
const t = {
|
|
1489
1487
|
v3: {
|
|
1490
|
-
sdkVersion:
|
|
1488
|
+
sdkVersion: z,
|
|
1491
1489
|
renderingMode: this._renderingMode,
|
|
1492
1490
|
initialArgs: this._initialArgs,
|
|
1493
1491
|
initialUiState: this._initialUiState,
|
|
@@ -1499,88 +1497,94 @@ const dt = class b {
|
|
|
1499
1497
|
featureFlags: this._featureFlags
|
|
1500
1498
|
},
|
|
1501
1499
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1502
|
-
sdkVersion:
|
|
1500
|
+
sdkVersion: z,
|
|
1503
1501
|
renderingMode: this._renderingMode,
|
|
1504
1502
|
initialArgs: this._initialArgs,
|
|
1505
|
-
inputsValid:
|
|
1506
|
-
sections:
|
|
1503
|
+
inputsValid: Z(this._inputsValid),
|
|
1504
|
+
sections: Z(this._sections),
|
|
1507
1505
|
outputs: Object.fromEntries(
|
|
1508
|
-
Object.entries(this._outputs).map(([r,
|
|
1506
|
+
Object.entries(this._outputs).map(([r, i]) => [r, Z(i)])
|
|
1509
1507
|
)
|
|
1510
1508
|
};
|
|
1511
|
-
return globalThis.platformaApiVersion = e,
|
|
1509
|
+
return globalThis.platformaApiVersion = e, He() ? xe({ sdkVersion: z, apiVersion: platformaApiVersion }) : { config: t };
|
|
1512
1510
|
}
|
|
1513
1511
|
};
|
|
1514
|
-
|
|
1512
|
+
x(gt, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
1515
1513
|
supportsLazyState: !0,
|
|
1516
1514
|
requiresUIAPIVersion: 1,
|
|
1517
1515
|
requiresModelAPIVersion: 1
|
|
1518
1516
|
});
|
|
1519
|
-
function
|
|
1520
|
-
return
|
|
1517
|
+
function bt() {
|
|
1518
|
+
return xe({ sdkVersion: z, apiVersion: platformaApiVersion });
|
|
1521
1519
|
}
|
|
1522
1520
|
export {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1521
|
+
pe as AnchoredIdDeriver,
|
|
1522
|
+
te as Annotation,
|
|
1523
|
+
Pt as AxisSpec,
|
|
1524
|
+
Nt as BasePlErrorLike,
|
|
1525
|
+
jt as ErrorLike,
|
|
1526
|
+
P as FutureRef,
|
|
1527
|
+
ve as PColumnCollection,
|
|
1528
|
+
$e as PColumnName,
|
|
1529
|
+
Bt as PlErrorLike,
|
|
1530
|
+
At as PlIdLength,
|
|
1531
|
+
R as RT_BINARY_PARTITIONED,
|
|
1532
|
+
V as RT_BINARY_SUPER_PARTITIONED,
|
|
1533
|
+
B as RT_JSON_PARTITIONED,
|
|
1534
|
+
G as RT_JSON_SUPER_PARTITIONED,
|
|
1536
1535
|
ne as RT_RESOURCE_MAP,
|
|
1537
1536
|
ie as RT_RESOURCE_MAP_PARTITIONED,
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1537
|
+
H as RenderCtx,
|
|
1538
|
+
dt as ResultPool,
|
|
1539
|
+
Vt as StandardErrorLike,
|
|
1541
1540
|
Ye as Trace,
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
tt as
|
|
1541
|
+
Qe as TraceEntry,
|
|
1542
|
+
L as TreeNodeAccessor,
|
|
1543
|
+
xt as ValueType,
|
|
1544
|
+
Je as canonicalizeAxisId,
|
|
1545
|
+
It as canonicalizeJson,
|
|
1546
|
+
it as convertOrParsePColumnData,
|
|
1547
|
+
Ve as dataInfoToEntries,
|
|
1548
|
+
Ie as deriveLabels,
|
|
1549
|
+
Ne as deriveNativeId,
|
|
1550
|
+
Z as downgradeCfgOrLambda,
|
|
1551
|
+
Re as ensurePColumn,
|
|
1552
|
+
Be as entriesToDataInfo,
|
|
1553
|
+
Fe as extractAllColumns,
|
|
1554
|
+
st as filterDataInfoEntries,
|
|
1555
|
+
St as getAxesId,
|
|
1556
|
+
ge as getAxisId,
|
|
1557
|
+
Lt as getFileNameFromHandle,
|
|
1558
|
+
Ct as getFilePathFromHandle,
|
|
1559
|
+
X as getImmediate,
|
|
1560
|
+
tt as getPartitionKeysList,
|
|
1561
|
+
bt as getRawPlatformaInstance,
|
|
1562
|
+
nt as getUniquePartitionKeys,
|
|
1562
1563
|
re as ifDef,
|
|
1563
|
-
|
|
1564
|
+
ft as isConfigLambda,
|
|
1564
1565
|
ae as isDataInfo,
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1566
|
+
Pe as isDataInfoEntries,
|
|
1567
|
+
Et as isImportFileHandleIndex,
|
|
1568
|
+
Tt as isImportFileHandleUpload,
|
|
1569
|
+
we as isPColumn,
|
|
1570
|
+
q as isPColumnSpec,
|
|
1571
|
+
je as isPartitionedDataInfoEntries,
|
|
1572
|
+
ke as isPlRef,
|
|
1573
|
+
Ue as mapDataInfo,
|
|
1574
|
+
Ft as mapJoinEntry,
|
|
1574
1575
|
le as mapPObjectData,
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1576
|
+
Oe as mapPTableDef,
|
|
1577
|
+
De as mapValueInVOE,
|
|
1578
|
+
Ot as matchAxis,
|
|
1579
|
+
kt as matchAxisId,
|
|
1580
|
+
Dt as matchPColumn,
|
|
1581
|
+
Ke as parseJson,
|
|
1580
1582
|
oe as parsePColumnData,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1583
|
+
ee as readAnnotation,
|
|
1584
|
+
Rt as readMetadata,
|
|
1585
|
+
fe as resolveAnchors,
|
|
1586
|
+
J as selectorsToPredicate,
|
|
1587
|
+
$t as stringifyColumnId,
|
|
1588
|
+
de as withEnrichments
|
|
1585
1589
|
};
|
|
1586
1590
|
//# sourceMappingURL=index.js.map
|