@platforma-sdk/model 1.41.1 → 1.41.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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -43
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/PFrameForGraphs.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var it = Object.defineProperty;
|
|
2
2
|
var ot = (t, e, n) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var V = (t, e, n) => ot(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as
|
|
4
|
+
import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as Fe, deriveNativeId as at, isPColumnSpec as oe, isPartitionedDataInfoEntries as lt, getAxisId as k, entriesToDataInfo as ut, canonicalizeAxisId as ct, withEnrichments as xe, AnchoredIdDeriver as Ie, isPlRef as pt, mapValueInVOE as dt, ensurePColumn as ft, extractAllColumns as ht, mapPTableDef as mt, mapDataInfo as gt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as _e, canonicalizeJson as D, parseJson as Le, visitDataInfo as bt, isPTableAbsent as vt, uniquePlId as Ct, PTableNA as Tt } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import Be from "canonicalize";
|
|
7
7
|
import { z as B } from "zod";
|
|
@@ -89,13 +89,13 @@ function wn(t) {
|
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Fn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function xn(t, e) {
|
|
99
99
|
return {
|
|
100
100
|
type: "And",
|
|
101
101
|
operand1: t,
|
|
@@ -230,7 +230,7 @@ function G(t, e) {
|
|
|
230
230
|
return n.callbackRegistry[t] = e, !0;
|
|
231
231
|
}
|
|
232
232
|
const fe = /* @__PURE__ */ new Map();
|
|
233
|
-
function
|
|
233
|
+
function Ft(t, e) {
|
|
234
234
|
t in b().callbackRegistry || (b().callbackRegistry[t] = (n) => {
|
|
235
235
|
for (const r of fe.get(t))
|
|
236
236
|
r(n);
|
|
@@ -240,7 +240,7 @@ class L {
|
|
|
240
240
|
constructor(e, n = (r) => r) {
|
|
241
241
|
V(this, "isResolved", !1);
|
|
242
242
|
V(this, "resolvedValue");
|
|
243
|
-
this.handle = e, this.postProcess = n,
|
|
243
|
+
this.handle = e, this.postProcess = n, Ft(e, (r) => {
|
|
244
244
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
245
245
|
});
|
|
246
246
|
}
|
|
@@ -480,7 +480,7 @@ class O {
|
|
|
480
480
|
return o && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => s(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const We = "staging", Ge = "main",
|
|
483
|
+
const We = "staging", Ge = "main", xt = {
|
|
484
484
|
explicitColumnsSupport: !0,
|
|
485
485
|
inlineColumnsSupport: !0,
|
|
486
486
|
activeArgs: !0,
|
|
@@ -506,7 +506,7 @@ function It(t) {
|
|
|
506
506
|
}
|
|
507
507
|
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
508
508
|
__proto__: null,
|
|
509
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
509
|
+
GlobalCfgRenderCtxFeatureFlags: xt,
|
|
510
510
|
MainAccessorName: Ge,
|
|
511
511
|
StagingAccessorName: We,
|
|
512
512
|
getAllFutureAwaits: It,
|
|
@@ -523,7 +523,7 @@ function ze(t, e, n = {}) {
|
|
|
523
523
|
const y = e(d);
|
|
524
524
|
let p, g, C;
|
|
525
525
|
"spec" in y && typeof y.spec == "object" ? (p = y.spec, g = y.prefixTrace, C = y.suffixTrace) : p = y;
|
|
526
|
-
const E = (c = p.annotations) == null ? void 0 : c[_t],
|
|
526
|
+
const E = (c = p.annotations) == null ? void 0 : c[_t], F = (v = p.annotations) == null ? void 0 : v[Lt], S = (F ? Vt.safeParse(JSON.parse(F)).data : void 0) ?? [], P = [
|
|
527
527
|
...g ?? [],
|
|
528
528
|
...S,
|
|
529
529
|
...C ?? []
|
|
@@ -532,10 +532,10 @@ function ze(t, e, n = {}) {
|
|
|
532
532
|
const I = { label: E, type: Ot, importance: -2 };
|
|
533
533
|
n.addLabelAsSuffix ? P.push(I) : P.splice(0, 0, I);
|
|
534
534
|
}
|
|
535
|
-
const T = [],
|
|
535
|
+
const T = [], x = /* @__PURE__ */ new Map();
|
|
536
536
|
for (let I = P.length - 1; I >= 0; --I) {
|
|
537
|
-
const { type: $ } = P[I], K = P[I].importance ?? 0, j = (
|
|
538
|
-
|
|
537
|
+
const { type: $ } = P[I], K = P[I].importance ?? 0, j = (x.get($) ?? 0) + 1;
|
|
538
|
+
x.set($, j);
|
|
539
539
|
const N = `${$}@${j}`;
|
|
540
540
|
o.set(N, (o.get(N) ?? 0) + 1), r.set(
|
|
541
541
|
N,
|
|
@@ -566,9 +566,9 @@ function ze(t, e, n = {}) {
|
|
|
566
566
|
value: C.value
|
|
567
567
|
});
|
|
568
568
|
else return;
|
|
569
|
-
const
|
|
569
|
+
const F = E.map((P) => P.label), S = n.separator ?? " / ";
|
|
570
570
|
p.push({
|
|
571
|
-
label:
|
|
571
|
+
label: F.join(S),
|
|
572
572
|
value: C.value
|
|
573
573
|
});
|
|
574
574
|
}
|
|
@@ -965,7 +965,7 @@ class Q {
|
|
|
965
965
|
if (Ve(g)) {
|
|
966
966
|
if (!r)
|
|
967
967
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
968
|
-
return Y(
|
|
968
|
+
return Y(Fe(r.anchors, g, n));
|
|
969
969
|
} else
|
|
970
970
|
return Y(g);
|
|
971
971
|
});
|
|
@@ -978,25 +978,25 @@ class Q {
|
|
|
978
978
|
if (g) {
|
|
979
979
|
if (!r)
|
|
980
980
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
981
|
-
C =
|
|
981
|
+
C = Fe(r.anchors, p, n);
|
|
982
982
|
} else
|
|
983
983
|
C = p;
|
|
984
|
-
const E = /* @__PURE__ */ new Set(),
|
|
984
|
+
const E = /* @__PURE__ */ new Set(), F = [];
|
|
985
985
|
for (const T of this.providers) {
|
|
986
|
-
const
|
|
987
|
-
for (const c of
|
|
986
|
+
const x = T.selectColumns(C);
|
|
987
|
+
for (const c of x) {
|
|
988
988
|
if (u(c.spec)) continue;
|
|
989
989
|
if (E.has(c.id))
|
|
990
990
|
throw new Error(`Duplicate column id ${c.id} in provider ${T.constructor.name}`);
|
|
991
991
|
const v = at(c.spec);
|
|
992
|
-
m.has(v) || (E.add(c.id), m.add(v),
|
|
992
|
+
m.has(v) || (E.add(c.id), m.add(v), F.push(c));
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
if (
|
|
995
|
+
if (F.length === 0) continue;
|
|
996
996
|
const S = $t(p), P = S.length > 0;
|
|
997
|
-
for (const T of
|
|
997
|
+
for (const T of F) {
|
|
998
998
|
if (!oe(T.spec)) continue;
|
|
999
|
-
const
|
|
999
|
+
const x = T.spec;
|
|
1000
1000
|
if (P) {
|
|
1001
1001
|
if (Mt(T.data))
|
|
1002
1002
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T.id}`);
|
|
@@ -1009,8 +1009,8 @@ class Q {
|
|
|
1009
1009
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${T.id}`);
|
|
1010
1010
|
const v = Nt(c), I = S[S.length - 1];
|
|
1011
1011
|
if (I >= c.partitionKeyLength)
|
|
1012
|
-
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${I}) in column ${
|
|
1013
|
-
const $ = S.map((_) => this.findLabels(k(
|
|
1012
|
+
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${I}) in column ${x.name}`);
|
|
1013
|
+
const $ = S.map((_) => this.findLabels(k(x.axesSpec[_]))), K = [], j = (_, W) => {
|
|
1014
1014
|
if (W >= S.length) {
|
|
1015
1015
|
if (K.push([..._]), K.length > 1e4)
|
|
1016
1016
|
throw new Error("Too many key combinations, aborting.");
|
|
@@ -1029,19 +1029,19 @@ class Q {
|
|
|
1029
1029
|
};
|
|
1030
1030
|
if (j([], 0), K.length === 0)
|
|
1031
1031
|
continue;
|
|
1032
|
-
const N = [...
|
|
1032
|
+
const N = [...x.axesSpec], et = S.map((_) => _);
|
|
1033
1033
|
for (let _ = S.length - 1; _ >= 0; _--)
|
|
1034
1034
|
N.splice(S[_], 1);
|
|
1035
|
-
const tt = { ...
|
|
1035
|
+
const tt = { ...x, axesSpec: N };
|
|
1036
1036
|
for (const _ of K) {
|
|
1037
1037
|
const W = _.map((M, q) => {
|
|
1038
|
-
const te = et[q], nt = k(
|
|
1038
|
+
const te = et[q], nt = k(x.axesSpec[te]), de = $[q], rt = (de == null ? void 0 : de[M]) ?? String(M);
|
|
1039
1039
|
return { axisIdx: te, axisId: nt, value: M, label: rt };
|
|
1040
1040
|
});
|
|
1041
1041
|
f.push({
|
|
1042
1042
|
type: "split",
|
|
1043
1043
|
originalColumn: T,
|
|
1044
|
-
spec:
|
|
1044
|
+
spec: x,
|
|
1045
1045
|
adjustedSpec: tt,
|
|
1046
1046
|
dataEntries: c,
|
|
1047
1047
|
axisFilters: W
|
|
@@ -1051,8 +1051,8 @@ class Q {
|
|
|
1051
1051
|
f.push({
|
|
1052
1052
|
type: "direct",
|
|
1053
1053
|
originalColumn: T,
|
|
1054
|
-
spec:
|
|
1055
|
-
adjustedSpec:
|
|
1054
|
+
spec: x,
|
|
1055
|
+
adjustedSpec: x
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
@@ -1066,7 +1066,7 @@ class Q {
|
|
|
1066
1066
|
l
|
|
1067
1067
|
), y = [];
|
|
1068
1068
|
for (const { value: p, label: g } of d) {
|
|
1069
|
-
const { originalColumn: C, spec: E } = p,
|
|
1069
|
+
const { originalColumn: C, spec: E } = p, F = p.type === "split" ? p.axisFilters : void 0, S = Bt(F);
|
|
1070
1070
|
let P;
|
|
1071
1071
|
r ? P = r.deriveS(E, S) : P = Jt(C.id, S);
|
|
1072
1072
|
let T = { ...p.adjustedSpec };
|
|
@@ -1165,10 +1165,10 @@ class Wt {
|
|
|
1165
1165
|
const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1166
1166
|
let o = {}, s = !1;
|
|
1167
1167
|
return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? ze(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1168
|
-
ref:
|
|
1168
|
+
ref: xe(a, s),
|
|
1169
1169
|
label: l
|
|
1170
1170
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1171
|
-
ref:
|
|
1171
|
+
ref: xe(a, s),
|
|
1172
1172
|
label: o(l, a)
|
|
1173
1173
|
}));
|
|
1174
1174
|
}
|
|
@@ -1535,7 +1535,7 @@ class ne {
|
|
|
1535
1535
|
this.ctx.logError(e);
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
|
-
const X = "1.41.
|
|
1538
|
+
const X = "1.41.2";
|
|
1539
1539
|
function Gt(t) {
|
|
1540
1540
|
return t.__renderLambda === !0;
|
|
1541
1541
|
}
|
|
@@ -1946,16 +1946,16 @@ function Wn(t, e, n, r) {
|
|
|
1946
1946
|
filters: p,
|
|
1947
1947
|
sorting: g,
|
|
1948
1948
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1949
|
-
}), E = t.createPTable(C),
|
|
1949
|
+
}), E = t.createPTable(C), F = new Set((() => {
|
|
1950
1950
|
if (d === "inner") return [];
|
|
1951
1951
|
const c = o.pTableParams.hiddenColIds;
|
|
1952
1952
|
return c || i.filter((v) => Qt(v.spec)).map((v) => v.id);
|
|
1953
1953
|
})());
|
|
1954
|
-
i.filter((c) => Pe(c.spec)).forEach((c) =>
|
|
1954
|
+
i.filter((c) => Pe(c.spec)).forEach((c) => F.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((v) => {
|
|
1955
1955
|
var I;
|
|
1956
1956
|
return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, v.spec) ? [v.id] : [];
|
|
1957
|
-
}).forEach((v) =>
|
|
1958
|
-
const S = i.filter((c) => !
|
|
1957
|
+
}).forEach((v) => F.delete(v)), [...y.map((c) => c.column), ...p.map((c) => c.column), ...g.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => F.delete(c.id));
|
|
1958
|
+
const S = i.filter((c) => !F.has(c.id)), P = Re(S.map(_e), s);
|
|
1959
1959
|
if (!Xt([...S, ...P])) return;
|
|
1960
1960
|
const T = Ne({
|
|
1961
1961
|
columns: S,
|
|
@@ -1965,11 +1965,11 @@ function Wn(t, e, n, r) {
|
|
|
1965
1965
|
filters: p,
|
|
1966
1966
|
sorting: g,
|
|
1967
1967
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1968
|
-
}),
|
|
1968
|
+
}), x = t.createPTable(T);
|
|
1969
1969
|
return {
|
|
1970
1970
|
sourceId: o.pTableParams.sourceId,
|
|
1971
1971
|
fullTableHandle: E,
|
|
1972
|
-
visibleTableHandle:
|
|
1972
|
+
visibleTableHandle: x
|
|
1973
1973
|
};
|
|
1974
1974
|
}
|
|
1975
1975
|
function Gn(t, e, n) {
|
|
@@ -2004,7 +2004,7 @@ function en(t) {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
function Pe(t) {
|
|
2006
2006
|
var e;
|
|
2007
|
-
return
|
|
2007
|
+
return ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
|
|
2008
2008
|
}
|
|
2009
2009
|
const tn = "pl7.app/graph/isVirtual", Ue = "pl7.app/label", nn = "pl7.app/isLinkerColumn";
|
|
2010
2010
|
function rn(t) {
|
|
@@ -2783,7 +2783,7 @@ export {
|
|
|
2783
2783
|
Cn as UiState,
|
|
2784
2784
|
Xt as allColumnsComputed,
|
|
2785
2785
|
re as allColumnsReady,
|
|
2786
|
-
|
|
2786
|
+
xn as and,
|
|
2787
2787
|
Zn as compileAnnotationScript,
|
|
2788
2788
|
we as compileFilter,
|
|
2789
2789
|
Me as compileFilters,
|
|
@@ -2845,7 +2845,7 @@ export {
|
|
|
2845
2845
|
Xn as mapPTableValueToAxisKey,
|
|
2846
2846
|
Sn as mapRecordValues,
|
|
2847
2847
|
En as mapResourceFields,
|
|
2848
|
-
|
|
2848
|
+
Fn as not,
|
|
2849
2849
|
In as or,
|
|
2850
2850
|
Ce as parsePColumnData,
|
|
2851
2851
|
Jn as parseResourceMap,
|