@milaboratories/uikit 2.4.0 → 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 +26 -25
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
- package/dist/components/PlFileDialog/Local.vue.js +4 -4
- package/dist/components/PlFileInput/PlFileInput.vue.js +17 -17
- 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/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 +262 -179
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/sdk/model/dist/index.js +481 -465
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +2 -2
- 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/.turbo/turbo-test.log +0 -133
- package/dist/components/PlAccordion/ExpandTransition.vue.js +0 -27
- package/dist/components/PlAccordion/ExpandTransition.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
|
|
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
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
|
|
13
|
+
function xe(n) {
|
|
14
14
|
if (n && typeof globalThis.getPlatforma == "function")
|
|
15
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
29
|
if (n in t.callbackRegistry) throw new Error(`Callback with key ${n} already registered.`);
|
|
30
30
|
return t.callbackRegistry[n] = e, !0;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const Q = /* @__PURE__ */ new Map();
|
|
33
|
+
function ze(n, e) {
|
|
34
34
|
n in c().callbackRegistry || (c().callbackRegistry[n] = (t) => {
|
|
35
|
-
for (const r of
|
|
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
|
});
|
|
@@ -58,7 +58,7 @@ class w {
|
|
|
58
58
|
function re(n, e) {
|
|
59
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
|
}
|
|
@@ -99,7 +99,7 @@ class S {
|
|
|
99
99
|
];
|
|
100
100
|
return re(
|
|
101
101
|
c().resolveWithCommon(this.handle, e, ...t),
|
|
102
|
-
(i) => new
|
|
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() {
|
|
@@ -161,7 +161,7 @@ class S {
|
|
|
161
161
|
getPColumns(e = !1, t = "") {
|
|
162
162
|
const r = this.parsePObjectCollection(e, t);
|
|
163
163
|
return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
|
|
164
|
-
if (!
|
|
164
|
+
if (!we(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
165
165
|
return i;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
@@ -177,20 +177,20 @@ class S {
|
|
|
177
177
|
);
|
|
178
178
|
if (r === void 0) return;
|
|
179
179
|
const i = {};
|
|
180
|
-
for (const [
|
|
181
|
-
const a = [...this.resolvePath,
|
|
182
|
-
i[
|
|
180
|
+
for (const [o, s] of Object.entries(r)) {
|
|
181
|
+
const a = [...this.resolvePath, o];
|
|
182
|
+
i[o] = le(s, (l) => new L(l, a));
|
|
183
183
|
}
|
|
184
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,107 +264,106 @@ class S {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
mapFields(e, t) {
|
|
267
|
-
const { fieldType: r, requireLocked: i, skipUnresolved:
|
|
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
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
|
|
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(), i = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0,
|
|
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
|
-
|
|
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
|
|
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) => {
|
|
361
360
|
if (n.endsWith(".index"))
|
|
362
361
|
return { baseKey: n.substring(0, n.length - 6), type: "index" };
|
|
363
362
|
if (n.endsWith(".values"))
|
|
364
363
|
return { baseKey: n.substring(0, n.length - 7), type: "values" };
|
|
365
364
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${n}`);
|
|
366
365
|
};
|
|
367
|
-
function
|
|
366
|
+
function tt(n) {
|
|
368
367
|
if (!n) return;
|
|
369
368
|
const e = n.resourceType.name, t = n.getDataAsJson(), r = [];
|
|
370
369
|
let i = 0;
|
|
@@ -375,95 +374,95 @@ function Ze(n) {
|
|
|
375
374
|
case ie:
|
|
376
375
|
i = t.partitionKeyLength + t.keyLength;
|
|
377
376
|
break;
|
|
378
|
-
case
|
|
379
|
-
case
|
|
377
|
+
case B:
|
|
378
|
+
case R:
|
|
380
379
|
i = t.partitionKeyLength;
|
|
381
380
|
break;
|
|
382
|
-
case
|
|
383
|
-
case
|
|
381
|
+
case V:
|
|
382
|
+
case G:
|
|
384
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
|
|
392
|
-
e ===
|
|
393
|
-
const
|
|
394
|
-
r.push(
|
|
388
|
+
case B:
|
|
389
|
+
case R:
|
|
390
|
+
for (let o of n.listInputFields()) {
|
|
391
|
+
e === R && (o = se(o).baseKey);
|
|
392
|
+
const s = [...JSON.parse(o)];
|
|
393
|
+
r.push(s);
|
|
395
394
|
}
|
|
396
395
|
break;
|
|
397
396
|
case ie:
|
|
398
|
-
case
|
|
399
|
-
case
|
|
400
|
-
for (const
|
|
401
|
-
const
|
|
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
410
|
return { data: r, keyLength: i };
|
|
412
411
|
}
|
|
413
|
-
function
|
|
412
|
+
function rt(n) {
|
|
414
413
|
if (n.type !== "JsonPartitioned" && n.type !== "BinaryPartitioned")
|
|
415
414
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${n.type}`);
|
|
416
415
|
const { parts: e, partitionKeyLength: t } = n, r = [];
|
|
417
416
|
for (let i = 0; i < t; ++i)
|
|
418
417
|
r.push(/* @__PURE__ */ new Set());
|
|
419
418
|
for (const i of e) {
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
419
|
+
const o = i.key;
|
|
420
|
+
if (o.length !== t)
|
|
422
421
|
throw new Error(
|
|
423
|
-
`Key length (${
|
|
424
|
-
|
|
422
|
+
`Key length (${o.length}) does not match partition length (${t}) for key: ${JSON.stringify(
|
|
423
|
+
o
|
|
425
424
|
)}`
|
|
426
425
|
);
|
|
427
|
-
for (let
|
|
428
|
-
r[
|
|
426
|
+
for (let s = 0; s < t; ++s)
|
|
427
|
+
r[s].add(o[s]);
|
|
429
428
|
}
|
|
430
429
|
return r.map((i) => Array.from(i.values()));
|
|
431
430
|
}
|
|
432
|
-
function
|
|
431
|
+
function nt(n) {
|
|
433
432
|
if (n === void 0) return;
|
|
434
|
-
if (
|
|
435
|
-
return
|
|
436
|
-
const e =
|
|
433
|
+
if (Pe(n))
|
|
434
|
+
return rt(n);
|
|
435
|
+
const e = tt(n);
|
|
437
436
|
if (!e) return;
|
|
438
437
|
const { data: t, keyLength: r } = e, i = [];
|
|
439
|
-
for (let
|
|
438
|
+
for (let o = 0; o < r; ++o)
|
|
440
439
|
i.push(/* @__PURE__ */ new Set());
|
|
441
|
-
for (const
|
|
442
|
-
if (
|
|
440
|
+
for (const o of t) {
|
|
441
|
+
if (o.length !== r)
|
|
443
442
|
throw new Error("key length does not match partition length");
|
|
444
|
-
for (let
|
|
445
|
-
i[
|
|
443
|
+
for (let s = 0; s < r; ++s)
|
|
444
|
+
i[s].add(o[s]);
|
|
446
445
|
}
|
|
447
|
-
return i.map((
|
|
446
|
+
return i.map((o) => Array.from(o.values()));
|
|
448
447
|
}
|
|
449
448
|
function oe(n, e = []) {
|
|
450
449
|
if (n === void 0 || !n.getIsReadyOrError()) return;
|
|
451
450
|
const t = n.resourceType.name, r = n.getDataAsJson();
|
|
452
|
-
if (e.length > 0 && (t ===
|
|
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
460
|
const i = [];
|
|
462
|
-
for (const
|
|
463
|
-
const
|
|
464
|
-
if (
|
|
465
|
-
const a = [...e, ...JSON.parse(
|
|
466
|
-
i.push({ key: a, value:
|
|
461
|
+
for (const o of n.listInputFields()) {
|
|
462
|
+
const s = n.resolve({ field: o, assertFieldType: "Input" });
|
|
463
|
+
if (s === void 0) return;
|
|
464
|
+
const a = [...e, ...JSON.parse(o)];
|
|
465
|
+
i.push({ key: a, value: s });
|
|
467
466
|
}
|
|
468
467
|
return {
|
|
469
468
|
type: "JsonPartitioned",
|
|
@@ -471,19 +470,19 @@ function oe(n, e = []) {
|
|
|
471
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 i = [],
|
|
478
|
-
for (const
|
|
479
|
-
const a = se(
|
|
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
|
-
for (const [
|
|
483
|
+
for (const [s, a] of o.entries()) {
|
|
485
484
|
if (!a.index || !a.values) return;
|
|
486
|
-
const l = [...e, ...JSON.parse(
|
|
485
|
+
const l = [...e, ...JSON.parse(s)];
|
|
487
486
|
i.push({
|
|
488
487
|
key: l,
|
|
489
488
|
value: {
|
|
@@ -498,159 +497,171 @@ function oe(n, e = []) {
|
|
|
498
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 i = r.superPartitionKeyLength + r.partitionKeyLength,
|
|
505
|
-
for (const
|
|
506
|
-
const a = n.resolve({ field:
|
|
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 ${
|
|
510
|
-
const l = oe(a, JSON.parse(
|
|
507
|
+
if (a.resourceType.name !== B)
|
|
508
|
+
throw new Error(`Expected ${B} inside ${t}, but got ${a.resourceType.name}`);
|
|
509
|
+
const l = oe(a, JSON.parse(s));
|
|
511
510
|
if (l === void 0) return;
|
|
512
511
|
if (l.type !== "JsonPartitioned")
|
|
513
512
|
throw new Error(`Unexpected inner result type for ${t}: ${l.type}`);
|
|
514
|
-
|
|
513
|
+
o.push(...l.parts);
|
|
515
514
|
}
|
|
516
515
|
return {
|
|
517
516
|
type: "JsonPartitioned",
|
|
518
517
|
partitionKeyLength: i,
|
|
519
|
-
parts:
|
|
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 i = r.superPartitionKeyLength + r.partitionKeyLength,
|
|
526
|
-
for (const
|
|
527
|
-
const a = n.resolve({ field:
|
|
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 ${
|
|
531
|
-
const l = oe(a, JSON.parse(
|
|
528
|
+
if (a.resourceType.name !== R)
|
|
529
|
+
throw new Error(`Expected ${R} inside ${t}, but got ${a.resourceType.name}`);
|
|
530
|
+
const l = oe(a, JSON.parse(s));
|
|
532
531
|
if (l === void 0) return;
|
|
533
532
|
if (l.type !== "BinaryPartitioned")
|
|
534
533
|
throw new Error(`Unexpected inner result type for ${t}: ${l.type}`);
|
|
535
|
-
|
|
534
|
+
o.push(...l.parts);
|
|
536
535
|
}
|
|
537
536
|
return {
|
|
538
537
|
type: "BinaryPartitioned",
|
|
539
538
|
partitionKeyLength: i,
|
|
540
|
-
parts:
|
|
539
|
+
parts: o
|
|
541
540
|
};
|
|
542
541
|
}
|
|
543
542
|
default:
|
|
544
543
|
throw new Error(`Unknown resource type: ${t}`);
|
|
545
544
|
}
|
|
546
545
|
}
|
|
547
|
-
function
|
|
546
|
+
function it(n) {
|
|
548
547
|
if (n !== void 0) {
|
|
549
|
-
if (
|
|
550
|
-
if (ae(n)) return
|
|
551
|
-
if (n instanceof
|
|
548
|
+
if (Pe(n)) return n;
|
|
549
|
+
if (ae(n)) return Ve(n);
|
|
550
|
+
if (n instanceof L) return oe(n);
|
|
552
551
|
throw new Error(`Unexpected input type: ${typeof n}`);
|
|
553
552
|
}
|
|
554
553
|
}
|
|
555
|
-
function
|
|
556
|
-
const t = [...e].sort((s,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
554
|
+
function st(n, e) {
|
|
555
|
+
const t = [...e].sort((s, a) => a[0] - s[0]), { type: r } = n;
|
|
556
|
+
switch (r) {
|
|
557
|
+
case "Json": {
|
|
558
|
+
const { keyLength: s } = n;
|
|
559
|
+
for (const [a] of e)
|
|
560
|
+
if (a >= s)
|
|
561
|
+
throw new Error(`Can't filter on non-data axis ${a}. Must be >= ${s}`);
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
case "JsonPartitioned":
|
|
565
|
+
case "BinaryPartitioned":
|
|
566
|
+
case "ParquetPartitioned": {
|
|
567
|
+
const { partitionKeyLength: s } = n;
|
|
568
|
+
for (const [a] of e)
|
|
569
|
+
if (a >= s)
|
|
570
|
+
throw new Error(`Can't filter on non-partitioned axis ${a}. Must be >= ${s}`);
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
default:
|
|
574
|
+
throw new Error(`Unsupported data info type: ${r}`);
|
|
575
|
+
}
|
|
576
|
+
const i = (s) => {
|
|
577
|
+
for (const [a, l] of t)
|
|
578
|
+
if (s[a] !== l)
|
|
571
579
|
return !1;
|
|
572
580
|
return !0;
|
|
573
|
-
},
|
|
574
|
-
const
|
|
575
|
-
for (const [
|
|
576
|
-
|
|
577
|
-
return
|
|
581
|
+
}, o = (s) => {
|
|
582
|
+
const a = [...s];
|
|
583
|
+
for (const [l] of t)
|
|
584
|
+
a.splice(l, 1);
|
|
585
|
+
return a;
|
|
578
586
|
};
|
|
579
587
|
switch (n.type) {
|
|
580
|
-
case "Json":
|
|
581
|
-
const s = n.data.filter((o) => r(o.key)).map((o) => ({
|
|
582
|
-
key: i(o.key),
|
|
583
|
-
value: o.value
|
|
584
|
-
}));
|
|
588
|
+
case "Json":
|
|
585
589
|
return {
|
|
586
590
|
type: "Json",
|
|
587
591
|
keyLength: n.keyLength - e.length,
|
|
588
|
-
data: s
|
|
592
|
+
data: n.data.filter((s) => i(s.key)).map((s) => ({
|
|
593
|
+
key: o(s.key),
|
|
594
|
+
value: s.value
|
|
595
|
+
}))
|
|
589
596
|
};
|
|
590
|
-
|
|
591
|
-
case "JsonPartitioned": {
|
|
592
|
-
const s = n.parts.filter((o) => r(o.key)).map((o) => ({
|
|
593
|
-
key: i(o.key),
|
|
594
|
-
value: o.value
|
|
595
|
-
}));
|
|
597
|
+
case "JsonPartitioned":
|
|
596
598
|
return {
|
|
597
599
|
type: "JsonPartitioned",
|
|
598
600
|
partitionKeyLength: n.partitionKeyLength - e.length,
|
|
599
|
-
parts: s
|
|
601
|
+
parts: n.parts.filter((s) => i(s.key)).map((s) => ({
|
|
602
|
+
key: o(s.key),
|
|
603
|
+
value: s.value
|
|
604
|
+
}))
|
|
600
605
|
};
|
|
601
|
-
|
|
602
|
-
case "BinaryPartitioned": {
|
|
603
|
-
const s = n.parts.filter((o) => r(o.key)).map((o) => ({
|
|
604
|
-
key: i(o.key),
|
|
605
|
-
value: o.value
|
|
606
|
-
}));
|
|
606
|
+
case "BinaryPartitioned":
|
|
607
607
|
return {
|
|
608
608
|
type: "BinaryPartitioned",
|
|
609
609
|
partitionKeyLength: n.partitionKeyLength - e.length,
|
|
610
|
-
parts: s
|
|
610
|
+
parts: n.parts.filter((s) => i(s.key)).map((s) => ({
|
|
611
|
+
key: o(s.key),
|
|
612
|
+
value: s.value
|
|
613
|
+
}))
|
|
614
|
+
};
|
|
615
|
+
case "ParquetPartitioned":
|
|
616
|
+
return {
|
|
617
|
+
type: "ParquetPartitioned",
|
|
618
|
+
partitionKeyLength: n.partitionKeyLength - e.length,
|
|
619
|
+
parts: n.parts.filter((s) => i(s.key)).map((s) => ({
|
|
620
|
+
key: o(s.key),
|
|
621
|
+
value: s.value
|
|
622
|
+
}))
|
|
611
623
|
};
|
|
612
|
-
}
|
|
613
624
|
}
|
|
614
625
|
}
|
|
615
|
-
function
|
|
626
|
+
function ot(n) {
|
|
616
627
|
if (!Array.isArray(n)) return !1;
|
|
617
628
|
if (n.length === 0) return !0;
|
|
618
629
|
const e = n[0];
|
|
619
630
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
620
631
|
}
|
|
621
|
-
class
|
|
632
|
+
class at {
|
|
622
633
|
constructor(e) {
|
|
623
634
|
this.columns = e;
|
|
624
635
|
}
|
|
625
636
|
selectColumns(e) {
|
|
626
|
-
const t = typeof e == "function" ? e :
|
|
637
|
+
const t = typeof e == "function" ? e : J(e);
|
|
627
638
|
return this.columns.filter((r) => t(r.spec));
|
|
628
639
|
}
|
|
629
640
|
}
|
|
630
|
-
function
|
|
641
|
+
function lt(n) {
|
|
631
642
|
if (n)
|
|
632
643
|
return n.map((e) => ({
|
|
633
|
-
type: `split:${
|
|
644
|
+
type: `split:${Je(e.axisId)}`,
|
|
634
645
|
label: e.label,
|
|
635
646
|
importance: 1e6
|
|
636
647
|
// High importance for split filters in labels
|
|
637
648
|
}));
|
|
638
649
|
}
|
|
639
|
-
function
|
|
650
|
+
function ut(n) {
|
|
640
651
|
if (n)
|
|
641
652
|
return n.map((e) => [e.axisIdx, e.value]);
|
|
642
653
|
}
|
|
643
|
-
function
|
|
654
|
+
function ct(n, e) {
|
|
644
655
|
if (!e || e.length === 0) return n;
|
|
645
656
|
const t = [...e].sort((r, i) => r[0] - i[0]);
|
|
646
|
-
return
|
|
657
|
+
return Ae({ id: n, axisFilters: t });
|
|
647
658
|
}
|
|
648
|
-
function
|
|
659
|
+
function ye(n) {
|
|
649
660
|
if (!n || typeof n != "object") return !1;
|
|
650
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);
|
|
651
662
|
return !!e.domainAnchor || t || r;
|
|
652
663
|
}
|
|
653
|
-
function
|
|
664
|
+
function ht(n) {
|
|
654
665
|
if (typeof n != "object" || !("axes" in n) || n.axes === void 0)
|
|
655
666
|
return [];
|
|
656
667
|
const e = n.axes.map((t, r) => typeof t == "object" && "split" in t && t.split === !0 ? r : -1).filter((t) => t !== -1);
|
|
@@ -658,9 +669,9 @@ function ut(n) {
|
|
|
658
669
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
659
670
|
return e.sort((t, r) => t - r), e;
|
|
660
671
|
}
|
|
661
|
-
class
|
|
672
|
+
class ve {
|
|
662
673
|
constructor() {
|
|
663
|
-
|
|
674
|
+
x(this, "defaultProviderStore", []), x(this, "providers", [new at(this.defaultProviderStore)]), x(this, "axisLabelProviders", []);
|
|
664
675
|
}
|
|
665
676
|
addColumnProvider(e) {
|
|
666
677
|
return this.providers.push(e), this;
|
|
@@ -682,135 +693,135 @@ class me {
|
|
|
682
693
|
}
|
|
683
694
|
}
|
|
684
695
|
getUniversalEntries(e, t) {
|
|
685
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData:
|
|
686
|
-
...
|
|
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 } : {},
|
|
687
698
|
...i ?? {}
|
|
688
699
|
};
|
|
689
|
-
let
|
|
700
|
+
let g = () => !1;
|
|
690
701
|
if (a) {
|
|
691
|
-
const u = (Array.isArray(a) ? a : [a]).map((
|
|
692
|
-
if (
|
|
702
|
+
const u = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
703
|
+
if (ye(y)) {
|
|
693
704
|
if (!r)
|
|
694
705
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
695
|
-
return
|
|
706
|
+
return J(fe(r.anchors, y, t));
|
|
696
707
|
} else
|
|
697
|
-
return
|
|
708
|
+
return J(y);
|
|
698
709
|
});
|
|
699
|
-
|
|
710
|
+
g = (y) => u.some((_) => _(y));
|
|
700
711
|
}
|
|
701
|
-
const
|
|
702
|
-
for (const u of
|
|
703
|
-
const
|
|
704
|
-
let
|
|
705
|
-
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) {
|
|
706
717
|
if (!r)
|
|
707
718
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
708
|
-
|
|
719
|
+
_ = fe(r.anchors, u, t);
|
|
709
720
|
} else
|
|
710
|
-
|
|
711
|
-
const
|
|
721
|
+
_ = u;
|
|
722
|
+
const I = /* @__PURE__ */ new Set(), C = [];
|
|
712
723
|
for (const d of this.providers) {
|
|
713
|
-
const
|
|
714
|
-
for (const
|
|
715
|
-
if (
|
|
716
|
-
if (
|
|
717
|
-
throw new Error(`Duplicate column id ${
|
|
718
|
-
const
|
|
719
|
-
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));
|
|
720
731
|
}
|
|
721
732
|
}
|
|
722
733
|
if (C.length === 0) continue;
|
|
723
|
-
const
|
|
734
|
+
const v = ht(u), f = v.length > 0;
|
|
724
735
|
for (const d of C) {
|
|
725
|
-
if (!
|
|
726
|
-
const
|
|
727
|
-
if (
|
|
728
|
-
if (
|
|
736
|
+
if (!q(d.spec)) continue;
|
|
737
|
+
const A = d.spec;
|
|
738
|
+
if (f) {
|
|
739
|
+
if (ot(d.data))
|
|
729
740
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${d.id}`);
|
|
730
|
-
const
|
|
731
|
-
if (!
|
|
732
|
-
if (
|
|
741
|
+
const h = it(d.data);
|
|
742
|
+
if (!h) {
|
|
743
|
+
if (o) continue;
|
|
733
744
|
return;
|
|
734
745
|
}
|
|
735
|
-
if (!
|
|
736
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
739
|
-
throw new Error(`Not enough partition keys (${
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
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)
|
|
743
754
|
throw new Error("Too many key combinations, aborting.");
|
|
744
755
|
return;
|
|
745
756
|
}
|
|
746
|
-
const
|
|
747
|
-
if (
|
|
748
|
-
throw new Error(`Axis index ${
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
751
|
-
|
|
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;
|
|
752
763
|
return;
|
|
753
764
|
}
|
|
754
|
-
for (const
|
|
755
|
-
|
|
765
|
+
for (const W of k)
|
|
766
|
+
w.push(W), ue(w, N + 1), w.pop();
|
|
756
767
|
};
|
|
757
|
-
if (
|
|
768
|
+
if (ue([], 0), S.length === 0)
|
|
758
769
|
continue;
|
|
759
|
-
const
|
|
760
|
-
for (let
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
for (const
|
|
764
|
-
const
|
|
765
|
-
const
|
|
766
|
-
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 };
|
|
767
778
|
});
|
|
768
|
-
|
|
779
|
+
T.push({
|
|
769
780
|
type: "split",
|
|
770
781
|
originalColumn: d,
|
|
771
|
-
spec:
|
|
772
|
-
adjustedSpec:
|
|
773
|
-
dataEntries:
|
|
774
|
-
axisFilters:
|
|
782
|
+
spec: A,
|
|
783
|
+
adjustedSpec: Ce,
|
|
784
|
+
dataEntries: h,
|
|
785
|
+
axisFilters: N
|
|
775
786
|
});
|
|
776
787
|
}
|
|
777
788
|
} else
|
|
778
|
-
|
|
789
|
+
T.push({
|
|
779
790
|
type: "direct",
|
|
780
791
|
originalColumn: d,
|
|
781
|
-
spec:
|
|
782
|
-
adjustedSpec:
|
|
792
|
+
spec: A,
|
|
793
|
+
adjustedSpec: A
|
|
783
794
|
});
|
|
784
795
|
}
|
|
785
796
|
}
|
|
786
|
-
if (
|
|
787
|
-
const
|
|
788
|
-
|
|
797
|
+
if (T.length === 0) return [];
|
|
798
|
+
const p = Ie(
|
|
799
|
+
T,
|
|
789
800
|
(u) => ({
|
|
790
801
|
spec: u.spec,
|
|
791
|
-
suffixTrace: u.type === "split" ?
|
|
802
|
+
suffixTrace: u.type === "split" ? lt(u.axisFilters) : void 0
|
|
792
803
|
}),
|
|
793
804
|
l
|
|
794
|
-
),
|
|
795
|
-
for (const { value: u, label:
|
|
796
|
-
const { originalColumn:
|
|
797
|
-
let
|
|
798
|
-
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);
|
|
799
810
|
let d = { ...u.adjustedSpec };
|
|
800
|
-
|
|
811
|
+
s && (d = {
|
|
801
812
|
...d,
|
|
802
813
|
annotations: {
|
|
803
814
|
...d.annotations ?? {},
|
|
804
|
-
|
|
815
|
+
[te.Label]: y
|
|
805
816
|
}
|
|
806
|
-
}),
|
|
807
|
-
id:
|
|
817
|
+
}), m.push({
|
|
818
|
+
id: f,
|
|
808
819
|
spec: d,
|
|
809
|
-
data: () => u.type === "split" ?
|
|
810
|
-
label:
|
|
820
|
+
data: () => u.type === "split" ? Be(st(u.dataEntries, v)) : u.originalColumn.data,
|
|
821
|
+
label: y
|
|
811
822
|
});
|
|
812
823
|
}
|
|
813
|
-
return
|
|
824
|
+
return m;
|
|
814
825
|
}
|
|
815
826
|
getColumns(e, t) {
|
|
816
827
|
const r = this.getUniversalEntries(e, {
|
|
@@ -820,67 +831,67 @@ class me {
|
|
|
820
831
|
});
|
|
821
832
|
if (!r) return;
|
|
822
833
|
const i = [];
|
|
823
|
-
for (const
|
|
824
|
-
const
|
|
825
|
-
if (!
|
|
834
|
+
for (const o of r) {
|
|
835
|
+
const s = o.data();
|
|
836
|
+
if (!s) {
|
|
826
837
|
if (t != null && t.dontWaitAllData) continue;
|
|
827
838
|
return;
|
|
828
839
|
}
|
|
829
840
|
i.push({
|
|
830
|
-
id:
|
|
831
|
-
spec:
|
|
832
|
-
data:
|
|
841
|
+
id: o.id,
|
|
842
|
+
spec: o.spec,
|
|
843
|
+
data: s
|
|
833
844
|
});
|
|
834
845
|
}
|
|
835
846
|
return i;
|
|
836
847
|
}
|
|
837
848
|
}
|
|
838
|
-
function
|
|
849
|
+
function be(n) {
|
|
839
850
|
const e = (i) => i.operator !== "InSet" ? i : {
|
|
840
851
|
operator: "Or",
|
|
841
|
-
operands: i.references.map((
|
|
852
|
+
operands: i.references.map((o) => ({
|
|
842
853
|
operator: "Equal",
|
|
843
|
-
reference:
|
|
854
|
+
reference: o
|
|
844
855
|
}))
|
|
845
|
-
}, t = (i,
|
|
856
|
+
}, t = (i, o) => {
|
|
846
857
|
switch (i.operator) {
|
|
847
858
|
case "And":
|
|
848
859
|
return {
|
|
849
860
|
...i,
|
|
850
|
-
operands: i.operands.map((
|
|
861
|
+
operands: i.operands.map((s) => t(s, o))
|
|
851
862
|
};
|
|
852
863
|
case "Or":
|
|
853
864
|
return {
|
|
854
865
|
...i,
|
|
855
|
-
operands: i.operands.map((
|
|
866
|
+
operands: i.operands.map((s) => t(s, o))
|
|
856
867
|
};
|
|
857
868
|
case "Not":
|
|
858
869
|
return {
|
|
859
870
|
...i,
|
|
860
|
-
operand: t(i.operand,
|
|
871
|
+
operand: t(i.operand, o)
|
|
861
872
|
};
|
|
862
873
|
default:
|
|
863
|
-
return
|
|
874
|
+
return o(i);
|
|
864
875
|
}
|
|
865
|
-
}, r = (i,
|
|
876
|
+
}, r = (i, o) => ({
|
|
866
877
|
...i,
|
|
867
|
-
predicate: t(i.predicate,
|
|
878
|
+
predicate: t(i.predicate, o)
|
|
868
879
|
});
|
|
869
880
|
return n.map((i) => r(i, e));
|
|
870
881
|
}
|
|
871
|
-
function
|
|
882
|
+
function Y(n, e) {
|
|
872
883
|
if (n === void 0) return e === void 0;
|
|
873
884
|
if (e === void 0) return !0;
|
|
874
885
|
for (const t in e)
|
|
875
886
|
if (n[t] !== e[t]) return !1;
|
|
876
887
|
return !0;
|
|
877
888
|
}
|
|
878
|
-
function
|
|
879
|
-
return le(n, (e) => e instanceof
|
|
889
|
+
function _e(n) {
|
|
890
|
+
return le(n, (e) => e instanceof L ? e.handle : ae(e) ? Ue(e, (t) => t.handle) : e);
|
|
880
891
|
}
|
|
881
|
-
class
|
|
892
|
+
class dt {
|
|
882
893
|
constructor() {
|
|
883
|
-
|
|
894
|
+
x(this, "ctx", c());
|
|
884
895
|
}
|
|
885
896
|
/**
|
|
886
897
|
* @deprecated use getOptions()
|
|
@@ -889,28 +900,28 @@ class ct {
|
|
|
889
900
|
return this.ctx.calculateOptions(e);
|
|
890
901
|
}
|
|
891
902
|
getOptions(e, t) {
|
|
892
|
-
const r = typeof e == "function" ? e :
|
|
893
|
-
let
|
|
894
|
-
return typeof t < "u" && (typeof t == "function" ?
|
|
895
|
-
ref:
|
|
903
|
+
const r = typeof e == "function" ? e : J(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
904
|
+
let o = {}, s = !1;
|
|
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),
|
|
896
907
|
label: l
|
|
897
908
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
898
|
-
ref:
|
|
899
|
-
label:
|
|
909
|
+
ref: de(a, s),
|
|
910
|
+
label: o(l, a)
|
|
900
911
|
}));
|
|
901
912
|
}
|
|
902
913
|
resolveAnchorCtx(e) {
|
|
903
|
-
if (e instanceof
|
|
914
|
+
if (e instanceof pe) return e;
|
|
904
915
|
const t = {};
|
|
905
916
|
for (const [r, i] of Object.entries(e))
|
|
906
|
-
if (
|
|
907
|
-
const
|
|
908
|
-
if (!
|
|
917
|
+
if (ke(i)) {
|
|
918
|
+
const o = this.getPColumnSpecByRef(i);
|
|
919
|
+
if (!o)
|
|
909
920
|
return;
|
|
910
|
-
t[r] =
|
|
921
|
+
t[r] = o;
|
|
911
922
|
} else
|
|
912
923
|
t[r] = i;
|
|
913
|
-
return new
|
|
924
|
+
return new pe(t);
|
|
914
925
|
}
|
|
915
926
|
/**
|
|
916
927
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -923,7 +934,7 @@ class ct {
|
|
|
923
934
|
getAnchoredPColumns(e, t, r) {
|
|
924
935
|
const i = this.resolveAnchorCtx(e);
|
|
925
936
|
if (i)
|
|
926
|
-
return new
|
|
937
|
+
return new ve().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t, {
|
|
927
938
|
...r,
|
|
928
939
|
anchorCtx: i
|
|
929
940
|
});
|
|
@@ -960,14 +971,14 @@ class ct {
|
|
|
960
971
|
getCanonicalOptions(e, t, r) {
|
|
961
972
|
const i = this.resolveAnchorCtx(e);
|
|
962
973
|
if (!i) return;
|
|
963
|
-
const
|
|
974
|
+
const o = new ve().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t, {
|
|
964
975
|
...r,
|
|
965
976
|
anchorCtx: i
|
|
966
977
|
});
|
|
967
|
-
if (
|
|
968
|
-
return
|
|
969
|
-
value:
|
|
970
|
-
label:
|
|
978
|
+
if (o)
|
|
979
|
+
return o.map((s) => ({
|
|
980
|
+
value: s.id,
|
|
981
|
+
label: s.label
|
|
971
982
|
}));
|
|
972
983
|
}
|
|
973
984
|
/**
|
|
@@ -984,7 +995,7 @@ class ct {
|
|
|
984
995
|
ref: t.ref,
|
|
985
996
|
obj: {
|
|
986
997
|
...t.obj,
|
|
987
|
-
data: new
|
|
998
|
+
data: new L(t.obj.data, [t.ref.blockId, t.ref.name])
|
|
988
999
|
}
|
|
989
1000
|
}))
|
|
990
1001
|
};
|
|
@@ -1003,9 +1014,9 @@ class ct {
|
|
|
1003
1014
|
ref: t.ref,
|
|
1004
1015
|
obj: {
|
|
1005
1016
|
...t.obj,
|
|
1006
|
-
data:
|
|
1017
|
+
data: De(
|
|
1007
1018
|
t.obj.data,
|
|
1008
|
-
(r) => new
|
|
1019
|
+
(r) => new L(r, [t.ref.blockId, t.ref.name])
|
|
1009
1020
|
)
|
|
1010
1021
|
}
|
|
1011
1022
|
}))
|
|
@@ -1034,7 +1045,7 @@ class ct {
|
|
|
1034
1045
|
if (r)
|
|
1035
1046
|
return le(
|
|
1036
1047
|
r,
|
|
1037
|
-
(i) => new
|
|
1048
|
+
(i) => new L(i, [e.blockId, e.name])
|
|
1038
1049
|
);
|
|
1039
1050
|
}
|
|
1040
1051
|
/**
|
|
@@ -1045,7 +1056,7 @@ class ct {
|
|
|
1045
1056
|
getPColumnByRef(e) {
|
|
1046
1057
|
const t = this.getDataByRef(e);
|
|
1047
1058
|
if (t)
|
|
1048
|
-
return
|
|
1059
|
+
return Re(t);
|
|
1049
1060
|
}
|
|
1050
1061
|
/**
|
|
1051
1062
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1055,7 +1066,7 @@ class ct {
|
|
|
1055
1066
|
getPColumnSpecByRef(e) {
|
|
1056
1067
|
const t = this.getSpecByRef(e);
|
|
1057
1068
|
if (t) {
|
|
1058
|
-
if (!
|
|
1069
|
+
if (!q(t)) throw new Error(`not a PColumn spec (kind = ${t.kind})`);
|
|
1059
1070
|
return t;
|
|
1060
1071
|
}
|
|
1061
1072
|
}
|
|
@@ -1074,13 +1085,13 @@ class ct {
|
|
|
1074
1085
|
findDataWithCompatibleSpec(e) {
|
|
1075
1086
|
const t = [];
|
|
1076
1087
|
e: for (const r of this.getData().entries) {
|
|
1077
|
-
if (!
|
|
1088
|
+
if (!q(r.obj.spec))
|
|
1078
1089
|
continue;
|
|
1079
1090
|
const i = r.obj.spec;
|
|
1080
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1081
|
-
for (let
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1091
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && Y(e.domain, i.domain)) {
|
|
1092
|
+
for (let o = 0; o < e.axesSpec.length; ++o) {
|
|
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))
|
|
1084
1095
|
continue e;
|
|
1085
1096
|
}
|
|
1086
1097
|
t.push(r.obj);
|
|
@@ -1095,15 +1106,15 @@ class ct {
|
|
|
1095
1106
|
findLabels(e) {
|
|
1096
1107
|
const t = this.getData();
|
|
1097
1108
|
for (const r of t.entries) {
|
|
1098
|
-
if (!
|
|
1109
|
+
if (!we(r.obj)) continue;
|
|
1099
1110
|
const i = r.obj.spec;
|
|
1100
|
-
if (i.name ===
|
|
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)) {
|
|
1101
1112
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1102
1113
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1103
1114
|
return Object.fromEntries(
|
|
1104
1115
|
Object.entries(
|
|
1105
1116
|
r.obj.data.getDataAsJson().data
|
|
1106
|
-
).map((
|
|
1117
|
+
).map((o) => [JSON.parse(o[0])[0], o[1]])
|
|
1107
1118
|
);
|
|
1108
1119
|
}
|
|
1109
1120
|
}
|
|
@@ -1116,17 +1127,17 @@ class ct {
|
|
|
1116
1127
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1117
1128
|
*/
|
|
1118
1129
|
selectColumns(e) {
|
|
1119
|
-
const t = typeof e == "function" ? e :
|
|
1120
|
-
return this.getSpecs().entries.filter(({ obj: r }) =>
|
|
1121
|
-
const
|
|
1122
|
-
let
|
|
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;
|
|
1133
|
+
let s = null;
|
|
1123
1134
|
const a = this;
|
|
1124
1135
|
return {
|
|
1125
|
-
id:
|
|
1126
|
-
spec:
|
|
1136
|
+
id: Ae(r),
|
|
1137
|
+
spec: o,
|
|
1127
1138
|
get data() {
|
|
1128
1139
|
var l;
|
|
1129
|
-
return
|
|
1140
|
+
return s !== null || (s = (l = a.getPColumnByRef(r)) == null ? void 0 : l.data), s;
|
|
1130
1141
|
}
|
|
1131
1142
|
};
|
|
1132
1143
|
});
|
|
@@ -1136,20 +1147,19 @@ class ct {
|
|
|
1136
1147
|
* @returns a map of axis value => label
|
|
1137
1148
|
*/
|
|
1138
1149
|
findLabelsForColumnAxis(e, t) {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
return Object.fromEntries(o.map((a) => [a, i[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"]));
|
|
1146
1156
|
} else
|
|
1147
|
-
return
|
|
1157
|
+
return r;
|
|
1148
1158
|
}
|
|
1149
1159
|
}
|
|
1150
|
-
class
|
|
1160
|
+
class H {
|
|
1151
1161
|
constructor() {
|
|
1152
|
-
|
|
1162
|
+
x(this, "ctx"), x(this, "_argsCache"), x(this, "_uiStateCache"), x(this, "_activeArgsCache"), x(this, "resultPool", new dt()), this.ctx = c();
|
|
1153
1163
|
}
|
|
1154
1164
|
get args() {
|
|
1155
1165
|
if (this._argsCache === void 0) {
|
|
@@ -1185,14 +1195,14 @@ class G {
|
|
|
1185
1195
|
getNamedAccessor(e) {
|
|
1186
1196
|
return re(
|
|
1187
1197
|
this.ctx.getAccessorHandleByName(e),
|
|
1188
|
-
(t) => new
|
|
1198
|
+
(t) => new L(t, [e])
|
|
1189
1199
|
);
|
|
1190
1200
|
}
|
|
1191
1201
|
get prerun() {
|
|
1192
|
-
return this.getNamedAccessor(
|
|
1202
|
+
return this.getNamedAccessor(Ge);
|
|
1193
1203
|
}
|
|
1194
1204
|
get outputs() {
|
|
1195
|
-
return this.getNamedAccessor(
|
|
1205
|
+
return this.getNamedAccessor(Xe);
|
|
1196
1206
|
}
|
|
1197
1207
|
/**
|
|
1198
1208
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1204,7 +1214,7 @@ class G {
|
|
|
1204
1214
|
}
|
|
1205
1215
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1206
1216
|
var t;
|
|
1207
|
-
const r = e.some((
|
|
1217
|
+
const r = e.some((o) => !(o.data instanceof L) || ae(o.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
|
|
1208
1218
|
if (r && !i) throw Error("Inline or explicit columns not supported");
|
|
1209
1219
|
}
|
|
1210
1220
|
patchPTableDef(e) {
|
|
@@ -1215,14 +1225,14 @@ class G {
|
|
|
1215
1225
|
filters: [...e.partitionFilters, ...e.filters]
|
|
1216
1226
|
}), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
1217
1227
|
...e,
|
|
1218
|
-
partitionFilters:
|
|
1219
|
-
filters:
|
|
1228
|
+
partitionFilters: be(e.partitionFilters),
|
|
1229
|
+
filters: be(e.filters)
|
|
1220
1230
|
}), e;
|
|
1221
1231
|
}
|
|
1222
1232
|
// TODO remove all non-PColumn fields
|
|
1223
1233
|
createPFrame(e) {
|
|
1224
1234
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1225
|
-
e.map((t) =>
|
|
1235
|
+
e.map((t) => _e(t))
|
|
1226
1236
|
);
|
|
1227
1237
|
}
|
|
1228
1238
|
createPTable(e) {
|
|
@@ -1235,8 +1245,8 @@ class G {
|
|
|
1235
1245
|
partitionFilters: e.filters ?? [],
|
|
1236
1246
|
filters: [],
|
|
1237
1247
|
sorting: e.sorting ?? []
|
|
1238
|
-
}) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
1239
|
-
|
|
1248
|
+
}) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Fe(t.src)), this.ctx.createPTable(
|
|
1249
|
+
Oe(t, (r) => _e(r))
|
|
1240
1250
|
);
|
|
1241
1251
|
}
|
|
1242
1252
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1256,17 +1266,17 @@ class G {
|
|
|
1256
1266
|
this.ctx.logError(e);
|
|
1257
1267
|
}
|
|
1258
1268
|
}
|
|
1259
|
-
const
|
|
1260
|
-
function
|
|
1269
|
+
const pt = "1.42.16", z = pt;
|
|
1270
|
+
function ft(n) {
|
|
1261
1271
|
return n.__renderLambda === !0;
|
|
1262
1272
|
}
|
|
1263
|
-
function
|
|
1273
|
+
function Z(n) {
|
|
1264
1274
|
if (n !== void 0)
|
|
1265
|
-
return
|
|
1275
|
+
return ft(n) ? n.handle : n;
|
|
1266
1276
|
}
|
|
1267
|
-
const
|
|
1268
|
-
constructor(e, t, r, i,
|
|
1269
|
-
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = i, this._inputsValid =
|
|
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;
|
|
1270
1280
|
}
|
|
1271
1281
|
static create(e = "Heavy") {
|
|
1272
1282
|
return new b(
|
|
@@ -1274,8 +1284,8 @@ const dt = class b {
|
|
|
1274
1284
|
void 0,
|
|
1275
1285
|
{},
|
|
1276
1286
|
{},
|
|
1277
|
-
|
|
1278
|
-
|
|
1287
|
+
X(!0),
|
|
1288
|
+
X([]),
|
|
1279
1289
|
void 0,
|
|
1280
1290
|
void 0,
|
|
1281
1291
|
{ ...b.INITIAL_BLOCK_FEATURE_FLAGS }
|
|
@@ -1284,7 +1294,7 @@ const dt = class b {
|
|
|
1284
1294
|
output(e, t, r = {}) {
|
|
1285
1295
|
if (typeof t == "function") {
|
|
1286
1296
|
const i = `output#${e}`;
|
|
1287
|
-
return
|
|
1297
|
+
return j(i, () => t(new H())), new b(
|
|
1288
1298
|
this._renderingMode,
|
|
1289
1299
|
this._initialArgs,
|
|
1290
1300
|
this._initialUiState,
|
|
@@ -1323,7 +1333,7 @@ const dt = class b {
|
|
|
1323
1333
|
return this.output(e, t, { retentive: !0 });
|
|
1324
1334
|
}
|
|
1325
1335
|
argsValid(e) {
|
|
1326
|
-
return typeof e == "function" ? (
|
|
1336
|
+
return typeof e == "function" ? (j("inputsValid", () => e(new H())), new b(
|
|
1327
1337
|
this._renderingMode,
|
|
1328
1338
|
this._initialArgs,
|
|
1329
1339
|
this._initialUiState,
|
|
@@ -1349,7 +1359,7 @@ const dt = class b {
|
|
|
1349
1359
|
);
|
|
1350
1360
|
}
|
|
1351
1361
|
sections(e) {
|
|
1352
|
-
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(
|
|
1353
1363
|
this._renderingMode,
|
|
1354
1364
|
this._initialArgs,
|
|
1355
1365
|
this._initialUiState,
|
|
@@ -1373,7 +1383,7 @@ const dt = class b {
|
|
|
1373
1383
|
}
|
|
1374
1384
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1375
1385
|
title(e) {
|
|
1376
|
-
return
|
|
1386
|
+
return j("title", () => e(new H())), new b(
|
|
1377
1387
|
this._renderingMode,
|
|
1378
1388
|
this._initialArgs,
|
|
1379
1389
|
this._initialUiState,
|
|
@@ -1449,7 +1459,7 @@ const dt = class b {
|
|
|
1449
1459
|
* Influences dependency graph construction.
|
|
1450
1460
|
*/
|
|
1451
1461
|
enriches(e) {
|
|
1452
|
-
return
|
|
1462
|
+
return j("enrichmentTargets", e), new b(
|
|
1453
1463
|
this._renderingMode,
|
|
1454
1464
|
this._initialArgs,
|
|
1455
1465
|
this._initialUiState,
|
|
@@ -1475,7 +1485,7 @@ const dt = class b {
|
|
|
1475
1485
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1476
1486
|
const t = {
|
|
1477
1487
|
v3: {
|
|
1478
|
-
sdkVersion:
|
|
1488
|
+
sdkVersion: z,
|
|
1479
1489
|
renderingMode: this._renderingMode,
|
|
1480
1490
|
initialArgs: this._initialArgs,
|
|
1481
1491
|
initialUiState: this._initialUiState,
|
|
@@ -1487,88 +1497,94 @@ const dt = class b {
|
|
|
1487
1497
|
featureFlags: this._featureFlags
|
|
1488
1498
|
},
|
|
1489
1499
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1490
|
-
sdkVersion:
|
|
1500
|
+
sdkVersion: z,
|
|
1491
1501
|
renderingMode: this._renderingMode,
|
|
1492
1502
|
initialArgs: this._initialArgs,
|
|
1493
|
-
inputsValid:
|
|
1494
|
-
sections:
|
|
1503
|
+
inputsValid: Z(this._inputsValid),
|
|
1504
|
+
sections: Z(this._sections),
|
|
1495
1505
|
outputs: Object.fromEntries(
|
|
1496
|
-
Object.entries(this._outputs).map(([r, i]) => [r,
|
|
1506
|
+
Object.entries(this._outputs).map(([r, i]) => [r, Z(i)])
|
|
1497
1507
|
)
|
|
1498
1508
|
};
|
|
1499
|
-
return globalThis.platformaApiVersion = e,
|
|
1509
|
+
return globalThis.platformaApiVersion = e, He() ? xe({ sdkVersion: z, apiVersion: platformaApiVersion }) : { config: t };
|
|
1500
1510
|
}
|
|
1501
1511
|
};
|
|
1502
|
-
|
|
1512
|
+
x(gt, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
1503
1513
|
supportsLazyState: !0,
|
|
1504
1514
|
requiresUIAPIVersion: 1,
|
|
1505
1515
|
requiresModelAPIVersion: 1
|
|
1506
1516
|
});
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1517
|
+
function bt() {
|
|
1518
|
+
return xe({ sdkVersion: z, apiVersion: platformaApiVersion });
|
|
1509
1519
|
}
|
|
1510
1520
|
export {
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
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,
|
|
1524
1535
|
ne as RT_RESOURCE_MAP,
|
|
1525
1536
|
ie as RT_RESOURCE_MAP_PARTITIONED,
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1537
|
+
H as RenderCtx,
|
|
1538
|
+
dt as ResultPool,
|
|
1539
|
+
Vt as StandardErrorLike,
|
|
1529
1540
|
Ye as Trace,
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
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,
|
|
1550
1563
|
re as ifDef,
|
|
1551
|
-
|
|
1564
|
+
ft as isConfigLambda,
|
|
1552
1565
|
ae as isDataInfo,
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
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,
|
|
1562
1575
|
le as mapPObjectData,
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1576
|
+
Oe as mapPTableDef,
|
|
1577
|
+
De as mapValueInVOE,
|
|
1578
|
+
Ot as matchAxis,
|
|
1579
|
+
kt as matchAxisId,
|
|
1580
|
+
Dt as matchPColumn,
|
|
1581
|
+
Ke as parseJson,
|
|
1568
1582
|
oe as parsePColumnData,
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1583
|
+
ee as readAnnotation,
|
|
1584
|
+
Rt as readMetadata,
|
|
1585
|
+
fe as resolveAnchors,
|
|
1586
|
+
J as selectorsToPredicate,
|
|
1587
|
+
$t as stringifyColumnId,
|
|
1588
|
+
de as withEnrichments
|
|
1573
1589
|
};
|
|
1574
1590
|
//# sourceMappingURL=index.js.map
|