@platforma-sdk/model 1.33.8 → 1.33.10
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 +8 -8
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/components/PlDataTable.d.ts +3 -3
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +616 -620
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +5 -4
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/util/column_collection.d.ts +8 -8
- package/dist/render/util/column_collection.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/components/PFrameForGraphs.test.ts +58 -159
- package/src/components/PFrameForGraphs.ts +105 -165
- package/src/components/PlDataTable.ts +6 -5
- package/src/render/api.ts +11 -9
- package/src/render/util/column_collection.ts +26 -16
package/dist/index.mjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var qe = Object.defineProperty;
|
|
2
|
+
var ze = (t, e, n) => e in t ? qe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var k = (t, e, n) => ze(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as Te, mapPObjectData as be, isDataInfoEntries as Le, isDataInfo as we, dataInfoToEntries as Ye, selectorsToPredicate as X, resolveAnchors as Ae, deriveNativeId as Xe, isPColumnSpec as ne, isPartitionedDataInfoEntries as Qe, getAxisId as D, entriesToDataInfo as Ze, canonicalizeAxisId as et, withEnrichments as xe, AnchoredIdDeriver as Ce, isPlRef as tt, mapValueInVOE as nt, ensurePColumn as rt, extractAllColumns as it, mapPTableDef as st, mapDataInfo as ot, canonicalizeJson as K, matchAxisId as U, getColumnIdAndSpec as Ee, parseJson as fe, isPTableAbsent as at, PTableNA as lt } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
6
|
+
import Oe from "canonicalize";
|
|
7
7
|
import { z as M } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class ut 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 ct(t) {
|
|
15
|
+
if (!t.ok) throw new ut(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Qt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return ct(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function C(t) {
|
|
26
26
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? re(t) : t;
|
|
27
27
|
}
|
|
28
28
|
function Q(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Zt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const en = Q("$args"), tn = Q("$it"), nn = Q("$prod"), rn = Q("$staging"), sn = Q("$ui");
|
|
38
38
|
function re(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ke(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] = C(r);
|
|
44
44
|
return {
|
|
45
45
|
type: "MakeObject",
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function on(...t) {
|
|
50
50
|
const e = [];
|
|
51
|
-
for (const n of t) e.push(
|
|
51
|
+
for (const n of t) e.push(C(n));
|
|
52
52
|
return {
|
|
53
53
|
type: "MakeArray",
|
|
54
54
|
template: e
|
|
@@ -57,11 +57,11 @@ function ln(...t) {
|
|
|
57
57
|
function ie(t, e) {
|
|
58
58
|
return {
|
|
59
59
|
type: "GetJsonField",
|
|
60
|
-
source:
|
|
61
|
-
field:
|
|
60
|
+
source: C(t),
|
|
61
|
+
field: C(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function an(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function un(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ln(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,54 +77,54 @@ function cn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function un(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function cn(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function dn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function pn(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 fn(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 hn(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
|
-
source:
|
|
116
|
-
field:
|
|
115
|
+
source: C(t),
|
|
116
|
+
field: C(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function gn() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
123
|
-
source:
|
|
123
|
+
source: C(t)
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function mn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,82 +132,82 @@ function vn(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function yn(t, e) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
138
|
range: e,
|
|
139
|
-
source:
|
|
139
|
+
source: C(t)
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function vn(t, e) {
|
|
143
143
|
return {
|
|
144
144
|
type: "GetBlobContentAsString",
|
|
145
145
|
range: e,
|
|
146
|
-
source:
|
|
146
|
+
source: C(t)
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function bn() {
|
|
150
150
|
return function(t, e) {
|
|
151
151
|
return {
|
|
152
152
|
type: "GetBlobContentAsJson",
|
|
153
153
|
range: e,
|
|
154
|
-
source:
|
|
154
|
+
source: C(t)
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function wn(t) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetDownloadedBlobContent",
|
|
161
|
-
source:
|
|
161
|
+
source: C(t)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function An(t) {
|
|
165
165
|
return {
|
|
166
166
|
type: "GetOnDemandBlobContent",
|
|
167
|
-
source:
|
|
167
|
+
source: C(t)
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function xn(t, e) {
|
|
171
171
|
return {
|
|
172
172
|
type: "ExtractArchiveAndGetURL",
|
|
173
173
|
format: e,
|
|
174
|
-
source:
|
|
174
|
+
source: C(t)
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Cn(t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetImportProgress",
|
|
180
|
-
source:
|
|
180
|
+
source: C(t)
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Pn(t, e) {
|
|
184
184
|
return {
|
|
185
185
|
type: "GetLastLogs",
|
|
186
|
-
source:
|
|
186
|
+
source: C(t),
|
|
187
187
|
lines: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Sn(t, e) {
|
|
191
191
|
return {
|
|
192
192
|
type: "GetProgressLog",
|
|
193
|
-
source:
|
|
193
|
+
source: C(t),
|
|
194
194
|
patternToSearch: e
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function _n(t, e) {
|
|
198
198
|
return {
|
|
199
199
|
type: "GetProgressLogWithInfo",
|
|
200
|
-
source:
|
|
200
|
+
source: C(t),
|
|
201
201
|
patternToSearch: e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function In(t) {
|
|
205
205
|
return {
|
|
206
206
|
type: "GetLogHandle",
|
|
207
|
-
source:
|
|
207
|
+
source: C(t)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function dt() {
|
|
211
211
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
212
212
|
}
|
|
213
213
|
function Re(t) {
|
|
@@ -216,39 +216,39 @@ function Re(t) {
|
|
|
216
216
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
217
217
|
throw new Error("Can't get platforma instance.");
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function pt() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function g() {
|
|
223
223
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
224
224
|
throw new Error("Not in config rendering context");
|
|
225
225
|
}
|
|
226
226
|
function H(t, e) {
|
|
227
|
-
const n =
|
|
227
|
+
const n = pt();
|
|
228
228
|
if (n === void 0) return !1;
|
|
229
229
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
230
230
|
return n.callbackRegistry[t] = e, !0;
|
|
231
231
|
}
|
|
232
232
|
const ce = /* @__PURE__ */ new Map();
|
|
233
|
-
function
|
|
234
|
-
t in
|
|
233
|
+
function ft(t, e) {
|
|
234
|
+
t in g().callbackRegistry || (g().callbackRegistry[t] = (n) => {
|
|
235
235
|
for (const r of ce.get(t))
|
|
236
236
|
r(n);
|
|
237
237
|
}, ce.set(t, [])), ce.get(t).push(e);
|
|
238
238
|
}
|
|
239
|
-
class
|
|
239
|
+
class _ {
|
|
240
240
|
constructor(e, n = (r) => r) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
this.handle = e, this.postProcess = n,
|
|
241
|
+
k(this, "isResolved", !1);
|
|
242
|
+
k(this, "resolvedValue");
|
|
243
|
+
this.handle = e, this.postProcess = n, ft(e, (r) => {
|
|
244
244
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
map(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new _(this.handle, (n) => e(this.postProcess(n)));
|
|
249
249
|
}
|
|
250
250
|
mapDefined(e) {
|
|
251
|
-
return new
|
|
251
|
+
return new _(this.handle, (n) => {
|
|
252
252
|
const r = this.postProcess(n);
|
|
253
253
|
return r ? e(r) : void 0;
|
|
254
254
|
});
|
|
@@ -260,7 +260,7 @@ class I {
|
|
|
260
260
|
function he(t, e) {
|
|
261
261
|
return t === void 0 ? void 0 : e(t);
|
|
262
262
|
}
|
|
263
|
-
class
|
|
263
|
+
class E {
|
|
264
264
|
constructor(e, n) {
|
|
265
265
|
this.handle = e, this.resolvePath = n;
|
|
266
266
|
}
|
|
@@ -300,46 +300,46 @@ class O {
|
|
|
300
300
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
301
301
|
];
|
|
302
302
|
return he(
|
|
303
|
-
|
|
304
|
-
(i) => new
|
|
303
|
+
g().resolveWithCommon(this.handle, e, ...n),
|
|
304
|
+
(i) => new E(i, r)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
get resourceType() {
|
|
308
|
-
return
|
|
308
|
+
return g().getResourceType(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getInputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return g().getInputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getOutputsLocked() {
|
|
314
|
-
return
|
|
314
|
+
return g().getOutputsLocked(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsReadyOrError() {
|
|
317
|
-
return
|
|
317
|
+
return g().getIsReadyOrError(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getIsFinal() {
|
|
320
|
-
return
|
|
320
|
+
return g().getIsFinal(this.handle);
|
|
321
321
|
}
|
|
322
322
|
getError() {
|
|
323
323
|
const e = [...this.resolvePath, "error"];
|
|
324
324
|
return he(
|
|
325
|
-
|
|
326
|
-
(n) => new
|
|
325
|
+
g().getError(this.handle),
|
|
326
|
+
(n) => new E(n, e)
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
listInputFields() {
|
|
330
|
-
return
|
|
330
|
+
return g().listInputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listOutputFields() {
|
|
333
|
-
return
|
|
333
|
+
return g().listOutputFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
listDynamicFields() {
|
|
336
|
-
return
|
|
336
|
+
return g().listDynamicFields(this.handle);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueBase64(e) {
|
|
339
|
-
return
|
|
339
|
+
return g().getKeyValueBase64(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsString(e) {
|
|
342
|
-
return
|
|
342
|
+
return g().getKeyValueAsString(this.handle, e);
|
|
343
343
|
}
|
|
344
344
|
getKeyValueAsJson(e) {
|
|
345
345
|
const n = this.getKeyValueAsString(e);
|
|
@@ -347,10 +347,10 @@ class O {
|
|
|
347
347
|
return JSON.parse(n);
|
|
348
348
|
}
|
|
349
349
|
getDataBase64() {
|
|
350
|
-
return
|
|
350
|
+
return g().getDataBase64(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsString() {
|
|
353
|
-
return
|
|
353
|
+
return g().getDataAsString(this.handle);
|
|
354
354
|
}
|
|
355
355
|
getDataAsJson() {
|
|
356
356
|
const e = this.getDataAsString();
|
|
@@ -363,7 +363,7 @@ class O {
|
|
|
363
363
|
getPColumns(e = !1, n = "") {
|
|
364
364
|
const r = this.parsePObjectCollection(e, n);
|
|
365
365
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
366
|
-
if (!
|
|
366
|
+
if (!Te(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
367
367
|
return s;
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -371,7 +371,7 @@ class O {
|
|
|
371
371
|
*
|
|
372
372
|
*/
|
|
373
373
|
parsePObjectCollection(e = !1, n = "") {
|
|
374
|
-
const r =
|
|
374
|
+
const r = g().parsePObjectCollection(
|
|
375
375
|
this.handle,
|
|
376
376
|
e,
|
|
377
377
|
n,
|
|
@@ -381,19 +381,19 @@ class O {
|
|
|
381
381
|
const i = {};
|
|
382
382
|
for (const [s, o] of Object.entries(r)) {
|
|
383
383
|
const a = [...this.resolvePath, s];
|
|
384
|
-
i[s] =
|
|
384
|
+
i[s] = be(o, (l) => new E(l, a));
|
|
385
385
|
}
|
|
386
386
|
return i;
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsBase64(e) {
|
|
389
|
-
return new
|
|
389
|
+
return new _(g().getBlobContentAsBase64(this.handle, e));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsString(e) {
|
|
392
|
-
return new
|
|
392
|
+
return new _(g().getBlobContentAsString(this.handle, e));
|
|
393
393
|
}
|
|
394
394
|
getFileContentAsJson(e) {
|
|
395
|
-
return new
|
|
396
|
-
|
|
395
|
+
return new _(
|
|
396
|
+
g().getBlobContentAsString(this.handle, e)
|
|
397
397
|
).mapDefined((n) => JSON.parse(n));
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
@@ -412,7 +412,7 @@ class O {
|
|
|
412
412
|
* @returns downloaded file handle
|
|
413
413
|
*/
|
|
414
414
|
getFileHandle() {
|
|
415
|
-
return new
|
|
415
|
+
return new _(g().getDownloadedBlobContentHandle(this.handle));
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @deprecated use getFileHandle
|
|
@@ -424,7 +424,7 @@ class O {
|
|
|
424
424
|
* @returns downloaded file handle
|
|
425
425
|
*/
|
|
426
426
|
getRemoteFileHandle() {
|
|
427
|
-
return new
|
|
427
|
+
return new _(g().getOnDemandBlobContentHandle(this.handle));
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
430
|
* @deprecated use getRemoteFileHandle
|
|
@@ -436,22 +436,22 @@ class O {
|
|
|
436
436
|
* @returns the url to the extracted folder
|
|
437
437
|
*/
|
|
438
438
|
extractArchiveAndGetURL(e) {
|
|
439
|
-
return new
|
|
439
|
+
return new _(g().extractArchiveAndGetURL(this.handle, e));
|
|
440
440
|
}
|
|
441
441
|
getImportProgress() {
|
|
442
|
-
return new
|
|
442
|
+
return new _(g().getImportProgress(this.handle));
|
|
443
443
|
}
|
|
444
444
|
getLastLogs(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new _(g().getLastLogs(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLog(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new _(g().getProgressLog(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getProgressLogWithInfo(e) {
|
|
451
|
-
return new
|
|
451
|
+
return new _(g().getProgressLogWithInfo(this.handle, e));
|
|
452
452
|
}
|
|
453
453
|
getLogHandle() {
|
|
454
|
-
return new
|
|
454
|
+
return new _(g().getLogHandle(this.handle));
|
|
455
455
|
}
|
|
456
456
|
allFieldsResolved(e = "Input") {
|
|
457
457
|
switch (e) {
|
|
@@ -477,119 +477,119 @@ class O {
|
|
|
477
477
|
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
478
478
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
479
479
|
);
|
|
480
|
-
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u,
|
|
480
|
+
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, c]) => o(u, c));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const De = "staging",
|
|
483
|
+
const De = "staging", Fe = "main", ht = {
|
|
484
484
|
explicitColumnsSupport: !0,
|
|
485
485
|
inlineColumnsSupport: !0,
|
|
486
486
|
activeArgs: !0
|
|
487
487
|
};
|
|
488
|
-
function
|
|
488
|
+
function Ke(t) {
|
|
489
489
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
490
490
|
}
|
|
491
491
|
function ge(t, e, n) {
|
|
492
492
|
if (e.has(n)) return;
|
|
493
493
|
if (e.add(n), typeof n === "object")
|
|
494
|
-
if (
|
|
494
|
+
if (Ke(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
495
495
|
else if (Array.isArray(n))
|
|
496
496
|
for (const i of n) ge(t, e, i);
|
|
497
497
|
else
|
|
498
498
|
for (const [, i] of Object.entries(n))
|
|
499
499
|
i !== n && ge(t, e, i);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function gt(t) {
|
|
502
502
|
const e = /* @__PURE__ */ new Set();
|
|
503
503
|
return ge(e, /* @__PURE__ */ new Set(), t), e;
|
|
504
504
|
}
|
|
505
|
-
const
|
|
505
|
+
const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
506
506
|
__proto__: null,
|
|
507
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
508
|
-
MainAccessorName:
|
|
507
|
+
GlobalCfgRenderCtxFeatureFlags: ht,
|
|
508
|
+
MainAccessorName: Fe,
|
|
509
509
|
StagingAccessorName: De,
|
|
510
|
-
getAllFutureAwaits:
|
|
511
|
-
isFutureAwait:
|
|
512
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
510
|
+
getAllFutureAwaits: gt,
|
|
511
|
+
isFutureAwait: Ke
|
|
512
|
+
}, Symbol.toStringTag, { value: "Module" })), mt = "pl7.app/label", yt = "pl7.app/trace", vt = M.object({
|
|
513
513
|
type: M.string(),
|
|
514
514
|
importance: M.number().optional(),
|
|
515
515
|
id: M.string().optional(),
|
|
516
516
|
label: M.string()
|
|
517
|
-
}),
|
|
517
|
+
}), bt = M.array(vt), wt = 1e-3, At = "__LABEL__", Pe = "__LABEL__@1";
|
|
518
518
|
function Ve(t, e, n = {}) {
|
|
519
519
|
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((f) => {
|
|
520
|
-
var
|
|
520
|
+
var P, R;
|
|
521
521
|
const w = e(f);
|
|
522
|
-
let
|
|
523
|
-
"spec" in w && typeof w.spec == "object" ? (
|
|
524
|
-
const p = (
|
|
525
|
-
...
|
|
526
|
-
...
|
|
527
|
-
...
|
|
522
|
+
let d, h, b;
|
|
523
|
+
"spec" in w && typeof w.spec == "object" ? (d = w.spec, h = w.prefixTrace, b = w.suffixTrace) : d = w;
|
|
524
|
+
const p = (P = d.annotations) == null ? void 0 : P[mt], I = (R = d.annotations) == null ? void 0 : R[yt], x = (I ? bt.safeParse(JSON.parse(I)).data : void 0) ?? [], y = [
|
|
525
|
+
...h ?? [],
|
|
526
|
+
...x,
|
|
527
|
+
...b ?? []
|
|
528
528
|
];
|
|
529
529
|
if (p !== void 0) {
|
|
530
|
-
const
|
|
531
|
-
n.addLabelAsSuffix ?
|
|
530
|
+
const O = { label: p, type: At, importance: -2 };
|
|
531
|
+
n.addLabelAsSuffix ? y.push(O) : y.splice(0, 0, O);
|
|
532
532
|
}
|
|
533
|
-
const
|
|
534
|
-
for (let
|
|
535
|
-
const { type: W } =
|
|
536
|
-
|
|
537
|
-
const
|
|
538
|
-
s.set(
|
|
539
|
-
|
|
533
|
+
const A = [], T = /* @__PURE__ */ new Map();
|
|
534
|
+
for (let O = y.length - 1; O >= 0; --O) {
|
|
535
|
+
const { type: W } = y[O], V = y[O].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
|
|
536
|
+
T.set(W, $);
|
|
537
|
+
const F = `${W}@${$}`;
|
|
538
|
+
s.set(F, (s.get(F) ?? 0) + 1), r.set(
|
|
539
|
+
F,
|
|
540
540
|
Math.max(
|
|
541
|
-
r.get(
|
|
542
|
-
V - (
|
|
541
|
+
r.get(F) ?? Number.NEGATIVE_INFINITY,
|
|
542
|
+
V - (y.length - O) * wt
|
|
543
543
|
)
|
|
544
|
-
),
|
|
544
|
+
), A.push({ ...y[O], fullType: F, occurrenceIndex: $ });
|
|
545
545
|
}
|
|
546
|
-
return
|
|
546
|
+
return A.reverse(), {
|
|
547
547
|
value: f,
|
|
548
|
-
spec:
|
|
548
|
+
spec: d,
|
|
549
549
|
label: p,
|
|
550
|
-
fullTrace:
|
|
550
|
+
fullTrace: A
|
|
551
551
|
};
|
|
552
552
|
}), a = [], l = [], u = [...r];
|
|
553
553
|
u.sort(([, f], [, w]) => w - f);
|
|
554
554
|
for (const [f] of u)
|
|
555
555
|
f.endsWith("@1") || s.get(f) === t.length ? a.push(f) : l.push(f);
|
|
556
|
-
const
|
|
557
|
-
const
|
|
558
|
-
for (let
|
|
559
|
-
const
|
|
556
|
+
const c = (f, w = !1) => {
|
|
557
|
+
const d = [];
|
|
558
|
+
for (let h = 0; h < o.length; h++) {
|
|
559
|
+
const b = o[h], p = b.fullTrace.filter((y) => f.has(y.fullType) || i && i.has(y.type));
|
|
560
560
|
if (p.length === 0)
|
|
561
561
|
if (w)
|
|
562
|
-
|
|
562
|
+
d.push({
|
|
563
563
|
label: "Unlabeled",
|
|
564
|
-
value:
|
|
564
|
+
value: b.value
|
|
565
565
|
});
|
|
566
566
|
else return;
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
label:
|
|
570
|
-
value:
|
|
567
|
+
const I = p.map((y) => y.label), x = n.separator ?? " / ";
|
|
568
|
+
d.push({
|
|
569
|
+
label: I.join(x),
|
|
570
|
+
value: b.value
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
|
-
return
|
|
573
|
+
return d;
|
|
574
574
|
};
|
|
575
575
|
if (a.length === 0) {
|
|
576
576
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
577
|
-
return
|
|
577
|
+
return c(new Set(Pe), !0);
|
|
578
578
|
}
|
|
579
|
-
let
|
|
580
|
-
for (;
|
|
579
|
+
let m = 0, v = -1;
|
|
580
|
+
for (; m < a.length; ) {
|
|
581
581
|
const f = /* @__PURE__ */ new Set();
|
|
582
|
-
n.includeNativeLabel && f.add(
|
|
583
|
-
for (let
|
|
584
|
-
|
|
585
|
-
const w =
|
|
586
|
-
if (w !== void 0 && new Set(w.map((
|
|
587
|
-
|
|
582
|
+
n.includeNativeLabel && f.add(Pe);
|
|
583
|
+
for (let d = 0; d < m; ++d) f.add(a[d]);
|
|
584
|
+
v >= 0 && f.add(a[v]);
|
|
585
|
+
const w = c(f);
|
|
586
|
+
if (w !== void 0 && new Set(w.map((d) => d.label)).size === t.length) return w;
|
|
587
|
+
v++, v >= a.length && (m++, v = m);
|
|
588
588
|
}
|
|
589
|
-
return
|
|
589
|
+
return c(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
590
590
|
}
|
|
591
|
-
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned",
|
|
592
|
-
function
|
|
591
|
+
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", je = Z + "Partitioned/", ae = je + "JsonPartitioned", z = je + "BinaryPartitioned";
|
|
592
|
+
function $e(t, e, n, r = [], i) {
|
|
593
593
|
if (t === void 0) return !1;
|
|
594
594
|
switch (t.resourceType.name) {
|
|
595
595
|
case se: {
|
|
@@ -606,7 +606,7 @@ function Ne(t, e, n, r = [], i) {
|
|
|
606
606
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
607
607
|
if (a === void 0) s = !1;
|
|
608
608
|
else {
|
|
609
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
609
|
+
const l = [...r, ...JSON.parse(o)], u = $e(
|
|
610
610
|
a,
|
|
611
611
|
e,
|
|
612
612
|
n,
|
|
@@ -622,9 +622,9 @@ function Ne(t, e, n, r = [], i) {
|
|
|
622
622
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function Ln(t, e, n = !1) {
|
|
626
626
|
const r = [];
|
|
627
|
-
return { isComplete:
|
|
627
|
+
return { isComplete: $e(t, e, r, [], n), data: r };
|
|
628
628
|
}
|
|
629
629
|
const me = (t) => {
|
|
630
630
|
if (t.endsWith(".index"))
|
|
@@ -633,7 +633,7 @@ const me = (t) => {
|
|
|
633
633
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
634
634
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
635
635
|
};
|
|
636
|
-
function
|
|
636
|
+
function xt(t) {
|
|
637
637
|
if (!t) return;
|
|
638
638
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
639
639
|
let i = 0;
|
|
@@ -679,7 +679,7 @@ function St(t) {
|
|
|
679
679
|
}
|
|
680
680
|
return { data: r, keyLength: i };
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Ct(t) {
|
|
683
683
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
684
684
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
685
685
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -698,11 +698,11 @@ function _t(t) {
|
|
|
698
698
|
}
|
|
699
699
|
return r.map((i) => Array.from(i.values()));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function Pt(t) {
|
|
702
702
|
if (t === void 0) return;
|
|
703
|
-
if (
|
|
704
|
-
return
|
|
705
|
-
const e =
|
|
703
|
+
if (Le(t))
|
|
704
|
+
return Ct(t);
|
|
705
|
+
const e = xt(t);
|
|
706
706
|
if (!e) return;
|
|
707
707
|
const { data: n, keyLength: r } = e, i = [];
|
|
708
708
|
for (let s = 0; s < r; ++s)
|
|
@@ -813,15 +813,15 @@ function ye(t, e = []) {
|
|
|
813
813
|
throw new Error(`Unknown resource type: ${n}`);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function St(t) {
|
|
817
817
|
if (t !== void 0) {
|
|
818
|
-
if (
|
|
819
|
-
if (
|
|
820
|
-
if (t instanceof
|
|
818
|
+
if (Le(t)) return t;
|
|
819
|
+
if (we(t)) return Ye(t);
|
|
820
|
+
if (t instanceof E) return ye(t);
|
|
821
821
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function _t(t, e) {
|
|
825
825
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
826
826
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
827
827
|
const { partitionKeyLength: s } = t;
|
|
@@ -881,7 +881,13 @@ function Lt(t, e) {
|
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
|
|
884
|
+
function It(t) {
|
|
885
|
+
if (!Array.isArray(t)) return !1;
|
|
886
|
+
if (t.length === 0) return !0;
|
|
887
|
+
const e = t[0];
|
|
888
|
+
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
889
|
+
}
|
|
890
|
+
class Tt {
|
|
885
891
|
constructor(e) {
|
|
886
892
|
this.columns = e;
|
|
887
893
|
}
|
|
@@ -890,30 +896,30 @@ class Et {
|
|
|
890
896
|
return this.columns.filter((r) => n(r.spec));
|
|
891
897
|
}
|
|
892
898
|
}
|
|
893
|
-
function
|
|
899
|
+
function Lt(t) {
|
|
894
900
|
if (t)
|
|
895
901
|
return t.map((e) => ({
|
|
896
|
-
type: `split:${
|
|
902
|
+
type: `split:${et(e.axisId)}`,
|
|
897
903
|
label: e.label,
|
|
898
904
|
importance: 1e6
|
|
899
905
|
// High importance for split filters in labels
|
|
900
906
|
}));
|
|
901
907
|
}
|
|
902
|
-
function
|
|
908
|
+
function Et(t) {
|
|
903
909
|
if (t)
|
|
904
910
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
905
911
|
}
|
|
906
|
-
function
|
|
912
|
+
function Ot(t, e) {
|
|
907
913
|
if (!e || e.length === 0) return t;
|
|
908
914
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
909
|
-
return
|
|
915
|
+
return Oe({ id: t, axisFilters: n });
|
|
910
916
|
}
|
|
911
|
-
function
|
|
917
|
+
function Se(t) {
|
|
912
918
|
if (!t || typeof t != "object") return !1;
|
|
913
919
|
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);
|
|
914
920
|
return !!e.domainAnchor || n || r;
|
|
915
921
|
}
|
|
916
|
-
function
|
|
922
|
+
function kt(t) {
|
|
917
923
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
918
924
|
return [];
|
|
919
925
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -921,11 +927,11 @@ function Rt(t) {
|
|
|
921
927
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
922
928
|
return e.sort((n, r) => n - r), e;
|
|
923
929
|
}
|
|
924
|
-
class
|
|
930
|
+
class le {
|
|
925
931
|
constructor() {
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
932
|
+
k(this, "defaultProviderStore", []);
|
|
933
|
+
k(this, "providers", [new Tt(this.defaultProviderStore)]);
|
|
934
|
+
k(this, "axisLabelProviders", []);
|
|
929
935
|
}
|
|
930
936
|
addColumnProvider(e) {
|
|
931
937
|
return this.providers.push(e), this;
|
|
@@ -953,124 +959,126 @@ class ve {
|
|
|
953
959
|
};
|
|
954
960
|
let u = () => !1;
|
|
955
961
|
if (a) {
|
|
956
|
-
const
|
|
957
|
-
if (
|
|
962
|
+
const d = (Array.isArray(a) ? a : [a]).map((h) => {
|
|
963
|
+
if (Se(h)) {
|
|
958
964
|
if (!r)
|
|
959
965
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
960
|
-
return X(
|
|
966
|
+
return X(Ae(r.anchors, h, n));
|
|
961
967
|
} else
|
|
962
|
-
return X(
|
|
968
|
+
return X(h);
|
|
963
969
|
});
|
|
964
|
-
u = (
|
|
970
|
+
u = (h) => d.some((b) => b(h));
|
|
965
971
|
}
|
|
966
|
-
const
|
|
967
|
-
for (const
|
|
968
|
-
const
|
|
969
|
-
let
|
|
970
|
-
if (
|
|
972
|
+
const c = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], m = [], v = /* @__PURE__ */ new Set();
|
|
973
|
+
for (const d of c) {
|
|
974
|
+
const h = Se(d);
|
|
975
|
+
let b;
|
|
976
|
+
if (h) {
|
|
971
977
|
if (!r)
|
|
972
978
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
973
|
-
|
|
979
|
+
b = Ae(r.anchors, d, n);
|
|
974
980
|
} else
|
|
975
|
-
|
|
976
|
-
const p = /* @__PURE__ */ new Set(),
|
|
977
|
-
for (const
|
|
978
|
-
const
|
|
979
|
-
for (const
|
|
980
|
-
if (u(
|
|
981
|
-
if (p.has(
|
|
982
|
-
throw new Error(`Duplicate column id ${
|
|
983
|
-
const R =
|
|
984
|
-
|
|
981
|
+
b = d;
|
|
982
|
+
const p = /* @__PURE__ */ new Set(), I = [];
|
|
983
|
+
for (const A of this.providers) {
|
|
984
|
+
const T = A.selectColumns(b);
|
|
985
|
+
for (const P of T) {
|
|
986
|
+
if (u(P.spec)) continue;
|
|
987
|
+
if (p.has(P.id))
|
|
988
|
+
throw new Error(`Duplicate column id ${P.id} in provider ${A.constructor.name}`);
|
|
989
|
+
const R = Xe(P.spec);
|
|
990
|
+
v.has(R) || (p.add(P.id), v.add(R), I.push(P));
|
|
985
991
|
}
|
|
986
992
|
}
|
|
987
|
-
if (
|
|
988
|
-
const
|
|
989
|
-
for (const
|
|
990
|
-
if (!ne(
|
|
991
|
-
const
|
|
992
|
-
if (
|
|
993
|
-
|
|
994
|
-
|
|
993
|
+
if (I.length === 0) continue;
|
|
994
|
+
const x = kt(d), y = x.length > 0;
|
|
995
|
+
for (const A of I) {
|
|
996
|
+
if (!ne(A.spec)) continue;
|
|
997
|
+
const T = A.spec;
|
|
998
|
+
if (y) {
|
|
999
|
+
if (It(A.data))
|
|
1000
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${A.id}`);
|
|
1001
|
+
const P = St(A.data);
|
|
1002
|
+
if (!P) {
|
|
995
1003
|
if (s) continue;
|
|
996
1004
|
return;
|
|
997
1005
|
}
|
|
998
|
-
if (!
|
|
999
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
1000
|
-
const R =
|
|
1001
|
-
if (
|
|
1002
|
-
throw new Error(`Not enough partition keys (${
|
|
1003
|
-
const W =
|
|
1004
|
-
if (G >=
|
|
1005
|
-
if (V.push([...
|
|
1006
|
+
if (!Qe(P))
|
|
1007
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P.type} for column ${A.id}`);
|
|
1008
|
+
const R = Pt(P), O = x[x.length - 1];
|
|
1009
|
+
if (O >= P.partitionKeyLength)
|
|
1010
|
+
throw new Error(`Not enough partition keys (${P.partitionKeyLength}) for requested split axes (max index ${O}) in column ${T.name}`);
|
|
1011
|
+
const W = x.map((S) => this.findLabels(D(T.axesSpec[S]))), V = [], $ = (S, G) => {
|
|
1012
|
+
if (G >= x.length) {
|
|
1013
|
+
if (V.push([...S]), V.length > 1e4)
|
|
1006
1014
|
throw new Error("Too many key combinations, aborting.");
|
|
1007
1015
|
return;
|
|
1008
1016
|
}
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1011
|
-
throw new Error(`Axis index ${
|
|
1012
|
-
const
|
|
1013
|
-
if (!
|
|
1017
|
+
const j = x[G];
|
|
1018
|
+
if (j >= R.length)
|
|
1019
|
+
throw new Error(`Axis index ${j} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${A.id}`);
|
|
1020
|
+
const N = R[j];
|
|
1021
|
+
if (!N || N.length === 0) {
|
|
1014
1022
|
V.length = 0;
|
|
1015
1023
|
return;
|
|
1016
1024
|
}
|
|
1017
|
-
for (const ee of
|
|
1018
|
-
|
|
1025
|
+
for (const ee of N)
|
|
1026
|
+
S.push(ee), $(S, G + 1), S.pop();
|
|
1019
1027
|
};
|
|
1020
|
-
if (
|
|
1028
|
+
if ($([], 0), V.length === 0)
|
|
1021
1029
|
continue;
|
|
1022
|
-
const
|
|
1023
|
-
for (let
|
|
1024
|
-
|
|
1025
|
-
const
|
|
1026
|
-
for (const
|
|
1027
|
-
const G =
|
|
1028
|
-
const ee =
|
|
1029
|
-
return { axisIdx: ee, axisId:
|
|
1030
|
+
const F = [...T.axesSpec], Be = x.map((S) => S);
|
|
1031
|
+
for (let S = x.length - 1; S >= 0; S--)
|
|
1032
|
+
F.splice(x[S], 1);
|
|
1033
|
+
const We = { ...T, axesSpec: F };
|
|
1034
|
+
for (const S of V) {
|
|
1035
|
+
const G = S.map((j, N) => {
|
|
1036
|
+
const ee = Be[N], Ge = D(T.axesSpec[ee]), ue = W[N], He = (ue == null ? void 0 : ue[j]) ?? String(j);
|
|
1037
|
+
return { axisIdx: ee, axisId: Ge, value: j, label: He };
|
|
1030
1038
|
});
|
|
1031
|
-
|
|
1039
|
+
m.push({
|
|
1032
1040
|
type: "split",
|
|
1033
|
-
originalColumn:
|
|
1034
|
-
spec:
|
|
1035
|
-
adjustedSpec:
|
|
1036
|
-
dataEntries:
|
|
1041
|
+
originalColumn: A,
|
|
1042
|
+
spec: T,
|
|
1043
|
+
adjustedSpec: We,
|
|
1044
|
+
dataEntries: P,
|
|
1037
1045
|
axisFilters: G
|
|
1038
1046
|
});
|
|
1039
1047
|
}
|
|
1040
1048
|
} else
|
|
1041
|
-
|
|
1049
|
+
m.push({
|
|
1042
1050
|
type: "direct",
|
|
1043
|
-
originalColumn:
|
|
1044
|
-
spec:
|
|
1045
|
-
adjustedSpec:
|
|
1051
|
+
originalColumn: A,
|
|
1052
|
+
spec: T,
|
|
1053
|
+
adjustedSpec: T
|
|
1046
1054
|
});
|
|
1047
1055
|
}
|
|
1048
1056
|
}
|
|
1049
|
-
if (
|
|
1057
|
+
if (m.length === 0) return [];
|
|
1050
1058
|
const f = Ve(
|
|
1051
|
-
|
|
1052
|
-
(
|
|
1053
|
-
spec:
|
|
1054
|
-
suffixTrace:
|
|
1059
|
+
m,
|
|
1060
|
+
(d) => ({
|
|
1061
|
+
spec: d.spec,
|
|
1062
|
+
suffixTrace: d.type === "split" ? Lt(d.axisFilters) : void 0
|
|
1055
1063
|
}),
|
|
1056
1064
|
l
|
|
1057
1065
|
), w = [];
|
|
1058
|
-
for (const { value:
|
|
1059
|
-
const { originalColumn:
|
|
1060
|
-
let
|
|
1061
|
-
r ?
|
|
1062
|
-
let
|
|
1063
|
-
o && (
|
|
1064
|
-
...
|
|
1066
|
+
for (const { value: d, label: h } of f) {
|
|
1067
|
+
const { originalColumn: b, spec: p } = d, I = d.type === "split" ? d.axisFilters : void 0, x = Et(I);
|
|
1068
|
+
let y;
|
|
1069
|
+
r ? y = r.deriveS(p, x) : y = Ot(b.id, x);
|
|
1070
|
+
let A = { ...d.adjustedSpec };
|
|
1071
|
+
o && (A = {
|
|
1072
|
+
...A,
|
|
1065
1073
|
annotations: {
|
|
1066
|
-
...
|
|
1067
|
-
"pl7.app/label":
|
|
1074
|
+
...A.annotations ?? {},
|
|
1075
|
+
"pl7.app/label": h
|
|
1068
1076
|
}
|
|
1069
1077
|
}), w.push({
|
|
1070
|
-
id:
|
|
1071
|
-
spec:
|
|
1072
|
-
data: () =>
|
|
1073
|
-
label:
|
|
1078
|
+
id: y,
|
|
1079
|
+
spec: A,
|
|
1080
|
+
data: () => d.type === "split" ? Ze(_t(d.dataEntries, x)) : d.originalColumn.data,
|
|
1081
|
+
label: h
|
|
1074
1082
|
});
|
|
1075
1083
|
}
|
|
1076
1084
|
return w;
|
|
@@ -1098,19 +1106,19 @@ class ve {
|
|
|
1098
1106
|
return i;
|
|
1099
1107
|
}
|
|
1100
1108
|
}
|
|
1101
|
-
function
|
|
1109
|
+
function de(t, e) {
|
|
1102
1110
|
if (t === void 0) return e === void 0;
|
|
1103
1111
|
if (e === void 0) return !0;
|
|
1104
1112
|
for (const n in e)
|
|
1105
1113
|
if (t[n] !== e[n]) return !1;
|
|
1106
1114
|
return !0;
|
|
1107
1115
|
}
|
|
1108
|
-
function
|
|
1109
|
-
return
|
|
1116
|
+
function _e(t) {
|
|
1117
|
+
return be(t, (e) => e instanceof E ? e.handle : we(e) ? ot(e, (n) => n.handle) : e);
|
|
1110
1118
|
}
|
|
1111
|
-
class
|
|
1119
|
+
class Rt {
|
|
1112
1120
|
constructor() {
|
|
1113
|
-
|
|
1121
|
+
k(this, "ctx", g());
|
|
1114
1122
|
}
|
|
1115
1123
|
/**
|
|
1116
1124
|
* @deprecated use getOptions()
|
|
@@ -1122,25 +1130,25 @@ class Dt {
|
|
|
1122
1130
|
const r = typeof e == "function" ? e : X(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1123
1131
|
let s = {}, o = !1;
|
|
1124
1132
|
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ? Ve(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1125
|
-
ref:
|
|
1133
|
+
ref: xe(a, o),
|
|
1126
1134
|
label: l
|
|
1127
1135
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1128
|
-
ref:
|
|
1136
|
+
ref: xe(a, o),
|
|
1129
1137
|
label: s(l, a)
|
|
1130
1138
|
}));
|
|
1131
1139
|
}
|
|
1132
1140
|
resolveAnchorCtx(e) {
|
|
1133
|
-
if (e instanceof
|
|
1141
|
+
if (e instanceof Ce) return e;
|
|
1134
1142
|
const n = {};
|
|
1135
1143
|
for (const [r, i] of Object.entries(e))
|
|
1136
|
-
if (
|
|
1144
|
+
if (tt(i)) {
|
|
1137
1145
|
const s = this.getPColumnSpecByRef(i);
|
|
1138
1146
|
if (!s)
|
|
1139
1147
|
return;
|
|
1140
1148
|
n[r] = s;
|
|
1141
1149
|
} else
|
|
1142
1150
|
n[r] = i;
|
|
1143
|
-
return new
|
|
1151
|
+
return new Ce(n);
|
|
1144
1152
|
}
|
|
1145
1153
|
/**
|
|
1146
1154
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1153,7 +1161,7 @@ class Dt {
|
|
|
1153
1161
|
getAnchoredPColumns(e, n, r) {
|
|
1154
1162
|
const i = this.resolveAnchorCtx(e);
|
|
1155
1163
|
if (i)
|
|
1156
|
-
return new
|
|
1164
|
+
return new le().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n, {
|
|
1157
1165
|
...r,
|
|
1158
1166
|
anchorCtx: i
|
|
1159
1167
|
});
|
|
@@ -1190,7 +1198,7 @@ class Dt {
|
|
|
1190
1198
|
getCanonicalOptions(e, n, r) {
|
|
1191
1199
|
const i = this.resolveAnchorCtx(e);
|
|
1192
1200
|
if (!i) return;
|
|
1193
|
-
const s = new
|
|
1201
|
+
const s = new le().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n, {
|
|
1194
1202
|
...r,
|
|
1195
1203
|
anchorCtx: i
|
|
1196
1204
|
});
|
|
@@ -1214,7 +1222,7 @@ class Dt {
|
|
|
1214
1222
|
ref: n.ref,
|
|
1215
1223
|
obj: {
|
|
1216
1224
|
...n.obj,
|
|
1217
|
-
data: new
|
|
1225
|
+
data: new E(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1218
1226
|
}
|
|
1219
1227
|
}))
|
|
1220
1228
|
};
|
|
@@ -1233,9 +1241,9 @@ class Dt {
|
|
|
1233
1241
|
ref: n.ref,
|
|
1234
1242
|
obj: {
|
|
1235
1243
|
...n.obj,
|
|
1236
|
-
data:
|
|
1244
|
+
data: nt(
|
|
1237
1245
|
n.obj.data,
|
|
1238
|
-
(r) => new
|
|
1246
|
+
(r) => new E(r, [n.ref.blockId, n.ref.name])
|
|
1239
1247
|
)
|
|
1240
1248
|
}
|
|
1241
1249
|
}))
|
|
@@ -1262,9 +1270,9 @@ class Dt {
|
|
|
1262
1270
|
)) == null ? void 0 : r.obj;
|
|
1263
1271
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1264
1272
|
if (n)
|
|
1265
|
-
return
|
|
1273
|
+
return be(
|
|
1266
1274
|
n,
|
|
1267
|
-
(i) => new
|
|
1275
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
1268
1276
|
);
|
|
1269
1277
|
}
|
|
1270
1278
|
/**
|
|
@@ -1275,7 +1283,7 @@ class Dt {
|
|
|
1275
1283
|
getPColumnByRef(e) {
|
|
1276
1284
|
const n = this.getDataByRef(e);
|
|
1277
1285
|
if (n)
|
|
1278
|
-
return
|
|
1286
|
+
return rt(n);
|
|
1279
1287
|
}
|
|
1280
1288
|
/**
|
|
1281
1289
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1307,10 +1315,10 @@ class Dt {
|
|
|
1307
1315
|
if (!ne(r.obj.spec))
|
|
1308
1316
|
continue;
|
|
1309
1317
|
const i = r.obj.spec;
|
|
1310
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1318
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && de(e.domain, i.domain)) {
|
|
1311
1319
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1312
1320
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1313
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
1321
|
+
if (o.name !== a.name || o.type !== a.type || !de(o.domain, a.domain))
|
|
1314
1322
|
continue e;
|
|
1315
1323
|
}
|
|
1316
1324
|
n.push(r.obj);
|
|
@@ -1325,9 +1333,9 @@ class Dt {
|
|
|
1325
1333
|
findLabels(e) {
|
|
1326
1334
|
const n = this.getData();
|
|
1327
1335
|
for (const r of n.entries) {
|
|
1328
|
-
if (!
|
|
1336
|
+
if (!Te(r.obj)) continue;
|
|
1329
1337
|
const i = r.obj.spec;
|
|
1330
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1338
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && de(e.domain, i.axesSpec[0].domain)) {
|
|
1331
1339
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1332
1340
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1333
1341
|
return Object.fromEntries(
|
|
@@ -1352,7 +1360,7 @@ class Dt {
|
|
|
1352
1360
|
let a = null;
|
|
1353
1361
|
const l = this;
|
|
1354
1362
|
return {
|
|
1355
|
-
id:
|
|
1363
|
+
id: Oe(i),
|
|
1356
1364
|
spec: o,
|
|
1357
1365
|
get data() {
|
|
1358
1366
|
var u;
|
|
@@ -1379,13 +1387,13 @@ class Dt {
|
|
|
1379
1387
|
}
|
|
1380
1388
|
class te {
|
|
1381
1389
|
constructor() {
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1390
|
+
k(this, "ctx");
|
|
1391
|
+
k(this, "args");
|
|
1392
|
+
k(this, "uiState");
|
|
1385
1393
|
// lazy rendering because this feature is rarely used
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
this.ctx =
|
|
1394
|
+
k(this, "_activeArgsCache");
|
|
1395
|
+
k(this, "resultPool", new Rt());
|
|
1396
|
+
this.ctx = g(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1389
1397
|
}
|
|
1390
1398
|
/**
|
|
1391
1399
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -1403,14 +1411,14 @@ class te {
|
|
|
1403
1411
|
getNamedAccessor(e) {
|
|
1404
1412
|
return he(
|
|
1405
1413
|
this.ctx.getAccessorHandleByName(e),
|
|
1406
|
-
(n) => new
|
|
1414
|
+
(n) => new E(n, [e])
|
|
1407
1415
|
);
|
|
1408
1416
|
}
|
|
1409
1417
|
get prerun() {
|
|
1410
1418
|
return this.getNamedAccessor(De);
|
|
1411
1419
|
}
|
|
1412
1420
|
get outputs() {
|
|
1413
|
-
return this.getNamedAccessor(
|
|
1421
|
+
return this.getNamedAccessor(Fe);
|
|
1414
1422
|
}
|
|
1415
1423
|
/**
|
|
1416
1424
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1422,13 +1430,13 @@ class te {
|
|
|
1422
1430
|
}
|
|
1423
1431
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1424
1432
|
var i;
|
|
1425
|
-
const n = e.some((s) => !(s.data instanceof
|
|
1433
|
+
const n = e.some((s) => !(s.data instanceof E) || we(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1426
1434
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1427
1435
|
}
|
|
1428
1436
|
// TODO remove all non-PColumn fields
|
|
1429
1437
|
createPFrame(e) {
|
|
1430
1438
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1431
|
-
e.map((n) =>
|
|
1439
|
+
e.map((n) => _e(n))
|
|
1432
1440
|
);
|
|
1433
1441
|
}
|
|
1434
1442
|
createPTable(e) {
|
|
@@ -1440,8 +1448,8 @@ class te {
|
|
|
1440
1448
|
},
|
|
1441
1449
|
filters: e.filters ?? [],
|
|
1442
1450
|
sorting: e.sorting ?? []
|
|
1443
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1444
|
-
|
|
1451
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(it(n.src)), this.ctx.createPTable(
|
|
1452
|
+
st(n, (r) => _e(r))
|
|
1445
1453
|
);
|
|
1446
1454
|
}
|
|
1447
1455
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1461,19 +1469,19 @@ class te {
|
|
|
1461
1469
|
this.ctx.logError(e);
|
|
1462
1470
|
}
|
|
1463
1471
|
}
|
|
1464
|
-
const Y = "1.33.
|
|
1465
|
-
function
|
|
1472
|
+
const Y = "1.33.10";
|
|
1473
|
+
function Dt(t) {
|
|
1466
1474
|
return t.__renderLambda === !0;
|
|
1467
1475
|
}
|
|
1468
|
-
function
|
|
1476
|
+
function pe(t) {
|
|
1469
1477
|
if (t !== void 0)
|
|
1470
|
-
return
|
|
1478
|
+
return Dt(t) ? t.handle : t;
|
|
1471
1479
|
}
|
|
1472
|
-
function
|
|
1480
|
+
function J(t) {
|
|
1473
1481
|
if (t !== void 0)
|
|
1474
1482
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1475
1483
|
}
|
|
1476
|
-
function
|
|
1484
|
+
function En(t) {
|
|
1477
1485
|
if (t.v3 !== void 0) {
|
|
1478
1486
|
const {
|
|
1479
1487
|
initialArgs: e,
|
|
@@ -1485,7 +1493,7 @@ function kn(t) {
|
|
|
1485
1493
|
sections: a,
|
|
1486
1494
|
title: l,
|
|
1487
1495
|
enrichmentTargets: u
|
|
1488
|
-
} = t.v3, { code:
|
|
1496
|
+
} = t.v3, { code: c } = t;
|
|
1489
1497
|
return {
|
|
1490
1498
|
initialArgs: e,
|
|
1491
1499
|
initialUiState: n,
|
|
@@ -1495,7 +1503,7 @@ function kn(t) {
|
|
|
1495
1503
|
sdkVersion: o,
|
|
1496
1504
|
sections: a,
|
|
1497
1505
|
title: l,
|
|
1498
|
-
code:
|
|
1506
|
+
code: c,
|
|
1499
1507
|
enrichmentTargets: u
|
|
1500
1508
|
};
|
|
1501
1509
|
} else if (t.inputsValid !== void 0) {
|
|
@@ -1509,10 +1517,10 @@ function kn(t) {
|
|
|
1509
1517
|
renderingMode: n,
|
|
1510
1518
|
initialArgs: o,
|
|
1511
1519
|
outputs: Object.fromEntries(
|
|
1512
|
-
Object.entries(r).map(([u,
|
|
1520
|
+
Object.entries(r).map(([u, c]) => [u, J(c)])
|
|
1513
1521
|
),
|
|
1514
|
-
inputsValid:
|
|
1515
|
-
sections:
|
|
1522
|
+
inputsValid: J(i),
|
|
1523
|
+
sections: J(s),
|
|
1516
1524
|
initialUiState: void 0,
|
|
1517
1525
|
code: a
|
|
1518
1526
|
};
|
|
@@ -1527,10 +1535,10 @@ function kn(t) {
|
|
|
1527
1535
|
renderingMode: r,
|
|
1528
1536
|
initialArgs: o,
|
|
1529
1537
|
outputs: Object.fromEntries(
|
|
1530
|
-
Object.entries(i).map(([u,
|
|
1538
|
+
Object.entries(i).map(([u, c]) => [u, J(c)])
|
|
1531
1539
|
),
|
|
1532
|
-
inputsValid:
|
|
1533
|
-
sections:
|
|
1540
|
+
inputsValid: J(n),
|
|
1541
|
+
sections: J(s),
|
|
1534
1542
|
initialUiState: void 0,
|
|
1535
1543
|
code: a
|
|
1536
1544
|
};
|
|
@@ -1541,12 +1549,12 @@ function kn(t) {
|
|
|
1541
1549
|
);
|
|
1542
1550
|
}
|
|
1543
1551
|
}
|
|
1544
|
-
class
|
|
1552
|
+
class L {
|
|
1545
1553
|
constructor(e, n, r, i, s, o, a, l) {
|
|
1546
1554
|
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
|
|
1547
1555
|
}
|
|
1548
1556
|
static create(e = "Heavy") {
|
|
1549
|
-
return new
|
|
1557
|
+
return new L(
|
|
1550
1558
|
e,
|
|
1551
1559
|
void 0,
|
|
1552
1560
|
{},
|
|
@@ -1560,7 +1568,7 @@ class E {
|
|
|
1560
1568
|
output(e, n, r = {}) {
|
|
1561
1569
|
if (typeof n == "function") {
|
|
1562
1570
|
const i = `output#${e}`;
|
|
1563
|
-
return H(i, () => n(new te())), new
|
|
1571
|
+
return H(i, () => n(new te())), new L(
|
|
1564
1572
|
this._renderingMode,
|
|
1565
1573
|
this._initialArgs,
|
|
1566
1574
|
this._initialUiState,
|
|
@@ -1578,7 +1586,7 @@ class E {
|
|
|
1578
1586
|
this._enrichmentTargets
|
|
1579
1587
|
);
|
|
1580
1588
|
} else
|
|
1581
|
-
return new
|
|
1589
|
+
return new L(
|
|
1582
1590
|
this._renderingMode,
|
|
1583
1591
|
this._initialArgs,
|
|
1584
1592
|
this._initialUiState,
|
|
@@ -1597,7 +1605,7 @@ class E {
|
|
|
1597
1605
|
return this.output(e, n, { retentive: !0 });
|
|
1598
1606
|
}
|
|
1599
1607
|
argsValid(e) {
|
|
1600
|
-
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new
|
|
1608
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
|
|
1601
1609
|
this._renderingMode,
|
|
1602
1610
|
this._initialArgs,
|
|
1603
1611
|
this._initialUiState,
|
|
@@ -1609,7 +1617,7 @@ class E {
|
|
|
1609
1617
|
this._sections,
|
|
1610
1618
|
this._title,
|
|
1611
1619
|
this._enrichmentTargets
|
|
1612
|
-
)) : new
|
|
1620
|
+
)) : new L(
|
|
1613
1621
|
this._renderingMode,
|
|
1614
1622
|
this._initialArgs,
|
|
1615
1623
|
this._initialUiState,
|
|
@@ -1621,7 +1629,7 @@ class E {
|
|
|
1621
1629
|
);
|
|
1622
1630
|
}
|
|
1623
1631
|
sections(e) {
|
|
1624
|
-
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new
|
|
1632
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
|
|
1625
1633
|
this._renderingMode,
|
|
1626
1634
|
this._initialArgs,
|
|
1627
1635
|
this._initialUiState,
|
|
@@ -1630,7 +1638,7 @@ class E {
|
|
|
1630
1638
|
{ __renderLambda: !0, handle: "sections" },
|
|
1631
1639
|
this._title,
|
|
1632
1640
|
this._enrichmentTargets
|
|
1633
|
-
)) : new
|
|
1641
|
+
)) : new L(
|
|
1634
1642
|
this._renderingMode,
|
|
1635
1643
|
this._initialArgs,
|
|
1636
1644
|
this._initialUiState,
|
|
@@ -1643,7 +1651,7 @@ class E {
|
|
|
1643
1651
|
}
|
|
1644
1652
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1645
1653
|
title(e) {
|
|
1646
|
-
return H("title", () => e(new te())), new
|
|
1654
|
+
return H("title", () => e(new te())), new L(
|
|
1647
1655
|
this._renderingMode,
|
|
1648
1656
|
this._initialArgs,
|
|
1649
1657
|
this._initialUiState,
|
|
@@ -1659,7 +1667,7 @@ class E {
|
|
|
1659
1667
|
* @deprecated use {@link withArgs}
|
|
1660
1668
|
* */
|
|
1661
1669
|
initialArgs(e) {
|
|
1662
|
-
return new
|
|
1670
|
+
return new L(
|
|
1663
1671
|
this._renderingMode,
|
|
1664
1672
|
e,
|
|
1665
1673
|
this._initialUiState,
|
|
@@ -1672,7 +1680,7 @@ class E {
|
|
|
1672
1680
|
}
|
|
1673
1681
|
/** Sets initial args for the block, this value must be specified. */
|
|
1674
1682
|
withArgs(e) {
|
|
1675
|
-
return new
|
|
1683
|
+
return new L(
|
|
1676
1684
|
this._renderingMode,
|
|
1677
1685
|
e,
|
|
1678
1686
|
this._initialUiState,
|
|
@@ -1685,7 +1693,7 @@ class E {
|
|
|
1685
1693
|
}
|
|
1686
1694
|
/** Defines type and sets initial value for block UiState. */
|
|
1687
1695
|
withUiState(e) {
|
|
1688
|
-
return new
|
|
1696
|
+
return new L(
|
|
1689
1697
|
this._renderingMode,
|
|
1690
1698
|
this._initialArgs,
|
|
1691
1699
|
e,
|
|
@@ -1701,7 +1709,7 @@ class E {
|
|
|
1701
1709
|
* Influences dependency graph construction.
|
|
1702
1710
|
*/
|
|
1703
1711
|
enriches(e) {
|
|
1704
|
-
return H("enrichmentTargets", e), new
|
|
1712
|
+
return H("enrichmentTargets", e), new L(
|
|
1705
1713
|
this._renderingMode,
|
|
1706
1714
|
this._initialArgs,
|
|
1707
1715
|
this._initialUiState,
|
|
@@ -1733,224 +1741,75 @@ class E {
|
|
|
1733
1741
|
sdkVersion: Y,
|
|
1734
1742
|
renderingMode: this._renderingMode,
|
|
1735
1743
|
initialArgs: this._initialArgs,
|
|
1736
|
-
inputsValid:
|
|
1737
|
-
sections:
|
|
1744
|
+
inputsValid: pe(this._inputsValid),
|
|
1745
|
+
sections: pe(this._sections),
|
|
1738
1746
|
outputs: Object.fromEntries(
|
|
1739
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1747
|
+
Object.entries(this._outputs).map(([n, r]) => [n, pe(r)])
|
|
1740
1748
|
)
|
|
1741
1749
|
};
|
|
1742
|
-
return
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
const jt = (t, e) => {
|
|
1746
|
-
let n = t.toString();
|
|
1747
|
-
return e == null || e.forEach((r) => {
|
|
1748
|
-
if (r)
|
|
1749
|
-
for (const [i, s] of Object.entries(r))
|
|
1750
|
-
n += i, n += s;
|
|
1751
|
-
}), n;
|
|
1752
|
-
};
|
|
1753
|
-
function Vt(t) {
|
|
1754
|
-
if (!t.length)
|
|
1755
|
-
return [];
|
|
1756
|
-
let e = [[]];
|
|
1757
|
-
return t.forEach((n) => {
|
|
1758
|
-
const r = [];
|
|
1759
|
-
n.forEach((i) => {
|
|
1760
|
-
r.push(...e.map((s) => [...s, i]));
|
|
1761
|
-
}), e = r;
|
|
1762
|
-
}), e;
|
|
1763
|
-
}
|
|
1764
|
-
function $t(t) {
|
|
1765
|
-
var e;
|
|
1766
|
-
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[Mt]) === "true";
|
|
1767
|
-
}
|
|
1768
|
-
function Nt(t) {
|
|
1769
|
-
var n, r;
|
|
1770
|
-
const e = /* @__PURE__ */ new Map();
|
|
1771
|
-
for (const { id: i, spec: s } of t) {
|
|
1772
|
-
const [o, a] = s.axesSpec.map(T).map(D);
|
|
1773
|
-
e.has(o) || e.set(o, /* @__PURE__ */ new Map()), e.has(a) || e.set(a, /* @__PURE__ */ new Map()), (n = e.get(o)) == null || n.set(a, { columnId: i, spec: s }), (r = e.get(a)) == null || r.set(o, { columnId: i, spec: s });
|
|
1774
|
-
}
|
|
1775
|
-
return e;
|
|
1776
|
-
}
|
|
1777
|
-
function Je(t, e, n) {
|
|
1778
|
-
var l;
|
|
1779
|
-
const i = [...t.keys()].map(fe).find((u) => K(e, u));
|
|
1780
|
-
if (!i) return !1;
|
|
1781
|
-
const s = D(T(i)), o = /* @__PURE__ */ new Set([s]);
|
|
1782
|
-
let a = [s];
|
|
1783
|
-
for (; a.length; ) {
|
|
1784
|
-
const u = [];
|
|
1785
|
-
for (const d of a)
|
|
1786
|
-
for (const y of ((l = t.get(d)) == null ? void 0 : l.keys()) ?? []) {
|
|
1787
|
-
const b = fe(y);
|
|
1788
|
-
if (K(n, b)) return !0;
|
|
1789
|
-
o.has(y) || (u.push(y), o.add(y));
|
|
1790
|
-
}
|
|
1791
|
-
a = u;
|
|
1792
|
-
}
|
|
1793
|
-
return !1;
|
|
1794
|
-
}
|
|
1795
|
-
function Jt(t, e, n) {
|
|
1796
|
-
const r = t.axesSpec.map(T), i = e.axesSpec.map(T);
|
|
1797
|
-
return i.some((s) => r.some((o) => K(o, s) && K(s, o))) || !!n && i.some((s) => r.some((o) => Je(n, o, s)));
|
|
1798
|
-
}
|
|
1799
|
-
function Ue(t, e, n) {
|
|
1800
|
-
const r = t.axesSpec.map(T), i = e.axesSpec.map(T);
|
|
1801
|
-
return i.some((s) => r.some((o) => K(o, s))) || !!n && i.some((s) => r.some((o) => Je(n, o, s)));
|
|
1802
|
-
}
|
|
1803
|
-
const Ut = "pl7.app/graph/isVirtual", Te = "pl7.app/label", Mt = "pl7.app/isLinkerColumn";
|
|
1804
|
-
function Le(t, e, n) {
|
|
1805
|
-
const r = t.spec.axesSpec.map(T), i = e.spec.axesSpec.map(T);
|
|
1806
|
-
if (Jt(t.spec, e.spec, n))
|
|
1807
|
-
return [];
|
|
1808
|
-
if (!Ue(t.spec, e.spec, n))
|
|
1809
|
-
return [];
|
|
1810
|
-
const a = i.map((b) => r.filter((f) => K(f, b))), l = Vt(a), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), y = l.map((b) => {
|
|
1811
|
-
const f = /* @__PURE__ */ new Set();
|
|
1812
|
-
return b.map((w, c) => {
|
|
1813
|
-
const g = e.spec.axesSpec[c].domain, x = w.domain;
|
|
1814
|
-
return Object.entries(x ?? {}).forEach(([p, A]) => {
|
|
1815
|
-
if ((g == null ? void 0 : g[p]) === void 0) {
|
|
1816
|
-
const m = JSON.stringify([p, A]);
|
|
1817
|
-
f.add(m), u.add(m);
|
|
1818
|
-
}
|
|
1819
|
-
}), {
|
|
1820
|
-
...w,
|
|
1821
|
-
annotations: e.spec.axesSpec[c].annotations
|
|
1822
|
-
};
|
|
1823
|
-
}), f;
|
|
1824
|
-
});
|
|
1825
|
-
return [...u].forEach((b) => {
|
|
1826
|
-
y.some((f) => !f.has(b)) && d.add(b);
|
|
1827
|
-
}), l.map((b, f) => {
|
|
1828
|
-
var p;
|
|
1829
|
-
const w = jt(e.id, b.map((A) => A.domain)), c = ((p = e.spec.annotations) == null ? void 0 : p[Te]) ?? "", g = [...y[f]].filter((A) => d.has(A)).sort().map((A) => {
|
|
1830
|
-
var m;
|
|
1831
|
-
return (m = JSON.parse(A)) == null ? void 0 : m[1];
|
|
1832
|
-
}).join(" / "), x = {
|
|
1833
|
-
...e.spec.annotations,
|
|
1834
|
-
[Ut]: "true"
|
|
1835
|
-
};
|
|
1836
|
-
return (c || g) && (x[Te] = c && g ? c + " / " + g : c + g), {
|
|
1837
|
-
id: w,
|
|
1838
|
-
spec: {
|
|
1839
|
-
...e.spec,
|
|
1840
|
-
axesSpec: b.map((A, m) => ({
|
|
1841
|
-
...A,
|
|
1842
|
-
annotations: e.spec.axesSpec[m].annotations
|
|
1843
|
-
})),
|
|
1844
|
-
annotations: x
|
|
1845
|
-
},
|
|
1846
|
-
data: e.data
|
|
1847
|
-
};
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
function Fn(t, e = /* @__PURE__ */ new Map()) {
|
|
1851
|
-
const n = [];
|
|
1852
|
-
for (let r = 0; r < t.length; r++)
|
|
1853
|
-
for (let i = r + 1; i < t.length; i++) {
|
|
1854
|
-
const s = t[r], o = t[i];
|
|
1855
|
-
n.push(
|
|
1856
|
-
...Le(s, o, e),
|
|
1857
|
-
...Le(o, s, e)
|
|
1858
|
-
);
|
|
1859
|
-
}
|
|
1860
|
-
return n;
|
|
1861
|
-
}
|
|
1862
|
-
function Bt(t, e, n = [], r = /* @__PURE__ */ new Map()) {
|
|
1863
|
-
const i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
|
|
1864
|
-
t.forEach((a) => {
|
|
1865
|
-
i.add(a.id), s.set(D(ue(a.spec)), a);
|
|
1866
|
-
});
|
|
1867
|
-
const o = /* @__PURE__ */ new Map();
|
|
1868
|
-
for (const a of e) {
|
|
1869
|
-
if (i.has(a.id)) continue;
|
|
1870
|
-
const l = D(ue(a.spec));
|
|
1871
|
-
if (!s.has(l)) {
|
|
1872
|
-
for (const u of s.values())
|
|
1873
|
-
if (Ue(u.spec, a.spec, r)) {
|
|
1874
|
-
o.set(l, a);
|
|
1875
|
-
break;
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1750
|
+
return dt() ? Re({ sdkVersion: Y }) : { config: e };
|
|
1878
1751
|
}
|
|
1879
|
-
for (const a of n) {
|
|
1880
|
-
if (i.has(a.id)) continue;
|
|
1881
|
-
const l = D(ue(a.spec));
|
|
1882
|
-
s.has(l) || o.has(l) || (i.add(a.id), s.set(l, a));
|
|
1883
|
-
}
|
|
1884
|
-
return [...s.values(), ...o.values()];
|
|
1885
1752
|
}
|
|
1886
|
-
function
|
|
1887
|
-
if (!e) return;
|
|
1888
|
-
const n = t.resultPool.getData().entries.map((l) => l.obj).filter(be), i = [...e, ...n].filter((l) => $t(l.spec)), s = Nt(i), a = [...Bt(e, n, i, s)];
|
|
1889
|
-
if (!a.some(
|
|
1890
|
-
(l) => l.data instanceof O && !l.data.getIsReadyOrError()
|
|
1891
|
-
))
|
|
1892
|
-
return t.createPFrame(a);
|
|
1893
|
-
}
|
|
1894
|
-
function Dn(t) {
|
|
1753
|
+
function On(t) {
|
|
1895
1754
|
const e = t.type;
|
|
1896
1755
|
switch (e) {
|
|
1897
1756
|
case "axis":
|
|
1898
|
-
return
|
|
1757
|
+
return K(t);
|
|
1899
1758
|
case "column":
|
|
1900
|
-
return
|
|
1759
|
+
return K(t);
|
|
1901
1760
|
default:
|
|
1902
1761
|
throw Error(`unsupported column type: ${e}`);
|
|
1903
1762
|
}
|
|
1904
1763
|
}
|
|
1905
|
-
function
|
|
1764
|
+
function ve(t) {
|
|
1906
1765
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1907
1766
|
}
|
|
1908
|
-
function
|
|
1909
|
-
return new
|
|
1767
|
+
function Ne(t) {
|
|
1768
|
+
return new le().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1910
1769
|
name: "pl7.app/label",
|
|
1911
1770
|
axes: [{}]
|
|
1912
1771
|
// exactly one axis
|
|
1913
1772
|
}, { dontWaitAllData: !0 });
|
|
1914
1773
|
}
|
|
1915
|
-
function
|
|
1774
|
+
function Je(t, e) {
|
|
1916
1775
|
const n = [], r = [];
|
|
1917
1776
|
for (const a of t)
|
|
1918
|
-
|
|
1777
|
+
ve(a.spec) ? n.push(a) : r.push(a);
|
|
1919
1778
|
const i = [];
|
|
1920
1779
|
for (const a of r)
|
|
1921
1780
|
for (const l of a.spec.axesSpec) {
|
|
1922
|
-
const u =
|
|
1923
|
-
i.some((
|
|
1781
|
+
const u = D(l);
|
|
1782
|
+
i.some((c) => U(c, u)) || i.push(u);
|
|
1924
1783
|
}
|
|
1925
1784
|
for (const a of n) {
|
|
1926
|
-
const l =
|
|
1785
|
+
const l = D(a.spec.axesSpec[0]), u = i.findIndex((c) => U(c, l));
|
|
1927
1786
|
u !== -1 && i.splice(u, 1);
|
|
1928
1787
|
}
|
|
1929
1788
|
const s = (a, l) => {
|
|
1930
1789
|
let u = a.toString();
|
|
1931
1790
|
if (l)
|
|
1932
|
-
for (const
|
|
1933
|
-
u +=
|
|
1791
|
+
for (const c in l)
|
|
1792
|
+
u += c, u += l[c];
|
|
1934
1793
|
return u;
|
|
1935
1794
|
}, o = [];
|
|
1936
1795
|
for (const a of e) {
|
|
1937
|
-
const l = a.spec.axesSpec[0], u =
|
|
1938
|
-
if (
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
id: s(a.id,
|
|
1796
|
+
const l = a.spec.axesSpec[0], u = D(l), c = i.findIndex((m) => U(m, u));
|
|
1797
|
+
if (c !== -1) {
|
|
1798
|
+
const m = i[c], v = Object.keys(m.domain ?? {}).length, f = Object.keys(l.domain ?? {}).length;
|
|
1799
|
+
v > f ? o.push({
|
|
1800
|
+
id: s(a.id, m.domain),
|
|
1942
1801
|
spec: {
|
|
1943
1802
|
...a.spec,
|
|
1944
|
-
axesSpec: [{ ...
|
|
1803
|
+
axesSpec: [{ ...m, annotations: l.annotations }]
|
|
1945
1804
|
},
|
|
1946
1805
|
data: a.data
|
|
1947
|
-
}) : o.push(a), i.splice(
|
|
1806
|
+
}) : o.push(a), i.splice(c, 1);
|
|
1948
1807
|
}
|
|
1949
1808
|
}
|
|
1950
1809
|
return o;
|
|
1951
1810
|
}
|
|
1952
|
-
function
|
|
1953
|
-
const e = (i) => Array.isArray(i), n = (i) => i instanceof
|
|
1811
|
+
function Me(t) {
|
|
1812
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
1954
1813
|
return t.map((i) => i.data).every((i) => {
|
|
1955
1814
|
if (e(i))
|
|
1956
1815
|
return !0;
|
|
@@ -1969,7 +1828,7 @@ function We(t) {
|
|
|
1969
1828
|
throw Error(`unsupported column data type: ${i}`);
|
|
1970
1829
|
});
|
|
1971
1830
|
}
|
|
1972
|
-
function
|
|
1831
|
+
function Ue(t, e, n, r, i, s) {
|
|
1973
1832
|
let o = t;
|
|
1974
1833
|
const a = [];
|
|
1975
1834
|
if (s) {
|
|
@@ -1990,42 +1849,42 @@ function Ge(t, e, n, r, i, s) {
|
|
|
1990
1849
|
sorting: i
|
|
1991
1850
|
};
|
|
1992
1851
|
}
|
|
1993
|
-
function
|
|
1994
|
-
var u,
|
|
1852
|
+
function kn(t, e, n, r) {
|
|
1853
|
+
var u, c;
|
|
1995
1854
|
Array.isArray(r) && (r = { filters: r });
|
|
1996
|
-
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 = ((
|
|
1855
|
+
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 = ((c = n == null ? void 0 : n.pTableParams) == null ? void 0 : c.sorting) ?? [], a = Ne(t.resultPool);
|
|
1997
1856
|
if (!a) return;
|
|
1998
|
-
const l =
|
|
1999
|
-
if (
|
|
1857
|
+
const l = Je(e.map(Ee), a);
|
|
1858
|
+
if (Me([...e, ...l]))
|
|
2000
1859
|
return t.createPTable(
|
|
2001
|
-
|
|
1860
|
+
Ue(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
2002
1861
|
);
|
|
2003
1862
|
}
|
|
2004
|
-
function
|
|
1863
|
+
function Ft(t) {
|
|
2005
1864
|
var e;
|
|
2006
1865
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
2007
1866
|
}
|
|
2008
|
-
function
|
|
1867
|
+
function Kt(t) {
|
|
2009
1868
|
var e;
|
|
2010
1869
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
2011
1870
|
}
|
|
2012
|
-
function
|
|
2013
|
-
var
|
|
2014
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1871
|
+
function Rn(t, e, n, r, i) {
|
|
1872
|
+
var h, b;
|
|
1873
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((h = r == null ? void 0 : r.pTableParams) == null ? void 0 : h.filters) ?? []], a = ((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.sorting) ?? [], l = e.filter((p) => !Ft(p.spec)), u = l.find((p) => n(p.spec));
|
|
2015
1874
|
if (!u) return;
|
|
2016
|
-
const
|
|
2017
|
-
if (!
|
|
2018
|
-
const
|
|
2019
|
-
var
|
|
1875
|
+
const c = Ne(t.resultPool);
|
|
1876
|
+
if (!c) return;
|
|
1877
|
+
const m = new Set((() => {
|
|
1878
|
+
var I, x;
|
|
2020
1879
|
if (s === "inner") return [];
|
|
2021
|
-
const p = (
|
|
2022
|
-
return p || l.filter((
|
|
1880
|
+
const p = (x = (I = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : I.hiddenColIds) == null ? void 0 : x.map(fe).filter((y) => y.type === "column").map((y) => y.id);
|
|
1881
|
+
return p || l.filter((y) => Kt(y.spec)).map((y) => y.id);
|
|
2023
1882
|
})());
|
|
2024
|
-
|
|
2025
|
-
const
|
|
1883
|
+
m.delete(u.id), [...o.map((p) => p.column), ...a.map((p) => p.column)].filter((p) => p.type === "column").map((p) => m.delete(p.id));
|
|
1884
|
+
const v = l.filter((p) => !m.has(p.id)), f = Je(v.map(Ee), c), w = [
|
|
2026
1885
|
...u.spec.axesSpec.map((p) => ({
|
|
2027
1886
|
type: "axis",
|
|
2028
|
-
id:
|
|
1887
|
+
id: D(p),
|
|
2029
1888
|
spec: p
|
|
2030
1889
|
})),
|
|
2031
1890
|
...[...l, ...f].map((p) => ({
|
|
@@ -2034,16 +1893,16 @@ function jn(t, e, n, r, i) {
|
|
|
2034
1893
|
spec: p.spec
|
|
2035
1894
|
}))
|
|
2036
1895
|
];
|
|
2037
|
-
if (!
|
|
2038
|
-
const
|
|
2039
|
-
|
|
1896
|
+
if (!Me([...v, ...f])) return;
|
|
1897
|
+
const d = t.createPTable(
|
|
1898
|
+
Ue(l, f, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
2040
1899
|
);
|
|
2041
1900
|
return {
|
|
2042
1901
|
tableSpec: w,
|
|
2043
|
-
tableHandle:
|
|
1902
|
+
tableHandle: d
|
|
2044
1903
|
};
|
|
2045
1904
|
}
|
|
2046
|
-
function
|
|
1905
|
+
function Dn(t, e, n) {
|
|
2047
1906
|
const r = t.resultPool.findLabels(e);
|
|
2048
1907
|
return {
|
|
2049
1908
|
axis: e,
|
|
@@ -2054,18 +1913,156 @@ function Vn(t, e, n) {
|
|
|
2054
1913
|
defaultValue: n[0]
|
|
2055
1914
|
};
|
|
2056
1915
|
}
|
|
2057
|
-
|
|
1916
|
+
const Vt = (t, e) => {
|
|
1917
|
+
let n = t.toString();
|
|
1918
|
+
return e == null || e.forEach((r) => {
|
|
1919
|
+
if (r)
|
|
1920
|
+
for (const [i, s] of Object.entries(r))
|
|
1921
|
+
n += i, n += s;
|
|
1922
|
+
}), n;
|
|
1923
|
+
};
|
|
1924
|
+
function jt(t) {
|
|
1925
|
+
if (!t.length)
|
|
1926
|
+
return [];
|
|
1927
|
+
let e = [[]];
|
|
1928
|
+
return t.forEach((n) => {
|
|
1929
|
+
const r = [];
|
|
1930
|
+
n.forEach((i) => {
|
|
1931
|
+
r.push(...e.map((s) => [...s, i]));
|
|
1932
|
+
}), e = r;
|
|
1933
|
+
}), e;
|
|
1934
|
+
}
|
|
1935
|
+
function $t(t) {
|
|
1936
|
+
var e;
|
|
1937
|
+
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[Jt]) === "true";
|
|
1938
|
+
}
|
|
1939
|
+
const Nt = "pl7.app/graph/isVirtual", Ie = "pl7.app/label", Jt = "pl7.app/isLinkerColumn";
|
|
1940
|
+
function Mt(t) {
|
|
1941
|
+
var n, r;
|
|
1942
|
+
const e = /* @__PURE__ */ new Map();
|
|
1943
|
+
for (const { spec: i } of t) {
|
|
1944
|
+
const s = i.axesSpec.map(D).map(K);
|
|
1945
|
+
s.forEach((o) => {
|
|
1946
|
+
e.has(o) || e.set(o, /* @__PURE__ */ new Set());
|
|
1947
|
+
});
|
|
1948
|
+
for (let o = 0; o < s.length - 1; o++)
|
|
1949
|
+
for (let a = o + 1; a < s.length; a++) {
|
|
1950
|
+
const l = s[o], u = s[a];
|
|
1951
|
+
(n = e.get(l)) == null || n.add(u), (r = e.get(u)) == null || r.add(l);
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
return e;
|
|
1955
|
+
}
|
|
1956
|
+
function Ut(t, e) {
|
|
1957
|
+
const n = Mt(t), r = [...n.keys()].map(fe), i = [];
|
|
1958
|
+
for (const l of e.values()) {
|
|
1959
|
+
const u = r.find((c) => U(l, c));
|
|
1960
|
+
u && i.push(K(u));
|
|
1961
|
+
}
|
|
1962
|
+
const s = new Set(i), o = /* @__PURE__ */ new Map();
|
|
1963
|
+
let a = [...i];
|
|
1964
|
+
for (; a.length; ) {
|
|
1965
|
+
const l = [];
|
|
1966
|
+
for (const u of a)
|
|
1967
|
+
for (const c of n.get(u) ?? [])
|
|
1968
|
+
s.has(c) || (l.push(c), s.add(c), o.set(c, fe(c)));
|
|
1969
|
+
a = l;
|
|
1970
|
+
}
|
|
1971
|
+
return o;
|
|
1972
|
+
}
|
|
1973
|
+
function Bt(t, e) {
|
|
1974
|
+
const n = [];
|
|
1975
|
+
return e.forEach((r) => {
|
|
1976
|
+
n.push(...Wt(t, r));
|
|
1977
|
+
}), n;
|
|
1978
|
+
}
|
|
1979
|
+
function Wt(t, e) {
|
|
1980
|
+
const n = e.spec.axesSpec.map(D);
|
|
1981
|
+
if (n.every((u) => t.has(K(u))))
|
|
1982
|
+
return [e];
|
|
1983
|
+
const r = n.map((u) => {
|
|
1984
|
+
const c = [];
|
|
1985
|
+
for (const [m, v] of t)
|
|
1986
|
+
U(v, u) && !U(u, v) && c.push(v);
|
|
1987
|
+
return c;
|
|
1988
|
+
}), i = jt(r), s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = i.map((u) => {
|
|
1989
|
+
const c = /* @__PURE__ */ new Set();
|
|
1990
|
+
return u.map((m, v) => {
|
|
1991
|
+
const f = e.spec.axesSpec[v].domain, w = m.domain;
|
|
1992
|
+
return Object.entries(w ?? {}).forEach(([d, h]) => {
|
|
1993
|
+
if ((f == null ? void 0 : f[d]) === void 0) {
|
|
1994
|
+
const b = JSON.stringify([d, h]);
|
|
1995
|
+
c.add(b), s.add(b);
|
|
1996
|
+
}
|
|
1997
|
+
}), {
|
|
1998
|
+
...m,
|
|
1999
|
+
annotations: e.spec.axesSpec[v].annotations
|
|
2000
|
+
};
|
|
2001
|
+
}), c;
|
|
2002
|
+
});
|
|
2003
|
+
[...s].forEach((u) => {
|
|
2004
|
+
a.some((c) => !c.has(u)) && o.add(u);
|
|
2005
|
+
});
|
|
2006
|
+
const l = i.map((u, c) => {
|
|
2007
|
+
var d;
|
|
2008
|
+
const m = Vt(e.id, u.map((h) => h.domain)), v = ((d = e.spec.annotations) == null ? void 0 : d[Ie]) ?? "", f = [...a[c]].filter((h) => o.has(h)).sort().map((h) => {
|
|
2009
|
+
var b;
|
|
2010
|
+
return (b = JSON.parse(h)) == null ? void 0 : b[1];
|
|
2011
|
+
}).join(" / "), w = {
|
|
2012
|
+
...e.spec.annotations,
|
|
2013
|
+
[Nt]: "true"
|
|
2014
|
+
};
|
|
2015
|
+
return (v || f) && (w[Ie] = v && f ? v + " / " + f : v + f), {
|
|
2016
|
+
id: m,
|
|
2017
|
+
spec: {
|
|
2018
|
+
...e.spec,
|
|
2019
|
+
axesSpec: u.map((h, b) => ({
|
|
2020
|
+
...h,
|
|
2021
|
+
annotations: e.spec.axesSpec[b].annotations
|
|
2022
|
+
})),
|
|
2023
|
+
annotations: w
|
|
2024
|
+
},
|
|
2025
|
+
data: e.data
|
|
2026
|
+
};
|
|
2027
|
+
});
|
|
2028
|
+
return [e, ...l];
|
|
2029
|
+
}
|
|
2030
|
+
function Fn(t, e) {
|
|
2031
|
+
if (!e) return;
|
|
2032
|
+
const n = new le();
|
|
2033
|
+
n.addColumnProvider(t.resultPool), n.addColumns(e);
|
|
2034
|
+
const r = /* @__PURE__ */ new Map();
|
|
2035
|
+
for (const u of e)
|
|
2036
|
+
for (const c of u.spec.axesSpec) {
|
|
2037
|
+
const m = D(c);
|
|
2038
|
+
r.set(K(m), m);
|
|
2039
|
+
}
|
|
2040
|
+
const i = n.getColumns((u) => $t(u)) ?? [], s = Ut(i, r), o = n.getColumns(ve) ?? [];
|
|
2041
|
+
for (const u of s)
|
|
2042
|
+
r.set(...u);
|
|
2043
|
+
let a = (n.getColumns([...r.values()].map((u) => ({
|
|
2044
|
+
axes: [u],
|
|
2045
|
+
partialAxesMatch: !0
|
|
2046
|
+
}))) ?? []).filter((u) => !ve(u.spec));
|
|
2047
|
+
a = a.concat(o);
|
|
2048
|
+
const l = Bt(r, a);
|
|
2049
|
+
if (!l.some(
|
|
2050
|
+
(u) => u.data instanceof E && !u.data.getIsReadyOrError()
|
|
2051
|
+
))
|
|
2052
|
+
return t.createPFrame(l);
|
|
2053
|
+
}
|
|
2054
|
+
function Kn(t) {
|
|
2058
2055
|
const e = t.type;
|
|
2059
2056
|
switch (e) {
|
|
2060
2057
|
case "axis":
|
|
2061
|
-
return
|
|
2058
|
+
return K(t);
|
|
2062
2059
|
case "column":
|
|
2063
|
-
return
|
|
2060
|
+
return K(t);
|
|
2064
2061
|
default:
|
|
2065
2062
|
throw Error(`unsupported column type: ${e}`);
|
|
2066
2063
|
}
|
|
2067
2064
|
}
|
|
2068
|
-
function
|
|
2065
|
+
function Vn(t, e, n, r) {
|
|
2069
2066
|
if (!(!e || e.axesSpec.length === 0))
|
|
2070
2067
|
return {
|
|
2071
2068
|
id: t,
|
|
@@ -2080,13 +2077,13 @@ function Nn(t, e, n, r) {
|
|
|
2080
2077
|
"pl7.app/discreteValues": "[1]"
|
|
2081
2078
|
}
|
|
2082
2079
|
},
|
|
2083
|
-
data: e.selectedKeys.filter((i) => !i.some((s) =>
|
|
2080
|
+
data: e.selectedKeys.filter((i) => !i.some((s) => at(s))).map((i) => ({ key: i, val: 1 }))
|
|
2084
2081
|
};
|
|
2085
2082
|
}
|
|
2086
|
-
function
|
|
2087
|
-
return t ===
|
|
2083
|
+
function jn(t) {
|
|
2084
|
+
return t === lt ? (console.error("Axis value can never be N/A"), "") : t;
|
|
2088
2085
|
}
|
|
2089
|
-
class
|
|
2086
|
+
class $n {
|
|
2090
2087
|
constructor(e) {
|
|
2091
2088
|
this.handle = e;
|
|
2092
2089
|
}
|
|
@@ -2106,52 +2103,52 @@ class Un {
|
|
|
2106
2103
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2107
2104
|
}
|
|
2108
2105
|
}
|
|
2109
|
-
function
|
|
2110
|
-
return
|
|
2106
|
+
function Gt(t) {
|
|
2107
|
+
return ke({
|
|
2111
2108
|
__isRef: !0,
|
|
2112
2109
|
blockId: ie(t, "blockId"),
|
|
2113
2110
|
name: ie(t, "name")
|
|
2114
2111
|
});
|
|
2115
2112
|
}
|
|
2116
|
-
function
|
|
2117
|
-
return
|
|
2118
|
-
ref:
|
|
2113
|
+
function Nn(t) {
|
|
2114
|
+
return ke({
|
|
2115
|
+
ref: Gt(ie(t, "ref")),
|
|
2119
2116
|
label: ie(t, "label")
|
|
2120
2117
|
});
|
|
2121
2118
|
}
|
|
2122
|
-
const
|
|
2119
|
+
const Jn = {
|
|
2123
2120
|
sdkVersion: Y
|
|
2124
2121
|
};
|
|
2125
|
-
function
|
|
2122
|
+
function Ht() {
|
|
2126
2123
|
return Re({ sdkVersion: Y });
|
|
2127
2124
|
}
|
|
2128
|
-
function
|
|
2125
|
+
function Mn(t) {
|
|
2129
2126
|
try {
|
|
2130
|
-
return
|
|
2127
|
+
return Ht();
|
|
2131
2128
|
} catch {
|
|
2132
2129
|
return t;
|
|
2133
2130
|
}
|
|
2134
2131
|
}
|
|
2135
|
-
function
|
|
2132
|
+
function Un(t) {
|
|
2136
2133
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2137
2134
|
return globalThis.getEnvironmentValue(t);
|
|
2138
2135
|
}
|
|
2139
2136
|
export {
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2137
|
+
en as Args,
|
|
2138
|
+
L as BlockModel,
|
|
2139
|
+
Jn as CurrentSdkInfo,
|
|
2140
|
+
_ as FutureRef,
|
|
2141
|
+
Nt as IS_VIRTUAL_COLUMN,
|
|
2142
|
+
tn as It,
|
|
2143
|
+
Tn as JsRenderInternal,
|
|
2144
|
+
Ie as LABEL_ANNOTATION,
|
|
2145
|
+
Jt as LINKER_COLUMN_ANNOTATION,
|
|
2146
|
+
nn as MainOutputs,
|
|
2147
|
+
ut as OutputError,
|
|
2148
|
+
mt as PAnnotationLabel,
|
|
2149
|
+
yt as PAnnotationTrace,
|
|
2150
|
+
le as PColumnCollection,
|
|
2151
|
+
$n as PFrameImpl,
|
|
2155
2152
|
B as RT_BINARY_PARTITIONED,
|
|
2156
2153
|
z as RT_BINARY_SUPER_PARTITIONED,
|
|
2157
2154
|
q as RT_JSON_PARTITIONED,
|
|
@@ -2159,75 +2156,74 @@ export {
|
|
|
2159
2156
|
se as RT_RESOURCE_MAP,
|
|
2160
2157
|
oe as RT_RESOURCE_MAP_PARTITIONED,
|
|
2161
2158
|
te as RenderCtx,
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2159
|
+
Rt as ResultPool,
|
|
2160
|
+
rn as StagingOutputs,
|
|
2161
|
+
bt as Trace,
|
|
2162
|
+
vt as TraceEntry,
|
|
2163
|
+
E as TreeNodeAccessor,
|
|
2164
|
+
sn as UiState,
|
|
2165
|
+
Me as allColumnsComputed,
|
|
2166
|
+
pn as and,
|
|
2167
|
+
St as convertOrParsePColumnData,
|
|
2168
|
+
Fn as createPFrameForGraphs,
|
|
2169
|
+
kn as createPlDataTable,
|
|
2170
|
+
Dn as createPlDataTableSheet,
|
|
2171
|
+
Rn as createPlDataTableV2,
|
|
2172
|
+
Vn as createRowSelectionColumn,
|
|
2176
2173
|
Ve as deriveLabels,
|
|
2177
|
-
|
|
2178
|
-
Bt as
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2174
|
+
pe as downgradeCfgOrLambda,
|
|
2175
|
+
Bt as enrichCompatible,
|
|
2176
|
+
xn as extractArchiveAndGetURL,
|
|
2177
|
+
En as extractConfig,
|
|
2178
|
+
_t as filterDataInfoEntries,
|
|
2179
|
+
un as flatten,
|
|
2180
|
+
Nn as fromPlOption,
|
|
2181
|
+
Gt as fromPlRef,
|
|
2182
|
+
Ne as getAllLabelColumns,
|
|
2183
|
+
Ut as getAvailableWithLinkersAxes,
|
|
2184
|
+
yn as getBlobContent,
|
|
2185
|
+
bn as getBlobContentAsJson,
|
|
2186
|
+
vn as getBlobContentAsString,
|
|
2187
|
+
wn as getDownloadedBlobContent,
|
|
2188
|
+
Un as getEnvironmentValue,
|
|
2192
2189
|
Q as getFromCfg,
|
|
2193
2190
|
re as getImmediate,
|
|
2194
|
-
|
|
2191
|
+
Cn as getImportProgress,
|
|
2195
2192
|
ie as getJsonField,
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
Je as hasPathWithLinkerColumns,
|
|
2193
|
+
Pn as getLastLogs,
|
|
2194
|
+
Mt as getLinkerColumnsMap,
|
|
2195
|
+
In as getLogHandle,
|
|
2196
|
+
Je as getMatchingLabelColumns,
|
|
2197
|
+
An as getOnDemandBlobContent,
|
|
2198
|
+
xt as getPartitionKeysList,
|
|
2199
|
+
Mn as getPlatformaOrDefault,
|
|
2200
|
+
Sn as getProgressLog,
|
|
2201
|
+
_n as getProgressLogWithInfo,
|
|
2202
|
+
Ht as getRawPlatformaInstance,
|
|
2203
|
+
hn as getResourceField,
|
|
2204
|
+
gn as getResourceValueAsJson,
|
|
2205
|
+
Pt as getUniquePartitionKeys,
|
|
2210
2206
|
he as ifDef,
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2207
|
+
Ft as isColumnHidden,
|
|
2208
|
+
Kt as isColumnOptional,
|
|
2209
|
+
Dt as isConfigLambda,
|
|
2210
|
+
cn as isEmpty,
|
|
2211
|
+
ve as isLabelColumn,
|
|
2216
2212
|
$t as isLinkerColumn,
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2213
|
+
Zt as isolate,
|
|
2214
|
+
on as makeArray,
|
|
2215
|
+
ke as makeObject,
|
|
2216
|
+
ln as mapArrayValues,
|
|
2217
|
+
jn as mapPTableValueToAxisKey,
|
|
2218
|
+
an as mapRecordValues,
|
|
2219
|
+
mn as mapResourceFields,
|
|
2220
|
+
dn as not,
|
|
2221
|
+
fn as or,
|
|
2226
2222
|
ye as parsePColumnData,
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2223
|
+
Ln as parseResourceMap,
|
|
2224
|
+
ct as readOutput,
|
|
2225
|
+
Kn as stringifyPTableColumnId,
|
|
2226
|
+
On as stringifyPTableColumnSpec,
|
|
2227
|
+
Qt as wrapOutputs
|
|
2232
2228
|
};
|
|
2233
2229
|
//# sourceMappingURL=index.mjs.map
|