@platforma-sdk/model 1.29.17 → 1.30.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/bconfig/normalization.d.ts.map +1 -1
- package/dist/bconfig/v3.d.ts +5 -0
- package/dist/bconfig/v3.d.ts.map +1 -1
- package/dist/builder.d.ts +7 -1
- package/dist/builder.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +402 -372
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +16 -0
- package/dist/render/api.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/bconfig/normalization.ts +2 -0
- package/src/bconfig/v3.ts +6 -0
- package/src/builder.ts +34 -1
- package/src/render/api.ts +49 -9
package/dist/index.mjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as me, mapPObjectData as ye, isDataInfoEntries as
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var We = (t, e, n) => e in t ? Me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var T = (t, e, n) => We(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as me, mapPObjectData as ye, isDataInfoEntries as _e, isDataInfo as ve, dataInfoToEntries as Ge, resolveAnchors as He, isPColumnSpec as Q, isPartitionedDataInfoEntries as qe, getAxisId as E, entriesToDataInfo as ze, selectorsToPredicate as ce, canonicalizeAxisId as Ye, withEnrichments as be, AnchoredIdDeriver as we, isPlRef as Xe, mapValueInVOE as Qe, ensurePColumn as Ze, extractAllColumns as et, mapPTableDef as tt, mapDataInfo as nt, canonicalizeJson as ee, matchAxisId as G, getColumnIdAndSpec as Ie, getPColumnSpecId as Ae } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
6
|
+
import Le from "canonicalize";
|
|
7
7
|
import { z as V } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class rt 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 it(t) {
|
|
15
|
+
if (!t.ok) throw new rt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Mt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return it(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function S(t) {
|
|
26
26
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? Z(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function H(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Wt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const Gt = H("$args"), Ht = H("$it"), qt = H("$prod"), zt = H("$staging"), Yt = H("$ui");
|
|
38
38
|
function Z(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Te(t) {
|
|
42
42
|
const e = {};
|
|
43
|
-
for (const [n, r] of Object.entries(t)) e[n] =
|
|
43
|
+
for (const [n, r] of Object.entries(t)) e[n] = S(r);
|
|
44
44
|
return {
|
|
45
45
|
type: "MakeObject",
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Xt(...t) {
|
|
50
50
|
const e = [];
|
|
51
|
-
for (const n of t) e.push(
|
|
51
|
+
for (const n of t) e.push(S(n));
|
|
52
52
|
return {
|
|
53
53
|
type: "MakeArray",
|
|
54
54
|
template: e
|
|
@@ -57,11 +57,11 @@ function Yt(...t) {
|
|
|
57
57
|
function te(t, e) {
|
|
58
58
|
return {
|
|
59
59
|
type: "GetJsonField",
|
|
60
|
-
source:
|
|
61
|
-
field:
|
|
60
|
+
source: S(t),
|
|
61
|
+
field: S(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Qt(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function Xt(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Zt(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,54 +77,54 @@ function Qt(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function en(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function tn(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function nn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function rn(t, e) {
|
|
99
99
|
return {
|
|
100
100
|
type: "And",
|
|
101
101
|
operand1: t,
|
|
102
102
|
operand2: e
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function sn(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
109
109
|
operand2: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function on(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
|
-
source:
|
|
116
|
-
field:
|
|
115
|
+
source: S(t),
|
|
116
|
+
field: S(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function an() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
123
|
-
source:
|
|
123
|
+
source: S(t)
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function ln(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,120 +132,120 @@ function an(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function un(t) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
|
-
source:
|
|
138
|
+
source: S(t)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function cn(t) {
|
|
142
142
|
return {
|
|
143
143
|
type: "GetBlobContentAsString",
|
|
144
|
-
source:
|
|
144
|
+
source: S(t)
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function dn() {
|
|
148
148
|
return function(t) {
|
|
149
149
|
return {
|
|
150
150
|
type: "GetBlobContentAsJson",
|
|
151
|
-
source:
|
|
151
|
+
source: S(t)
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
function pn(t) {
|
|
156
156
|
return {
|
|
157
157
|
type: "GetDownloadedBlobContent",
|
|
158
|
-
source:
|
|
158
|
+
source: S(t)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function fn(t) {
|
|
162
162
|
return {
|
|
163
163
|
type: "GetOnDemandBlobContent",
|
|
164
|
-
source:
|
|
164
|
+
source: S(t)
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function hn(t, e) {
|
|
168
168
|
return {
|
|
169
169
|
type: "ExtractArchiveAndGetURL",
|
|
170
170
|
format: e,
|
|
171
|
-
source:
|
|
171
|
+
source: S(t)
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function gn(t) {
|
|
175
175
|
return {
|
|
176
176
|
type: "GetImportProgress",
|
|
177
|
-
source:
|
|
177
|
+
source: S(t)
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function mn(t, e) {
|
|
181
181
|
return {
|
|
182
182
|
type: "GetLastLogs",
|
|
183
|
-
source:
|
|
183
|
+
source: S(t),
|
|
184
184
|
lines: e
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function yn(t, e) {
|
|
188
188
|
return {
|
|
189
189
|
type: "GetProgressLog",
|
|
190
|
-
source:
|
|
190
|
+
source: S(t),
|
|
191
191
|
patternToSearch: e
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function vn(t, e) {
|
|
195
195
|
return {
|
|
196
196
|
type: "GetProgressLogWithInfo",
|
|
197
|
-
source:
|
|
197
|
+
source: S(t),
|
|
198
198
|
patternToSearch: e
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function bn(t) {
|
|
202
202
|
return {
|
|
203
203
|
type: "GetLogHandle",
|
|
204
|
-
source:
|
|
204
|
+
source: S(t)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function st() {
|
|
208
208
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Ee(t) {
|
|
211
211
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
212
212
|
return globalThis.getPlatforma(t);
|
|
213
213
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
214
214
|
throw new Error("Can't get platforma instance.");
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function ot() {
|
|
217
217
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
218
218
|
}
|
|
219
219
|
function m() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
throw new Error("Not in config rendering context");
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const n =
|
|
223
|
+
function U(t, e) {
|
|
224
|
+
const n = ot();
|
|
225
225
|
if (n === void 0) return !1;
|
|
226
226
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
227
|
return n.callbackRegistry[t] = e, !0;
|
|
228
228
|
}
|
|
229
229
|
const ae = /* @__PURE__ */ new Map();
|
|
230
|
-
function
|
|
230
|
+
function at(t, e) {
|
|
231
231
|
t in m().callbackRegistry || (m().callbackRegistry[t] = (n) => {
|
|
232
232
|
for (const r of ae.get(t))
|
|
233
233
|
r(n);
|
|
234
234
|
}, ae.set(t, [])), ae.get(t).push(e);
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class C {
|
|
237
237
|
constructor(e, n = (r) => r) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
this.handle = e, this.postProcess = n,
|
|
238
|
+
T(this, "isResolved", !1);
|
|
239
|
+
T(this, "resolvedValue");
|
|
240
|
+
this.handle = e, this.postProcess = n, at(e, (r) => {
|
|
241
241
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
map(e) {
|
|
245
|
-
return new
|
|
245
|
+
return new C(this.handle, (n) => e(this.postProcess(n)));
|
|
246
246
|
}
|
|
247
247
|
mapDefined(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new C(this.handle, (n) => {
|
|
249
249
|
const r = this.postProcess(n);
|
|
250
250
|
return r ? e(r) : void 0;
|
|
251
251
|
});
|
|
@@ -254,7 +254,7 @@ class S {
|
|
|
254
254
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function de(t, e) {
|
|
258
258
|
return t === void 0 ? void 0 : e(t);
|
|
259
259
|
}
|
|
260
260
|
class I {
|
|
@@ -296,7 +296,7 @@ class I {
|
|
|
296
296
|
...this.resolvePath,
|
|
297
297
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
298
298
|
];
|
|
299
|
-
return
|
|
299
|
+
return de(
|
|
300
300
|
m().resolveWithCommon(this.handle, e, ...n),
|
|
301
301
|
(i) => new I(i, r)
|
|
302
302
|
);
|
|
@@ -318,7 +318,7 @@ class I {
|
|
|
318
318
|
}
|
|
319
319
|
getError() {
|
|
320
320
|
const e = [...this.resolvePath, "error"];
|
|
321
|
-
return
|
|
321
|
+
return de(
|
|
322
322
|
m().getError(this.handle),
|
|
323
323
|
(n) => new I(n, e)
|
|
324
324
|
);
|
|
@@ -383,13 +383,13 @@ class I {
|
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
385
|
getFileContentAsBase64() {
|
|
386
|
-
return new
|
|
386
|
+
return new C(m().getBlobContentAsBase64(this.handle));
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsString() {
|
|
389
|
-
return new
|
|
389
|
+
return new C(m().getBlobContentAsString(this.handle));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsJson() {
|
|
392
|
-
return new
|
|
392
|
+
return new C(
|
|
393
393
|
m().getBlobContentAsString(this.handle)
|
|
394
394
|
).mapDefined((e) => JSON.parse(e));
|
|
395
395
|
}
|
|
@@ -409,7 +409,7 @@ class I {
|
|
|
409
409
|
* @returns downloaded file handle
|
|
410
410
|
*/
|
|
411
411
|
getFileHandle() {
|
|
412
|
-
return new
|
|
412
|
+
return new C(m().getDownloadedBlobContentHandle(this.handle));
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @deprecated use getFileHandle
|
|
@@ -421,7 +421,7 @@ class I {
|
|
|
421
421
|
* @returns downloaded file handle
|
|
422
422
|
*/
|
|
423
423
|
getRemoteFileHandle() {
|
|
424
|
-
return new
|
|
424
|
+
return new C(m().getOnDemandBlobContentHandle(this.handle));
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @deprecated use getRemoteFileHandle
|
|
@@ -433,22 +433,22 @@ class I {
|
|
|
433
433
|
* @returns the url to the extracted folder
|
|
434
434
|
*/
|
|
435
435
|
extractArchiveAndGetURL(e) {
|
|
436
|
-
return new
|
|
436
|
+
return new C(m().extractArchiveAndGetURL(this.handle, e));
|
|
437
437
|
}
|
|
438
438
|
getImportProgress() {
|
|
439
|
-
return new
|
|
439
|
+
return new C(m().getImportProgress(this.handle));
|
|
440
440
|
}
|
|
441
441
|
getLastLogs(e) {
|
|
442
|
-
return new
|
|
442
|
+
return new C(m().getLastLogs(this.handle, e));
|
|
443
443
|
}
|
|
444
444
|
getProgressLog(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new C(m().getProgressLog(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLogWithInfo(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new C(m().getProgressLogWithInfo(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getLogHandle() {
|
|
451
|
-
return new
|
|
451
|
+
return new C(m().getLogHandle(this.handle));
|
|
452
452
|
}
|
|
453
453
|
allFieldsResolved(e = "Input") {
|
|
454
454
|
switch (e) {
|
|
@@ -477,72 +477,72 @@ class I {
|
|
|
477
477
|
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, y]) => o(u, y));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Fe = "staging", De = "main", lt = {
|
|
481
481
|
explicitColumnsSupport: !0,
|
|
482
482
|
inlineColumnsSupport: !0,
|
|
483
483
|
activeArgs: !0
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function Oe(t) {
|
|
486
486
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function pe(t, e, n) {
|
|
489
489
|
if (e.has(n)) return;
|
|
490
490
|
if (e.add(n), typeof n === "object")
|
|
491
|
-
if (
|
|
491
|
+
if (Oe(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
492
492
|
else if (Array.isArray(n))
|
|
493
|
-
for (const i of n)
|
|
493
|
+
for (const i of n) pe(t, e, i);
|
|
494
494
|
else
|
|
495
495
|
for (const [, i] of Object.entries(n))
|
|
496
|
-
i !== n &&
|
|
496
|
+
i !== n && pe(t, e, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ut(t) {
|
|
499
499
|
const e = /* @__PURE__ */ new Set();
|
|
500
|
-
return
|
|
500
|
+
return pe(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
503
|
__proto__: null,
|
|
504
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
505
|
-
MainAccessorName:
|
|
506
|
-
StagingAccessorName:
|
|
507
|
-
getAllFutureAwaits:
|
|
508
|
-
isFutureAwait:
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
504
|
+
GlobalCfgRenderCtxFeatureFlags: lt,
|
|
505
|
+
MainAccessorName: De,
|
|
506
|
+
StagingAccessorName: Fe,
|
|
507
|
+
getAllFutureAwaits: ut,
|
|
508
|
+
isFutureAwait: Oe
|
|
509
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = "pl7.app/label", dt = "pl7.app/trace", pt = V.object({
|
|
510
510
|
type: V.string(),
|
|
511
511
|
importance: V.number().optional(),
|
|
512
512
|
id: V.string().optional(),
|
|
513
513
|
label: V.string()
|
|
514
|
-
}),
|
|
515
|
-
function
|
|
514
|
+
}), ft = V.array(pt), ht = 1e-3, gt = "__LABEL__", Pe = "__LABEL__@1";
|
|
515
|
+
function Re(t, e, n = {}) {
|
|
516
516
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((f) => {
|
|
517
|
-
var
|
|
517
|
+
var z, F;
|
|
518
518
|
const h = e(f);
|
|
519
|
-
let
|
|
520
|
-
"spec" in h && typeof h.spec == "object" ? (
|
|
521
|
-
const v = (
|
|
519
|
+
let p, x, c;
|
|
520
|
+
"spec" in h && typeof h.spec == "object" ? (p = h.spec, x = h.prefixTrace, c = h.suffixTrace) : p = h;
|
|
521
|
+
const v = (z = p.annotations) == null ? void 0 : z[ct], g = (F = p.annotations) == null ? void 0 : F[dt], b = (g ? ft.safeParse(JSON.parse(g)).data : void 0) ?? [], A = [
|
|
522
522
|
...x ?? [],
|
|
523
523
|
...b,
|
|
524
524
|
...c ?? []
|
|
525
525
|
];
|
|
526
526
|
if (v) {
|
|
527
|
-
const
|
|
528
|
-
n.addLabelAsSuffix ? A.push(
|
|
527
|
+
const L = { label: v, type: gt, importance: -2 };
|
|
528
|
+
n.addLabelAsSuffix ? A.push(L) : A.splice(0, 0, L);
|
|
529
529
|
}
|
|
530
530
|
const D = [], $ = /* @__PURE__ */ new Map();
|
|
531
|
-
for (let
|
|
532
|
-
const { type: R } = A[
|
|
531
|
+
for (let L = A.length - 1; L >= 0; --L) {
|
|
532
|
+
const { type: R } = A[L], se = A[L].importance ?? 0, J = ($.get(R) ?? 0) + 1;
|
|
533
533
|
$.set(R, J);
|
|
534
534
|
const P = `${R}@${J}`;
|
|
535
535
|
i.set(P, (i.get(P) ?? 0) + 1), r.set(
|
|
536
536
|
P,
|
|
537
537
|
Math.max(
|
|
538
538
|
r.get(P) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
-
se - (A.length -
|
|
539
|
+
se - (A.length - L) * ht
|
|
540
540
|
)
|
|
541
|
-
), D.push({ ...A[
|
|
541
|
+
), D.push({ ...A[L], fullType: P, occurenceIndex: J });
|
|
542
542
|
}
|
|
543
543
|
return D.reverse(), {
|
|
544
544
|
value: f,
|
|
545
|
-
spec:
|
|
545
|
+
spec: p,
|
|
546
546
|
label: v,
|
|
547
547
|
fullTrace: D
|
|
548
548
|
};
|
|
@@ -552,8 +552,8 @@ function Oe(t, e, n = {}) {
|
|
|
552
552
|
f.endsWith("@1") || i.get(f) === t.length ? o.push(f) : a.push(f);
|
|
553
553
|
const u = (f) => {
|
|
554
554
|
const h = [];
|
|
555
|
-
for (let
|
|
556
|
-
const x = s[
|
|
555
|
+
for (let p = 0; p < s.length; p++) {
|
|
556
|
+
const x = s[p], c = x.fullTrace.filter((b) => f.has(b.fullType));
|
|
557
557
|
if (c.length === 0)
|
|
558
558
|
return;
|
|
559
559
|
const v = c.map((b) => b.label), g = n.separator ?? " / ";
|
|
@@ -566,26 +566,26 @@ function Oe(t, e, n = {}) {
|
|
|
566
566
|
};
|
|
567
567
|
if (o.length === 0) {
|
|
568
568
|
if (a.length !== 0) throw new Error("Assertion error.");
|
|
569
|
-
const f = u(new Set(
|
|
569
|
+
const f = u(new Set(Pe));
|
|
570
570
|
if (f === void 0) throw new Error("Assertion error.");
|
|
571
571
|
return f;
|
|
572
572
|
}
|
|
573
573
|
let y = 0, w = 0;
|
|
574
574
|
for (; y < o.length; ) {
|
|
575
575
|
const f = /* @__PURE__ */ new Set();
|
|
576
|
-
n.includeNativeLabel && f.add(
|
|
577
|
-
for (let
|
|
576
|
+
n.includeNativeLabel && f.add(Pe);
|
|
577
|
+
for (let p = 0; p < y; ++p) f.add(o[p]);
|
|
578
578
|
f.add(o[w]);
|
|
579
579
|
const h = u(f);
|
|
580
|
-
if (h !== void 0 && new Set(h.map((
|
|
580
|
+
if (h !== void 0 && new Set(h.map((p) => p.label)).size === t.length) return h;
|
|
581
581
|
w++, w >= o.length && (y++, w = y);
|
|
582
582
|
}
|
|
583
|
-
const
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
583
|
+
const d = u(/* @__PURE__ */ new Set([...o, ...a]));
|
|
584
|
+
if (d === void 0) throw new Error("Assertion error.");
|
|
585
|
+
return d;
|
|
586
586
|
}
|
|
587
|
-
const
|
|
588
|
-
function
|
|
587
|
+
const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap", B = q + "JsonPartitioned", K = q + "BinaryPartitioned", ke = q + "Partitioned/", ie = ke + "JsonPartitioned", M = ke + "BinaryPartitioned";
|
|
588
|
+
function je(t, e, n, r = [], i) {
|
|
589
589
|
if (t === void 0) return !1;
|
|
590
590
|
switch (t.resourceType.name) {
|
|
591
591
|
case ne: {
|
|
@@ -602,7 +602,7 @@ function ke(t, e, n, r = [], i) {
|
|
|
602
602
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
603
603
|
if (a === void 0) s = !1;
|
|
604
604
|
else {
|
|
605
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
605
|
+
const l = [...r, ...JSON.parse(o)], u = je(
|
|
606
606
|
a,
|
|
607
607
|
e,
|
|
608
608
|
n,
|
|
@@ -618,9 +618,9 @@ function ke(t, e, n, r = [], i) {
|
|
|
618
618
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function An(t, e, n = !1) {
|
|
622
622
|
const r = [];
|
|
623
|
-
return { isComplete:
|
|
623
|
+
return { isComplete: je(t, e, r, [], n), data: r };
|
|
624
624
|
}
|
|
625
625
|
const fe = (t) => {
|
|
626
626
|
if (t.endsWith(".index"))
|
|
@@ -629,7 +629,7 @@ const fe = (t) => {
|
|
|
629
629
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
630
630
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
631
631
|
};
|
|
632
|
-
function
|
|
632
|
+
function mt(t) {
|
|
633
633
|
if (!t) return;
|
|
634
634
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
635
635
|
let i = 0;
|
|
@@ -644,7 +644,7 @@ function gt(t) {
|
|
|
644
644
|
case K:
|
|
645
645
|
i = n.partitionKeyLength;
|
|
646
646
|
break;
|
|
647
|
-
case
|
|
647
|
+
case M:
|
|
648
648
|
case ie:
|
|
649
649
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
650
650
|
break;
|
|
@@ -660,13 +660,13 @@ function gt(t) {
|
|
|
660
660
|
}
|
|
661
661
|
break;
|
|
662
662
|
case re:
|
|
663
|
-
case
|
|
663
|
+
case M:
|
|
664
664
|
case ie:
|
|
665
665
|
for (const s of t.listInputFields()) {
|
|
666
666
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
667
667
|
if (a !== void 0)
|
|
668
668
|
for (let l of a.listInputFields()) {
|
|
669
|
-
e ===
|
|
669
|
+
e === M && (l = fe(l).baseKey);
|
|
670
670
|
const u = [...o, ...JSON.parse(l)];
|
|
671
671
|
r.push(u);
|
|
672
672
|
}
|
|
@@ -675,7 +675,7 @@ function gt(t) {
|
|
|
675
675
|
}
|
|
676
676
|
return { data: r, keyLength: i };
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function yt(t) {
|
|
679
679
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
680
680
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
681
681
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -694,11 +694,11 @@ function mt(t) {
|
|
|
694
694
|
}
|
|
695
695
|
return r.map((i) => Array.from(i.values()));
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function vt(t) {
|
|
698
698
|
if (t === void 0) return;
|
|
699
|
-
if (
|
|
700
|
-
return
|
|
701
|
-
const e =
|
|
699
|
+
if (_e(t))
|
|
700
|
+
return yt(t);
|
|
701
|
+
const e = mt(t);
|
|
702
702
|
if (!e) return;
|
|
703
703
|
const { data: n, keyLength: r } = e, i = [];
|
|
704
704
|
for (let s = 0; s < r; ++s)
|
|
@@ -714,7 +714,7 @@ function yt(t) {
|
|
|
714
714
|
function he(t, e = []) {
|
|
715
715
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
716
716
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
717
|
-
if (e.length > 0 && (n === ie || n ===
|
|
717
|
+
if (e.length > 0 && (n === ie || n === M))
|
|
718
718
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
719
719
|
switch (n) {
|
|
720
720
|
case ne:
|
|
@@ -784,7 +784,7 @@ function he(t, e = []) {
|
|
|
784
784
|
parts: s
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
-
case
|
|
787
|
+
case M: {
|
|
788
788
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
789
789
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
790
790
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
@@ -809,15 +809,15 @@ function he(t, e = []) {
|
|
|
809
809
|
throw new Error(`Unknown resource type: ${n}`);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function bt(t) {
|
|
813
813
|
if (t !== void 0) {
|
|
814
|
-
if (
|
|
815
|
-
if (ve(t)) return
|
|
814
|
+
if (_e(t)) return t;
|
|
815
|
+
if (ve(t)) return Ge(t);
|
|
816
816
|
if (t instanceof I) return he(t);
|
|
817
817
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function wt(t, e) {
|
|
821
821
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
822
822
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
823
823
|
const { partitionKeyLength: s } = t;
|
|
@@ -877,7 +877,7 @@ function bt(t, e) {
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
class
|
|
880
|
+
class At {
|
|
881
881
|
constructor(e) {
|
|
882
882
|
this.columns = e;
|
|
883
883
|
}
|
|
@@ -886,30 +886,30 @@ class wt {
|
|
|
886
886
|
return this.columns.filter((r) => n(r.spec));
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function Pt(t) {
|
|
890
890
|
if (t)
|
|
891
891
|
return t.map((e) => ({
|
|
892
|
-
type: `split:${
|
|
892
|
+
type: `split:${Ye(e.axisId)}`,
|
|
893
893
|
label: e.label,
|
|
894
894
|
importance: 1e6
|
|
895
895
|
// High importance for split filters in labels
|
|
896
896
|
}));
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function xt(t) {
|
|
899
899
|
if (t)
|
|
900
900
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function St(t, e) {
|
|
903
903
|
if (!e || e.length === 0) return t;
|
|
904
904
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
905
|
-
return
|
|
905
|
+
return Le({ id: t, axisFilters: n });
|
|
906
906
|
}
|
|
907
907
|
function Ct(t) {
|
|
908
908
|
if (!t || typeof t != "object") return !1;
|
|
909
909
|
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);
|
|
910
910
|
return !!e.domainAnchor || n || r;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function _t(t) {
|
|
913
913
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
914
914
|
return [];
|
|
915
915
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -919,9 +919,9 @@ function St(t) {
|
|
|
919
919
|
}
|
|
920
920
|
class ge {
|
|
921
921
|
constructor() {
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
922
|
+
T(this, "defaultProviderStore", []);
|
|
923
|
+
T(this, "providers", [new At(this.defaultProviderStore)]);
|
|
924
|
+
T(this, "axisLabelProviders", []);
|
|
925
925
|
}
|
|
926
926
|
addColumnProvider(e) {
|
|
927
927
|
return this.providers.push(e), this;
|
|
@@ -947,40 +947,40 @@ class ge {
|
|
|
947
947
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
948
948
|
...i ?? {}
|
|
949
949
|
}, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u = [];
|
|
950
|
-
for (const
|
|
951
|
-
const f = Ct(
|
|
950
|
+
for (const d of l) {
|
|
951
|
+
const f = Ct(d);
|
|
952
952
|
let h;
|
|
953
953
|
if (f) {
|
|
954
954
|
if (!r)
|
|
955
955
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
956
|
-
h =
|
|
956
|
+
h = He(r.anchors, d, n);
|
|
957
957
|
} else
|
|
958
|
-
h =
|
|
959
|
-
const
|
|
958
|
+
h = d;
|
|
959
|
+
const p = /* @__PURE__ */ new Set(), x = [];
|
|
960
960
|
for (const g of this.providers) {
|
|
961
961
|
const b = g.selectColumns(h);
|
|
962
962
|
for (const A of b) {
|
|
963
|
-
if (
|
|
964
|
-
|
|
963
|
+
if (p.has(A.id)) throw new Error(`Duplicate column id ${A.id} in provider ${g.constructor.name}`);
|
|
964
|
+
p.add(A.id), x.push(A);
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
if (x.length === 0) continue;
|
|
968
|
-
const c =
|
|
968
|
+
const c = _t(d), v = c.length > 0;
|
|
969
969
|
for (const g of x) {
|
|
970
970
|
if (!Q(g.spec)) continue;
|
|
971
971
|
const b = g.spec;
|
|
972
972
|
if (v) {
|
|
973
|
-
const A =
|
|
973
|
+
const A = bt(g.data);
|
|
974
974
|
if (!A) {
|
|
975
975
|
if (s) continue;
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
|
-
if (!
|
|
978
|
+
if (!qe(A))
|
|
979
979
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A.type} for column ${g.id}`);
|
|
980
|
-
const D =
|
|
980
|
+
const D = vt(A), $ = c[c.length - 1];
|
|
981
981
|
if ($ >= A.partitionKeyLength)
|
|
982
982
|
throw new Error(`Not enough partition keys (${A.partitionKeyLength}) for requested split axes (max index ${$}) in column ${b.name}`);
|
|
983
|
-
const
|
|
983
|
+
const z = c.map((P) => this.findLabels(E(b.axesSpec[P]))), F = [], L = (P, N) => {
|
|
984
984
|
if (N >= c.length) {
|
|
985
985
|
if (F.push([...P]), F.length > 1e4)
|
|
986
986
|
throw new Error("Too many key combinations, aborting.");
|
|
@@ -994,10 +994,10 @@ class ge {
|
|
|
994
994
|
F.length = 0;
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
997
|
-
for (const
|
|
998
|
-
P.push(
|
|
997
|
+
for (const Y of k)
|
|
998
|
+
P.push(Y), L(P, N + 1), P.pop();
|
|
999
999
|
};
|
|
1000
|
-
if (
|
|
1000
|
+
if (L([], 0), F.length === 0)
|
|
1001
1001
|
continue;
|
|
1002
1002
|
const R = [...b.axesSpec], se = c.map((P) => P);
|
|
1003
1003
|
for (let P = c.length - 1; P >= 0; P--)
|
|
@@ -1005,8 +1005,8 @@ class ge {
|
|
|
1005
1005
|
const J = { ...b, axesSpec: R };
|
|
1006
1006
|
for (const P of F) {
|
|
1007
1007
|
const N = P.map((O, k) => {
|
|
1008
|
-
const
|
|
1009
|
-
return { axisIdx:
|
|
1008
|
+
const Y = se[k], Ue = E(b.axesSpec[Y]), oe = z[k], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
|
|
1009
|
+
return { axisIdx: Y, axisId: Ue, value: O, label: Be };
|
|
1010
1010
|
});
|
|
1011
1011
|
u.push({
|
|
1012
1012
|
type: "split",
|
|
@@ -1027,19 +1027,19 @@ class ge {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
1029
|
if (u.length === 0) return [];
|
|
1030
|
-
const y =
|
|
1030
|
+
const y = Re(
|
|
1031
1031
|
u,
|
|
1032
|
-
(
|
|
1033
|
-
spec:
|
|
1034
|
-
suffixTrace:
|
|
1032
|
+
(d) => ({
|
|
1033
|
+
spec: d.spec,
|
|
1034
|
+
suffixTrace: d.type === "split" ? Pt(d.axisFilters) : void 0
|
|
1035
1035
|
}),
|
|
1036
1036
|
a
|
|
1037
1037
|
), w = [];
|
|
1038
|
-
for (const { value:
|
|
1039
|
-
const { originalColumn: h, spec:
|
|
1038
|
+
for (const { value: d, label: f } of y) {
|
|
1039
|
+
const { originalColumn: h, spec: p } = d, x = d.type === "split" ? d.axisFilters : void 0, c = xt(x);
|
|
1040
1040
|
let v;
|
|
1041
|
-
r ? v = r.deriveS(
|
|
1042
|
-
let g = { ...
|
|
1041
|
+
r ? v = r.deriveS(p, c) : v = St(h.id, c);
|
|
1042
|
+
let g = { ...d.adjustedSpec };
|
|
1043
1043
|
o && (g = {
|
|
1044
1044
|
...g,
|
|
1045
1045
|
annotations: {
|
|
@@ -1049,7 +1049,7 @@ class ge {
|
|
|
1049
1049
|
}), w.push({
|
|
1050
1050
|
id: v,
|
|
1051
1051
|
spec: g,
|
|
1052
|
-
data: () =>
|
|
1052
|
+
data: () => d.type === "split" ? ze(wt(d.dataEntries, c)) : d.originalColumn.data,
|
|
1053
1053
|
label: f
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
@@ -1085,12 +1085,12 @@ function le(t, e) {
|
|
|
1085
1085
|
if (t[n] !== e[n]) return !1;
|
|
1086
1086
|
return !0;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return ye(t, (e) => e instanceof I ? e.handle : ve(e) ?
|
|
1088
|
+
function xe(t) {
|
|
1089
|
+
return ye(t, (e) => e instanceof I ? e.handle : ve(e) ? nt(e, (n) => n.handle) : e);
|
|
1090
1090
|
}
|
|
1091
1091
|
class It {
|
|
1092
1092
|
constructor() {
|
|
1093
|
-
|
|
1093
|
+
T(this, "ctx", m());
|
|
1094
1094
|
}
|
|
1095
1095
|
/**
|
|
1096
1096
|
* @deprecated use getOptions()
|
|
@@ -1099,27 +1099,28 @@ class It {
|
|
|
1099
1099
|
return this.ctx.calculateOptions(e);
|
|
1100
1100
|
}
|
|
1101
1101
|
getOptions(e, n) {
|
|
1102
|
-
const r = typeof e == "function" ? e : ce(e), i = this.getSpecs().entries.filter((
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1102
|
+
const r = typeof e == "function" ? e : ce(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1103
|
+
let s = {}, o = !1;
|
|
1104
|
+
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.requireEnrichments ?? !1))), typeof s == "object" ? Re(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1105
|
+
ref: be(a, o),
|
|
1106
|
+
label: l
|
|
1107
|
+
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1108
|
+
ref: be(a, o),
|
|
1109
|
+
label: s(l, a)
|
|
1109
1110
|
}));
|
|
1110
1111
|
}
|
|
1111
1112
|
resolveAnchorCtx(e) {
|
|
1112
|
-
if (e instanceof
|
|
1113
|
+
if (e instanceof we) return e;
|
|
1113
1114
|
const n = {};
|
|
1114
1115
|
for (const [r, i] of Object.entries(e))
|
|
1115
|
-
if (
|
|
1116
|
+
if (Xe(i)) {
|
|
1116
1117
|
const s = this.getPColumnSpecByRef(i);
|
|
1117
1118
|
if (!s)
|
|
1118
1119
|
return;
|
|
1119
1120
|
n[r] = s;
|
|
1120
1121
|
} else
|
|
1121
1122
|
n[r] = i;
|
|
1122
|
-
return new
|
|
1123
|
+
return new we(n);
|
|
1123
1124
|
}
|
|
1124
1125
|
/**
|
|
1125
1126
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1212,7 +1213,7 @@ class It {
|
|
|
1212
1213
|
ref: n.ref,
|
|
1213
1214
|
obj: {
|
|
1214
1215
|
...n.obj,
|
|
1215
|
-
data:
|
|
1216
|
+
data: Qe(
|
|
1216
1217
|
n.obj.data,
|
|
1217
1218
|
(r) => new I(r, [n.ref.blockId, n.ref.name])
|
|
1218
1219
|
)
|
|
@@ -1254,7 +1255,7 @@ class It {
|
|
|
1254
1255
|
getPColumnByRef(e) {
|
|
1255
1256
|
const n = this.getDataByRef(e);
|
|
1256
1257
|
if (n)
|
|
1257
|
-
return
|
|
1258
|
+
return Ze(n);
|
|
1258
1259
|
}
|
|
1259
1260
|
/**
|
|
1260
1261
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1331,7 +1332,7 @@ class It {
|
|
|
1331
1332
|
let a = null;
|
|
1332
1333
|
const l = this;
|
|
1333
1334
|
return {
|
|
1334
|
-
id:
|
|
1335
|
+
id: Le(i),
|
|
1335
1336
|
spec: o,
|
|
1336
1337
|
get data() {
|
|
1337
1338
|
var u;
|
|
@@ -1358,12 +1359,12 @@ class It {
|
|
|
1358
1359
|
}
|
|
1359
1360
|
class X {
|
|
1360
1361
|
constructor() {
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1362
|
+
T(this, "ctx");
|
|
1363
|
+
T(this, "args");
|
|
1364
|
+
T(this, "uiState");
|
|
1364
1365
|
// lazy rendering because this feature is rarely used
|
|
1365
|
-
|
|
1366
|
-
|
|
1366
|
+
T(this, "_activeArgsCache");
|
|
1367
|
+
T(this, "resultPool", new It());
|
|
1367
1368
|
this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1368
1369
|
}
|
|
1369
1370
|
/**
|
|
@@ -1380,16 +1381,16 @@ class X {
|
|
|
1380
1381
|
// return this.ctx.featureFlags;
|
|
1381
1382
|
// }
|
|
1382
1383
|
getNamedAccessor(e) {
|
|
1383
|
-
return
|
|
1384
|
+
return de(
|
|
1384
1385
|
this.ctx.getAccessorHandleByName(e),
|
|
1385
1386
|
(n) => new I(n, [e])
|
|
1386
1387
|
);
|
|
1387
1388
|
}
|
|
1388
1389
|
get prerun() {
|
|
1389
|
-
return this.getNamedAccessor(
|
|
1390
|
+
return this.getNamedAccessor(Fe);
|
|
1390
1391
|
}
|
|
1391
1392
|
get outputs() {
|
|
1392
|
-
return this.getNamedAccessor(
|
|
1393
|
+
return this.getNamedAccessor(De);
|
|
1393
1394
|
}
|
|
1394
1395
|
/**
|
|
1395
1396
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1407,7 +1408,7 @@ class X {
|
|
|
1407
1408
|
// TODO remove all non-PColumn fields
|
|
1408
1409
|
createPFrame(e) {
|
|
1409
1410
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1410
|
-
e.map((n) =>
|
|
1411
|
+
e.map((n) => xe(n))
|
|
1411
1412
|
);
|
|
1412
1413
|
}
|
|
1413
1414
|
createPTable(e) {
|
|
@@ -1419,8 +1420,8 @@ class X {
|
|
|
1419
1420
|
},
|
|
1420
1421
|
filters: e.filters ?? [],
|
|
1421
1422
|
sorting: e.sorting ?? []
|
|
1422
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1423
|
-
|
|
1423
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(et(n.src)), this.ctx.createPTable(
|
|
1424
|
+
tt(n, (r) => xe(r))
|
|
1424
1425
|
);
|
|
1425
1426
|
}
|
|
1426
1427
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1428,23 +1429,22 @@ class X {
|
|
|
1428
1429
|
return this.ctx.getBlockLabel(e);
|
|
1429
1430
|
}
|
|
1430
1431
|
getCurrentUnstableMarker() {
|
|
1431
|
-
|
|
1432
|
-
return this.ctx.getCurrentUnstableMarker();
|
|
1432
|
+
return this.ctx.getCurrentUnstableMarker();
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1436
|
-
function
|
|
1435
|
+
const W = "1.30.0";
|
|
1436
|
+
function Lt(t) {
|
|
1437
1437
|
return t.__renderLambda === !0;
|
|
1438
1438
|
}
|
|
1439
1439
|
function ue(t) {
|
|
1440
1440
|
if (t !== void 0)
|
|
1441
|
-
return
|
|
1441
|
+
return Lt(t) ? t.handle : t;
|
|
1442
1442
|
}
|
|
1443
1443
|
function j(t) {
|
|
1444
1444
|
if (t !== void 0)
|
|
1445
1445
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function Pn(t) {
|
|
1448
1448
|
if (t.v3 !== void 0) {
|
|
1449
1449
|
const {
|
|
1450
1450
|
initialArgs: e,
|
|
@@ -1454,8 +1454,9 @@ function An(t) {
|
|
|
1454
1454
|
renderingMode: s,
|
|
1455
1455
|
sdkVersion: o,
|
|
1456
1456
|
sections: a,
|
|
1457
|
-
title: l
|
|
1458
|
-
|
|
1457
|
+
title: l,
|
|
1458
|
+
enrichmentTargets: u
|
|
1459
|
+
} = t.v3, { code: y } = t;
|
|
1459
1460
|
return {
|
|
1460
1461
|
initialArgs: e,
|
|
1461
1462
|
initialUiState: n,
|
|
@@ -1465,7 +1466,8 @@ function An(t) {
|
|
|
1465
1466
|
sdkVersion: o,
|
|
1466
1467
|
sections: a,
|
|
1467
1468
|
title: l,
|
|
1468
|
-
code:
|
|
1469
|
+
code: y,
|
|
1470
|
+
enrichmentTargets: u
|
|
1469
1471
|
};
|
|
1470
1472
|
} else if (t.inputsValid !== void 0) {
|
|
1471
1473
|
const { sdkVersion: e, renderingMode: n, outputs: r, inputsValid: i, sections: s, initialArgs: o, code: a } = t, l = Object.keys(t);
|
|
@@ -1510,25 +1512,26 @@ function An(t) {
|
|
|
1510
1512
|
);
|
|
1511
1513
|
}
|
|
1512
1514
|
}
|
|
1513
|
-
class
|
|
1514
|
-
constructor(e, n, r, i, s, o, a) {
|
|
1515
|
-
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a;
|
|
1515
|
+
class _ {
|
|
1516
|
+
constructor(e, n, r, i, s, o, a, l) {
|
|
1517
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
|
|
1516
1518
|
}
|
|
1517
1519
|
static create(e = "Heavy") {
|
|
1518
|
-
return new
|
|
1520
|
+
return new _(
|
|
1519
1521
|
e,
|
|
1520
1522
|
void 0,
|
|
1521
1523
|
{},
|
|
1522
1524
|
{},
|
|
1523
1525
|
Z(!0),
|
|
1524
1526
|
Z([]),
|
|
1527
|
+
void 0,
|
|
1525
1528
|
void 0
|
|
1526
1529
|
);
|
|
1527
1530
|
}
|
|
1528
1531
|
output(e, n, r = {}) {
|
|
1529
1532
|
if (typeof n == "function") {
|
|
1530
1533
|
const i = `output#${e}`;
|
|
1531
|
-
return
|
|
1534
|
+
return U(i, () => n(new X())), new _(
|
|
1532
1535
|
this._renderingMode,
|
|
1533
1536
|
this._initialArgs,
|
|
1534
1537
|
this._initialUiState,
|
|
@@ -1542,10 +1545,11 @@ class T {
|
|
|
1542
1545
|
},
|
|
1543
1546
|
this._inputsValid,
|
|
1544
1547
|
this._sections,
|
|
1545
|
-
this._title
|
|
1548
|
+
this._title,
|
|
1549
|
+
this._enrichmentTargets
|
|
1546
1550
|
);
|
|
1547
1551
|
} else
|
|
1548
|
-
return new
|
|
1552
|
+
return new _(
|
|
1549
1553
|
this._renderingMode,
|
|
1550
1554
|
this._initialArgs,
|
|
1551
1555
|
this._initialUiState,
|
|
@@ -1555,7 +1559,8 @@ class T {
|
|
|
1555
1559
|
},
|
|
1556
1560
|
this._inputsValid,
|
|
1557
1561
|
this._sections,
|
|
1558
|
-
this._title
|
|
1562
|
+
this._title,
|
|
1563
|
+
this._enrichmentTargets
|
|
1559
1564
|
);
|
|
1560
1565
|
}
|
|
1561
1566
|
/** Shortcut for {@link output} with retentive flag set to true. */
|
|
@@ -1563,7 +1568,7 @@ class T {
|
|
|
1563
1568
|
return this.output(e, n, { retentive: !0 });
|
|
1564
1569
|
}
|
|
1565
1570
|
argsValid(e) {
|
|
1566
|
-
return typeof e == "function" ? (
|
|
1571
|
+
return typeof e == "function" ? (U("inputsValid", () => e(new X())), new _(
|
|
1567
1572
|
this._renderingMode,
|
|
1568
1573
|
this._initialArgs,
|
|
1569
1574
|
this._initialUiState,
|
|
@@ -1573,46 +1578,51 @@ class T {
|
|
|
1573
1578
|
handle: "inputsValid"
|
|
1574
1579
|
},
|
|
1575
1580
|
this._sections,
|
|
1576
|
-
this._title
|
|
1577
|
-
|
|
1581
|
+
this._title,
|
|
1582
|
+
this._enrichmentTargets
|
|
1583
|
+
)) : new _(
|
|
1578
1584
|
this._renderingMode,
|
|
1579
1585
|
this._initialArgs,
|
|
1580
1586
|
this._initialUiState,
|
|
1581
1587
|
this._outputs,
|
|
1582
1588
|
e,
|
|
1583
1589
|
this._sections,
|
|
1584
|
-
this._title
|
|
1590
|
+
this._title,
|
|
1591
|
+
this._enrichmentTargets
|
|
1585
1592
|
);
|
|
1586
1593
|
}
|
|
1587
1594
|
sections(e) {
|
|
1588
|
-
return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (
|
|
1595
|
+
return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (U("sections", () => e(new X())), new _(
|
|
1589
1596
|
this._renderingMode,
|
|
1590
1597
|
this._initialArgs,
|
|
1591
1598
|
this._initialUiState,
|
|
1592
1599
|
this._outputs,
|
|
1593
1600
|
this._inputsValid,
|
|
1594
1601
|
{ __renderLambda: !0, handle: "sections" },
|
|
1595
|
-
this._title
|
|
1596
|
-
|
|
1602
|
+
this._title,
|
|
1603
|
+
this._enrichmentTargets
|
|
1604
|
+
)) : new _(
|
|
1597
1605
|
this._renderingMode,
|
|
1598
1606
|
this._initialArgs,
|
|
1599
1607
|
this._initialUiState,
|
|
1600
1608
|
this._outputs,
|
|
1601
1609
|
this._inputsValid,
|
|
1602
1610
|
e,
|
|
1603
|
-
this._title
|
|
1611
|
+
this._title,
|
|
1612
|
+
this._enrichmentTargets
|
|
1604
1613
|
);
|
|
1605
1614
|
}
|
|
1606
1615
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1607
1616
|
title(e) {
|
|
1608
|
-
return
|
|
1617
|
+
return U("title", () => e(new X())), new _(
|
|
1609
1618
|
this._renderingMode,
|
|
1610
1619
|
this._initialArgs,
|
|
1611
1620
|
this._initialUiState,
|
|
1612
1621
|
this._outputs,
|
|
1613
1622
|
this._inputsValid,
|
|
1614
1623
|
this._sections,
|
|
1615
|
-
{ __renderLambda: !0, handle: "title" }
|
|
1624
|
+
{ __renderLambda: !0, handle: "title" },
|
|
1625
|
+
this._enrichmentTargets
|
|
1616
1626
|
);
|
|
1617
1627
|
}
|
|
1618
1628
|
/**
|
|
@@ -1620,38 +1630,57 @@ class T {
|
|
|
1620
1630
|
* @deprecated use {@link withArgs}
|
|
1621
1631
|
* */
|
|
1622
1632
|
initialArgs(e) {
|
|
1623
|
-
return new
|
|
1633
|
+
return new _(
|
|
1624
1634
|
this._renderingMode,
|
|
1625
1635
|
e,
|
|
1626
1636
|
this._initialUiState,
|
|
1627
1637
|
this._outputs,
|
|
1628
1638
|
this._inputsValid,
|
|
1629
1639
|
this._sections,
|
|
1630
|
-
this._title
|
|
1640
|
+
this._title,
|
|
1641
|
+
this._enrichmentTargets
|
|
1631
1642
|
);
|
|
1632
1643
|
}
|
|
1633
1644
|
/** Sets initial args for the block, this value must be specified. */
|
|
1634
1645
|
withArgs(e) {
|
|
1635
|
-
return new
|
|
1646
|
+
return new _(
|
|
1636
1647
|
this._renderingMode,
|
|
1637
1648
|
e,
|
|
1638
1649
|
this._initialUiState,
|
|
1639
1650
|
this._outputs,
|
|
1640
1651
|
this._inputsValid,
|
|
1641
1652
|
this._sections,
|
|
1642
|
-
this._title
|
|
1653
|
+
this._title,
|
|
1654
|
+
this._enrichmentTargets
|
|
1643
1655
|
);
|
|
1644
1656
|
}
|
|
1645
1657
|
/** Defines type and sets initial value for block UiState. */
|
|
1646
1658
|
withUiState(e) {
|
|
1647
|
-
return new
|
|
1659
|
+
return new _(
|
|
1648
1660
|
this._renderingMode,
|
|
1649
1661
|
this._initialArgs,
|
|
1650
1662
|
e,
|
|
1651
1663
|
this._outputs,
|
|
1652
1664
|
this._inputsValid,
|
|
1653
1665
|
this._sections,
|
|
1654
|
-
this._title
|
|
1666
|
+
this._title,
|
|
1667
|
+
this._enrichmentTargets
|
|
1668
|
+
);
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* Defines how to derive list of upstream references this block is meant to enrich with its exports from block args.
|
|
1672
|
+
* Influences dependency graph construction.
|
|
1673
|
+
*/
|
|
1674
|
+
enriches(e) {
|
|
1675
|
+
return U("enrichmentTargets", e), new _(
|
|
1676
|
+
this._renderingMode,
|
|
1677
|
+
this._initialArgs,
|
|
1678
|
+
this._initialUiState,
|
|
1679
|
+
this._outputs,
|
|
1680
|
+
this._inputsValid,
|
|
1681
|
+
this._sections,
|
|
1682
|
+
this._title,
|
|
1683
|
+
{ __renderLambda: !0, handle: "enrichmentTargets" }
|
|
1655
1684
|
);
|
|
1656
1685
|
}
|
|
1657
1686
|
/** Renders all provided block settings into a pre-configured platforma API
|
|
@@ -1661,17 +1690,18 @@ class T {
|
|
|
1661
1690
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1662
1691
|
const e = {
|
|
1663
1692
|
v3: {
|
|
1664
|
-
sdkVersion:
|
|
1693
|
+
sdkVersion: W,
|
|
1665
1694
|
renderingMode: this._renderingMode,
|
|
1666
1695
|
initialArgs: this._initialArgs,
|
|
1667
1696
|
initialUiState: this._initialUiState,
|
|
1668
1697
|
inputsValid: this._inputsValid,
|
|
1669
1698
|
sections: this._sections,
|
|
1670
1699
|
title: this._title,
|
|
1671
|
-
outputs: this._outputs
|
|
1700
|
+
outputs: this._outputs,
|
|
1701
|
+
enrichmentTargets: this._enrichmentTargets
|
|
1672
1702
|
},
|
|
1673
1703
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1674
|
-
sdkVersion:
|
|
1704
|
+
sdkVersion: W,
|
|
1675
1705
|
renderingMode: this._renderingMode,
|
|
1676
1706
|
initialArgs: this._initialArgs,
|
|
1677
1707
|
inputsValid: ue(this._inputsValid),
|
|
@@ -1680,10 +1710,10 @@ class T {
|
|
|
1680
1710
|
Object.entries(this._outputs).map(([n, r]) => [n, ue(r)])
|
|
1681
1711
|
)
|
|
1682
1712
|
};
|
|
1683
|
-
return
|
|
1713
|
+
return st() ? Ee({ sdkVersion: W }) : { config: e };
|
|
1684
1714
|
}
|
|
1685
1715
|
}
|
|
1686
|
-
function
|
|
1716
|
+
function xn(t) {
|
|
1687
1717
|
const e = t.type;
|
|
1688
1718
|
switch (e) {
|
|
1689
1719
|
case "axis":
|
|
@@ -1694,20 +1724,20 @@ function Pn(t) {
|
|
|
1694
1724
|
throw Error(`unsupported column type: ${e}`);
|
|
1695
1725
|
}
|
|
1696
1726
|
}
|
|
1697
|
-
function
|
|
1727
|
+
function Tt(t) {
|
|
1698
1728
|
return JSON.parse(t);
|
|
1699
1729
|
}
|
|
1700
|
-
function
|
|
1730
|
+
function Sn(t) {
|
|
1701
1731
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1702
1732
|
}
|
|
1703
|
-
function
|
|
1733
|
+
function Ve(t) {
|
|
1704
1734
|
return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1705
1735
|
name: "pl7.app/label",
|
|
1706
1736
|
axes: [{}]
|
|
1707
1737
|
// exactly one axis
|
|
1708
1738
|
}, { dontWaitAllData: !0 });
|
|
1709
1739
|
}
|
|
1710
|
-
function
|
|
1740
|
+
function Ke(t, e) {
|
|
1711
1741
|
const n = (i, s) => {
|
|
1712
1742
|
let o = i.toString();
|
|
1713
1743
|
if (s)
|
|
@@ -1720,12 +1750,12 @@ function Ve(t, e) {
|
|
|
1720
1750
|
const o = E(s);
|
|
1721
1751
|
for (const a of e) {
|
|
1722
1752
|
const l = a.spec.axesSpec[0], u = E(a.spec.axesSpec[0]);
|
|
1723
|
-
if (
|
|
1753
|
+
if (G(o, u)) {
|
|
1724
1754
|
const y = Object.keys(o.domain ?? {}).length, w = Object.keys(u.domain ?? {}).length;
|
|
1725
1755
|
if (y > w) {
|
|
1726
|
-
const
|
|
1727
|
-
r.set(
|
|
1728
|
-
id:
|
|
1756
|
+
const d = n(a.id, o.domain);
|
|
1757
|
+
r.set(d, {
|
|
1758
|
+
id: d,
|
|
1729
1759
|
spec: {
|
|
1730
1760
|
...a.spec,
|
|
1731
1761
|
axesSpec: [{ ...o, annotations: l.annotations }]
|
|
@@ -1739,7 +1769,7 @@ function Ve(t, e) {
|
|
|
1739
1769
|
}
|
|
1740
1770
|
return [...r.values()];
|
|
1741
1771
|
}
|
|
1742
|
-
function
|
|
1772
|
+
function $e(t) {
|
|
1743
1773
|
const e = (i) => Array.isArray(i), n = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
|
|
1744
1774
|
return t.map((i) => i.data).every((i) => {
|
|
1745
1775
|
if (e(i))
|
|
@@ -1759,7 +1789,7 @@ function Ke(t) {
|
|
|
1759
1789
|
throw Error(`unsupported column data type: ${i}`);
|
|
1760
1790
|
});
|
|
1761
1791
|
}
|
|
1762
|
-
function
|
|
1792
|
+
function Je(t, e, n, r, i, s) {
|
|
1763
1793
|
let o = t;
|
|
1764
1794
|
const a = [];
|
|
1765
1795
|
if (s) {
|
|
@@ -1783,46 +1813,46 @@ function $e(t, e, n, r, i, s) {
|
|
|
1783
1813
|
function Cn(t, e, n, r) {
|
|
1784
1814
|
var u, y;
|
|
1785
1815
|
Array.isArray(r) && (r = { filters: r });
|
|
1786
|
-
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((y = n == null ? void 0 : n.pTableParams) == null ? void 0 : y.sorting) ?? [], a =
|
|
1816
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((y = n == null ? void 0 : n.pTableParams) == null ? void 0 : y.sorting) ?? [], a = Ve(t.resultPool);
|
|
1787
1817
|
if (!a) return;
|
|
1788
|
-
const l =
|
|
1789
|
-
if (
|
|
1818
|
+
const l = Ke(e.map(Ie), a);
|
|
1819
|
+
if ($e([...e, ...l]))
|
|
1790
1820
|
return t.createPTable(
|
|
1791
|
-
|
|
1821
|
+
Je(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1792
1822
|
);
|
|
1793
1823
|
}
|
|
1794
|
-
function
|
|
1824
|
+
function Et(t) {
|
|
1795
1825
|
var e;
|
|
1796
1826
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1797
1827
|
}
|
|
1798
|
-
function
|
|
1799
|
-
var
|
|
1800
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1828
|
+
function _n(t, e, n, r, i) {
|
|
1829
|
+
var p, x;
|
|
1830
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((p = r == null ? void 0 : r.pTableParams) == null ? void 0 : p.filters) ?? []], a = ((x = r == null ? void 0 : r.pTableParams) == null ? void 0 : x.sorting) ?? [], l = e.find((c) => n(c.spec));
|
|
1801
1831
|
if (!l) return;
|
|
1802
|
-
const u =
|
|
1832
|
+
const u = Ve(t.resultPool);
|
|
1803
1833
|
if (!u) return;
|
|
1804
1834
|
const y = new Set((() => {
|
|
1805
1835
|
var v, g;
|
|
1806
1836
|
if (s === "inner") return [];
|
|
1807
|
-
const c = (g = (v = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : v.hiddenColIds) == null ? void 0 : g.map(
|
|
1808
|
-
return c || e.filter((b) =>
|
|
1837
|
+
const c = (g = (v = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : v.hiddenColIds) == null ? void 0 : g.map(Tt).filter((b) => b.type === "column").map((b) => b.id);
|
|
1838
|
+
return c || e.filter((b) => Et(b.spec)).map((b) => b.id);
|
|
1809
1839
|
})());
|
|
1810
1840
|
y.delete(l.id), [...o.map((c) => c.column), ...a.map((c) => c.column)].filter((c) => c.type === "column").map((c) => y.delete(c.id));
|
|
1811
|
-
const w = e.filter((c) => !y.has(c.id)),
|
|
1841
|
+
const w = e.filter((c) => !y.has(c.id)), d = Ke(w.map(Ie), u), f = [
|
|
1812
1842
|
...l.spec.axesSpec.map((c) => ({
|
|
1813
1843
|
type: "axis",
|
|
1814
1844
|
id: E(c),
|
|
1815
1845
|
spec: c
|
|
1816
1846
|
})),
|
|
1817
|
-
...[...e, ...
|
|
1847
|
+
...[...e, ...d].map((c) => ({
|
|
1818
1848
|
type: "column",
|
|
1819
1849
|
id: c.id,
|
|
1820
1850
|
spec: c.spec
|
|
1821
1851
|
}))
|
|
1822
1852
|
];
|
|
1823
|
-
if (
|
|
1853
|
+
if (!$e([...w, ...d])) return;
|
|
1824
1854
|
const h = t.createPTable(
|
|
1825
|
-
|
|
1855
|
+
Je(e, d, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1826
1856
|
);
|
|
1827
1857
|
return {
|
|
1828
1858
|
tableSpec: f,
|
|
@@ -1840,7 +1870,7 @@ function In(t, e, n) {
|
|
|
1840
1870
|
defaultValue: n[0]
|
|
1841
1871
|
};
|
|
1842
1872
|
}
|
|
1843
|
-
const
|
|
1873
|
+
const Ft = (t, e) => {
|
|
1844
1874
|
let n = t.toString();
|
|
1845
1875
|
return e == null || e.forEach((r) => {
|
|
1846
1876
|
if (r)
|
|
@@ -1848,7 +1878,7 @@ const Et = (t, e) => {
|
|
|
1848
1878
|
n += i, n += s;
|
|
1849
1879
|
}), n;
|
|
1850
1880
|
};
|
|
1851
|
-
function
|
|
1881
|
+
function Dt(t) {
|
|
1852
1882
|
if (!t.length)
|
|
1853
1883
|
return [];
|
|
1854
1884
|
let e = [[]];
|
|
@@ -1859,48 +1889,48 @@ function Ft(t) {
|
|
|
1859
1889
|
}), e = r;
|
|
1860
1890
|
}), e;
|
|
1861
1891
|
}
|
|
1862
|
-
function
|
|
1892
|
+
function Ot(t, e) {
|
|
1863
1893
|
const n = t.spec.axesSpec.map(E);
|
|
1864
|
-
return e.spec.axesSpec.map(E).every((i) => n.some((s) =>
|
|
1894
|
+
return e.spec.axesSpec.map(E).every((i) => n.some((s) => G(s, i) && G(i, s)));
|
|
1865
1895
|
}
|
|
1866
|
-
function
|
|
1896
|
+
function Ne(t, e) {
|
|
1867
1897
|
const n = t.spec.axesSpec.map(E);
|
|
1868
|
-
return e.spec.axesSpec.map(E).every((i) => n.some((s) =>
|
|
1898
|
+
return e.spec.axesSpec.map(E).every((i) => n.some((s) => G(s, i)));
|
|
1869
1899
|
}
|
|
1870
|
-
const
|
|
1900
|
+
const Rt = "pl7.app/graph/isVirtual", Se = "pl7.app/label";
|
|
1871
1901
|
function Ce(t, e) {
|
|
1872
1902
|
const n = t.spec.axesSpec.map(E), r = e.spec.axesSpec.map(E);
|
|
1873
|
-
if (
|
|
1903
|
+
if (Ot(t, e))
|
|
1874
1904
|
return [];
|
|
1875
|
-
if (!
|
|
1905
|
+
if (!Ne(t, e))
|
|
1876
1906
|
return [];
|
|
1877
|
-
const o = r.map((w) => n.filter((
|
|
1878
|
-
const
|
|
1907
|
+
const o = r.map((w) => n.filter((d) => G(d, w))), a = Dt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), y = a.map((w) => {
|
|
1908
|
+
const d = /* @__PURE__ */ new Set();
|
|
1879
1909
|
return w.map((f, h) => {
|
|
1880
|
-
const
|
|
1910
|
+
const p = e.spec.axesSpec[h].domain, x = f.domain;
|
|
1881
1911
|
return Object.entries(x ?? {}).forEach(([c, v]) => {
|
|
1882
|
-
if ((
|
|
1912
|
+
if ((p == null ? void 0 : p[c]) === void 0) {
|
|
1883
1913
|
const g = JSON.stringify([c, v]);
|
|
1884
|
-
|
|
1914
|
+
d.add(g), l.add(g);
|
|
1885
1915
|
}
|
|
1886
1916
|
}), {
|
|
1887
1917
|
...f,
|
|
1888
1918
|
annotations: e.spec.axesSpec[h].annotations
|
|
1889
1919
|
};
|
|
1890
|
-
}),
|
|
1920
|
+
}), d;
|
|
1891
1921
|
});
|
|
1892
1922
|
return [...l].forEach((w) => {
|
|
1893
|
-
y.some((
|
|
1894
|
-
}), a.map((w,
|
|
1923
|
+
y.some((d) => !d.has(w)) && u.add(w);
|
|
1924
|
+
}), a.map((w, d) => {
|
|
1895
1925
|
var c;
|
|
1896
|
-
const f =
|
|
1926
|
+
const f = Ft(e.id, w.map((v) => v.domain)), h = ((c = e.spec.annotations) == null ? void 0 : c[Se]) ?? "", p = [...y[d]].filter((v) => u.has(v)).sort().map((v) => {
|
|
1897
1927
|
var g;
|
|
1898
1928
|
return (g = JSON.parse(v)) == null ? void 0 : g[1];
|
|
1899
1929
|
}).join(" / "), x = {
|
|
1900
1930
|
...e.spec.annotations,
|
|
1901
|
-
[
|
|
1931
|
+
[Rt]: "true"
|
|
1902
1932
|
};
|
|
1903
|
-
return (h ||
|
|
1933
|
+
return (h || p) && (x[Se] = h && p ? h + " / " + p : h + p), {
|
|
1904
1934
|
id: f,
|
|
1905
1935
|
spec: {
|
|
1906
1936
|
...e.spec,
|
|
@@ -1914,7 +1944,7 @@ function Ce(t, e) {
|
|
|
1914
1944
|
};
|
|
1915
1945
|
});
|
|
1916
1946
|
}
|
|
1917
|
-
function
|
|
1947
|
+
function kt(t) {
|
|
1918
1948
|
const e = [];
|
|
1919
1949
|
for (let n = 0; n < t.length; n++)
|
|
1920
1950
|
for (let r = n + 1; r < t.length; r++) {
|
|
@@ -1926,18 +1956,18 @@ function Rt(t) {
|
|
|
1926
1956
|
}
|
|
1927
1957
|
return e;
|
|
1928
1958
|
}
|
|
1929
|
-
function
|
|
1959
|
+
function jt(t, e) {
|
|
1930
1960
|
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1931
1961
|
t.forEach((s) => {
|
|
1932
|
-
n.add(s.id), r.set(ee(
|
|
1962
|
+
n.add(s.id), r.set(ee(Ae(s.spec)), s);
|
|
1933
1963
|
});
|
|
1934
1964
|
const i = /* @__PURE__ */ new Map();
|
|
1935
1965
|
for (const s of e) {
|
|
1936
1966
|
if (n.has(s.id)) continue;
|
|
1937
|
-
const o = ee(
|
|
1967
|
+
const o = ee(Ae(s.spec));
|
|
1938
1968
|
if (!r.has(o)) {
|
|
1939
1969
|
for (const a of r.values())
|
|
1940
|
-
if (
|
|
1970
|
+
if (Ne(a, s)) {
|
|
1941
1971
|
i.set(o, s);
|
|
1942
1972
|
break;
|
|
1943
1973
|
}
|
|
@@ -1945,7 +1975,7 @@ function kt(t, e) {
|
|
|
1945
1975
|
}
|
|
1946
1976
|
return [...r.values(), ...i.values()];
|
|
1947
1977
|
}
|
|
1948
|
-
const
|
|
1978
|
+
const Vt = [
|
|
1949
1979
|
"Int",
|
|
1950
1980
|
"Long",
|
|
1951
1981
|
"Float",
|
|
@@ -1953,15 +1983,15 @@ const jt = [
|
|
|
1953
1983
|
"String",
|
|
1954
1984
|
"Bytes"
|
|
1955
1985
|
];
|
|
1956
|
-
function
|
|
1986
|
+
function Ln(t, e) {
|
|
1957
1987
|
if (e === void 0) return;
|
|
1958
|
-
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(me).filter((s) =>
|
|
1988
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(me).filter((s) => Vt.includes(s.spec.valueType)), r = jt(e, n), i = [...r, ...kt(r)];
|
|
1959
1989
|
if (!i.some(
|
|
1960
1990
|
(s) => s.data instanceof I && !s.data.getIsReadyOrError()
|
|
1961
1991
|
))
|
|
1962
1992
|
return t.createPFrame(i);
|
|
1963
1993
|
}
|
|
1964
|
-
class
|
|
1994
|
+
class Tn {
|
|
1965
1995
|
constructor(e) {
|
|
1966
1996
|
this.handle = e;
|
|
1967
1997
|
}
|
|
@@ -1981,121 +2011,121 @@ class Ln {
|
|
|
1981
2011
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1982
2012
|
}
|
|
1983
2013
|
}
|
|
1984
|
-
function
|
|
1985
|
-
return
|
|
2014
|
+
function Kt(t) {
|
|
2015
|
+
return Te({
|
|
1986
2016
|
__isRef: !0,
|
|
1987
2017
|
blockId: te(t, "blockId"),
|
|
1988
2018
|
name: te(t, "name")
|
|
1989
2019
|
});
|
|
1990
2020
|
}
|
|
1991
|
-
function
|
|
1992
|
-
return
|
|
1993
|
-
ref:
|
|
2021
|
+
function En(t) {
|
|
2022
|
+
return Te({
|
|
2023
|
+
ref: Kt(te(t, "ref")),
|
|
1994
2024
|
label: te(t, "label")
|
|
1995
2025
|
});
|
|
1996
2026
|
}
|
|
1997
|
-
const
|
|
1998
|
-
sdkVersion:
|
|
2027
|
+
const Fn = {
|
|
2028
|
+
sdkVersion: W
|
|
1999
2029
|
};
|
|
2000
|
-
function
|
|
2001
|
-
return
|
|
2030
|
+
function $t() {
|
|
2031
|
+
return Ee({ sdkVersion: W });
|
|
2002
2032
|
}
|
|
2003
|
-
function
|
|
2033
|
+
function Dn(t) {
|
|
2004
2034
|
try {
|
|
2005
|
-
return
|
|
2035
|
+
return $t();
|
|
2006
2036
|
} catch {
|
|
2007
2037
|
return t;
|
|
2008
2038
|
}
|
|
2009
2039
|
}
|
|
2010
|
-
function
|
|
2040
|
+
function On(t) {
|
|
2011
2041
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2012
2042
|
return globalThis.getEnvironmentValue(t);
|
|
2013
2043
|
}
|
|
2014
2044
|
export {
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2045
|
+
Gt as Args,
|
|
2046
|
+
_ as BlockModel,
|
|
2047
|
+
Fn as CurrentSdkInfo,
|
|
2048
|
+
C as FutureRef,
|
|
2049
|
+
Rt as IS_VIRTUAL_COLUMN,
|
|
2050
|
+
Ht as It,
|
|
2051
|
+
wn as JsRenderInternal,
|
|
2052
|
+
Se as LABEL_ANNOTATION,
|
|
2053
|
+
qt as MainOutputs,
|
|
2054
|
+
rt as OutputError,
|
|
2055
|
+
ct as PAnnotationLabel,
|
|
2056
|
+
dt as PAnnotationTrace,
|
|
2027
2057
|
ge as PColumnCollection,
|
|
2028
|
-
|
|
2058
|
+
Tn as PFrameImpl,
|
|
2029
2059
|
K as RT_BINARY_PARTITIONED,
|
|
2030
|
-
|
|
2060
|
+
M as RT_BINARY_SUPER_PARTITIONED,
|
|
2031
2061
|
B as RT_JSON_PARTITIONED,
|
|
2032
2062
|
ie as RT_JSON_SUPER_PARTITIONED,
|
|
2033
2063
|
ne as RT_RESOURCE_MAP,
|
|
2034
2064
|
re as RT_RESOURCE_MAP_PARTITIONED,
|
|
2035
2065
|
X as RenderCtx,
|
|
2036
2066
|
It as ResultPool,
|
|
2037
|
-
|
|
2038
|
-
|
|
2067
|
+
zt as StagingOutputs,
|
|
2068
|
+
ft as Trace,
|
|
2039
2069
|
pt as TraceEntry,
|
|
2040
2070
|
I as TreeNodeAccessor,
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2071
|
+
Yt as UiState,
|
|
2072
|
+
$e as allColumnsComputed,
|
|
2073
|
+
rn as and,
|
|
2074
|
+
bt as convertOrParsePColumnData,
|
|
2075
|
+
Ln as createPFrameForGraphs,
|
|
2046
2076
|
Cn as createPlDataTable,
|
|
2047
2077
|
In as createPlDataTableSheet,
|
|
2048
|
-
|
|
2049
|
-
|
|
2078
|
+
_n as createPlDataTableV2,
|
|
2079
|
+
Re as deriveLabels,
|
|
2050
2080
|
ue as downgradeCfgOrLambda,
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2081
|
+
jt as enrichColumnsWithCompatible,
|
|
2082
|
+
hn as extractArchiveAndGetURL,
|
|
2083
|
+
Pn as extractConfig,
|
|
2084
|
+
wt as filterDataInfoEntries,
|
|
2085
|
+
en as flatten,
|
|
2086
|
+
En as fromPlOption,
|
|
2087
|
+
Kt as fromPlRef,
|
|
2088
|
+
kt as getAdditionalColumns,
|
|
2089
|
+
Ve as getAllLabelColumns,
|
|
2090
|
+
un as getBlobContent,
|
|
2091
|
+
dn as getBlobContentAsJson,
|
|
2092
|
+
cn as getBlobContentAsString,
|
|
2063
2093
|
pn as getDownloadedBlobContent,
|
|
2064
|
-
|
|
2065
|
-
|
|
2094
|
+
On as getEnvironmentValue,
|
|
2095
|
+
H as getFromCfg,
|
|
2066
2096
|
Z as getImmediate,
|
|
2067
|
-
|
|
2097
|
+
gn as getImportProgress,
|
|
2068
2098
|
te as getJsonField,
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2099
|
+
mn as getLastLogs,
|
|
2100
|
+
bn as getLogHandle,
|
|
2101
|
+
Ke as getMatchingLabelColumns,
|
|
2102
|
+
fn as getOnDemandBlobContent,
|
|
2103
|
+
mt as getPartitionKeysList,
|
|
2104
|
+
Dn as getPlatformaOrDefault,
|
|
2105
|
+
yn as getProgressLog,
|
|
2106
|
+
vn as getProgressLogWithInfo,
|
|
2107
|
+
$t as getRawPlatformaInstance,
|
|
2108
|
+
on as getResourceField,
|
|
2109
|
+
an as getResourceValueAsJson,
|
|
2110
|
+
vt as getUniquePartitionKeys,
|
|
2111
|
+
de as ifDef,
|
|
2112
|
+
Et as isColumnOptional,
|
|
2113
|
+
Lt as isConfigLambda,
|
|
2114
|
+
tn as isEmpty,
|
|
2115
|
+
Sn as isLabelColumn,
|
|
2116
|
+
Wt as isolate,
|
|
2117
|
+
Xt as makeArray,
|
|
2118
|
+
Te as makeObject,
|
|
2119
|
+
Zt as mapArrayValues,
|
|
2120
|
+
Qt as mapRecordValues,
|
|
2121
|
+
ln as mapResourceFields,
|
|
2122
|
+
nn as not,
|
|
2123
|
+
sn as or,
|
|
2094
2124
|
he as parsePColumnData,
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2125
|
+
Tt as parsePTableColumnId,
|
|
2126
|
+
An as parseResourceMap,
|
|
2127
|
+
it as readOutput,
|
|
2128
|
+
xn as stringifyPTableColumnId,
|
|
2129
|
+
Mt as wrapOutputs
|
|
2100
2130
|
};
|
|
2101
2131
|
//# sourceMappingURL=index.mjs.map
|