@platforma-sdk/model 1.39.0 → 1.39.6
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 +404 -362
- package/dist/index.mjs.map +1 -1
- package/dist/pframe.d.ts.map +1 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/internal.d.ts +1 -0
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/render/util/pframe_upgraders.d.ts +3 -0
- package/dist/render/util/pframe_upgraders.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +5 -5
- package/src/pframe.ts +7 -0
- package/src/render/api.ts +9 -1
- package/src/render/internal.ts +1 -0
- package/src/render/util/pframe_upgraders.ts +54 -0
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (t, e, n) =>
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var Ye = (t, e, n) => e in t ? ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var k = (t, e, n) => Ye(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as De, mapPObjectData as ve, isDataInfoEntries as Oe, isDataInfo as Se, dataInfoToEntries as Xe, selectorsToPredicate as Y, resolveAnchors as Ce, deriveNativeId as Qe, isPColumnSpec as te, isPartitionedDataInfoEntries as Ze, getAxisId as O, entriesToDataInfo as et, canonicalizeAxisId as tt, withEnrichments as we, AnchoredIdDeriver as Ae, isPlRef as nt, mapValueInVOE as rt, ensurePColumn as it, extractAllColumns as st, mapPTableDef as ot, mapDataInfo as at, extractConfigGeneric as lt, matchAxisId as N, getColumnIdAndSpec as Pe, canonicalizeJson as R, parseJson as xe, isPTableAbsent as ut, uniquePlId as ct, PTableNA as pt } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import Re from "canonicalize";
|
|
7
7
|
import { z as $ } from "zod";
|
|
@@ -11,14 +11,14 @@ class dt extends Error {
|
|
|
11
11
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ft(t) {
|
|
15
15
|
if (!t.ok) throw new dt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function on(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return ft(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -28,17 +28,17 @@ function P(t) {
|
|
|
28
28
|
function X(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function an(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const ln = X("$args"), un = X("$it"), cn = X("$prod"), pn = X("$staging"), dn = X("$ui");
|
|
38
38
|
function ne(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Ke(t) {
|
|
42
42
|
const e = {};
|
|
43
43
|
for (const [n, r] of Object.entries(t)) e[n] = P(r);
|
|
44
44
|
return {
|
|
@@ -46,7 +46,7 @@ function Oe(t) {
|
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function fn(...t) {
|
|
50
50
|
const e = [];
|
|
51
51
|
for (const n of t) e.push(P(n));
|
|
52
52
|
return {
|
|
@@ -61,7 +61,7 @@ function re(t, e) {
|
|
|
61
61
|
field: P(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function hn(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function fn(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function gn(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,32 +77,32 @@ function hn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function mn(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function yn(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function bn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function vn(t, e) {
|
|
99
99
|
return {
|
|
100
100
|
type: "And",
|
|
101
101
|
operand1: t,
|
|
102
102
|
operand2: e
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Sn(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
@@ -116,7 +116,7 @@ function Cn(t, e) {
|
|
|
116
116
|
field: P(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function wn() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
@@ -124,7 +124,7 @@ function Sn() {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function An(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,21 +132,21 @@ function wn(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Pn(t, e) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
138
|
range: e,
|
|
139
139
|
source: P(t)
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function xn(t, e) {
|
|
143
143
|
return {
|
|
144
144
|
type: "GetBlobContentAsString",
|
|
145
145
|
range: e,
|
|
146
146
|
source: P(t)
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function _n() {
|
|
150
150
|
return function(t, e) {
|
|
151
151
|
return {
|
|
152
152
|
type: "GetBlobContentAsJson",
|
|
@@ -155,68 +155,68 @@ function xn() {
|
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function In(t) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetDownloadedBlobContent",
|
|
161
161
|
source: P(t)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Tn(t) {
|
|
165
165
|
return {
|
|
166
166
|
type: "GetOnDemandBlobContent",
|
|
167
167
|
source: P(t)
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ln(t, e) {
|
|
171
171
|
return {
|
|
172
172
|
type: "ExtractArchiveAndGetURL",
|
|
173
173
|
format: e,
|
|
174
174
|
source: P(t)
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Fn(t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetImportProgress",
|
|
180
180
|
source: P(t)
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function En(t, e) {
|
|
184
184
|
return {
|
|
185
185
|
type: "GetLastLogs",
|
|
186
186
|
source: P(t),
|
|
187
187
|
lines: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function kn(t, e) {
|
|
191
191
|
return {
|
|
192
192
|
type: "GetProgressLog",
|
|
193
193
|
source: P(t),
|
|
194
194
|
patternToSearch: e
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Dn(t, e) {
|
|
198
198
|
return {
|
|
199
199
|
type: "GetProgressLogWithInfo",
|
|
200
200
|
source: P(t),
|
|
201
201
|
patternToSearch: e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function On(t) {
|
|
205
205
|
return {
|
|
206
206
|
type: "GetLogHandle",
|
|
207
207
|
source: P(t)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function ht() {
|
|
211
211
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Ne(t) {
|
|
214
214
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
215
215
|
return globalThis.getPlatforma(t);
|
|
216
216
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
217
217
|
throw new Error("Can't get platforma instance.");
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function gt() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
}
|
|
222
222
|
function v() {
|
|
@@ -224,13 +224,13 @@ function v() {
|
|
|
224
224
|
throw new Error("Not in config rendering context");
|
|
225
225
|
}
|
|
226
226
|
function G(t, e) {
|
|
227
|
-
const n =
|
|
227
|
+
const n = gt();
|
|
228
228
|
if (n === void 0) return !1;
|
|
229
229
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
230
230
|
return n.callbackRegistry[t] = e, !0;
|
|
231
231
|
}
|
|
232
232
|
const ue = /* @__PURE__ */ new Map();
|
|
233
|
-
function
|
|
233
|
+
function mt(t, e) {
|
|
234
234
|
t in v().callbackRegistry || (v().callbackRegistry[t] = (n) => {
|
|
235
235
|
for (const r of ue.get(t))
|
|
236
236
|
r(n);
|
|
@@ -240,7 +240,7 @@ class F {
|
|
|
240
240
|
constructor(e, n = (r) => r) {
|
|
241
241
|
k(this, "isResolved", !1);
|
|
242
242
|
k(this, "resolvedValue");
|
|
243
|
-
this.handle = e, this.postProcess = n,
|
|
243
|
+
this.handle = e, this.postProcess = n, mt(e, (r) => {
|
|
244
244
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
245
245
|
});
|
|
246
246
|
}
|
|
@@ -363,7 +363,7 @@ class D {
|
|
|
363
363
|
getPColumns(e = !1, n = "") {
|
|
364
364
|
const r = this.parsePObjectCollection(e, n);
|
|
365
365
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
366
|
-
if (!
|
|
366
|
+
if (!De(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
367
367
|
return s;
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -381,7 +381,7 @@ class D {
|
|
|
381
381
|
const i = {};
|
|
382
382
|
for (const [s, o] of Object.entries(r)) {
|
|
383
383
|
const a = [...this.resolvePath, s];
|
|
384
|
-
i[s] =
|
|
384
|
+
i[s] = ve(o, (l) => new D(l, a));
|
|
385
385
|
}
|
|
386
386
|
return i;
|
|
387
387
|
}
|
|
@@ -480,58 +480,59 @@ class D {
|
|
|
480
480
|
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => o(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const Ve = "staging", je = "main", yt = {
|
|
484
484
|
explicitColumnsSupport: !0,
|
|
485
485
|
inlineColumnsSupport: !0,
|
|
486
486
|
activeArgs: !0,
|
|
487
|
-
pTablePartitionFiltersSupport: !0
|
|
487
|
+
pTablePartitionFiltersSupport: !0,
|
|
488
|
+
pFrameInSetFilterSupport: !0
|
|
488
489
|
};
|
|
489
|
-
function
|
|
490
|
+
function Je(t) {
|
|
490
491
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
491
492
|
}
|
|
492
493
|
function he(t, e, n) {
|
|
493
494
|
if (e.has(n)) return;
|
|
494
495
|
if (e.add(n), typeof n === "object")
|
|
495
|
-
if (
|
|
496
|
+
if (Je(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
496
497
|
else if (Array.isArray(n))
|
|
497
498
|
for (const i of n) he(t, e, i);
|
|
498
499
|
else
|
|
499
500
|
for (const [, i] of Object.entries(n))
|
|
500
501
|
i !== n && he(t, e, i);
|
|
501
502
|
}
|
|
502
|
-
function
|
|
503
|
+
function bt(t) {
|
|
503
504
|
const e = /* @__PURE__ */ new Set();
|
|
504
505
|
return he(e, /* @__PURE__ */ new Set(), t), e;
|
|
505
506
|
}
|
|
506
507
|
const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
507
508
|
__proto__: null,
|
|
508
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
509
|
-
MainAccessorName:
|
|
510
|
-
StagingAccessorName:
|
|
511
|
-
getAllFutureAwaits:
|
|
512
|
-
isFutureAwait:
|
|
513
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
509
|
+
GlobalCfgRenderCtxFeatureFlags: yt,
|
|
510
|
+
MainAccessorName: je,
|
|
511
|
+
StagingAccessorName: Ve,
|
|
512
|
+
getAllFutureAwaits: bt,
|
|
513
|
+
isFutureAwait: Je
|
|
514
|
+
}, Symbol.toStringTag, { value: "Module" })), vt = "pl7.app/label", St = "pl7.app/trace", Ct = $.object({
|
|
514
515
|
type: $.string(),
|
|
515
516
|
importance: $.number().optional(),
|
|
516
517
|
id: $.string().optional(),
|
|
517
518
|
label: $.string()
|
|
518
|
-
}),
|
|
519
|
-
function
|
|
520
|
-
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
|
+
}), wt = $.array(Ct), At = 1e-3, Pt = "__LABEL__", _e = "__LABEL__@1";
|
|
520
|
+
function Me(t, e, n = {}) {
|
|
521
|
+
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) => {
|
|
521
522
|
var c, m;
|
|
522
|
-
const b = e(
|
|
523
|
-
let
|
|
524
|
-
"spec" in b && typeof b.spec == "object" ? (
|
|
525
|
-
const E = (c =
|
|
523
|
+
const b = e(p);
|
|
524
|
+
let d, y, S;
|
|
525
|
+
"spec" in b && typeof b.spec == "object" ? (d = b.spec, y = b.prefixTrace, S = b.suffixTrace) : d = b;
|
|
526
|
+
const E = (c = d.annotations) == null ? void 0 : c[vt], _ = (m = d.annotations) == null ? void 0 : m[St], w = (_ ? wt.safeParse(JSON.parse(_)).data : void 0) ?? [], A = [
|
|
526
527
|
...y ?? [],
|
|
527
528
|
...w,
|
|
528
|
-
...
|
|
529
|
+
...S ?? []
|
|
529
530
|
];
|
|
530
531
|
if (E !== void 0) {
|
|
531
|
-
const T = { label: E, type:
|
|
532
|
+
const T = { label: E, type: Pt, importance: -2 };
|
|
532
533
|
n.addLabelAsSuffix ? A.push(T) : A.splice(0, 0, T);
|
|
533
534
|
}
|
|
534
|
-
const
|
|
535
|
+
const C = [], I = /* @__PURE__ */ new Map();
|
|
535
536
|
for (let T = A.length - 1; T >= 0; --T) {
|
|
536
537
|
const { type: U } = A[T], V = A[T].importance ?? 0, J = (I.get(U) ?? 0) + 1;
|
|
537
538
|
I.set(U, J);
|
|
@@ -540,57 +541,57 @@ function Je(t, e, n = {}) {
|
|
|
540
541
|
K,
|
|
541
542
|
Math.max(
|
|
542
543
|
r.get(K) ?? Number.NEGATIVE_INFINITY,
|
|
543
|
-
V - (A.length - T) *
|
|
544
|
+
V - (A.length - T) * At
|
|
544
545
|
)
|
|
545
|
-
),
|
|
546
|
+
), C.push({ ...A[T], fullType: K, occurrenceIndex: J });
|
|
546
547
|
}
|
|
547
|
-
return
|
|
548
|
-
value:
|
|
549
|
-
spec:
|
|
548
|
+
return C.reverse(), {
|
|
549
|
+
value: p,
|
|
550
|
+
spec: d,
|
|
550
551
|
label: E,
|
|
551
|
-
fullTrace:
|
|
552
|
+
fullTrace: C
|
|
552
553
|
};
|
|
553
554
|
}), a = [], l = [], u = [...r];
|
|
554
|
-
u.sort(([,
|
|
555
|
-
for (const [
|
|
556
|
-
|
|
557
|
-
const h = (
|
|
558
|
-
const
|
|
555
|
+
u.sort(([, p], [, b]) => b - p);
|
|
556
|
+
for (const [p] of u)
|
|
557
|
+
p.endsWith("@1") || s.get(p) === t.length ? a.push(p) : l.push(p);
|
|
558
|
+
const h = (p, b = !1) => {
|
|
559
|
+
const d = [];
|
|
559
560
|
for (let y = 0; y < o.length; y++) {
|
|
560
|
-
const
|
|
561
|
+
const S = o[y], E = S.fullTrace.filter((A) => p.has(A.fullType) || i && i.has(A.type));
|
|
561
562
|
if (E.length === 0)
|
|
562
563
|
if (b)
|
|
563
|
-
|
|
564
|
+
d.push({
|
|
564
565
|
label: "Unlabeled",
|
|
565
|
-
value:
|
|
566
|
+
value: S.value
|
|
566
567
|
});
|
|
567
568
|
else return;
|
|
568
569
|
const _ = E.map((A) => A.label), w = n.separator ?? " / ";
|
|
569
|
-
|
|
570
|
+
d.push({
|
|
570
571
|
label: _.join(w),
|
|
571
|
-
value:
|
|
572
|
+
value: S.value
|
|
572
573
|
});
|
|
573
574
|
}
|
|
574
|
-
return
|
|
575
|
+
return d;
|
|
575
576
|
};
|
|
576
577
|
if (a.length === 0) {
|
|
577
578
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
578
|
-
return h(new Set(
|
|
579
|
+
return h(new Set(_e), !0);
|
|
579
580
|
}
|
|
580
581
|
let f = 0, g = -1;
|
|
581
582
|
for (; f < a.length; ) {
|
|
582
|
-
const
|
|
583
|
-
n.includeNativeLabel &&
|
|
584
|
-
for (let
|
|
585
|
-
g >= 0 &&
|
|
586
|
-
const b = h(
|
|
587
|
-
if (b !== void 0 && new Set(b.map((
|
|
583
|
+
const p = /* @__PURE__ */ new Set();
|
|
584
|
+
n.includeNativeLabel && p.add(_e);
|
|
585
|
+
for (let d = 0; d < f; ++d) p.add(a[d]);
|
|
586
|
+
g >= 0 && p.add(a[g]);
|
|
587
|
+
const b = h(p);
|
|
588
|
+
if (b !== void 0 && new Set(b.map((d) => d.label)).size === t.length) return b;
|
|
588
589
|
g++, g >= a.length && (f++, g = f);
|
|
589
590
|
}
|
|
590
591
|
return h(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
591
592
|
}
|
|
592
|
-
const Q = "PColumnData/", ie = Q + "ResourceMap", se = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned",
|
|
593
|
-
function
|
|
593
|
+
const Q = "PColumnData/", ie = Q + "ResourceMap", se = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned", $e = Q + "Partitioned/", oe = $e + "JsonPartitioned", q = $e + "BinaryPartitioned";
|
|
594
|
+
function Be(t, e, n, r = [], i) {
|
|
594
595
|
if (t === void 0) return !1;
|
|
595
596
|
switch (t.resourceType.name) {
|
|
596
597
|
case ie: {
|
|
@@ -607,7 +608,7 @@ function $e(t, e, n, r = [], i) {
|
|
|
607
608
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
608
609
|
if (a === void 0) s = !1;
|
|
609
610
|
else {
|
|
610
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
611
|
+
const l = [...r, ...JSON.parse(o)], u = Be(
|
|
611
612
|
a,
|
|
612
613
|
e,
|
|
613
614
|
n,
|
|
@@ -623,9 +624,9 @@ function $e(t, e, n, r = [], i) {
|
|
|
623
624
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
624
625
|
}
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
+
function Kn(t, e, n = !1) {
|
|
627
628
|
const r = [];
|
|
628
|
-
return { isComplete:
|
|
629
|
+
return { isComplete: Be(t, e, r, [], n), data: r };
|
|
629
630
|
}
|
|
630
631
|
const ge = (t) => {
|
|
631
632
|
if (t.endsWith(".index"))
|
|
@@ -634,7 +635,7 @@ const ge = (t) => {
|
|
|
634
635
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
635
636
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
636
637
|
};
|
|
637
|
-
function
|
|
638
|
+
function xt(t) {
|
|
638
639
|
if (!t) return;
|
|
639
640
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
640
641
|
let i = 0;
|
|
@@ -680,7 +681,7 @@ function Pt(t) {
|
|
|
680
681
|
}
|
|
681
682
|
return { data: r, keyLength: i };
|
|
682
683
|
}
|
|
683
|
-
function
|
|
684
|
+
function _t(t) {
|
|
684
685
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
685
686
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
686
687
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -699,11 +700,11 @@ function xt(t) {
|
|
|
699
700
|
}
|
|
700
701
|
return r.map((i) => Array.from(i.values()));
|
|
701
702
|
}
|
|
702
|
-
function
|
|
703
|
+
function It(t) {
|
|
703
704
|
if (t === void 0) return;
|
|
704
|
-
if (
|
|
705
|
-
return
|
|
706
|
-
const e =
|
|
705
|
+
if (Oe(t))
|
|
706
|
+
return _t(t);
|
|
707
|
+
const e = xt(t);
|
|
707
708
|
if (!e) return;
|
|
708
709
|
const { data: n, keyLength: r } = e, i = [];
|
|
709
710
|
for (let s = 0; s < r; ++s)
|
|
@@ -814,15 +815,15 @@ function me(t, e = []) {
|
|
|
814
815
|
throw new Error(`Unknown resource type: ${n}`);
|
|
815
816
|
}
|
|
816
817
|
}
|
|
817
|
-
function
|
|
818
|
+
function Tt(t) {
|
|
818
819
|
if (t !== void 0) {
|
|
819
|
-
if (
|
|
820
|
-
if (
|
|
820
|
+
if (Oe(t)) return t;
|
|
821
|
+
if (Se(t)) return Xe(t);
|
|
821
822
|
if (t instanceof D) return me(t);
|
|
822
823
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
823
824
|
}
|
|
824
825
|
}
|
|
825
|
-
function
|
|
826
|
+
function Lt(t, e) {
|
|
826
827
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
827
828
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
828
829
|
const { partitionKeyLength: s } = t;
|
|
@@ -882,13 +883,13 @@ function Tt(t, e) {
|
|
|
882
883
|
}
|
|
883
884
|
}
|
|
884
885
|
}
|
|
885
|
-
function
|
|
886
|
+
function Ft(t) {
|
|
886
887
|
if (!Array.isArray(t)) return !1;
|
|
887
888
|
if (t.length === 0) return !0;
|
|
888
889
|
const e = t[0];
|
|
889
890
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
890
891
|
}
|
|
891
|
-
class
|
|
892
|
+
class Et {
|
|
892
893
|
constructor(e) {
|
|
893
894
|
this.columns = e;
|
|
894
895
|
}
|
|
@@ -897,25 +898,25 @@ class Ft {
|
|
|
897
898
|
return this.columns.filter((r) => n(r.spec));
|
|
898
899
|
}
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
+
function kt(t) {
|
|
901
902
|
if (t)
|
|
902
903
|
return t.map((e) => ({
|
|
903
|
-
type: `split:${
|
|
904
|
+
type: `split:${tt(e.axisId)}`,
|
|
904
905
|
label: e.label,
|
|
905
906
|
importance: 1e6
|
|
906
907
|
// High importance for split filters in labels
|
|
907
908
|
}));
|
|
908
909
|
}
|
|
909
|
-
function
|
|
910
|
+
function Dt(t) {
|
|
910
911
|
if (t)
|
|
911
912
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
912
913
|
}
|
|
913
|
-
function
|
|
914
|
+
function Ot(t, e) {
|
|
914
915
|
if (!e || e.length === 0) return t;
|
|
915
916
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
916
917
|
return Re({ id: t, axisFilters: n });
|
|
917
918
|
}
|
|
918
|
-
function
|
|
919
|
+
function Ie(t) {
|
|
919
920
|
if (!t || typeof t != "object") return !1;
|
|
920
921
|
const e = t, n = 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);
|
|
921
922
|
return !!e.domainAnchor || n || r;
|
|
@@ -931,7 +932,7 @@ function Rt(t) {
|
|
|
931
932
|
class ae {
|
|
932
933
|
constructor() {
|
|
933
934
|
k(this, "defaultProviderStore", []);
|
|
934
|
-
k(this, "providers", [new
|
|
935
|
+
k(this, "providers", [new Et(this.defaultProviderStore)]);
|
|
935
936
|
k(this, "axisLabelProviders", []);
|
|
936
937
|
}
|
|
937
938
|
addColumnProvider(e) {
|
|
@@ -960,56 +961,56 @@ class ae {
|
|
|
960
961
|
};
|
|
961
962
|
let u = () => !1;
|
|
962
963
|
if (a) {
|
|
963
|
-
const
|
|
964
|
-
if (
|
|
964
|
+
const d = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
965
|
+
if (Ie(y)) {
|
|
965
966
|
if (!r)
|
|
966
967
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
967
968
|
return Y(Ce(r.anchors, y, n));
|
|
968
969
|
} else
|
|
969
970
|
return Y(y);
|
|
970
971
|
});
|
|
971
|
-
u = (y) =>
|
|
972
|
+
u = (y) => d.some((S) => S(y));
|
|
972
973
|
}
|
|
973
974
|
const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], g = /* @__PURE__ */ new Set();
|
|
974
|
-
for (const
|
|
975
|
-
const y =
|
|
976
|
-
let
|
|
975
|
+
for (const d of h) {
|
|
976
|
+
const y = Ie(d);
|
|
977
|
+
let S;
|
|
977
978
|
if (y) {
|
|
978
979
|
if (!r)
|
|
979
980
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
980
|
-
|
|
981
|
+
S = Ce(r.anchors, d, n);
|
|
981
982
|
} else
|
|
982
|
-
|
|
983
|
+
S = d;
|
|
983
984
|
const E = /* @__PURE__ */ new Set(), _ = [];
|
|
984
|
-
for (const
|
|
985
|
-
const I =
|
|
985
|
+
for (const C of this.providers) {
|
|
986
|
+
const I = C.selectColumns(S);
|
|
986
987
|
for (const c of I) {
|
|
987
988
|
if (u(c.spec)) continue;
|
|
988
989
|
if (E.has(c.id))
|
|
989
|
-
throw new Error(`Duplicate column id ${c.id} in provider ${
|
|
990
|
-
const m =
|
|
990
|
+
throw new Error(`Duplicate column id ${c.id} in provider ${C.constructor.name}`);
|
|
991
|
+
const m = Qe(c.spec);
|
|
991
992
|
g.has(m) || (E.add(c.id), g.add(m), _.push(c));
|
|
992
993
|
}
|
|
993
994
|
}
|
|
994
995
|
if (_.length === 0) continue;
|
|
995
|
-
const w = Rt(
|
|
996
|
-
for (const
|
|
997
|
-
if (!te(
|
|
998
|
-
const I =
|
|
996
|
+
const w = Rt(d), A = w.length > 0;
|
|
997
|
+
for (const C of _) {
|
|
998
|
+
if (!te(C.spec)) continue;
|
|
999
|
+
const I = C.spec;
|
|
999
1000
|
if (A) {
|
|
1000
|
-
if (
|
|
1001
|
-
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${
|
|
1002
|
-
const c =
|
|
1001
|
+
if (Ft(C.data))
|
|
1002
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${C.id}`);
|
|
1003
|
+
const c = Tt(C.data);
|
|
1003
1004
|
if (!c) {
|
|
1004
1005
|
if (s) continue;
|
|
1005
1006
|
return;
|
|
1006
1007
|
}
|
|
1007
|
-
if (!
|
|
1008
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${
|
|
1009
|
-
const m =
|
|
1008
|
+
if (!Ze(c))
|
|
1009
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${C.id}`);
|
|
1010
|
+
const m = It(c), T = w[w.length - 1];
|
|
1010
1011
|
if (T >= c.partitionKeyLength)
|
|
1011
1012
|
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${T}) in column ${I.name}`);
|
|
1012
|
-
const U = w.map((L) => this.findLabels(
|
|
1013
|
+
const U = w.map((L) => this.findLabels(O(I.axesSpec[L]))), V = [], J = (L, W) => {
|
|
1013
1014
|
if (W >= w.length) {
|
|
1014
1015
|
if (V.push([...L]), V.length > 1e4)
|
|
1015
1016
|
throw new Error("Too many key combinations, aborting.");
|
|
@@ -1017,7 +1018,7 @@ class ae {
|
|
|
1017
1018
|
}
|
|
1018
1019
|
const j = w[W];
|
|
1019
1020
|
if (j >= m.length)
|
|
1020
|
-
throw new Error(`Axis index ${j} out of bounds for unique keys array (length ${m.length}) during split key generation for column ${
|
|
1021
|
+
throw new Error(`Axis index ${j} out of bounds for unique keys array (length ${m.length}) during split key generation for column ${C.id}`);
|
|
1021
1022
|
const M = m[j];
|
|
1022
1023
|
if (!M || M.length === 0) {
|
|
1023
1024
|
V.length = 0;
|
|
@@ -1028,20 +1029,20 @@ class ae {
|
|
|
1028
1029
|
};
|
|
1029
1030
|
if (J([], 0), V.length === 0)
|
|
1030
1031
|
continue;
|
|
1031
|
-
const K = [...I.axesSpec],
|
|
1032
|
+
const K = [...I.axesSpec], We = w.map((L) => L);
|
|
1032
1033
|
for (let L = w.length - 1; L >= 0; L--)
|
|
1033
1034
|
K.splice(w[L], 1);
|
|
1034
|
-
const
|
|
1035
|
+
const Ge = { ...I, axesSpec: K };
|
|
1035
1036
|
for (const L of V) {
|
|
1036
1037
|
const W = L.map((j, M) => {
|
|
1037
|
-
const Z =
|
|
1038
|
-
return { axisIdx: Z, axisId:
|
|
1038
|
+
const Z = We[M], He = O(I.axesSpec[Z]), le = U[M], qe = (le == null ? void 0 : le[j]) ?? String(j);
|
|
1039
|
+
return { axisIdx: Z, axisId: He, value: j, label: qe };
|
|
1039
1040
|
});
|
|
1040
1041
|
f.push({
|
|
1041
1042
|
type: "split",
|
|
1042
|
-
originalColumn:
|
|
1043
|
+
originalColumn: C,
|
|
1043
1044
|
spec: I,
|
|
1044
|
-
adjustedSpec:
|
|
1045
|
+
adjustedSpec: Ge,
|
|
1045
1046
|
dataEntries: c,
|
|
1046
1047
|
axisFilters: W
|
|
1047
1048
|
});
|
|
@@ -1049,36 +1050,36 @@ class ae {
|
|
|
1049
1050
|
} else
|
|
1050
1051
|
f.push({
|
|
1051
1052
|
type: "direct",
|
|
1052
|
-
originalColumn:
|
|
1053
|
+
originalColumn: C,
|
|
1053
1054
|
spec: I,
|
|
1054
1055
|
adjustedSpec: I
|
|
1055
1056
|
});
|
|
1056
1057
|
}
|
|
1057
1058
|
}
|
|
1058
1059
|
if (f.length === 0) return [];
|
|
1059
|
-
const
|
|
1060
|
+
const p = Me(
|
|
1060
1061
|
f,
|
|
1061
|
-
(
|
|
1062
|
-
spec:
|
|
1063
|
-
suffixTrace:
|
|
1062
|
+
(d) => ({
|
|
1063
|
+
spec: d.spec,
|
|
1064
|
+
suffixTrace: d.type === "split" ? kt(d.axisFilters) : void 0
|
|
1064
1065
|
}),
|
|
1065
1066
|
l
|
|
1066
1067
|
), b = [];
|
|
1067
|
-
for (const { value:
|
|
1068
|
-
const { originalColumn:
|
|
1068
|
+
for (const { value: d, label: y } of p) {
|
|
1069
|
+
const { originalColumn: S, spec: E } = d, _ = d.type === "split" ? d.axisFilters : void 0, w = Dt(_);
|
|
1069
1070
|
let A;
|
|
1070
|
-
r ? A = r.deriveS(E, w) : A =
|
|
1071
|
-
let
|
|
1072
|
-
o && (
|
|
1073
|
-
...
|
|
1071
|
+
r ? A = r.deriveS(E, w) : A = Ot(S.id, w);
|
|
1072
|
+
let C = { ...d.adjustedSpec };
|
|
1073
|
+
o && (C = {
|
|
1074
|
+
...C,
|
|
1074
1075
|
annotations: {
|
|
1075
|
-
...
|
|
1076
|
+
...C.annotations ?? {},
|
|
1076
1077
|
"pl7.app/label": y
|
|
1077
1078
|
}
|
|
1078
1079
|
}), b.push({
|
|
1079
1080
|
id: A,
|
|
1080
|
-
spec:
|
|
1081
|
-
data: () =>
|
|
1081
|
+
spec: C,
|
|
1082
|
+
data: () => d.type === "split" ? et(Lt(d.dataEntries, w)) : d.originalColumn.data,
|
|
1082
1083
|
label: y
|
|
1083
1084
|
});
|
|
1084
1085
|
}
|
|
@@ -1107,6 +1108,39 @@ class ae {
|
|
|
1107
1108
|
return i;
|
|
1108
1109
|
}
|
|
1109
1110
|
}
|
|
1111
|
+
function ye(t) {
|
|
1112
|
+
const e = (i) => i.operator !== "InSet" ? i : {
|
|
1113
|
+
operator: "Or",
|
|
1114
|
+
operands: i.references.map((s) => ({
|
|
1115
|
+
operator: "Equal",
|
|
1116
|
+
reference: s
|
|
1117
|
+
}))
|
|
1118
|
+
}, n = (i, s) => {
|
|
1119
|
+
switch (i.operator) {
|
|
1120
|
+
case "And":
|
|
1121
|
+
return {
|
|
1122
|
+
...i,
|
|
1123
|
+
operands: i.operands.map((a) => n(a, s))
|
|
1124
|
+
};
|
|
1125
|
+
case "Or":
|
|
1126
|
+
return {
|
|
1127
|
+
...i,
|
|
1128
|
+
operands: i.operands.map((a) => n(a, s))
|
|
1129
|
+
};
|
|
1130
|
+
case "Not":
|
|
1131
|
+
return {
|
|
1132
|
+
...i,
|
|
1133
|
+
operand: n(i.operand, s)
|
|
1134
|
+
};
|
|
1135
|
+
default:
|
|
1136
|
+
return s(i);
|
|
1137
|
+
}
|
|
1138
|
+
}, r = (i, s) => ({
|
|
1139
|
+
...i,
|
|
1140
|
+
predicate: n(i.predicate, s)
|
|
1141
|
+
});
|
|
1142
|
+
return t.map((i) => r(i, e));
|
|
1143
|
+
}
|
|
1110
1144
|
function ce(t, e) {
|
|
1111
1145
|
if (t === void 0) return e === void 0;
|
|
1112
1146
|
if (e === void 0) return !0;
|
|
@@ -1114,10 +1148,10 @@ function ce(t, e) {
|
|
|
1114
1148
|
if (t[n] !== e[n]) return !1;
|
|
1115
1149
|
return !0;
|
|
1116
1150
|
}
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1151
|
+
function Te(t) {
|
|
1152
|
+
return ve(t, (e) => e instanceof D ? e.handle : Se(e) ? at(e, (n) => n.handle) : e);
|
|
1119
1153
|
}
|
|
1120
|
-
class
|
|
1154
|
+
class Kt {
|
|
1121
1155
|
constructor() {
|
|
1122
1156
|
k(this, "ctx", v());
|
|
1123
1157
|
}
|
|
@@ -1130,26 +1164,26 @@ class Ot {
|
|
|
1130
1164
|
getOptions(e, n) {
|
|
1131
1165
|
const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1132
1166
|
let s = {}, o = !1;
|
|
1133
|
-
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ?
|
|
1134
|
-
ref:
|
|
1167
|
+
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ? Me(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1168
|
+
ref: we(a, o),
|
|
1135
1169
|
label: l
|
|
1136
1170
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1137
|
-
ref:
|
|
1171
|
+
ref: we(a, o),
|
|
1138
1172
|
label: s(l, a)
|
|
1139
1173
|
}));
|
|
1140
1174
|
}
|
|
1141
1175
|
resolveAnchorCtx(e) {
|
|
1142
|
-
if (e instanceof
|
|
1176
|
+
if (e instanceof Ae) return e;
|
|
1143
1177
|
const n = {};
|
|
1144
1178
|
for (const [r, i] of Object.entries(e))
|
|
1145
|
-
if (
|
|
1179
|
+
if (nt(i)) {
|
|
1146
1180
|
const s = this.getPColumnSpecByRef(i);
|
|
1147
1181
|
if (!s)
|
|
1148
1182
|
return;
|
|
1149
1183
|
n[r] = s;
|
|
1150
1184
|
} else
|
|
1151
1185
|
n[r] = i;
|
|
1152
|
-
return new
|
|
1186
|
+
return new Ae(n);
|
|
1153
1187
|
}
|
|
1154
1188
|
/**
|
|
1155
1189
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1242,7 +1276,7 @@ class Ot {
|
|
|
1242
1276
|
ref: n.ref,
|
|
1243
1277
|
obj: {
|
|
1244
1278
|
...n.obj,
|
|
1245
|
-
data:
|
|
1279
|
+
data: rt(
|
|
1246
1280
|
n.obj.data,
|
|
1247
1281
|
(r) => new D(r, [n.ref.blockId, n.ref.name])
|
|
1248
1282
|
)
|
|
@@ -1271,7 +1305,7 @@ class Ot {
|
|
|
1271
1305
|
)) == null ? void 0 : r.obj;
|
|
1272
1306
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1273
1307
|
if (n)
|
|
1274
|
-
return
|
|
1308
|
+
return ve(
|
|
1275
1309
|
n,
|
|
1276
1310
|
(i) => new D(i, [e.blockId, e.name])
|
|
1277
1311
|
);
|
|
@@ -1284,7 +1318,7 @@ class Ot {
|
|
|
1284
1318
|
getPColumnByRef(e) {
|
|
1285
1319
|
const n = this.getDataByRef(e);
|
|
1286
1320
|
if (n)
|
|
1287
|
-
return
|
|
1321
|
+
return it(n);
|
|
1288
1322
|
}
|
|
1289
1323
|
/**
|
|
1290
1324
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1334,7 +1368,7 @@ class Ot {
|
|
|
1334
1368
|
findLabels(e) {
|
|
1335
1369
|
const n = this.getData();
|
|
1336
1370
|
for (const r of n.entries) {
|
|
1337
|
-
if (!
|
|
1371
|
+
if (!De(r.obj)) continue;
|
|
1338
1372
|
const i = r.obj.spec;
|
|
1339
1373
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
|
|
1340
1374
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -1393,7 +1427,7 @@ class ee {
|
|
|
1393
1427
|
k(this, "_uiStateCache");
|
|
1394
1428
|
// lazy rendering because this feature is rarely used
|
|
1395
1429
|
k(this, "_activeArgsCache");
|
|
1396
|
-
k(this, "resultPool", new
|
|
1430
|
+
k(this, "resultPool", new Kt());
|
|
1397
1431
|
this.ctx = v();
|
|
1398
1432
|
}
|
|
1399
1433
|
get args() {
|
|
@@ -1434,10 +1468,10 @@ class ee {
|
|
|
1434
1468
|
);
|
|
1435
1469
|
}
|
|
1436
1470
|
get prerun() {
|
|
1437
|
-
return this.getNamedAccessor(
|
|
1471
|
+
return this.getNamedAccessor(Ve);
|
|
1438
1472
|
}
|
|
1439
1473
|
get outputs() {
|
|
1440
|
-
return this.getNamedAccessor(
|
|
1474
|
+
return this.getNamedAccessor(je);
|
|
1441
1475
|
}
|
|
1442
1476
|
/**
|
|
1443
1477
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1449,21 +1483,25 @@ class ee {
|
|
|
1449
1483
|
}
|
|
1450
1484
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1451
1485
|
var i;
|
|
1452
|
-
const n = e.some((s) => !(s.data instanceof D) ||
|
|
1486
|
+
const n = e.some((s) => !(s.data instanceof D) || Se(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1453
1487
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1454
1488
|
}
|
|
1455
1489
|
patchPTableDef(e) {
|
|
1456
|
-
var n;
|
|
1457
|
-
return (n = this.ctx.featureFlags) != null && n.pTablePartitionFiltersSupport
|
|
1490
|
+
var n, r;
|
|
1491
|
+
return (n = this.ctx.featureFlags) != null && n.pTablePartitionFiltersSupport || (e = {
|
|
1458
1492
|
...e,
|
|
1459
1493
|
partitionFilters: [],
|
|
1460
1494
|
filters: [...e.partitionFilters, ...e.filters]
|
|
1461
|
-
}
|
|
1495
|
+
}), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
1496
|
+
...e,
|
|
1497
|
+
partitionFilters: ye(e.partitionFilters),
|
|
1498
|
+
filters: ye(e.filters)
|
|
1499
|
+
}), e;
|
|
1462
1500
|
}
|
|
1463
1501
|
// TODO remove all non-PColumn fields
|
|
1464
1502
|
createPFrame(e) {
|
|
1465
1503
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1466
|
-
e.map((n) =>
|
|
1504
|
+
e.map((n) => Te(n))
|
|
1467
1505
|
);
|
|
1468
1506
|
}
|
|
1469
1507
|
createPTable(e) {
|
|
@@ -1476,8 +1514,8 @@ class ee {
|
|
|
1476
1514
|
partitionFilters: e.filters ?? [],
|
|
1477
1515
|
filters: [],
|
|
1478
1516
|
sorting: e.sorting ?? []
|
|
1479
|
-
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
1480
|
-
|
|
1517
|
+
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(st(n.src)), this.ctx.createPTable(
|
|
1518
|
+
ot(n, (r) => Te(r))
|
|
1481
1519
|
);
|
|
1482
1520
|
}
|
|
1483
1521
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1497,16 +1535,16 @@ class ee {
|
|
|
1497
1535
|
this.ctx.logError(e);
|
|
1498
1536
|
}
|
|
1499
1537
|
}
|
|
1500
|
-
const z = "1.39.
|
|
1501
|
-
function
|
|
1538
|
+
const z = "1.39.6";
|
|
1539
|
+
function Nt(t) {
|
|
1502
1540
|
return t.__renderLambda === !0;
|
|
1503
1541
|
}
|
|
1504
|
-
function
|
|
1542
|
+
function pe(t) {
|
|
1505
1543
|
if (t !== void 0)
|
|
1506
|
-
return
|
|
1544
|
+
return Nt(t) ? t.handle : t;
|
|
1507
1545
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return
|
|
1546
|
+
function Nn(t) {
|
|
1547
|
+
return lt(t);
|
|
1510
1548
|
}
|
|
1511
1549
|
const x = class x {
|
|
1512
1550
|
constructor(e, n, r, i, s, o, a, l, u) {
|
|
@@ -1713,13 +1751,13 @@ const x = class x {
|
|
|
1713
1751
|
sdkVersion: z,
|
|
1714
1752
|
renderingMode: this._renderingMode,
|
|
1715
1753
|
initialArgs: this._initialArgs,
|
|
1716
|
-
inputsValid:
|
|
1717
|
-
sections:
|
|
1754
|
+
inputsValid: pe(this._inputsValid),
|
|
1755
|
+
sections: pe(this._sections),
|
|
1718
1756
|
outputs: Object.fromEntries(
|
|
1719
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1757
|
+
Object.entries(this._outputs).map(([n, r]) => [n, pe(r)])
|
|
1720
1758
|
)
|
|
1721
1759
|
};
|
|
1722
|
-
return
|
|
1760
|
+
return ht() ? Ne({ sdkVersion: z }) : { config: e };
|
|
1723
1761
|
}
|
|
1724
1762
|
};
|
|
1725
1763
|
k(x, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
@@ -1727,8 +1765,8 @@ k(x, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
|
1727
1765
|
requiresUIAPIVersion: 1,
|
|
1728
1766
|
requiresModelAPIVersion: 1
|
|
1729
1767
|
});
|
|
1730
|
-
let
|
|
1731
|
-
function
|
|
1768
|
+
let Le = x;
|
|
1769
|
+
function Ue() {
|
|
1732
1770
|
return {
|
|
1733
1771
|
sourceId: null,
|
|
1734
1772
|
hiddenColIds: null,
|
|
@@ -1737,45 +1775,45 @@ function Be() {
|
|
|
1737
1775
|
sorting: []
|
|
1738
1776
|
};
|
|
1739
1777
|
}
|
|
1740
|
-
function
|
|
1778
|
+
function Vt() {
|
|
1741
1779
|
return {
|
|
1742
1780
|
version: 3,
|
|
1743
1781
|
stateCache: [],
|
|
1744
|
-
pTableParams:
|
|
1782
|
+
pTableParams: Ue()
|
|
1745
1783
|
};
|
|
1746
1784
|
}
|
|
1747
|
-
function
|
|
1785
|
+
function jt(t) {
|
|
1748
1786
|
return "version" in t ? (t.version === 2 && (t = {
|
|
1749
1787
|
version: 3,
|
|
1750
1788
|
stateCache: t.stateCache.map((e) => ({
|
|
1751
1789
|
...e,
|
|
1752
1790
|
filtersState: []
|
|
1753
1791
|
})),
|
|
1754
|
-
pTableParams:
|
|
1755
|
-
}), t) :
|
|
1792
|
+
pTableParams: Ue()
|
|
1793
|
+
}), t) : Vt();
|
|
1756
1794
|
}
|
|
1757
|
-
function
|
|
1795
|
+
function be(t) {
|
|
1758
1796
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1759
1797
|
}
|
|
1760
|
-
function
|
|
1798
|
+
function Jt(t) {
|
|
1761
1799
|
return new ae().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1762
1800
|
name: "pl7.app/label",
|
|
1763
1801
|
axes: [{}]
|
|
1764
1802
|
// exactly one axis
|
|
1765
1803
|
}, { dontWaitAllData: !0 });
|
|
1766
1804
|
}
|
|
1767
|
-
function
|
|
1805
|
+
function Fe(t, e) {
|
|
1768
1806
|
const n = [], r = [];
|
|
1769
1807
|
for (const a of t)
|
|
1770
|
-
|
|
1808
|
+
be(a.spec) ? n.push(a) : r.push(a);
|
|
1771
1809
|
const i = [];
|
|
1772
1810
|
for (const a of r)
|
|
1773
1811
|
for (const l of a.spec.axesSpec) {
|
|
1774
|
-
const u =
|
|
1812
|
+
const u = O(l);
|
|
1775
1813
|
i.some((h) => N(h, u)) || i.push(u);
|
|
1776
1814
|
}
|
|
1777
1815
|
for (const a of n) {
|
|
1778
|
-
const l =
|
|
1816
|
+
const l = O(a.spec.axesSpec[0]), u = i.findIndex((h) => N(h, l));
|
|
1779
1817
|
u !== -1 && i.splice(u, 1);
|
|
1780
1818
|
}
|
|
1781
1819
|
const s = (a, l) => {
|
|
@@ -1786,10 +1824,10 @@ function Le(t, e) {
|
|
|
1786
1824
|
return u;
|
|
1787
1825
|
}, o = [];
|
|
1788
1826
|
for (const a of e) {
|
|
1789
|
-
const l = a.spec.axesSpec[0], u =
|
|
1827
|
+
const l = a.spec.axesSpec[0], u = O(l), h = i.findIndex((f) => N(f, u));
|
|
1790
1828
|
if (h !== -1) {
|
|
1791
|
-
const f = i[h], g = Object.keys(f.domain ?? {}).length,
|
|
1792
|
-
g >
|
|
1829
|
+
const f = i[h], g = Object.keys(f.domain ?? {}).length, p = Object.keys(l.domain ?? {}).length;
|
|
1830
|
+
g > p ? o.push({
|
|
1793
1831
|
id: s(a.id, f.domain),
|
|
1794
1832
|
spec: {
|
|
1795
1833
|
...a.spec,
|
|
@@ -1801,7 +1839,7 @@ function Le(t, e) {
|
|
|
1801
1839
|
}
|
|
1802
1840
|
return o;
|
|
1803
1841
|
}
|
|
1804
|
-
function
|
|
1842
|
+
function Mt(t) {
|
|
1805
1843
|
const e = (i) => Array.isArray(i), n = (i) => i instanceof D, r = (i) => typeof i == "object" && "type" in i;
|
|
1806
1844
|
return t.map((i) => i.data).every((i) => {
|
|
1807
1845
|
if (e(i))
|
|
@@ -1821,7 +1859,7 @@ function Jt(t) {
|
|
|
1821
1859
|
throw Error(`unsupported column data type: ${i}`);
|
|
1822
1860
|
});
|
|
1823
1861
|
}
|
|
1824
|
-
function
|
|
1862
|
+
function Ee(t) {
|
|
1825
1863
|
let e = t.columns;
|
|
1826
1864
|
const n = [];
|
|
1827
1865
|
if (t.coreColumnPredicate) {
|
|
@@ -1843,54 +1881,54 @@ function Fe(t) {
|
|
|
1843
1881
|
sorting: t.sorting
|
|
1844
1882
|
};
|
|
1845
1883
|
}
|
|
1846
|
-
function
|
|
1884
|
+
function $t(t) {
|
|
1847
1885
|
var e;
|
|
1848
1886
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
1849
1887
|
}
|
|
1850
|
-
function
|
|
1888
|
+
function Bt(t) {
|
|
1851
1889
|
var e;
|
|
1852
1890
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1853
1891
|
}
|
|
1854
|
-
function
|
|
1892
|
+
function de(t, e) {
|
|
1855
1893
|
return [...new Map(t.map((n) => [e(n), n])).values()];
|
|
1856
1894
|
}
|
|
1857
|
-
function
|
|
1895
|
+
function Vn(t, e, n, r) {
|
|
1858
1896
|
if (e.length === 0) return;
|
|
1859
|
-
const i = e.filter((c) =>
|
|
1897
|
+
const i = e.filter((c) => !$t(c.spec)), s = jt(n), o = Jt(t.resultPool);
|
|
1860
1898
|
if (!o) return;
|
|
1861
|
-
const a =
|
|
1862
|
-
...
|
|
1863
|
-
[...l.flatMap((c) => c.spec.axesSpec.map((m) =>
|
|
1864
|
-
(c) =>
|
|
1899
|
+
const a = Fe(i.map(Pe), o), l = [...i, ...a], h = [
|
|
1900
|
+
...de(
|
|
1901
|
+
[...l.flatMap((c) => c.spec.axesSpec.map((m) => O(m)))],
|
|
1902
|
+
(c) => R(c)
|
|
1865
1903
|
).map((c) => ({ type: "axis", id: c })),
|
|
1866
1904
|
...l.map((c) => ({ type: "column", id: c.id }))
|
|
1867
|
-
], f = new Set(h.map((c) =>
|
|
1905
|
+
], f = new Set(h.map((c) => R(c))), g = (c) => f.has(R(c)), p = (r == null ? void 0 : r.coreJoinType) ?? "full", b = s.pTableParams.partitionFilters.filter((c) => {
|
|
1868
1906
|
const m = g(c.column);
|
|
1869
1907
|
return m || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), m;
|
|
1870
|
-
}),
|
|
1908
|
+
}), d = de(
|
|
1871
1909
|
[...(r == null ? void 0 : r.filters) ?? [], ...s.pTableParams.filters],
|
|
1872
|
-
(c) =>
|
|
1910
|
+
(c) => R(c.column)
|
|
1873
1911
|
).filter((c) => {
|
|
1874
1912
|
const m = g(c.column);
|
|
1875
1913
|
return m || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), m;
|
|
1876
|
-
}), y =
|
|
1914
|
+
}), y = de(
|
|
1877
1915
|
[...(r == null ? void 0 : r.sorting) ?? [], ...s.pTableParams.sorting],
|
|
1878
|
-
(c) =>
|
|
1916
|
+
(c) => R(c.column)
|
|
1879
1917
|
).filter((c) => {
|
|
1880
1918
|
const m = g(c.column);
|
|
1881
1919
|
return m || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), m;
|
|
1882
|
-
}),
|
|
1920
|
+
}), S = Ee({
|
|
1883
1921
|
columns: i,
|
|
1884
1922
|
labelColumns: a,
|
|
1885
|
-
coreJoinType:
|
|
1923
|
+
coreJoinType: p,
|
|
1886
1924
|
partitionFilters: b,
|
|
1887
|
-
filters:
|
|
1925
|
+
filters: d,
|
|
1888
1926
|
sorting: y,
|
|
1889
1927
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1890
|
-
}), E = t.createPTable(
|
|
1891
|
-
if (
|
|
1928
|
+
}), E = t.createPTable(S), _ = new Set((() => {
|
|
1929
|
+
if (p === "inner") return [];
|
|
1892
1930
|
const c = s.pTableParams.hiddenColIds;
|
|
1893
|
-
return c || i.filter((m) =>
|
|
1931
|
+
return c || i.filter((m) => Bt(m.spec)).map((m) => m.id);
|
|
1894
1932
|
})());
|
|
1895
1933
|
i.filter((c) => {
|
|
1896
1934
|
var m;
|
|
@@ -1898,25 +1936,25 @@ function Nn(t, e, n, r) {
|
|
|
1898
1936
|
}).forEach((c) => _.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((m) => {
|
|
1899
1937
|
var T;
|
|
1900
1938
|
return (T = r == null ? void 0 : r.coreColumnPredicate) != null && T.call(r, m.spec) ? [m.id] : [];
|
|
1901
|
-
}).forEach((m) => _.delete(m)), [...b.map((c) => c.column), ...
|
|
1902
|
-
const w = i.filter((c) => !_.has(c.id)), A =
|
|
1903
|
-
if (!
|
|
1904
|
-
const
|
|
1939
|
+
}).forEach((m) => _.delete(m)), [...b.map((c) => c.column), ...d.map((c) => c.column), ...y.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => _.delete(c.id));
|
|
1940
|
+
const w = i.filter((c) => !_.has(c.id)), A = Fe(w.map(Pe), o);
|
|
1941
|
+
if (!Mt([...w, ...A])) return;
|
|
1942
|
+
const C = Ee({
|
|
1905
1943
|
columns: w,
|
|
1906
1944
|
labelColumns: A,
|
|
1907
|
-
coreJoinType:
|
|
1945
|
+
coreJoinType: p,
|
|
1908
1946
|
partitionFilters: b,
|
|
1909
|
-
filters:
|
|
1947
|
+
filters: d,
|
|
1910
1948
|
sorting: y,
|
|
1911
1949
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1912
|
-
}), I = t.createPTable(
|
|
1950
|
+
}), I = t.createPTable(C);
|
|
1913
1951
|
return {
|
|
1914
1952
|
sourceId: s.pTableParams.sourceId,
|
|
1915
1953
|
fullTableHandle: E,
|
|
1916
1954
|
visibleTableHandle: I
|
|
1917
1955
|
};
|
|
1918
1956
|
}
|
|
1919
|
-
function
|
|
1957
|
+
function jn(t, e, n) {
|
|
1920
1958
|
const r = t.resultPool.findLabels(e);
|
|
1921
1959
|
return {
|
|
1922
1960
|
axis: e,
|
|
@@ -1927,7 +1965,7 @@ function Vn(t, e, n) {
|
|
|
1927
1965
|
defaultValue: n[0]
|
|
1928
1966
|
};
|
|
1929
1967
|
}
|
|
1930
|
-
const
|
|
1968
|
+
const Ut = (t, e) => {
|
|
1931
1969
|
let n = t.toString();
|
|
1932
1970
|
return e == null || e.forEach((r) => {
|
|
1933
1971
|
if (r)
|
|
@@ -1935,7 +1973,7 @@ const Bt = (t, e) => {
|
|
|
1935
1973
|
n += i, n += s;
|
|
1936
1974
|
}), n;
|
|
1937
1975
|
};
|
|
1938
|
-
function
|
|
1976
|
+
function Wt(t) {
|
|
1939
1977
|
if (!t.length)
|
|
1940
1978
|
return [];
|
|
1941
1979
|
let e = [[]];
|
|
@@ -1946,16 +1984,16 @@ function Ut(t) {
|
|
|
1946
1984
|
}), e = r;
|
|
1947
1985
|
}), e;
|
|
1948
1986
|
}
|
|
1949
|
-
function
|
|
1987
|
+
function Gt(t) {
|
|
1950
1988
|
var e;
|
|
1951
|
-
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[
|
|
1989
|
+
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[qt]) === "true";
|
|
1952
1990
|
}
|
|
1953
|
-
const
|
|
1954
|
-
function
|
|
1991
|
+
const Ht = "pl7.app/graph/isVirtual", ke = "pl7.app/label", qt = "pl7.app/isLinkerColumn";
|
|
1992
|
+
function zt(t) {
|
|
1955
1993
|
var n, r;
|
|
1956
1994
|
const e = /* @__PURE__ */ new Map();
|
|
1957
1995
|
for (const { spec: i } of t) {
|
|
1958
|
-
const s = i.axesSpec.map(
|
|
1996
|
+
const s = i.axesSpec.map(O).map(R);
|
|
1959
1997
|
s.forEach((o) => {
|
|
1960
1998
|
e.has(o) || e.set(o, /* @__PURE__ */ new Set());
|
|
1961
1999
|
});
|
|
@@ -1967,11 +2005,11 @@ function qt(t) {
|
|
|
1967
2005
|
}
|
|
1968
2006
|
return e;
|
|
1969
2007
|
}
|
|
1970
|
-
function
|
|
1971
|
-
const n =
|
|
2008
|
+
function Yt(t, e) {
|
|
2009
|
+
const n = zt(t), r = [...n.keys()].map(xe), i = [];
|
|
1972
2010
|
for (const l of e.values()) {
|
|
1973
2011
|
const u = r.find((h) => N(l, h));
|
|
1974
|
-
u && i.push(
|
|
2012
|
+
u && i.push(R(u));
|
|
1975
2013
|
}
|
|
1976
2014
|
const s = new Set(i), o = /* @__PURE__ */ new Map();
|
|
1977
2015
|
let a = [...i];
|
|
@@ -1979,34 +2017,34 @@ function zt(t, e) {
|
|
|
1979
2017
|
const l = [];
|
|
1980
2018
|
for (const u of a)
|
|
1981
2019
|
for (const h of n.get(u) ?? [])
|
|
1982
|
-
s.has(h) || (l.push(h), s.add(h), o.set(h,
|
|
2020
|
+
s.has(h) || (l.push(h), s.add(h), o.set(h, xe(h)));
|
|
1983
2021
|
a = l;
|
|
1984
2022
|
}
|
|
1985
2023
|
return o;
|
|
1986
2024
|
}
|
|
1987
|
-
function
|
|
2025
|
+
function Xt(t, e) {
|
|
1988
2026
|
const n = [];
|
|
1989
2027
|
return e.forEach((r) => {
|
|
1990
|
-
n.push(...
|
|
2028
|
+
n.push(...Qt(t, r));
|
|
1991
2029
|
}), n;
|
|
1992
2030
|
}
|
|
1993
|
-
function
|
|
1994
|
-
const n = e.spec.axesSpec.map(
|
|
1995
|
-
if (n.every((u) => t.has(
|
|
2031
|
+
function Qt(t, e) {
|
|
2032
|
+
const n = e.spec.axesSpec.map(O);
|
|
2033
|
+
if (n.every((u) => t.has(R(u))))
|
|
1996
2034
|
return [e];
|
|
1997
2035
|
const r = n.map((u) => {
|
|
1998
2036
|
const h = [];
|
|
1999
2037
|
for (const [f, g] of t)
|
|
2000
2038
|
N(g, u) && !N(u, g) && h.push(g);
|
|
2001
2039
|
return h;
|
|
2002
|
-
}), i =
|
|
2040
|
+
}), i = Wt(r), s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = i.map((u) => {
|
|
2003
2041
|
const h = /* @__PURE__ */ new Set();
|
|
2004
2042
|
return u.map((f, g) => {
|
|
2005
|
-
const
|
|
2006
|
-
return Object.entries(b ?? {}).forEach(([
|
|
2007
|
-
if ((
|
|
2008
|
-
const
|
|
2009
|
-
h.add(
|
|
2043
|
+
const p = e.spec.axesSpec[g].domain, b = f.domain;
|
|
2044
|
+
return Object.entries(b ?? {}).forEach(([d, y]) => {
|
|
2045
|
+
if ((p == null ? void 0 : p[d]) === void 0) {
|
|
2046
|
+
const S = JSON.stringify([d, y]);
|
|
2047
|
+
h.add(S), s.add(S);
|
|
2010
2048
|
}
|
|
2011
2049
|
}), {
|
|
2012
2050
|
...f,
|
|
@@ -2018,21 +2056,21 @@ function Xt(t, e) {
|
|
|
2018
2056
|
a.some((h) => !h.has(u)) && o.add(u);
|
|
2019
2057
|
});
|
|
2020
2058
|
const l = i.map((u, h) => {
|
|
2021
|
-
var
|
|
2022
|
-
const f =
|
|
2023
|
-
var
|
|
2024
|
-
return (
|
|
2059
|
+
var d;
|
|
2060
|
+
const f = Ut(e.id, u.map((y) => y.domain)), g = ((d = e.spec.annotations) == null ? void 0 : d[ke]) ?? "", p = [...a[h]].filter((y) => o.has(y)).sort().map((y) => {
|
|
2061
|
+
var S;
|
|
2062
|
+
return (S = JSON.parse(y)) == null ? void 0 : S[1];
|
|
2025
2063
|
}).join(" / "), b = {
|
|
2026
2064
|
...e.spec.annotations,
|
|
2027
|
-
[
|
|
2065
|
+
[Ht]: "true"
|
|
2028
2066
|
};
|
|
2029
|
-
return (g ||
|
|
2067
|
+
return (g || p) && (b[ke] = g && p ? g + " / " + p : g + p), {
|
|
2030
2068
|
id: f,
|
|
2031
2069
|
spec: {
|
|
2032
2070
|
...e.spec,
|
|
2033
|
-
axesSpec: u.map((y,
|
|
2071
|
+
axesSpec: u.map((y, S) => ({
|
|
2034
2072
|
...y,
|
|
2035
|
-
annotations: e.spec.axesSpec[
|
|
2073
|
+
annotations: e.spec.axesSpec[S].annotations
|
|
2036
2074
|
})),
|
|
2037
2075
|
annotations: b
|
|
2038
2076
|
},
|
|
@@ -2041,52 +2079,52 @@ function Xt(t, e) {
|
|
|
2041
2079
|
});
|
|
2042
2080
|
return [e, ...l];
|
|
2043
2081
|
}
|
|
2044
|
-
function
|
|
2082
|
+
function Jn(t, e) {
|
|
2045
2083
|
if (!e) return;
|
|
2046
2084
|
const n = new ae();
|
|
2047
2085
|
n.addColumnProvider(t.resultPool), n.addColumns(e);
|
|
2048
2086
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
2049
2087
|
for (const f of e)
|
|
2050
2088
|
for (const g of f.spec.axesSpec) {
|
|
2051
|
-
const
|
|
2052
|
-
r.set(
|
|
2089
|
+
const p = O(g);
|
|
2090
|
+
r.set(R(p), p), i.set(R(p), p);
|
|
2053
2091
|
}
|
|
2054
|
-
const s = n.getColumns((f) =>
|
|
2092
|
+
const s = n.getColumns((f) => Gt(f)) ?? [], o = Yt(s, r);
|
|
2055
2093
|
for (const f of o)
|
|
2056
2094
|
r.set(...f), i.set(...f);
|
|
2057
2095
|
const a = (n.getColumns((f) => f.axesSpec.some((g) => {
|
|
2058
|
-
const
|
|
2096
|
+
const p = O(g);
|
|
2059
2097
|
for (const b of r.values())
|
|
2060
|
-
if (N(b,
|
|
2098
|
+
if (N(b, p))
|
|
2061
2099
|
return !0;
|
|
2062
2100
|
return !1;
|
|
2063
|
-
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !
|
|
2101
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !be(f.spec));
|
|
2064
2102
|
for (const f of a)
|
|
2065
2103
|
for (const g of f.spec.axesSpec) {
|
|
2066
|
-
const
|
|
2067
|
-
i.set(
|
|
2104
|
+
const p = O(g);
|
|
2105
|
+
i.set(R(p), p);
|
|
2068
2106
|
}
|
|
2069
2107
|
const l = (n.getColumns((f) => f.axesSpec.some((g) => {
|
|
2070
|
-
const
|
|
2108
|
+
const p = O(g);
|
|
2071
2109
|
for (const b of i.values())
|
|
2072
|
-
if (N(b,
|
|
2110
|
+
if (N(b, p))
|
|
2073
2111
|
return !0;
|
|
2074
2112
|
return !1;
|
|
2075
|
-
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) =>
|
|
2113
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => be(f.spec)), u = [...a, ...l], h = Xt(r, u);
|
|
2076
2114
|
if (!h.some(
|
|
2077
2115
|
(f) => f.data instanceof D && !f.data.getIsReadyOrError()
|
|
2078
2116
|
))
|
|
2079
2117
|
return t.createPFrame(h);
|
|
2080
2118
|
}
|
|
2081
|
-
function
|
|
2119
|
+
function Mn({
|
|
2082
2120
|
selection: t,
|
|
2083
|
-
columnId: e =
|
|
2121
|
+
columnId: e = ct(),
|
|
2084
2122
|
label: n = "Selection marker",
|
|
2085
2123
|
domain: r
|
|
2086
2124
|
}) {
|
|
2087
2125
|
if (!(t != null && t.axesSpec.length))
|
|
2088
2126
|
return;
|
|
2089
|
-
const i = t.selectedKeys.filter((s) => s.every((o) => !
|
|
2127
|
+
const i = t.selectedKeys.filter((s) => s.every((o) => !ut(o))).map((s) => ({ key: s, val: 1 }));
|
|
2090
2128
|
if (i.length)
|
|
2091
2129
|
return {
|
|
2092
2130
|
id: e,
|
|
@@ -2104,10 +2142,10 @@ function Jn({
|
|
|
2104
2142
|
data: i
|
|
2105
2143
|
};
|
|
2106
2144
|
}
|
|
2107
|
-
function
|
|
2108
|
-
return t ===
|
|
2145
|
+
function $n(t) {
|
|
2146
|
+
return t === pt ? (console.error("Axis value can never be N/A"), "") : t;
|
|
2109
2147
|
}
|
|
2110
|
-
class
|
|
2148
|
+
class Bn {
|
|
2111
2149
|
constructor(e) {
|
|
2112
2150
|
this.handle = e;
|
|
2113
2151
|
}
|
|
@@ -2121,58 +2159,62 @@ class $n {
|
|
|
2121
2159
|
return await platforma.pFrameDriver.listColumns(this.handle);
|
|
2122
2160
|
}
|
|
2123
2161
|
async calculateTableData(e, n) {
|
|
2124
|
-
|
|
2162
|
+
var r;
|
|
2163
|
+
return (r = cfgRenderCtx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
2164
|
+
...e,
|
|
2165
|
+
filters: ye(e.filters)
|
|
2166
|
+
}), await platforma.pFrameDriver.calculateTableData(this.handle, e, n);
|
|
2125
2167
|
}
|
|
2126
2168
|
async getUniqueValues(e) {
|
|
2127
2169
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2128
2170
|
}
|
|
2129
2171
|
}
|
|
2130
|
-
function
|
|
2131
|
-
return
|
|
2172
|
+
function Zt(t) {
|
|
2173
|
+
return Ke({
|
|
2132
2174
|
__isRef: !0,
|
|
2133
2175
|
blockId: re(t, "blockId"),
|
|
2134
2176
|
name: re(t, "name")
|
|
2135
2177
|
});
|
|
2136
2178
|
}
|
|
2137
|
-
function
|
|
2138
|
-
return
|
|
2139
|
-
ref:
|
|
2179
|
+
function Un(t) {
|
|
2180
|
+
return Ke({
|
|
2181
|
+
ref: Zt(re(t, "ref")),
|
|
2140
2182
|
label: re(t, "label")
|
|
2141
2183
|
});
|
|
2142
2184
|
}
|
|
2143
|
-
const
|
|
2185
|
+
const Wn = {
|
|
2144
2186
|
sdkVersion: z
|
|
2145
2187
|
};
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2188
|
+
function en() {
|
|
2189
|
+
return Ne({ sdkVersion: z });
|
|
2148
2190
|
}
|
|
2149
|
-
function
|
|
2191
|
+
function Gn(t) {
|
|
2150
2192
|
try {
|
|
2151
|
-
return
|
|
2193
|
+
return en();
|
|
2152
2194
|
} catch {
|
|
2153
2195
|
return t;
|
|
2154
2196
|
}
|
|
2155
2197
|
}
|
|
2156
|
-
function
|
|
2198
|
+
function Hn(t) {
|
|
2157
2199
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2158
2200
|
return globalThis.getEnvironmentValue(t);
|
|
2159
2201
|
}
|
|
2160
2202
|
export {
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2203
|
+
ln as Args,
|
|
2204
|
+
Le as BlockModel,
|
|
2205
|
+
Wn as CurrentSdkInfo,
|
|
2164
2206
|
F as FutureRef,
|
|
2165
|
-
|
|
2166
|
-
|
|
2207
|
+
Ht as IS_VIRTUAL_COLUMN,
|
|
2208
|
+
un as It,
|
|
2167
2209
|
Rn as JsRenderInternal,
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2210
|
+
ke as LABEL_ANNOTATION,
|
|
2211
|
+
qt as LINKER_COLUMN_ANNOTATION,
|
|
2212
|
+
cn as MainOutputs,
|
|
2171
2213
|
dt as OutputError,
|
|
2172
|
-
|
|
2173
|
-
|
|
2214
|
+
vt as PAnnotationLabel,
|
|
2215
|
+
St as PAnnotationTrace,
|
|
2174
2216
|
ae as PColumnCollection,
|
|
2175
|
-
|
|
2217
|
+
Bn as PFrameImpl,
|
|
2176
2218
|
B as RT_BINARY_PARTITIONED,
|
|
2177
2219
|
q as RT_BINARY_SUPER_PARTITIONED,
|
|
2178
2220
|
H as RT_JSON_PARTITIONED,
|
|
@@ -2180,75 +2222,75 @@ export {
|
|
|
2180
2222
|
ie as RT_RESOURCE_MAP,
|
|
2181
2223
|
se as RT_RESOURCE_MAP_PARTITIONED,
|
|
2182
2224
|
ee as RenderCtx,
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2225
|
+
Kt as ResultPool,
|
|
2226
|
+
pn as StagingOutputs,
|
|
2227
|
+
wt as Trace,
|
|
2186
2228
|
Ct as TraceEntry,
|
|
2187
2229
|
D as TreeNodeAccessor,
|
|
2188
2230
|
dn as UiState,
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2231
|
+
Mt as allColumnsComputed,
|
|
2232
|
+
vn as and,
|
|
2233
|
+
Tt as convertOrParsePColumnData,
|
|
2234
|
+
Jn as createPFrameForGraphs,
|
|
2235
|
+
jn as createPlDataTableSheet,
|
|
2236
|
+
Vt as createPlDataTableStateV2,
|
|
2237
|
+
Vn as createPlDataTableV2,
|
|
2238
|
+
Mn as createRowSelectionColumn,
|
|
2239
|
+
Me as deriveLabels,
|
|
2240
|
+
pe as downgradeCfgOrLambda,
|
|
2241
|
+
Xt as enrichCompatible,
|
|
2242
|
+
Ln as extractArchiveAndGetURL,
|
|
2243
|
+
Nn as extractConfig,
|
|
2244
|
+
Lt as filterDataInfoEntries,
|
|
2245
|
+
mn as flatten,
|
|
2246
|
+
Un as fromPlOption,
|
|
2247
|
+
Zt as fromPlRef,
|
|
2248
|
+
Jt as getAllLabelColumns,
|
|
2249
|
+
Yt as getAvailableWithLinkersAxes,
|
|
2250
|
+
Pn as getBlobContent,
|
|
2251
|
+
_n as getBlobContentAsJson,
|
|
2252
|
+
xn as getBlobContentAsString,
|
|
2253
|
+
In as getDownloadedBlobContent,
|
|
2254
|
+
Hn as getEnvironmentValue,
|
|
2213
2255
|
X as getFromCfg,
|
|
2214
2256
|
ne as getImmediate,
|
|
2215
|
-
|
|
2257
|
+
Fn as getImportProgress,
|
|
2216
2258
|
re as getJsonField,
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2259
|
+
En as getLastLogs,
|
|
2260
|
+
zt as getLinkerColumnsMap,
|
|
2261
|
+
On as getLogHandle,
|
|
2262
|
+
Fe as getMatchingLabelColumns,
|
|
2263
|
+
Tn as getOnDemandBlobContent,
|
|
2264
|
+
xt as getPartitionKeysList,
|
|
2265
|
+
Gn as getPlatformaOrDefault,
|
|
2266
|
+
kn as getProgressLog,
|
|
2267
|
+
Dn as getProgressLogWithInfo,
|
|
2268
|
+
en as getRawPlatformaInstance,
|
|
2227
2269
|
Cn as getResourceField,
|
|
2228
|
-
|
|
2229
|
-
|
|
2270
|
+
wn as getResourceValueAsJson,
|
|
2271
|
+
It as getUniquePartitionKeys,
|
|
2230
2272
|
fe as ifDef,
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2273
|
+
$t as isColumnHidden,
|
|
2274
|
+
Bt as isColumnOptional,
|
|
2275
|
+
Nt as isConfigLambda,
|
|
2276
|
+
yn as isEmpty,
|
|
2277
|
+
be as isLabelColumn,
|
|
2278
|
+
Gt as isLinkerColumn,
|
|
2279
|
+
an as isolate,
|
|
2280
|
+
fn as makeArray,
|
|
2281
|
+
Ue as makeDefaultPTableParams,
|
|
2282
|
+
Ke as makeObject,
|
|
2283
|
+
gn as mapArrayValues,
|
|
2284
|
+
$n as mapPTableValueToAxisKey,
|
|
2285
|
+
hn as mapRecordValues,
|
|
2286
|
+
An as mapResourceFields,
|
|
2287
|
+
bn as not,
|
|
2288
|
+
Sn as or,
|
|
2247
2289
|
me as parsePColumnData,
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2290
|
+
Kn as parseResourceMap,
|
|
2291
|
+
ft as readOutput,
|
|
2292
|
+
de as uniqueBy,
|
|
2293
|
+
jt as upgradePlDataTableStateV2,
|
|
2294
|
+
on as wrapOutputs
|
|
2253
2295
|
};
|
|
2254
2296
|
//# sourceMappingURL=index.mjs.map
|