@platforma-sdk/model 1.34.8 → 1.34.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +187 -181
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/PFrameForGraphs.ts +18 -10
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var qe = Object.defineProperty;
|
|
2
2
|
var ze = (t, e, n) => e in t ? qe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var O = (t, e, n) => ze(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { isPColumn as Le, mapPObjectData as be, isDataInfoEntries as Te, isDataInfo as we, dataInfoToEntries as Ye, selectorsToPredicate as X, resolveAnchors as Ae, deriveNativeId as Xe, isPColumnSpec as ne, isPartitionedDataInfoEntries as Qe, getAxisId as D, entriesToDataInfo as Ze, canonicalizeAxisId as et, withEnrichments as xe, AnchoredIdDeriver as Ce, isPlRef as tt, mapValueInVOE as nt, ensurePColumn as rt, extractAllColumns as it, mapPTableDef as st, mapDataInfo as ot, canonicalizeJson as K, matchAxisId as
|
|
4
|
+
import { isPColumn as Le, mapPObjectData as be, isDataInfoEntries as Te, isDataInfo as we, dataInfoToEntries as Ye, selectorsToPredicate as X, resolveAnchors as Ae, deriveNativeId as Xe, isPColumnSpec as ne, isPartitionedDataInfoEntries as Qe, getAxisId as D, entriesToDataInfo as Ze, canonicalizeAxisId as et, withEnrichments as xe, AnchoredIdDeriver as Ce, isPlRef as tt, mapValueInVOE as nt, ensurePColumn as rt, extractAllColumns as it, mapPTableDef as st, mapDataInfo as ot, canonicalizeJson as K, matchAxisId as j, getColumnIdAndSpec as Ee, parseJson as fe, isPTableAbsent as at, uniquePlId as lt, PTableNA as ut } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import ke from "canonicalize";
|
|
7
|
-
import { z as
|
|
7
|
+
import { z as U } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
9
|
class ct extends Error {
|
|
10
10
|
constructor(e, n) {
|
|
@@ -219,7 +219,7 @@ function De(t) {
|
|
|
219
219
|
function ft() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function y() {
|
|
223
223
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
224
224
|
throw new Error("Not in config rendering context");
|
|
225
225
|
}
|
|
@@ -231,7 +231,7 @@ function H(t, e) {
|
|
|
231
231
|
}
|
|
232
232
|
const ce = /* @__PURE__ */ new Map();
|
|
233
233
|
function ht(t, e) {
|
|
234
|
-
t in
|
|
234
|
+
t in y().callbackRegistry || (y().callbackRegistry[t] = (n) => {
|
|
235
235
|
for (const r of ce.get(t))
|
|
236
236
|
r(n);
|
|
237
237
|
}, ce.set(t, [])), ce.get(t).push(e);
|
|
@@ -300,46 +300,46 @@ class E {
|
|
|
300
300
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
301
301
|
];
|
|
302
302
|
return he(
|
|
303
|
-
|
|
303
|
+
y().resolveWithCommon(this.handle, e, ...n),
|
|
304
304
|
(i) => new E(i, r)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
get resourceType() {
|
|
308
|
-
return
|
|
308
|
+
return y().getResourceType(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getInputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return y().getInputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getOutputsLocked() {
|
|
314
|
-
return
|
|
314
|
+
return y().getOutputsLocked(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsReadyOrError() {
|
|
317
|
-
return
|
|
317
|
+
return y().getIsReadyOrError(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getIsFinal() {
|
|
320
|
-
return
|
|
320
|
+
return y().getIsFinal(this.handle);
|
|
321
321
|
}
|
|
322
322
|
getError() {
|
|
323
323
|
const e = [...this.resolvePath, "error"];
|
|
324
324
|
return he(
|
|
325
|
-
|
|
325
|
+
y().getError(this.handle),
|
|
326
326
|
(n) => new E(n, e)
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
listInputFields() {
|
|
330
|
-
return
|
|
330
|
+
return y().listInputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listOutputFields() {
|
|
333
|
-
return
|
|
333
|
+
return y().listOutputFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
listDynamicFields() {
|
|
336
|
-
return
|
|
336
|
+
return y().listDynamicFields(this.handle);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueBase64(e) {
|
|
339
|
-
return
|
|
339
|
+
return y().getKeyValueBase64(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsString(e) {
|
|
342
|
-
return
|
|
342
|
+
return y().getKeyValueAsString(this.handle, e);
|
|
343
343
|
}
|
|
344
344
|
getKeyValueAsJson(e) {
|
|
345
345
|
const n = this.getKeyValueAsString(e);
|
|
@@ -347,10 +347,10 @@ class E {
|
|
|
347
347
|
return JSON.parse(n);
|
|
348
348
|
}
|
|
349
349
|
getDataBase64() {
|
|
350
|
-
return
|
|
350
|
+
return y().getDataBase64(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsString() {
|
|
353
|
-
return
|
|
353
|
+
return y().getDataAsString(this.handle);
|
|
354
354
|
}
|
|
355
355
|
getDataAsJson() {
|
|
356
356
|
const e = this.getDataAsString();
|
|
@@ -371,7 +371,7 @@ class E {
|
|
|
371
371
|
*
|
|
372
372
|
*/
|
|
373
373
|
parsePObjectCollection(e = !1, n = "") {
|
|
374
|
-
const r =
|
|
374
|
+
const r = y().parsePObjectCollection(
|
|
375
375
|
this.handle,
|
|
376
376
|
e,
|
|
377
377
|
n,
|
|
@@ -386,14 +386,14 @@ class E {
|
|
|
386
386
|
return i;
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsBase64(e) {
|
|
389
|
-
return new _(
|
|
389
|
+
return new _(y().getBlobContentAsBase64(this.handle, e));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsString(e) {
|
|
392
|
-
return new _(
|
|
392
|
+
return new _(y().getBlobContentAsString(this.handle, e));
|
|
393
393
|
}
|
|
394
394
|
getFileContentAsJson(e) {
|
|
395
395
|
return new _(
|
|
396
|
-
|
|
396
|
+
y().getBlobContentAsString(this.handle, e)
|
|
397
397
|
).mapDefined((n) => JSON.parse(n));
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
@@ -412,7 +412,7 @@ class E {
|
|
|
412
412
|
* @returns downloaded file handle
|
|
413
413
|
*/
|
|
414
414
|
getFileHandle() {
|
|
415
|
-
return new _(
|
|
415
|
+
return new _(y().getDownloadedBlobContentHandle(this.handle));
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @deprecated use getFileHandle
|
|
@@ -424,7 +424,7 @@ class E {
|
|
|
424
424
|
* @returns downloaded file handle
|
|
425
425
|
*/
|
|
426
426
|
getRemoteFileHandle() {
|
|
427
|
-
return new _(
|
|
427
|
+
return new _(y().getOnDemandBlobContentHandle(this.handle));
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
430
|
* @deprecated use getRemoteFileHandle
|
|
@@ -436,22 +436,22 @@ class E {
|
|
|
436
436
|
* @returns the url to the extracted folder
|
|
437
437
|
*/
|
|
438
438
|
extractArchiveAndGetURL(e) {
|
|
439
|
-
return new _(
|
|
439
|
+
return new _(y().extractArchiveAndGetURL(this.handle, e));
|
|
440
440
|
}
|
|
441
441
|
getImportProgress() {
|
|
442
|
-
return new _(
|
|
442
|
+
return new _(y().getImportProgress(this.handle));
|
|
443
443
|
}
|
|
444
444
|
getLastLogs(e) {
|
|
445
|
-
return new _(
|
|
445
|
+
return new _(y().getLastLogs(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLog(e) {
|
|
448
|
-
return new _(
|
|
448
|
+
return new _(y().getProgressLog(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getProgressLogWithInfo(e) {
|
|
451
|
-
return new _(
|
|
451
|
+
return new _(y().getProgressLogWithInfo(this.handle, e));
|
|
452
452
|
}
|
|
453
453
|
getLogHandle() {
|
|
454
|
-
return new _(
|
|
454
|
+
return new _(y().getLogHandle(this.handle));
|
|
455
455
|
}
|
|
456
456
|
allFieldsResolved(e = "Input") {
|
|
457
457
|
switch (e) {
|
|
@@ -509,82 +509,82 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
509
509
|
StagingAccessorName: Re,
|
|
510
510
|
getAllFutureAwaits: mt,
|
|
511
511
|
isFutureAwait: Ke
|
|
512
|
-
}, Symbol.toStringTag, { value: "Module" })), yt = "pl7.app/label", vt = "pl7.app/trace", bt =
|
|
513
|
-
type:
|
|
514
|
-
importance:
|
|
515
|
-
id:
|
|
516
|
-
label:
|
|
517
|
-
}), wt =
|
|
512
|
+
}, Symbol.toStringTag, { value: "Module" })), yt = "pl7.app/label", vt = "pl7.app/trace", bt = U.object({
|
|
513
|
+
type: U.string(),
|
|
514
|
+
importance: U.number().optional(),
|
|
515
|
+
id: U.string().optional(),
|
|
516
|
+
label: U.string()
|
|
517
|
+
}), wt = U.array(bt), At = 1e-3, xt = "__LABEL__", Pe = "__LABEL__@1";
|
|
518
518
|
function je(t, e, n = {}) {
|
|
519
|
-
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((
|
|
519
|
+
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((p) => {
|
|
520
520
|
var P, R;
|
|
521
|
-
const
|
|
522
|
-
let
|
|
523
|
-
"spec" in
|
|
524
|
-
const h = (P =
|
|
525
|
-
...
|
|
521
|
+
const v = e(p);
|
|
522
|
+
let f, m, w;
|
|
523
|
+
"spec" in v && typeof v.spec == "object" ? (f = v.spec, m = v.prefixTrace, w = v.suffixTrace) : f = v;
|
|
524
|
+
const h = (P = f.annotations) == null ? void 0 : P[yt], I = (R = f.annotations) == null ? void 0 : R[vt], x = (I ? wt.safeParse(JSON.parse(I)).data : void 0) ?? [], b = [
|
|
525
|
+
...m ?? [],
|
|
526
526
|
...x,
|
|
527
|
-
...
|
|
527
|
+
...w ?? []
|
|
528
528
|
];
|
|
529
529
|
if (h !== void 0) {
|
|
530
530
|
const k = { label: h, type: xt, importance: -2 };
|
|
531
|
-
n.addLabelAsSuffix ?
|
|
531
|
+
n.addLabelAsSuffix ? b.push(k) : b.splice(0, 0, k);
|
|
532
532
|
}
|
|
533
533
|
const A = [], L = /* @__PURE__ */ new Map();
|
|
534
|
-
for (let k =
|
|
535
|
-
const { type: W } =
|
|
536
|
-
L.set(W,
|
|
537
|
-
const F = `${W}@${
|
|
534
|
+
for (let k = b.length - 1; k >= 0; --k) {
|
|
535
|
+
const { type: W } = b[k], V = b[k].importance ?? 0, N = (L.get(W) ?? 0) + 1;
|
|
536
|
+
L.set(W, N);
|
|
537
|
+
const F = `${W}@${N}`;
|
|
538
538
|
s.set(F, (s.get(F) ?? 0) + 1), r.set(
|
|
539
539
|
F,
|
|
540
540
|
Math.max(
|
|
541
541
|
r.get(F) ?? Number.NEGATIVE_INFINITY,
|
|
542
|
-
|
|
542
|
+
V - (b.length - k) * At
|
|
543
543
|
)
|
|
544
|
-
), A.push({ ...
|
|
544
|
+
), A.push({ ...b[k], fullType: F, occurrenceIndex: N });
|
|
545
545
|
}
|
|
546
546
|
return A.reverse(), {
|
|
547
|
-
value:
|
|
548
|
-
spec:
|
|
547
|
+
value: p,
|
|
548
|
+
spec: f,
|
|
549
549
|
label: h,
|
|
550
550
|
fullTrace: A
|
|
551
551
|
};
|
|
552
552
|
}), a = [], l = [], u = [...r];
|
|
553
|
-
u.sort(([,
|
|
554
|
-
for (const [
|
|
555
|
-
|
|
556
|
-
const c = (
|
|
557
|
-
const
|
|
558
|
-
for (let
|
|
559
|
-
const
|
|
553
|
+
u.sort(([, p], [, v]) => v - p);
|
|
554
|
+
for (const [p] of u)
|
|
555
|
+
p.endsWith("@1") || s.get(p) === t.length ? a.push(p) : l.push(p);
|
|
556
|
+
const c = (p, v = !1) => {
|
|
557
|
+
const f = [];
|
|
558
|
+
for (let m = 0; m < o.length; m++) {
|
|
559
|
+
const w = o[m], h = w.fullTrace.filter((b) => p.has(b.fullType) || i && i.has(b.type));
|
|
560
560
|
if (h.length === 0)
|
|
561
|
-
if (
|
|
562
|
-
|
|
561
|
+
if (v)
|
|
562
|
+
f.push({
|
|
563
563
|
label: "Unlabeled",
|
|
564
|
-
value:
|
|
564
|
+
value: w.value
|
|
565
565
|
});
|
|
566
566
|
else return;
|
|
567
|
-
const I = h.map((
|
|
568
|
-
|
|
567
|
+
const I = h.map((b) => b.label), x = n.separator ?? " / ";
|
|
568
|
+
f.push({
|
|
569
569
|
label: I.join(x),
|
|
570
|
-
value:
|
|
570
|
+
value: w.value
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
|
-
return
|
|
573
|
+
return f;
|
|
574
574
|
};
|
|
575
575
|
if (a.length === 0) {
|
|
576
576
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
577
577
|
return c(new Set(Pe), !0);
|
|
578
578
|
}
|
|
579
|
-
let d = 0,
|
|
579
|
+
let d = 0, g = -1;
|
|
580
580
|
for (; d < a.length; ) {
|
|
581
|
-
const
|
|
582
|
-
n.includeNativeLabel &&
|
|
583
|
-
for (let
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
|
|
581
|
+
const p = /* @__PURE__ */ new Set();
|
|
582
|
+
n.includeNativeLabel && p.add(Pe);
|
|
583
|
+
for (let f = 0; f < d; ++f) p.add(a[f]);
|
|
584
|
+
g >= 0 && p.add(a[g]);
|
|
585
|
+
const v = c(p);
|
|
586
|
+
if (v !== void 0 && new Set(v.map((f) => f.label)).size === t.length) return v;
|
|
587
|
+
g++, g >= a.length && (d++, g = d);
|
|
588
588
|
}
|
|
589
589
|
return c(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
590
590
|
}
|
|
@@ -959,43 +959,43 @@ class le {
|
|
|
959
959
|
};
|
|
960
960
|
let u = () => !1;
|
|
961
961
|
if (a) {
|
|
962
|
-
const
|
|
963
|
-
if (Se(
|
|
962
|
+
const f = (Array.isArray(a) ? a : [a]).map((m) => {
|
|
963
|
+
if (Se(m)) {
|
|
964
964
|
if (!r)
|
|
965
965
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
966
|
-
return X(Ae(r.anchors,
|
|
966
|
+
return X(Ae(r.anchors, m, n));
|
|
967
967
|
} else
|
|
968
|
-
return X(
|
|
968
|
+
return X(m);
|
|
969
969
|
});
|
|
970
|
-
u = (
|
|
970
|
+
u = (m) => f.some((w) => w(m));
|
|
971
971
|
}
|
|
972
|
-
const c = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [],
|
|
973
|
-
for (const
|
|
974
|
-
const
|
|
975
|
-
let
|
|
976
|
-
if (
|
|
972
|
+
const c = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], d = [], g = /* @__PURE__ */ new Set();
|
|
973
|
+
for (const f of c) {
|
|
974
|
+
const m = Se(f);
|
|
975
|
+
let w;
|
|
976
|
+
if (m) {
|
|
977
977
|
if (!r)
|
|
978
978
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
979
|
-
|
|
979
|
+
w = Ae(r.anchors, f, n);
|
|
980
980
|
} else
|
|
981
|
-
|
|
981
|
+
w = f;
|
|
982
982
|
const h = /* @__PURE__ */ new Set(), I = [];
|
|
983
983
|
for (const A of this.providers) {
|
|
984
|
-
const L = A.selectColumns(
|
|
984
|
+
const L = A.selectColumns(w);
|
|
985
985
|
for (const P of L) {
|
|
986
986
|
if (u(P.spec)) continue;
|
|
987
987
|
if (h.has(P.id))
|
|
988
988
|
throw new Error(`Duplicate column id ${P.id} in provider ${A.constructor.name}`);
|
|
989
989
|
const R = Xe(P.spec);
|
|
990
|
-
|
|
990
|
+
g.has(R) || (h.add(P.id), g.add(R), I.push(P));
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
if (I.length === 0) continue;
|
|
994
|
-
const x = Dt(
|
|
994
|
+
const x = Dt(f), b = x.length > 0;
|
|
995
995
|
for (const A of I) {
|
|
996
996
|
if (!ne(A.spec)) continue;
|
|
997
997
|
const L = A.spec;
|
|
998
|
-
if (
|
|
998
|
+
if (b) {
|
|
999
999
|
if (Lt(A.data))
|
|
1000
1000
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${A.id}`);
|
|
1001
1001
|
const P = _t(A.data);
|
|
@@ -1008,33 +1008,33 @@ class le {
|
|
|
1008
1008
|
const R = St(P), k = x[x.length - 1];
|
|
1009
1009
|
if (k >= P.partitionKeyLength)
|
|
1010
1010
|
throw new Error(`Not enough partition keys (${P.partitionKeyLength}) for requested split axes (max index ${k}) in column ${L.name}`);
|
|
1011
|
-
const W = x.map((S) => this.findLabels(D(L.axesSpec[S]))),
|
|
1011
|
+
const W = x.map((S) => this.findLabels(D(L.axesSpec[S]))), V = [], N = (S, G) => {
|
|
1012
1012
|
if (G >= x.length) {
|
|
1013
|
-
if (
|
|
1013
|
+
if (V.push([...S]), V.length > 1e4)
|
|
1014
1014
|
throw new Error("Too many key combinations, aborting.");
|
|
1015
1015
|
return;
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1019
|
-
throw new Error(`Axis index ${
|
|
1020
|
-
const
|
|
1021
|
-
if (!
|
|
1022
|
-
|
|
1017
|
+
const $ = x[G];
|
|
1018
|
+
if ($ >= R.length)
|
|
1019
|
+
throw new Error(`Axis index ${$} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${A.id}`);
|
|
1020
|
+
const J = R[$];
|
|
1021
|
+
if (!J || J.length === 0) {
|
|
1022
|
+
V.length = 0;
|
|
1023
1023
|
return;
|
|
1024
1024
|
}
|
|
1025
|
-
for (const ee of
|
|
1026
|
-
S.push(ee),
|
|
1025
|
+
for (const ee of J)
|
|
1026
|
+
S.push(ee), N(S, G + 1), S.pop();
|
|
1027
1027
|
};
|
|
1028
|
-
if (
|
|
1028
|
+
if (N([], 0), V.length === 0)
|
|
1029
1029
|
continue;
|
|
1030
1030
|
const F = [...L.axesSpec], Be = x.map((S) => S);
|
|
1031
1031
|
for (let S = x.length - 1; S >= 0; S--)
|
|
1032
1032
|
F.splice(x[S], 1);
|
|
1033
1033
|
const We = { ...L, axesSpec: F };
|
|
1034
|
-
for (const S of
|
|
1035
|
-
const G = S.map((
|
|
1036
|
-
const ee = Be[
|
|
1037
|
-
return { axisIdx: ee, axisId: Ge, value:
|
|
1034
|
+
for (const S of V) {
|
|
1035
|
+
const G = S.map(($, J) => {
|
|
1036
|
+
const ee = Be[J], Ge = D(L.axesSpec[ee]), ue = W[J], He = (ue == null ? void 0 : ue[$]) ?? String($);
|
|
1037
|
+
return { axisIdx: ee, axisId: Ge, value: $, label: He };
|
|
1038
1038
|
});
|
|
1039
1039
|
d.push({
|
|
1040
1040
|
type: "split",
|
|
@@ -1055,33 +1055,33 @@ class le {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
if (d.length === 0) return [];
|
|
1058
|
-
const
|
|
1058
|
+
const p = je(
|
|
1059
1059
|
d,
|
|
1060
|
-
(
|
|
1061
|
-
spec:
|
|
1062
|
-
suffixTrace:
|
|
1060
|
+
(f) => ({
|
|
1061
|
+
spec: f.spec,
|
|
1062
|
+
suffixTrace: f.type === "split" ? Et(f.axisFilters) : void 0
|
|
1063
1063
|
}),
|
|
1064
1064
|
l
|
|
1065
|
-
),
|
|
1066
|
-
for (const { value:
|
|
1067
|
-
const { originalColumn:
|
|
1068
|
-
let
|
|
1069
|
-
r ?
|
|
1070
|
-
let A = { ...
|
|
1065
|
+
), v = [];
|
|
1066
|
+
for (const { value: f, label: m } of p) {
|
|
1067
|
+
const { originalColumn: w, spec: h } = f, I = f.type === "split" ? f.axisFilters : void 0, x = kt(I);
|
|
1068
|
+
let b;
|
|
1069
|
+
r ? b = r.deriveS(h, x) : b = Ot(w.id, x);
|
|
1070
|
+
let A = { ...f.adjustedSpec };
|
|
1071
1071
|
o && (A = {
|
|
1072
1072
|
...A,
|
|
1073
1073
|
annotations: {
|
|
1074
1074
|
...A.annotations ?? {},
|
|
1075
|
-
"pl7.app/label":
|
|
1075
|
+
"pl7.app/label": m
|
|
1076
1076
|
}
|
|
1077
|
-
}),
|
|
1078
|
-
id:
|
|
1077
|
+
}), v.push({
|
|
1078
|
+
id: b,
|
|
1079
1079
|
spec: A,
|
|
1080
|
-
data: () =>
|
|
1081
|
-
label:
|
|
1080
|
+
data: () => f.type === "split" ? Ze(It(f.dataEntries, x)) : f.originalColumn.data,
|
|
1081
|
+
label: m
|
|
1082
1082
|
});
|
|
1083
1083
|
}
|
|
1084
|
-
return
|
|
1084
|
+
return v;
|
|
1085
1085
|
}
|
|
1086
1086
|
getColumns(e, n) {
|
|
1087
1087
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1118,7 +1118,7 @@ function _e(t) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
class Rt {
|
|
1120
1120
|
constructor() {
|
|
1121
|
-
O(this, "ctx",
|
|
1121
|
+
O(this, "ctx", y());
|
|
1122
1122
|
}
|
|
1123
1123
|
/**
|
|
1124
1124
|
* @deprecated use getOptions()
|
|
@@ -1393,7 +1393,7 @@ class te {
|
|
|
1393
1393
|
// lazy rendering because this feature is rarely used
|
|
1394
1394
|
O(this, "_activeArgsCache");
|
|
1395
1395
|
O(this, "resultPool", new Rt());
|
|
1396
|
-
this.ctx =
|
|
1396
|
+
this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1397
1397
|
}
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -1469,7 +1469,7 @@ class te {
|
|
|
1469
1469
|
this.ctx.logError(e);
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
const Y = "1.34.
|
|
1472
|
+
const Y = "1.34.10";
|
|
1473
1473
|
function Ft(t) {
|
|
1474
1474
|
return t.__renderLambda === !0;
|
|
1475
1475
|
}
|
|
@@ -1477,7 +1477,7 @@ function pe(t) {
|
|
|
1477
1477
|
if (t !== void 0)
|
|
1478
1478
|
return Ft(t) ? t.handle : t;
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function M(t) {
|
|
1481
1481
|
if (t !== void 0)
|
|
1482
1482
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1483
1483
|
}
|
|
@@ -1517,10 +1517,10 @@ function kn(t) {
|
|
|
1517
1517
|
renderingMode: n,
|
|
1518
1518
|
initialArgs: o,
|
|
1519
1519
|
outputs: Object.fromEntries(
|
|
1520
|
-
Object.entries(r).map(([u, c]) => [u,
|
|
1520
|
+
Object.entries(r).map(([u, c]) => [u, M(c)])
|
|
1521
1521
|
),
|
|
1522
|
-
inputsValid:
|
|
1523
|
-
sections:
|
|
1522
|
+
inputsValid: M(i),
|
|
1523
|
+
sections: M(s),
|
|
1524
1524
|
initialUiState: void 0,
|
|
1525
1525
|
code: a
|
|
1526
1526
|
};
|
|
@@ -1535,10 +1535,10 @@ function kn(t) {
|
|
|
1535
1535
|
renderingMode: r,
|
|
1536
1536
|
initialArgs: o,
|
|
1537
1537
|
outputs: Object.fromEntries(
|
|
1538
|
-
Object.entries(i).map(([u, c]) => [u,
|
|
1538
|
+
Object.entries(i).map(([u, c]) => [u, M(c)])
|
|
1539
1539
|
),
|
|
1540
|
-
inputsValid:
|
|
1541
|
-
sections:
|
|
1540
|
+
inputsValid: M(n),
|
|
1541
|
+
sections: M(s),
|
|
1542
1542
|
initialUiState: void 0,
|
|
1543
1543
|
code: a
|
|
1544
1544
|
};
|
|
@@ -1779,10 +1779,10 @@ function Je(t, e) {
|
|
|
1779
1779
|
for (const a of r)
|
|
1780
1780
|
for (const l of a.spec.axesSpec) {
|
|
1781
1781
|
const u = D(l);
|
|
1782
|
-
i.some((c) =>
|
|
1782
|
+
i.some((c) => j(c, u)) || i.push(u);
|
|
1783
1783
|
}
|
|
1784
1784
|
for (const a of n) {
|
|
1785
|
-
const l = D(a.spec.axesSpec[0]), u = i.findIndex((c) =>
|
|
1785
|
+
const l = D(a.spec.axesSpec[0]), u = i.findIndex((c) => j(c, l));
|
|
1786
1786
|
u !== -1 && i.splice(u, 1);
|
|
1787
1787
|
}
|
|
1788
1788
|
const s = (a, l) => {
|
|
@@ -1793,10 +1793,10 @@ function Je(t, e) {
|
|
|
1793
1793
|
return u;
|
|
1794
1794
|
}, o = [];
|
|
1795
1795
|
for (const a of e) {
|
|
1796
|
-
const l = a.spec.axesSpec[0], u = D(l), c = i.findIndex((d) =>
|
|
1796
|
+
const l = a.spec.axesSpec[0], u = D(l), c = i.findIndex((d) => j(d, u));
|
|
1797
1797
|
if (c !== -1) {
|
|
1798
|
-
const d = i[c],
|
|
1799
|
-
|
|
1798
|
+
const d = i[c], g = Object.keys(d.domain ?? {}).length, p = Object.keys(l.domain ?? {}).length;
|
|
1799
|
+
g > p ? o.push({
|
|
1800
1800
|
id: s(a.id, d.domain),
|
|
1801
1801
|
spec: {
|
|
1802
1802
|
...a.spec,
|
|
@@ -1869,37 +1869,37 @@ function jt(t) {
|
|
|
1869
1869
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1870
1870
|
}
|
|
1871
1871
|
function Rn(t, e, n, r, i) {
|
|
1872
|
-
var
|
|
1873
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1872
|
+
var m, w;
|
|
1873
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((m = r == null ? void 0 : r.pTableParams) == null ? void 0 : m.filters) ?? []], a = ((w = r == null ? void 0 : r.pTableParams) == null ? void 0 : w.sorting) ?? [], l = e.filter((h) => !Kt(h.spec)), u = l.find((h) => n(h.spec));
|
|
1874
1874
|
if (!u) return;
|
|
1875
1875
|
const c = Ne(t.resultPool);
|
|
1876
1876
|
if (!c) return;
|
|
1877
1877
|
const d = new Set((() => {
|
|
1878
1878
|
var I, x;
|
|
1879
1879
|
if (s === "inner") return [];
|
|
1880
|
-
const h = (x = (I = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : I.hiddenColIds) == null ? void 0 : x.map(fe).filter((
|
|
1881
|
-
return h || l.filter((
|
|
1880
|
+
const h = (x = (I = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : I.hiddenColIds) == null ? void 0 : x.map(fe).filter((b) => b.type === "column").map((b) => b.id);
|
|
1881
|
+
return h || l.filter((b) => jt(b.spec)).map((b) => b.id);
|
|
1882
1882
|
})());
|
|
1883
1883
|
d.delete(u.id), [...o.map((h) => h.column), ...a.map((h) => h.column)].filter((h) => h.type === "column").map((h) => d.delete(h.id));
|
|
1884
|
-
const
|
|
1884
|
+
const g = l.filter((h) => !d.has(h.id)), p = Je(g.map(Ee), c), v = [
|
|
1885
1885
|
...u.spec.axesSpec.map((h) => ({
|
|
1886
1886
|
type: "axis",
|
|
1887
1887
|
id: D(h),
|
|
1888
1888
|
spec: h
|
|
1889
1889
|
})),
|
|
1890
|
-
...[...l, ...
|
|
1890
|
+
...[...l, ...p].map((h) => ({
|
|
1891
1891
|
type: "column",
|
|
1892
1892
|
id: h.id,
|
|
1893
1893
|
spec: h.spec
|
|
1894
1894
|
}))
|
|
1895
1895
|
];
|
|
1896
|
-
if (!Me([...
|
|
1897
|
-
const
|
|
1898
|
-
Ue(l,
|
|
1896
|
+
if (!Me([...g, ...p])) return;
|
|
1897
|
+
const f = t.createPTable(
|
|
1898
|
+
Ue(l, p, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1899
1899
|
);
|
|
1900
1900
|
return {
|
|
1901
|
-
tableSpec:
|
|
1902
|
-
tableHandle:
|
|
1901
|
+
tableSpec: v,
|
|
1902
|
+
tableHandle: f
|
|
1903
1903
|
};
|
|
1904
1904
|
}
|
|
1905
1905
|
function Fn(t, e, n) {
|
|
@@ -1956,7 +1956,7 @@ function Ut(t) {
|
|
|
1956
1956
|
function Bt(t, e) {
|
|
1957
1957
|
const n = Ut(t), r = [...n.keys()].map(fe), i = [];
|
|
1958
1958
|
for (const l of e.values()) {
|
|
1959
|
-
const u = r.find((c) =>
|
|
1959
|
+
const u = r.find((c) => j(l, c));
|
|
1960
1960
|
u && i.push(K(u));
|
|
1961
1961
|
}
|
|
1962
1962
|
const s = new Set(i), o = /* @__PURE__ */ new Map();
|
|
@@ -1982,21 +1982,21 @@ function Gt(t, e) {
|
|
|
1982
1982
|
return [e];
|
|
1983
1983
|
const r = n.map((u) => {
|
|
1984
1984
|
const c = [];
|
|
1985
|
-
for (const [d,
|
|
1986
|
-
|
|
1985
|
+
for (const [d, g] of t)
|
|
1986
|
+
j(g, u) && !j(u, g) && c.push(g);
|
|
1987
1987
|
return c;
|
|
1988
1988
|
}), i = $t(r), s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = i.map((u) => {
|
|
1989
1989
|
const c = /* @__PURE__ */ new Set();
|
|
1990
|
-
return u.map((d,
|
|
1991
|
-
const
|
|
1992
|
-
return Object.entries(
|
|
1993
|
-
if ((
|
|
1994
|
-
const
|
|
1995
|
-
c.add(
|
|
1990
|
+
return u.map((d, g) => {
|
|
1991
|
+
const p = e.spec.axesSpec[g].domain, v = d.domain;
|
|
1992
|
+
return Object.entries(v ?? {}).forEach(([f, m]) => {
|
|
1993
|
+
if ((p == null ? void 0 : p[f]) === void 0) {
|
|
1994
|
+
const w = JSON.stringify([f, m]);
|
|
1995
|
+
c.add(w), s.add(w);
|
|
1996
1996
|
}
|
|
1997
1997
|
}), {
|
|
1998
1998
|
...d,
|
|
1999
|
-
annotations: e.spec.axesSpec[
|
|
1999
|
+
annotations: e.spec.axesSpec[g].annotations
|
|
2000
2000
|
};
|
|
2001
2001
|
}), c;
|
|
2002
2002
|
});
|
|
@@ -2004,23 +2004,23 @@ function Gt(t, e) {
|
|
|
2004
2004
|
a.some((c) => !c.has(u)) && o.add(u);
|
|
2005
2005
|
});
|
|
2006
2006
|
const l = i.map((u, c) => {
|
|
2007
|
-
var
|
|
2008
|
-
const d = Vt(e.id, u.map((
|
|
2009
|
-
var
|
|
2010
|
-
return (
|
|
2011
|
-
}).join(" / "),
|
|
2007
|
+
var f;
|
|
2008
|
+
const d = Vt(e.id, u.map((m) => m.domain)), g = ((f = e.spec.annotations) == null ? void 0 : f[Ie]) ?? "", p = [...a[c]].filter((m) => o.has(m)).sort().map((m) => {
|
|
2009
|
+
var w;
|
|
2010
|
+
return (w = JSON.parse(m)) == null ? void 0 : w[1];
|
|
2011
|
+
}).join(" / "), v = {
|
|
2012
2012
|
...e.spec.annotations,
|
|
2013
2013
|
[Jt]: "true"
|
|
2014
2014
|
};
|
|
2015
|
-
return (
|
|
2015
|
+
return (g || p) && (v[Ie] = g && p ? g + " / " + p : g + p), {
|
|
2016
2016
|
id: d,
|
|
2017
2017
|
spec: {
|
|
2018
2018
|
...e.spec,
|
|
2019
|
-
axesSpec: u.map((
|
|
2020
|
-
...
|
|
2021
|
-
annotations: e.spec.axesSpec[
|
|
2019
|
+
axesSpec: u.map((m, w) => ({
|
|
2020
|
+
...m,
|
|
2021
|
+
annotations: e.spec.axesSpec[w].annotations
|
|
2022
2022
|
})),
|
|
2023
|
-
annotations:
|
|
2023
|
+
annotations: v
|
|
2024
2024
|
},
|
|
2025
2025
|
data: e.data
|
|
2026
2026
|
};
|
|
@@ -2033,26 +2033,32 @@ function Kn(t, e) {
|
|
|
2033
2033
|
n.addColumnProvider(t.resultPool), n.addColumns(e);
|
|
2034
2034
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
2035
2035
|
for (const d of e)
|
|
2036
|
-
for (const
|
|
2037
|
-
const
|
|
2038
|
-
r.set(K(
|
|
2036
|
+
for (const g of d.spec.axesSpec) {
|
|
2037
|
+
const p = D(g);
|
|
2038
|
+
r.set(K(p), p), i.set(K(p), p);
|
|
2039
2039
|
}
|
|
2040
2040
|
const s = n.getColumns((d) => Nt(d)) ?? [], o = Bt(s, r);
|
|
2041
2041
|
for (const d of o)
|
|
2042
2042
|
r.set(...d), i.set(...d);
|
|
2043
|
-
const a = (n.getColumns(
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2043
|
+
const a = (n.getColumns((d) => d.axesSpec.some((g) => {
|
|
2044
|
+
const p = D(g);
|
|
2045
|
+
for (const v of r.values())
|
|
2046
|
+
if (j(v, p))
|
|
2047
|
+
return !0;
|
|
2048
|
+
return !1;
|
|
2049
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((d) => !ve(d.spec));
|
|
2047
2050
|
for (const d of a)
|
|
2048
|
-
for (const
|
|
2049
|
-
const
|
|
2050
|
-
i.set(K(
|
|
2051
|
+
for (const g of d.spec.axesSpec) {
|
|
2052
|
+
const p = D(g);
|
|
2053
|
+
i.set(K(p), p);
|
|
2051
2054
|
}
|
|
2052
|
-
const l = (n.getColumns(
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2055
|
+
const l = (n.getColumns((d) => d.axesSpec.some((g) => {
|
|
2056
|
+
const p = D(g);
|
|
2057
|
+
for (const v of i.values())
|
|
2058
|
+
if (j(v, p))
|
|
2059
|
+
return !0;
|
|
2060
|
+
return !1;
|
|
2061
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((d) => ve(d.spec)), u = [...a, ...l], c = Wt(r, u);
|
|
2056
2062
|
if (!c.some(
|
|
2057
2063
|
(d) => d.data instanceof E && !d.data.getIsReadyOrError()
|
|
2058
2064
|
))
|