@platforma-sdk/model 1.30.24 → 1.30.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PlDataTable.d.ts +12 -5
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +13 -0
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +1 -0
- package/dist/components/PlSelectionModel.d.ts +18 -0
- package/dist/components/PlSelectionModel.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +713 -661
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +2 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/util/column_collection.d.ts +3 -1
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/render/util/label.d.ts +2 -0
- package/dist/render/util/label.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/PlDataTable.ts +32 -11
- package/src/components/PlMultiSequenceAlignment.ts +71 -0
- package/src/components/PlSelectionModel.ts +27 -0
- package/src/components/index.ts +3 -1
- package/src/render/api.ts +2 -0
- package/src/render/util/column_collection.ts +18 -1
- package/src/render/util/label.test.ts +78 -0
- package/src/render/util/label.ts +8 -1
package/dist/index.mjs
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var Ye = (t, e, n) => e in t ? ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var F = (t, e, n) => Ye(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as ye, mapPObjectData as ve, isDataInfoEntries as Le, isDataInfo as be, dataInfoToEntries as Xe, selectorsToPredicate as X, resolveAnchors as we, deriveNativeId as Qe, isPColumnSpec as ne, isPartitionedDataInfoEntries as Ze, getAxisId as R, entriesToDataInfo as et, canonicalizeAxisId as tt, withEnrichments as Ae, AnchoredIdDeriver as xe, isPlRef as nt, mapValueInVOE as rt, ensurePColumn as it, extractAllColumns as st, mapPTableDef as ot, mapDataInfo as at, canonicalizeJson as M, getPColumnSpecId as Pe, matchAxisId as K, getColumnIdAndSpec as Ee, parseJson as lt, isPTableAbsent as ut, PTableNA as ct } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
6
|
+
import De from "canonicalize";
|
|
7
|
+
import { z as U } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class pt extends Error {
|
|
10
10
|
constructor(e, n) {
|
|
11
11
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (!t.ok) throw new
|
|
14
|
+
function dt(t) {
|
|
15
|
+
if (!t.ok) throw new pt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Xt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return dt(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ?
|
|
25
|
+
function C(t) {
|
|
26
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? re(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Q(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Qt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
37
|
+
const Zt = Q("$args"), en = Q("$it"), tn = Q("$prod"), nn = Q("$staging"), rn = Q("$ui");
|
|
38
|
+
function re(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Fe(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 sn(...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
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
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 on(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function en(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function an(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,54 +77,54 @@ function tn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ln(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function un(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function cn(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 dn(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 fn(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 hn() {
|
|
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 gn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,120 +132,120 @@ function cn(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function mn(t) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
|
-
source:
|
|
138
|
+
source: C(t)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function yn(t) {
|
|
142
142
|
return {
|
|
143
143
|
type: "GetBlobContentAsString",
|
|
144
|
-
source:
|
|
144
|
+
source: C(t)
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function vn() {
|
|
148
148
|
return function(t) {
|
|
149
149
|
return {
|
|
150
150
|
type: "GetBlobContentAsJson",
|
|
151
|
-
source:
|
|
151
|
+
source: C(t)
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function bn(t) {
|
|
156
156
|
return {
|
|
157
157
|
type: "GetDownloadedBlobContent",
|
|
158
|
-
source:
|
|
158
|
+
source: C(t)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function wn(t) {
|
|
162
162
|
return {
|
|
163
163
|
type: "GetOnDemandBlobContent",
|
|
164
|
-
source:
|
|
164
|
+
source: C(t)
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function An(t, e) {
|
|
168
168
|
return {
|
|
169
169
|
type: "ExtractArchiveAndGetURL",
|
|
170
170
|
format: e,
|
|
171
|
-
source:
|
|
171
|
+
source: C(t)
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function xn(t) {
|
|
175
175
|
return {
|
|
176
176
|
type: "GetImportProgress",
|
|
177
|
-
source:
|
|
177
|
+
source: C(t)
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Pn(t, e) {
|
|
181
181
|
return {
|
|
182
182
|
type: "GetLastLogs",
|
|
183
|
-
source:
|
|
183
|
+
source: C(t),
|
|
184
184
|
lines: e
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Cn(t, e) {
|
|
188
188
|
return {
|
|
189
189
|
type: "GetProgressLog",
|
|
190
|
-
source:
|
|
190
|
+
source: C(t),
|
|
191
191
|
patternToSearch: e
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Sn(t, e) {
|
|
195
195
|
return {
|
|
196
196
|
type: "GetProgressLogWithInfo",
|
|
197
|
-
source:
|
|
197
|
+
source: C(t),
|
|
198
198
|
patternToSearch: e
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function _n(t) {
|
|
202
202
|
return {
|
|
203
203
|
type: "GetLogHandle",
|
|
204
|
-
source:
|
|
204
|
+
source: C(t)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function ft() {
|
|
208
208
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Re(t) {
|
|
211
211
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
212
212
|
return globalThis.getPlatforma(t);
|
|
213
213
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
214
214
|
throw new Error("Can't get platforma instance.");
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function ht() {
|
|
217
217
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function f() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
throw new Error("Not in config rendering context");
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const n =
|
|
223
|
+
function H(t, e) {
|
|
224
|
+
const n = ht();
|
|
225
225
|
if (n === void 0) return !1;
|
|
226
226
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
227
|
return n.callbackRegistry[t] = e, !0;
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
231
|
-
t in
|
|
232
|
-
for (const r of
|
|
229
|
+
const ue = /* @__PURE__ */ new Map();
|
|
230
|
+
function gt(t, e) {
|
|
231
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
|
|
232
|
+
for (const r of ue.get(t))
|
|
233
233
|
r(n);
|
|
234
|
-
},
|
|
234
|
+
}, ue.set(t, [])), ue.get(t).push(e);
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class I {
|
|
237
237
|
constructor(e, n = (r) => r) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
this.handle = e, this.postProcess = n,
|
|
238
|
+
F(this, "isResolved", !1);
|
|
239
|
+
F(this, "resolvedValue");
|
|
240
|
+
this.handle = e, this.postProcess = n, gt(e, (r) => {
|
|
241
241
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
map(e) {
|
|
245
|
-
return new
|
|
245
|
+
return new I(this.handle, (n) => e(this.postProcess(n)));
|
|
246
246
|
}
|
|
247
247
|
mapDefined(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new I(this.handle, (n) => {
|
|
249
249
|
const r = this.postProcess(n);
|
|
250
250
|
return r ? e(r) : void 0;
|
|
251
251
|
});
|
|
@@ -254,10 +254,10 @@ class _ {
|
|
|
254
254
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function de(t, e) {
|
|
258
258
|
return t === void 0 ? void 0 : e(t);
|
|
259
259
|
}
|
|
260
|
-
class
|
|
260
|
+
class E {
|
|
261
261
|
constructor(e, n) {
|
|
262
262
|
this.handle = e, this.resolvePath = n;
|
|
263
263
|
}
|
|
@@ -296,47 +296,47 @@ class L {
|
|
|
296
296
|
...this.resolvePath,
|
|
297
297
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
298
298
|
];
|
|
299
|
-
return
|
|
300
|
-
|
|
301
|
-
(i) => new
|
|
299
|
+
return de(
|
|
300
|
+
f().resolveWithCommon(this.handle, e, ...n),
|
|
301
|
+
(i) => new E(i, r)
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
get resourceType() {
|
|
305
|
-
return
|
|
305
|
+
return f().getResourceType(this.handle);
|
|
306
306
|
}
|
|
307
307
|
getInputsLocked() {
|
|
308
|
-
return
|
|
308
|
+
return f().getInputsLocked(this.handle);
|
|
309
309
|
}
|
|
310
310
|
getOutputsLocked() {
|
|
311
|
-
return
|
|
311
|
+
return f().getOutputsLocked(this.handle);
|
|
312
312
|
}
|
|
313
313
|
getIsReadyOrError() {
|
|
314
|
-
return
|
|
314
|
+
return f().getIsReadyOrError(this.handle);
|
|
315
315
|
}
|
|
316
316
|
getIsFinal() {
|
|
317
|
-
return
|
|
317
|
+
return f().getIsFinal(this.handle);
|
|
318
318
|
}
|
|
319
319
|
getError() {
|
|
320
320
|
const e = [...this.resolvePath, "error"];
|
|
321
|
-
return
|
|
322
|
-
|
|
323
|
-
(n) => new
|
|
321
|
+
return de(
|
|
322
|
+
f().getError(this.handle),
|
|
323
|
+
(n) => new E(n, e)
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
326
|
listInputFields() {
|
|
327
|
-
return
|
|
327
|
+
return f().listInputFields(this.handle);
|
|
328
328
|
}
|
|
329
329
|
listOutputFields() {
|
|
330
|
-
return
|
|
330
|
+
return f().listOutputFields(this.handle);
|
|
331
331
|
}
|
|
332
332
|
listDynamicFields() {
|
|
333
|
-
return
|
|
333
|
+
return f().listDynamicFields(this.handle);
|
|
334
334
|
}
|
|
335
335
|
getKeyValueBase64(e) {
|
|
336
|
-
return
|
|
336
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
337
337
|
}
|
|
338
338
|
getKeyValueAsString(e) {
|
|
339
|
-
return
|
|
339
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
340
340
|
}
|
|
341
341
|
getKeyValueAsJson(e) {
|
|
342
342
|
const n = this.getKeyValueAsString(e);
|
|
@@ -344,10 +344,10 @@ class L {
|
|
|
344
344
|
return JSON.parse(n);
|
|
345
345
|
}
|
|
346
346
|
getDataBase64() {
|
|
347
|
-
return
|
|
347
|
+
return f().getDataBase64(this.handle);
|
|
348
348
|
}
|
|
349
349
|
getDataAsString() {
|
|
350
|
-
return
|
|
350
|
+
return f().getDataAsString(this.handle);
|
|
351
351
|
}
|
|
352
352
|
getDataAsJson() {
|
|
353
353
|
const e = this.getDataAsString();
|
|
@@ -360,7 +360,7 @@ class L {
|
|
|
360
360
|
getPColumns(e = !1, n = "") {
|
|
361
361
|
const r = this.parsePObjectCollection(e, n);
|
|
362
362
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
363
|
-
if (!
|
|
363
|
+
if (!ye(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
364
364
|
return s;
|
|
365
365
|
});
|
|
366
366
|
}
|
|
@@ -368,7 +368,7 @@ class L {
|
|
|
368
368
|
*
|
|
369
369
|
*/
|
|
370
370
|
parsePObjectCollection(e = !1, n = "") {
|
|
371
|
-
const r =
|
|
371
|
+
const r = f().parsePObjectCollection(
|
|
372
372
|
this.handle,
|
|
373
373
|
e,
|
|
374
374
|
n,
|
|
@@ -378,19 +378,19 @@ class L {
|
|
|
378
378
|
const i = {};
|
|
379
379
|
for (const [s, o] of Object.entries(r)) {
|
|
380
380
|
const a = [...this.resolvePath, s];
|
|
381
|
-
i[s] =
|
|
381
|
+
i[s] = ve(o, (l) => new E(l, a));
|
|
382
382
|
}
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
385
|
getFileContentAsBase64() {
|
|
386
|
-
return new
|
|
386
|
+
return new I(f().getBlobContentAsBase64(this.handle));
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsString() {
|
|
389
|
-
return new
|
|
389
|
+
return new I(f().getBlobContentAsString(this.handle));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsJson() {
|
|
392
|
-
return new
|
|
393
|
-
|
|
392
|
+
return new I(
|
|
393
|
+
f().getBlobContentAsString(this.handle)
|
|
394
394
|
).mapDefined((e) => JSON.parse(e));
|
|
395
395
|
}
|
|
396
396
|
/**
|
|
@@ -409,7 +409,7 @@ class L {
|
|
|
409
409
|
* @returns downloaded file handle
|
|
410
410
|
*/
|
|
411
411
|
getFileHandle() {
|
|
412
|
-
return new
|
|
412
|
+
return new I(f().getDownloadedBlobContentHandle(this.handle));
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @deprecated use getFileHandle
|
|
@@ -421,7 +421,7 @@ class L {
|
|
|
421
421
|
* @returns downloaded file handle
|
|
422
422
|
*/
|
|
423
423
|
getRemoteFileHandle() {
|
|
424
|
-
return new
|
|
424
|
+
return new I(f().getOnDemandBlobContentHandle(this.handle));
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @deprecated use getRemoteFileHandle
|
|
@@ -433,22 +433,22 @@ class L {
|
|
|
433
433
|
* @returns the url to the extracted folder
|
|
434
434
|
*/
|
|
435
435
|
extractArchiveAndGetURL(e) {
|
|
436
|
-
return new
|
|
436
|
+
return new I(f().extractArchiveAndGetURL(this.handle, e));
|
|
437
437
|
}
|
|
438
438
|
getImportProgress() {
|
|
439
|
-
return new
|
|
439
|
+
return new I(f().getImportProgress(this.handle));
|
|
440
440
|
}
|
|
441
441
|
getLastLogs(e) {
|
|
442
|
-
return new
|
|
442
|
+
return new I(f().getLastLogs(this.handle, e));
|
|
443
443
|
}
|
|
444
444
|
getProgressLog(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new I(f().getProgressLog(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLogWithInfo(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new I(f().getProgressLogWithInfo(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getLogHandle() {
|
|
451
|
-
return new
|
|
451
|
+
return new I(f().getLogHandle(this.handle));
|
|
452
452
|
}
|
|
453
453
|
allFieldsResolved(e = "Input") {
|
|
454
454
|
switch (e) {
|
|
@@ -477,119 +477,119 @@ class L {
|
|
|
477
477
|
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, d]) => o(u, d));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Oe = "staging", ke = "main", mt = {
|
|
481
481
|
explicitColumnsSupport: !0,
|
|
482
482
|
inlineColumnsSupport: !0,
|
|
483
483
|
activeArgs: !0
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function je(t) {
|
|
486
486
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function fe(t, e, n) {
|
|
489
489
|
if (e.has(n)) return;
|
|
490
490
|
if (e.add(n), typeof n === "object")
|
|
491
|
-
if (
|
|
491
|
+
if (je(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
492
492
|
else if (Array.isArray(n))
|
|
493
|
-
for (const i of n)
|
|
493
|
+
for (const i of n) fe(t, e, i);
|
|
494
494
|
else
|
|
495
495
|
for (const [, i] of Object.entries(n))
|
|
496
|
-
i !== n &&
|
|
496
|
+
i !== n && fe(t, e, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function yt(t) {
|
|
499
499
|
const e = /* @__PURE__ */ new Set();
|
|
500
|
-
return
|
|
500
|
+
return fe(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
503
|
__proto__: null,
|
|
504
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
505
|
-
MainAccessorName:
|
|
506
|
-
StagingAccessorName:
|
|
507
|
-
getAllFutureAwaits:
|
|
508
|
-
isFutureAwait:
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
510
|
-
type:
|
|
511
|
-
importance:
|
|
512
|
-
id:
|
|
513
|
-
label:
|
|
514
|
-
}),
|
|
515
|
-
function
|
|
516
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(),
|
|
517
|
-
var
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
"spec" in
|
|
521
|
-
const p = (
|
|
522
|
-
...
|
|
523
|
-
...
|
|
524
|
-
...
|
|
504
|
+
GlobalCfgRenderCtxFeatureFlags: mt,
|
|
505
|
+
MainAccessorName: ke,
|
|
506
|
+
StagingAccessorName: Oe,
|
|
507
|
+
getAllFutureAwaits: yt,
|
|
508
|
+
isFutureAwait: je
|
|
509
|
+
}, Symbol.toStringTag, { value: "Module" })), vt = "pl7.app/label", bt = "pl7.app/trace", wt = U.object({
|
|
510
|
+
type: U.string(),
|
|
511
|
+
importance: U.number().optional(),
|
|
512
|
+
id: U.string().optional(),
|
|
513
|
+
label: U.string()
|
|
514
|
+
}), At = U.array(wt), xt = 1e-3, Pt = "__LABEL__", Ce = "__LABEL__@1";
|
|
515
|
+
function Ve(t, e, n = {}) {
|
|
516
|
+
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((g) => {
|
|
517
|
+
var S, O;
|
|
518
|
+
const m = e(g);
|
|
519
|
+
let c, v, b;
|
|
520
|
+
"spec" in m && typeof m.spec == "object" ? (c = m.spec, v = m.prefixTrace, b = m.suffixTrace) : c = m;
|
|
521
|
+
const p = (S = c.annotations) == null ? void 0 : S[vt], A = (O = c.annotations) == null ? void 0 : O[bt], x = (A ? At.safeParse(JSON.parse(A)).data : void 0) ?? [], y = [
|
|
522
|
+
...v ?? [],
|
|
523
|
+
...x,
|
|
524
|
+
...b ?? []
|
|
525
525
|
];
|
|
526
526
|
if (p !== void 0) {
|
|
527
|
-
const
|
|
528
|
-
n.addLabelAsSuffix ?
|
|
527
|
+
const D = { label: p, type: Pt, importance: -2 };
|
|
528
|
+
n.addLabelAsSuffix ? y.push(D) : y.splice(0, 0, D);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
for (let
|
|
532
|
-
const { type:
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
530
|
+
const P = [], T = /* @__PURE__ */ new Map();
|
|
531
|
+
for (let D = y.length - 1; D >= 0; --D) {
|
|
532
|
+
const { type: W } = y[D], j = y[D].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
|
|
533
|
+
T.set(W, $);
|
|
534
|
+
const k = `${W}@${$}`;
|
|
535
|
+
s.set(k, (s.get(k) ?? 0) + 1), r.set(
|
|
536
|
+
k,
|
|
537
537
|
Math.max(
|
|
538
|
-
r.get(
|
|
539
|
-
|
|
538
|
+
r.get(k) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
+
j - (y.length - D) * xt
|
|
540
540
|
)
|
|
541
|
-
),
|
|
541
|
+
), P.push({ ...y[D], fullType: k, occurrenceIndex: $ });
|
|
542
542
|
}
|
|
543
|
-
return
|
|
544
|
-
value:
|
|
545
|
-
spec:
|
|
543
|
+
return P.reverse(), {
|
|
544
|
+
value: g,
|
|
545
|
+
spec: c,
|
|
546
546
|
label: p,
|
|
547
|
-
fullTrace:
|
|
547
|
+
fullTrace: P
|
|
548
548
|
};
|
|
549
|
-
}),
|
|
550
|
-
|
|
551
|
-
for (const [
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
const
|
|
555
|
-
for (let
|
|
556
|
-
const
|
|
549
|
+
}), a = [], l = [], u = [...r];
|
|
550
|
+
u.sort(([, g], [, m]) => m - g);
|
|
551
|
+
for (const [g] of u)
|
|
552
|
+
g.endsWith("@1") || s.get(g) === t.length ? a.push(g) : l.push(g);
|
|
553
|
+
const d = (g, m = !1) => {
|
|
554
|
+
const c = [];
|
|
555
|
+
for (let v = 0; v < o.length; v++) {
|
|
556
|
+
const b = o[v], p = b.fullTrace.filter((y) => g.has(y.fullType) || i && i.has(y.type));
|
|
557
557
|
if (p.length === 0)
|
|
558
|
-
if (
|
|
559
|
-
|
|
558
|
+
if (m)
|
|
559
|
+
c.push({
|
|
560
560
|
label: "Unlabeled",
|
|
561
|
-
value:
|
|
561
|
+
value: b.value
|
|
562
562
|
});
|
|
563
563
|
else return;
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
label:
|
|
567
|
-
value:
|
|
564
|
+
const A = p.map((y) => y.label), x = n.separator ?? " / ";
|
|
565
|
+
c.push({
|
|
566
|
+
label: A.join(x),
|
|
567
|
+
value: b.value
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return c;
|
|
571
571
|
};
|
|
572
|
-
if (
|
|
573
|
-
if (
|
|
574
|
-
return
|
|
575
|
-
}
|
|
576
|
-
let
|
|
577
|
-
for (;
|
|
578
|
-
const
|
|
579
|
-
n.includeNativeLabel &&
|
|
580
|
-
for (let
|
|
581
|
-
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
return
|
|
587
|
-
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
572
|
+
if (a.length === 0) {
|
|
573
|
+
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
574
|
+
return d(new Set(Ce), !0);
|
|
575
|
+
}
|
|
576
|
+
let h = 0, w = -1;
|
|
577
|
+
for (; h < a.length; ) {
|
|
578
|
+
const g = /* @__PURE__ */ new Set();
|
|
579
|
+
n.includeNativeLabel && g.add(Ce);
|
|
580
|
+
for (let c = 0; c < h; ++c) g.add(a[c]);
|
|
581
|
+
w >= 0 && g.add(a[w]);
|
|
582
|
+
const m = d(g);
|
|
583
|
+
if (m !== void 0 && new Set(m.map((c) => c.label)).size === t.length) return m;
|
|
584
|
+
w++, w >= a.length && (h++, w = h);
|
|
585
|
+
}
|
|
586
|
+
return d(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
587
|
+
}
|
|
588
|
+
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ke = Z + "Partitioned/", ae = Ke + "JsonPartitioned", z = Ke + "BinaryPartitioned";
|
|
589
|
+
function $e(t, e, n, r = [], i) {
|
|
590
590
|
if (t === void 0) return !1;
|
|
591
591
|
switch (t.resourceType.name) {
|
|
592
|
-
case
|
|
592
|
+
case se: {
|
|
593
593
|
let s = t.getInputsLocked();
|
|
594
594
|
for (const o of t.listInputFields()) {
|
|
595
595
|
const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
|
|
@@ -597,13 +597,13 @@ function je(t, e, n, r = [], i) {
|
|
|
597
597
|
}
|
|
598
598
|
return s;
|
|
599
599
|
}
|
|
600
|
-
case
|
|
600
|
+
case oe: {
|
|
601
601
|
let s = t.getInputsLocked();
|
|
602
602
|
for (const o of t.listInputFields()) {
|
|
603
603
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
604
604
|
if (a === void 0) s = !1;
|
|
605
605
|
else {
|
|
606
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
606
|
+
const l = [...r, ...JSON.parse(o)], u = $e(
|
|
607
607
|
a,
|
|
608
608
|
e,
|
|
609
609
|
n,
|
|
@@ -619,55 +619,55 @@ function je(t, e, n, r = [], i) {
|
|
|
619
619
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Tn(t, e, n = !1) {
|
|
623
623
|
const r = [];
|
|
624
|
-
return { isComplete:
|
|
624
|
+
return { isComplete: $e(t, e, r, [], n), data: r };
|
|
625
625
|
}
|
|
626
|
-
const
|
|
626
|
+
const he = (t) => {
|
|
627
627
|
if (t.endsWith(".index"))
|
|
628
628
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
629
629
|
if (t.endsWith(".values"))
|
|
630
630
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
631
631
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
632
632
|
};
|
|
633
|
-
function
|
|
633
|
+
function Ct(t) {
|
|
634
634
|
if (!t) return;
|
|
635
635
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
636
636
|
let i = 0;
|
|
637
637
|
switch (e) {
|
|
638
|
-
case
|
|
638
|
+
case se:
|
|
639
639
|
i = n.keyLength;
|
|
640
640
|
break;
|
|
641
|
-
case
|
|
641
|
+
case oe:
|
|
642
642
|
i = n.partitionKeyLength + n.keyLength;
|
|
643
643
|
break;
|
|
644
|
-
case
|
|
645
|
-
case
|
|
644
|
+
case q:
|
|
645
|
+
case B:
|
|
646
646
|
i = n.partitionKeyLength;
|
|
647
647
|
break;
|
|
648
|
-
case
|
|
649
|
-
case
|
|
648
|
+
case z:
|
|
649
|
+
case ae:
|
|
650
650
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
651
651
|
break;
|
|
652
652
|
}
|
|
653
653
|
switch (e) {
|
|
654
|
-
case
|
|
655
|
-
case
|
|
656
|
-
case
|
|
654
|
+
case se:
|
|
655
|
+
case q:
|
|
656
|
+
case B:
|
|
657
657
|
for (let s of t.listInputFields()) {
|
|
658
|
-
e ===
|
|
658
|
+
e === B && (s = he(s).baseKey);
|
|
659
659
|
const o = [...JSON.parse(s)];
|
|
660
660
|
r.push(o);
|
|
661
661
|
}
|
|
662
662
|
break;
|
|
663
|
-
case
|
|
664
|
-
case
|
|
665
|
-
case
|
|
663
|
+
case oe:
|
|
664
|
+
case z:
|
|
665
|
+
case ae:
|
|
666
666
|
for (const s of t.listInputFields()) {
|
|
667
667
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
668
668
|
if (a !== void 0)
|
|
669
669
|
for (let l of a.listInputFields()) {
|
|
670
|
-
e ===
|
|
670
|
+
e === z && (l = he(l).baseKey);
|
|
671
671
|
const u = [...o, ...JSON.parse(l)];
|
|
672
672
|
r.push(u);
|
|
673
673
|
}
|
|
@@ -676,7 +676,7 @@ function vt(t) {
|
|
|
676
676
|
}
|
|
677
677
|
return { data: r, keyLength: i };
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function St(t) {
|
|
680
680
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
681
681
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
682
682
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -695,11 +695,11 @@ function bt(t) {
|
|
|
695
695
|
}
|
|
696
696
|
return r.map((i) => Array.from(i.values()));
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function _t(t) {
|
|
699
699
|
if (t === void 0) return;
|
|
700
|
-
if (
|
|
701
|
-
return
|
|
702
|
-
const e =
|
|
700
|
+
if (Le(t))
|
|
701
|
+
return St(t);
|
|
702
|
+
const e = Ct(t);
|
|
703
703
|
if (!e) return;
|
|
704
704
|
const { data: n, keyLength: r } = e, i = [];
|
|
705
705
|
for (let s = 0; s < r; ++s)
|
|
@@ -712,16 +712,16 @@ function wt(t) {
|
|
|
712
712
|
}
|
|
713
713
|
return i.map((s) => Array.from(s.values()));
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function ge(t, e = []) {
|
|
716
716
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
717
717
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
718
|
-
if (e.length > 0 && (n ===
|
|
718
|
+
if (e.length > 0 && (n === ae || n === z))
|
|
719
719
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
720
720
|
switch (n) {
|
|
721
|
-
case
|
|
722
|
-
case
|
|
721
|
+
case se:
|
|
722
|
+
case oe:
|
|
723
723
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
724
|
-
case
|
|
724
|
+
case q: {
|
|
725
725
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
726
726
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
727
727
|
const i = [];
|
|
@@ -737,12 +737,12 @@ function he(t, e = []) {
|
|
|
737
737
|
parts: i
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
case
|
|
740
|
+
case B: {
|
|
741
741
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
742
742
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
743
743
|
const i = [], s = /* @__PURE__ */ new Map();
|
|
744
744
|
for (const o of t.listInputFields()) {
|
|
745
|
-
const a =
|
|
745
|
+
const a = he(o), l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
746
746
|
if (l === void 0) return;
|
|
747
747
|
let u = s.get(a.baseKey);
|
|
748
748
|
u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
|
|
@@ -764,16 +764,16 @@ function he(t, e = []) {
|
|
|
764
764
|
parts: i
|
|
765
765
|
};
|
|
766
766
|
}
|
|
767
|
-
case
|
|
767
|
+
case ae: {
|
|
768
768
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
769
769
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
770
770
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
771
771
|
for (const o of t.listInputFields()) {
|
|
772
772
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
773
773
|
if (a === void 0) return;
|
|
774
|
-
if (a.resourceType.name !==
|
|
775
|
-
throw new Error(`Expected ${
|
|
776
|
-
const l =
|
|
774
|
+
if (a.resourceType.name !== q)
|
|
775
|
+
throw new Error(`Expected ${q} inside ${n}, but got ${a.resourceType.name}`);
|
|
776
|
+
const l = ge(a, JSON.parse(o));
|
|
777
777
|
if (l === void 0) return;
|
|
778
778
|
if (l.type !== "JsonPartitioned")
|
|
779
779
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -785,16 +785,16 @@ function he(t, e = []) {
|
|
|
785
785
|
parts: s
|
|
786
786
|
};
|
|
787
787
|
}
|
|
788
|
-
case
|
|
788
|
+
case z: {
|
|
789
789
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
790
790
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
791
791
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
792
792
|
for (const o of t.listInputFields()) {
|
|
793
793
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
794
794
|
if (a === void 0) return;
|
|
795
|
-
if (a.resourceType.name !==
|
|
796
|
-
throw new Error(`Expected ${
|
|
797
|
-
const l =
|
|
795
|
+
if (a.resourceType.name !== B)
|
|
796
|
+
throw new Error(`Expected ${B} inside ${n}, but got ${a.resourceType.name}`);
|
|
797
|
+
const l = ge(a, JSON.parse(o));
|
|
798
798
|
if (l === void 0) return;
|
|
799
799
|
if (l.type !== "BinaryPartitioned")
|
|
800
800
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -810,15 +810,15 @@ function he(t, e = []) {
|
|
|
810
810
|
throw new Error(`Unknown resource type: ${n}`);
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function It(t) {
|
|
814
814
|
if (t !== void 0) {
|
|
815
|
-
if (
|
|
816
|
-
if (
|
|
817
|
-
if (t instanceof
|
|
815
|
+
if (Le(t)) return t;
|
|
816
|
+
if (be(t)) return Xe(t);
|
|
817
|
+
if (t instanceof E) return ge(t);
|
|
818
818
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function Tt(t, e) {
|
|
822
822
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
823
823
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
824
824
|
const { partitionKeyLength: s } = t;
|
|
@@ -878,39 +878,39 @@ function xt(t, e) {
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
class
|
|
881
|
+
class Lt {
|
|
882
882
|
constructor(e) {
|
|
883
883
|
this.columns = e;
|
|
884
884
|
}
|
|
885
885
|
selectColumns(e) {
|
|
886
|
-
const n = typeof e == "function" ? e :
|
|
886
|
+
const n = typeof e == "function" ? e : X(e);
|
|
887
887
|
return this.columns.filter((r) => n(r.spec));
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Et(t) {
|
|
891
891
|
if (t)
|
|
892
892
|
return t.map((e) => ({
|
|
893
|
-
type: `split:${
|
|
893
|
+
type: `split:${tt(e.axisId)}`,
|
|
894
894
|
label: e.label,
|
|
895
895
|
importance: 1e6
|
|
896
896
|
// High importance for split filters in labels
|
|
897
897
|
}));
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function Dt(t) {
|
|
900
900
|
if (t)
|
|
901
901
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Ft(t, e) {
|
|
904
904
|
if (!e || e.length === 0) return t;
|
|
905
905
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
906
|
-
return
|
|
906
|
+
return De({ id: t, axisFilters: n });
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function Se(t) {
|
|
909
909
|
if (!t || typeof t != "object") return !1;
|
|
910
910
|
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);
|
|
911
911
|
return !!e.domainAnchor || n || r;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Rt(t) {
|
|
914
914
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
915
915
|
return [];
|
|
916
916
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -918,11 +918,11 @@ function Lt(t) {
|
|
|
918
918
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
919
919
|
return e.sort((n, r) => n - r), e;
|
|
920
920
|
}
|
|
921
|
-
class
|
|
921
|
+
class me {
|
|
922
922
|
constructor() {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
923
|
+
F(this, "defaultProviderStore", []);
|
|
924
|
+
F(this, "providers", [new Lt(this.defaultProviderStore)]);
|
|
925
|
+
F(this, "axisLabelProviders", []);
|
|
926
926
|
}
|
|
927
927
|
addColumnProvider(e) {
|
|
928
928
|
return this.providers.push(e), this;
|
|
@@ -944,119 +944,133 @@ class ge {
|
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
getUniversalEntries(e, n) {
|
|
947
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1 } = n ?? {},
|
|
947
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1, exclude: a } = n ?? {}, l = {
|
|
948
948
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
949
949
|
...i ?? {}
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
|
|
950
|
+
};
|
|
951
|
+
let u = () => !1;
|
|
952
|
+
if (a) {
|
|
953
|
+
const c = (Array.isArray(a) ? a : [a]).map((v) => {
|
|
954
|
+
if (Se(v)) {
|
|
955
|
+
if (!r)
|
|
956
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
957
|
+
return X(we(r.anchors, v, n));
|
|
958
|
+
} else
|
|
959
|
+
return X(v);
|
|
960
|
+
});
|
|
961
|
+
u = (v) => c.some((b) => b(v));
|
|
962
|
+
}
|
|
963
|
+
const d = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h = [], w = /* @__PURE__ */ new Set();
|
|
964
|
+
for (const c of d) {
|
|
965
|
+
const v = Se(c);
|
|
953
966
|
let b;
|
|
954
|
-
if (
|
|
967
|
+
if (v) {
|
|
955
968
|
if (!r)
|
|
956
969
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
957
|
-
b =
|
|
970
|
+
b = we(r.anchors, c, n);
|
|
958
971
|
} else
|
|
959
972
|
b = c;
|
|
960
|
-
const
|
|
961
|
-
for (const
|
|
962
|
-
const
|
|
963
|
-
for (const
|
|
964
|
-
if (
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
973
|
+
const p = /* @__PURE__ */ new Set(), A = [];
|
|
974
|
+
for (const P of this.providers) {
|
|
975
|
+
const T = P.selectColumns(b);
|
|
976
|
+
for (const S of T) {
|
|
977
|
+
if (u(S.spec)) continue;
|
|
978
|
+
if (p.has(S.id))
|
|
979
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${P.constructor.name}`);
|
|
980
|
+
const O = Qe(S.spec);
|
|
981
|
+
w.has(O) || (p.add(S.id), w.add(O), A.push(S));
|
|
968
982
|
}
|
|
969
983
|
}
|
|
970
|
-
if (
|
|
971
|
-
const
|
|
972
|
-
for (const
|
|
973
|
-
if (!
|
|
974
|
-
const
|
|
975
|
-
if (
|
|
976
|
-
const
|
|
977
|
-
if (!
|
|
984
|
+
if (A.length === 0) continue;
|
|
985
|
+
const x = Rt(c), y = x.length > 0;
|
|
986
|
+
for (const P of A) {
|
|
987
|
+
if (!ne(P.spec)) continue;
|
|
988
|
+
const T = P.spec;
|
|
989
|
+
if (y) {
|
|
990
|
+
const S = It(P.data);
|
|
991
|
+
if (!S) {
|
|
978
992
|
if (s) continue;
|
|
979
993
|
return;
|
|
980
994
|
}
|
|
981
|
-
if (!
|
|
982
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
983
|
-
const O =
|
|
984
|
-
if (
|
|
985
|
-
throw new Error(`Not enough partition keys (${
|
|
986
|
-
const
|
|
987
|
-
if (
|
|
988
|
-
if (
|
|
995
|
+
if (!Ze(S))
|
|
996
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${P.id}`);
|
|
997
|
+
const O = _t(S), D = x[x.length - 1];
|
|
998
|
+
if (D >= S.partitionKeyLength)
|
|
999
|
+
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D}) in column ${T.name}`);
|
|
1000
|
+
const W = x.map((_) => this.findLabels(R(T.axesSpec[_]))), j = [], $ = (_, G) => {
|
|
1001
|
+
if (G >= x.length) {
|
|
1002
|
+
if (j.push([..._]), j.length > 1e4)
|
|
989
1003
|
throw new Error("Too many key combinations, aborting.");
|
|
990
1004
|
return;
|
|
991
1005
|
}
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
994
|
-
throw new Error(`Axis index ${
|
|
995
|
-
const
|
|
996
|
-
if (!
|
|
997
|
-
|
|
1006
|
+
const V = x[G];
|
|
1007
|
+
if (V >= O.length)
|
|
1008
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${P.id}`);
|
|
1009
|
+
const J = O[V];
|
|
1010
|
+
if (!J || J.length === 0) {
|
|
1011
|
+
j.length = 0;
|
|
998
1012
|
return;
|
|
999
1013
|
}
|
|
1000
|
-
for (const
|
|
1001
|
-
|
|
1014
|
+
for (const ee of J)
|
|
1015
|
+
_.push(ee), $(_, G + 1), _.pop();
|
|
1002
1016
|
};
|
|
1003
|
-
if (
|
|
1017
|
+
if ($([], 0), j.length === 0)
|
|
1004
1018
|
continue;
|
|
1005
|
-
const
|
|
1006
|
-
for (let
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
for (const
|
|
1010
|
-
const
|
|
1011
|
-
const
|
|
1012
|
-
return { axisIdx:
|
|
1019
|
+
const k = [...T.axesSpec], We = x.map((_) => _);
|
|
1020
|
+
for (let _ = x.length - 1; _ >= 0; _--)
|
|
1021
|
+
k.splice(x[_], 1);
|
|
1022
|
+
const Ge = { ...T, axesSpec: k };
|
|
1023
|
+
for (const _ of j) {
|
|
1024
|
+
const G = _.map((V, J) => {
|
|
1025
|
+
const ee = We[J], He = R(T.axesSpec[ee]), le = W[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
1026
|
+
return { axisIdx: ee, axisId: He, value: V, label: qe };
|
|
1013
1027
|
});
|
|
1014
|
-
|
|
1028
|
+
h.push({
|
|
1015
1029
|
type: "split",
|
|
1016
|
-
originalColumn:
|
|
1017
|
-
spec:
|
|
1018
|
-
adjustedSpec:
|
|
1019
|
-
dataEntries:
|
|
1020
|
-
axisFilters:
|
|
1030
|
+
originalColumn: P,
|
|
1031
|
+
spec: T,
|
|
1032
|
+
adjustedSpec: Ge,
|
|
1033
|
+
dataEntries: S,
|
|
1034
|
+
axisFilters: G
|
|
1021
1035
|
});
|
|
1022
1036
|
}
|
|
1023
1037
|
} else
|
|
1024
|
-
|
|
1038
|
+
h.push({
|
|
1025
1039
|
type: "direct",
|
|
1026
|
-
originalColumn:
|
|
1027
|
-
spec:
|
|
1028
|
-
adjustedSpec:
|
|
1040
|
+
originalColumn: P,
|
|
1041
|
+
spec: T,
|
|
1042
|
+
adjustedSpec: T
|
|
1029
1043
|
});
|
|
1030
1044
|
}
|
|
1031
1045
|
}
|
|
1032
|
-
if (
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1046
|
+
if (h.length === 0) return [];
|
|
1047
|
+
const g = Ve(
|
|
1048
|
+
h,
|
|
1035
1049
|
(c) => ({
|
|
1036
1050
|
spec: c.spec,
|
|
1037
|
-
suffixTrace: c.type === "split" ?
|
|
1051
|
+
suffixTrace: c.type === "split" ? Et(c.axisFilters) : void 0
|
|
1038
1052
|
}),
|
|
1039
|
-
|
|
1040
|
-
),
|
|
1041
|
-
for (const { value: c, label:
|
|
1042
|
-
const { originalColumn: b, spec:
|
|
1043
|
-
let
|
|
1044
|
-
r ?
|
|
1045
|
-
let
|
|
1046
|
-
o && (
|
|
1047
|
-
...
|
|
1053
|
+
l
|
|
1054
|
+
), m = [];
|
|
1055
|
+
for (const { value: c, label: v } of g) {
|
|
1056
|
+
const { originalColumn: b, spec: p } = c, A = c.type === "split" ? c.axisFilters : void 0, x = Dt(A);
|
|
1057
|
+
let y;
|
|
1058
|
+
r ? y = r.deriveS(p, x) : y = Ft(b.id, x);
|
|
1059
|
+
let P = { ...c.adjustedSpec };
|
|
1060
|
+
o && (P = {
|
|
1061
|
+
...P,
|
|
1048
1062
|
annotations: {
|
|
1049
|
-
...
|
|
1050
|
-
"pl7.app/label":
|
|
1063
|
+
...P.annotations ?? {},
|
|
1064
|
+
"pl7.app/label": v
|
|
1051
1065
|
}
|
|
1052
|
-
}),
|
|
1053
|
-
id:
|
|
1054
|
-
spec:
|
|
1055
|
-
data: () => c.type === "split" ?
|
|
1056
|
-
label:
|
|
1066
|
+
}), m.push({
|
|
1067
|
+
id: y,
|
|
1068
|
+
spec: P,
|
|
1069
|
+
data: () => c.type === "split" ? et(Tt(c.dataEntries, x)) : c.originalColumn.data,
|
|
1070
|
+
label: v
|
|
1057
1071
|
});
|
|
1058
1072
|
}
|
|
1059
|
-
return
|
|
1073
|
+
return m;
|
|
1060
1074
|
}
|
|
1061
1075
|
getColumns(e, n) {
|
|
1062
1076
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1081,19 +1095,19 @@ class ge {
|
|
|
1081
1095
|
return i;
|
|
1082
1096
|
}
|
|
1083
1097
|
}
|
|
1084
|
-
function
|
|
1098
|
+
function ce(t, e) {
|
|
1085
1099
|
if (t === void 0) return e === void 0;
|
|
1086
1100
|
if (e === void 0) return !0;
|
|
1087
1101
|
for (const n in e)
|
|
1088
1102
|
if (t[n] !== e[n]) return !1;
|
|
1089
1103
|
return !0;
|
|
1090
1104
|
}
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1105
|
+
function _e(t) {
|
|
1106
|
+
return ve(t, (e) => e instanceof E ? e.handle : be(e) ? at(e, (n) => n.handle) : e);
|
|
1093
1107
|
}
|
|
1094
|
-
class
|
|
1108
|
+
class Ot {
|
|
1095
1109
|
constructor() {
|
|
1096
|
-
|
|
1110
|
+
F(this, "ctx", f());
|
|
1097
1111
|
}
|
|
1098
1112
|
/**
|
|
1099
1113
|
* @deprecated use getOptions()
|
|
@@ -1102,28 +1116,28 @@ class Tt {
|
|
|
1102
1116
|
return this.ctx.calculateOptions(e);
|
|
1103
1117
|
}
|
|
1104
1118
|
getOptions(e, n) {
|
|
1105
|
-
const r = typeof e == "function" ? e :
|
|
1119
|
+
const r = typeof e == "function" ? e : X(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1106
1120
|
let s = {}, o = !1;
|
|
1107
|
-
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" ?
|
|
1108
|
-
ref:
|
|
1121
|
+
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 }) => ({
|
|
1122
|
+
ref: Ae(a, o),
|
|
1109
1123
|
label: l
|
|
1110
1124
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1111
|
-
ref:
|
|
1125
|
+
ref: Ae(a, o),
|
|
1112
1126
|
label: s(l, a)
|
|
1113
1127
|
}));
|
|
1114
1128
|
}
|
|
1115
1129
|
resolveAnchorCtx(e) {
|
|
1116
|
-
if (e instanceof
|
|
1130
|
+
if (e instanceof xe) return e;
|
|
1117
1131
|
const n = {};
|
|
1118
1132
|
for (const [r, i] of Object.entries(e))
|
|
1119
|
-
if (
|
|
1133
|
+
if (nt(i)) {
|
|
1120
1134
|
const s = this.getPColumnSpecByRef(i);
|
|
1121
1135
|
if (!s)
|
|
1122
1136
|
return;
|
|
1123
1137
|
n[r] = s;
|
|
1124
1138
|
} else
|
|
1125
1139
|
n[r] = i;
|
|
1126
|
-
return new
|
|
1140
|
+
return new xe(n);
|
|
1127
1141
|
}
|
|
1128
1142
|
/**
|
|
1129
1143
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1136,7 +1150,7 @@ class Tt {
|
|
|
1136
1150
|
getAnchoredPColumns(e, n, r) {
|
|
1137
1151
|
const i = this.resolveAnchorCtx(e);
|
|
1138
1152
|
if (i)
|
|
1139
|
-
return new
|
|
1153
|
+
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n, {
|
|
1140
1154
|
...r,
|
|
1141
1155
|
anchorCtx: i
|
|
1142
1156
|
});
|
|
@@ -1173,7 +1187,7 @@ class Tt {
|
|
|
1173
1187
|
getCanonicalOptions(e, n, r) {
|
|
1174
1188
|
const i = this.resolveAnchorCtx(e);
|
|
1175
1189
|
if (!i) return;
|
|
1176
|
-
const s = new
|
|
1190
|
+
const s = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n, {
|
|
1177
1191
|
...r,
|
|
1178
1192
|
anchorCtx: i
|
|
1179
1193
|
});
|
|
@@ -1197,7 +1211,7 @@ class Tt {
|
|
|
1197
1211
|
ref: n.ref,
|
|
1198
1212
|
obj: {
|
|
1199
1213
|
...n.obj,
|
|
1200
|
-
data: new
|
|
1214
|
+
data: new E(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1201
1215
|
}
|
|
1202
1216
|
}))
|
|
1203
1217
|
};
|
|
@@ -1216,9 +1230,9 @@ class Tt {
|
|
|
1216
1230
|
ref: n.ref,
|
|
1217
1231
|
obj: {
|
|
1218
1232
|
...n.obj,
|
|
1219
|
-
data:
|
|
1233
|
+
data: rt(
|
|
1220
1234
|
n.obj.data,
|
|
1221
|
-
(r) => new
|
|
1235
|
+
(r) => new E(r, [n.ref.blockId, n.ref.name])
|
|
1222
1236
|
)
|
|
1223
1237
|
}
|
|
1224
1238
|
}))
|
|
@@ -1245,9 +1259,9 @@ class Tt {
|
|
|
1245
1259
|
)) == null ? void 0 : r.obj;
|
|
1246
1260
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1247
1261
|
if (n)
|
|
1248
|
-
return
|
|
1262
|
+
return ve(
|
|
1249
1263
|
n,
|
|
1250
|
-
(i) => new
|
|
1264
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
1251
1265
|
);
|
|
1252
1266
|
}
|
|
1253
1267
|
/**
|
|
@@ -1258,7 +1272,7 @@ class Tt {
|
|
|
1258
1272
|
getPColumnByRef(e) {
|
|
1259
1273
|
const n = this.getDataByRef(e);
|
|
1260
1274
|
if (n)
|
|
1261
|
-
return
|
|
1275
|
+
return it(n);
|
|
1262
1276
|
}
|
|
1263
1277
|
/**
|
|
1264
1278
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1268,7 +1282,7 @@ class Tt {
|
|
|
1268
1282
|
getPColumnSpecByRef(e) {
|
|
1269
1283
|
const n = this.getSpecByRef(e);
|
|
1270
1284
|
if (n) {
|
|
1271
|
-
if (!
|
|
1285
|
+
if (!ne(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
1272
1286
|
return n;
|
|
1273
1287
|
}
|
|
1274
1288
|
}
|
|
@@ -1287,13 +1301,13 @@ class Tt {
|
|
|
1287
1301
|
findDataWithCompatibleSpec(e) {
|
|
1288
1302
|
const n = [];
|
|
1289
1303
|
e: for (const r of this.getData().entries) {
|
|
1290
|
-
if (!
|
|
1304
|
+
if (!ne(r.obj.spec))
|
|
1291
1305
|
continue;
|
|
1292
1306
|
const i = r.obj.spec;
|
|
1293
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1307
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
|
|
1294
1308
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1295
1309
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1296
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
1310
|
+
if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
|
|
1297
1311
|
continue e;
|
|
1298
1312
|
}
|
|
1299
1313
|
n.push(r.obj);
|
|
@@ -1308,9 +1322,9 @@ class Tt {
|
|
|
1308
1322
|
findLabels(e) {
|
|
1309
1323
|
const n = this.getData();
|
|
1310
1324
|
for (const r of n.entries) {
|
|
1311
|
-
if (!
|
|
1325
|
+
if (!ye(r.obj)) continue;
|
|
1312
1326
|
const i = r.obj.spec;
|
|
1313
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1327
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
|
|
1314
1328
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1315
1329
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1316
1330
|
return Object.fromEntries(
|
|
@@ -1329,13 +1343,13 @@ class Tt {
|
|
|
1329
1343
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1330
1344
|
*/
|
|
1331
1345
|
selectColumns(e) {
|
|
1332
|
-
const n = typeof e == "function" ? e :
|
|
1333
|
-
return this.getSpecs().entries.filter(({ obj: i }) =>
|
|
1346
|
+
const n = typeof e == "function" ? e : X(e);
|
|
1347
|
+
return this.getSpecs().entries.filter(({ obj: i }) => ne(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
|
|
1334
1348
|
const o = s;
|
|
1335
1349
|
let a = null;
|
|
1336
1350
|
const l = this;
|
|
1337
1351
|
return {
|
|
1338
|
-
id:
|
|
1352
|
+
id: De(i),
|
|
1339
1353
|
spec: o,
|
|
1340
1354
|
get data() {
|
|
1341
1355
|
var u;
|
|
@@ -1360,15 +1374,15 @@ class Tt {
|
|
|
1360
1374
|
return r;
|
|
1361
1375
|
}
|
|
1362
1376
|
}
|
|
1363
|
-
class
|
|
1377
|
+
class te {
|
|
1364
1378
|
constructor() {
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1379
|
+
F(this, "ctx");
|
|
1380
|
+
F(this, "args");
|
|
1381
|
+
F(this, "uiState");
|
|
1368
1382
|
// lazy rendering because this feature is rarely used
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
this.ctx =
|
|
1383
|
+
F(this, "_activeArgsCache");
|
|
1384
|
+
F(this, "resultPool", new Ot());
|
|
1385
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1372
1386
|
}
|
|
1373
1387
|
/**
|
|
1374
1388
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -1384,16 +1398,16 @@ class Q {
|
|
|
1384
1398
|
// return this.ctx.featureFlags;
|
|
1385
1399
|
// }
|
|
1386
1400
|
getNamedAccessor(e) {
|
|
1387
|
-
return
|
|
1401
|
+
return de(
|
|
1388
1402
|
this.ctx.getAccessorHandleByName(e),
|
|
1389
|
-
(n) => new
|
|
1403
|
+
(n) => new E(n, [e])
|
|
1390
1404
|
);
|
|
1391
1405
|
}
|
|
1392
1406
|
get prerun() {
|
|
1393
|
-
return this.getNamedAccessor(
|
|
1407
|
+
return this.getNamedAccessor(Oe);
|
|
1394
1408
|
}
|
|
1395
1409
|
get outputs() {
|
|
1396
|
-
return this.getNamedAccessor(
|
|
1410
|
+
return this.getNamedAccessor(ke);
|
|
1397
1411
|
}
|
|
1398
1412
|
/**
|
|
1399
1413
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1405,13 +1419,13 @@ class Q {
|
|
|
1405
1419
|
}
|
|
1406
1420
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1407
1421
|
var i;
|
|
1408
|
-
const n = e.some((s) => !(s.data instanceof
|
|
1422
|
+
const n = e.some((s) => !(s.data instanceof E) || be(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1409
1423
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1410
1424
|
}
|
|
1411
1425
|
// TODO remove all non-PColumn fields
|
|
1412
1426
|
createPFrame(e) {
|
|
1413
1427
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1414
|
-
e.map((n) =>
|
|
1428
|
+
e.map((n) => _e(n))
|
|
1415
1429
|
);
|
|
1416
1430
|
}
|
|
1417
1431
|
createPTable(e) {
|
|
@@ -1423,8 +1437,8 @@ class Q {
|
|
|
1423
1437
|
},
|
|
1424
1438
|
filters: e.filters ?? [],
|
|
1425
1439
|
sorting: e.sorting ?? []
|
|
1426
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1427
|
-
|
|
1440
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(st(n.src)), this.ctx.createPTable(
|
|
1441
|
+
ot(n, (r) => _e(r))
|
|
1428
1442
|
);
|
|
1429
1443
|
}
|
|
1430
1444
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1435,19 +1449,19 @@ class Q {
|
|
|
1435
1449
|
return this.ctx.getCurrentUnstableMarker();
|
|
1436
1450
|
}
|
|
1437
1451
|
}
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1452
|
+
const Y = "1.30.37";
|
|
1453
|
+
function kt(t) {
|
|
1440
1454
|
return t.__renderLambda === !0;
|
|
1441
1455
|
}
|
|
1442
|
-
function
|
|
1456
|
+
function pe(t) {
|
|
1443
1457
|
if (t !== void 0)
|
|
1444
|
-
return
|
|
1458
|
+
return kt(t) ? t.handle : t;
|
|
1445
1459
|
}
|
|
1446
|
-
function
|
|
1460
|
+
function N(t) {
|
|
1447
1461
|
if (t !== void 0)
|
|
1448
1462
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1449
1463
|
}
|
|
1450
|
-
function
|
|
1464
|
+
function Ln(t) {
|
|
1451
1465
|
if (t.v3 !== void 0) {
|
|
1452
1466
|
const {
|
|
1453
1467
|
initialArgs: e,
|
|
@@ -1483,10 +1497,10 @@ function Cn(t) {
|
|
|
1483
1497
|
renderingMode: n,
|
|
1484
1498
|
initialArgs: o,
|
|
1485
1499
|
outputs: Object.fromEntries(
|
|
1486
|
-
Object.entries(r).map(([u, d]) => [u,
|
|
1500
|
+
Object.entries(r).map(([u, d]) => [u, N(d)])
|
|
1487
1501
|
),
|
|
1488
|
-
inputsValid:
|
|
1489
|
-
sections:
|
|
1502
|
+
inputsValid: N(i),
|
|
1503
|
+
sections: N(s),
|
|
1490
1504
|
initialUiState: void 0,
|
|
1491
1505
|
code: a
|
|
1492
1506
|
};
|
|
@@ -1501,10 +1515,10 @@ function Cn(t) {
|
|
|
1501
1515
|
renderingMode: r,
|
|
1502
1516
|
initialArgs: o,
|
|
1503
1517
|
outputs: Object.fromEntries(
|
|
1504
|
-
Object.entries(i).map(([u, d]) => [u,
|
|
1518
|
+
Object.entries(i).map(([u, d]) => [u, N(d)])
|
|
1505
1519
|
),
|
|
1506
|
-
inputsValid:
|
|
1507
|
-
sections:
|
|
1520
|
+
inputsValid: N(n),
|
|
1521
|
+
sections: N(s),
|
|
1508
1522
|
initialUiState: void 0,
|
|
1509
1523
|
code: a
|
|
1510
1524
|
};
|
|
@@ -1515,18 +1529,18 @@ function Cn(t) {
|
|
|
1515
1529
|
);
|
|
1516
1530
|
}
|
|
1517
1531
|
}
|
|
1518
|
-
class
|
|
1532
|
+
class L {
|
|
1519
1533
|
constructor(e, n, r, i, s, o, a, l) {
|
|
1520
1534
|
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l;
|
|
1521
1535
|
}
|
|
1522
1536
|
static create(e = "Heavy") {
|
|
1523
|
-
return new
|
|
1537
|
+
return new L(
|
|
1524
1538
|
e,
|
|
1525
1539
|
void 0,
|
|
1526
1540
|
{},
|
|
1527
1541
|
{},
|
|
1528
|
-
|
|
1529
|
-
|
|
1542
|
+
re(!0),
|
|
1543
|
+
re([]),
|
|
1530
1544
|
void 0,
|
|
1531
1545
|
void 0
|
|
1532
1546
|
);
|
|
@@ -1534,7 +1548,7 @@ class I {
|
|
|
1534
1548
|
output(e, n, r = {}) {
|
|
1535
1549
|
if (typeof n == "function") {
|
|
1536
1550
|
const i = `output#${e}`;
|
|
1537
|
-
return
|
|
1551
|
+
return H(i, () => n(new te())), new L(
|
|
1538
1552
|
this._renderingMode,
|
|
1539
1553
|
this._initialArgs,
|
|
1540
1554
|
this._initialUiState,
|
|
@@ -1552,7 +1566,7 @@ class I {
|
|
|
1552
1566
|
this._enrichmentTargets
|
|
1553
1567
|
);
|
|
1554
1568
|
} else
|
|
1555
|
-
return new
|
|
1569
|
+
return new L(
|
|
1556
1570
|
this._renderingMode,
|
|
1557
1571
|
this._initialArgs,
|
|
1558
1572
|
this._initialUiState,
|
|
@@ -1571,7 +1585,7 @@ class I {
|
|
|
1571
1585
|
return this.output(e, n, { retentive: !0 });
|
|
1572
1586
|
}
|
|
1573
1587
|
argsValid(e) {
|
|
1574
|
-
return typeof e == "function" ? (
|
|
1588
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
|
|
1575
1589
|
this._renderingMode,
|
|
1576
1590
|
this._initialArgs,
|
|
1577
1591
|
this._initialUiState,
|
|
@@ -1583,7 +1597,7 @@ class I {
|
|
|
1583
1597
|
this._sections,
|
|
1584
1598
|
this._title,
|
|
1585
1599
|
this._enrichmentTargets
|
|
1586
|
-
)) : new
|
|
1600
|
+
)) : new L(
|
|
1587
1601
|
this._renderingMode,
|
|
1588
1602
|
this._initialArgs,
|
|
1589
1603
|
this._initialUiState,
|
|
@@ -1595,7 +1609,7 @@ class I {
|
|
|
1595
1609
|
);
|
|
1596
1610
|
}
|
|
1597
1611
|
sections(e) {
|
|
1598
|
-
return Array.isArray(e) ? this.sections(
|
|
1612
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
|
|
1599
1613
|
this._renderingMode,
|
|
1600
1614
|
this._initialArgs,
|
|
1601
1615
|
this._initialUiState,
|
|
@@ -1604,7 +1618,7 @@ class I {
|
|
|
1604
1618
|
{ __renderLambda: !0, handle: "sections" },
|
|
1605
1619
|
this._title,
|
|
1606
1620
|
this._enrichmentTargets
|
|
1607
|
-
)) : new
|
|
1621
|
+
)) : new L(
|
|
1608
1622
|
this._renderingMode,
|
|
1609
1623
|
this._initialArgs,
|
|
1610
1624
|
this._initialUiState,
|
|
@@ -1617,7 +1631,7 @@ class I {
|
|
|
1617
1631
|
}
|
|
1618
1632
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1619
1633
|
title(e) {
|
|
1620
|
-
return
|
|
1634
|
+
return H("title", () => e(new te())), new L(
|
|
1621
1635
|
this._renderingMode,
|
|
1622
1636
|
this._initialArgs,
|
|
1623
1637
|
this._initialUiState,
|
|
@@ -1633,7 +1647,7 @@ class I {
|
|
|
1633
1647
|
* @deprecated use {@link withArgs}
|
|
1634
1648
|
* */
|
|
1635
1649
|
initialArgs(e) {
|
|
1636
|
-
return new
|
|
1650
|
+
return new L(
|
|
1637
1651
|
this._renderingMode,
|
|
1638
1652
|
e,
|
|
1639
1653
|
this._initialUiState,
|
|
@@ -1646,7 +1660,7 @@ class I {
|
|
|
1646
1660
|
}
|
|
1647
1661
|
/** Sets initial args for the block, this value must be specified. */
|
|
1648
1662
|
withArgs(e) {
|
|
1649
|
-
return new
|
|
1663
|
+
return new L(
|
|
1650
1664
|
this._renderingMode,
|
|
1651
1665
|
e,
|
|
1652
1666
|
this._initialUiState,
|
|
@@ -1659,7 +1673,7 @@ class I {
|
|
|
1659
1673
|
}
|
|
1660
1674
|
/** Defines type and sets initial value for block UiState. */
|
|
1661
1675
|
withUiState(e) {
|
|
1662
|
-
return new
|
|
1676
|
+
return new L(
|
|
1663
1677
|
this._renderingMode,
|
|
1664
1678
|
this._initialArgs,
|
|
1665
1679
|
e,
|
|
@@ -1675,7 +1689,7 @@ class I {
|
|
|
1675
1689
|
* Influences dependency graph construction.
|
|
1676
1690
|
*/
|
|
1677
1691
|
enriches(e) {
|
|
1678
|
-
return
|
|
1692
|
+
return H("enrichmentTargets", e), new L(
|
|
1679
1693
|
this._renderingMode,
|
|
1680
1694
|
this._initialArgs,
|
|
1681
1695
|
this._initialUiState,
|
|
@@ -1693,7 +1707,7 @@ class I {
|
|
|
1693
1707
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1694
1708
|
const e = {
|
|
1695
1709
|
v3: {
|
|
1696
|
-
sdkVersion:
|
|
1710
|
+
sdkVersion: Y,
|
|
1697
1711
|
renderingMode: this._renderingMode,
|
|
1698
1712
|
initialArgs: this._initialArgs,
|
|
1699
1713
|
initialUiState: this._initialUiState,
|
|
@@ -1704,54 +1718,164 @@ class I {
|
|
|
1704
1718
|
enrichmentTargets: this._enrichmentTargets
|
|
1705
1719
|
},
|
|
1706
1720
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1707
|
-
sdkVersion:
|
|
1721
|
+
sdkVersion: Y,
|
|
1708
1722
|
renderingMode: this._renderingMode,
|
|
1709
1723
|
initialArgs: this._initialArgs,
|
|
1710
|
-
inputsValid:
|
|
1711
|
-
sections:
|
|
1724
|
+
inputsValid: pe(this._inputsValid),
|
|
1725
|
+
sections: pe(this._sections),
|
|
1712
1726
|
outputs: Object.fromEntries(
|
|
1713
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1727
|
+
Object.entries(this._outputs).map(([n, r]) => [n, pe(r)])
|
|
1714
1728
|
)
|
|
1715
1729
|
};
|
|
1716
|
-
return
|
|
1730
|
+
return ft() ? Re({ sdkVersion: Y }) : { config: e };
|
|
1717
1731
|
}
|
|
1718
1732
|
}
|
|
1719
|
-
|
|
1733
|
+
const jt = (t, e) => {
|
|
1734
|
+
let n = t.toString();
|
|
1735
|
+
return e == null || e.forEach((r) => {
|
|
1736
|
+
if (r)
|
|
1737
|
+
for (const [i, s] of Object.entries(r))
|
|
1738
|
+
n += i, n += s;
|
|
1739
|
+
}), n;
|
|
1740
|
+
};
|
|
1741
|
+
function Vt(t) {
|
|
1742
|
+
if (!t.length)
|
|
1743
|
+
return [];
|
|
1744
|
+
let e = [[]];
|
|
1745
|
+
return t.forEach((n) => {
|
|
1746
|
+
const r = [];
|
|
1747
|
+
n.forEach((i) => {
|
|
1748
|
+
r.push(...e.map((s) => [...s, i]));
|
|
1749
|
+
}), e = r;
|
|
1750
|
+
}), e;
|
|
1751
|
+
}
|
|
1752
|
+
function Kt(t, e) {
|
|
1753
|
+
const n = t.axesSpec.map(R);
|
|
1754
|
+
return e.axesSpec.map(R).every((i) => n.some((s) => K(s, i) && K(i, s)));
|
|
1755
|
+
}
|
|
1756
|
+
function Je(t, e) {
|
|
1757
|
+
const n = t.axesSpec.map(R);
|
|
1758
|
+
return e.axesSpec.map(R).every((i) => n.some((s) => K(s, i)));
|
|
1759
|
+
}
|
|
1760
|
+
const $t = "pl7.app/graph/isVirtual", Ie = "pl7.app/label";
|
|
1761
|
+
function Te(t, e) {
|
|
1762
|
+
const n = t.spec.axesSpec.map(R), r = e.spec.axesSpec.map(R);
|
|
1763
|
+
if (Kt(t.spec, e.spec))
|
|
1764
|
+
return [];
|
|
1765
|
+
if (!Je(t.spec, e.spec))
|
|
1766
|
+
return [];
|
|
1767
|
+
const o = r.map((h) => n.filter((w) => K(w, h))), a = Vt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = a.map((h) => {
|
|
1768
|
+
const w = /* @__PURE__ */ new Set();
|
|
1769
|
+
return h.map((g, m) => {
|
|
1770
|
+
const c = e.spec.axesSpec[m].domain, v = g.domain;
|
|
1771
|
+
return Object.entries(v ?? {}).forEach(([b, p]) => {
|
|
1772
|
+
if ((c == null ? void 0 : c[b]) === void 0) {
|
|
1773
|
+
const A = JSON.stringify([b, p]);
|
|
1774
|
+
w.add(A), l.add(A);
|
|
1775
|
+
}
|
|
1776
|
+
}), {
|
|
1777
|
+
...g,
|
|
1778
|
+
annotations: e.spec.axesSpec[m].annotations
|
|
1779
|
+
};
|
|
1780
|
+
}), w;
|
|
1781
|
+
});
|
|
1782
|
+
return [...l].forEach((h) => {
|
|
1783
|
+
d.some((w) => !w.has(h)) && u.add(h);
|
|
1784
|
+
}), a.map((h, w) => {
|
|
1785
|
+
var b;
|
|
1786
|
+
const g = jt(e.id, h.map((p) => p.domain)), m = ((b = e.spec.annotations) == null ? void 0 : b[Ie]) ?? "", c = [...d[w]].filter((p) => u.has(p)).sort().map((p) => {
|
|
1787
|
+
var A;
|
|
1788
|
+
return (A = JSON.parse(p)) == null ? void 0 : A[1];
|
|
1789
|
+
}).join(" / "), v = {
|
|
1790
|
+
...e.spec.annotations,
|
|
1791
|
+
[$t]: "true"
|
|
1792
|
+
};
|
|
1793
|
+
return (m || c) && (v[Ie] = m && c ? m + " / " + c : m + c), {
|
|
1794
|
+
id: g,
|
|
1795
|
+
spec: {
|
|
1796
|
+
...e.spec,
|
|
1797
|
+
axesSpec: h.map((p, A) => ({
|
|
1798
|
+
...p,
|
|
1799
|
+
annotations: e.spec.axesSpec[A].annotations
|
|
1800
|
+
})),
|
|
1801
|
+
annotations: v
|
|
1802
|
+
},
|
|
1803
|
+
data: e.data
|
|
1804
|
+
};
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
function Jt(t) {
|
|
1808
|
+
const e = [];
|
|
1809
|
+
for (let n = 0; n < t.length; n++)
|
|
1810
|
+
for (let r = n + 1; r < t.length; r++) {
|
|
1811
|
+
const i = t[n], s = t[r];
|
|
1812
|
+
e.push(
|
|
1813
|
+
...Te(i, s),
|
|
1814
|
+
...Te(s, i)
|
|
1815
|
+
);
|
|
1816
|
+
}
|
|
1817
|
+
return e;
|
|
1818
|
+
}
|
|
1819
|
+
function Nt(t, e) {
|
|
1820
|
+
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1821
|
+
t.forEach((s) => {
|
|
1822
|
+
n.add(s.id), r.set(M(Pe(s.spec)), s);
|
|
1823
|
+
});
|
|
1824
|
+
const i = /* @__PURE__ */ new Map();
|
|
1825
|
+
for (const s of e) {
|
|
1826
|
+
if (n.has(s.id)) continue;
|
|
1827
|
+
const o = M(Pe(s.spec));
|
|
1828
|
+
if (!r.has(o)) {
|
|
1829
|
+
for (const a of r.values())
|
|
1830
|
+
if (Je(a.spec, s.spec)) {
|
|
1831
|
+
i.set(o, s);
|
|
1832
|
+
break;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
return [...r.values(), ...i.values()];
|
|
1837
|
+
}
|
|
1838
|
+
function En(t, e) {
|
|
1839
|
+
if (!e) return;
|
|
1840
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ye), r = Nt(e, n), i = [...r, ...Jt(r)];
|
|
1841
|
+
if (!i.some(
|
|
1842
|
+
(s) => s.data instanceof E && !s.data.getIsReadyOrError()
|
|
1843
|
+
))
|
|
1844
|
+
return t.createPFrame(i);
|
|
1845
|
+
}
|
|
1846
|
+
function Dn(t) {
|
|
1720
1847
|
const e = t.type;
|
|
1721
1848
|
switch (e) {
|
|
1722
1849
|
case "axis":
|
|
1723
|
-
return
|
|
1850
|
+
return M(t);
|
|
1724
1851
|
case "column":
|
|
1725
|
-
return
|
|
1852
|
+
return M(t);
|
|
1726
1853
|
default:
|
|
1727
1854
|
throw Error(`unsupported column type: ${e}`);
|
|
1728
1855
|
}
|
|
1729
1856
|
}
|
|
1730
|
-
function
|
|
1731
|
-
return JSON.parse(t);
|
|
1732
|
-
}
|
|
1733
|
-
function Ot(t) {
|
|
1857
|
+
function Ut(t) {
|
|
1734
1858
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1735
1859
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return new
|
|
1860
|
+
function Ne(t) {
|
|
1861
|
+
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1738
1862
|
name: "pl7.app/label",
|
|
1739
1863
|
axes: [{}]
|
|
1740
1864
|
// exactly one axis
|
|
1741
1865
|
}, { dontWaitAllData: !0 });
|
|
1742
1866
|
}
|
|
1743
|
-
function
|
|
1867
|
+
function Ue(t, e) {
|
|
1744
1868
|
const n = [], r = [];
|
|
1745
1869
|
for (const a of t)
|
|
1746
|
-
|
|
1870
|
+
Ut(a.spec) ? n.push(a) : r.push(a);
|
|
1747
1871
|
const i = [];
|
|
1748
1872
|
for (const a of r)
|
|
1749
1873
|
for (const l of a.spec.axesSpec) {
|
|
1750
|
-
const u =
|
|
1751
|
-
i.some((d) =>
|
|
1874
|
+
const u = R(l);
|
|
1875
|
+
i.some((d) => K(d, u)) || i.push(u);
|
|
1752
1876
|
}
|
|
1753
1877
|
for (const a of n) {
|
|
1754
|
-
const l =
|
|
1878
|
+
const l = R(a.spec.axesSpec[0]), u = i.findIndex((d) => K(d, l));
|
|
1755
1879
|
u !== -1 && i.splice(u, 1);
|
|
1756
1880
|
}
|
|
1757
1881
|
const s = (a, l) => {
|
|
@@ -1762,14 +1886,14 @@ function Ke(t, e) {
|
|
|
1762
1886
|
return u;
|
|
1763
1887
|
}, o = [];
|
|
1764
1888
|
for (const a of e) {
|
|
1765
|
-
const l = a.spec.axesSpec[0], u =
|
|
1889
|
+
const l = a.spec.axesSpec[0], u = R(l), d = i.findIndex((h) => K(h, u));
|
|
1766
1890
|
if (d !== -1) {
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1769
|
-
id: s(a.id,
|
|
1891
|
+
const h = i[d], w = Object.keys(h.domain ?? {}).length, g = Object.keys(l.domain ?? {}).length;
|
|
1892
|
+
w > g ? o.push({
|
|
1893
|
+
id: s(a.id, h.domain),
|
|
1770
1894
|
spec: {
|
|
1771
1895
|
...a.spec,
|
|
1772
|
-
axesSpec: [{ ...
|
|
1896
|
+
axesSpec: [{ ...h, annotations: l.annotations }]
|
|
1773
1897
|
},
|
|
1774
1898
|
data: a.data
|
|
1775
1899
|
}) : o.push(a), i.splice(d, 1);
|
|
@@ -1777,8 +1901,8 @@ function Ke(t, e) {
|
|
|
1777
1901
|
}
|
|
1778
1902
|
return o;
|
|
1779
1903
|
}
|
|
1780
|
-
function
|
|
1781
|
-
const e = (i) => Array.isArray(i), n = (i) => i instanceof
|
|
1904
|
+
function Be(t) {
|
|
1905
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
1782
1906
|
return t.map((i) => i.data).every((i) => {
|
|
1783
1907
|
if (e(i))
|
|
1784
1908
|
return !0;
|
|
@@ -1797,7 +1921,7 @@ function $e(t) {
|
|
|
1797
1921
|
throw Error(`unsupported column data type: ${i}`);
|
|
1798
1922
|
});
|
|
1799
1923
|
}
|
|
1800
|
-
function
|
|
1924
|
+
function Me(t, e, n, r, i, s) {
|
|
1801
1925
|
let o = t;
|
|
1802
1926
|
const a = [];
|
|
1803
1927
|
if (s) {
|
|
@@ -1818,56 +1942,60 @@ function Je(t, e, n, r, i, s) {
|
|
|
1818
1942
|
sorting: i
|
|
1819
1943
|
};
|
|
1820
1944
|
}
|
|
1821
|
-
function
|
|
1945
|
+
function Fn(t, e, n, r) {
|
|
1822
1946
|
var u, d;
|
|
1823
1947
|
Array.isArray(r) && (r = { filters: r });
|
|
1824
|
-
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 = ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? [], a =
|
|
1948
|
+
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 = ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Ne(t.resultPool);
|
|
1825
1949
|
if (!a) return;
|
|
1826
|
-
const l =
|
|
1827
|
-
if (
|
|
1950
|
+
const l = Ue(e.map(Ee), a);
|
|
1951
|
+
if (Be([...e, ...l]))
|
|
1828
1952
|
return t.createPTable(
|
|
1829
|
-
|
|
1953
|
+
Me(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1830
1954
|
);
|
|
1831
1955
|
}
|
|
1832
|
-
function
|
|
1956
|
+
function Bt(t) {
|
|
1957
|
+
var e;
|
|
1958
|
+
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
1959
|
+
}
|
|
1960
|
+
function Mt(t) {
|
|
1833
1961
|
var e;
|
|
1834
1962
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1835
1963
|
}
|
|
1836
|
-
function
|
|
1837
|
-
var
|
|
1838
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1839
|
-
if (!l) return;
|
|
1840
|
-
const u = Ve(t.resultPool);
|
|
1964
|
+
function Rn(t, e, n, r, i) {
|
|
1965
|
+
var v, b;
|
|
1966
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((v = r == null ? void 0 : r.pTableParams) == null ? void 0 : v.filters) ?? []], a = ((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.sorting) ?? [], l = e.filter((p) => !Bt(p.spec)), u = l.find((p) => n(p.spec));
|
|
1841
1967
|
if (!u) return;
|
|
1842
|
-
const d =
|
|
1843
|
-
|
|
1968
|
+
const d = Ne(t.resultPool);
|
|
1969
|
+
if (!d) return;
|
|
1970
|
+
const h = new Set((() => {
|
|
1971
|
+
var A, x;
|
|
1844
1972
|
if (s === "inner") return [];
|
|
1845
|
-
const p = (
|
|
1846
|
-
return p ||
|
|
1973
|
+
const p = (x = (A = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A.hiddenColIds) == null ? void 0 : x.map(lt).filter((y) => y.type === "column").map((y) => y.id);
|
|
1974
|
+
return p || l.filter((y) => Mt(y.spec)).map((y) => y.id);
|
|
1847
1975
|
})());
|
|
1848
|
-
|
|
1849
|
-
const
|
|
1850
|
-
...
|
|
1976
|
+
h.delete(u.id), [...o.map((p) => p.column), ...a.map((p) => p.column)].filter((p) => p.type === "column").map((p) => h.delete(p.id));
|
|
1977
|
+
const w = l.filter((p) => !h.has(p.id)), g = Ue(w.map(Ee), d), m = [
|
|
1978
|
+
...u.spec.axesSpec.map((p) => ({
|
|
1851
1979
|
type: "axis",
|
|
1852
|
-
id:
|
|
1980
|
+
id: R(p),
|
|
1853
1981
|
spec: p
|
|
1854
1982
|
})),
|
|
1855
|
-
...[...
|
|
1983
|
+
...[...l, ...g].map((p) => ({
|
|
1856
1984
|
type: "column",
|
|
1857
1985
|
id: p.id,
|
|
1858
1986
|
spec: p.spec
|
|
1859
1987
|
}))
|
|
1860
1988
|
];
|
|
1861
|
-
if (
|
|
1862
|
-
const
|
|
1863
|
-
|
|
1989
|
+
if (!Be([...w, ...g])) return;
|
|
1990
|
+
const c = t.createPTable(
|
|
1991
|
+
Me(l, g, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1864
1992
|
);
|
|
1865
1993
|
return {
|
|
1866
|
-
tableSpec:
|
|
1867
|
-
tableHandle:
|
|
1994
|
+
tableSpec: m,
|
|
1995
|
+
tableHandle: c
|
|
1868
1996
|
};
|
|
1869
1997
|
}
|
|
1870
|
-
function
|
|
1998
|
+
function On(t, e, n) {
|
|
1871
1999
|
const r = t.resultPool.findLabels(e);
|
|
1872
2000
|
return {
|
|
1873
2001
|
axis: e,
|
|
@@ -1878,120 +2006,41 @@ function Ln(t, e, n) {
|
|
|
1878
2006
|
defaultValue: n[0]
|
|
1879
2007
|
};
|
|
1880
2008
|
}
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
return [];
|
|
1892
|
-
let e = [[]];
|
|
1893
|
-
return t.forEach((n) => {
|
|
1894
|
-
const r = [];
|
|
1895
|
-
n.forEach((i) => {
|
|
1896
|
-
r.push(...e.map((s) => [...s, i]));
|
|
1897
|
-
}), e = r;
|
|
1898
|
-
}), e;
|
|
1899
|
-
}
|
|
1900
|
-
function jt(t, e) {
|
|
1901
|
-
const n = t.axesSpec.map(E);
|
|
1902
|
-
return e.axesSpec.map(E).every((i) => n.some((s) => j(s, i) && j(i, s)));
|
|
1903
|
-
}
|
|
1904
|
-
function Ne(t, e) {
|
|
1905
|
-
const n = t.axesSpec.map(E);
|
|
1906
|
-
return e.axesSpec.map(E).every((i) => n.some((s) => j(s, i)));
|
|
2009
|
+
function kn(t) {
|
|
2010
|
+
const e = t.type;
|
|
2011
|
+
switch (e) {
|
|
2012
|
+
case "axis":
|
|
2013
|
+
return M(t);
|
|
2014
|
+
case "column":
|
|
2015
|
+
return M(t);
|
|
2016
|
+
default:
|
|
2017
|
+
throw Error(`unsupported column type: ${e}`);
|
|
2018
|
+
}
|
|
1907
2019
|
}
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
return [];
|
|
1913
|
-
if (!Ne(t.spec, e.spec))
|
|
1914
|
-
return [];
|
|
1915
|
-
const o = r.map((v) => n.filter((h) => j(h, v))), a = kt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = a.map((v) => {
|
|
1916
|
-
const h = /* @__PURE__ */ new Set();
|
|
1917
|
-
return v.map((c, m) => {
|
|
1918
|
-
const b = e.spec.axesSpec[m].domain, A = c.domain;
|
|
1919
|
-
return Object.entries(A ?? {}).forEach(([p, g]) => {
|
|
1920
|
-
if ((b == null ? void 0 : b[p]) === void 0) {
|
|
1921
|
-
const w = JSON.stringify([p, g]);
|
|
1922
|
-
h.add(w), l.add(w);
|
|
1923
|
-
}
|
|
1924
|
-
}), {
|
|
1925
|
-
...c,
|
|
1926
|
-
annotations: e.spec.axesSpec[m].annotations
|
|
1927
|
-
};
|
|
1928
|
-
}), h;
|
|
1929
|
-
});
|
|
1930
|
-
return [...l].forEach((v) => {
|
|
1931
|
-
d.some((h) => !h.has(v)) && u.add(v);
|
|
1932
|
-
}), a.map((v, h) => {
|
|
1933
|
-
var p;
|
|
1934
|
-
const c = Rt(e.id, v.map((g) => g.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ce]) ?? "", b = [...d[h]].filter((g) => u.has(g)).sort().map((g) => {
|
|
1935
|
-
var w;
|
|
1936
|
-
return (w = JSON.parse(g)) == null ? void 0 : w[1];
|
|
1937
|
-
}).join(" / "), A = {
|
|
1938
|
-
...e.spec.annotations,
|
|
1939
|
-
[Vt]: "true"
|
|
1940
|
-
};
|
|
1941
|
-
return (m || b) && (A[Ce] = m && b ? m + " / " + b : m + b), {
|
|
1942
|
-
id: c,
|
|
2020
|
+
function jn(t, e, n, r) {
|
|
2021
|
+
if (!(!e || e.axesSpec.length === 0))
|
|
2022
|
+
return {
|
|
2023
|
+
id: t,
|
|
1943
2024
|
spec: {
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
}
|
|
1949
|
-
annotations:
|
|
2025
|
+
kind: "PColumn",
|
|
2026
|
+
valueType: "Int",
|
|
2027
|
+
name: "pl7.app/table/row-selection",
|
|
2028
|
+
axesSpec: e.axesSpec,
|
|
2029
|
+
...r && { domain: r },
|
|
2030
|
+
annotations: {
|
|
2031
|
+
"pl7.app/label": n ?? "Selected rows",
|
|
2032
|
+
"pl7.app/discreteValues": "[1]"
|
|
2033
|
+
}
|
|
1950
2034
|
},
|
|
1951
|
-
data: e.
|
|
2035
|
+
data: e.selectedKeys.filter((i) => !i.some((s) => ut(s))).map((i) => ({ key: i, val: 1 }))
|
|
1952
2036
|
};
|
|
1953
|
-
});
|
|
1954
|
-
}
|
|
1955
|
-
function Kt(t) {
|
|
1956
|
-
const e = [];
|
|
1957
|
-
for (let n = 0; n < t.length; n++)
|
|
1958
|
-
for (let r = n + 1; r < t.length; r++) {
|
|
1959
|
-
const i = t[n], s = t[r];
|
|
1960
|
-
e.push(
|
|
1961
|
-
...Se(i, s),
|
|
1962
|
-
...Se(s, i)
|
|
1963
|
-
);
|
|
1964
|
-
}
|
|
1965
|
-
return e;
|
|
1966
|
-
}
|
|
1967
|
-
function $t(t, e) {
|
|
1968
|
-
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1969
|
-
t.forEach((s) => {
|
|
1970
|
-
n.add(s.id), r.set(te(Ae(s.spec)), s);
|
|
1971
|
-
});
|
|
1972
|
-
const i = /* @__PURE__ */ new Map();
|
|
1973
|
-
for (const s of e) {
|
|
1974
|
-
if (n.has(s.id)) continue;
|
|
1975
|
-
const o = te(Ae(s.spec));
|
|
1976
|
-
if (!r.has(o)) {
|
|
1977
|
-
for (const a of r.values())
|
|
1978
|
-
if (Ne(a.spec, s.spec)) {
|
|
1979
|
-
i.set(o, s);
|
|
1980
|
-
break;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
return [...r.values(), ...i.values()];
|
|
1985
2037
|
}
|
|
1986
|
-
function
|
|
1987
|
-
if (
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
(s) => s.data instanceof L && !s.data.getIsReadyOrError()
|
|
1991
|
-
))
|
|
1992
|
-
return t.createPFrame(i);
|
|
2038
|
+
function Vn(t) {
|
|
2039
|
+
if (t === ct)
|
|
2040
|
+
throw new Error("Axis value can never be N/A");
|
|
2041
|
+
return t;
|
|
1993
2042
|
}
|
|
1994
|
-
class
|
|
2043
|
+
class Kn {
|
|
1995
2044
|
constructor(e) {
|
|
1996
2045
|
this.handle = e;
|
|
1997
2046
|
}
|
|
@@ -2011,121 +2060,124 @@ class En {
|
|
|
2011
2060
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2012
2061
|
}
|
|
2013
2062
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2063
|
+
function Wt(t) {
|
|
2064
|
+
return Fe({
|
|
2016
2065
|
__isRef: !0,
|
|
2017
|
-
blockId:
|
|
2018
|
-
name:
|
|
2066
|
+
blockId: ie(t, "blockId"),
|
|
2067
|
+
name: ie(t, "name")
|
|
2019
2068
|
});
|
|
2020
2069
|
}
|
|
2021
|
-
function
|
|
2022
|
-
return
|
|
2023
|
-
ref:
|
|
2024
|
-
label:
|
|
2070
|
+
function $n(t) {
|
|
2071
|
+
return Fe({
|
|
2072
|
+
ref: Wt(ie(t, "ref")),
|
|
2073
|
+
label: ie(t, "label")
|
|
2025
2074
|
});
|
|
2026
2075
|
}
|
|
2027
|
-
const
|
|
2028
|
-
sdkVersion:
|
|
2076
|
+
const Jn = {
|
|
2077
|
+
sdkVersion: Y
|
|
2029
2078
|
};
|
|
2030
|
-
function
|
|
2031
|
-
return
|
|
2079
|
+
function Gt() {
|
|
2080
|
+
return Re({ sdkVersion: Y });
|
|
2032
2081
|
}
|
|
2033
|
-
function
|
|
2082
|
+
function Nn(t) {
|
|
2034
2083
|
try {
|
|
2035
|
-
return
|
|
2084
|
+
return Gt();
|
|
2036
2085
|
} catch {
|
|
2037
2086
|
return t;
|
|
2038
2087
|
}
|
|
2039
2088
|
}
|
|
2040
|
-
function
|
|
2089
|
+
function Un(t) {
|
|
2041
2090
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2042
2091
|
return globalThis.getEnvironmentValue(t);
|
|
2043
2092
|
}
|
|
2044
2093
|
export {
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2094
|
+
Zt as Args,
|
|
2095
|
+
L as BlockModel,
|
|
2096
|
+
Jn as CurrentSdkInfo,
|
|
2097
|
+
I as FutureRef,
|
|
2098
|
+
$t as IS_VIRTUAL_COLUMN,
|
|
2099
|
+
en as It,
|
|
2100
|
+
In as JsRenderInternal,
|
|
2101
|
+
Ie as LABEL_ANNOTATION,
|
|
2102
|
+
tn as MainOutputs,
|
|
2103
|
+
pt as OutputError,
|
|
2104
|
+
vt as PAnnotationLabel,
|
|
2105
|
+
bt as PAnnotationTrace,
|
|
2106
|
+
me as PColumnCollection,
|
|
2107
|
+
Kn as PFrameImpl,
|
|
2108
|
+
B as RT_BINARY_PARTITIONED,
|
|
2109
|
+
z as RT_BINARY_SUPER_PARTITIONED,
|
|
2110
|
+
q as RT_JSON_PARTITIONED,
|
|
2111
|
+
ae as RT_JSON_SUPER_PARTITIONED,
|
|
2112
|
+
se as RT_RESOURCE_MAP,
|
|
2113
|
+
oe as RT_RESOURCE_MAP_PARTITIONED,
|
|
2114
|
+
te as RenderCtx,
|
|
2115
|
+
Ot as ResultPool,
|
|
2116
|
+
nn as StagingOutputs,
|
|
2117
|
+
At as Trace,
|
|
2118
|
+
wt as TraceEntry,
|
|
2119
|
+
E as TreeNodeAccessor,
|
|
2120
|
+
rn as UiState,
|
|
2121
|
+
Be as allColumnsComputed,
|
|
2122
|
+
pn as and,
|
|
2123
|
+
It as convertOrParsePColumnData,
|
|
2124
|
+
En as createPFrameForGraphs,
|
|
2125
|
+
Fn as createPlDataTable,
|
|
2126
|
+
On as createPlDataTableSheet,
|
|
2127
|
+
Rn as createPlDataTableV2,
|
|
2128
|
+
jn as createRowSelectionColumn,
|
|
2129
|
+
Ve as deriveLabels,
|
|
2130
|
+
pe as downgradeCfgOrLambda,
|
|
2131
|
+
Nt as enrichColumnsWithCompatible,
|
|
2132
|
+
An as extractArchiveAndGetURL,
|
|
2133
|
+
Ln as extractConfig,
|
|
2134
|
+
Tt as filterDataInfoEntries,
|
|
2135
|
+
ln as flatten,
|
|
2136
|
+
$n as fromPlOption,
|
|
2137
|
+
Wt as fromPlRef,
|
|
2138
|
+
Jt as getAdditionalColumns,
|
|
2139
|
+
Ne as getAllLabelColumns,
|
|
2140
|
+
mn as getBlobContent,
|
|
2141
|
+
vn as getBlobContentAsJson,
|
|
2142
|
+
yn as getBlobContentAsString,
|
|
2143
|
+
bn as getDownloadedBlobContent,
|
|
2144
|
+
Un as getEnvironmentValue,
|
|
2145
|
+
Q as getFromCfg,
|
|
2146
|
+
re as getImmediate,
|
|
2147
|
+
xn as getImportProgress,
|
|
2148
|
+
ie as getJsonField,
|
|
2149
|
+
Pn as getLastLogs,
|
|
2150
|
+
_n as getLogHandle,
|
|
2151
|
+
Ue as getMatchingLabelColumns,
|
|
2152
|
+
wn as getOnDemandBlobContent,
|
|
2153
|
+
Ct as getPartitionKeysList,
|
|
2154
|
+
Nn as getPlatformaOrDefault,
|
|
2155
|
+
Cn as getProgressLog,
|
|
2156
|
+
Sn as getProgressLogWithInfo,
|
|
2157
|
+
Gt as getRawPlatformaInstance,
|
|
2158
|
+
fn as getResourceField,
|
|
2159
|
+
hn as getResourceValueAsJson,
|
|
2160
|
+
_t as getUniquePartitionKeys,
|
|
2161
|
+
de as ifDef,
|
|
2162
|
+
Bt as isColumnHidden,
|
|
2163
|
+
Mt as isColumnOptional,
|
|
2164
|
+
kt as isConfigLambda,
|
|
2165
|
+
un as isEmpty,
|
|
2166
|
+
Ut as isLabelColumn,
|
|
2167
|
+
Qt as isolate,
|
|
2168
|
+
sn as makeArray,
|
|
2169
|
+
Fe as makeObject,
|
|
2170
|
+
an as mapArrayValues,
|
|
2171
|
+
Vn as mapPTableValueToAxisKey,
|
|
2172
|
+
on as mapRecordValues,
|
|
2173
|
+
gn as mapResourceFields,
|
|
2174
|
+
cn as not,
|
|
2175
|
+
dn as or,
|
|
2176
|
+
ge as parsePColumnData,
|
|
2177
|
+
Tn as parseResourceMap,
|
|
2178
|
+
dt as readOutput,
|
|
2179
|
+
kn as stringifyPTableColumnId,
|
|
2180
|
+
Dn as stringifyPTableColumnSpec,
|
|
2181
|
+
Xt as wrapOutputs
|
|
2130
2182
|
};
|
|
2131
2183
|
//# sourceMappingURL=index.mjs.map
|