@platforma-sdk/model 1.27.10 → 1.27.17
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -132
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +7 -2
- package/dist/render/api.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/render/api.ts +30 -17
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _e = Object.defineProperty;
|
|
2
2
|
var Ie = (t, e, n) => e in t ? _e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as M, mapPObjectData as ue, selectorsToPredicate as ce, AnchoredIdDeriver as te, isPlRef as Ce, resolveAnchors as Le, isPColumnSpec as
|
|
3
|
+
var F = (t, e, n) => Ie(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as M, mapPObjectData as ue, selectorsToPredicate as ce, AnchoredIdDeriver as te, isPlRef as Ce, resolveAnchors as Le, isPColumnSpec as N, getAxisId as L, entriesToDataInfo as Fe, mapValueInVOE as Te, ensurePColumn as Re, isDataInfo as me, extractAllColumns as ke, mapPTableDef as De, mapDataInfo as Oe, canonicalizeAxisId as Ee, matchAxisId as G } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import { z as O } from "zod";
|
|
7
7
|
export * from "@milaboratories/pl-error-like";
|
|
@@ -108,14 +108,14 @@ function Lt(t, e) {
|
|
|
108
108
|
operand2: e
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ft(t, e) {
|
|
112
112
|
return {
|
|
113
113
|
type: "GetResourceField",
|
|
114
114
|
source: b(t),
|
|
115
115
|
field: b(e)
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Tt() {
|
|
119
119
|
return function(t) {
|
|
120
120
|
return {
|
|
121
121
|
type: "GetResourceValueAsJson",
|
|
@@ -176,21 +176,21 @@ function Kt(t) {
|
|
|
176
176
|
source: b(t)
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function Jt(t, e) {
|
|
180
180
|
return {
|
|
181
181
|
type: "GetLastLogs",
|
|
182
182
|
source: b(t),
|
|
183
183
|
lines: e
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Nt(t, e) {
|
|
187
187
|
return {
|
|
188
188
|
type: "GetProgressLog",
|
|
189
189
|
source: b(t),
|
|
190
190
|
patternToSearch: e
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function $t(t, e) {
|
|
194
194
|
return {
|
|
195
195
|
type: "GetProgressLogWithInfo",
|
|
196
196
|
source: b(t),
|
|
@@ -212,7 +212,7 @@ function be(t) {
|
|
|
212
212
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
213
213
|
throw new Error("Can't get platforma instance.");
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Je() {
|
|
216
216
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
217
217
|
}
|
|
218
218
|
function h() {
|
|
@@ -220,13 +220,13 @@ function h() {
|
|
|
220
220
|
throw new Error("Not in config rendering context");
|
|
221
221
|
}
|
|
222
222
|
function q(t, e) {
|
|
223
|
-
const n =
|
|
223
|
+
const n = Je();
|
|
224
224
|
if (n === void 0) return !1;
|
|
225
225
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
226
226
|
return n.callbackRegistry[t] = e, !0;
|
|
227
227
|
}
|
|
228
228
|
const ne = /* @__PURE__ */ new Map();
|
|
229
|
-
function
|
|
229
|
+
function Ne(t, e) {
|
|
230
230
|
t in h().callbackRegistry || (h().callbackRegistry[t] = (n) => {
|
|
231
231
|
for (const r of ne.get(t))
|
|
232
232
|
r(n);
|
|
@@ -234,9 +234,9 @@ function Je(t, e) {
|
|
|
234
234
|
}
|
|
235
235
|
class S {
|
|
236
236
|
constructor(e, n = (r) => r) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
this.handle = e, this.postProcess = n,
|
|
237
|
+
F(this, "isResolved", !1);
|
|
238
|
+
F(this, "resolvedValue");
|
|
239
|
+
this.handle = e, this.postProcess = n, Ne(e, (r) => {
|
|
240
240
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
241
241
|
});
|
|
242
242
|
}
|
|
@@ -476,7 +476,7 @@ class I {
|
|
|
476
476
|
return s && (c = c.filter((l) => l[1] !== void 0)), c.map(([l, m]) => o(l, m));
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
const ve = "staging", we = "main",
|
|
479
|
+
const ve = "staging", we = "main", $e = {
|
|
480
480
|
explicitColumnsSupport: !0,
|
|
481
481
|
inlineColumnsSupport: !0,
|
|
482
482
|
activeArgs: !0
|
|
@@ -500,44 +500,105 @@ function Be(t) {
|
|
|
500
500
|
}
|
|
501
501
|
const Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
502
502
|
__proto__: null,
|
|
503
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
503
|
+
GlobalCfgRenderCtxFeatureFlags: $e,
|
|
504
504
|
MainAccessorName: we,
|
|
505
505
|
StagingAccessorName: ve,
|
|
506
506
|
getAllFutureAwaits: Be,
|
|
507
507
|
isFutureAwait: xe
|
|
508
|
-
}, Symbol.toStringTag, { value: "Module" }))
|
|
508
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
509
|
+
function Ue(t, e) {
|
|
510
|
+
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
511
|
+
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
512
|
+
const { partitionKeyLength: s } = t;
|
|
513
|
+
for (const [o] of e)
|
|
514
|
+
if (o >= s)
|
|
515
|
+
throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s}`);
|
|
516
|
+
} else if (t.type === "Json") {
|
|
517
|
+
const { keyLength: s } = t;
|
|
518
|
+
for (const [o] of e)
|
|
519
|
+
if (o >= s)
|
|
520
|
+
throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s}`);
|
|
521
|
+
}
|
|
522
|
+
const r = (s) => {
|
|
523
|
+
for (const [o, a] of n)
|
|
524
|
+
if (s[o] !== a)
|
|
525
|
+
return !1;
|
|
526
|
+
return !0;
|
|
527
|
+
}, i = (s) => {
|
|
528
|
+
const o = [...s];
|
|
529
|
+
for (const [a] of n)
|
|
530
|
+
o.splice(a, 1);
|
|
531
|
+
return o;
|
|
532
|
+
};
|
|
533
|
+
switch (t.type) {
|
|
534
|
+
case "Json": {
|
|
535
|
+
const s = t.data.filter((o) => r(o.key)).map((o) => ({
|
|
536
|
+
key: i(o.key),
|
|
537
|
+
value: o.value
|
|
538
|
+
}));
|
|
539
|
+
return {
|
|
540
|
+
type: "Json",
|
|
541
|
+
keyLength: t.keyLength - e.length,
|
|
542
|
+
data: s
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
case "JsonPartitioned": {
|
|
546
|
+
const s = t.parts.filter((o) => r(o.key)).map((o) => ({
|
|
547
|
+
key: i(o.key),
|
|
548
|
+
value: o.value
|
|
549
|
+
}));
|
|
550
|
+
return {
|
|
551
|
+
type: "JsonPartitioned",
|
|
552
|
+
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
553
|
+
parts: s
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
case "BinaryPartitioned": {
|
|
557
|
+
const s = t.parts.filter((o) => r(o.key)).map((o) => ({
|
|
558
|
+
key: i(o.key),
|
|
559
|
+
value: o.value
|
|
560
|
+
}));
|
|
561
|
+
return {
|
|
562
|
+
type: "BinaryPartitioned",
|
|
563
|
+
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
564
|
+
parts: s
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
const Me = "pl7.app/label", Ge = "pl7.app/trace", We = O.object({
|
|
509
570
|
type: O.string(),
|
|
510
571
|
importance: O.number().optional(),
|
|
511
572
|
id: O.string().optional(),
|
|
512
573
|
label: O.string()
|
|
513
|
-
}),
|
|
574
|
+
}), He = O.array(We), qe = 1e-3, ze = "__LABEL__", pe = "__LABEL__@1";
|
|
514
575
|
function de(t, e, n = {}) {
|
|
515
576
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((f) => {
|
|
516
577
|
var R, k;
|
|
517
578
|
const p = e(f);
|
|
518
579
|
let d, y, g;
|
|
519
580
|
"spec" in p && typeof p.spec == "object" ? (d = p.spec, y = p.prefixTrace, g = p.suffixTrace) : d = p;
|
|
520
|
-
const v = (R = d.annotations) == null ? void 0 : R[
|
|
581
|
+
const v = (R = d.annotations) == null ? void 0 : R[Me], w = (k = d.annotations) == null ? void 0 : k[Ge], x = (w ? He.safeParse(JSON.parse(w)).data : void 0) ?? [], C = [
|
|
521
582
|
...y ?? [],
|
|
522
583
|
...x,
|
|
523
584
|
...g ?? []
|
|
524
585
|
];
|
|
525
586
|
if (v) {
|
|
526
|
-
const A = { label: v, type:
|
|
587
|
+
const A = { label: v, type: ze, importance: -2 };
|
|
527
588
|
n.addLabelAsSuffix ? C.push(A) : C.splice(0, 0, A);
|
|
528
589
|
}
|
|
529
|
-
const P = [],
|
|
590
|
+
const P = [], T = /* @__PURE__ */ new Map();
|
|
530
591
|
for (let A = C.length - 1; A >= 0; --A) {
|
|
531
|
-
const { type: j } = C[A], V = C[A].importance ?? 0, K = (
|
|
532
|
-
|
|
533
|
-
const
|
|
534
|
-
i.set(
|
|
535
|
-
|
|
592
|
+
const { type: j } = C[A], V = C[A].importance ?? 0, K = (T.get(j) ?? 0) + 1;
|
|
593
|
+
T.set(j, K);
|
|
594
|
+
const J = `${j}@${K}`;
|
|
595
|
+
i.set(J, (i.get(J) ?? 0) + 1), r.set(
|
|
596
|
+
J,
|
|
536
597
|
Math.max(
|
|
537
|
-
r.get(
|
|
538
|
-
V - (C.length - A) *
|
|
598
|
+
r.get(J) ?? Number.NEGATIVE_INFINITY,
|
|
599
|
+
V - (C.length - A) * qe
|
|
539
600
|
)
|
|
540
|
-
), P.push({ ...C[A], fullType:
|
|
601
|
+
), P.push({ ...C[A], fullType: J, occurenceIndex: K });
|
|
541
602
|
}
|
|
542
603
|
return P.reverse(), {
|
|
543
604
|
value: f,
|
|
@@ -572,7 +633,7 @@ function de(t, e, n = {}) {
|
|
|
572
633
|
}
|
|
573
634
|
return l(/* @__PURE__ */ new Set([...o, ...a]));
|
|
574
635
|
}
|
|
575
|
-
const H = "PColumnData/", Q = H + "ResourceMap", Z = H + "Partitioned/ResourceMap",
|
|
636
|
+
const H = "PColumnData/", Q = H + "ResourceMap", Z = H + "Partitioned/ResourceMap", $ = H + "JsonPartitioned", E = H + "BinaryPartitioned", Ae = H + "Partitioned/", ee = Ae + "JsonPartitioned", B = Ae + "BinaryPartitioned";
|
|
576
637
|
function Se(t, e, n, r = [], i) {
|
|
577
638
|
if (t === void 0) return !1;
|
|
578
639
|
switch (t.resourceType.name) {
|
|
@@ -617,7 +678,7 @@ const ae = (t) => {
|
|
|
617
678
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
618
679
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
619
680
|
};
|
|
620
|
-
function
|
|
681
|
+
function Ye(t) {
|
|
621
682
|
if (!t) return;
|
|
622
683
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
623
684
|
let i = 0;
|
|
@@ -628,7 +689,7 @@ function ze(t) {
|
|
|
628
689
|
case Z:
|
|
629
690
|
i = n.partitionKeyLength + n.keyLength;
|
|
630
691
|
break;
|
|
631
|
-
case
|
|
692
|
+
case $:
|
|
632
693
|
case E:
|
|
633
694
|
i = n.partitionKeyLength;
|
|
634
695
|
break;
|
|
@@ -639,7 +700,7 @@ function ze(t) {
|
|
|
639
700
|
}
|
|
640
701
|
switch (e) {
|
|
641
702
|
case Q:
|
|
642
|
-
case
|
|
703
|
+
case $:
|
|
643
704
|
case E:
|
|
644
705
|
for (let s of t.listInputFields()) {
|
|
645
706
|
e === E && (s = ae(s).baseKey);
|
|
@@ -663,8 +724,8 @@ function ze(t) {
|
|
|
663
724
|
}
|
|
664
725
|
return { data: r, keyLength: i };
|
|
665
726
|
}
|
|
666
|
-
function
|
|
667
|
-
const e =
|
|
727
|
+
function Xe(t) {
|
|
728
|
+
const e = Ye(t);
|
|
668
729
|
if (!e) return;
|
|
669
730
|
const { data: n, keyLength: r } = e, i = [];
|
|
670
731
|
for (let s = 0; s < r; ++s)
|
|
@@ -686,7 +747,7 @@ function le(t, e = []) {
|
|
|
686
747
|
case Q:
|
|
687
748
|
case Z:
|
|
688
749
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
689
|
-
case
|
|
750
|
+
case $: {
|
|
690
751
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
691
752
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
692
753
|
const i = [];
|
|
@@ -736,8 +797,8 @@ function le(t, e = []) {
|
|
|
736
797
|
for (const o of t.listInputFields()) {
|
|
737
798
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
738
799
|
if (a === void 0) return;
|
|
739
|
-
if (a.resourceType.name !==
|
|
740
|
-
throw new Error(`Expected ${
|
|
800
|
+
if (a.resourceType.name !== $)
|
|
801
|
+
throw new Error(`Expected ${$} inside ${n}, but got ${a.resourceType.name}`);
|
|
741
802
|
const c = le(a, JSON.parse(o));
|
|
742
803
|
if (c === void 0) return;
|
|
743
804
|
if (c.type !== "JsonPartitioned")
|
|
@@ -775,66 +836,6 @@ function le(t, e = []) {
|
|
|
775
836
|
throw new Error(`Unknown resource type: ${n}`);
|
|
776
837
|
}
|
|
777
838
|
}
|
|
778
|
-
function Xe(t, e) {
|
|
779
|
-
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
780
|
-
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
781
|
-
const { partitionKeyLength: s } = t;
|
|
782
|
-
for (const [o] of e)
|
|
783
|
-
if (o >= s)
|
|
784
|
-
throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s}`);
|
|
785
|
-
} else if (t.type === "Json") {
|
|
786
|
-
const { keyLength: s } = t;
|
|
787
|
-
for (const [o] of e)
|
|
788
|
-
if (o >= s)
|
|
789
|
-
throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s}`);
|
|
790
|
-
}
|
|
791
|
-
const r = (s) => {
|
|
792
|
-
for (const [o, a] of n)
|
|
793
|
-
if (s[o] !== a)
|
|
794
|
-
return !1;
|
|
795
|
-
return !0;
|
|
796
|
-
}, i = (s) => {
|
|
797
|
-
const o = [...s];
|
|
798
|
-
for (const [a] of n)
|
|
799
|
-
o.splice(a, 1);
|
|
800
|
-
return o;
|
|
801
|
-
};
|
|
802
|
-
switch (t.type) {
|
|
803
|
-
case "Json": {
|
|
804
|
-
const s = t.data.filter((o) => r(o.key)).map((o) => ({
|
|
805
|
-
key: i(o.key),
|
|
806
|
-
value: o.value
|
|
807
|
-
}));
|
|
808
|
-
return {
|
|
809
|
-
type: "Json",
|
|
810
|
-
keyLength: t.keyLength - e.length,
|
|
811
|
-
data: s
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
case "JsonPartitioned": {
|
|
815
|
-
const s = t.parts.filter((o) => r(o.key)).map((o) => ({
|
|
816
|
-
key: i(o.key),
|
|
817
|
-
value: o.value
|
|
818
|
-
}));
|
|
819
|
-
return {
|
|
820
|
-
type: "JsonPartitioned",
|
|
821
|
-
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
822
|
-
parts: s
|
|
823
|
-
};
|
|
824
|
-
}
|
|
825
|
-
case "BinaryPartitioned": {
|
|
826
|
-
const s = t.parts.filter((o) => r(o.key)).map((o) => ({
|
|
827
|
-
key: i(o.key),
|
|
828
|
-
value: o.value
|
|
829
|
-
}));
|
|
830
|
-
return {
|
|
831
|
-
type: "BinaryPartitioned",
|
|
832
|
-
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
833
|
-
parts: s
|
|
834
|
-
};
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
839
|
function re(t, e) {
|
|
839
840
|
if (t === void 0) return e === void 0;
|
|
840
841
|
if (e === void 0) return !0;
|
|
@@ -860,7 +861,7 @@ function Ze(t) {
|
|
|
860
861
|
}
|
|
861
862
|
class et {
|
|
862
863
|
constructor() {
|
|
863
|
-
|
|
864
|
+
F(this, "ctx", h());
|
|
864
865
|
}
|
|
865
866
|
/**
|
|
866
867
|
* @deprecated use getOptions()
|
|
@@ -895,52 +896,52 @@ class et {
|
|
|
895
896
|
i[l] = m;
|
|
896
897
|
const s = typeof n == "function" ? [n] : Array.isArray(n) ? n : [n], o = e instanceof te ? e : new te(i), a = [];
|
|
897
898
|
for (const l of s) {
|
|
898
|
-
const m = typeof l == "function" ? l : ce(Le(i, l)), u = this.getSpecs().entries.filter(({ obj: p }) =>
|
|
899
|
+
const m = typeof l == "function" ? l : ce(Le(i, l)), u = this.getSpecs().entries.filter(({ obj: p }) => N(p) ? m(p) : !1);
|
|
899
900
|
if (u.length === 0)
|
|
900
901
|
continue;
|
|
901
902
|
const f = typeof l == "object" && "axes" in l && l.axes !== void 0 && l.partialAxesMatch === void 0 ? l.axes.map((p, d) => "split" in p && p.split === !0 ? d : -1).filter((p) => p !== -1) : [];
|
|
902
903
|
if (f.sort((p, d) => p - d), f.length > 0) {
|
|
903
904
|
const p = f[f.length - 1];
|
|
904
905
|
for (const { ref: d, obj: y } of u) {
|
|
905
|
-
if (!
|
|
906
|
+
if (!N(y)) throw new Error(`Assertion failed: expected PColumnSpec, got ${y.kind}`);
|
|
906
907
|
const g = this.getDataByRef(d);
|
|
907
908
|
if (!g) {
|
|
908
909
|
if (r != null && r.dontWaitAllData) continue;
|
|
909
910
|
return;
|
|
910
911
|
}
|
|
911
912
|
if (!M(g)) throw new Error(`Assertion failed: expected PColumn, got ${g.spec.kind}`);
|
|
912
|
-
const v =
|
|
913
|
+
const v = Xe(g.data);
|
|
913
914
|
if (!v) {
|
|
914
915
|
if (r != null && r.dontWaitAllData) continue;
|
|
915
916
|
return;
|
|
916
917
|
}
|
|
917
918
|
if (p >= v.length)
|
|
918
919
|
throw new Error(`Not enough partition keys for the requested split axes in column ${y.name}`);
|
|
919
|
-
const w = f.map((P) => this.findLabels(L(y.axesSpec[P]))), x = [], C = (P,
|
|
920
|
-
if (
|
|
920
|
+
const w = f.map((P) => this.findLabels(L(y.axesSpec[P]))), x = [], C = (P, T) => {
|
|
921
|
+
if (T >= f.length) {
|
|
921
922
|
x.push([...P]);
|
|
922
923
|
return;
|
|
923
924
|
}
|
|
924
|
-
const R = f[
|
|
925
|
+
const R = f[T], k = v[R];
|
|
925
926
|
for (const A of k)
|
|
926
|
-
P.push(A), C(P,
|
|
927
|
+
P.push(A), C(P, T + 1), P.pop();
|
|
927
928
|
};
|
|
928
929
|
C([], 0);
|
|
929
930
|
for (const P of x) {
|
|
930
|
-
const
|
|
931
|
+
const T = P.map((R, k) => {
|
|
931
932
|
const A = f[k], j = L(y.axesSpec[A]), V = w[k], K = (V == null ? void 0 : V[R]) ?? String(R);
|
|
932
933
|
return { axisIdx: A, axisId: j, value: R, label: K };
|
|
933
934
|
});
|
|
934
935
|
a.push({
|
|
935
936
|
obj: y,
|
|
936
937
|
ref: d,
|
|
937
|
-
axisFilters:
|
|
938
|
+
axisFilters: T
|
|
938
939
|
});
|
|
939
940
|
}
|
|
940
941
|
}
|
|
941
942
|
} else
|
|
942
943
|
for (const { ref: p, obj: d } of u)
|
|
943
|
-
|
|
944
|
+
N(d) && a.push({
|
|
944
945
|
obj: d,
|
|
945
946
|
ref: p
|
|
946
947
|
// No splitFilters needed here
|
|
@@ -999,13 +1000,13 @@ class et {
|
|
|
999
1000
|
g.axisIdx,
|
|
1000
1001
|
g.value
|
|
1001
1002
|
]);
|
|
1002
|
-
m =
|
|
1003
|
+
m = Ue(l, p);
|
|
1003
1004
|
const d = [...a.axisFilters].map((g) => g.axisIdx).sort((g, v) => v - g), y = [...u.axesSpec];
|
|
1004
1005
|
for (const g of d)
|
|
1005
1006
|
y.splice(g, 1);
|
|
1006
1007
|
u = { ...u, axesSpec: y };
|
|
1007
1008
|
}
|
|
1008
|
-
const f =
|
|
1009
|
+
const f = Fe(m);
|
|
1009
1010
|
u.annotations ? u = {
|
|
1010
1011
|
...u,
|
|
1011
1012
|
annotations: {
|
|
@@ -1095,7 +1096,7 @@ class et {
|
|
|
1095
1096
|
ref: n.ref,
|
|
1096
1097
|
obj: {
|
|
1097
1098
|
...n.obj,
|
|
1098
|
-
data:
|
|
1099
|
+
data: Te(
|
|
1099
1100
|
n.obj.data,
|
|
1100
1101
|
(r) => new I(r, [n.ref.blockId, n.ref.name])
|
|
1101
1102
|
)
|
|
@@ -1147,7 +1148,7 @@ class et {
|
|
|
1147
1148
|
getPColumnSpecByRef(e) {
|
|
1148
1149
|
const n = this.getSpecByRef(e);
|
|
1149
1150
|
if (n) {
|
|
1150
|
-
if (!
|
|
1151
|
+
if (!N(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
1151
1152
|
return n;
|
|
1152
1153
|
}
|
|
1153
1154
|
}
|
|
@@ -1166,7 +1167,7 @@ class et {
|
|
|
1166
1167
|
findDataWithCompatibleSpec(e) {
|
|
1167
1168
|
const n = [];
|
|
1168
1169
|
e: for (const r of this.getData().entries) {
|
|
1169
|
-
if (!
|
|
1170
|
+
if (!N(r.obj.spec))
|
|
1170
1171
|
continue;
|
|
1171
1172
|
const i = r.obj.spec;
|
|
1172
1173
|
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && re(e.domain, i.domain)) {
|
|
@@ -1200,15 +1201,27 @@ class et {
|
|
|
1200
1201
|
}
|
|
1201
1202
|
}
|
|
1202
1203
|
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Find labels data for a given axis id of a p-column.
|
|
1206
|
+
* @returns a map of axis value => label
|
|
1207
|
+
*/
|
|
1208
|
+
findLabelsForColumnAxis(e, n) {
|
|
1209
|
+
const r = this.findLabels(e.spec.axesSpec[n]);
|
|
1210
|
+
if (r)
|
|
1211
|
+
return Object.fromEntries(e.data.listInputFields().map((i) => {
|
|
1212
|
+
const s = JSON.parse(i);
|
|
1213
|
+
return [s[n], r[s[n]] ?? "Unlabelled"];
|
|
1214
|
+
}));
|
|
1215
|
+
}
|
|
1203
1216
|
}
|
|
1204
1217
|
class z {
|
|
1205
1218
|
constructor() {
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1219
|
+
F(this, "ctx");
|
|
1220
|
+
F(this, "args");
|
|
1221
|
+
F(this, "uiState");
|
|
1209
1222
|
// lazy rendering because this feature is rarely used
|
|
1210
|
-
|
|
1211
|
-
|
|
1223
|
+
F(this, "_activeArgsCache");
|
|
1224
|
+
F(this, "resultPool", new et());
|
|
1212
1225
|
this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1213
1226
|
}
|
|
1214
1227
|
/**
|
|
@@ -1276,7 +1289,7 @@ class z {
|
|
|
1276
1289
|
return this.ctx.getCurrentUnstableMarker();
|
|
1277
1290
|
}
|
|
1278
1291
|
}
|
|
1279
|
-
const U = "1.27.
|
|
1292
|
+
const U = "1.27.17";
|
|
1280
1293
|
function tt(t) {
|
|
1281
1294
|
return t.__renderLambda === !0;
|
|
1282
1295
|
}
|
|
@@ -1770,20 +1783,20 @@ export {
|
|
|
1770
1783
|
he as LABEL_ANNOTATION,
|
|
1771
1784
|
bt as MainOutputs,
|
|
1772
1785
|
je as OutputError,
|
|
1773
|
-
|
|
1774
|
-
|
|
1786
|
+
Me as PAnnotationLabel,
|
|
1787
|
+
Ge as PAnnotationTrace,
|
|
1775
1788
|
zt as PFrameImpl,
|
|
1776
1789
|
E as RT_BINARY_PARTITIONED,
|
|
1777
1790
|
B as RT_BINARY_SUPER_PARTITIONED,
|
|
1778
|
-
|
|
1791
|
+
$ as RT_JSON_PARTITIONED,
|
|
1779
1792
|
ee as RT_JSON_SUPER_PARTITIONED,
|
|
1780
1793
|
Q as RT_RESOURCE_MAP,
|
|
1781
1794
|
Z as RT_RESOURCE_MAP_PARTITIONED,
|
|
1782
1795
|
z as RenderCtx,
|
|
1783
1796
|
et as ResultPool,
|
|
1784
1797
|
vt as StagingOutputs,
|
|
1785
|
-
|
|
1786
|
-
|
|
1798
|
+
He as Trace,
|
|
1799
|
+
We as TraceEntry,
|
|
1787
1800
|
I as TreeNodeAccessor,
|
|
1788
1801
|
wt as UiState,
|
|
1789
1802
|
Ct as and,
|
|
@@ -1795,7 +1808,7 @@ export {
|
|
|
1795
1808
|
at as enrichColumnsWithCompatible,
|
|
1796
1809
|
Vt as extractArchiveAndGetURL,
|
|
1797
1810
|
Gt as extractConfig,
|
|
1798
|
-
|
|
1811
|
+
Ue as filterDataInfoEntries,
|
|
1799
1812
|
Pt as flatten,
|
|
1800
1813
|
Yt as fromPlOption,
|
|
1801
1814
|
ut as fromPlRef,
|
|
@@ -1809,17 +1822,17 @@ export {
|
|
|
1809
1822
|
Y as getImmediate,
|
|
1810
1823
|
Kt as getImportProgress,
|
|
1811
1824
|
X as getJsonField,
|
|
1812
|
-
|
|
1825
|
+
Jt as getLastLogs,
|
|
1813
1826
|
Bt as getLogHandle,
|
|
1814
1827
|
jt as getOnDemandBlobContent,
|
|
1815
|
-
|
|
1828
|
+
Ye as getPartitionKeysList,
|
|
1816
1829
|
Qt as getPlatformaOrDefault,
|
|
1817
|
-
|
|
1818
|
-
|
|
1830
|
+
Nt as getProgressLog,
|
|
1831
|
+
$t as getProgressLogWithInfo,
|
|
1819
1832
|
ct as getRawPlatformaInstance,
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1833
|
+
Ft as getResourceField,
|
|
1834
|
+
Tt as getResourceValueAsJson,
|
|
1835
|
+
Xe as getUniquePartitionKeys,
|
|
1823
1836
|
ie as ifDef,
|
|
1824
1837
|
tt as isConfigLambda,
|
|
1825
1838
|
_t as isEmpty,
|