@platforma-sdk/model 1.23.0 → 1.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PFrameForGraphs.d.ts +1 -0
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +370 -346
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/PFrameForGraphs.test.ts +33 -1
- package/src/components/PFrameForGraphs.ts +47 -5
package/dist/index.mjs
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var _e = (t, e, n) => e in t ? ve(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var P = (t, e, n) => _e(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as B, mapPObjectData as N, selectorsToPredicate as te, AnchorIdDeriver as $, isPlRef as Ae, resolveAnchors as ne, isPColumnSpec as G, mapValueInVOE as Se, ensurePColumn as we, extractAllColumns as Ie, mapPTableDef as Pe, getAxisId as R, matchAxisId as D } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import { z as
|
|
7
|
-
class
|
|
6
|
+
import { z as T } from "zod";
|
|
7
|
+
class Ce extends Error {
|
|
8
8
|
constructor(e, n) {
|
|
9
9
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0]), this.errors = e, this.moreErrors = n;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (!t.ok) throw new
|
|
12
|
+
function Re(t) {
|
|
13
|
+
if (!t.ok) throw new Ce(t.errors, t.moreErrors);
|
|
14
14
|
return t.value;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Ze(t) {
|
|
17
17
|
return new Proxy(t, {
|
|
18
18
|
get(e, n) {
|
|
19
|
-
return
|
|
19
|
+
return Re(e[n]);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function y(t) {
|
|
24
24
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? j(t) : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function O(t) {
|
|
27
27
|
return { type: "GetFromCtx", variable: t };
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function et(t) {
|
|
30
30
|
return {
|
|
31
31
|
type: "Isolate",
|
|
32
32
|
cfg: t
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const tt = O("$args"), nt = O("$it"), st = O("$prod"), rt = O("$staging"), it = O("$ui");
|
|
36
36
|
function j(t) {
|
|
37
37
|
return { type: "Immediate", value: t };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ce(t) {
|
|
40
40
|
const e = {};
|
|
41
|
-
for (const [n, s] of Object.entries(t)) e[n] =
|
|
41
|
+
for (const [n, s] of Object.entries(t)) e[n] = y(s);
|
|
42
42
|
return {
|
|
43
43
|
type: "MakeObject",
|
|
44
44
|
template: e
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ot(...t) {
|
|
48
48
|
const e = [];
|
|
49
|
-
for (const n of t) e.push(
|
|
49
|
+
for (const n of t) e.push(y(n));
|
|
50
50
|
return {
|
|
51
51
|
type: "MakeArray",
|
|
52
52
|
template: e
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function U(t, e) {
|
|
56
56
|
return {
|
|
57
57
|
type: "GetJsonField",
|
|
58
|
-
source:
|
|
59
|
-
field:
|
|
58
|
+
source: y(t),
|
|
59
|
+
field: y(e)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function at(t, e, n = "$it") {
|
|
63
63
|
return {
|
|
64
64
|
type: "MapRecordValues",
|
|
65
65
|
source: t,
|
|
@@ -67,7 +67,7 @@ function ot(t, e, n = "$it") {
|
|
|
67
67
|
itVar: n
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function lt(t, e, n = "$it") {
|
|
71
71
|
return {
|
|
72
72
|
type: "MapArrayValues",
|
|
73
73
|
source: t,
|
|
@@ -75,54 +75,54 @@ function at(t, e, n = "$it") {
|
|
|
75
75
|
itVar: n
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function ut(t) {
|
|
79
79
|
return {
|
|
80
80
|
type: "Flatten",
|
|
81
81
|
source: t
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ct(t) {
|
|
85
85
|
return {
|
|
86
86
|
type: "IsEmpty",
|
|
87
87
|
arg: t
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function dt(t) {
|
|
91
91
|
return {
|
|
92
92
|
type: "Not",
|
|
93
93
|
operand: t
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function pt(t, e) {
|
|
97
97
|
return {
|
|
98
98
|
type: "And",
|
|
99
99
|
operand1: t,
|
|
100
100
|
operand2: e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ft(t, e) {
|
|
104
104
|
return {
|
|
105
105
|
type: "Or",
|
|
106
106
|
operand1: t,
|
|
107
107
|
operand2: e
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function ht(t, e) {
|
|
111
111
|
return {
|
|
112
112
|
type: "GetResourceField",
|
|
113
|
-
source:
|
|
114
|
-
field:
|
|
113
|
+
source: y(t),
|
|
114
|
+
field: y(e)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function gt() {
|
|
118
118
|
return function(t) {
|
|
119
119
|
return {
|
|
120
120
|
type: "GetResourceValueAsJson",
|
|
121
|
-
source:
|
|
121
|
+
source: y(t)
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function mt(t, e, n = "$it") {
|
|
126
126
|
return {
|
|
127
127
|
type: "MapResourceFields",
|
|
128
128
|
source: t,
|
|
@@ -130,120 +130,120 @@ function gt(t, e, n = "$it") {
|
|
|
130
130
|
itVar: n
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function yt(t) {
|
|
134
134
|
return {
|
|
135
135
|
type: "GetBlobContent",
|
|
136
|
-
source:
|
|
136
|
+
source: y(t)
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function bt(t) {
|
|
140
140
|
return {
|
|
141
141
|
type: "GetBlobContentAsString",
|
|
142
|
-
source:
|
|
142
|
+
source: y(t)
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function vt() {
|
|
146
146
|
return function(t) {
|
|
147
147
|
return {
|
|
148
148
|
type: "GetBlobContentAsJson",
|
|
149
|
-
source:
|
|
149
|
+
source: y(t)
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function _t(t) {
|
|
154
154
|
return {
|
|
155
155
|
type: "GetDownloadedBlobContent",
|
|
156
|
-
source:
|
|
156
|
+
source: y(t)
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function At(t) {
|
|
160
160
|
return {
|
|
161
161
|
type: "GetOnDemandBlobContent",
|
|
162
|
-
source:
|
|
162
|
+
source: y(t)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function St(t, e) {
|
|
166
166
|
return {
|
|
167
167
|
type: "ExtractArchiveAndGetURL",
|
|
168
168
|
format: e,
|
|
169
|
-
source:
|
|
169
|
+
source: y(t)
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function wt(t) {
|
|
173
173
|
return {
|
|
174
174
|
type: "GetImportProgress",
|
|
175
|
-
source:
|
|
175
|
+
source: y(t)
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function It(t, e) {
|
|
179
179
|
return {
|
|
180
180
|
type: "GetLastLogs",
|
|
181
|
-
source:
|
|
181
|
+
source: y(t),
|
|
182
182
|
lines: e
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Pt(t, e) {
|
|
186
186
|
return {
|
|
187
187
|
type: "GetProgressLog",
|
|
188
|
-
source:
|
|
188
|
+
source: y(t),
|
|
189
189
|
patternToSearch: e
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ct(t, e) {
|
|
193
193
|
return {
|
|
194
194
|
type: "GetProgressLogWithInfo",
|
|
195
|
-
source:
|
|
195
|
+
source: y(t),
|
|
196
196
|
patternToSearch: e
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Rt(t) {
|
|
200
200
|
return {
|
|
201
201
|
type: "GetLogHandle",
|
|
202
|
-
source:
|
|
202
|
+
source: y(t)
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Fe() {
|
|
206
206
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function de(t) {
|
|
209
209
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
210
210
|
return globalThis.getPlatforma(t);
|
|
211
211
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
212
212
|
throw new Error("Can't get platforma instance.");
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Te() {
|
|
215
215
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function f() {
|
|
218
218
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
219
219
|
throw new Error("Not in config rendering context");
|
|
220
220
|
}
|
|
221
221
|
function E(t, e) {
|
|
222
|
-
const n =
|
|
222
|
+
const n = Te();
|
|
223
223
|
if (n === void 0) return !1;
|
|
224
224
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
225
225
|
return n.callbackRegistry[t] = e, !0;
|
|
226
226
|
}
|
|
227
227
|
const W = /* @__PURE__ */ new Map();
|
|
228
228
|
function xe(t, e) {
|
|
229
|
-
t in
|
|
229
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
|
|
230
230
|
for (const s of W.get(t))
|
|
231
231
|
s(n);
|
|
232
232
|
}, W.set(t, [])), W.get(t).push(e);
|
|
233
233
|
}
|
|
234
|
-
class
|
|
234
|
+
class _ {
|
|
235
235
|
constructor(e, n = (s) => s) {
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
P(this, "isResolved", !1);
|
|
237
|
+
P(this, "resolvedValue");
|
|
238
238
|
this.handle = e, this.postProcess = n, xe(e, (s) => {
|
|
239
239
|
this.resolvedValue = n(s), this.isResolved = !0;
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
map(e) {
|
|
243
|
-
return new
|
|
243
|
+
return new _(this.handle, (n) => e(this.postProcess(n)));
|
|
244
244
|
}
|
|
245
245
|
mapDefined(e) {
|
|
246
|
-
return new
|
|
246
|
+
return new _(this.handle, (n) => {
|
|
247
247
|
const s = this.postProcess(n);
|
|
248
248
|
return s ? e(s) : void 0;
|
|
249
249
|
});
|
|
@@ -255,7 +255,7 @@ class b {
|
|
|
255
255
|
function z(t, e) {
|
|
256
256
|
return t === void 0 ? void 0 : e(t);
|
|
257
257
|
}
|
|
258
|
-
class
|
|
258
|
+
class S {
|
|
259
259
|
constructor(e, n) {
|
|
260
260
|
this.handle = e, this.resolvePath = n;
|
|
261
261
|
}
|
|
@@ -295,46 +295,46 @@ class v {
|
|
|
295
295
|
...n.map((r) => typeof r == "string" ? r : r.field)
|
|
296
296
|
];
|
|
297
297
|
return z(
|
|
298
|
-
|
|
299
|
-
(r) => new
|
|
298
|
+
f().resolveWithCommon(this.handle, e, ...n),
|
|
299
|
+
(r) => new S(r, s)
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
302
|
get resourceType() {
|
|
303
|
-
return
|
|
303
|
+
return f().getResourceType(this.handle);
|
|
304
304
|
}
|
|
305
305
|
getInputsLocked() {
|
|
306
|
-
return
|
|
306
|
+
return f().getInputsLocked(this.handle);
|
|
307
307
|
}
|
|
308
308
|
getOutputsLocked() {
|
|
309
|
-
return
|
|
309
|
+
return f().getOutputsLocked(this.handle);
|
|
310
310
|
}
|
|
311
311
|
getIsReadyOrError() {
|
|
312
|
-
return
|
|
312
|
+
return f().getIsReadyOrError(this.handle);
|
|
313
313
|
}
|
|
314
314
|
getIsFinal() {
|
|
315
|
-
return
|
|
315
|
+
return f().getIsFinal(this.handle);
|
|
316
316
|
}
|
|
317
317
|
getError() {
|
|
318
318
|
const e = [...this.resolvePath, "error"];
|
|
319
319
|
return z(
|
|
320
|
-
|
|
321
|
-
(n) => new
|
|
320
|
+
f().getError(this.handle),
|
|
321
|
+
(n) => new S(n, e)
|
|
322
322
|
);
|
|
323
323
|
}
|
|
324
324
|
listInputFields() {
|
|
325
|
-
return
|
|
325
|
+
return f().listInputFields(this.handle);
|
|
326
326
|
}
|
|
327
327
|
listOutputFields() {
|
|
328
|
-
return
|
|
328
|
+
return f().listOutputFields(this.handle);
|
|
329
329
|
}
|
|
330
330
|
listDynamicFields() {
|
|
331
|
-
return
|
|
331
|
+
return f().listDynamicFields(this.handle);
|
|
332
332
|
}
|
|
333
333
|
getKeyValueBase64(e) {
|
|
334
|
-
return
|
|
334
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
335
335
|
}
|
|
336
336
|
getKeyValueAsString(e) {
|
|
337
|
-
return
|
|
337
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
338
338
|
}
|
|
339
339
|
getKeyValueAsJson(e) {
|
|
340
340
|
const n = this.getKeyValueAsString(e);
|
|
@@ -342,10 +342,10 @@ class v {
|
|
|
342
342
|
return JSON.parse(n);
|
|
343
343
|
}
|
|
344
344
|
getDataBase64() {
|
|
345
|
-
return
|
|
345
|
+
return f().getDataBase64(this.handle);
|
|
346
346
|
}
|
|
347
347
|
getDataAsString() {
|
|
348
|
-
return
|
|
348
|
+
return f().getDataAsString(this.handle);
|
|
349
349
|
}
|
|
350
350
|
getDataAsJson() {
|
|
351
351
|
const e = this.getDataAsString();
|
|
@@ -358,7 +358,7 @@ class v {
|
|
|
358
358
|
getPColumns(e = !1, n = "") {
|
|
359
359
|
const s = this.parsePObjectCollection(e, n);
|
|
360
360
|
return s === void 0 ? void 0 : Object.entries(s).map(([, i]) => {
|
|
361
|
-
if (!
|
|
361
|
+
if (!B(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
362
362
|
return i;
|
|
363
363
|
});
|
|
364
364
|
}
|
|
@@ -366,7 +366,7 @@ class v {
|
|
|
366
366
|
*
|
|
367
367
|
*/
|
|
368
368
|
parsePObjectCollection(e = !1, n = "") {
|
|
369
|
-
const s =
|
|
369
|
+
const s = f().parsePObjectCollection(
|
|
370
370
|
this.handle,
|
|
371
371
|
e,
|
|
372
372
|
n,
|
|
@@ -376,19 +376,19 @@ class v {
|
|
|
376
376
|
const r = {};
|
|
377
377
|
for (const [i, o] of Object.entries(s)) {
|
|
378
378
|
const l = [...this.resolvePath, i];
|
|
379
|
-
r[i] =
|
|
379
|
+
r[i] = N(o, (a) => new S(a, l));
|
|
380
380
|
}
|
|
381
381
|
return r;
|
|
382
382
|
}
|
|
383
383
|
getFileContentAsBase64() {
|
|
384
|
-
return new
|
|
384
|
+
return new _(f().getBlobContentAsBase64(this.handle));
|
|
385
385
|
}
|
|
386
386
|
getFileContentAsString() {
|
|
387
|
-
return new
|
|
387
|
+
return new _(f().getBlobContentAsString(this.handle));
|
|
388
388
|
}
|
|
389
389
|
getFileContentAsJson() {
|
|
390
|
-
return new
|
|
391
|
-
|
|
390
|
+
return new _(
|
|
391
|
+
f().getBlobContentAsString(this.handle)
|
|
392
392
|
).mapDefined((e) => JSON.parse(e));
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
@@ -407,7 +407,7 @@ class v {
|
|
|
407
407
|
* @returns downloaded file handle
|
|
408
408
|
*/
|
|
409
409
|
getFileHandle() {
|
|
410
|
-
return new
|
|
410
|
+
return new _(f().getDownloadedBlobContentHandle(this.handle));
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* @deprecated use getFileHandle
|
|
@@ -419,7 +419,7 @@ class v {
|
|
|
419
419
|
* @returns downloaded file handle
|
|
420
420
|
*/
|
|
421
421
|
getRemoteFileHandle() {
|
|
422
|
-
return new
|
|
422
|
+
return new _(f().getOnDemandBlobContentHandle(this.handle));
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
425
425
|
* @deprecated use getRemoteFileHandle
|
|
@@ -431,22 +431,22 @@ class v {
|
|
|
431
431
|
* @returns the url to the extracted folder
|
|
432
432
|
*/
|
|
433
433
|
extractArchiveAndGetURL(e) {
|
|
434
|
-
return new
|
|
434
|
+
return new _(f().extractArchiveAndGetURL(this.handle, e));
|
|
435
435
|
}
|
|
436
436
|
getImportProgress() {
|
|
437
|
-
return new
|
|
437
|
+
return new _(f().getImportProgress(this.handle));
|
|
438
438
|
}
|
|
439
439
|
getLastLogs(e) {
|
|
440
|
-
return new
|
|
440
|
+
return new _(f().getLastLogs(this.handle, e));
|
|
441
441
|
}
|
|
442
442
|
getProgressLog(e) {
|
|
443
|
-
return new
|
|
443
|
+
return new _(f().getProgressLog(this.handle, e));
|
|
444
444
|
}
|
|
445
445
|
getProgressLogWithInfo(e) {
|
|
446
|
-
return new
|
|
446
|
+
return new _(f().getProgressLogWithInfo(this.handle, e));
|
|
447
447
|
}
|
|
448
448
|
getLogHandle() {
|
|
449
|
-
return new
|
|
449
|
+
return new _(f().getLogHandle(this.handle));
|
|
450
450
|
}
|
|
451
451
|
allFieldsResolved(e = "Input") {
|
|
452
452
|
switch (e) {
|
|
@@ -472,101 +472,101 @@ class v {
|
|
|
472
472
|
let a = (s === "Input" ? this.listInputFields() : s === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
473
473
|
(u) => [u, this.resolve({ field: u, assertFieldType: s })]
|
|
474
474
|
);
|
|
475
|
-
return i && (a = a.filter((u) => u[1] !== void 0)), a.map(([u,
|
|
475
|
+
return i && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, g]) => o(u, g));
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const pe = "staging", fe = "main", Le = {
|
|
479
479
|
inlineColumnsSupport: !0,
|
|
480
480
|
activeArgs: !0
|
|
481
481
|
};
|
|
482
|
-
function
|
|
482
|
+
function he(t) {
|
|
483
483
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
484
484
|
}
|
|
485
485
|
function Y(t, e, n) {
|
|
486
486
|
if (e.has(n)) return;
|
|
487
487
|
if (e.add(n), typeof n === "object")
|
|
488
|
-
if (
|
|
488
|
+
if (he(n)) n.__awaited_futures__.forEach((r) => t.add(r));
|
|
489
489
|
else if (Array.isArray(n))
|
|
490
490
|
for (const r of n) Y(t, e, r);
|
|
491
491
|
else
|
|
492
492
|
for (const [, r] of Object.entries(n))
|
|
493
493
|
r !== n && Y(t, e, r);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function De(t) {
|
|
496
496
|
const e = /* @__PURE__ */ new Set();
|
|
497
497
|
return Y(e, /* @__PURE__ */ new Set(), t), e;
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
500
500
|
__proto__: null,
|
|
501
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
502
|
-
MainAccessorName:
|
|
503
|
-
StagingAccessorName:
|
|
504
|
-
getAllFutureAwaits:
|
|
505
|
-
isFutureAwait:
|
|
506
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
507
|
-
type:
|
|
508
|
-
importance:
|
|
509
|
-
id:
|
|
510
|
-
label:
|
|
511
|
-
}),
|
|
501
|
+
GlobalCfgRenderCtxFeatureFlags: Le,
|
|
502
|
+
MainAccessorName: fe,
|
|
503
|
+
StagingAccessorName: pe,
|
|
504
|
+
getAllFutureAwaits: De,
|
|
505
|
+
isFutureAwait: he
|
|
506
|
+
}, Symbol.toStringTag, { value: "Module" })), Oe = "pl7.app/label", ke = "pl7.app/trace", Ee = T.object({
|
|
507
|
+
type: T.string(),
|
|
508
|
+
importance: T.number().optional(),
|
|
509
|
+
id: T.string().optional(),
|
|
510
|
+
label: T.string()
|
|
511
|
+
}), Ve = T.array(Ee), je = 1e-3, Ne = "__LABEL__", se = "__LABEL__@1";
|
|
512
512
|
function re(t, e, n = {}) {
|
|
513
|
-
const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = t.map((
|
|
514
|
-
var
|
|
515
|
-
const
|
|
516
|
-
if (
|
|
517
|
-
const
|
|
518
|
-
n.addLabelAsSuffix ?
|
|
513
|
+
const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = t.map((d) => {
|
|
514
|
+
var A, ee;
|
|
515
|
+
const h = e(d), p = (A = h.annotations) == null ? void 0 : A[Oe], b = (ee = h.annotations) == null ? void 0 : ee[ke], m = (b ? Ve.safeParse(JSON.parse(b)).data : void 0) ?? [];
|
|
516
|
+
if (p) {
|
|
517
|
+
const C = { label: p, type: Ne, importance: -2 };
|
|
518
|
+
n.addLabelAsSuffix ? m.push(C) : m.splice(0, 0, C);
|
|
519
519
|
}
|
|
520
|
-
const
|
|
521
|
-
for (let
|
|
522
|
-
const { type:
|
|
523
|
-
|
|
524
|
-
const x = `${
|
|
520
|
+
const I = [], v = /* @__PURE__ */ new Map();
|
|
521
|
+
for (let C = m.length - 1; C >= 0; --C) {
|
|
522
|
+
const { type: J } = m[C], be = m[C].importance ?? 0, M = (v.get(J) ?? 0) + 1;
|
|
523
|
+
v.set(J, M);
|
|
524
|
+
const x = `${J}@${M}`;
|
|
525
525
|
r.set(x, (r.get(x) ?? 0) + 1), s.set(
|
|
526
526
|
x,
|
|
527
527
|
Math.max(
|
|
528
528
|
s.get(x) ?? Number.NEGATIVE_INFINITY,
|
|
529
|
-
|
|
529
|
+
be - (m.length - C) * je
|
|
530
530
|
)
|
|
531
|
-
),
|
|
531
|
+
), I.push({ ...m[C], fullType: x, occurenceIndex: M });
|
|
532
532
|
}
|
|
533
|
-
return
|
|
534
|
-
value:
|
|
535
|
-
spec:
|
|
536
|
-
label:
|
|
537
|
-
fullTrace:
|
|
533
|
+
return I.reverse(), {
|
|
534
|
+
value: d,
|
|
535
|
+
spec: h,
|
|
536
|
+
label: p,
|
|
537
|
+
fullTrace: I
|
|
538
538
|
};
|
|
539
539
|
}), o = [], l = [], a = [...s];
|
|
540
|
-
a.sort(([,
|
|
541
|
-
for (const [
|
|
542
|
-
|
|
543
|
-
const u = (
|
|
544
|
-
const
|
|
540
|
+
a.sort(([, d], [, h]) => h - d);
|
|
541
|
+
for (const [d] of a)
|
|
542
|
+
d.endsWith("@1") || r.get(d) === t.length ? o.push(d) : l.push(d);
|
|
543
|
+
const u = (d) => i.map((h) => {
|
|
544
|
+
const p = h.fullTrace.filter((m) => d.has(m.fullType)).map((m) => m.label), b = n.separator ?? " / ";
|
|
545
545
|
return {
|
|
546
|
-
label:
|
|
547
|
-
value:
|
|
546
|
+
label: p.join(b),
|
|
547
|
+
value: h.value
|
|
548
548
|
};
|
|
549
549
|
});
|
|
550
550
|
if (o.length === 0) {
|
|
551
551
|
if (l.length !== 0) throw new Error("Assertion error.");
|
|
552
552
|
return u(new Set(se));
|
|
553
553
|
}
|
|
554
|
-
let
|
|
555
|
-
for (;
|
|
556
|
-
const
|
|
557
|
-
n.includeNativeLabel &&
|
|
558
|
-
for (let
|
|
559
|
-
|
|
560
|
-
const
|
|
561
|
-
if (new Set(
|
|
562
|
-
|
|
554
|
+
let g = 0, c = 0;
|
|
555
|
+
for (; g < o.length; ) {
|
|
556
|
+
const d = /* @__PURE__ */ new Set();
|
|
557
|
+
n.includeNativeLabel && d.add(se);
|
|
558
|
+
for (let p = 0; p < g; ++p) d.add(o[p]);
|
|
559
|
+
d.add(o[c]);
|
|
560
|
+
const h = u(d);
|
|
561
|
+
if (new Set(h.map((p) => p.label)).size === t.length) return h;
|
|
562
|
+
c++, c == o.length && (g++, c = g);
|
|
563
563
|
}
|
|
564
564
|
return u(/* @__PURE__ */ new Set([...o, ...l]));
|
|
565
565
|
}
|
|
566
566
|
class Ue {
|
|
567
567
|
constructor() {
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
P(this, "ctx", f());
|
|
569
|
+
P(this, "defaultLabelFn", (e, n) => {
|
|
570
570
|
var s;
|
|
571
571
|
return ((s = e.annotations) == null ? void 0 : s["pl7.app/label"]) ?? "Unlabelled";
|
|
572
572
|
});
|
|
@@ -592,11 +592,11 @@ class Ue {
|
|
|
592
592
|
const r = {};
|
|
593
593
|
if (!(e instanceof $))
|
|
594
594
|
for (const [a, u] of Object.entries(e))
|
|
595
|
-
if (
|
|
596
|
-
const
|
|
597
|
-
if (!
|
|
595
|
+
if (Ae(u)) {
|
|
596
|
+
const g = this.getPColumnSpecByRef(u);
|
|
597
|
+
if (!g)
|
|
598
598
|
return;
|
|
599
|
-
r[a] =
|
|
599
|
+
r[a] = g;
|
|
600
600
|
} else
|
|
601
601
|
r[a] = u;
|
|
602
602
|
const i = typeof n == "function" ? n : te(
|
|
@@ -621,7 +621,7 @@ class Ue {
|
|
|
621
621
|
ref: n.ref,
|
|
622
622
|
obj: {
|
|
623
623
|
...n.obj,
|
|
624
|
-
data: new
|
|
624
|
+
data: new S(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
625
625
|
}
|
|
626
626
|
}))
|
|
627
627
|
};
|
|
@@ -640,9 +640,9 @@ class Ue {
|
|
|
640
640
|
ref: n.ref,
|
|
641
641
|
obj: {
|
|
642
642
|
...n.obj,
|
|
643
|
-
data:
|
|
643
|
+
data: Se(
|
|
644
644
|
n.obj.data,
|
|
645
|
-
(s) => new
|
|
645
|
+
(s) => new S(s, [n.ref.blockId, n.ref.name])
|
|
646
646
|
)
|
|
647
647
|
}
|
|
648
648
|
}))
|
|
@@ -665,9 +665,9 @@ class Ue {
|
|
|
665
665
|
var n;
|
|
666
666
|
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
|
|
667
667
|
(s) => s.ref.blockId === e.blockId && s.ref.name === e.name
|
|
668
|
-
)) == null ? void 0 : n.obj :
|
|
668
|
+
)) == null ? void 0 : n.obj : N(
|
|
669
669
|
this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
|
|
670
|
-
(s) => new
|
|
670
|
+
(s) => new S(s, [e.blockId, e.name])
|
|
671
671
|
);
|
|
672
672
|
}
|
|
673
673
|
/**
|
|
@@ -678,7 +678,7 @@ class Ue {
|
|
|
678
678
|
getPColumnByRef(e) {
|
|
679
679
|
const n = this.getDataByRef(e);
|
|
680
680
|
if (n)
|
|
681
|
-
return
|
|
681
|
+
return we(n);
|
|
682
682
|
}
|
|
683
683
|
/**
|
|
684
684
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -731,13 +731,13 @@ function X(t, e) {
|
|
|
731
731
|
}
|
|
732
732
|
class V {
|
|
733
733
|
constructor() {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
734
|
+
P(this, "ctx");
|
|
735
|
+
P(this, "args");
|
|
736
|
+
P(this, "uiState");
|
|
737
737
|
// lazy rendering because this feature is rarely used
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
this.ctx =
|
|
738
|
+
P(this, "_activeArgsCache");
|
|
739
|
+
P(this, "resultPool", new Ue());
|
|
740
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
741
741
|
}
|
|
742
742
|
/**
|
|
743
743
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -755,14 +755,14 @@ class V {
|
|
|
755
755
|
getNamedAccessor(e) {
|
|
756
756
|
return z(
|
|
757
757
|
this.ctx.getAccessorHandleByName(e),
|
|
758
|
-
(n) => new
|
|
758
|
+
(n) => new S(n, [e])
|
|
759
759
|
);
|
|
760
760
|
}
|
|
761
761
|
get prerun() {
|
|
762
|
-
return this.getNamedAccessor(
|
|
762
|
+
return this.getNamedAccessor(pe);
|
|
763
763
|
}
|
|
764
764
|
get outputs() {
|
|
765
|
-
return this.getNamedAccessor(
|
|
765
|
+
return this.getNamedAccessor(fe);
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
768
768
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -771,7 +771,7 @@ class V {
|
|
|
771
771
|
findLabels(e) {
|
|
772
772
|
const n = this.resultPool.getData();
|
|
773
773
|
for (const s of n.entries) {
|
|
774
|
-
if (!
|
|
774
|
+
if (!B(s.obj)) continue;
|
|
775
775
|
const r = s.obj.spec;
|
|
776
776
|
if (r.name === "pl7.app/label" && r.axesSpec.length === 1 && r.axesSpec[0].name === e.name && r.axesSpec[0].type === e.type && X(e.domain, r.axesSpec[0].domain)) {
|
|
777
777
|
if (s.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -786,12 +786,12 @@ class V {
|
|
|
786
786
|
}
|
|
787
787
|
verifyInlineColumnsSupport(e) {
|
|
788
788
|
var r;
|
|
789
|
-
const n = e.some((i) => !(i.data instanceof
|
|
789
|
+
const n = e.some((i) => !(i.data instanceof S)), s = ((r = this.ctx.featureFlags) == null ? void 0 : r.inlineColumnsSupport) === !0;
|
|
790
790
|
if (n && !s) throw Error("inline columns not supported");
|
|
791
791
|
}
|
|
792
792
|
createPFrame(e) {
|
|
793
793
|
return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
|
|
794
|
-
e.map((n) =>
|
|
794
|
+
e.map((n) => N(n, (s) => s instanceof S ? s.handle : s))
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
797
|
createPTable(e) {
|
|
@@ -803,10 +803,10 @@ class V {
|
|
|
803
803
|
},
|
|
804
804
|
filters: e.filters ?? [],
|
|
805
805
|
sorting: e.sorting ?? []
|
|
806
|
-
} : n = e, this.verifyInlineColumnsSupport(
|
|
807
|
-
|
|
806
|
+
} : n = e, this.verifyInlineColumnsSupport(Ie(n.src)), this.ctx.createPTable(
|
|
807
|
+
Pe(
|
|
808
808
|
n,
|
|
809
|
-
(s) =>
|
|
809
|
+
(s) => N(s, (r) => r instanceof S ? r.handle : r)
|
|
810
810
|
)
|
|
811
811
|
);
|
|
812
812
|
}
|
|
@@ -819,8 +819,8 @@ class V {
|
|
|
819
819
|
return this.ctx.getCurrentUnstableMarker();
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
function
|
|
822
|
+
const k = "PColumnData/", Q = k + "ResourceMap", Z = k + "Partitioned/ResourceMap", ie = k + "JsonPartitioned", K = k + "BinaryPartitioned", ge = k + "Partitioned/", oe = ge + "JsonPartitioned", H = ge + "BinaryPartitioned";
|
|
823
|
+
function me(t, e, n, s = [], r) {
|
|
824
824
|
if (t === void 0) return !1;
|
|
825
825
|
switch (t.resourceType.name) {
|
|
826
826
|
case Q: {
|
|
@@ -837,7 +837,7 @@ function ge(t, e, n, s = [], r) {
|
|
|
837
837
|
const l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
838
838
|
if (l === void 0) i = !1;
|
|
839
839
|
else {
|
|
840
|
-
const a = [...s, ...JSON.parse(o)], u =
|
|
840
|
+
const a = [...s, ...JSON.parse(o)], u = me(
|
|
841
841
|
l,
|
|
842
842
|
e,
|
|
843
843
|
n,
|
|
@@ -853,9 +853,9 @@ function ge(t, e, n, s = [], r) {
|
|
|
853
853
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function Tt(t, e, n = !1) {
|
|
857
857
|
const s = [];
|
|
858
|
-
return { isComplete:
|
|
858
|
+
return { isComplete: me(t, e, s, [], n), data: s };
|
|
859
859
|
}
|
|
860
860
|
const ae = (t) => {
|
|
861
861
|
if (!t.endsWith(".index")) {
|
|
@@ -906,8 +906,8 @@ function Be(t) {
|
|
|
906
906
|
if (l !== void 0)
|
|
907
907
|
for (let a of l.listInputFields()) {
|
|
908
908
|
if (e === H) {
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
909
|
+
const g = ae(a);
|
|
910
|
+
if (g) a = g;
|
|
911
911
|
else continue;
|
|
912
912
|
}
|
|
913
913
|
const u = [...o, ...JSON.parse(a)];
|
|
@@ -932,19 +932,19 @@ function xt(t) {
|
|
|
932
932
|
}
|
|
933
933
|
return r.map((i) => Array.from(i.values()));
|
|
934
934
|
}
|
|
935
|
-
const
|
|
936
|
-
function
|
|
935
|
+
const L = "1.23.4";
|
|
936
|
+
function Je(t) {
|
|
937
937
|
return t.__renderLambda === !0;
|
|
938
938
|
}
|
|
939
939
|
function q(t) {
|
|
940
940
|
if (t !== void 0)
|
|
941
|
-
return
|
|
941
|
+
return Je(t) ? t.handle : t;
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function F(t) {
|
|
944
944
|
if (t !== void 0)
|
|
945
945
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Lt(t) {
|
|
948
948
|
if (t.v3 !== void 0) {
|
|
949
949
|
const {
|
|
950
950
|
initialArgs: e,
|
|
@@ -978,10 +978,10 @@ function Tt(t) {
|
|
|
978
978
|
renderingMode: n,
|
|
979
979
|
initialArgs: o,
|
|
980
980
|
outputs: Object.fromEntries(
|
|
981
|
-
Object.entries(s).map(([u,
|
|
981
|
+
Object.entries(s).map(([u, g]) => [u, F(g)])
|
|
982
982
|
),
|
|
983
|
-
inputsValid:
|
|
984
|
-
sections:
|
|
983
|
+
inputsValid: F(r),
|
|
984
|
+
sections: F(i),
|
|
985
985
|
initialUiState: void 0,
|
|
986
986
|
code: l
|
|
987
987
|
};
|
|
@@ -996,10 +996,10 @@ function Tt(t) {
|
|
|
996
996
|
renderingMode: s,
|
|
997
997
|
initialArgs: o,
|
|
998
998
|
outputs: Object.fromEntries(
|
|
999
|
-
Object.entries(r).map(([u,
|
|
999
|
+
Object.entries(r).map(([u, g]) => [u, F(g)])
|
|
1000
1000
|
),
|
|
1001
|
-
inputsValid:
|
|
1002
|
-
sections:
|
|
1001
|
+
inputsValid: F(n),
|
|
1002
|
+
sections: F(i),
|
|
1003
1003
|
initialUiState: void 0,
|
|
1004
1004
|
code: l
|
|
1005
1005
|
};
|
|
@@ -1010,12 +1010,12 @@ function Tt(t) {
|
|
|
1010
1010
|
);
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
|
-
class
|
|
1013
|
+
class w {
|
|
1014
1014
|
constructor(e, n, s, r, i, o, l) {
|
|
1015
1015
|
this._renderingMode = e, this._initialArgs = n, this._initialUiState = s, this._outputs = r, this._inputsValid = i, this._sections = o, this._title = l;
|
|
1016
1016
|
}
|
|
1017
1017
|
static create(e = "Heavy") {
|
|
1018
|
-
return new
|
|
1018
|
+
return new w(
|
|
1019
1019
|
e,
|
|
1020
1020
|
void 0,
|
|
1021
1021
|
{},
|
|
@@ -1028,7 +1028,7 @@ class _ {
|
|
|
1028
1028
|
output(e, n, s = {}) {
|
|
1029
1029
|
if (typeof n == "function") {
|
|
1030
1030
|
const r = `output#${e}`;
|
|
1031
|
-
return E(r, () => n(new V())), new
|
|
1031
|
+
return E(r, () => n(new V())), new w(
|
|
1032
1032
|
this._renderingMode,
|
|
1033
1033
|
this._initialArgs,
|
|
1034
1034
|
this._initialUiState,
|
|
@@ -1045,7 +1045,7 @@ class _ {
|
|
|
1045
1045
|
this._title
|
|
1046
1046
|
);
|
|
1047
1047
|
} else
|
|
1048
|
-
return new
|
|
1048
|
+
return new w(
|
|
1049
1049
|
this._renderingMode,
|
|
1050
1050
|
this._initialArgs,
|
|
1051
1051
|
this._initialUiState,
|
|
@@ -1063,7 +1063,7 @@ class _ {
|
|
|
1063
1063
|
return this.output(e, n, { retentive: !0 });
|
|
1064
1064
|
}
|
|
1065
1065
|
argsValid(e) {
|
|
1066
|
-
return typeof e == "function" ? (E("inputsValid", () => e(new V())), new
|
|
1066
|
+
return typeof e == "function" ? (E("inputsValid", () => e(new V())), new w(
|
|
1067
1067
|
this._renderingMode,
|
|
1068
1068
|
this._initialArgs,
|
|
1069
1069
|
this._initialUiState,
|
|
@@ -1074,7 +1074,7 @@ class _ {
|
|
|
1074
1074
|
},
|
|
1075
1075
|
this._sections,
|
|
1076
1076
|
this._title
|
|
1077
|
-
)) : new
|
|
1077
|
+
)) : new w(
|
|
1078
1078
|
this._renderingMode,
|
|
1079
1079
|
this._initialArgs,
|
|
1080
1080
|
this._initialUiState,
|
|
@@ -1085,7 +1085,7 @@ class _ {
|
|
|
1085
1085
|
);
|
|
1086
1086
|
}
|
|
1087
1087
|
sections(e) {
|
|
1088
|
-
return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new
|
|
1088
|
+
return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new w(
|
|
1089
1089
|
this._renderingMode,
|
|
1090
1090
|
this._initialArgs,
|
|
1091
1091
|
this._initialUiState,
|
|
@@ -1093,7 +1093,7 @@ class _ {
|
|
|
1093
1093
|
this._inputsValid,
|
|
1094
1094
|
{ __renderLambda: !0, handle: "sections" },
|
|
1095
1095
|
this._title
|
|
1096
|
-
)) : new
|
|
1096
|
+
)) : new w(
|
|
1097
1097
|
this._renderingMode,
|
|
1098
1098
|
this._initialArgs,
|
|
1099
1099
|
this._initialUiState,
|
|
@@ -1105,7 +1105,7 @@ class _ {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1107
1107
|
title(e) {
|
|
1108
|
-
return E("title", () => e(new V())), new
|
|
1108
|
+
return E("title", () => e(new V())), new w(
|
|
1109
1109
|
this._renderingMode,
|
|
1110
1110
|
this._initialArgs,
|
|
1111
1111
|
this._initialUiState,
|
|
@@ -1120,7 +1120,7 @@ class _ {
|
|
|
1120
1120
|
* @deprecated use {@link withArgs}
|
|
1121
1121
|
* */
|
|
1122
1122
|
initialArgs(e) {
|
|
1123
|
-
return new
|
|
1123
|
+
return new w(
|
|
1124
1124
|
this._renderingMode,
|
|
1125
1125
|
e,
|
|
1126
1126
|
this._initialUiState,
|
|
@@ -1132,7 +1132,7 @@ class _ {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
/** Sets initial args for the block, this value must be specified. */
|
|
1134
1134
|
withArgs(e) {
|
|
1135
|
-
return new
|
|
1135
|
+
return new w(
|
|
1136
1136
|
this._renderingMode,
|
|
1137
1137
|
e,
|
|
1138
1138
|
this._initialUiState,
|
|
@@ -1144,7 +1144,7 @@ class _ {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
/** Defines type and sets initial value for block UiState. */
|
|
1146
1146
|
withUiState(e) {
|
|
1147
|
-
return new
|
|
1147
|
+
return new w(
|
|
1148
1148
|
this._renderingMode,
|
|
1149
1149
|
this._initialArgs,
|
|
1150
1150
|
e,
|
|
@@ -1161,7 +1161,7 @@ class _ {
|
|
|
1161
1161
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1162
1162
|
const e = {
|
|
1163
1163
|
v3: {
|
|
1164
|
-
sdkVersion:
|
|
1164
|
+
sdkVersion: L,
|
|
1165
1165
|
renderingMode: this._renderingMode,
|
|
1166
1166
|
initialArgs: this._initialArgs,
|
|
1167
1167
|
initialUiState: this._initialUiState,
|
|
@@ -1171,7 +1171,7 @@ class _ {
|
|
|
1171
1171
|
outputs: this._outputs
|
|
1172
1172
|
},
|
|
1173
1173
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1174
|
-
sdkVersion:
|
|
1174
|
+
sdkVersion: L,
|
|
1175
1175
|
renderingMode: this._renderingMode,
|
|
1176
1176
|
initialArgs: this._initialArgs,
|
|
1177
1177
|
inputsValid: q(this._inputsValid),
|
|
@@ -1180,66 +1180,66 @@ class _ {
|
|
|
1180
1180
|
Object.entries(this._outputs).map(([n, s]) => [n, q(s)])
|
|
1181
1181
|
)
|
|
1182
1182
|
};
|
|
1183
|
-
return
|
|
1183
|
+
return Fe() ? de({ sdkVersion: L }) : { config: e };
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1187
|
-
var u,
|
|
1186
|
+
function Dt(t, e, n, s) {
|
|
1187
|
+
var u, g;
|
|
1188
1188
|
Array.isArray(s) && (s = { filters: s });
|
|
1189
|
-
const r = t.resultPool.getData().entries.map((
|
|
1190
|
-
let
|
|
1191
|
-
if (
|
|
1192
|
-
for (const
|
|
1193
|
-
|
|
1194
|
-
return
|
|
1189
|
+
const r = t.resultPool.getData().entries.map((c) => c.obj).filter(B).filter((c) => c.spec.name === "pl7.app/label" && c.spec.axesSpec.length === 1), i = (c, d) => {
|
|
1190
|
+
let h = c.toString();
|
|
1191
|
+
if (d)
|
|
1192
|
+
for (const p in d)
|
|
1193
|
+
h += p, h += d[p];
|
|
1194
|
+
return h;
|
|
1195
1195
|
}, o = /* @__PURE__ */ new Map();
|
|
1196
|
-
for (const
|
|
1197
|
-
for (const
|
|
1198
|
-
const
|
|
1199
|
-
for (const
|
|
1200
|
-
const
|
|
1201
|
-
if (
|
|
1202
|
-
const
|
|
1203
|
-
if (
|
|
1204
|
-
const
|
|
1205
|
-
o.set(
|
|
1206
|
-
id:
|
|
1196
|
+
for (const c of e)
|
|
1197
|
+
for (const d of c.spec.axesSpec) {
|
|
1198
|
+
const h = R(d);
|
|
1199
|
+
for (const p of r) {
|
|
1200
|
+
const b = p.spec.axesSpec[0], m = R(p.spec.axesSpec[0]);
|
|
1201
|
+
if (D(h, m)) {
|
|
1202
|
+
const I = Object.keys(h.domain ?? {}).length, v = Object.keys(m.domain ?? {}).length;
|
|
1203
|
+
if (I > v) {
|
|
1204
|
+
const A = i(p.id, h.domain);
|
|
1205
|
+
o.set(A, {
|
|
1206
|
+
id: A,
|
|
1207
1207
|
spec: {
|
|
1208
|
-
...
|
|
1209
|
-
axesSpec: [{ ...
|
|
1208
|
+
...p.spec,
|
|
1209
|
+
axesSpec: [{ ...h, annotations: b.annotations }]
|
|
1210
1210
|
},
|
|
1211
|
-
data:
|
|
1211
|
+
data: p.data
|
|
1212
1212
|
});
|
|
1213
1213
|
} else
|
|
1214
|
-
o.set(i(
|
|
1214
|
+
o.set(i(p.id), p);
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
1218
|
if ([...e, ...o.values()].some(
|
|
1219
|
-
(
|
|
1219
|
+
(c) => c.data instanceof S && !c.data.getIsReadyOrError()
|
|
1220
1220
|
))
|
|
1221
1221
|
return;
|
|
1222
1222
|
let l = e;
|
|
1223
1223
|
const a = [];
|
|
1224
1224
|
if (s != null && s.coreColumnPredicate) {
|
|
1225
1225
|
l = [];
|
|
1226
|
-
for (const
|
|
1227
|
-
s.coreColumnPredicate(
|
|
1226
|
+
for (const c of e)
|
|
1227
|
+
s.coreColumnPredicate(c.spec) ? l.push(c) : a.push(c);
|
|
1228
1228
|
}
|
|
1229
1229
|
return a.push(...o.values()), t.createPTable({
|
|
1230
1230
|
src: {
|
|
1231
1231
|
type: "outer",
|
|
1232
1232
|
primary: {
|
|
1233
1233
|
type: (s == null ? void 0 : s.coreJoinType) ?? "full",
|
|
1234
|
-
entries: l.map((
|
|
1234
|
+
entries: l.map((c) => ({ type: "column", column: c }))
|
|
1235
1235
|
},
|
|
1236
|
-
secondary: a.map((
|
|
1236
|
+
secondary: a.map((c) => ({ type: "column", column: c }))
|
|
1237
1237
|
},
|
|
1238
1238
|
filters: [...(s == null ? void 0 : s.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
|
|
1239
|
-
sorting: ((
|
|
1239
|
+
sorting: ((g = n == null ? void 0 : n.pTableParams) == null ? void 0 : g.sorting) ?? []
|
|
1240
1240
|
});
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Ot(t, e, n) {
|
|
1243
1243
|
const s = t.findLabels(e);
|
|
1244
1244
|
return {
|
|
1245
1245
|
axis: e,
|
|
@@ -1258,7 +1258,7 @@ const Me = (t, e) => {
|
|
|
1258
1258
|
n += r, n += i;
|
|
1259
1259
|
}), n;
|
|
1260
1260
|
};
|
|
1261
|
-
function
|
|
1261
|
+
function $e(t) {
|
|
1262
1262
|
if (!t.length)
|
|
1263
1263
|
return [];
|
|
1264
1264
|
let e = [[]];
|
|
@@ -1269,64 +1269,87 @@ function Je(t) {
|
|
|
1269
1269
|
}), e = s;
|
|
1270
1270
|
}), e;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1273
|
-
const n = t.spec.axesSpec.map(
|
|
1274
|
-
return e.spec.axesSpec.map(
|
|
1272
|
+
function Ge(t, e) {
|
|
1273
|
+
const n = t.spec.axesSpec.map(R);
|
|
1274
|
+
return e.spec.axesSpec.map(R).every((r) => n.some((i) => D(i, r) && D(r, i)));
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
const n = t.spec.axesSpec.map(
|
|
1278
|
-
return e.spec.axesSpec.map(
|
|
1276
|
+
function ye(t, e) {
|
|
1277
|
+
const n = t.spec.axesSpec.map(R);
|
|
1278
|
+
return e.spec.axesSpec.map(R).every((r) => n.some((i) => D(i, r)));
|
|
1279
1279
|
}
|
|
1280
|
-
const
|
|
1281
|
-
function
|
|
1282
|
-
const n = t.spec.axesSpec.map(
|
|
1283
|
-
if (
|
|
1280
|
+
const We = "pl7.app/graph/isVirtual", le = "pl7.app/label";
|
|
1281
|
+
function ue(t, e) {
|
|
1282
|
+
const n = t.spec.axesSpec.map(R), s = e.spec.axesSpec.map(R);
|
|
1283
|
+
if (Ge(t, e))
|
|
1284
1284
|
return [];
|
|
1285
|
-
if (!
|
|
1285
|
+
if (!ye(t, e))
|
|
1286
1286
|
return [];
|
|
1287
|
-
const o = s.map((
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
...
|
|
1298
|
-
[
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
|
|
1302
|
-
|
|
1287
|
+
const o = s.map((c) => n.filter((d) => D(d, c))), l = $e(o), a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), g = l.map((c) => {
|
|
1288
|
+
const d = /* @__PURE__ */ new Set();
|
|
1289
|
+
return c.map((h, p) => {
|
|
1290
|
+
const b = e.spec.axesSpec[p].domain, m = h.domain;
|
|
1291
|
+
return Object.entries(m ?? {}).forEach(([I, v]) => {
|
|
1292
|
+
if ((b == null ? void 0 : b[I]) === void 0) {
|
|
1293
|
+
const A = JSON.stringify([I, v]);
|
|
1294
|
+
d.add(A), a.add(A);
|
|
1295
|
+
}
|
|
1296
|
+
}), {
|
|
1297
|
+
...h,
|
|
1298
|
+
annotations: e.spec.axesSpec[p].annotations
|
|
1299
|
+
};
|
|
1300
|
+
}), d;
|
|
1301
|
+
});
|
|
1302
|
+
return [...a].forEach((c) => {
|
|
1303
|
+
g.some((d) => !d.has(c)) && u.add(c);
|
|
1304
|
+
}), l.map((c, d) => {
|
|
1305
|
+
var I;
|
|
1306
|
+
const h = Me(e.id, c.map((v) => v.domain)), p = ((I = e.spec.annotations) == null ? void 0 : I[le]) ?? "", b = [...g[d]].filter((v) => u.has(v)).sort().map((v) => {
|
|
1307
|
+
var A;
|
|
1308
|
+
return (A = JSON.parse(v)) == null ? void 0 : A[1];
|
|
1309
|
+
}).join(" / "), m = {
|
|
1310
|
+
...e.spec.annotations,
|
|
1311
|
+
[We]: "true"
|
|
1312
|
+
};
|
|
1313
|
+
return (p || b) && (m[le] = p && b ? p + " / " + b : p + b), {
|
|
1314
|
+
id: h,
|
|
1315
|
+
spec: {
|
|
1316
|
+
...e.spec,
|
|
1317
|
+
axesSpec: c.map((v, A) => ({
|
|
1318
|
+
...v,
|
|
1319
|
+
annotations: e.spec.axesSpec[A].annotations
|
|
1320
|
+
})),
|
|
1321
|
+
annotations: m
|
|
1322
|
+
},
|
|
1323
|
+
data: e.data
|
|
1324
|
+
};
|
|
1325
|
+
});
|
|
1303
1326
|
}
|
|
1304
|
-
function
|
|
1327
|
+
function Ke(t) {
|
|
1305
1328
|
const e = [];
|
|
1306
1329
|
for (let n = 0; n < t.length; n++)
|
|
1307
1330
|
for (let s = n + 1; s < t.length; s++) {
|
|
1308
1331
|
const r = t[n], i = t[s];
|
|
1309
1332
|
e.push(
|
|
1310
|
-
...
|
|
1311
|
-
...
|
|
1333
|
+
...ue(r, i),
|
|
1334
|
+
...ue(i, r)
|
|
1312
1335
|
);
|
|
1313
1336
|
}
|
|
1314
1337
|
return e;
|
|
1315
1338
|
}
|
|
1316
|
-
function
|
|
1339
|
+
function He(t, e) {
|
|
1317
1340
|
const n = [...t];
|
|
1318
1341
|
for (const s of e)
|
|
1319
1342
|
for (const r of t) {
|
|
1320
1343
|
if (r.id === s.id)
|
|
1321
1344
|
break;
|
|
1322
|
-
if (
|
|
1345
|
+
if (ye(r, s)) {
|
|
1323
1346
|
n.push(s);
|
|
1324
1347
|
break;
|
|
1325
1348
|
}
|
|
1326
1349
|
}
|
|
1327
1350
|
return n;
|
|
1328
1351
|
}
|
|
1329
|
-
const
|
|
1352
|
+
const qe = [
|
|
1330
1353
|
"Int",
|
|
1331
1354
|
"Long",
|
|
1332
1355
|
"Float",
|
|
@@ -1334,15 +1357,15 @@ const He = [
|
|
|
1334
1357
|
"String",
|
|
1335
1358
|
"Bytes"
|
|
1336
1359
|
];
|
|
1337
|
-
function
|
|
1360
|
+
function kt(t, e) {
|
|
1338
1361
|
if (e === void 0) return;
|
|
1339
|
-
const n = t.resultPool.getData().entries.map((i) => i.obj).filter(
|
|
1362
|
+
const n = t.resultPool.getData().entries.map((i) => i.obj).filter(B).filter((i) => qe.includes(i.spec.valueType)), s = He(e, n), r = [...s, ...Ke(s)];
|
|
1340
1363
|
if (!r.some(
|
|
1341
|
-
(i) => i.data instanceof
|
|
1364
|
+
(i) => i.data instanceof S && !i.data.getIsReadyOrError()
|
|
1342
1365
|
))
|
|
1343
1366
|
return t.createPFrame(r);
|
|
1344
1367
|
}
|
|
1345
|
-
class
|
|
1368
|
+
class Et {
|
|
1346
1369
|
constructor(e) {
|
|
1347
1370
|
this.handle = e;
|
|
1348
1371
|
}
|
|
@@ -1362,42 +1385,43 @@ class Ot {
|
|
|
1362
1385
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1363
1386
|
}
|
|
1364
1387
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return
|
|
1388
|
+
function ze(t) {
|
|
1389
|
+
return ce({
|
|
1367
1390
|
__isRef: !0,
|
|
1368
|
-
blockId:
|
|
1369
|
-
name:
|
|
1391
|
+
blockId: U(t, "blockId"),
|
|
1392
|
+
name: U(t, "name")
|
|
1370
1393
|
});
|
|
1371
1394
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return
|
|
1374
|
-
ref:
|
|
1375
|
-
label:
|
|
1395
|
+
function Vt(t) {
|
|
1396
|
+
return ce({
|
|
1397
|
+
ref: ze(U(t, "ref")),
|
|
1398
|
+
label: U(t, "label")
|
|
1376
1399
|
});
|
|
1377
1400
|
}
|
|
1378
|
-
const
|
|
1379
|
-
sdkVersion:
|
|
1401
|
+
const jt = {
|
|
1402
|
+
sdkVersion: L
|
|
1380
1403
|
};
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1404
|
+
function Nt() {
|
|
1405
|
+
return de({ sdkVersion: L });
|
|
1383
1406
|
}
|
|
1384
1407
|
function Ut(t) {
|
|
1385
1408
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
1386
1409
|
return globalThis.getEnvironmentValue(t);
|
|
1387
1410
|
}
|
|
1388
1411
|
export {
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1412
|
+
tt as Args,
|
|
1413
|
+
w as BlockModel,
|
|
1414
|
+
jt as CurrentSdkInfo,
|
|
1415
|
+
_ as FutureRef,
|
|
1416
|
+
We as IS_VIRTUAL_COLUMN,
|
|
1417
|
+
nt as It,
|
|
1418
|
+
Ft as JsRenderInternal,
|
|
1419
|
+
le as LABEL_ANNOTATION,
|
|
1420
|
+
st as MainOutputs,
|
|
1421
|
+
Ce as OutputError,
|
|
1422
|
+
Oe as PAnnotationLabel,
|
|
1423
|
+
ke as PAnnotationTrace,
|
|
1424
|
+
Et as PFrameImpl,
|
|
1401
1425
|
K as RT_BINARY_PARTITIONED,
|
|
1402
1426
|
H as RT_BINARY_SUPER_PARTITIONED,
|
|
1403
1427
|
ie as RT_JSON_PARTITIONED,
|
|
@@ -1406,56 +1430,56 @@ export {
|
|
|
1406
1430
|
Z as RT_RESOURCE_MAP_PARTITIONED,
|
|
1407
1431
|
V as RenderCtx,
|
|
1408
1432
|
Ue as ResultPool,
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1433
|
+
rt as StagingOutputs,
|
|
1434
|
+
Ve as Trace,
|
|
1435
|
+
Ee as TraceEntry,
|
|
1436
|
+
S as TreeNodeAccessor,
|
|
1437
|
+
it as UiState,
|
|
1438
|
+
pt as and,
|
|
1439
|
+
kt as createPFrameForGraphs,
|
|
1440
|
+
Dt as createPlDataTable,
|
|
1441
|
+
Ot as createPlDataTableSheet,
|
|
1418
1442
|
re as deriveLabels,
|
|
1419
1443
|
q as downgradeCfgOrLambda,
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1444
|
+
He as enrichColumnsWithCompatible,
|
|
1445
|
+
St as extractArchiveAndGetURL,
|
|
1446
|
+
Lt as extractConfig,
|
|
1447
|
+
ut as flatten,
|
|
1448
|
+
Vt as fromPlOption,
|
|
1449
|
+
ze as fromPlRef,
|
|
1450
|
+
Ke as getAdditionalColumns,
|
|
1451
|
+
yt as getBlobContent,
|
|
1452
|
+
vt as getBlobContentAsJson,
|
|
1453
|
+
bt as getBlobContentAsString,
|
|
1454
|
+
_t as getDownloadedBlobContent,
|
|
1431
1455
|
Ut as getEnvironmentValue,
|
|
1432
|
-
|
|
1456
|
+
O as getFromCfg,
|
|
1433
1457
|
j as getImmediate,
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1458
|
+
wt as getImportProgress,
|
|
1459
|
+
U as getJsonField,
|
|
1460
|
+
It as getLastLogs,
|
|
1461
|
+
Rt as getLogHandle,
|
|
1462
|
+
At as getOnDemandBlobContent,
|
|
1439
1463
|
Be as getPartitionKeysList,
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1464
|
+
Pt as getProgressLog,
|
|
1465
|
+
Ct as getProgressLogWithInfo,
|
|
1466
|
+
Nt as getRawPlatformaInstance,
|
|
1467
|
+
ht as getResourceField,
|
|
1468
|
+
gt as getResourceValueAsJson,
|
|
1445
1469
|
xt as getUniquePartitionKeys,
|
|
1446
1470
|
z as ifDef,
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1471
|
+
Je as isConfigLambda,
|
|
1472
|
+
ct as isEmpty,
|
|
1473
|
+
et as isolate,
|
|
1474
|
+
ot as makeArray,
|
|
1475
|
+
ce as makeObject,
|
|
1476
|
+
lt as mapArrayValues,
|
|
1477
|
+
at as mapRecordValues,
|
|
1478
|
+
mt as mapResourceFields,
|
|
1479
|
+
dt as not,
|
|
1480
|
+
ft as or,
|
|
1481
|
+
Tt as parseResourceMap,
|
|
1482
|
+
Re as readOutput,
|
|
1483
|
+
Ze as wrapOutputs
|
|
1460
1484
|
};
|
|
1461
1485
|
//# sourceMappingURL=index.mjs.map
|