@platforma-sdk/model 1.40.5 → 1.41.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/{block_api.d.ts → block_api_v1.d.ts} +3 -3
- package/dist/block_api_v1.d.ts.map +1 -0
- package/dist/block_api_v2.d.ts +50 -0
- package/dist/block_api_v2.d.ts.map +1 -0
- package/dist/builder.d.ts +6 -5
- package/dist/builder.d.ts.map +1 -1
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +403 -389
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +2 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/platforma.d.ts +13 -3
- package/dist/platforma.d.ts.map +1 -1
- package/dist/raw_globals.d.ts +2 -2
- package/dist/raw_globals.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +4 -3
- package/src/{block_api.ts → block_api_v1.ts} +2 -2
- package/src/block_api_v2.ts +69 -0
- package/src/builder.ts +48 -4
- package/src/components/PlDataTable.ts +3 -2
- package/src/global.d.ts +4 -1
- package/src/index.ts +2 -0
- package/src/internal.ts +2 -2
- package/src/platforma.ts +28 -4
- package/src/raw_globals.ts +18 -14
- package/dist/block_api.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var ot = (t, e, n) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var V = (t, e, n) => ot(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as je, mapPObjectData as Ae, isDataInfoEntries as qe, isDataInfo as pe, dataInfoToEntries as st, selectorsToPredicate as Y, resolveAnchors as xe, deriveNativeId as at, isPColumnSpec as oe, isPartitionedDataInfoEntries as lt, getAxisId as k, entriesToDataInfo as ut, canonicalizeAxisId as ct, withEnrichments as Fe, AnchoredIdDeriver as Ie, isPlRef as pt, mapValueInVOE as dt, ensurePColumn as ft, extractAllColumns as ht, mapPTableDef as mt, mapDataInfo as gt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as _e, canonicalizeJson as D, parseJson as Le, visitDataInfo as bt, isPTableAbsent as vt, uniquePlId as Ct, PTableNA as Tt } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
6
|
+
import Be from "canonicalize";
|
|
7
7
|
import { z as B } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class St 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 Pt(t) {
|
|
15
|
+
if (!t.ok) throw new St(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function hn(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return Pt(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -28,17 +28,17 @@ function A(t) {
|
|
|
28
28
|
function Z(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function mn(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const gn = Z("$args"),
|
|
37
|
+
const gn = Z("$args"), yn = Z("$it"), bn = Z("$prod"), vn = Z("$staging"), Cn = Z("$ui");
|
|
38
38
|
function se(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Je(t) {
|
|
42
42
|
const e = {};
|
|
43
43
|
for (const [n, r] of Object.entries(t)) e[n] = A(r);
|
|
44
44
|
return {
|
|
@@ -46,7 +46,7 @@ function Be(t) {
|
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Tn(...t) {
|
|
50
50
|
const e = [];
|
|
51
51
|
for (const n of t) e.push(A(n));
|
|
52
52
|
return {
|
|
@@ -61,7 +61,7 @@ function ae(t, e) {
|
|
|
61
61
|
field: A(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Sn(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function Pn(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Pn(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,46 +77,46 @@ function An(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function An(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function wn(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function xn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Fn(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 In(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
109
109
|
operand2: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function _n(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
115
|
source: A(t),
|
|
116
116
|
field: A(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ln() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
@@ -124,7 +124,7 @@ function En() {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function En(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -139,14 +139,14 @@ function Vn(t, e) {
|
|
|
139
139
|
source: A(t)
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function kn(t, e) {
|
|
143
143
|
return {
|
|
144
144
|
type: "GetBlobContentAsString",
|
|
145
145
|
range: e,
|
|
146
146
|
source: A(t)
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function On() {
|
|
150
150
|
return function(t, e) {
|
|
151
151
|
return {
|
|
152
152
|
type: "GetBlobContentAsJson",
|
|
@@ -155,92 +155,92 @@ function Dn() {
|
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Dn(t) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetDownloadedBlobContent",
|
|
161
161
|
source: A(t)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Rn(t) {
|
|
165
165
|
return {
|
|
166
166
|
type: "GetOnDemandBlobContent",
|
|
167
167
|
source: A(t)
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Nn(t, e) {
|
|
171
171
|
return {
|
|
172
172
|
type: "ExtractArchiveAndGetURL",
|
|
173
173
|
format: e,
|
|
174
174
|
source: A(t)
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Un(t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetImportProgress",
|
|
180
180
|
source: A(t)
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Kn(t, e) {
|
|
184
184
|
return {
|
|
185
185
|
type: "GetLastLogs",
|
|
186
186
|
source: A(t),
|
|
187
187
|
lines: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Mn(t, e) {
|
|
191
191
|
return {
|
|
192
192
|
type: "GetProgressLog",
|
|
193
193
|
source: A(t),
|
|
194
194
|
patternToSearch: e
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function jn(t, e) {
|
|
198
198
|
return {
|
|
199
199
|
type: "GetProgressLogWithInfo",
|
|
200
200
|
source: A(t),
|
|
201
201
|
patternToSearch: e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function qn(t) {
|
|
205
205
|
return {
|
|
206
206
|
type: "GetLogHandle",
|
|
207
207
|
source: A(t)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function At() {
|
|
211
211
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function $e(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 wt() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function b() {
|
|
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 G(t, e) {
|
|
227
|
-
const n =
|
|
227
|
+
const n = wt();
|
|
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 fe = /* @__PURE__ */ new Map();
|
|
233
|
-
function
|
|
234
|
-
t in
|
|
233
|
+
function xt(t, e) {
|
|
234
|
+
t in b().callbackRegistry || (b().callbackRegistry[t] = (n) => {
|
|
235
235
|
for (const r of fe.get(t))
|
|
236
236
|
r(n);
|
|
237
237
|
}, fe.set(t, [])), fe.get(t).push(e);
|
|
238
238
|
}
|
|
239
239
|
class L {
|
|
240
240
|
constructor(e, n = (r) => r) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
this.handle = e, this.postProcess = n,
|
|
241
|
+
V(this, "isResolved", !1);
|
|
242
|
+
V(this, "resolvedValue");
|
|
243
|
+
this.handle = e, this.postProcess = n, xt(e, (r) => {
|
|
244
244
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
245
245
|
});
|
|
246
246
|
}
|
|
@@ -257,7 +257,7 @@ class L {
|
|
|
257
257
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function ye(t, e) {
|
|
261
261
|
return t === void 0 ? void 0 : e(t);
|
|
262
262
|
}
|
|
263
263
|
class O {
|
|
@@ -299,47 +299,47 @@ class O {
|
|
|
299
299
|
...this.resolvePath,
|
|
300
300
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
301
301
|
];
|
|
302
|
-
return
|
|
303
|
-
|
|
302
|
+
return ye(
|
|
303
|
+
b().resolveWithCommon(this.handle, e, ...n),
|
|
304
304
|
(i) => new O(i, r)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
get resourceType() {
|
|
308
|
-
return
|
|
308
|
+
return b().getResourceType(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getInputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return b().getInputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getOutputsLocked() {
|
|
314
|
-
return
|
|
314
|
+
return b().getOutputsLocked(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsReadyOrError() {
|
|
317
|
-
return
|
|
317
|
+
return b().getIsReadyOrError(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getIsFinal() {
|
|
320
|
-
return
|
|
320
|
+
return b().getIsFinal(this.handle);
|
|
321
321
|
}
|
|
322
322
|
getError() {
|
|
323
323
|
const e = [...this.resolvePath, "error"];
|
|
324
|
-
return
|
|
325
|
-
|
|
324
|
+
return ye(
|
|
325
|
+
b().getError(this.handle),
|
|
326
326
|
(n) => new O(n, e)
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
listInputFields() {
|
|
330
|
-
return
|
|
330
|
+
return b().listInputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listOutputFields() {
|
|
333
|
-
return
|
|
333
|
+
return b().listOutputFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
listDynamicFields() {
|
|
336
|
-
return
|
|
336
|
+
return b().listDynamicFields(this.handle);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueBase64(e) {
|
|
339
|
-
return
|
|
339
|
+
return b().getKeyValueBase64(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsString(e) {
|
|
342
|
-
return
|
|
342
|
+
return b().getKeyValueAsString(this.handle, e);
|
|
343
343
|
}
|
|
344
344
|
getKeyValueAsJson(e) {
|
|
345
345
|
const n = this.getKeyValueAsString(e);
|
|
@@ -347,10 +347,10 @@ class O {
|
|
|
347
347
|
return JSON.parse(n);
|
|
348
348
|
}
|
|
349
349
|
getDataBase64() {
|
|
350
|
-
return
|
|
350
|
+
return b().getDataBase64(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsString() {
|
|
353
|
-
return
|
|
353
|
+
return b().getDataAsString(this.handle);
|
|
354
354
|
}
|
|
355
355
|
getDataAsJson() {
|
|
356
356
|
const e = this.getDataAsString();
|
|
@@ -363,7 +363,7 @@ class O {
|
|
|
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(([, o]) => {
|
|
366
|
-
if (!
|
|
366
|
+
if (!je(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
|
|
367
367
|
return o;
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -371,7 +371,7 @@ class O {
|
|
|
371
371
|
*
|
|
372
372
|
*/
|
|
373
373
|
parsePObjectCollection(e = !1, n = "") {
|
|
374
|
-
const r =
|
|
374
|
+
const r = b().parsePObjectCollection(
|
|
375
375
|
this.handle,
|
|
376
376
|
e,
|
|
377
377
|
n,
|
|
@@ -381,19 +381,19 @@ class O {
|
|
|
381
381
|
const i = {};
|
|
382
382
|
for (const [o, s] of Object.entries(r)) {
|
|
383
383
|
const a = [...this.resolvePath, o];
|
|
384
|
-
i[o] =
|
|
384
|
+
i[o] = Ae(s, (l) => new O(l, a));
|
|
385
385
|
}
|
|
386
386
|
return i;
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsBase64(e) {
|
|
389
|
-
return new L(
|
|
389
|
+
return new L(b().getBlobContentAsBase64(this.handle, e));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsString(e) {
|
|
392
|
-
return new L(
|
|
392
|
+
return new L(b().getBlobContentAsString(this.handle, e));
|
|
393
393
|
}
|
|
394
394
|
getFileContentAsJson(e) {
|
|
395
395
|
return new L(
|
|
396
|
-
|
|
396
|
+
b().getBlobContentAsString(this.handle, e)
|
|
397
397
|
).mapDefined((n) => JSON.parse(n));
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
@@ -412,7 +412,7 @@ class O {
|
|
|
412
412
|
* @returns downloaded file handle
|
|
413
413
|
*/
|
|
414
414
|
getFileHandle() {
|
|
415
|
-
return new L(
|
|
415
|
+
return new L(b().getDownloadedBlobContentHandle(this.handle));
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @deprecated use getFileHandle
|
|
@@ -424,7 +424,7 @@ class O {
|
|
|
424
424
|
* @returns downloaded file handle
|
|
425
425
|
*/
|
|
426
426
|
getRemoteFileHandle() {
|
|
427
|
-
return new L(
|
|
427
|
+
return new L(b().getOnDemandBlobContentHandle(this.handle));
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
430
|
* @deprecated use getRemoteFileHandle
|
|
@@ -436,22 +436,22 @@ class O {
|
|
|
436
436
|
* @returns the url to the extracted folder
|
|
437
437
|
*/
|
|
438
438
|
extractArchiveAndGetURL(e) {
|
|
439
|
-
return new L(
|
|
439
|
+
return new L(b().extractArchiveAndGetURL(this.handle, e));
|
|
440
440
|
}
|
|
441
441
|
getImportProgress() {
|
|
442
|
-
return new L(
|
|
442
|
+
return new L(b().getImportProgress(this.handle));
|
|
443
443
|
}
|
|
444
444
|
getLastLogs(e) {
|
|
445
|
-
return new L(
|
|
445
|
+
return new L(b().getLastLogs(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLog(e) {
|
|
448
|
-
return new L(
|
|
448
|
+
return new L(b().getProgressLog(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getProgressLogWithInfo(e) {
|
|
451
|
-
return new L(
|
|
451
|
+
return new L(b().getProgressLogWithInfo(this.handle, e));
|
|
452
452
|
}
|
|
453
453
|
getLogHandle() {
|
|
454
|
-
return new L(
|
|
454
|
+
return new L(b().getLogHandle(this.handle));
|
|
455
455
|
}
|
|
456
456
|
allFieldsResolved(e = "Input") {
|
|
457
457
|
switch (e) {
|
|
@@ -480,56 +480,56 @@ class O {
|
|
|
480
480
|
return o && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => s(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const We = "staging", Ge = "main", Ft = {
|
|
484
484
|
explicitColumnsSupport: !0,
|
|
485
485
|
inlineColumnsSupport: !0,
|
|
486
486
|
activeArgs: !0,
|
|
487
487
|
pTablePartitionFiltersSupport: !0,
|
|
488
488
|
pFrameInSetFilterSupport: !0
|
|
489
489
|
};
|
|
490
|
-
function
|
|
490
|
+
function He(t) {
|
|
491
491
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
492
492
|
}
|
|
493
493
|
function be(t, e, n) {
|
|
494
494
|
if (e.has(n)) return;
|
|
495
495
|
if (e.add(n), typeof n === "object")
|
|
496
|
-
if (
|
|
496
|
+
if (He(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
497
497
|
else if (Array.isArray(n))
|
|
498
498
|
for (const i of n) be(t, e, i);
|
|
499
499
|
else
|
|
500
500
|
for (const [, i] of Object.entries(n))
|
|
501
501
|
i !== n && be(t, e, i);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function It(t) {
|
|
504
504
|
const e = /* @__PURE__ */ new Set();
|
|
505
505
|
return be(e, /* @__PURE__ */ new Set(), t), e;
|
|
506
506
|
}
|
|
507
|
-
const
|
|
507
|
+
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
508
508
|
__proto__: null,
|
|
509
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
510
|
-
MainAccessorName:
|
|
511
|
-
StagingAccessorName:
|
|
512
|
-
getAllFutureAwaits:
|
|
513
|
-
isFutureAwait:
|
|
514
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
509
|
+
GlobalCfgRenderCtxFeatureFlags: Ft,
|
|
510
|
+
MainAccessorName: Ge,
|
|
511
|
+
StagingAccessorName: We,
|
|
512
|
+
getAllFutureAwaits: It,
|
|
513
|
+
isFutureAwait: He
|
|
514
|
+
}, Symbol.toStringTag, { value: "Module" })), _t = "pl7.app/label", Lt = "pl7.app/trace", Et = B.object({
|
|
515
515
|
type: B.string(),
|
|
516
516
|
importance: B.number().optional(),
|
|
517
517
|
id: B.string().optional(),
|
|
518
518
|
label: B.string()
|
|
519
|
-
}),
|
|
520
|
-
function
|
|
519
|
+
}), Vt = B.array(Et), kt = 1e-3, Ot = "__LABEL__", Ee = "__LABEL__@1";
|
|
520
|
+
function ze(t, e, n = {}) {
|
|
521
521
|
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = t.map((d) => {
|
|
522
|
-
var c,
|
|
523
|
-
const
|
|
524
|
-
let p,
|
|
525
|
-
"spec" in
|
|
526
|
-
const E = (c = p.annotations) == null ? void 0 : c[
|
|
527
|
-
...
|
|
522
|
+
var c, v;
|
|
523
|
+
const y = e(d);
|
|
524
|
+
let p, g, C;
|
|
525
|
+
"spec" in y && typeof y.spec == "object" ? (p = y.spec, g = y.prefixTrace, C = y.suffixTrace) : p = y;
|
|
526
|
+
const E = (c = p.annotations) == null ? void 0 : c[_t], x = (v = p.annotations) == null ? void 0 : v[Lt], S = (x ? Vt.safeParse(JSON.parse(x)).data : void 0) ?? [], P = [
|
|
527
|
+
...g ?? [],
|
|
528
528
|
...S,
|
|
529
529
|
...C ?? []
|
|
530
530
|
];
|
|
531
531
|
if (E !== void 0) {
|
|
532
|
-
const I = { label: E, type:
|
|
532
|
+
const I = { label: E, type: Ot, importance: -2 };
|
|
533
533
|
n.addLabelAsSuffix ? P.push(I) : P.splice(0, 0, I);
|
|
534
534
|
}
|
|
535
535
|
const T = [], F = /* @__PURE__ */ new Map();
|
|
@@ -552,15 +552,15 @@ function He(t, e, n = {}) {
|
|
|
552
552
|
fullTrace: T
|
|
553
553
|
};
|
|
554
554
|
}), a = [], l = [], u = [...r];
|
|
555
|
-
u.sort(([, d], [,
|
|
555
|
+
u.sort(([, d], [, y]) => y - d);
|
|
556
556
|
for (const [d] of u)
|
|
557
557
|
d.endsWith("@1") || o.get(d) === t.length ? a.push(d) : l.push(d);
|
|
558
|
-
const h = (d,
|
|
558
|
+
const h = (d, y = !1) => {
|
|
559
559
|
const p = [];
|
|
560
|
-
for (let
|
|
561
|
-
const C = s[
|
|
560
|
+
for (let g = 0; g < s.length; g++) {
|
|
561
|
+
const C = s[g], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
|
|
562
562
|
if (E.length === 0)
|
|
563
|
-
if (
|
|
563
|
+
if (y)
|
|
564
564
|
p.push({
|
|
565
565
|
label: "Unlabeled",
|
|
566
566
|
value: C.value
|
|
@@ -576,22 +576,22 @@ function He(t, e, n = {}) {
|
|
|
576
576
|
};
|
|
577
577
|
if (a.length === 0) {
|
|
578
578
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
579
|
-
return h(new Set(
|
|
579
|
+
return h(new Set(Ee), !0);
|
|
580
580
|
}
|
|
581
581
|
let f = 0, m = -1;
|
|
582
582
|
for (; f < a.length; ) {
|
|
583
583
|
const d = /* @__PURE__ */ new Set();
|
|
584
|
-
n.includeNativeLabel && d.add(
|
|
584
|
+
n.includeNativeLabel && d.add(Ee);
|
|
585
585
|
for (let p = 0; p < f; ++p) d.add(a[p]);
|
|
586
586
|
m >= 0 && d.add(a[m]);
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
587
|
+
const y = h(d);
|
|
588
|
+
if (y !== void 0 && new Set(y.map((p) => p.label)).size === t.length) return y;
|
|
589
589
|
m++, m >= a.length && (f++, m = f);
|
|
590
590
|
}
|
|
591
591
|
return h(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
592
592
|
}
|
|
593
|
-
const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned",
|
|
594
|
-
function
|
|
593
|
+
const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned", Xe = ee + "Partitioned/", ce = Xe + "JsonPartitioned", z = Xe + "BinaryPartitioned";
|
|
594
|
+
function Ye(t, e, n, r = [], i) {
|
|
595
595
|
if (t === void 0) return !1;
|
|
596
596
|
switch (t.resourceType.name) {
|
|
597
597
|
case le: {
|
|
@@ -608,7 +608,7 @@ function Xe(t, e, n, r = [], i) {
|
|
|
608
608
|
const a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
609
609
|
if (a === void 0) o = !1;
|
|
610
610
|
else {
|
|
611
|
-
const l = [...r, ...JSON.parse(s)], u =
|
|
611
|
+
const l = [...r, ...JSON.parse(s)], u = Ye(
|
|
612
612
|
a,
|
|
613
613
|
e,
|
|
614
614
|
n,
|
|
@@ -624,9 +624,9 @@ function Xe(t, e, n, r = [], i) {
|
|
|
624
624
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function Jn(t, e, n = !1) {
|
|
628
628
|
const r = [];
|
|
629
|
-
return { isComplete:
|
|
629
|
+
return { isComplete: Ye(t, e, r, [], n), data: r };
|
|
630
630
|
}
|
|
631
631
|
const ve = (t) => {
|
|
632
632
|
if (t.endsWith(".index"))
|
|
@@ -635,7 +635,7 @@ const ve = (t) => {
|
|
|
635
635
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
636
636
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
637
637
|
};
|
|
638
|
-
function
|
|
638
|
+
function Dt(t) {
|
|
639
639
|
if (!t) return;
|
|
640
640
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
641
641
|
let i = 0;
|
|
@@ -681,7 +681,7 @@ function Ot(t) {
|
|
|
681
681
|
}
|
|
682
682
|
return { data: r, keyLength: i };
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Rt(t) {
|
|
685
685
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
686
686
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
687
687
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -700,11 +700,11 @@ function Dt(t) {
|
|
|
700
700
|
}
|
|
701
701
|
return r.map((i) => Array.from(i.values()));
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Nt(t) {
|
|
704
704
|
if (t === void 0) return;
|
|
705
|
-
if (
|
|
706
|
-
return
|
|
707
|
-
const e =
|
|
705
|
+
if (qe(t))
|
|
706
|
+
return Rt(t);
|
|
707
|
+
const e = Dt(t);
|
|
708
708
|
if (!e) return;
|
|
709
709
|
const { data: n, keyLength: r } = e, i = [];
|
|
710
710
|
for (let o = 0; o < r; ++o)
|
|
@@ -815,15 +815,15 @@ function Ce(t, e = []) {
|
|
|
815
815
|
throw new Error(`Unknown resource type: ${n}`);
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Ut(t) {
|
|
819
819
|
if (t !== void 0) {
|
|
820
|
-
if (
|
|
821
|
-
if (pe(t)) return
|
|
820
|
+
if (qe(t)) return t;
|
|
821
|
+
if (pe(t)) return st(t);
|
|
822
822
|
if (t instanceof O) return Ce(t);
|
|
823
823
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Kt(t, e) {
|
|
827
827
|
const n = [...e].sort((o, s) => s[0] - o[0]);
|
|
828
828
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
829
829
|
const { partitionKeyLength: o } = t;
|
|
@@ -883,13 +883,13 @@ function Ut(t, e) {
|
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function Mt(t) {
|
|
887
887
|
if (!Array.isArray(t)) return !1;
|
|
888
888
|
if (t.length === 0) return !0;
|
|
889
889
|
const e = t[0];
|
|
890
890
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
891
891
|
}
|
|
892
|
-
class
|
|
892
|
+
class jt {
|
|
893
893
|
constructor(e) {
|
|
894
894
|
this.columns = e;
|
|
895
895
|
}
|
|
@@ -898,30 +898,30 @@ class Mt {
|
|
|
898
898
|
return this.columns.filter((r) => n(r.spec));
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function qt(t) {
|
|
902
902
|
if (t)
|
|
903
903
|
return t.map((e) => ({
|
|
904
|
-
type: `split:${
|
|
904
|
+
type: `split:${ct(e.axisId)}`,
|
|
905
905
|
label: e.label,
|
|
906
906
|
importance: 1e6
|
|
907
907
|
// High importance for split filters in labels
|
|
908
908
|
}));
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Bt(t) {
|
|
911
911
|
if (t)
|
|
912
912
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Jt(t, e) {
|
|
915
915
|
if (!e || e.length === 0) return t;
|
|
916
916
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
917
|
-
return
|
|
917
|
+
return Be({ id: t, axisFilters: n });
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Ve(t) {
|
|
920
920
|
if (!t || typeof t != "object") return !1;
|
|
921
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);
|
|
922
922
|
return !!e.domainAnchor || n || r;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function $t(t) {
|
|
925
925
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
926
926
|
return [];
|
|
927
927
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -931,9 +931,9 @@ function Jt(t) {
|
|
|
931
931
|
}
|
|
932
932
|
class Q {
|
|
933
933
|
constructor() {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
934
|
+
V(this, "defaultProviderStore", []);
|
|
935
|
+
V(this, "providers", [new jt(this.defaultProviderStore)]);
|
|
936
|
+
V(this, "axisLabelProviders", []);
|
|
937
937
|
}
|
|
938
938
|
addColumnProvider(e) {
|
|
939
939
|
return this.providers.push(e), this;
|
|
@@ -961,24 +961,24 @@ class Q {
|
|
|
961
961
|
};
|
|
962
962
|
let u = () => !1;
|
|
963
963
|
if (a) {
|
|
964
|
-
const p = (Array.isArray(a) ? a : [a]).map((
|
|
965
|
-
if (
|
|
964
|
+
const p = (Array.isArray(a) ? a : [a]).map((g) => {
|
|
965
|
+
if (Ve(g)) {
|
|
966
966
|
if (!r)
|
|
967
967
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
968
|
-
return Y(
|
|
968
|
+
return Y(xe(r.anchors, g, n));
|
|
969
969
|
} else
|
|
970
|
-
return Y(
|
|
970
|
+
return Y(g);
|
|
971
971
|
});
|
|
972
|
-
u = (
|
|
972
|
+
u = (g) => p.some((C) => C(g));
|
|
973
973
|
}
|
|
974
974
|
const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m = /* @__PURE__ */ new Set();
|
|
975
975
|
for (const p of h) {
|
|
976
|
-
const
|
|
976
|
+
const g = Ve(p);
|
|
977
977
|
let C;
|
|
978
|
-
if (
|
|
978
|
+
if (g) {
|
|
979
979
|
if (!r)
|
|
980
980
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
981
|
-
C =
|
|
981
|
+
C = xe(r.anchors, p, n);
|
|
982
982
|
} else
|
|
983
983
|
C = p;
|
|
984
984
|
const E = /* @__PURE__ */ new Set(), x = [];
|
|
@@ -988,38 +988,38 @@ class Q {
|
|
|
988
988
|
if (u(c.spec)) continue;
|
|
989
989
|
if (E.has(c.id))
|
|
990
990
|
throw new Error(`Duplicate column id ${c.id} in provider ${T.constructor.name}`);
|
|
991
|
-
const
|
|
992
|
-
m.has(
|
|
991
|
+
const v = at(c.spec);
|
|
992
|
+
m.has(v) || (E.add(c.id), m.add(v), x.push(c));
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
995
|
if (x.length === 0) continue;
|
|
996
|
-
const S =
|
|
996
|
+
const S = $t(p), P = S.length > 0;
|
|
997
997
|
for (const T of x) {
|
|
998
998
|
if (!oe(T.spec)) continue;
|
|
999
999
|
const F = T.spec;
|
|
1000
1000
|
if (P) {
|
|
1001
|
-
if (
|
|
1001
|
+
if (Mt(T.data))
|
|
1002
1002
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T.id}`);
|
|
1003
|
-
const c =
|
|
1003
|
+
const c = Ut(T.data);
|
|
1004
1004
|
if (!c) {
|
|
1005
1005
|
if (o) continue;
|
|
1006
1006
|
return;
|
|
1007
1007
|
}
|
|
1008
|
-
if (!
|
|
1008
|
+
if (!lt(c))
|
|
1009
1009
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${T.id}`);
|
|
1010
|
-
const
|
|
1010
|
+
const v = Nt(c), I = S[S.length - 1];
|
|
1011
1011
|
if (I >= c.partitionKeyLength)
|
|
1012
1012
|
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${I}) in column ${F.name}`);
|
|
1013
|
-
const $ = S.map((_) => this.findLabels(
|
|
1013
|
+
const $ = S.map((_) => this.findLabels(k(F.axesSpec[_]))), K = [], j = (_, W) => {
|
|
1014
1014
|
if (W >= S.length) {
|
|
1015
1015
|
if (K.push([..._]), K.length > 1e4)
|
|
1016
1016
|
throw new Error("Too many key combinations, aborting.");
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
1019
|
const M = S[W];
|
|
1020
|
-
if (M >=
|
|
1021
|
-
throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${
|
|
1022
|
-
const q =
|
|
1020
|
+
if (M >= v.length)
|
|
1021
|
+
throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${v.length}) during split key generation for column ${T.id}`);
|
|
1022
|
+
const q = v[M];
|
|
1023
1023
|
if (!q || q.length === 0) {
|
|
1024
1024
|
K.length = 0;
|
|
1025
1025
|
return;
|
|
@@ -1029,20 +1029,20 @@ class Q {
|
|
|
1029
1029
|
};
|
|
1030
1030
|
if (j([], 0), K.length === 0)
|
|
1031
1031
|
continue;
|
|
1032
|
-
const N = [...F.axesSpec],
|
|
1032
|
+
const N = [...F.axesSpec], et = S.map((_) => _);
|
|
1033
1033
|
for (let _ = S.length - 1; _ >= 0; _--)
|
|
1034
1034
|
N.splice(S[_], 1);
|
|
1035
|
-
const
|
|
1035
|
+
const tt = { ...F, axesSpec: N };
|
|
1036
1036
|
for (const _ of K) {
|
|
1037
1037
|
const W = _.map((M, q) => {
|
|
1038
|
-
const te =
|
|
1039
|
-
return { axisIdx: te, axisId:
|
|
1038
|
+
const te = et[q], nt = k(F.axesSpec[te]), de = $[q], rt = (de == null ? void 0 : de[M]) ?? String(M);
|
|
1039
|
+
return { axisIdx: te, axisId: nt, value: M, label: rt };
|
|
1040
1040
|
});
|
|
1041
1041
|
f.push({
|
|
1042
1042
|
type: "split",
|
|
1043
1043
|
originalColumn: T,
|
|
1044
1044
|
spec: F,
|
|
1045
|
-
adjustedSpec:
|
|
1045
|
+
adjustedSpec: tt,
|
|
1046
1046
|
dataEntries: c,
|
|
1047
1047
|
axisFilters: W
|
|
1048
1048
|
});
|
|
@@ -1057,33 +1057,33 @@ class Q {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
if (f.length === 0) return [];
|
|
1060
|
-
const d =
|
|
1060
|
+
const d = ze(
|
|
1061
1061
|
f,
|
|
1062
1062
|
(p) => ({
|
|
1063
1063
|
spec: p.spec,
|
|
1064
|
-
suffixTrace: p.type === "split" ?
|
|
1064
|
+
suffixTrace: p.type === "split" ? qt(p.axisFilters) : void 0
|
|
1065
1065
|
}),
|
|
1066
1066
|
l
|
|
1067
|
-
),
|
|
1068
|
-
for (const { value: p, label:
|
|
1069
|
-
const { originalColumn: C, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, S =
|
|
1067
|
+
), y = [];
|
|
1068
|
+
for (const { value: p, label: g } of d) {
|
|
1069
|
+
const { originalColumn: C, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, S = Bt(x);
|
|
1070
1070
|
let P;
|
|
1071
|
-
r ? P = r.deriveS(E, S) : P =
|
|
1071
|
+
r ? P = r.deriveS(E, S) : P = Jt(C.id, S);
|
|
1072
1072
|
let T = { ...p.adjustedSpec };
|
|
1073
1073
|
s && (T = {
|
|
1074
1074
|
...T,
|
|
1075
1075
|
annotations: {
|
|
1076
1076
|
...T.annotations ?? {},
|
|
1077
|
-
"pl7.app/label":
|
|
1077
|
+
"pl7.app/label": g
|
|
1078
1078
|
}
|
|
1079
|
-
}),
|
|
1079
|
+
}), y.push({
|
|
1080
1080
|
id: P,
|
|
1081
1081
|
spec: T,
|
|
1082
|
-
data: () => p.type === "split" ?
|
|
1083
|
-
label:
|
|
1082
|
+
data: () => p.type === "split" ? ut(Kt(p.dataEntries, S)) : p.originalColumn.data,
|
|
1083
|
+
label: g
|
|
1084
1084
|
});
|
|
1085
1085
|
}
|
|
1086
|
-
return
|
|
1086
|
+
return y;
|
|
1087
1087
|
}
|
|
1088
1088
|
getColumns(e, n) {
|
|
1089
1089
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1149,11 +1149,11 @@ function he(t, e) {
|
|
|
1149
1149
|
return !0;
|
|
1150
1150
|
}
|
|
1151
1151
|
function ke(t) {
|
|
1152
|
-
return
|
|
1152
|
+
return Ae(t, (e) => e instanceof O ? e.handle : pe(e) ? gt(e, (n) => n.handle) : e);
|
|
1153
1153
|
}
|
|
1154
|
-
class
|
|
1154
|
+
class Wt {
|
|
1155
1155
|
constructor() {
|
|
1156
|
-
|
|
1156
|
+
V(this, "ctx", b());
|
|
1157
1157
|
}
|
|
1158
1158
|
/**
|
|
1159
1159
|
* @deprecated use getOptions()
|
|
@@ -1164,26 +1164,26 @@ class $t {
|
|
|
1164
1164
|
getOptions(e, n) {
|
|
1165
1165
|
const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1166
1166
|
let o = {}, s = !1;
|
|
1167
|
-
return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ?
|
|
1168
|
-
ref:
|
|
1167
|
+
return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? ze(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1168
|
+
ref: Fe(a, s),
|
|
1169
1169
|
label: l
|
|
1170
1170
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1171
|
-
ref:
|
|
1171
|
+
ref: Fe(a, s),
|
|
1172
1172
|
label: o(l, a)
|
|
1173
1173
|
}));
|
|
1174
1174
|
}
|
|
1175
1175
|
resolveAnchorCtx(e) {
|
|
1176
|
-
if (e instanceof
|
|
1176
|
+
if (e instanceof Ie) return e;
|
|
1177
1177
|
const n = {};
|
|
1178
1178
|
for (const [r, i] of Object.entries(e))
|
|
1179
|
-
if (
|
|
1179
|
+
if (pt(i)) {
|
|
1180
1180
|
const o = this.getPColumnSpecByRef(i);
|
|
1181
1181
|
if (!o)
|
|
1182
1182
|
return;
|
|
1183
1183
|
n[r] = o;
|
|
1184
1184
|
} else
|
|
1185
1185
|
n[r] = i;
|
|
1186
|
-
return new
|
|
1186
|
+
return new Ie(n);
|
|
1187
1187
|
}
|
|
1188
1188
|
/**
|
|
1189
1189
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1276,7 +1276,7 @@ class $t {
|
|
|
1276
1276
|
ref: n.ref,
|
|
1277
1277
|
obj: {
|
|
1278
1278
|
...n.obj,
|
|
1279
|
-
data:
|
|
1279
|
+
data: dt(
|
|
1280
1280
|
n.obj.data,
|
|
1281
1281
|
(r) => new O(r, [n.ref.blockId, n.ref.name])
|
|
1282
1282
|
)
|
|
@@ -1305,7 +1305,7 @@ class $t {
|
|
|
1305
1305
|
)) == null ? void 0 : r.obj;
|
|
1306
1306
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1307
1307
|
if (n)
|
|
1308
|
-
return
|
|
1308
|
+
return Ae(
|
|
1309
1309
|
n,
|
|
1310
1310
|
(i) => new O(i, [e.blockId, e.name])
|
|
1311
1311
|
);
|
|
@@ -1318,7 +1318,7 @@ class $t {
|
|
|
1318
1318
|
getPColumnByRef(e) {
|
|
1319
1319
|
const n = this.getDataByRef(e);
|
|
1320
1320
|
if (n)
|
|
1321
|
-
return
|
|
1321
|
+
return ft(n);
|
|
1322
1322
|
}
|
|
1323
1323
|
/**
|
|
1324
1324
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1368,7 +1368,7 @@ class $t {
|
|
|
1368
1368
|
findLabels(e) {
|
|
1369
1369
|
const n = this.getData();
|
|
1370
1370
|
for (const r of n.entries) {
|
|
1371
|
-
if (!
|
|
1371
|
+
if (!je(r.obj)) continue;
|
|
1372
1372
|
const i = r.obj.spec;
|
|
1373
1373
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && he(e.domain, i.axesSpec[0].domain)) {
|
|
1374
1374
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -1395,7 +1395,7 @@ class $t {
|
|
|
1395
1395
|
let a = null;
|
|
1396
1396
|
const l = this;
|
|
1397
1397
|
return {
|
|
1398
|
-
id:
|
|
1398
|
+
id: Be(i),
|
|
1399
1399
|
spec: s,
|
|
1400
1400
|
get data() {
|
|
1401
1401
|
var u;
|
|
@@ -1422,13 +1422,13 @@ class $t {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
class ne {
|
|
1424
1424
|
constructor() {
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1425
|
+
V(this, "ctx");
|
|
1426
|
+
V(this, "_argsCache");
|
|
1427
|
+
V(this, "_uiStateCache");
|
|
1428
1428
|
// lazy rendering because this feature is rarely used
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
this.ctx =
|
|
1429
|
+
V(this, "_activeArgsCache");
|
|
1430
|
+
V(this, "resultPool", new Wt());
|
|
1431
|
+
this.ctx = b();
|
|
1432
1432
|
}
|
|
1433
1433
|
get args() {
|
|
1434
1434
|
if (this._argsCache === void 0) {
|
|
@@ -1462,16 +1462,16 @@ class ne {
|
|
|
1462
1462
|
// return this.ctx.featureFlags;
|
|
1463
1463
|
// }
|
|
1464
1464
|
getNamedAccessor(e) {
|
|
1465
|
-
return
|
|
1465
|
+
return ye(
|
|
1466
1466
|
this.ctx.getAccessorHandleByName(e),
|
|
1467
1467
|
(n) => new O(n, [e])
|
|
1468
1468
|
);
|
|
1469
1469
|
}
|
|
1470
1470
|
get prerun() {
|
|
1471
|
-
return this.getNamedAccessor(
|
|
1471
|
+
return this.getNamedAccessor(We);
|
|
1472
1472
|
}
|
|
1473
1473
|
get outputs() {
|
|
1474
|
-
return this.getNamedAccessor(
|
|
1474
|
+
return this.getNamedAccessor(Ge);
|
|
1475
1475
|
}
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1514,8 +1514,8 @@ class ne {
|
|
|
1514
1514
|
partitionFilters: e.filters ?? [],
|
|
1515
1515
|
filters: [],
|
|
1516
1516
|
sorting: e.sorting ?? []
|
|
1517
|
-
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
1518
|
-
|
|
1517
|
+
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(ht(n.src)), this.ctx.createPTable(
|
|
1518
|
+
mt(n, (r) => ke(r))
|
|
1519
1519
|
);
|
|
1520
1520
|
}
|
|
1521
1521
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1535,15 +1535,15 @@ class ne {
|
|
|
1535
1535
|
this.ctx.logError(e);
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
|
-
const X = "1.
|
|
1539
|
-
function
|
|
1538
|
+
const X = "1.41.0";
|
|
1539
|
+
function Gt(t) {
|
|
1540
1540
|
return t.__renderLambda === !0;
|
|
1541
1541
|
}
|
|
1542
1542
|
function me(t) {
|
|
1543
1543
|
if (t !== void 0)
|
|
1544
|
-
return
|
|
1544
|
+
return Gt(t) ? t.handle : t;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function $n(t) {
|
|
1547
1547
|
return yt(t);
|
|
1548
1548
|
}
|
|
1549
1549
|
const w = class w {
|
|
@@ -1712,6 +1712,20 @@ const w = class w {
|
|
|
1712
1712
|
this._featureFlags
|
|
1713
1713
|
);
|
|
1714
1714
|
}
|
|
1715
|
+
/** Sets or overrides feature flags for the block. */
|
|
1716
|
+
withFeatureFlags(e) {
|
|
1717
|
+
return new w(
|
|
1718
|
+
this._renderingMode,
|
|
1719
|
+
this._initialArgs,
|
|
1720
|
+
this._initialUiState,
|
|
1721
|
+
this._outputs,
|
|
1722
|
+
this._inputsValid,
|
|
1723
|
+
this._sections,
|
|
1724
|
+
this._title,
|
|
1725
|
+
this._enrichmentTargets,
|
|
1726
|
+
{ ...this._featureFlags, ...e }
|
|
1727
|
+
);
|
|
1728
|
+
}
|
|
1715
1729
|
/**
|
|
1716
1730
|
* Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
|
|
1717
1731
|
* Influences dependency graph construction.
|
|
@@ -1732,9 +1746,16 @@ const w = class w {
|
|
|
1732
1746
|
/** Renders all provided block settings into a pre-configured platforma API
|
|
1733
1747
|
* instance, that can be used in frontend to interact with block state, and
|
|
1734
1748
|
* other features provided by the platforma to the block. */
|
|
1735
|
-
done() {
|
|
1749
|
+
done(e) {
|
|
1750
|
+
const n = e ?? 1;
|
|
1751
|
+
return this.withFeatureFlags({
|
|
1752
|
+
...this._featureFlags,
|
|
1753
|
+
requiresUIAPIVersion: n
|
|
1754
|
+
})._done(n);
|
|
1755
|
+
}
|
|
1756
|
+
_done(e) {
|
|
1736
1757
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1737
|
-
const
|
|
1758
|
+
const n = {
|
|
1738
1759
|
v3: {
|
|
1739
1760
|
sdkVersion: X,
|
|
1740
1761
|
renderingMode: this._renderingMode,
|
|
@@ -1754,19 +1775,19 @@ const w = class w {
|
|
|
1754
1775
|
inputsValid: me(this._inputsValid),
|
|
1755
1776
|
sections: me(this._sections),
|
|
1756
1777
|
outputs: Object.fromEntries(
|
|
1757
|
-
Object.entries(this._outputs).map(([
|
|
1778
|
+
Object.entries(this._outputs).map(([r, i]) => [r, me(i)])
|
|
1758
1779
|
)
|
|
1759
1780
|
};
|
|
1760
|
-
return
|
|
1781
|
+
return globalThis.platformaApiVersion = e, At() ? $e({ sdkVersion: X, apiVersion: platformaApiVersion }) : { config: n };
|
|
1761
1782
|
}
|
|
1762
1783
|
};
|
|
1763
|
-
|
|
1784
|
+
V(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
1764
1785
|
supportsLazyState: !0,
|
|
1765
1786
|
requiresUIAPIVersion: 1,
|
|
1766
1787
|
requiresModelAPIVersion: 1
|
|
1767
1788
|
});
|
|
1768
|
-
let
|
|
1769
|
-
function
|
|
1789
|
+
let Oe = w;
|
|
1790
|
+
function Qe() {
|
|
1770
1791
|
return {
|
|
1771
1792
|
sourceId: null,
|
|
1772
1793
|
hiddenColIds: null,
|
|
@@ -1775,45 +1796,45 @@ function Ye() {
|
|
|
1775
1796
|
sorting: []
|
|
1776
1797
|
};
|
|
1777
1798
|
}
|
|
1778
|
-
function
|
|
1799
|
+
function De() {
|
|
1779
1800
|
return {
|
|
1780
1801
|
version: 4,
|
|
1781
1802
|
stateCache: [],
|
|
1782
|
-
pTableParams:
|
|
1803
|
+
pTableParams: Qe()
|
|
1783
1804
|
};
|
|
1784
1805
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return "version" in t || (t =
|
|
1806
|
+
function Ht(t) {
|
|
1807
|
+
return "version" in t || (t = De()), t.version === 2 && (t = {
|
|
1787
1808
|
version: 3,
|
|
1788
1809
|
stateCache: t.stateCache.map((e) => ({
|
|
1789
1810
|
...e,
|
|
1790
1811
|
filtersState: []
|
|
1791
1812
|
})),
|
|
1792
|
-
pTableParams:
|
|
1793
|
-
}), t.version === 3 && (t =
|
|
1813
|
+
pTableParams: Qe()
|
|
1814
|
+
}), t.version === 3 && (t = De()), t;
|
|
1794
1815
|
}
|
|
1795
1816
|
function Se(t) {
|
|
1796
1817
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1797
1818
|
}
|
|
1798
|
-
function
|
|
1819
|
+
function zt(t) {
|
|
1799
1820
|
return new Q().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1800
1821
|
name: "pl7.app/label",
|
|
1801
1822
|
axes: [{}]
|
|
1802
1823
|
// exactly one axis
|
|
1803
1824
|
}, { dontWaitAllData: !0 });
|
|
1804
1825
|
}
|
|
1805
|
-
function
|
|
1826
|
+
function Re(t, e) {
|
|
1806
1827
|
const n = [], r = [];
|
|
1807
1828
|
for (const a of t)
|
|
1808
1829
|
Se(a.spec) ? n.push(a) : r.push(a);
|
|
1809
1830
|
const i = [];
|
|
1810
1831
|
for (const a of r)
|
|
1811
1832
|
for (const l of a.spec.axesSpec) {
|
|
1812
|
-
const u =
|
|
1833
|
+
const u = k(l);
|
|
1813
1834
|
i.some((h) => U(h, u)) || i.push(u);
|
|
1814
1835
|
}
|
|
1815
1836
|
for (const a of n) {
|
|
1816
|
-
const l =
|
|
1837
|
+
const l = k(a.spec.axesSpec[0]), u = i.findIndex((h) => U(h, l));
|
|
1817
1838
|
u !== -1 && i.splice(u, 1);
|
|
1818
1839
|
}
|
|
1819
1840
|
const o = (a, l) => {
|
|
@@ -1824,7 +1845,7 @@ function De(t, e) {
|
|
|
1824
1845
|
return u;
|
|
1825
1846
|
}, s = [];
|
|
1826
1847
|
for (const a of e) {
|
|
1827
|
-
const l = a.spec.axesSpec[0], u =
|
|
1848
|
+
const l = a.spec.axesSpec[0], u = k(l), h = i.findIndex((f) => U(f, u));
|
|
1828
1849
|
if (h !== -1) {
|
|
1829
1850
|
const f = i[h], m = Object.keys(f.domain ?? {}).length, d = Object.keys(l.domain ?? {}).length;
|
|
1830
1851
|
m > d ? s.push({
|
|
@@ -1839,7 +1860,7 @@ function De(t, e) {
|
|
|
1839
1860
|
}
|
|
1840
1861
|
return s;
|
|
1841
1862
|
}
|
|
1842
|
-
function
|
|
1863
|
+
function Xt(t) {
|
|
1843
1864
|
const e = (i) => Array.isArray(i), n = (i) => i instanceof O, r = (i) => typeof i == "object" && "type" in i;
|
|
1844
1865
|
return t.map((i) => i.data).every((i) => {
|
|
1845
1866
|
if (e(i))
|
|
@@ -1859,7 +1880,7 @@ function zt(t) {
|
|
|
1859
1880
|
throw Error(`unsupported column data type: ${i}`);
|
|
1860
1881
|
});
|
|
1861
1882
|
}
|
|
1862
|
-
function
|
|
1883
|
+
function Ne(t) {
|
|
1863
1884
|
let e = t.columns;
|
|
1864
1885
|
const n = [];
|
|
1865
1886
|
if (t.coreColumnPredicate) {
|
|
@@ -1881,71 +1902,68 @@ function Re(t) {
|
|
|
1881
1902
|
sorting: t.sorting
|
|
1882
1903
|
};
|
|
1883
1904
|
}
|
|
1884
|
-
function
|
|
1905
|
+
function Yt(t) {
|
|
1885
1906
|
var e;
|
|
1886
1907
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
1887
1908
|
}
|
|
1888
|
-
function
|
|
1909
|
+
function Qt(t) {
|
|
1889
1910
|
var e;
|
|
1890
1911
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1891
1912
|
}
|
|
1892
|
-
function
|
|
1913
|
+
function ge(t, e) {
|
|
1893
1914
|
return [...new Map(t.map((n) => [e(n), n])).values()];
|
|
1894
1915
|
}
|
|
1895
|
-
function
|
|
1916
|
+
function Wn(t, e, n, r) {
|
|
1896
1917
|
if (e.length === 0) return;
|
|
1897
|
-
const i = e.filter((c) => !
|
|
1918
|
+
const i = e.filter((c) => Pe(c.spec) || !Yt(c.spec)), o = Ht(n), s = zt(t.resultPool);
|
|
1898
1919
|
if (!s) return;
|
|
1899
|
-
const a =
|
|
1900
|
-
...
|
|
1901
|
-
[...l.flatMap((c) => c.spec.axesSpec.map((
|
|
1920
|
+
const a = Re(i.map(_e), s), l = [...i, ...a], h = [
|
|
1921
|
+
...ge(
|
|
1922
|
+
[...l.flatMap((c) => c.spec.axesSpec.map((v) => k(v)))],
|
|
1902
1923
|
(c) => D(c)
|
|
1903
1924
|
).map((c) => ({ type: "axis", id: c })),
|
|
1904
1925
|
...l.map((c) => ({ type: "column", id: c.id }))
|
|
1905
|
-
], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full",
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1908
|
-
}), p =
|
|
1926
|
+
], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", y = o.pTableParams.partitionFilters.filter((c) => {
|
|
1927
|
+
const v = m(c.column);
|
|
1928
|
+
return v || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
|
|
1929
|
+
}), p = ge(
|
|
1909
1930
|
[...(r == null ? void 0 : r.filters) ?? [], ...o.pTableParams.filters],
|
|
1910
1931
|
(c) => D(c.column)
|
|
1911
1932
|
).filter((c) => {
|
|
1912
|
-
const
|
|
1913
|
-
return
|
|
1914
|
-
}),
|
|
1933
|
+
const v = m(c.column);
|
|
1934
|
+
return v || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), v;
|
|
1935
|
+
}), g = ge(
|
|
1915
1936
|
[...(r == null ? void 0 : r.sorting) ?? [], ...o.pTableParams.sorting],
|
|
1916
1937
|
(c) => D(c.column)
|
|
1917
1938
|
).filter((c) => {
|
|
1918
|
-
const
|
|
1919
|
-
return
|
|
1920
|
-
}), C =
|
|
1939
|
+
const v = m(c.column);
|
|
1940
|
+
return v || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), v;
|
|
1941
|
+
}), C = Ne({
|
|
1921
1942
|
columns: i,
|
|
1922
1943
|
labelColumns: a,
|
|
1923
1944
|
coreJoinType: d,
|
|
1924
|
-
partitionFilters:
|
|
1945
|
+
partitionFilters: y,
|
|
1925
1946
|
filters: p,
|
|
1926
|
-
sorting:
|
|
1947
|
+
sorting: g,
|
|
1927
1948
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1928
1949
|
}), E = t.createPTable(C), x = new Set((() => {
|
|
1929
1950
|
if (d === "inner") return [];
|
|
1930
1951
|
const c = o.pTableParams.hiddenColIds;
|
|
1931
|
-
return c || i.filter((
|
|
1952
|
+
return c || i.filter((v) => Qt(v.spec)).map((v) => v.id);
|
|
1932
1953
|
})());
|
|
1933
|
-
i.filter((c) => {
|
|
1934
|
-
var b;
|
|
1935
|
-
return ((b = c.spec.annotations) == null ? void 0 : b["pl7.app/isLinkerColumn"]) === "true";
|
|
1936
|
-
}).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((b) => {
|
|
1954
|
+
i.filter((c) => Pe(c.spec)).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((v) => {
|
|
1937
1955
|
var I;
|
|
1938
|
-
return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r,
|
|
1939
|
-
}).forEach((
|
|
1940
|
-
const S = i.filter((c) => !x.has(c.id)), P =
|
|
1941
|
-
if (!
|
|
1942
|
-
const T =
|
|
1956
|
+
return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, v.spec) ? [v.id] : [];
|
|
1957
|
+
}).forEach((v) => x.delete(v)), [...y.map((c) => c.column), ...p.map((c) => c.column), ...g.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
|
|
1958
|
+
const S = i.filter((c) => !x.has(c.id)), P = Re(S.map(_e), s);
|
|
1959
|
+
if (!Xt([...S, ...P])) return;
|
|
1960
|
+
const T = Ne({
|
|
1943
1961
|
columns: S,
|
|
1944
1962
|
labelColumns: P,
|
|
1945
1963
|
coreJoinType: d,
|
|
1946
|
-
partitionFilters:
|
|
1964
|
+
partitionFilters: y,
|
|
1947
1965
|
filters: p,
|
|
1948
|
-
sorting:
|
|
1966
|
+
sorting: g,
|
|
1949
1967
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1950
1968
|
}), F = t.createPTable(T);
|
|
1951
1969
|
return {
|
|
@@ -1954,7 +1972,7 @@ function Gn(t, e, n, r) {
|
|
|
1954
1972
|
visibleTableHandle: F
|
|
1955
1973
|
};
|
|
1956
1974
|
}
|
|
1957
|
-
function
|
|
1975
|
+
function Gn(t, e, n) {
|
|
1958
1976
|
const r = t.resultPool.findLabels(e);
|
|
1959
1977
|
return {
|
|
1960
1978
|
axis: e,
|
|
@@ -1965,7 +1983,7 @@ function Hn(t, e, n) {
|
|
|
1965
1983
|
defaultValue: n[0]
|
|
1966
1984
|
};
|
|
1967
1985
|
}
|
|
1968
|
-
const
|
|
1986
|
+
const Zt = (t, e) => {
|
|
1969
1987
|
let n = t.toString();
|
|
1970
1988
|
return e == null || e.forEach((r) => {
|
|
1971
1989
|
if (r)
|
|
@@ -1973,7 +1991,7 @@ const Qt = (t, e) => {
|
|
|
1973
1991
|
n += i, n += o;
|
|
1974
1992
|
}), n;
|
|
1975
1993
|
};
|
|
1976
|
-
function
|
|
1994
|
+
function en(t) {
|
|
1977
1995
|
if (!t.length)
|
|
1978
1996
|
return [];
|
|
1979
1997
|
let e = [[]];
|
|
@@ -1984,16 +2002,16 @@ function Zt(t) {
|
|
|
1984
2002
|
}), e = r;
|
|
1985
2003
|
}), e;
|
|
1986
2004
|
}
|
|
1987
|
-
function
|
|
2005
|
+
function Pe(t) {
|
|
1988
2006
|
var e;
|
|
1989
2007
|
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
|
|
1990
2008
|
}
|
|
1991
|
-
const tn = "pl7.app/graph/isVirtual",
|
|
2009
|
+
const tn = "pl7.app/graph/isVirtual", Ue = "pl7.app/label", nn = "pl7.app/isLinkerColumn";
|
|
1992
2010
|
function rn(t) {
|
|
1993
2011
|
var n, r;
|
|
1994
2012
|
const e = /* @__PURE__ */ new Map();
|
|
1995
2013
|
for (const { spec: i } of t) {
|
|
1996
|
-
const o = i.axesSpec.map(
|
|
2014
|
+
const o = i.axesSpec.map(k).map(D);
|
|
1997
2015
|
o.forEach((s) => {
|
|
1998
2016
|
e.has(s) || e.set(s, /* @__PURE__ */ new Set());
|
|
1999
2017
|
});
|
|
@@ -2006,7 +2024,7 @@ function rn(t) {
|
|
|
2006
2024
|
return e;
|
|
2007
2025
|
}
|
|
2008
2026
|
function on(t, e) {
|
|
2009
|
-
const n = rn(t), r = [...n.keys()].map(
|
|
2027
|
+
const n = rn(t), r = [...n.keys()].map(Le), i = [];
|
|
2010
2028
|
for (const l of e.values()) {
|
|
2011
2029
|
const u = r.find((h) => U(l, h));
|
|
2012
2030
|
u && i.push(D(u));
|
|
@@ -2017,19 +2035,19 @@ function on(t, e) {
|
|
|
2017
2035
|
const l = [];
|
|
2018
2036
|
for (const u of a)
|
|
2019
2037
|
for (const h of n.get(u) ?? [])
|
|
2020
|
-
o.has(h) || (l.push(h), o.add(h), s.set(h,
|
|
2038
|
+
o.has(h) || (l.push(h), o.add(h), s.set(h, Le(h)));
|
|
2021
2039
|
a = l;
|
|
2022
2040
|
}
|
|
2023
2041
|
return s;
|
|
2024
2042
|
}
|
|
2025
|
-
function
|
|
2043
|
+
function Ke(t, e) {
|
|
2026
2044
|
const n = [];
|
|
2027
2045
|
return e.forEach((r) => {
|
|
2028
2046
|
n.push(...sn(t, r));
|
|
2029
2047
|
}), n;
|
|
2030
2048
|
}
|
|
2031
2049
|
function sn(t, e) {
|
|
2032
|
-
const n = e.spec.axesSpec.map(
|
|
2050
|
+
const n = e.spec.axesSpec.map(k);
|
|
2033
2051
|
if (n.every((u) => t.has(D(u))))
|
|
2034
2052
|
return [e];
|
|
2035
2053
|
const r = n.map((u) => {
|
|
@@ -2037,13 +2055,13 @@ function sn(t, e) {
|
|
|
2037
2055
|
for (const [f, m] of t)
|
|
2038
2056
|
U(m, u) && !U(u, m) && h.push(m);
|
|
2039
2057
|
return h;
|
|
2040
|
-
}), i =
|
|
2058
|
+
}), i = en(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((u) => {
|
|
2041
2059
|
const h = /* @__PURE__ */ new Set();
|
|
2042
2060
|
return u.map((f, m) => {
|
|
2043
|
-
const d = e.spec.axesSpec[m].domain,
|
|
2044
|
-
return Object.entries(
|
|
2061
|
+
const d = e.spec.axesSpec[m].domain, y = f.domain;
|
|
2062
|
+
return Object.entries(y ?? {}).forEach(([p, g]) => {
|
|
2045
2063
|
if ((d == null ? void 0 : d[p]) === void 0) {
|
|
2046
|
-
const C = JSON.stringify([p,
|
|
2064
|
+
const C = JSON.stringify([p, g]);
|
|
2047
2065
|
h.add(C), o.add(C);
|
|
2048
2066
|
}
|
|
2049
2067
|
}), {
|
|
@@ -2057,22 +2075,22 @@ function sn(t, e) {
|
|
|
2057
2075
|
});
|
|
2058
2076
|
const l = i.map((u, h) => {
|
|
2059
2077
|
var p;
|
|
2060
|
-
const f =
|
|
2078
|
+
const f = Zt(e.id, u.map((g) => g.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ue]) ?? "", d = [...a[h]].filter((g) => s.has(g)).sort().map((g) => {
|
|
2061
2079
|
var C;
|
|
2062
|
-
return (C = JSON.parse(
|
|
2063
|
-
}).join(" / "),
|
|
2080
|
+
return (C = JSON.parse(g)) == null ? void 0 : C[1];
|
|
2081
|
+
}).join(" / "), y = {
|
|
2064
2082
|
...e.spec.annotations,
|
|
2065
2083
|
[tn]: "true"
|
|
2066
2084
|
};
|
|
2067
|
-
return (m || d) && (
|
|
2085
|
+
return (m || d) && (y[Ue] = m && d ? m + " / " + d : m + d), {
|
|
2068
2086
|
id: f,
|
|
2069
2087
|
spec: {
|
|
2070
2088
|
...e.spec,
|
|
2071
|
-
axesSpec: u.map((
|
|
2072
|
-
...
|
|
2089
|
+
axesSpec: u.map((g, C) => ({
|
|
2090
|
+
...g,
|
|
2073
2091
|
annotations: e.spec.axesSpec[C].annotations
|
|
2074
2092
|
})),
|
|
2075
|
-
annotations:
|
|
2093
|
+
annotations: y
|
|
2076
2094
|
},
|
|
2077
2095
|
data: e.data
|
|
2078
2096
|
};
|
|
@@ -2081,14 +2099,14 @@ function sn(t, e) {
|
|
|
2081
2099
|
}
|
|
2082
2100
|
function an(t) {
|
|
2083
2101
|
let e = !0;
|
|
2084
|
-
return t.data instanceof O ? e = e && t.data.getIsReadyOrError() : pe(t.data) &&
|
|
2102
|
+
return t.data instanceof O ? e = e && t.data.getIsReadyOrError() : pe(t.data) && bt(t.data, (n) => {
|
|
2085
2103
|
e = e && n.getIsReadyOrError();
|
|
2086
2104
|
}), e;
|
|
2087
2105
|
}
|
|
2088
2106
|
function re(t) {
|
|
2089
2107
|
return t.every(an);
|
|
2090
2108
|
}
|
|
2091
|
-
function
|
|
2109
|
+
function Hn(t, e) {
|
|
2092
2110
|
if (!e) {
|
|
2093
2111
|
const f = new Q();
|
|
2094
2112
|
f.addColumnProvider(t.resultPool);
|
|
@@ -2096,10 +2114,10 @@ function zn(t, e) {
|
|
|
2096
2114
|
if (!re(m))
|
|
2097
2115
|
return;
|
|
2098
2116
|
const d = new Map(m.flatMap((p) => p.spec.axesSpec).map((p) => {
|
|
2099
|
-
const
|
|
2100
|
-
return [D(
|
|
2101
|
-
})),
|
|
2102
|
-
return t.createPFrame(
|
|
2117
|
+
const g = k(p);
|
|
2118
|
+
return [D(g), g];
|
|
2119
|
+
})), y = Ke(d, m);
|
|
2120
|
+
return t.createPFrame(y);
|
|
2103
2121
|
}
|
|
2104
2122
|
if (!re(e))
|
|
2105
2123
|
return;
|
|
@@ -2108,16 +2126,16 @@ function zn(t, e) {
|
|
|
2108
2126
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
2109
2127
|
for (const f of e)
|
|
2110
2128
|
for (const m of f.spec.axesSpec) {
|
|
2111
|
-
const d =
|
|
2129
|
+
const d = k(m);
|
|
2112
2130
|
r.set(D(d), d), i.set(D(d), d);
|
|
2113
2131
|
}
|
|
2114
|
-
const o = n.getColumns((f) =>
|
|
2132
|
+
const o = n.getColumns((f) => Pe(f)) ?? [], s = on(o, r);
|
|
2115
2133
|
for (const f of s)
|
|
2116
2134
|
r.set(...f), i.set(...f);
|
|
2117
2135
|
const a = (n.getColumns((f) => f.axesSpec.some((m) => {
|
|
2118
|
-
const d =
|
|
2119
|
-
for (const
|
|
2120
|
-
if (U(
|
|
2136
|
+
const d = k(m);
|
|
2137
|
+
for (const y of r.values())
|
|
2138
|
+
if (U(y, d))
|
|
2121
2139
|
return !0;
|
|
2122
2140
|
return !1;
|
|
2123
2141
|
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !Se(f.spec));
|
|
@@ -2125,30 +2143,30 @@ function zn(t, e) {
|
|
|
2125
2143
|
return;
|
|
2126
2144
|
for (const f of a)
|
|
2127
2145
|
for (const m of f.spec.axesSpec) {
|
|
2128
|
-
const d =
|
|
2146
|
+
const d = k(m);
|
|
2129
2147
|
i.set(D(d), d);
|
|
2130
2148
|
}
|
|
2131
2149
|
const l = (n.getColumns((f) => f.axesSpec.some((m) => {
|
|
2132
|
-
const d =
|
|
2133
|
-
for (const
|
|
2134
|
-
if (U(
|
|
2150
|
+
const d = k(m);
|
|
2151
|
+
for (const y of i.values())
|
|
2152
|
+
if (U(y, d))
|
|
2135
2153
|
return !0;
|
|
2136
2154
|
return !1;
|
|
2137
2155
|
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => Se(f.spec));
|
|
2138
2156
|
if (!re(l))
|
|
2139
2157
|
return;
|
|
2140
|
-
const u = [...a, ...l], h =
|
|
2158
|
+
const u = [...a, ...l], h = Ke(r, u);
|
|
2141
2159
|
return t.createPFrame(h);
|
|
2142
2160
|
}
|
|
2143
|
-
function
|
|
2161
|
+
function zn({
|
|
2144
2162
|
selection: t,
|
|
2145
|
-
columnId: e =
|
|
2163
|
+
columnId: e = Ct(),
|
|
2146
2164
|
label: n = "Selection marker",
|
|
2147
2165
|
domain: r
|
|
2148
2166
|
}) {
|
|
2149
2167
|
if (!(t != null && t.axesSpec.length))
|
|
2150
2168
|
return;
|
|
2151
|
-
const i = t.selectedKeys.filter((o) => o.every((s) => !
|
|
2169
|
+
const i = t.selectedKeys.filter((o) => o.every((s) => !vt(s))).map((o) => ({ key: o, val: 1 }));
|
|
2152
2170
|
if (i.length)
|
|
2153
2171
|
return {
|
|
2154
2172
|
id: e,
|
|
@@ -2166,8 +2184,8 @@ function Xn({
|
|
|
2166
2184
|
data: i
|
|
2167
2185
|
};
|
|
2168
2186
|
}
|
|
2169
|
-
function
|
|
2170
|
-
return t ===
|
|
2187
|
+
function Xn(t) {
|
|
2188
|
+
return t === Tt ? (console.error("Axis value can never be N/A"), "") : t;
|
|
2171
2189
|
}
|
|
2172
2190
|
function ln(t) {
|
|
2173
2191
|
throw new Error("Unexpected object: " + t);
|
|
@@ -2178,7 +2196,7 @@ function R(t) {
|
|
|
2178
2196
|
function ie(t) {
|
|
2179
2197
|
return t.valueType === "String";
|
|
2180
2198
|
}
|
|
2181
|
-
const
|
|
2199
|
+
const Ze = {
|
|
2182
2200
|
lessThan: {
|
|
2183
2201
|
label: "Col < X (Less Than)",
|
|
2184
2202
|
form: {
|
|
@@ -2542,30 +2560,30 @@ const Qe = {
|
|
|
2542
2560
|
supportedFor: () => !1
|
|
2543
2561
|
}
|
|
2544
2562
|
};
|
|
2545
|
-
function
|
|
2546
|
-
return t ? Object.entries(
|
|
2563
|
+
function Yn(t) {
|
|
2564
|
+
return t ? Object.entries(Ze).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
|
|
2547
2565
|
label: n.label,
|
|
2548
2566
|
value: e
|
|
2549
2567
|
})) : [];
|
|
2550
2568
|
}
|
|
2551
|
-
function
|
|
2552
|
-
return
|
|
2569
|
+
function Qn(t) {
|
|
2570
|
+
return Ze[t];
|
|
2553
2571
|
}
|
|
2554
|
-
function
|
|
2572
|
+
function we(t) {
|
|
2555
2573
|
if (t.type === "or")
|
|
2556
2574
|
return {
|
|
2557
2575
|
type: "or",
|
|
2558
|
-
filters:
|
|
2576
|
+
filters: Me(t.filters)
|
|
2559
2577
|
};
|
|
2560
2578
|
if (t.type === "and")
|
|
2561
2579
|
return {
|
|
2562
2580
|
type: "and",
|
|
2563
|
-
filters:
|
|
2581
|
+
filters: Me(t.filters)
|
|
2564
2582
|
};
|
|
2565
2583
|
if (t.type === "not")
|
|
2566
2584
|
return {
|
|
2567
2585
|
type: "not",
|
|
2568
|
-
filter:
|
|
2586
|
+
filter: we(t.filter)
|
|
2569
2587
|
};
|
|
2570
2588
|
if (t.type === "isNA")
|
|
2571
2589
|
return {
|
|
@@ -2671,20 +2689,20 @@ function Ae(t) {
|
|
|
2671
2689
|
throw new Error("Filter type is undefined, this should not happen");
|
|
2672
2690
|
ln(t);
|
|
2673
2691
|
}
|
|
2674
|
-
function
|
|
2675
|
-
return t.filter((e) => e.type !== void 0).map(
|
|
2692
|
+
function Me(t) {
|
|
2693
|
+
return t.filter((e) => e.type !== void 0).map(we);
|
|
2676
2694
|
}
|
|
2677
|
-
function
|
|
2695
|
+
function Zn(t) {
|
|
2678
2696
|
return {
|
|
2679
2697
|
title: t.title,
|
|
2680
2698
|
mode: t.mode,
|
|
2681
2699
|
steps: t.steps.filter((e) => e.filter.type == null ? !1 : e.filter.type === "or" || e.filter.type === "and" ? e.filter.filters.length > 0 : !1).map((e) => ({
|
|
2682
2700
|
label: e.label.trim(),
|
|
2683
|
-
filter:
|
|
2701
|
+
filter: we(e.filter)
|
|
2684
2702
|
}))
|
|
2685
2703
|
};
|
|
2686
2704
|
}
|
|
2687
|
-
class
|
|
2705
|
+
class er {
|
|
2688
2706
|
constructor(e) {
|
|
2689
2707
|
this.handle = e;
|
|
2690
2708
|
}
|
|
@@ -2709,30 +2727,26 @@ class tr {
|
|
|
2709
2727
|
}
|
|
2710
2728
|
}
|
|
2711
2729
|
function un(t) {
|
|
2712
|
-
return
|
|
2730
|
+
return Je({
|
|
2713
2731
|
__isRef: !0,
|
|
2714
2732
|
blockId: ae(t, "blockId"),
|
|
2715
2733
|
name: ae(t, "name")
|
|
2716
2734
|
});
|
|
2717
2735
|
}
|
|
2718
|
-
function
|
|
2719
|
-
return
|
|
2736
|
+
function tr(t) {
|
|
2737
|
+
return Je({
|
|
2720
2738
|
ref: un(ae(t, "ref")),
|
|
2721
2739
|
label: ae(t, "label")
|
|
2722
2740
|
});
|
|
2723
2741
|
}
|
|
2724
|
-
const
|
|
2742
|
+
const nr = {
|
|
2725
2743
|
sdkVersion: X
|
|
2726
2744
|
};
|
|
2727
|
-
function
|
|
2728
|
-
return
|
|
2745
|
+
function rr() {
|
|
2746
|
+
return platformaApiVersion ?? 1;
|
|
2729
2747
|
}
|
|
2730
|
-
function ir(
|
|
2731
|
-
|
|
2732
|
-
return cn();
|
|
2733
|
-
} catch {
|
|
2734
|
-
return t;
|
|
2735
|
-
}
|
|
2748
|
+
function ir() {
|
|
2749
|
+
return $e({ sdkVersion: X, apiVersion: platformaApiVersion });
|
|
2736
2750
|
}
|
|
2737
2751
|
function or(t) {
|
|
2738
2752
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
@@ -2740,20 +2754,20 @@ function or(t) {
|
|
|
2740
2754
|
}
|
|
2741
2755
|
export {
|
|
2742
2756
|
gn as Args,
|
|
2743
|
-
|
|
2744
|
-
|
|
2757
|
+
Oe as BlockModel,
|
|
2758
|
+
nr as CurrentSdkInfo,
|
|
2745
2759
|
L as FutureRef,
|
|
2746
2760
|
tn as IS_VIRTUAL_COLUMN,
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2761
|
+
yn as It,
|
|
2762
|
+
Bn as JsRenderInternal,
|
|
2763
|
+
Ue as LABEL_ANNOTATION,
|
|
2750
2764
|
nn as LINKER_COLUMN_ANNOTATION,
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2765
|
+
bn as MainOutputs,
|
|
2766
|
+
St as OutputError,
|
|
2767
|
+
_t as PAnnotationLabel,
|
|
2768
|
+
Lt as PAnnotationTrace,
|
|
2755
2769
|
Q as PColumnCollection,
|
|
2756
|
-
|
|
2770
|
+
er as PFrameImpl,
|
|
2757
2771
|
J as RT_BINARY_PARTITIONED,
|
|
2758
2772
|
z as RT_BINARY_SUPER_PARTITIONED,
|
|
2759
2773
|
H as RT_JSON_PARTITIONED,
|
|
@@ -2761,84 +2775,84 @@ export {
|
|
|
2761
2775
|
le as RT_RESOURCE_MAP,
|
|
2762
2776
|
ue as RT_RESOURCE_MAP_PARTITIONED,
|
|
2763
2777
|
ne as RenderCtx,
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2778
|
+
Wt as ResultPool,
|
|
2779
|
+
vn as StagingOutputs,
|
|
2780
|
+
Vt as Trace,
|
|
2781
|
+
Et as TraceEntry,
|
|
2768
2782
|
O as TreeNodeAccessor,
|
|
2769
|
-
|
|
2770
|
-
|
|
2783
|
+
Cn as UiState,
|
|
2784
|
+
Xt as allColumnsComputed,
|
|
2771
2785
|
re as allColumnsReady,
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2786
|
+
Fn as and,
|
|
2787
|
+
Zn as compileAnnotationScript,
|
|
2788
|
+
we as compileFilter,
|
|
2789
|
+
Me as compileFilters,
|
|
2790
|
+
Ut as convertOrParsePColumnData,
|
|
2791
|
+
Hn as createPFrameForGraphs,
|
|
2792
|
+
Gn as createPlDataTableSheet,
|
|
2793
|
+
De as createPlDataTableStateV2,
|
|
2794
|
+
Wn as createPlDataTableV2,
|
|
2795
|
+
zn as createRowSelectionColumn,
|
|
2796
|
+
ze as deriveLabels,
|
|
2783
2797
|
me as downgradeCfgOrLambda,
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2798
|
+
Ke as enrichCompatible,
|
|
2799
|
+
Nn as extractArchiveAndGetURL,
|
|
2800
|
+
$n as extractConfig,
|
|
2801
|
+
Kt as filterDataInfoEntries,
|
|
2802
|
+
Ze as filterUiMetadata,
|
|
2803
|
+
An as flatten,
|
|
2804
|
+
tr as fromPlOption,
|
|
2791
2805
|
un as fromPlRef,
|
|
2792
|
-
|
|
2806
|
+
zt as getAllLabelColumns,
|
|
2793
2807
|
on as getAvailableWithLinkersAxes,
|
|
2794
2808
|
Vn as getBlobContent,
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2809
|
+
On as getBlobContentAsJson,
|
|
2810
|
+
kn as getBlobContentAsString,
|
|
2811
|
+
Dn as getDownloadedBlobContent,
|
|
2798
2812
|
or as getEnvironmentValue,
|
|
2799
|
-
|
|
2800
|
-
|
|
2813
|
+
Qn as getFilterUiMetadata,
|
|
2814
|
+
Yn as getFilterUiTypeOptions,
|
|
2801
2815
|
Z as getFromCfg,
|
|
2802
2816
|
se as getImmediate,
|
|
2803
|
-
|
|
2817
|
+
Un as getImportProgress,
|
|
2804
2818
|
ae as getJsonField,
|
|
2805
|
-
|
|
2819
|
+
Kn as getLastLogs,
|
|
2806
2820
|
rn as getLinkerColumnsMap,
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
+
qn as getLogHandle,
|
|
2822
|
+
Re as getMatchingLabelColumns,
|
|
2823
|
+
Rn as getOnDemandBlobContent,
|
|
2824
|
+
Dt as getPartitionKeysList,
|
|
2825
|
+
rr as getPlatformaApiVersion,
|
|
2826
|
+
Mn as getProgressLog,
|
|
2827
|
+
jn as getProgressLogWithInfo,
|
|
2828
|
+
ir as getRawPlatformaInstance,
|
|
2829
|
+
_n as getResourceField,
|
|
2830
|
+
Ln as getResourceValueAsJson,
|
|
2831
|
+
Nt as getUniquePartitionKeys,
|
|
2832
|
+
ye as ifDef,
|
|
2833
|
+
Yt as isColumnHidden,
|
|
2834
|
+
Qt as isColumnOptional,
|
|
2821
2835
|
an as isColumnReady,
|
|
2822
|
-
|
|
2823
|
-
|
|
2836
|
+
Gt as isConfigLambda,
|
|
2837
|
+
wn as isEmpty,
|
|
2824
2838
|
Se as isLabelColumn,
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2839
|
+
Pe as isLinkerColumn,
|
|
2840
|
+
mn as isolate,
|
|
2841
|
+
Tn as makeArray,
|
|
2842
|
+
Qe as makeDefaultPTableParams,
|
|
2843
|
+
Je as makeObject,
|
|
2844
|
+
Pn as mapArrayValues,
|
|
2845
|
+
Xn as mapPTableValueToAxisKey,
|
|
2846
|
+
Sn as mapRecordValues,
|
|
2847
|
+
En as mapResourceFields,
|
|
2848
|
+
xn as not,
|
|
2849
|
+
In as or,
|
|
2836
2850
|
Ce as parsePColumnData,
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2851
|
+
Jn as parseResourceMap,
|
|
2852
|
+
Pt as readOutput,
|
|
2853
|
+
ge as uniqueBy,
|
|
2840
2854
|
ln as unreachable,
|
|
2841
|
-
|
|
2842
|
-
|
|
2855
|
+
Ht as upgradePlDataTableStateV2,
|
|
2856
|
+
hn as wrapOutputs
|
|
2843
2857
|
};
|
|
2844
2858
|
//# sourceMappingURL=index.mjs.map
|