@platforma-sdk/model 1.37.14 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PlDataTable.d.ts +50 -69
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +562 -524
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +1 -0
- 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/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/components/PFrameForGraphs.ts +4 -4
- package/src/components/PlDataTable.ts +158 -171
- package/src/render/api.ts +17 -4
- package/src/render/internal.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as De, mapPObjectData as
|
|
1
|
+
var qe = Object.defineProperty;
|
|
2
|
+
var ze = (t, e, n) => e in t ? qe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var F = (t, e, n) => ze(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as De, mapPObjectData as ve, isDataInfoEntries as Fe, isDataInfo as we, dataInfoToEntries as Ye, selectorsToPredicate as X, resolveAnchors as Se, deriveNativeId as Xe, isPColumnSpec as ne, isPartitionedDataInfoEntries as Qe, getAxisId as O, entriesToDataInfo as Ze, canonicalizeAxisId as et, withEnrichments as Ce, AnchoredIdDeriver as Ae, isPlRef as tt, mapValueInVOE as nt, ensurePColumn as rt, extractAllColumns as it, mapPTableDef as st, mapDataInfo as ot, matchAxisId as K, getColumnIdAndSpec as Pe, canonicalizeJson as R, parseJson as xe, isPTableAbsent as at, uniquePlId as lt, PTableNA as ut } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
6
|
+
import Oe from "canonicalize";
|
|
7
7
|
import { z as U } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class ct extends Error {
|
|
10
10
|
constructor(e, n) {
|
|
11
11
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (!t.ok) throw new
|
|
14
|
+
function dt(t) {
|
|
15
|
+
if (!t.ok) throw new ct(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function rn(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return dt(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -28,17 +28,17 @@ function P(t) {
|
|
|
28
28
|
function Q(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function sn(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const on = Q("$args"), an = Q("$it"), ln = Q("$prod"), un = Q("$staging"), cn = Q("$ui");
|
|
38
38
|
function re(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Re(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 Fe(t) {
|
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function dn(...t) {
|
|
50
50
|
const e = [];
|
|
51
51
|
for (const n of t) e.push(P(n));
|
|
52
52
|
return {
|
|
@@ -61,7 +61,7 @@ function ie(t, e) {
|
|
|
61
61
|
field: P(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function pn(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function dn(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function fn(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,32 +77,32 @@ function pn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function hn(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function gn(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function mn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function yn(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 bn(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
@@ -116,7 +116,7 @@ function vn(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 bn() {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Sn(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 Cn(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 An(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 Pn() {
|
|
150
150
|
return function(t, e) {
|
|
151
151
|
return {
|
|
152
152
|
type: "GetBlobContentAsJson",
|
|
@@ -155,13 +155,13 @@ function Cn() {
|
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function xn(t) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetDownloadedBlobContent",
|
|
161
161
|
source: P(t)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function In(t) {
|
|
165
165
|
return {
|
|
166
166
|
type: "GetOnDemandBlobContent",
|
|
167
167
|
source: P(t)
|
|
@@ -174,81 +174,81 @@ function _n(t, e) {
|
|
|
174
174
|
source: P(t)
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Tn(t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetImportProgress",
|
|
180
180
|
source: P(t)
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Ln(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 En(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 kn(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 Dn(t) {
|
|
205
205
|
return {
|
|
206
206
|
type: "GetLogHandle",
|
|
207
207
|
source: P(t)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function pt() {
|
|
211
211
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Ve(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 ft() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function v() {
|
|
223
223
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
224
224
|
throw new Error("Not in config rendering context");
|
|
225
225
|
}
|
|
226
226
|
function H(t, e) {
|
|
227
|
-
const n =
|
|
227
|
+
const n = ft();
|
|
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
|
-
const
|
|
233
|
-
function
|
|
234
|
-
t in
|
|
235
|
-
for (const r of
|
|
232
|
+
const ce = /* @__PURE__ */ new Map();
|
|
233
|
+
function ht(t, e) {
|
|
234
|
+
t in v().callbackRegistry || (v().callbackRegistry[t] = (n) => {
|
|
235
|
+
for (const r of ce.get(t))
|
|
236
236
|
r(n);
|
|
237
|
-
},
|
|
237
|
+
}, ce.set(t, [])), ce.get(t).push(e);
|
|
238
238
|
}
|
|
239
|
-
class
|
|
239
|
+
class L {
|
|
240
240
|
constructor(e, n = (r) => r) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
this.handle = e, this.postProcess = n,
|
|
241
|
+
F(this, "isResolved", !1);
|
|
242
|
+
F(this, "resolvedValue");
|
|
243
|
+
this.handle = e, this.postProcess = n, ht(e, (r) => {
|
|
244
244
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
map(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new L(this.handle, (n) => e(this.postProcess(n)));
|
|
249
249
|
}
|
|
250
250
|
mapDefined(e) {
|
|
251
|
-
return new
|
|
251
|
+
return new L(this.handle, (n) => {
|
|
252
252
|
const r = this.postProcess(n);
|
|
253
253
|
return r ? e(r) : void 0;
|
|
254
254
|
});
|
|
@@ -257,10 +257,10 @@ class I {
|
|
|
257
257
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function he(t, e) {
|
|
261
261
|
return t === void 0 ? void 0 : e(t);
|
|
262
262
|
}
|
|
263
|
-
class
|
|
263
|
+
class D {
|
|
264
264
|
constructor(e, n) {
|
|
265
265
|
this.handle = e, this.resolvePath = n;
|
|
266
266
|
}
|
|
@@ -299,47 +299,47 @@ class E {
|
|
|
299
299
|
...this.resolvePath,
|
|
300
300
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
301
301
|
];
|
|
302
|
-
return
|
|
303
|
-
|
|
304
|
-
(i) => new
|
|
302
|
+
return he(
|
|
303
|
+
v().resolveWithCommon(this.handle, e, ...n),
|
|
304
|
+
(i) => new D(i, r)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
get resourceType() {
|
|
308
|
-
return
|
|
308
|
+
return v().getResourceType(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getInputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return v().getInputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getOutputsLocked() {
|
|
314
|
-
return
|
|
314
|
+
return v().getOutputsLocked(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsReadyOrError() {
|
|
317
|
-
return
|
|
317
|
+
return v().getIsReadyOrError(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getIsFinal() {
|
|
320
|
-
return
|
|
320
|
+
return v().getIsFinal(this.handle);
|
|
321
321
|
}
|
|
322
322
|
getError() {
|
|
323
323
|
const e = [...this.resolvePath, "error"];
|
|
324
|
-
return
|
|
325
|
-
|
|
326
|
-
(n) => new
|
|
324
|
+
return he(
|
|
325
|
+
v().getError(this.handle),
|
|
326
|
+
(n) => new D(n, e)
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
listInputFields() {
|
|
330
|
-
return
|
|
330
|
+
return v().listInputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listOutputFields() {
|
|
333
|
-
return
|
|
333
|
+
return v().listOutputFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
listDynamicFields() {
|
|
336
|
-
return
|
|
336
|
+
return v().listDynamicFields(this.handle);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueBase64(e) {
|
|
339
|
-
return
|
|
339
|
+
return v().getKeyValueBase64(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsString(e) {
|
|
342
|
-
return
|
|
342
|
+
return v().getKeyValueAsString(this.handle, e);
|
|
343
343
|
}
|
|
344
344
|
getKeyValueAsJson(e) {
|
|
345
345
|
const n = this.getKeyValueAsString(e);
|
|
@@ -347,10 +347,10 @@ class E {
|
|
|
347
347
|
return JSON.parse(n);
|
|
348
348
|
}
|
|
349
349
|
getDataBase64() {
|
|
350
|
-
return
|
|
350
|
+
return v().getDataBase64(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsString() {
|
|
353
|
-
return
|
|
353
|
+
return v().getDataAsString(this.handle);
|
|
354
354
|
}
|
|
355
355
|
getDataAsJson() {
|
|
356
356
|
const e = this.getDataAsString();
|
|
@@ -371,7 +371,7 @@ class E {
|
|
|
371
371
|
*
|
|
372
372
|
*/
|
|
373
373
|
parsePObjectCollection(e = !1, n = "") {
|
|
374
|
-
const r =
|
|
374
|
+
const r = v().parsePObjectCollection(
|
|
375
375
|
this.handle,
|
|
376
376
|
e,
|
|
377
377
|
n,
|
|
@@ -381,19 +381,19 @@ class E {
|
|
|
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
|
}
|
|
388
388
|
getFileContentAsBase64(e) {
|
|
389
|
-
return new
|
|
389
|
+
return new L(v().getBlobContentAsBase64(this.handle, e));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsString(e) {
|
|
392
|
-
return new
|
|
392
|
+
return new L(v().getBlobContentAsString(this.handle, e));
|
|
393
393
|
}
|
|
394
394
|
getFileContentAsJson(e) {
|
|
395
|
-
return new
|
|
396
|
-
|
|
395
|
+
return new L(
|
|
396
|
+
v().getBlobContentAsString(this.handle, e)
|
|
397
397
|
).mapDefined((n) => JSON.parse(n));
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
@@ -412,7 +412,7 @@ class E {
|
|
|
412
412
|
* @returns downloaded file handle
|
|
413
413
|
*/
|
|
414
414
|
getFileHandle() {
|
|
415
|
-
return new
|
|
415
|
+
return new L(v().getDownloadedBlobContentHandle(this.handle));
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @deprecated use getFileHandle
|
|
@@ -424,7 +424,7 @@ class E {
|
|
|
424
424
|
* @returns downloaded file handle
|
|
425
425
|
*/
|
|
426
426
|
getRemoteFileHandle() {
|
|
427
|
-
return new
|
|
427
|
+
return new L(v().getOnDemandBlobContentHandle(this.handle));
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
430
|
* @deprecated use getRemoteFileHandle
|
|
@@ -436,22 +436,22 @@ class E {
|
|
|
436
436
|
* @returns the url to the extracted folder
|
|
437
437
|
*/
|
|
438
438
|
extractArchiveAndGetURL(e) {
|
|
439
|
-
return new
|
|
439
|
+
return new L(v().extractArchiveAndGetURL(this.handle, e));
|
|
440
440
|
}
|
|
441
441
|
getImportProgress() {
|
|
442
|
-
return new
|
|
442
|
+
return new L(v().getImportProgress(this.handle));
|
|
443
443
|
}
|
|
444
444
|
getLastLogs(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new L(v().getLastLogs(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLog(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new L(v().getProgressLog(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getProgressLogWithInfo(e) {
|
|
451
|
-
return new
|
|
451
|
+
return new L(v().getProgressLogWithInfo(this.handle, e));
|
|
452
452
|
}
|
|
453
453
|
getLogHandle() {
|
|
454
|
-
return new
|
|
454
|
+
return new L(v().getLogHandle(this.handle));
|
|
455
455
|
}
|
|
456
456
|
allFieldsResolved(e = "Input") {
|
|
457
457
|
switch (e) {
|
|
@@ -477,116 +477,117 @@ class E {
|
|
|
477
477
|
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
478
478
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
479
479
|
);
|
|
480
|
-
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u,
|
|
480
|
+
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, d]) => o(u, d));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const Ke = "staging", je = "main", gt = {
|
|
484
484
|
explicitColumnsSupport: !0,
|
|
485
485
|
inlineColumnsSupport: !0,
|
|
486
|
-
activeArgs: !0
|
|
486
|
+
activeArgs: !0,
|
|
487
|
+
pTablePartitionFiltersSupport: !0
|
|
487
488
|
};
|
|
488
489
|
function Ne(t) {
|
|
489
490
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
490
491
|
}
|
|
491
|
-
function
|
|
492
|
+
function ge(t, e, n) {
|
|
492
493
|
if (e.has(n)) return;
|
|
493
494
|
if (e.add(n), typeof n === "object")
|
|
494
495
|
if (Ne(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
495
496
|
else if (Array.isArray(n))
|
|
496
|
-
for (const i of n)
|
|
497
|
+
for (const i of n) ge(t, e, i);
|
|
497
498
|
else
|
|
498
499
|
for (const [, i] of Object.entries(n))
|
|
499
|
-
i !== n &&
|
|
500
|
+
i !== n && ge(t, e, i);
|
|
500
501
|
}
|
|
501
|
-
function
|
|
502
|
+
function mt(t) {
|
|
502
503
|
const e = /* @__PURE__ */ new Set();
|
|
503
|
-
return
|
|
504
|
+
return ge(e, /* @__PURE__ */ new Set(), t), e;
|
|
504
505
|
}
|
|
505
|
-
const
|
|
506
|
+
const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
506
507
|
__proto__: null,
|
|
507
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
508
|
+
GlobalCfgRenderCtxFeatureFlags: gt,
|
|
508
509
|
MainAccessorName: je,
|
|
509
|
-
StagingAccessorName:
|
|
510
|
-
getAllFutureAwaits:
|
|
510
|
+
StagingAccessorName: Ke,
|
|
511
|
+
getAllFutureAwaits: mt,
|
|
511
512
|
isFutureAwait: Ne
|
|
512
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
513
|
+
}, Symbol.toStringTag, { value: "Module" })), yt = "pl7.app/label", bt = "pl7.app/trace", vt = U.object({
|
|
513
514
|
type: U.string(),
|
|
514
515
|
importance: U.number().optional(),
|
|
515
516
|
id: U.string().optional(),
|
|
516
517
|
label: U.string()
|
|
517
|
-
}),
|
|
518
|
+
}), wt = U.array(vt), St = 1e-3, Ct = "__LABEL__", Ie = "__LABEL__@1";
|
|
518
519
|
function $e(t, e, n = {}) {
|
|
519
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((p) => {
|
|
520
|
-
var
|
|
521
|
-
const
|
|
522
|
-
let f,
|
|
523
|
-
"spec" in
|
|
524
|
-
const
|
|
525
|
-
...
|
|
526
|
-
...
|
|
527
|
-
...
|
|
521
|
+
var c, m;
|
|
522
|
+
const b = e(p);
|
|
523
|
+
let f, y, w;
|
|
524
|
+
"spec" in b && typeof b.spec == "object" ? (f = b.spec, y = b.prefixTrace, w = b.suffixTrace) : f = b;
|
|
525
|
+
const E = (c = f.annotations) == null ? void 0 : c[yt], x = (m = f.annotations) == null ? void 0 : m[bt], C = (x ? wt.safeParse(JSON.parse(x)).data : void 0) ?? [], A = [
|
|
526
|
+
...y ?? [],
|
|
527
|
+
...C,
|
|
528
|
+
...w ?? []
|
|
528
529
|
];
|
|
529
|
-
if (
|
|
530
|
-
const
|
|
531
|
-
n.addLabelAsSuffix ?
|
|
530
|
+
if (E !== void 0) {
|
|
531
|
+
const _ = { label: E, type: Ct, importance: -2 };
|
|
532
|
+
n.addLabelAsSuffix ? A.push(_) : A.splice(0, 0, _);
|
|
532
533
|
}
|
|
533
|
-
const
|
|
534
|
-
for (let
|
|
535
|
-
const { type: W } =
|
|
536
|
-
|
|
537
|
-
const
|
|
538
|
-
s.set(
|
|
539
|
-
|
|
534
|
+
const S = [], I = /* @__PURE__ */ new Map();
|
|
535
|
+
for (let _ = A.length - 1; _ >= 0; --_) {
|
|
536
|
+
const { type: W } = A[_], j = A[_].importance ?? 0, $ = (I.get(W) ?? 0) + 1;
|
|
537
|
+
I.set(W, $);
|
|
538
|
+
const V = `${W}@${$}`;
|
|
539
|
+
s.set(V, (s.get(V) ?? 0) + 1), r.set(
|
|
540
|
+
V,
|
|
540
541
|
Math.max(
|
|
541
|
-
r.get(
|
|
542
|
-
j - (
|
|
542
|
+
r.get(V) ?? Number.NEGATIVE_INFINITY,
|
|
543
|
+
j - (A.length - _) * St
|
|
543
544
|
)
|
|
544
|
-
),
|
|
545
|
+
), S.push({ ...A[_], fullType: V, occurrenceIndex: $ });
|
|
545
546
|
}
|
|
546
|
-
return
|
|
547
|
+
return S.reverse(), {
|
|
547
548
|
value: p,
|
|
548
549
|
spec: f,
|
|
549
|
-
label:
|
|
550
|
-
fullTrace:
|
|
550
|
+
label: E,
|
|
551
|
+
fullTrace: S
|
|
551
552
|
};
|
|
552
553
|
}), a = [], l = [], u = [...r];
|
|
553
|
-
u.sort(([, p], [,
|
|
554
|
+
u.sort(([, p], [, b]) => b - p);
|
|
554
555
|
for (const [p] of u)
|
|
555
556
|
p.endsWith("@1") || s.get(p) === t.length ? a.push(p) : l.push(p);
|
|
556
|
-
const
|
|
557
|
+
const d = (p, b = !1) => {
|
|
557
558
|
const f = [];
|
|
558
|
-
for (let
|
|
559
|
-
const
|
|
560
|
-
if (
|
|
561
|
-
if (
|
|
559
|
+
for (let y = 0; y < o.length; y++) {
|
|
560
|
+
const w = o[y], E = w.fullTrace.filter((A) => p.has(A.fullType) || i && i.has(A.type));
|
|
561
|
+
if (E.length === 0)
|
|
562
|
+
if (b)
|
|
562
563
|
f.push({
|
|
563
564
|
label: "Unlabeled",
|
|
564
|
-
value:
|
|
565
|
+
value: w.value
|
|
565
566
|
});
|
|
566
567
|
else return;
|
|
567
|
-
const
|
|
568
|
+
const x = E.map((A) => A.label), C = n.separator ?? " / ";
|
|
568
569
|
f.push({
|
|
569
|
-
label:
|
|
570
|
-
value:
|
|
570
|
+
label: x.join(C),
|
|
571
|
+
value: w.value
|
|
571
572
|
});
|
|
572
573
|
}
|
|
573
574
|
return f;
|
|
574
575
|
};
|
|
575
576
|
if (a.length === 0) {
|
|
576
577
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
577
|
-
return
|
|
578
|
+
return d(new Set(Ie), !0);
|
|
578
579
|
}
|
|
579
|
-
let
|
|
580
|
-
for (;
|
|
580
|
+
let h = 0, g = -1;
|
|
581
|
+
for (; h < a.length; ) {
|
|
581
582
|
const p = /* @__PURE__ */ new Set();
|
|
582
|
-
n.includeNativeLabel && p.add(
|
|
583
|
-
for (let f = 0; f <
|
|
583
|
+
n.includeNativeLabel && p.add(Ie);
|
|
584
|
+
for (let f = 0; f < h; ++f) p.add(a[f]);
|
|
584
585
|
g >= 0 && p.add(a[g]);
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
587
|
-
g++, g >= a.length && (
|
|
586
|
+
const b = d(p);
|
|
587
|
+
if (b !== void 0 && new Set(b.map((f) => f.label)).size === t.length) return b;
|
|
588
|
+
g++, g >= a.length && (h++, g = h);
|
|
588
589
|
}
|
|
589
|
-
return
|
|
590
|
+
return d(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
590
591
|
}
|
|
591
592
|
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Je = Z + "Partitioned/", ae = Je + "JsonPartitioned", z = Je + "BinaryPartitioned";
|
|
592
593
|
function Me(t, e, n, r = [], i) {
|
|
@@ -626,14 +627,14 @@ function On(t, e, n = !1) {
|
|
|
626
627
|
const r = [];
|
|
627
628
|
return { isComplete: Me(t, e, r, [], n), data: r };
|
|
628
629
|
}
|
|
629
|
-
const
|
|
630
|
+
const me = (t) => {
|
|
630
631
|
if (t.endsWith(".index"))
|
|
631
632
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
632
633
|
if (t.endsWith(".values"))
|
|
633
634
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
634
635
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
635
636
|
};
|
|
636
|
-
function
|
|
637
|
+
function At(t) {
|
|
637
638
|
if (!t) return;
|
|
638
639
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
639
640
|
let i = 0;
|
|
@@ -658,7 +659,7 @@ function St(t) {
|
|
|
658
659
|
case q:
|
|
659
660
|
case B:
|
|
660
661
|
for (let s of t.listInputFields()) {
|
|
661
|
-
e === B && (s =
|
|
662
|
+
e === B && (s = me(s).baseKey);
|
|
662
663
|
const o = [...JSON.parse(s)];
|
|
663
664
|
r.push(o);
|
|
664
665
|
}
|
|
@@ -670,7 +671,7 @@ function St(t) {
|
|
|
670
671
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
671
672
|
if (a !== void 0)
|
|
672
673
|
for (let l of a.listInputFields()) {
|
|
673
|
-
e === z && (l =
|
|
674
|
+
e === z && (l = me(l).baseKey);
|
|
674
675
|
const u = [...o, ...JSON.parse(l)];
|
|
675
676
|
r.push(u);
|
|
676
677
|
}
|
|
@@ -679,7 +680,7 @@ function St(t) {
|
|
|
679
680
|
}
|
|
680
681
|
return { data: r, keyLength: i };
|
|
681
682
|
}
|
|
682
|
-
function
|
|
683
|
+
function Pt(t) {
|
|
683
684
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
684
685
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
685
686
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -698,11 +699,11 @@ function _t(t) {
|
|
|
698
699
|
}
|
|
699
700
|
return r.map((i) => Array.from(i.values()));
|
|
700
701
|
}
|
|
701
|
-
function
|
|
702
|
+
function xt(t) {
|
|
702
703
|
if (t === void 0) return;
|
|
703
|
-
if (
|
|
704
|
-
return
|
|
705
|
-
const e =
|
|
704
|
+
if (Fe(t))
|
|
705
|
+
return Pt(t);
|
|
706
|
+
const e = At(t);
|
|
706
707
|
if (!e) return;
|
|
707
708
|
const { data: n, keyLength: r } = e, i = [];
|
|
708
709
|
for (let s = 0; s < r; ++s)
|
|
@@ -715,7 +716,7 @@ function It(t) {
|
|
|
715
716
|
}
|
|
716
717
|
return i.map((s) => Array.from(s.values()));
|
|
717
718
|
}
|
|
718
|
-
function
|
|
719
|
+
function ye(t, e = []) {
|
|
719
720
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
720
721
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
721
722
|
if (e.length > 0 && (n === ae || n === z))
|
|
@@ -745,7 +746,7 @@ function ve(t, e = []) {
|
|
|
745
746
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
746
747
|
const i = [], s = /* @__PURE__ */ new Map();
|
|
747
748
|
for (const o of t.listInputFields()) {
|
|
748
|
-
const a =
|
|
749
|
+
const a = me(o), l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
749
750
|
if (l === void 0) return;
|
|
750
751
|
let u = s.get(a.baseKey);
|
|
751
752
|
u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
|
|
@@ -776,7 +777,7 @@ function ve(t, e = []) {
|
|
|
776
777
|
if (a === void 0) return;
|
|
777
778
|
if (a.resourceType.name !== q)
|
|
778
779
|
throw new Error(`Expected ${q} inside ${n}, but got ${a.resourceType.name}`);
|
|
779
|
-
const l =
|
|
780
|
+
const l = ye(a, JSON.parse(o));
|
|
780
781
|
if (l === void 0) return;
|
|
781
782
|
if (l.type !== "JsonPartitioned")
|
|
782
783
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -797,7 +798,7 @@ function ve(t, e = []) {
|
|
|
797
798
|
if (a === void 0) return;
|
|
798
799
|
if (a.resourceType.name !== B)
|
|
799
800
|
throw new Error(`Expected ${B} inside ${n}, but got ${a.resourceType.name}`);
|
|
800
|
-
const l =
|
|
801
|
+
const l = ye(a, JSON.parse(o));
|
|
801
802
|
if (l === void 0) return;
|
|
802
803
|
if (l.type !== "BinaryPartitioned")
|
|
803
804
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -813,15 +814,15 @@ function ve(t, e = []) {
|
|
|
813
814
|
throw new Error(`Unknown resource type: ${n}`);
|
|
814
815
|
}
|
|
815
816
|
}
|
|
816
|
-
function
|
|
817
|
+
function It(t) {
|
|
817
818
|
if (t !== void 0) {
|
|
818
|
-
if (
|
|
819
|
-
if (
|
|
820
|
-
if (t instanceof
|
|
819
|
+
if (Fe(t)) return t;
|
|
820
|
+
if (we(t)) return Ye(t);
|
|
821
|
+
if (t instanceof D) return ye(t);
|
|
821
822
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
822
823
|
}
|
|
823
824
|
}
|
|
824
|
-
function
|
|
825
|
+
function _t(t, e) {
|
|
825
826
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
826
827
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
827
828
|
const { partitionKeyLength: s } = t;
|
|
@@ -881,13 +882,13 @@ function Lt(t, e) {
|
|
|
881
882
|
}
|
|
882
883
|
}
|
|
883
884
|
}
|
|
884
|
-
function
|
|
885
|
+
function Tt(t) {
|
|
885
886
|
if (!Array.isArray(t)) return !1;
|
|
886
887
|
if (t.length === 0) return !0;
|
|
887
888
|
const e = t[0];
|
|
888
889
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
889
890
|
}
|
|
890
|
-
class
|
|
891
|
+
class Lt {
|
|
891
892
|
constructor(e) {
|
|
892
893
|
this.columns = e;
|
|
893
894
|
}
|
|
@@ -896,25 +897,25 @@ class kt {
|
|
|
896
897
|
return this.columns.filter((r) => n(r.spec));
|
|
897
898
|
}
|
|
898
899
|
}
|
|
899
|
-
function
|
|
900
|
+
function Et(t) {
|
|
900
901
|
if (t)
|
|
901
902
|
return t.map((e) => ({
|
|
902
|
-
type: `split:${
|
|
903
|
+
type: `split:${et(e.axisId)}`,
|
|
903
904
|
label: e.label,
|
|
904
905
|
importance: 1e6
|
|
905
906
|
// High importance for split filters in labels
|
|
906
907
|
}));
|
|
907
908
|
}
|
|
908
|
-
function
|
|
909
|
+
function kt(t) {
|
|
909
910
|
if (t)
|
|
910
911
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
911
912
|
}
|
|
912
|
-
function
|
|
913
|
+
function Dt(t, e) {
|
|
913
914
|
if (!e || e.length === 0) return t;
|
|
914
915
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
915
|
-
return
|
|
916
|
+
return Oe({ id: t, axisFilters: n });
|
|
916
917
|
}
|
|
917
|
-
function
|
|
918
|
+
function _e(t) {
|
|
918
919
|
if (!t || typeof t != "object") return !1;
|
|
919
920
|
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);
|
|
920
921
|
return !!e.domainAnchor || n || r;
|
|
@@ -929,9 +930,9 @@ function Ft(t) {
|
|
|
929
930
|
}
|
|
930
931
|
class le {
|
|
931
932
|
constructor() {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
933
|
+
F(this, "defaultProviderStore", []);
|
|
934
|
+
F(this, "providers", [new Lt(this.defaultProviderStore)]);
|
|
935
|
+
F(this, "axisLabelProviders", []);
|
|
935
936
|
}
|
|
936
937
|
addColumnProvider(e) {
|
|
937
938
|
return this.providers.push(e), this;
|
|
@@ -959,129 +960,129 @@ class le {
|
|
|
959
960
|
};
|
|
960
961
|
let u = () => !1;
|
|
961
962
|
if (a) {
|
|
962
|
-
const f = (Array.isArray(a) ? a : [a]).map((
|
|
963
|
-
if (
|
|
963
|
+
const f = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
964
|
+
if (_e(y)) {
|
|
964
965
|
if (!r)
|
|
965
966
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
966
|
-
return X(
|
|
967
|
+
return X(Se(r.anchors, y, n));
|
|
967
968
|
} else
|
|
968
|
-
return X(
|
|
969
|
+
return X(y);
|
|
969
970
|
});
|
|
970
|
-
u = (
|
|
971
|
+
u = (y) => f.some((w) => w(y));
|
|
971
972
|
}
|
|
972
|
-
const
|
|
973
|
-
for (const f of
|
|
974
|
-
const
|
|
975
|
-
let
|
|
976
|
-
if (
|
|
973
|
+
const d = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h = [], g = /* @__PURE__ */ new Set();
|
|
974
|
+
for (const f of d) {
|
|
975
|
+
const y = _e(f);
|
|
976
|
+
let w;
|
|
977
|
+
if (y) {
|
|
977
978
|
if (!r)
|
|
978
979
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
979
|
-
|
|
980
|
+
w = Se(r.anchors, f, n);
|
|
980
981
|
} else
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
for (const
|
|
984
|
-
const
|
|
985
|
-
for (const
|
|
986
|
-
if (u(
|
|
987
|
-
if (
|
|
988
|
-
throw new Error(`Duplicate column id ${
|
|
989
|
-
const
|
|
990
|
-
g.has(
|
|
982
|
+
w = f;
|
|
983
|
+
const E = /* @__PURE__ */ new Set(), x = [];
|
|
984
|
+
for (const S of this.providers) {
|
|
985
|
+
const I = S.selectColumns(w);
|
|
986
|
+
for (const c of I) {
|
|
987
|
+
if (u(c.spec)) continue;
|
|
988
|
+
if (E.has(c.id))
|
|
989
|
+
throw new Error(`Duplicate column id ${c.id} in provider ${S.constructor.name}`);
|
|
990
|
+
const m = Xe(c.spec);
|
|
991
|
+
g.has(m) || (E.add(c.id), g.add(m), x.push(c));
|
|
991
992
|
}
|
|
992
993
|
}
|
|
993
|
-
if (
|
|
994
|
-
const
|
|
995
|
-
for (const
|
|
996
|
-
if (!ne(
|
|
997
|
-
const
|
|
998
|
-
if (
|
|
999
|
-
if (
|
|
1000
|
-
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${
|
|
1001
|
-
const
|
|
1002
|
-
if (!
|
|
994
|
+
if (x.length === 0) continue;
|
|
995
|
+
const C = Ft(f), A = C.length > 0;
|
|
996
|
+
for (const S of x) {
|
|
997
|
+
if (!ne(S.spec)) continue;
|
|
998
|
+
const I = S.spec;
|
|
999
|
+
if (A) {
|
|
1000
|
+
if (Tt(S.data))
|
|
1001
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${S.id}`);
|
|
1002
|
+
const c = It(S.data);
|
|
1003
|
+
if (!c) {
|
|
1003
1004
|
if (s) continue;
|
|
1004
1005
|
return;
|
|
1005
1006
|
}
|
|
1006
|
-
if (!
|
|
1007
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
1008
|
-
const
|
|
1009
|
-
if (
|
|
1010
|
-
throw new Error(`Not enough partition keys (${
|
|
1011
|
-
const W =
|
|
1012
|
-
if (G >=
|
|
1013
|
-
if (j.push([...
|
|
1007
|
+
if (!Qe(c))
|
|
1008
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${S.id}`);
|
|
1009
|
+
const m = xt(c), _ = C[C.length - 1];
|
|
1010
|
+
if (_ >= c.partitionKeyLength)
|
|
1011
|
+
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${_}) in column ${I.name}`);
|
|
1012
|
+
const W = C.map((T) => this.findLabels(O(I.axesSpec[T]))), j = [], $ = (T, G) => {
|
|
1013
|
+
if (G >= C.length) {
|
|
1014
|
+
if (j.push([...T]), j.length > 1e4)
|
|
1014
1015
|
throw new Error("Too many key combinations, aborting.");
|
|
1015
1016
|
return;
|
|
1016
1017
|
}
|
|
1017
|
-
const N =
|
|
1018
|
-
if (N >=
|
|
1019
|
-
throw new Error(`Axis index ${N} out of bounds for unique keys array (length ${
|
|
1020
|
-
const J =
|
|
1018
|
+
const N = C[G];
|
|
1019
|
+
if (N >= m.length)
|
|
1020
|
+
throw new Error(`Axis index ${N} out of bounds for unique keys array (length ${m.length}) during split key generation for column ${S.id}`);
|
|
1021
|
+
const J = m[N];
|
|
1021
1022
|
if (!J || J.length === 0) {
|
|
1022
1023
|
j.length = 0;
|
|
1023
1024
|
return;
|
|
1024
1025
|
}
|
|
1025
1026
|
for (const ee of J)
|
|
1026
|
-
|
|
1027
|
+
T.push(ee), $(T, G + 1), T.pop();
|
|
1027
1028
|
};
|
|
1028
1029
|
if ($([], 0), j.length === 0)
|
|
1029
1030
|
continue;
|
|
1030
|
-
const
|
|
1031
|
-
for (let
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1034
|
-
for (const
|
|
1035
|
-
const G =
|
|
1036
|
-
const ee =
|
|
1037
|
-
return { axisIdx: ee, axisId:
|
|
1031
|
+
const V = [...I.axesSpec], Be = C.map((T) => T);
|
|
1032
|
+
for (let T = C.length - 1; T >= 0; T--)
|
|
1033
|
+
V.splice(C[T], 1);
|
|
1034
|
+
const We = { ...I, axesSpec: V };
|
|
1035
|
+
for (const T of j) {
|
|
1036
|
+
const G = T.map((N, J) => {
|
|
1037
|
+
const ee = Be[J], Ge = O(I.axesSpec[ee]), ue = W[J], He = (ue == null ? void 0 : ue[N]) ?? String(N);
|
|
1038
|
+
return { axisIdx: ee, axisId: Ge, value: N, label: He };
|
|
1038
1039
|
});
|
|
1039
|
-
|
|
1040
|
+
h.push({
|
|
1040
1041
|
type: "split",
|
|
1041
|
-
originalColumn:
|
|
1042
|
-
spec:
|
|
1043
|
-
adjustedSpec:
|
|
1044
|
-
dataEntries:
|
|
1042
|
+
originalColumn: S,
|
|
1043
|
+
spec: I,
|
|
1044
|
+
adjustedSpec: We,
|
|
1045
|
+
dataEntries: c,
|
|
1045
1046
|
axisFilters: G
|
|
1046
1047
|
});
|
|
1047
1048
|
}
|
|
1048
1049
|
} else
|
|
1049
|
-
|
|
1050
|
+
h.push({
|
|
1050
1051
|
type: "direct",
|
|
1051
|
-
originalColumn:
|
|
1052
|
-
spec:
|
|
1053
|
-
adjustedSpec:
|
|
1052
|
+
originalColumn: S,
|
|
1053
|
+
spec: I,
|
|
1054
|
+
adjustedSpec: I
|
|
1054
1055
|
});
|
|
1055
1056
|
}
|
|
1056
1057
|
}
|
|
1057
|
-
if (
|
|
1058
|
+
if (h.length === 0) return [];
|
|
1058
1059
|
const p = $e(
|
|
1059
|
-
|
|
1060
|
+
h,
|
|
1060
1061
|
(f) => ({
|
|
1061
1062
|
spec: f.spec,
|
|
1062
|
-
suffixTrace: f.type === "split" ?
|
|
1063
|
+
suffixTrace: f.type === "split" ? Et(f.axisFilters) : void 0
|
|
1063
1064
|
}),
|
|
1064
1065
|
l
|
|
1065
|
-
),
|
|
1066
|
-
for (const { value: f, label:
|
|
1067
|
-
const { originalColumn:
|
|
1068
|
-
let
|
|
1069
|
-
r ?
|
|
1070
|
-
let
|
|
1071
|
-
o && (
|
|
1072
|
-
...
|
|
1066
|
+
), b = [];
|
|
1067
|
+
for (const { value: f, label: y } of p) {
|
|
1068
|
+
const { originalColumn: w, spec: E } = f, x = f.type === "split" ? f.axisFilters : void 0, C = kt(x);
|
|
1069
|
+
let A;
|
|
1070
|
+
r ? A = r.deriveS(E, C) : A = Dt(w.id, C);
|
|
1071
|
+
let S = { ...f.adjustedSpec };
|
|
1072
|
+
o && (S = {
|
|
1073
|
+
...S,
|
|
1073
1074
|
annotations: {
|
|
1074
|
-
...
|
|
1075
|
-
"pl7.app/label":
|
|
1075
|
+
...S.annotations ?? {},
|
|
1076
|
+
"pl7.app/label": y
|
|
1076
1077
|
}
|
|
1077
|
-
}),
|
|
1078
|
-
id:
|
|
1079
|
-
spec:
|
|
1080
|
-
data: () => f.type === "split" ?
|
|
1081
|
-
label:
|
|
1078
|
+
}), b.push({
|
|
1079
|
+
id: A,
|
|
1080
|
+
spec: S,
|
|
1081
|
+
data: () => f.type === "split" ? Ze(_t(f.dataEntries, C)) : f.originalColumn.data,
|
|
1082
|
+
label: y
|
|
1082
1083
|
});
|
|
1083
1084
|
}
|
|
1084
|
-
return
|
|
1085
|
+
return b;
|
|
1085
1086
|
}
|
|
1086
1087
|
getColumns(e, n) {
|
|
1087
1088
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1106,19 +1107,19 @@ class le {
|
|
|
1106
1107
|
return i;
|
|
1107
1108
|
}
|
|
1108
1109
|
}
|
|
1109
|
-
function
|
|
1110
|
+
function de(t, e) {
|
|
1110
1111
|
if (t === void 0) return e === void 0;
|
|
1111
1112
|
if (e === void 0) return !0;
|
|
1112
1113
|
for (const n in e)
|
|
1113
1114
|
if (t[n] !== e[n]) return !1;
|
|
1114
1115
|
return !0;
|
|
1115
1116
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return
|
|
1117
|
+
function Te(t) {
|
|
1118
|
+
return ve(t, (e) => e instanceof D ? e.handle : we(e) ? ot(e, (n) => n.handle) : e);
|
|
1118
1119
|
}
|
|
1119
|
-
class
|
|
1120
|
+
class Ot {
|
|
1120
1121
|
constructor() {
|
|
1121
|
-
|
|
1122
|
+
F(this, "ctx", v());
|
|
1122
1123
|
}
|
|
1123
1124
|
/**
|
|
1124
1125
|
* @deprecated use getOptions()
|
|
@@ -1130,25 +1131,25 @@ class Kt {
|
|
|
1130
1131
|
const r = typeof e == "function" ? e : X(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1131
1132
|
let s = {}, o = !1;
|
|
1132
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" ? $e(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1133
|
-
ref:
|
|
1134
|
+
ref: Ce(a, o),
|
|
1134
1135
|
label: l
|
|
1135
1136
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1136
|
-
ref:
|
|
1137
|
+
ref: Ce(a, o),
|
|
1137
1138
|
label: s(l, a)
|
|
1138
1139
|
}));
|
|
1139
1140
|
}
|
|
1140
1141
|
resolveAnchorCtx(e) {
|
|
1141
|
-
if (e instanceof
|
|
1142
|
+
if (e instanceof Ae) return e;
|
|
1142
1143
|
const n = {};
|
|
1143
1144
|
for (const [r, i] of Object.entries(e))
|
|
1144
|
-
if (
|
|
1145
|
+
if (tt(i)) {
|
|
1145
1146
|
const s = this.getPColumnSpecByRef(i);
|
|
1146
1147
|
if (!s)
|
|
1147
1148
|
return;
|
|
1148
1149
|
n[r] = s;
|
|
1149
1150
|
} else
|
|
1150
1151
|
n[r] = i;
|
|
1151
|
-
return new
|
|
1152
|
+
return new Ae(n);
|
|
1152
1153
|
}
|
|
1153
1154
|
/**
|
|
1154
1155
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1222,7 +1223,7 @@ class Kt {
|
|
|
1222
1223
|
ref: n.ref,
|
|
1223
1224
|
obj: {
|
|
1224
1225
|
...n.obj,
|
|
1225
|
-
data: new
|
|
1226
|
+
data: new D(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1226
1227
|
}
|
|
1227
1228
|
}))
|
|
1228
1229
|
};
|
|
@@ -1241,9 +1242,9 @@ class Kt {
|
|
|
1241
1242
|
ref: n.ref,
|
|
1242
1243
|
obj: {
|
|
1243
1244
|
...n.obj,
|
|
1244
|
-
data:
|
|
1245
|
+
data: nt(
|
|
1245
1246
|
n.obj.data,
|
|
1246
|
-
(r) => new
|
|
1247
|
+
(r) => new D(r, [n.ref.blockId, n.ref.name])
|
|
1247
1248
|
)
|
|
1248
1249
|
}
|
|
1249
1250
|
}))
|
|
@@ -1270,9 +1271,9 @@ class Kt {
|
|
|
1270
1271
|
)) == null ? void 0 : r.obj;
|
|
1271
1272
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1272
1273
|
if (n)
|
|
1273
|
-
return
|
|
1274
|
+
return ve(
|
|
1274
1275
|
n,
|
|
1275
|
-
(i) => new
|
|
1276
|
+
(i) => new D(i, [e.blockId, e.name])
|
|
1276
1277
|
);
|
|
1277
1278
|
}
|
|
1278
1279
|
/**
|
|
@@ -1283,7 +1284,7 @@ class Kt {
|
|
|
1283
1284
|
getPColumnByRef(e) {
|
|
1284
1285
|
const n = this.getDataByRef(e);
|
|
1285
1286
|
if (n)
|
|
1286
|
-
return
|
|
1287
|
+
return rt(n);
|
|
1287
1288
|
}
|
|
1288
1289
|
/**
|
|
1289
1290
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1315,10 +1316,10 @@ class Kt {
|
|
|
1315
1316
|
if (!ne(r.obj.spec))
|
|
1316
1317
|
continue;
|
|
1317
1318
|
const i = r.obj.spec;
|
|
1318
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1319
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && de(e.domain, i.domain)) {
|
|
1319
1320
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1320
1321
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1321
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
1322
|
+
if (o.name !== a.name || o.type !== a.type || !de(o.domain, a.domain))
|
|
1322
1323
|
continue e;
|
|
1323
1324
|
}
|
|
1324
1325
|
n.push(r.obj);
|
|
@@ -1335,7 +1336,7 @@ class Kt {
|
|
|
1335
1336
|
for (const r of n.entries) {
|
|
1336
1337
|
if (!De(r.obj)) continue;
|
|
1337
1338
|
const i = r.obj.spec;
|
|
1338
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1339
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && de(e.domain, i.axesSpec[0].domain)) {
|
|
1339
1340
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1340
1341
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1341
1342
|
return Object.fromEntries(
|
|
@@ -1360,7 +1361,7 @@ class Kt {
|
|
|
1360
1361
|
let a = null;
|
|
1361
1362
|
const l = this;
|
|
1362
1363
|
return {
|
|
1363
|
-
id:
|
|
1364
|
+
id: Oe(i),
|
|
1364
1365
|
spec: o,
|
|
1365
1366
|
get data() {
|
|
1366
1367
|
var u;
|
|
@@ -1387,13 +1388,13 @@ class Kt {
|
|
|
1387
1388
|
}
|
|
1388
1389
|
class te {
|
|
1389
1390
|
constructor() {
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1391
|
+
F(this, "ctx");
|
|
1392
|
+
F(this, "args");
|
|
1393
|
+
F(this, "uiState");
|
|
1393
1394
|
// lazy rendering because this feature is rarely used
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
this.ctx =
|
|
1395
|
+
F(this, "_activeArgsCache");
|
|
1396
|
+
F(this, "resultPool", new Ot());
|
|
1397
|
+
this.ctx = v(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1397
1398
|
}
|
|
1398
1399
|
/**
|
|
1399
1400
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -1409,13 +1410,13 @@ class te {
|
|
|
1409
1410
|
// return this.ctx.featureFlags;
|
|
1410
1411
|
// }
|
|
1411
1412
|
getNamedAccessor(e) {
|
|
1412
|
-
return
|
|
1413
|
+
return he(
|
|
1413
1414
|
this.ctx.getAccessorHandleByName(e),
|
|
1414
|
-
(n) => new
|
|
1415
|
+
(n) => new D(n, [e])
|
|
1415
1416
|
);
|
|
1416
1417
|
}
|
|
1417
1418
|
get prerun() {
|
|
1418
|
-
return this.getNamedAccessor(
|
|
1419
|
+
return this.getNamedAccessor(Ke);
|
|
1419
1420
|
}
|
|
1420
1421
|
get outputs() {
|
|
1421
1422
|
return this.getNamedAccessor(je);
|
|
@@ -1430,26 +1431,35 @@ class te {
|
|
|
1430
1431
|
}
|
|
1431
1432
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1432
1433
|
var i;
|
|
1433
|
-
const n = e.some((s) => !(s.data instanceof
|
|
1434
|
+
const n = e.some((s) => !(s.data instanceof D) || we(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1434
1435
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1435
1436
|
}
|
|
1437
|
+
patchPTableDef(e) {
|
|
1438
|
+
var n;
|
|
1439
|
+
return (n = this.ctx.featureFlags) != null && n.pTablePartitionFiltersSupport ? e : {
|
|
1440
|
+
...e,
|
|
1441
|
+
partitionFilters: [],
|
|
1442
|
+
filters: [...e.partitionFilters, ...e.filters]
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1436
1445
|
// TODO remove all non-PColumn fields
|
|
1437
1446
|
createPFrame(e) {
|
|
1438
1447
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1439
|
-
e.map((n) =>
|
|
1448
|
+
e.map((n) => Te(n))
|
|
1440
1449
|
);
|
|
1441
1450
|
}
|
|
1442
1451
|
createPTable(e) {
|
|
1443
1452
|
let n;
|
|
1444
|
-
return "columns" in e ? n = {
|
|
1453
|
+
return "columns" in e ? n = this.patchPTableDef({
|
|
1445
1454
|
src: {
|
|
1446
1455
|
type: "full",
|
|
1447
1456
|
entries: e.columns.map((r) => ({ type: "column", column: r }))
|
|
1448
1457
|
},
|
|
1449
|
-
|
|
1458
|
+
partitionFilters: e.filters ?? [],
|
|
1459
|
+
filters: [],
|
|
1450
1460
|
sorting: e.sorting ?? []
|
|
1451
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1452
|
-
|
|
1461
|
+
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(it(n.src)), this.ctx.createPTable(
|
|
1462
|
+
st(n, (r) => Te(r))
|
|
1453
1463
|
);
|
|
1454
1464
|
}
|
|
1455
1465
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1469,13 +1479,13 @@ class te {
|
|
|
1469
1479
|
this.ctx.logError(e);
|
|
1470
1480
|
}
|
|
1471
1481
|
}
|
|
1472
|
-
const Y = "1.
|
|
1473
|
-
function
|
|
1482
|
+
const Y = "1.38.0";
|
|
1483
|
+
function Rt(t) {
|
|
1474
1484
|
return t.__renderLambda === !0;
|
|
1475
1485
|
}
|
|
1476
|
-
function
|
|
1486
|
+
function pe(t) {
|
|
1477
1487
|
if (t !== void 0)
|
|
1478
|
-
return
|
|
1488
|
+
return Rt(t) ? t.handle : t;
|
|
1479
1489
|
}
|
|
1480
1490
|
function M(t) {
|
|
1481
1491
|
if (t !== void 0)
|
|
@@ -1493,7 +1503,7 @@ function Rn(t) {
|
|
|
1493
1503
|
sections: a,
|
|
1494
1504
|
title: l,
|
|
1495
1505
|
enrichmentTargets: u
|
|
1496
|
-
} = t.v3, { code:
|
|
1506
|
+
} = t.v3, { code: d } = t;
|
|
1497
1507
|
return {
|
|
1498
1508
|
initialArgs: e,
|
|
1499
1509
|
initialUiState: n,
|
|
@@ -1503,7 +1513,7 @@ function Rn(t) {
|
|
|
1503
1513
|
sdkVersion: o,
|
|
1504
1514
|
sections: a,
|
|
1505
1515
|
title: l,
|
|
1506
|
-
code:
|
|
1516
|
+
code: d,
|
|
1507
1517
|
enrichmentTargets: u
|
|
1508
1518
|
};
|
|
1509
1519
|
} else if (t.inputsValid !== void 0) {
|
|
@@ -1517,7 +1527,7 @@ function Rn(t) {
|
|
|
1517
1527
|
renderingMode: n,
|
|
1518
1528
|
initialArgs: o,
|
|
1519
1529
|
outputs: Object.fromEntries(
|
|
1520
|
-
Object.entries(r).map(([u,
|
|
1530
|
+
Object.entries(r).map(([u, d]) => [u, M(d)])
|
|
1521
1531
|
),
|
|
1522
1532
|
inputsValid: M(i),
|
|
1523
1533
|
sections: M(s),
|
|
@@ -1535,7 +1545,7 @@ function Rn(t) {
|
|
|
1535
1545
|
renderingMode: r,
|
|
1536
1546
|
initialArgs: o,
|
|
1537
1547
|
outputs: Object.fromEntries(
|
|
1538
|
-
Object.entries(i).map(([u,
|
|
1548
|
+
Object.entries(i).map(([u, d]) => [u, M(d)])
|
|
1539
1549
|
),
|
|
1540
1550
|
inputsValid: M(n),
|
|
1541
1551
|
sections: M(s),
|
|
@@ -1549,12 +1559,12 @@ function Rn(t) {
|
|
|
1549
1559
|
);
|
|
1550
1560
|
}
|
|
1551
1561
|
}
|
|
1552
|
-
class
|
|
1562
|
+
class k {
|
|
1553
1563
|
constructor(e, n, r, i, s, o, a, l) {
|
|
1554
1564
|
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
|
|
1555
1565
|
}
|
|
1556
1566
|
static create(e = "Heavy") {
|
|
1557
|
-
return new
|
|
1567
|
+
return new k(
|
|
1558
1568
|
e,
|
|
1559
1569
|
void 0,
|
|
1560
1570
|
{},
|
|
@@ -1568,7 +1578,7 @@ class L {
|
|
|
1568
1578
|
output(e, n, r = {}) {
|
|
1569
1579
|
if (typeof n == "function") {
|
|
1570
1580
|
const i = `output#${e}`;
|
|
1571
|
-
return H(i, () => n(new te())), new
|
|
1581
|
+
return H(i, () => n(new te())), new k(
|
|
1572
1582
|
this._renderingMode,
|
|
1573
1583
|
this._initialArgs,
|
|
1574
1584
|
this._initialUiState,
|
|
@@ -1586,7 +1596,7 @@ class L {
|
|
|
1586
1596
|
this._enrichmentTargets
|
|
1587
1597
|
);
|
|
1588
1598
|
} else
|
|
1589
|
-
return new
|
|
1599
|
+
return new k(
|
|
1590
1600
|
this._renderingMode,
|
|
1591
1601
|
this._initialArgs,
|
|
1592
1602
|
this._initialUiState,
|
|
@@ -1605,7 +1615,7 @@ class L {
|
|
|
1605
1615
|
return this.output(e, n, { retentive: !0 });
|
|
1606
1616
|
}
|
|
1607
1617
|
argsValid(e) {
|
|
1608
|
-
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new
|
|
1618
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new k(
|
|
1609
1619
|
this._renderingMode,
|
|
1610
1620
|
this._initialArgs,
|
|
1611
1621
|
this._initialUiState,
|
|
@@ -1617,7 +1627,7 @@ class L {
|
|
|
1617
1627
|
this._sections,
|
|
1618
1628
|
this._title,
|
|
1619
1629
|
this._enrichmentTargets
|
|
1620
|
-
)) : new
|
|
1630
|
+
)) : new k(
|
|
1621
1631
|
this._renderingMode,
|
|
1622
1632
|
this._initialArgs,
|
|
1623
1633
|
this._initialUiState,
|
|
@@ -1629,7 +1639,7 @@ class L {
|
|
|
1629
1639
|
);
|
|
1630
1640
|
}
|
|
1631
1641
|
sections(e) {
|
|
1632
|
-
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new
|
|
1642
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new k(
|
|
1633
1643
|
this._renderingMode,
|
|
1634
1644
|
this._initialArgs,
|
|
1635
1645
|
this._initialUiState,
|
|
@@ -1638,7 +1648,7 @@ class L {
|
|
|
1638
1648
|
{ __renderLambda: !0, handle: "sections" },
|
|
1639
1649
|
this._title,
|
|
1640
1650
|
this._enrichmentTargets
|
|
1641
|
-
)) : new
|
|
1651
|
+
)) : new k(
|
|
1642
1652
|
this._renderingMode,
|
|
1643
1653
|
this._initialArgs,
|
|
1644
1654
|
this._initialUiState,
|
|
@@ -1651,7 +1661,7 @@ class L {
|
|
|
1651
1661
|
}
|
|
1652
1662
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1653
1663
|
title(e) {
|
|
1654
|
-
return H("title", () => e(new te())), new
|
|
1664
|
+
return H("title", () => e(new te())), new k(
|
|
1655
1665
|
this._renderingMode,
|
|
1656
1666
|
this._initialArgs,
|
|
1657
1667
|
this._initialUiState,
|
|
@@ -1667,7 +1677,7 @@ class L {
|
|
|
1667
1677
|
* @deprecated use {@link withArgs}
|
|
1668
1678
|
* */
|
|
1669
1679
|
initialArgs(e) {
|
|
1670
|
-
return new
|
|
1680
|
+
return new k(
|
|
1671
1681
|
this._renderingMode,
|
|
1672
1682
|
e,
|
|
1673
1683
|
this._initialUiState,
|
|
@@ -1680,7 +1690,7 @@ class L {
|
|
|
1680
1690
|
}
|
|
1681
1691
|
/** Sets initial args for the block, this value must be specified. */
|
|
1682
1692
|
withArgs(e) {
|
|
1683
|
-
return new
|
|
1693
|
+
return new k(
|
|
1684
1694
|
this._renderingMode,
|
|
1685
1695
|
e,
|
|
1686
1696
|
this._initialUiState,
|
|
@@ -1693,7 +1703,7 @@ class L {
|
|
|
1693
1703
|
}
|
|
1694
1704
|
/** Defines type and sets initial value for block UiState. */
|
|
1695
1705
|
withUiState(e) {
|
|
1696
|
-
return new
|
|
1706
|
+
return new k(
|
|
1697
1707
|
this._renderingMode,
|
|
1698
1708
|
this._initialArgs,
|
|
1699
1709
|
e,
|
|
@@ -1709,7 +1719,7 @@ class L {
|
|
|
1709
1719
|
* Influences dependency graph construction.
|
|
1710
1720
|
*/
|
|
1711
1721
|
enriches(e) {
|
|
1712
|
-
return H("enrichmentTargets", e), new
|
|
1722
|
+
return H("enrichmentTargets", e), new k(
|
|
1713
1723
|
this._renderingMode,
|
|
1714
1724
|
this._initialArgs,
|
|
1715
1725
|
this._initialUiState,
|
|
@@ -1741,40 +1751,52 @@ class L {
|
|
|
1741
1751
|
sdkVersion: Y,
|
|
1742
1752
|
renderingMode: this._renderingMode,
|
|
1743
1753
|
initialArgs: this._initialArgs,
|
|
1744
|
-
inputsValid:
|
|
1745
|
-
sections:
|
|
1754
|
+
inputsValid: pe(this._inputsValid),
|
|
1755
|
+
sections: pe(this._sections),
|
|
1746
1756
|
outputs: Object.fromEntries(
|
|
1747
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1757
|
+
Object.entries(this._outputs).map(([n, r]) => [n, pe(r)])
|
|
1748
1758
|
)
|
|
1749
1759
|
};
|
|
1750
|
-
return
|
|
1760
|
+
return pt() ? Ve({ sdkVersion: Y }) : { config: e };
|
|
1751
1761
|
}
|
|
1752
1762
|
}
|
|
1753
1763
|
function Ue() {
|
|
1754
1764
|
return {
|
|
1755
|
-
|
|
1765
|
+
sourceId: null,
|
|
1766
|
+
hiddenColIds: null,
|
|
1767
|
+
partitionFilters: [],
|
|
1768
|
+
filters: [],
|
|
1769
|
+
sorting: []
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
function Vt() {
|
|
1773
|
+
return {
|
|
1774
|
+
version: 3,
|
|
1756
1775
|
stateCache: [],
|
|
1757
|
-
pTableParams:
|
|
1758
|
-
sorting: [],
|
|
1759
|
-
filters: [],
|
|
1760
|
-
hiddenColIds: null
|
|
1761
|
-
}
|
|
1776
|
+
pTableParams: Ue()
|
|
1762
1777
|
};
|
|
1763
1778
|
}
|
|
1764
|
-
function
|
|
1765
|
-
return "version" in t ? t
|
|
1779
|
+
function Kt(t) {
|
|
1780
|
+
return "version" in t ? (t.version === 2 && (t = {
|
|
1781
|
+
version: 3,
|
|
1782
|
+
stateCache: t.stateCache.map((e) => ({
|
|
1783
|
+
...e,
|
|
1784
|
+
filtersState: []
|
|
1785
|
+
})),
|
|
1786
|
+
pTableParams: Ue()
|
|
1787
|
+
}), t) : Vt();
|
|
1766
1788
|
}
|
|
1767
1789
|
function be(t) {
|
|
1768
1790
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1769
1791
|
}
|
|
1770
|
-
function
|
|
1792
|
+
function jt(t) {
|
|
1771
1793
|
return new le().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1772
1794
|
name: "pl7.app/label",
|
|
1773
1795
|
axes: [{}]
|
|
1774
1796
|
// exactly one axis
|
|
1775
1797
|
}, { dontWaitAllData: !0 });
|
|
1776
1798
|
}
|
|
1777
|
-
function
|
|
1799
|
+
function Le(t, e) {
|
|
1778
1800
|
const n = [], r = [];
|
|
1779
1801
|
for (const a of t)
|
|
1780
1802
|
be(a.spec) ? n.push(a) : r.push(a);
|
|
@@ -1782,37 +1804,37 @@ function we(t, e) {
|
|
|
1782
1804
|
for (const a of r)
|
|
1783
1805
|
for (const l of a.spec.axesSpec) {
|
|
1784
1806
|
const u = O(l);
|
|
1785
|
-
i.some((
|
|
1807
|
+
i.some((d) => K(d, u)) || i.push(u);
|
|
1786
1808
|
}
|
|
1787
1809
|
for (const a of n) {
|
|
1788
|
-
const l = O(a.spec.axesSpec[0]), u = i.findIndex((
|
|
1810
|
+
const l = O(a.spec.axesSpec[0]), u = i.findIndex((d) => K(d, l));
|
|
1789
1811
|
u !== -1 && i.splice(u, 1);
|
|
1790
1812
|
}
|
|
1791
1813
|
const s = (a, l) => {
|
|
1792
1814
|
let u = a.toString();
|
|
1793
1815
|
if (l)
|
|
1794
|
-
for (const
|
|
1795
|
-
u +=
|
|
1816
|
+
for (const d in l)
|
|
1817
|
+
u += d, u += l[d];
|
|
1796
1818
|
return u;
|
|
1797
1819
|
}, o = [];
|
|
1798
1820
|
for (const a of e) {
|
|
1799
|
-
const l = a.spec.axesSpec[0], u = O(l),
|
|
1800
|
-
if (
|
|
1801
|
-
const
|
|
1821
|
+
const l = a.spec.axesSpec[0], u = O(l), d = i.findIndex((h) => K(h, u));
|
|
1822
|
+
if (d !== -1) {
|
|
1823
|
+
const h = i[d], g = Object.keys(h.domain ?? {}).length, p = Object.keys(l.domain ?? {}).length;
|
|
1802
1824
|
g > p ? o.push({
|
|
1803
|
-
id: s(a.id,
|
|
1825
|
+
id: s(a.id, h.domain),
|
|
1804
1826
|
spec: {
|
|
1805
1827
|
...a.spec,
|
|
1806
|
-
axesSpec: [{ ...
|
|
1828
|
+
axesSpec: [{ ...h, annotations: l.annotations }]
|
|
1807
1829
|
},
|
|
1808
1830
|
data: a.data
|
|
1809
|
-
}) : o.push(a), i.splice(
|
|
1831
|
+
}) : o.push(a), i.splice(d, 1);
|
|
1810
1832
|
}
|
|
1811
1833
|
}
|
|
1812
1834
|
return o;
|
|
1813
1835
|
}
|
|
1814
|
-
function
|
|
1815
|
-
const e = (i) => Array.isArray(i), n = (i) => i instanceof
|
|
1836
|
+
function Nt(t) {
|
|
1837
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof D, r = (i) => typeof i == "object" && "type" in i;
|
|
1816
1838
|
return t.map((i) => i.data).every((i) => {
|
|
1817
1839
|
if (e(i))
|
|
1818
1840
|
return !0;
|
|
@@ -1831,86 +1853,102 @@ function We(t) {
|
|
|
1831
1853
|
throw Error(`unsupported column data type: ${i}`);
|
|
1832
1854
|
});
|
|
1833
1855
|
}
|
|
1834
|
-
function
|
|
1835
|
-
let
|
|
1836
|
-
const
|
|
1837
|
-
if (
|
|
1838
|
-
|
|
1839
|
-
for (const
|
|
1840
|
-
|
|
1856
|
+
function Ee(t) {
|
|
1857
|
+
let e = t.columns;
|
|
1858
|
+
const n = [];
|
|
1859
|
+
if (t.coreColumnPredicate) {
|
|
1860
|
+
e = [];
|
|
1861
|
+
for (const r of t.columns)
|
|
1862
|
+
t.coreColumnPredicate(r.spec) ? e.push(r) : n.push(r);
|
|
1841
1863
|
}
|
|
1842
|
-
return
|
|
1864
|
+
return n.push(...t.labelColumns), {
|
|
1843
1865
|
src: {
|
|
1844
1866
|
type: "outer",
|
|
1845
1867
|
primary: {
|
|
1846
|
-
type:
|
|
1847
|
-
entries:
|
|
1868
|
+
type: t.coreJoinType,
|
|
1869
|
+
entries: e.map((r) => ({ type: "column", column: r }))
|
|
1848
1870
|
},
|
|
1849
|
-
secondary:
|
|
1871
|
+
secondary: n.map((r) => ({ type: "column", column: r }))
|
|
1850
1872
|
},
|
|
1851
|
-
|
|
1852
|
-
|
|
1873
|
+
partitionFilters: t.partitionFilters,
|
|
1874
|
+
filters: t.filters,
|
|
1875
|
+
sorting: t.sorting
|
|
1853
1876
|
};
|
|
1854
1877
|
}
|
|
1855
|
-
function
|
|
1856
|
-
var u, c;
|
|
1857
|
-
Array.isArray(r) && (r = { filters: r });
|
|
1858
|
-
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = ue(
|
|
1859
|
-
[...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
|
|
1860
|
-
(d) => R(d.column)
|
|
1861
|
-
), o = ue(
|
|
1862
|
-
[...(r == null ? void 0 : r.sorting) ?? [], ...((c = n == null ? void 0 : n.pTableParams) == null ? void 0 : c.sorting) ?? []],
|
|
1863
|
-
(d) => R(d.column)
|
|
1864
|
-
), a = Be(t.resultPool);
|
|
1865
|
-
if (!a) return;
|
|
1866
|
-
const l = we(e.map(he), a);
|
|
1867
|
-
if (We([...e, ...l]))
|
|
1868
|
-
return t.createPTable(
|
|
1869
|
-
Ae(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1870
|
-
);
|
|
1871
|
-
}
|
|
1872
|
-
function Nt(t) {
|
|
1878
|
+
function $t(t) {
|
|
1873
1879
|
var e;
|
|
1874
1880
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
1875
1881
|
}
|
|
1876
|
-
function
|
|
1882
|
+
function Jt(t) {
|
|
1877
1883
|
var e;
|
|
1878
1884
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1879
1885
|
}
|
|
1880
|
-
function
|
|
1886
|
+
function fe(t, e) {
|
|
1881
1887
|
return [...new Map(t.map((n) => [e(n), n])).values()];
|
|
1882
1888
|
}
|
|
1883
|
-
function
|
|
1889
|
+
function Vn(t, e, n, r) {
|
|
1884
1890
|
if (e.length === 0) return;
|
|
1885
|
-
const i =
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1891
|
+
const i = e.filter((c) => !$t(c.spec)), s = Kt(n), o = jt(t.resultPool);
|
|
1892
|
+
if (!o) return;
|
|
1893
|
+
const a = Le(i.map(Pe), o), l = [...i, ...a], d = [
|
|
1894
|
+
...fe(
|
|
1895
|
+
[...l.flatMap((c) => c.spec.axesSpec.map((m) => O(m)))],
|
|
1896
|
+
(c) => R(c)
|
|
1897
|
+
).map((c) => ({ type: "axis", id: c })),
|
|
1898
|
+
...l.map((c) => ({ type: "column", id: c.id }))
|
|
1899
|
+
], h = new Set(d.map((c) => R(c))), g = (c) => h.has(R(c)), p = (r == null ? void 0 : r.coreJoinType) ?? "full", b = s.pTableParams.partitionFilters.filter((c) => {
|
|
1900
|
+
const m = g(c.column);
|
|
1901
|
+
return m || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), m;
|
|
1902
|
+
}), f = fe(
|
|
1903
|
+
[...(r == null ? void 0 : r.filters) ?? [], ...s.pTableParams.filters],
|
|
1904
|
+
(c) => R(c.column)
|
|
1905
|
+
).filter((c) => {
|
|
1906
|
+
const m = g(c.column);
|
|
1907
|
+
return m || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), m;
|
|
1908
|
+
}), y = fe(
|
|
1909
|
+
[...(r == null ? void 0 : r.sorting) ?? [], ...s.pTableParams.sorting],
|
|
1910
|
+
(c) => R(c.column)
|
|
1911
|
+
).filter((c) => {
|
|
1912
|
+
const m = g(c.column);
|
|
1913
|
+
return m || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), m;
|
|
1914
|
+
}), w = Ee({
|
|
1915
|
+
columns: i,
|
|
1916
|
+
labelColumns: a,
|
|
1917
|
+
coreJoinType: p,
|
|
1918
|
+
partitionFilters: b,
|
|
1919
|
+
filters: f,
|
|
1920
|
+
sorting: y,
|
|
1921
|
+
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1922
|
+
}), E = t.createPTable(w), x = new Set((() => {
|
|
1923
|
+
if (p === "inner") return [];
|
|
1924
|
+
const c = s.pTableParams.hiddenColIds;
|
|
1925
|
+
return c || i.filter((m) => Jt(m.spec)).map((m) => m.id);
|
|
1897
1926
|
})());
|
|
1898
|
-
|
|
1899
|
-
var
|
|
1900
|
-
return ((
|
|
1901
|
-
}).forEach((
|
|
1902
|
-
var
|
|
1903
|
-
return (
|
|
1904
|
-
}).forEach((
|
|
1905
|
-
const
|
|
1906
|
-
if (!
|
|
1907
|
-
const
|
|
1927
|
+
i.filter((c) => {
|
|
1928
|
+
var m;
|
|
1929
|
+
return ((m = c.spec.annotations) == null ? void 0 : m["pl7.app/isLinkerColumn"]) === "true";
|
|
1930
|
+
}).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((m) => {
|
|
1931
|
+
var _;
|
|
1932
|
+
return (_ = r == null ? void 0 : r.coreColumnPredicate) != null && _.call(r, m.spec) ? [m.id] : [];
|
|
1933
|
+
}).forEach((m) => x.delete(m)), [...b.map((c) => c.column), ...f.map((c) => c.column), ...y.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
|
|
1934
|
+
const C = i.filter((c) => !x.has(c.id)), A = Le(C.map(Pe), o);
|
|
1935
|
+
if (!Nt([...C, ...A])) return;
|
|
1936
|
+
const S = Ee({
|
|
1937
|
+
columns: C,
|
|
1938
|
+
labelColumns: A,
|
|
1939
|
+
coreJoinType: p,
|
|
1940
|
+
partitionFilters: b,
|
|
1941
|
+
filters: f,
|
|
1942
|
+
sorting: y,
|
|
1943
|
+
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1944
|
+
}), I = t.createPTable(S);
|
|
1908
1945
|
return {
|
|
1909
|
-
|
|
1910
|
-
|
|
1946
|
+
sourceId: s.pTableParams.sourceId,
|
|
1947
|
+
fullTableHandle: E,
|
|
1948
|
+
visibleTableHandle: I
|
|
1911
1949
|
};
|
|
1912
1950
|
}
|
|
1913
|
-
function
|
|
1951
|
+
function Kn(t, e, n) {
|
|
1914
1952
|
const r = t.resultPool.findLabels(e);
|
|
1915
1953
|
return {
|
|
1916
1954
|
axis: e,
|
|
@@ -1921,7 +1959,7 @@ function Vn(t, e, n) {
|
|
|
1921
1959
|
defaultValue: n[0]
|
|
1922
1960
|
};
|
|
1923
1961
|
}
|
|
1924
|
-
const
|
|
1962
|
+
const Mt = (t, e) => {
|
|
1925
1963
|
let n = t.toString();
|
|
1926
1964
|
return e == null || e.forEach((r) => {
|
|
1927
1965
|
if (r)
|
|
@@ -1929,7 +1967,7 @@ const Jt = (t, e) => {
|
|
|
1929
1967
|
n += i, n += s;
|
|
1930
1968
|
}), n;
|
|
1931
1969
|
};
|
|
1932
|
-
function
|
|
1970
|
+
function Ut(t) {
|
|
1933
1971
|
if (!t.length)
|
|
1934
1972
|
return [];
|
|
1935
1973
|
let e = [[]];
|
|
@@ -1940,12 +1978,12 @@ function Mt(t) {
|
|
|
1940
1978
|
}), e = r;
|
|
1941
1979
|
}), e;
|
|
1942
1980
|
}
|
|
1943
|
-
function
|
|
1981
|
+
function Bt(t) {
|
|
1944
1982
|
var e;
|
|
1945
|
-
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[
|
|
1983
|
+
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[Gt]) === "true";
|
|
1946
1984
|
}
|
|
1947
|
-
const
|
|
1948
|
-
function
|
|
1985
|
+
const Wt = "pl7.app/graph/isVirtual", ke = "pl7.app/label", Gt = "pl7.app/isLinkerColumn";
|
|
1986
|
+
function Ht(t) {
|
|
1949
1987
|
var n, r;
|
|
1950
1988
|
const e = /* @__PURE__ */ new Map();
|
|
1951
1989
|
for (const { spec: i } of t) {
|
|
@@ -1961,10 +1999,10 @@ function Gt(t) {
|
|
|
1961
1999
|
}
|
|
1962
2000
|
return e;
|
|
1963
2001
|
}
|
|
1964
|
-
function
|
|
1965
|
-
const n =
|
|
2002
|
+
function qt(t, e) {
|
|
2003
|
+
const n = Ht(t), r = [...n.keys()].map(xe), i = [];
|
|
1966
2004
|
for (const l of e.values()) {
|
|
1967
|
-
const u = r.find((
|
|
2005
|
+
const u = r.find((d) => K(l, d));
|
|
1968
2006
|
u && i.push(R(u));
|
|
1969
2007
|
}
|
|
1970
2008
|
const s = new Set(i), o = /* @__PURE__ */ new Map();
|
|
@@ -1972,63 +2010,63 @@ function Ht(t, e) {
|
|
|
1972
2010
|
for (; a.length; ) {
|
|
1973
2011
|
const l = [];
|
|
1974
2012
|
for (const u of a)
|
|
1975
|
-
for (const
|
|
1976
|
-
s.has(
|
|
2013
|
+
for (const d of n.get(u) ?? [])
|
|
2014
|
+
s.has(d) || (l.push(d), s.add(d), o.set(d, xe(d)));
|
|
1977
2015
|
a = l;
|
|
1978
2016
|
}
|
|
1979
2017
|
return o;
|
|
1980
2018
|
}
|
|
1981
|
-
function
|
|
2019
|
+
function zt(t, e) {
|
|
1982
2020
|
const n = [];
|
|
1983
2021
|
return e.forEach((r) => {
|
|
1984
|
-
n.push(...
|
|
2022
|
+
n.push(...Yt(t, r));
|
|
1985
2023
|
}), n;
|
|
1986
2024
|
}
|
|
1987
|
-
function
|
|
2025
|
+
function Yt(t, e) {
|
|
1988
2026
|
const n = e.spec.axesSpec.map(O);
|
|
1989
2027
|
if (n.every((u) => t.has(R(u))))
|
|
1990
2028
|
return [e];
|
|
1991
2029
|
const r = n.map((u) => {
|
|
1992
|
-
const
|
|
1993
|
-
for (const [
|
|
1994
|
-
|
|
1995
|
-
return
|
|
1996
|
-
}), i =
|
|
1997
|
-
const
|
|
1998
|
-
return u.map((
|
|
1999
|
-
const p = e.spec.axesSpec[g].domain,
|
|
2000
|
-
return Object.entries(
|
|
2030
|
+
const d = [];
|
|
2031
|
+
for (const [h, g] of t)
|
|
2032
|
+
K(g, u) && !K(u, g) && d.push(g);
|
|
2033
|
+
return d;
|
|
2034
|
+
}), i = Ut(r), s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = i.map((u) => {
|
|
2035
|
+
const d = /* @__PURE__ */ new Set();
|
|
2036
|
+
return u.map((h, g) => {
|
|
2037
|
+
const p = e.spec.axesSpec[g].domain, b = h.domain;
|
|
2038
|
+
return Object.entries(b ?? {}).forEach(([f, y]) => {
|
|
2001
2039
|
if ((p == null ? void 0 : p[f]) === void 0) {
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2040
|
+
const w = JSON.stringify([f, y]);
|
|
2041
|
+
d.add(w), s.add(w);
|
|
2004
2042
|
}
|
|
2005
2043
|
}), {
|
|
2006
|
-
...
|
|
2044
|
+
...h,
|
|
2007
2045
|
annotations: e.spec.axesSpec[g].annotations
|
|
2008
2046
|
};
|
|
2009
|
-
}),
|
|
2047
|
+
}), d;
|
|
2010
2048
|
});
|
|
2011
2049
|
[...s].forEach((u) => {
|
|
2012
|
-
a.some((
|
|
2050
|
+
a.some((d) => !d.has(u)) && o.add(u);
|
|
2013
2051
|
});
|
|
2014
|
-
const l = i.map((u,
|
|
2052
|
+
const l = i.map((u, d) => {
|
|
2015
2053
|
var f;
|
|
2016
|
-
const
|
|
2017
|
-
var
|
|
2018
|
-
return (
|
|
2019
|
-
}).join(" / "),
|
|
2054
|
+
const h = Mt(e.id, u.map((y) => y.domain)), g = ((f = e.spec.annotations) == null ? void 0 : f[ke]) ?? "", p = [...a[d]].filter((y) => o.has(y)).sort().map((y) => {
|
|
2055
|
+
var w;
|
|
2056
|
+
return (w = JSON.parse(y)) == null ? void 0 : w[1];
|
|
2057
|
+
}).join(" / "), b = {
|
|
2020
2058
|
...e.spec.annotations,
|
|
2021
|
-
[
|
|
2059
|
+
[Wt]: "true"
|
|
2022
2060
|
};
|
|
2023
|
-
return (g || p) && (
|
|
2024
|
-
id:
|
|
2061
|
+
return (g || p) && (b[ke] = g && p ? g + " / " + p : g + p), {
|
|
2062
|
+
id: h,
|
|
2025
2063
|
spec: {
|
|
2026
2064
|
...e.spec,
|
|
2027
|
-
axesSpec: u.map((
|
|
2028
|
-
...
|
|
2029
|
-
annotations: e.spec.axesSpec[
|
|
2065
|
+
axesSpec: u.map((y, w) => ({
|
|
2066
|
+
...y,
|
|
2067
|
+
annotations: e.spec.axesSpec[w].annotations
|
|
2030
2068
|
})),
|
|
2031
|
-
annotations:
|
|
2069
|
+
annotations: b
|
|
2032
2070
|
},
|
|
2033
2071
|
data: e.data
|
|
2034
2072
|
};
|
|
@@ -2040,47 +2078,47 @@ function jn(t, e) {
|
|
|
2040
2078
|
const n = new le();
|
|
2041
2079
|
n.addColumnProvider(t.resultPool), n.addColumns(e);
|
|
2042
2080
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
2043
|
-
for (const
|
|
2044
|
-
for (const g of
|
|
2081
|
+
for (const h of e)
|
|
2082
|
+
for (const g of h.spec.axesSpec) {
|
|
2045
2083
|
const p = O(g);
|
|
2046
2084
|
r.set(R(p), p), i.set(R(p), p);
|
|
2047
2085
|
}
|
|
2048
|
-
const s = n.getColumns((
|
|
2049
|
-
for (const
|
|
2050
|
-
r.set(...
|
|
2051
|
-
const a = (n.getColumns((
|
|
2086
|
+
const s = n.getColumns((h) => Bt(h)) ?? [], o = qt(s, r);
|
|
2087
|
+
for (const h of o)
|
|
2088
|
+
r.set(...h), i.set(...h);
|
|
2089
|
+
const a = (n.getColumns((h) => h.axesSpec.some((g) => {
|
|
2052
2090
|
const p = O(g);
|
|
2053
|
-
for (const
|
|
2054
|
-
if (
|
|
2091
|
+
for (const b of r.values())
|
|
2092
|
+
if (K(b, p))
|
|
2055
2093
|
return !0;
|
|
2056
2094
|
return !1;
|
|
2057
|
-
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((
|
|
2058
|
-
for (const
|
|
2059
|
-
for (const g of
|
|
2095
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((h) => !be(h.spec));
|
|
2096
|
+
for (const h of a)
|
|
2097
|
+
for (const g of h.spec.axesSpec) {
|
|
2060
2098
|
const p = O(g);
|
|
2061
2099
|
i.set(R(p), p);
|
|
2062
2100
|
}
|
|
2063
|
-
const l = (n.getColumns((
|
|
2101
|
+
const l = (n.getColumns((h) => h.axesSpec.some((g) => {
|
|
2064
2102
|
const p = O(g);
|
|
2065
|
-
for (const
|
|
2066
|
-
if (
|
|
2103
|
+
for (const b of i.values())
|
|
2104
|
+
if (K(b, p))
|
|
2067
2105
|
return !0;
|
|
2068
2106
|
return !1;
|
|
2069
|
-
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((
|
|
2070
|
-
if (!
|
|
2071
|
-
(
|
|
2107
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((h) => be(h.spec)), u = [...a, ...l], d = zt(r, u);
|
|
2108
|
+
if (!d.some(
|
|
2109
|
+
(h) => h.data instanceof D && !h.data.getIsReadyOrError()
|
|
2072
2110
|
))
|
|
2073
|
-
return t.createPFrame(
|
|
2111
|
+
return t.createPFrame(d);
|
|
2074
2112
|
}
|
|
2075
2113
|
function Nn({
|
|
2076
2114
|
selection: t,
|
|
2077
|
-
columnId: e =
|
|
2115
|
+
columnId: e = lt(),
|
|
2078
2116
|
label: n = "Selection marker",
|
|
2079
2117
|
domain: r
|
|
2080
2118
|
}) {
|
|
2081
2119
|
if (!(t != null && t.axesSpec.length))
|
|
2082
2120
|
return;
|
|
2083
|
-
const i = t.selectedKeys.filter((s) => s.every((o) => !
|
|
2121
|
+
const i = t.selectedKeys.filter((s) => s.every((o) => !at(o))).map((s) => ({ key: s, val: 1 }));
|
|
2084
2122
|
if (i.length)
|
|
2085
2123
|
return {
|
|
2086
2124
|
id: e,
|
|
@@ -2099,7 +2137,7 @@ function Nn({
|
|
|
2099
2137
|
};
|
|
2100
2138
|
}
|
|
2101
2139
|
function $n(t) {
|
|
2102
|
-
return t ===
|
|
2140
|
+
return t === ut ? (console.error("Axis value can never be N/A"), "") : t;
|
|
2103
2141
|
}
|
|
2104
2142
|
class Jn {
|
|
2105
2143
|
constructor(e) {
|
|
@@ -2121,28 +2159,28 @@ class Jn {
|
|
|
2121
2159
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2122
2160
|
}
|
|
2123
2161
|
}
|
|
2124
|
-
function
|
|
2125
|
-
return
|
|
2162
|
+
function Xt(t) {
|
|
2163
|
+
return Re({
|
|
2126
2164
|
__isRef: !0,
|
|
2127
2165
|
blockId: ie(t, "blockId"),
|
|
2128
2166
|
name: ie(t, "name")
|
|
2129
2167
|
});
|
|
2130
2168
|
}
|
|
2131
2169
|
function Mn(t) {
|
|
2132
|
-
return
|
|
2133
|
-
ref:
|
|
2170
|
+
return Re({
|
|
2171
|
+
ref: Xt(ie(t, "ref")),
|
|
2134
2172
|
label: ie(t, "label")
|
|
2135
2173
|
});
|
|
2136
2174
|
}
|
|
2137
2175
|
const Un = {
|
|
2138
2176
|
sdkVersion: Y
|
|
2139
2177
|
};
|
|
2140
|
-
function
|
|
2141
|
-
return
|
|
2178
|
+
function Qt() {
|
|
2179
|
+
return Ve({ sdkVersion: Y });
|
|
2142
2180
|
}
|
|
2143
2181
|
function Bn(t) {
|
|
2144
2182
|
try {
|
|
2145
|
-
return
|
|
2183
|
+
return Qt();
|
|
2146
2184
|
} catch {
|
|
2147
2185
|
return t;
|
|
2148
2186
|
}
|
|
@@ -2152,19 +2190,19 @@ function Wn(t) {
|
|
|
2152
2190
|
return globalThis.getEnvironmentValue(t);
|
|
2153
2191
|
}
|
|
2154
2192
|
export {
|
|
2155
|
-
|
|
2156
|
-
|
|
2193
|
+
on as Args,
|
|
2194
|
+
k as BlockModel,
|
|
2157
2195
|
Un as CurrentSdkInfo,
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2196
|
+
L as FutureRef,
|
|
2197
|
+
Wt as IS_VIRTUAL_COLUMN,
|
|
2198
|
+
an as It,
|
|
2199
|
+
Fn as JsRenderInternal,
|
|
2162
2200
|
ke as LABEL_ANNOTATION,
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2201
|
+
Gt as LINKER_COLUMN_ANNOTATION,
|
|
2202
|
+
ln as MainOutputs,
|
|
2203
|
+
ct as OutputError,
|
|
2204
|
+
yt as PAnnotationLabel,
|
|
2205
|
+
bt as PAnnotationTrace,
|
|
2168
2206
|
le as PColumnCollection,
|
|
2169
2207
|
Jn as PFrameImpl,
|
|
2170
2208
|
B as RT_BINARY_PARTITIONED,
|
|
@@ -2174,75 +2212,75 @@ export {
|
|
|
2174
2212
|
se as RT_RESOURCE_MAP,
|
|
2175
2213
|
oe as RT_RESOURCE_MAP_PARTITIONED,
|
|
2176
2214
|
te as RenderCtx,
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2215
|
+
Ot as ResultPool,
|
|
2216
|
+
un as StagingOutputs,
|
|
2217
|
+
wt as Trace,
|
|
2218
|
+
vt as TraceEntry,
|
|
2219
|
+
D as TreeNodeAccessor,
|
|
2220
|
+
cn as UiState,
|
|
2221
|
+
Nt as allColumnsComputed,
|
|
2222
|
+
yn as and,
|
|
2223
|
+
It as convertOrParsePColumnData,
|
|
2186
2224
|
jn as createPFrameForGraphs,
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
Kn as createPlDataTableV2,
|
|
2225
|
+
Kn as createPlDataTableSheet,
|
|
2226
|
+
Vt as createPlDataTableStateV2,
|
|
2227
|
+
Vn as createPlDataTableV2,
|
|
2191
2228
|
Nn as createRowSelectionColumn,
|
|
2192
2229
|
$e as deriveLabels,
|
|
2193
|
-
|
|
2194
|
-
|
|
2230
|
+
pe as downgradeCfgOrLambda,
|
|
2231
|
+
zt as enrichCompatible,
|
|
2195
2232
|
_n as extractArchiveAndGetURL,
|
|
2196
2233
|
Rn as extractConfig,
|
|
2197
|
-
|
|
2198
|
-
|
|
2234
|
+
_t as filterDataInfoEntries,
|
|
2235
|
+
hn as flatten,
|
|
2199
2236
|
Mn as fromPlOption,
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2237
|
+
Xt as fromPlRef,
|
|
2238
|
+
jt as getAllLabelColumns,
|
|
2239
|
+
qt as getAvailableWithLinkersAxes,
|
|
2240
|
+
Cn as getBlobContent,
|
|
2241
|
+
Pn as getBlobContentAsJson,
|
|
2242
|
+
An as getBlobContentAsString,
|
|
2243
|
+
xn as getDownloadedBlobContent,
|
|
2207
2244
|
Wn as getEnvironmentValue,
|
|
2208
2245
|
Q as getFromCfg,
|
|
2209
2246
|
re as getImmediate,
|
|
2210
|
-
|
|
2247
|
+
Tn as getImportProgress,
|
|
2211
2248
|
ie as getJsonField,
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2249
|
+
Ln as getLastLogs,
|
|
2250
|
+
Ht as getLinkerColumnsMap,
|
|
2251
|
+
Dn as getLogHandle,
|
|
2252
|
+
Le as getMatchingLabelColumns,
|
|
2253
|
+
In as getOnDemandBlobContent,
|
|
2254
|
+
At as getPartitionKeysList,
|
|
2218
2255
|
Bn as getPlatformaOrDefault,
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2256
|
+
En as getProgressLog,
|
|
2257
|
+
kn as getProgressLogWithInfo,
|
|
2258
|
+
Qt as getRawPlatformaInstance,
|
|
2222
2259
|
vn as getResourceField,
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2260
|
+
wn as getResourceValueAsJson,
|
|
2261
|
+
xt as getUniquePartitionKeys,
|
|
2262
|
+
he as ifDef,
|
|
2263
|
+
$t as isColumnHidden,
|
|
2264
|
+
Jt as isColumnOptional,
|
|
2265
|
+
Rt as isConfigLambda,
|
|
2266
|
+
gn as isEmpty,
|
|
2230
2267
|
be as isLabelColumn,
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2268
|
+
Bt as isLinkerColumn,
|
|
2269
|
+
sn as isolate,
|
|
2270
|
+
dn as makeArray,
|
|
2271
|
+
Ue as makeDefaultPTableParams,
|
|
2272
|
+
Re as makeObject,
|
|
2273
|
+
fn as mapArrayValues,
|
|
2236
2274
|
$n as mapPTableValueToAxisKey,
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2275
|
+
pn as mapRecordValues,
|
|
2276
|
+
Sn as mapResourceFields,
|
|
2277
|
+
mn as not,
|
|
2278
|
+
bn as or,
|
|
2279
|
+
ye as parsePColumnData,
|
|
2242
2280
|
On as parseResourceMap,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2281
|
+
dt as readOutput,
|
|
2282
|
+
fe as uniqueBy,
|
|
2283
|
+
Kt as upgradePlDataTableStateV2,
|
|
2284
|
+
rn as wrapOutputs
|
|
2247
2285
|
};
|
|
2248
2286
|
//# sourceMappingURL=index.mjs.map
|