@milaboratories/pl-model-common 1.15.8 → 1.15.9
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/drivers/pframe/table_calculate.d.ts +10 -1
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +1 -0
- package/dist/drivers/pframe/table_common.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +76 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/drivers/pframe/table_calculate.ts +13 -1
- package/src/drivers/pframe/table_common.ts +15 -0
package/dist/index.mjs
CHANGED
|
@@ -402,10 +402,24 @@ function h(n, e) {
|
|
|
402
402
|
w(n);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
+
function Kn(n) {
|
|
406
|
+
switch (n.type) {
|
|
407
|
+
case "axis":
|
|
408
|
+
return {
|
|
409
|
+
type: "axis",
|
|
410
|
+
id: n.id
|
|
411
|
+
};
|
|
412
|
+
case "column":
|
|
413
|
+
return {
|
|
414
|
+
type: "column",
|
|
415
|
+
id: n.id
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
}
|
|
405
419
|
function nn(n) {
|
|
406
420
|
return y(n);
|
|
407
421
|
}
|
|
408
|
-
function
|
|
422
|
+
function _n(n) {
|
|
409
423
|
return JSON.parse(n);
|
|
410
424
|
}
|
|
411
425
|
function P(n) {
|
|
@@ -414,7 +428,7 @@ function P(n) {
|
|
|
414
428
|
function k(n, e) {
|
|
415
429
|
return JSON.stringify([n, e]);
|
|
416
430
|
}
|
|
417
|
-
class
|
|
431
|
+
class Mn {
|
|
418
432
|
/**
|
|
419
433
|
* Creates a new anchor context from a set of anchor column specifications
|
|
420
434
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -515,7 +529,7 @@ class _n {
|
|
|
515
529
|
return nn(this.derive(e, t));
|
|
516
530
|
}
|
|
517
531
|
}
|
|
518
|
-
function
|
|
532
|
+
function Tn(n, e, t) {
|
|
519
533
|
const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? !1;
|
|
520
534
|
if (r.domainAnchor !== void 0) {
|
|
521
535
|
const s = n[r.domainAnchor];
|
|
@@ -574,7 +588,7 @@ function en(n, e) {
|
|
|
574
588
|
function tn(n) {
|
|
575
589
|
return typeof n == "object" && "anchor" in n;
|
|
576
590
|
}
|
|
577
|
-
function
|
|
591
|
+
function zn(n) {
|
|
578
592
|
return typeof n == "object" && n !== null && "source" in n && "axisFilters" in n;
|
|
579
593
|
}
|
|
580
594
|
function f(n) {
|
|
@@ -583,23 +597,23 @@ function f(n) {
|
|
|
583
597
|
function rn(n) {
|
|
584
598
|
return f(n.spec);
|
|
585
599
|
}
|
|
586
|
-
function
|
|
600
|
+
function Hn(n) {
|
|
587
601
|
return f(n.obj);
|
|
588
602
|
}
|
|
589
|
-
function
|
|
603
|
+
function qn(n) {
|
|
590
604
|
return f(n.obj.spec);
|
|
591
605
|
}
|
|
592
|
-
function
|
|
606
|
+
function Wn(n) {
|
|
593
607
|
if (!rn(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
|
|
594
608
|
return n;
|
|
595
609
|
}
|
|
596
|
-
function
|
|
610
|
+
function Xn(n, e) {
|
|
597
611
|
return n === void 0 ? void 0 : {
|
|
598
612
|
...n,
|
|
599
613
|
data: e(n.data)
|
|
600
614
|
};
|
|
601
615
|
}
|
|
602
|
-
function
|
|
616
|
+
function Gn(n) {
|
|
603
617
|
const e = /* @__PURE__ */ new Map(), t = (r) => {
|
|
604
618
|
switch (r.type) {
|
|
605
619
|
case "column":
|
|
@@ -723,17 +737,17 @@ function N(n, e) {
|
|
|
723
737
|
}
|
|
724
738
|
return !0;
|
|
725
739
|
}
|
|
726
|
-
function
|
|
740
|
+
function Qn(n) {
|
|
727
741
|
return Array.isArray(n) ? (e) => n.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n);
|
|
728
742
|
}
|
|
729
|
-
function
|
|
743
|
+
function Yn(n) {
|
|
730
744
|
const e = {
|
|
731
745
|
kind: n.kind,
|
|
732
746
|
name: n.name
|
|
733
747
|
};
|
|
734
748
|
return n.domain !== void 0 && (e.domain = n.domain), f(n) && (e.axesSpec = J(n.axesSpec)), y(e);
|
|
735
749
|
}
|
|
736
|
-
const
|
|
750
|
+
const Zn = { href: "/" }, ne = d.object({
|
|
737
751
|
__isRef: d.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
738
752
|
blockId: d.string().describe("Upstream block id"),
|
|
739
753
|
name: d.string().describe("Name of the output provided to the upstream block's output context"),
|
|
@@ -741,10 +755,10 @@ const Yn = { href: "/" }, Zn = d.object({
|
|
|
741
755
|
}).describe(
|
|
742
756
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
743
757
|
).readonly();
|
|
744
|
-
function
|
|
758
|
+
function ee(n) {
|
|
745
759
|
return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === !0 && "blockId" in n && "name" in n;
|
|
746
760
|
}
|
|
747
|
-
function
|
|
761
|
+
function te(n, e, t = !1) {
|
|
748
762
|
return t ? {
|
|
749
763
|
__isRef: !0,
|
|
750
764
|
blockId: n,
|
|
@@ -756,7 +770,7 @@ function ee(n, e, t = !1) {
|
|
|
756
770
|
name: e
|
|
757
771
|
};
|
|
758
772
|
}
|
|
759
|
-
function
|
|
773
|
+
function re(n, e = !0) {
|
|
760
774
|
if (e)
|
|
761
775
|
return {
|
|
762
776
|
...n,
|
|
@@ -767,10 +781,10 @@ function te(n, e = !0) {
|
|
|
767
781
|
return r;
|
|
768
782
|
}
|
|
769
783
|
}
|
|
770
|
-
function
|
|
784
|
+
function oe(n, e, t = !1) {
|
|
771
785
|
return n.blockId === e.blockId && n.name === e.name && (t || n.requireEnrichments === e.requireEnrichments);
|
|
772
786
|
}
|
|
773
|
-
function
|
|
787
|
+
function ie(n, e) {
|
|
774
788
|
return n.ok ? { ok: !0, value: e(n.value) } : n;
|
|
775
789
|
}
|
|
776
790
|
function sn(n) {
|
|
@@ -810,7 +824,7 @@ function O(n, e, t) {
|
|
|
810
824
|
return c;
|
|
811
825
|
}
|
|
812
826
|
const $ = 15, fn = 24, I = d.string().length(fn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
813
|
-
function
|
|
827
|
+
function se() {
|
|
814
828
|
const n = new Uint8Array($);
|
|
815
829
|
return crypto.getRandomValues(n), I.parse(O(n, "RFC4648"));
|
|
816
830
|
}
|
|
@@ -818,38 +832,38 @@ function dn(n) {
|
|
|
818
832
|
if (n.length !== $) throw new Error(`Wrong number of bytes: ${n.length}`);
|
|
819
833
|
return I.parse(O(n, "RFC4648"));
|
|
820
834
|
}
|
|
821
|
-
async function
|
|
835
|
+
async function ae(n) {
|
|
822
836
|
const e = new TextEncoder(), t = await crypto.subtle.digest("SHA-256", e.encode(n));
|
|
823
837
|
return dn(new Uint8Array(t.slice(0, 15)));
|
|
824
838
|
}
|
|
825
|
-
function
|
|
839
|
+
function ue(n) {
|
|
826
840
|
return JSON.stringify(n);
|
|
827
841
|
}
|
|
828
|
-
function
|
|
842
|
+
function ce(n) {
|
|
829
843
|
return y(n);
|
|
830
844
|
}
|
|
831
|
-
function
|
|
845
|
+
function fe(n) {
|
|
832
846
|
return JSON.parse(n);
|
|
833
847
|
}
|
|
834
|
-
class
|
|
848
|
+
class de extends Error {
|
|
835
849
|
constructor() {
|
|
836
850
|
super(...arguments);
|
|
837
851
|
l(this, "name", "AbortError");
|
|
838
852
|
}
|
|
839
853
|
}
|
|
840
|
-
class
|
|
854
|
+
class me extends Error {
|
|
841
855
|
constructor() {
|
|
842
856
|
super(...arguments);
|
|
843
857
|
l(this, "name", "UiError");
|
|
844
858
|
}
|
|
845
859
|
}
|
|
846
|
-
function
|
|
860
|
+
function le(n) {
|
|
847
861
|
return n instanceof Error && n.name === "AbortError";
|
|
848
862
|
}
|
|
849
863
|
function mn(n) {
|
|
850
864
|
return n instanceof Error ? n.name === "AbortError" || mn(n.cause) : !1;
|
|
851
865
|
}
|
|
852
|
-
function
|
|
866
|
+
function pe(n) {
|
|
853
867
|
return n instanceof Error && n.name === "AggregateError";
|
|
854
868
|
}
|
|
855
869
|
function ln(n) {
|
|
@@ -879,7 +893,7 @@ function D(n) {
|
|
|
879
893
|
...e.cause !== void 0 && { cause: t }
|
|
880
894
|
};
|
|
881
895
|
}
|
|
882
|
-
function
|
|
896
|
+
function ye(n) {
|
|
883
897
|
if (n.error)
|
|
884
898
|
throw n.error;
|
|
885
899
|
return n.value;
|
|
@@ -887,7 +901,7 @@ function pe(n) {
|
|
|
887
901
|
function L(n) {
|
|
888
902
|
return n.error ? { error: D(n.error) } : { value: n.value };
|
|
889
903
|
}
|
|
890
|
-
function
|
|
904
|
+
function he(n) {
|
|
891
905
|
return n.error ? { error: V(n.error) } : { value: n.value };
|
|
892
906
|
}
|
|
893
907
|
function pn(n) {
|
|
@@ -904,18 +918,18 @@ async function yn(n) {
|
|
|
904
918
|
return { error: A(e) };
|
|
905
919
|
}
|
|
906
920
|
}
|
|
907
|
-
function
|
|
921
|
+
function ge(n) {
|
|
908
922
|
const e = pn(n);
|
|
909
923
|
return L(e);
|
|
910
924
|
}
|
|
911
|
-
async function
|
|
925
|
+
async function be(n) {
|
|
912
926
|
const e = await yn(n);
|
|
913
927
|
return L(e);
|
|
914
928
|
}
|
|
915
929
|
export {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
930
|
+
de as AbortError,
|
|
931
|
+
Mn as AnchoredIdDeriver,
|
|
932
|
+
Zn as DefaultNavigationState,
|
|
919
933
|
G as PTableAbsent,
|
|
920
934
|
Q as PTableNA,
|
|
921
935
|
T as PValueBytesNA,
|
|
@@ -927,55 +941,56 @@ export {
|
|
|
927
941
|
I as PlId,
|
|
928
942
|
$ as PlIdBytes,
|
|
929
943
|
fn as PlIdLength,
|
|
930
|
-
|
|
944
|
+
ne as PlRef,
|
|
931
945
|
wn as RangeBytes,
|
|
932
|
-
|
|
946
|
+
me as UiError,
|
|
933
947
|
Rn as canonicalizeAxisId,
|
|
934
|
-
|
|
935
|
-
|
|
948
|
+
ce as canonicalizeJson,
|
|
949
|
+
te as createPlRef,
|
|
936
950
|
Cn as dataInfoToEntries,
|
|
937
|
-
|
|
951
|
+
Yn as deriveNativeId,
|
|
938
952
|
V as deserializeError,
|
|
939
|
-
|
|
940
|
-
|
|
953
|
+
he as deserializeResult,
|
|
954
|
+
ae as digestPlId,
|
|
941
955
|
A as ensureError,
|
|
942
956
|
Vn as ensureNotNAPValue,
|
|
943
|
-
|
|
957
|
+
Wn as ensurePColumn,
|
|
944
958
|
Jn as entriesToDataInfo,
|
|
945
959
|
b as executePSpecPredicate,
|
|
946
|
-
|
|
960
|
+
Gn as extractAllColumns,
|
|
947
961
|
J as getAxesId,
|
|
948
962
|
p as getAxisId,
|
|
949
963
|
Fn as getColumnIdAndSpec,
|
|
950
964
|
kn as getFileNameFromHandle,
|
|
951
965
|
R as getFilePathFromHandle,
|
|
952
966
|
vn as getPColumnSpecId,
|
|
967
|
+
Kn as getPTableColumnId,
|
|
953
968
|
mn as hasAbortError,
|
|
954
|
-
|
|
955
|
-
|
|
969
|
+
le as isAbortError,
|
|
970
|
+
pe as isAggregateError,
|
|
956
971
|
En as isDataInfo,
|
|
957
972
|
K as isDataInfoEntries,
|
|
958
|
-
|
|
973
|
+
zn as isFilteredPColumn,
|
|
959
974
|
F as isImportFileHandleIndex,
|
|
960
975
|
v as isImportFileHandleUpload,
|
|
961
976
|
Pn as isLiveLog,
|
|
962
977
|
z as isNotNAPValue,
|
|
963
978
|
rn as isPColumn,
|
|
964
|
-
|
|
979
|
+
qn as isPColumnResult,
|
|
965
980
|
f as isPColumnSpec,
|
|
966
|
-
|
|
981
|
+
Hn as isPColumnSpecResult,
|
|
967
982
|
Bn as isPTableAbsent,
|
|
968
983
|
H as isPValue,
|
|
969
984
|
Sn as isPartitionedDataInfoEntries,
|
|
970
|
-
|
|
985
|
+
ee as isPlRef,
|
|
971
986
|
X as isValueAbsent,
|
|
972
987
|
g as isValueNA,
|
|
973
988
|
Nn as mapDataInfo,
|
|
974
989
|
On as mapDataInfoEntries,
|
|
975
990
|
h as mapJoinEntry,
|
|
976
|
-
|
|
991
|
+
Xn as mapPObjectData,
|
|
977
992
|
Un as mapPTableDef,
|
|
978
|
-
|
|
993
|
+
ie as mapValueInVOE,
|
|
979
994
|
E as matchAxis,
|
|
980
995
|
Z as matchAxisId,
|
|
981
996
|
N as matchPColumn,
|
|
@@ -983,24 +998,24 @@ export {
|
|
|
983
998
|
jn as pTableValue,
|
|
984
999
|
Ln as pValueToStringOrNumber,
|
|
985
1000
|
W as pValueToStringOrNumberOrNull,
|
|
986
|
-
|
|
987
|
-
|
|
1001
|
+
_n as parseColumnId,
|
|
1002
|
+
fe as parseJson,
|
|
988
1003
|
dn as plId,
|
|
989
|
-
|
|
990
|
-
|
|
1004
|
+
oe as plRefsEqual,
|
|
1005
|
+
Tn as resolveAnchors,
|
|
991
1006
|
q as safeConvertToPValue,
|
|
992
|
-
|
|
1007
|
+
Qn as selectorsToPredicate,
|
|
993
1008
|
D as serializeError,
|
|
994
1009
|
L as serializeResult,
|
|
995
1010
|
nn as stringifyColumnId,
|
|
996
|
-
|
|
1011
|
+
ue as stringifyJson,
|
|
997
1012
|
Dn as toJsonSafePValue,
|
|
998
|
-
|
|
999
|
-
|
|
1013
|
+
se as uniquePlId,
|
|
1014
|
+
ye as unwrapResult,
|
|
1000
1015
|
xn as validateRangeBytes,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1016
|
+
re as withEnrichments,
|
|
1017
|
+
ge as wrapAndSerialize,
|
|
1018
|
+
be as wrapAndSerializeAsync,
|
|
1004
1019
|
yn as wrapAsyncCallback,
|
|
1005
1020
|
pn as wrapCallback
|
|
1006
1021
|
};
|