@platforma-sdk/model 1.40.0 → 1.40.5
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/PlAnnotations/filter.d.ts +213 -0
- package/dist/components/PlAnnotations/filter.d.ts.map +1 -0
- package/dist/components/PlAnnotations/filters_ui.d.ts +823 -0
- package/dist/components/PlAnnotations/filters_ui.d.ts.map +1 -0
- package/dist/components/PlAnnotations/index.d.ts +3 -0
- package/dist/components/PlAnnotations/index.d.ts.map +1 -0
- package/dist/components/PlAnnotations/types.d.ts +3 -0
- package/dist/components/PlAnnotations/types.d.ts.map +1 -0
- package/dist/components/PlDataTable.d.ts +60 -8
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- 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 +1250 -728
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +4 -2
- package/src/components/PlAnnotations/filter.ts +245 -0
- package/src/components/PlAnnotations/filters_ui.test.ts +204 -0
- package/src/components/PlAnnotations/filters_ui.ts +679 -0
- package/src/components/PlAnnotations/index.ts +2 -0
- package/src/components/PlAnnotations/types.ts +3 -0
- package/src/components/PlDataTable.ts +70 -11
- package/src/components/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (t, e, n) =>
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var rt = Object.defineProperty;
|
|
2
|
+
var it = (t, e, n) => e in t ? rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var k = (t, e, n) => it(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as Me, mapPObjectData as Pe, isDataInfoEntries as je, isDataInfo as pe, dataInfoToEntries as ot, selectorsToPredicate as Y, resolveAnchors as we, deriveNativeId as st, isPColumnSpec as oe, isPartitionedDataInfoEntries as at, getAxisId as V, entriesToDataInfo as lt, canonicalizeAxisId as ut, withEnrichments as xe, AnchoredIdDeriver as Fe, isPlRef as ct, mapValueInVOE as pt, ensurePColumn as dt, extractAllColumns as ft, mapPTableDef as ht, mapDataInfo as mt, extractConfigGeneric as yt, matchAxisId as U, getColumnIdAndSpec as Ie, canonicalizeJson as D, parseJson as _e, visitDataInfo as gt, isPTableAbsent as bt, uniquePlId as vt, PTableNA as Ct } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
6
|
+
import qe from "canonicalize";
|
|
7
|
+
import { z as B } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class Tt 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 St(t) {
|
|
15
|
+
if (!t.ok) throw new Tt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function mn(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return St(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 A(t) {
|
|
26
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? se(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Z(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function yn(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
37
|
+
const gn = Z("$args"), bn = Z("$it"), vn = Z("$prod"), Cn = Z("$staging"), Tn = Z("$ui");
|
|
38
|
+
function se(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Be(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] = A(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(A(n));
|
|
52
52
|
return {
|
|
53
53
|
type: "MakeArray",
|
|
54
54
|
template: e
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ae(t, e) {
|
|
58
58
|
return {
|
|
59
59
|
type: "GetJsonField",
|
|
60
|
-
source:
|
|
61
|
-
field:
|
|
60
|
+
source: A(t),
|
|
61
|
+
field: A(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Pn(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function yn(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 bn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function wn(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function xn(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Fn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function In(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 _n(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 Ln(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
|
-
source:
|
|
116
|
-
field:
|
|
115
|
+
source: A(t),
|
|
116
|
+
field: A(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function En() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
123
|
-
source:
|
|
123
|
+
source: A(t)
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function kn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,91 +132,91 @@ function _n(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Vn(t, e) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
138
|
range: e,
|
|
139
|
-
source:
|
|
139
|
+
source: A(t)
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function On(t, e) {
|
|
143
143
|
return {
|
|
144
144
|
type: "GetBlobContentAsString",
|
|
145
145
|
range: e,
|
|
146
|
-
source:
|
|
146
|
+
source: A(t)
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Dn() {
|
|
150
150
|
return function(t, e) {
|
|
151
151
|
return {
|
|
152
152
|
type: "GetBlobContentAsJson",
|
|
153
153
|
range: e,
|
|
154
|
-
source:
|
|
154
|
+
source: A(t)
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Rn(t) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetDownloadedBlobContent",
|
|
161
|
-
source:
|
|
161
|
+
source: A(t)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Nn(t) {
|
|
165
165
|
return {
|
|
166
166
|
type: "GetOnDemandBlobContent",
|
|
167
|
-
source:
|
|
167
|
+
source: A(t)
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Un(t, e) {
|
|
171
171
|
return {
|
|
172
172
|
type: "ExtractArchiveAndGetURL",
|
|
173
173
|
format: e,
|
|
174
|
-
source:
|
|
174
|
+
source: A(t)
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Kn(t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetImportProgress",
|
|
180
|
-
source:
|
|
180
|
+
source: A(t)
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Mn(t, e) {
|
|
184
184
|
return {
|
|
185
185
|
type: "GetLastLogs",
|
|
186
|
-
source:
|
|
186
|
+
source: A(t),
|
|
187
187
|
lines: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function jn(t, e) {
|
|
191
191
|
return {
|
|
192
192
|
type: "GetProgressLog",
|
|
193
|
-
source:
|
|
193
|
+
source: A(t),
|
|
194
194
|
patternToSearch: e
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function qn(t, e) {
|
|
198
198
|
return {
|
|
199
199
|
type: "GetProgressLogWithInfo",
|
|
200
|
-
source:
|
|
200
|
+
source: A(t),
|
|
201
201
|
patternToSearch: e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Bn(t) {
|
|
205
205
|
return {
|
|
206
206
|
type: "GetLogHandle",
|
|
207
|
-
source:
|
|
207
|
+
source: A(t)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Pt() {
|
|
211
211
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Je(t) {
|
|
214
214
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
215
215
|
return globalThis.getPlatforma(t);
|
|
216
216
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
217
217
|
throw new Error("Can't get platforma instance.");
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function At() {
|
|
220
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
221
|
}
|
|
222
222
|
function v() {
|
|
@@ -224,31 +224,31 @@ function v() {
|
|
|
224
224
|
throw new Error("Not in config rendering context");
|
|
225
225
|
}
|
|
226
226
|
function G(t, e) {
|
|
227
|
-
const n =
|
|
227
|
+
const n = At();
|
|
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
|
-
const
|
|
233
|
-
function
|
|
232
|
+
const fe = /* @__PURE__ */ new Map();
|
|
233
|
+
function wt(t, e) {
|
|
234
234
|
t in v().callbackRegistry || (v().callbackRegistry[t] = (n) => {
|
|
235
|
-
for (const r of
|
|
235
|
+
for (const r of fe.get(t))
|
|
236
236
|
r(n);
|
|
237
|
-
},
|
|
237
|
+
}, fe.set(t, [])), fe.get(t).push(e);
|
|
238
238
|
}
|
|
239
|
-
class
|
|
239
|
+
class L {
|
|
240
240
|
constructor(e, n = (r) => r) {
|
|
241
241
|
k(this, "isResolved", !1);
|
|
242
242
|
k(this, "resolvedValue");
|
|
243
|
-
this.handle = e, this.postProcess = n,
|
|
243
|
+
this.handle = e, this.postProcess = n, wt(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 L(this.handle, (n) => e(this.postProcess(n)));
|
|
249
249
|
}
|
|
250
250
|
mapDefined(e) {
|
|
251
|
-
return new
|
|
251
|
+
return new L(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 F {
|
|
|
260
260
|
function ge(t, e) {
|
|
261
261
|
return t === void 0 ? void 0 : e(t);
|
|
262
262
|
}
|
|
263
|
-
class
|
|
263
|
+
class O {
|
|
264
264
|
constructor(e, n) {
|
|
265
265
|
this.handle = e, this.resolvePath = n;
|
|
266
266
|
}
|
|
@@ -301,7 +301,7 @@ class R {
|
|
|
301
301
|
];
|
|
302
302
|
return ge(
|
|
303
303
|
v().resolveWithCommon(this.handle, e, ...n),
|
|
304
|
-
(i) => new
|
|
304
|
+
(i) => new O(i, r)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
get resourceType() {
|
|
@@ -323,7 +323,7 @@ class R {
|
|
|
323
323
|
const e = [...this.resolvePath, "error"];
|
|
324
324
|
return ge(
|
|
325
325
|
v().getError(this.handle),
|
|
326
|
-
(n) => new
|
|
326
|
+
(n) => new O(n, e)
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
listInputFields() {
|
|
@@ -362,9 +362,9 @@ class R {
|
|
|
362
362
|
*/
|
|
363
363
|
getPColumns(e = !1, n = "") {
|
|
364
364
|
const r = this.parsePObjectCollection(e, n);
|
|
365
|
-
return r === void 0 ? void 0 : Object.entries(r).map(([,
|
|
366
|
-
if (!
|
|
367
|
-
return
|
|
365
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, o]) => {
|
|
366
|
+
if (!Me(o)) throw new Error(`not a PColumn (kind = ${o.spec.kind})`);
|
|
367
|
+
return o;
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
@@ -379,20 +379,20 @@ class R {
|
|
|
379
379
|
);
|
|
380
380
|
if (r === void 0) return;
|
|
381
381
|
const i = {};
|
|
382
|
-
for (const [
|
|
383
|
-
const a = [...this.resolvePath,
|
|
384
|
-
i[
|
|
382
|
+
for (const [o, s] of Object.entries(r)) {
|
|
383
|
+
const a = [...this.resolvePath, o];
|
|
384
|
+
i[o] = Pe(s, (l) => new O(l, a));
|
|
385
385
|
}
|
|
386
386
|
return i;
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsBase64(e) {
|
|
389
|
-
return new
|
|
389
|
+
return new L(v().getBlobContentAsBase64(this.handle, e));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsString(e) {
|
|
392
|
-
return new
|
|
392
|
+
return new L(v().getBlobContentAsString(this.handle, e));
|
|
393
393
|
}
|
|
394
394
|
getFileContentAsJson(e) {
|
|
395
|
-
return new
|
|
395
|
+
return new L(
|
|
396
396
|
v().getBlobContentAsString(this.handle, e)
|
|
397
397
|
).mapDefined((n) => JSON.parse(n));
|
|
398
398
|
}
|
|
@@ -412,7 +412,7 @@ class R {
|
|
|
412
412
|
* @returns downloaded file handle
|
|
413
413
|
*/
|
|
414
414
|
getFileHandle() {
|
|
415
|
-
return new
|
|
415
|
+
return new L(v().getDownloadedBlobContentHandle(this.handle));
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @deprecated use getFileHandle
|
|
@@ -424,7 +424,7 @@ class R {
|
|
|
424
424
|
* @returns downloaded file handle
|
|
425
425
|
*/
|
|
426
426
|
getRemoteFileHandle() {
|
|
427
|
-
return new
|
|
427
|
+
return new L(v().getOnDemandBlobContentHandle(this.handle));
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
430
|
* @deprecated use getRemoteFileHandle
|
|
@@ -436,22 +436,22 @@ class R {
|
|
|
436
436
|
* @returns the url to the extracted folder
|
|
437
437
|
*/
|
|
438
438
|
extractArchiveAndGetURL(e) {
|
|
439
|
-
return new
|
|
439
|
+
return new L(v().extractArchiveAndGetURL(this.handle, e));
|
|
440
440
|
}
|
|
441
441
|
getImportProgress() {
|
|
442
|
-
return new
|
|
442
|
+
return new L(v().getImportProgress(this.handle));
|
|
443
443
|
}
|
|
444
444
|
getLastLogs(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new L(v().getLastLogs(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLog(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new L(v().getProgressLog(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getProgressLogWithInfo(e) {
|
|
451
|
-
return new
|
|
451
|
+
return new L(v().getProgressLogWithInfo(this.handle, e));
|
|
452
452
|
}
|
|
453
453
|
getLogHandle() {
|
|
454
|
-
return new
|
|
454
|
+
return new L(v().getLogHandle(this.handle));
|
|
455
455
|
}
|
|
456
456
|
allFieldsResolved(e = "Input") {
|
|
457
457
|
switch (e) {
|
|
@@ -466,109 +466,109 @@ class R {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
mapFields(e, n) {
|
|
469
|
-
const { fieldType: r, requireLocked: i, skipUnresolved:
|
|
469
|
+
const { fieldType: r, requireLocked: i, skipUnresolved: o } = {
|
|
470
470
|
fieldType: "Input",
|
|
471
471
|
requireLocked: !0,
|
|
472
472
|
skipUnresolved: !1,
|
|
473
473
|
...n
|
|
474
|
-
},
|
|
474
|
+
}, s = e;
|
|
475
475
|
if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
476
476
|
return;
|
|
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
|
|
480
|
+
return o && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => s(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const $e = "staging", We = "main", xt = {
|
|
484
484
|
explicitColumnsSupport: !0,
|
|
485
485
|
inlineColumnsSupport: !0,
|
|
486
486
|
activeArgs: !0,
|
|
487
487
|
pTablePartitionFiltersSupport: !0,
|
|
488
488
|
pFrameInSetFilterSupport: !0
|
|
489
489
|
};
|
|
490
|
-
function
|
|
490
|
+
function Ge(t) {
|
|
491
491
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function be(t, e, n) {
|
|
494
494
|
if (e.has(n)) return;
|
|
495
495
|
if (e.add(n), typeof n === "object")
|
|
496
|
-
if (
|
|
496
|
+
if (Ge(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
497
497
|
else if (Array.isArray(n))
|
|
498
|
-
for (const i of n)
|
|
498
|
+
for (const i of n) be(t, e, i);
|
|
499
499
|
else
|
|
500
500
|
for (const [, i] of Object.entries(n))
|
|
501
|
-
i !== n &&
|
|
501
|
+
i !== n && be(t, e, i);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ft(t) {
|
|
504
504
|
const e = /* @__PURE__ */ new Set();
|
|
505
|
-
return
|
|
505
|
+
return be(e, /* @__PURE__ */ new Set(), t), e;
|
|
506
506
|
}
|
|
507
|
-
const
|
|
507
|
+
const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
508
508
|
__proto__: null,
|
|
509
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
510
|
-
MainAccessorName:
|
|
511
|
-
StagingAccessorName:
|
|
512
|
-
getAllFutureAwaits:
|
|
513
|
-
isFutureAwait:
|
|
514
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
515
|
-
type:
|
|
516
|
-
importance:
|
|
517
|
-
id:
|
|
518
|
-
label:
|
|
519
|
-
}),
|
|
520
|
-
function
|
|
521
|
-
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0,
|
|
509
|
+
GlobalCfgRenderCtxFeatureFlags: xt,
|
|
510
|
+
MainAccessorName: We,
|
|
511
|
+
StagingAccessorName: $e,
|
|
512
|
+
getAllFutureAwaits: Ft,
|
|
513
|
+
isFutureAwait: Ge
|
|
514
|
+
}, Symbol.toStringTag, { value: "Module" })), It = "pl7.app/label", _t = "pl7.app/trace", Lt = B.object({
|
|
515
|
+
type: B.string(),
|
|
516
|
+
importance: B.number().optional(),
|
|
517
|
+
id: B.string().optional(),
|
|
518
|
+
label: B.string()
|
|
519
|
+
}), Et = B.array(Lt), kt = 1e-3, Vt = "__LABEL__", Le = "__LABEL__@1";
|
|
520
|
+
function He(t, e, n = {}) {
|
|
521
|
+
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), s = t.map((d) => {
|
|
522
522
|
var c, b;
|
|
523
|
-
const
|
|
524
|
-
let p,
|
|
525
|
-
"spec" in
|
|
526
|
-
const E = (c = p.annotations) == null ? void 0 : c[
|
|
527
|
-
...
|
|
528
|
-
...
|
|
523
|
+
const g = e(d);
|
|
524
|
+
let p, y, C;
|
|
525
|
+
"spec" in g && typeof g.spec == "object" ? (p = g.spec, y = g.prefixTrace, C = g.suffixTrace) : p = g;
|
|
526
|
+
const E = (c = p.annotations) == null ? void 0 : c[It], x = (b = p.annotations) == null ? void 0 : b[_t], S = (x ? Et.safeParse(JSON.parse(x)).data : void 0) ?? [], P = [
|
|
527
|
+
...y ?? [],
|
|
528
|
+
...S,
|
|
529
529
|
...C ?? []
|
|
530
530
|
];
|
|
531
531
|
if (E !== void 0) {
|
|
532
|
-
const
|
|
533
|
-
n.addLabelAsSuffix ?
|
|
532
|
+
const I = { label: E, type: Vt, importance: -2 };
|
|
533
|
+
n.addLabelAsSuffix ? P.push(I) : P.splice(0, 0, I);
|
|
534
534
|
}
|
|
535
|
-
const
|
|
536
|
-
for (let
|
|
537
|
-
const { type:
|
|
538
|
-
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
|
|
535
|
+
const T = [], F = /* @__PURE__ */ new Map();
|
|
536
|
+
for (let I = P.length - 1; I >= 0; --I) {
|
|
537
|
+
const { type: $ } = P[I], K = P[I].importance ?? 0, j = (F.get($) ?? 0) + 1;
|
|
538
|
+
F.set($, j);
|
|
539
|
+
const N = `${$}@${j}`;
|
|
540
|
+
o.set(N, (o.get(N) ?? 0) + 1), r.set(
|
|
541
|
+
N,
|
|
542
542
|
Math.max(
|
|
543
|
-
r.get(
|
|
544
|
-
|
|
543
|
+
r.get(N) ?? Number.NEGATIVE_INFINITY,
|
|
544
|
+
K - (P.length - I) * kt
|
|
545
545
|
)
|
|
546
|
-
),
|
|
546
|
+
), T.push({ ...P[I], fullType: N, occurrenceIndex: j });
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return T.reverse(), {
|
|
549
549
|
value: d,
|
|
550
550
|
spec: p,
|
|
551
551
|
label: E,
|
|
552
|
-
fullTrace:
|
|
552
|
+
fullTrace: T
|
|
553
553
|
};
|
|
554
554
|
}), a = [], l = [], u = [...r];
|
|
555
|
-
u.sort(([, d], [,
|
|
555
|
+
u.sort(([, d], [, g]) => g - d);
|
|
556
556
|
for (const [d] of u)
|
|
557
|
-
d.endsWith("@1") ||
|
|
558
|
-
const h = (d,
|
|
557
|
+
d.endsWith("@1") || o.get(d) === t.length ? a.push(d) : l.push(d);
|
|
558
|
+
const h = (d, g = !1) => {
|
|
559
559
|
const p = [];
|
|
560
|
-
for (let
|
|
561
|
-
const C =
|
|
560
|
+
for (let y = 0; y < s.length; y++) {
|
|
561
|
+
const C = s[y], E = C.fullTrace.filter((P) => d.has(P.fullType) || i && i.has(P.type));
|
|
562
562
|
if (E.length === 0)
|
|
563
|
-
if (
|
|
563
|
+
if (g)
|
|
564
564
|
p.push({
|
|
565
565
|
label: "Unlabeled",
|
|
566
566
|
value: C.value
|
|
567
567
|
});
|
|
568
568
|
else return;
|
|
569
|
-
const
|
|
569
|
+
const x = E.map((P) => P.label), S = n.separator ?? " / ";
|
|
570
570
|
p.push({
|
|
571
|
-
label:
|
|
571
|
+
label: x.join(S),
|
|
572
572
|
value: C.value
|
|
573
573
|
});
|
|
574
574
|
}
|
|
@@ -576,104 +576,104 @@ function Be(t, e, n = {}) {
|
|
|
576
576
|
};
|
|
577
577
|
if (a.length === 0) {
|
|
578
578
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
579
|
-
return h(new Set(
|
|
579
|
+
return h(new Set(Le), !0);
|
|
580
580
|
}
|
|
581
|
-
let f = 0,
|
|
581
|
+
let f = 0, m = -1;
|
|
582
582
|
for (; f < a.length; ) {
|
|
583
583
|
const d = /* @__PURE__ */ new Set();
|
|
584
|
-
n.includeNativeLabel && d.add(
|
|
584
|
+
n.includeNativeLabel && d.add(Le);
|
|
585
585
|
for (let p = 0; p < f; ++p) d.add(a[p]);
|
|
586
|
-
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
|
|
586
|
+
m >= 0 && d.add(a[m]);
|
|
587
|
+
const g = h(d);
|
|
588
|
+
if (g !== void 0 && new Set(g.map((p) => p.label)).size === t.length) return g;
|
|
589
|
+
m++, m >= a.length && (f++, m = f);
|
|
590
590
|
}
|
|
591
591
|
return h(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
592
592
|
}
|
|
593
|
-
const
|
|
594
|
-
function
|
|
593
|
+
const ee = "PColumnData/", le = ee + "ResourceMap", ue = ee + "Partitioned/ResourceMap", H = ee + "JsonPartitioned", J = ee + "BinaryPartitioned", ze = ee + "Partitioned/", ce = ze + "JsonPartitioned", z = ze + "BinaryPartitioned";
|
|
594
|
+
function Xe(t, e, n, r = [], i) {
|
|
595
595
|
if (t === void 0) return !1;
|
|
596
596
|
switch (t.resourceType.name) {
|
|
597
|
-
case
|
|
598
|
-
let
|
|
599
|
-
for (const
|
|
600
|
-
const a = t.resolve({ field:
|
|
601
|
-
u === void 0 && (
|
|
597
|
+
case le: {
|
|
598
|
+
let o = t.getInputsLocked();
|
|
599
|
+
for (const s of t.listInputFields()) {
|
|
600
|
+
const a = t.resolve({ field: s, assertFieldType: "Input" }), l = [...r, ...JSON.parse(s)], u = a === void 0 ? void 0 : e(a);
|
|
601
|
+
u === void 0 && (o = !1), (u !== void 0 || i) && n.push({ key: l, value: u });
|
|
602
602
|
}
|
|
603
|
-
return
|
|
603
|
+
return o;
|
|
604
604
|
}
|
|
605
|
-
case
|
|
606
|
-
let
|
|
607
|
-
for (const
|
|
608
|
-
const a = t.resolve({ field:
|
|
609
|
-
if (a === void 0)
|
|
605
|
+
case ue: {
|
|
606
|
+
let o = t.getInputsLocked();
|
|
607
|
+
for (const s of t.listInputFields()) {
|
|
608
|
+
const a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
609
|
+
if (a === void 0) o = !1;
|
|
610
610
|
else {
|
|
611
|
-
const l = [...r, ...JSON.parse(
|
|
611
|
+
const l = [...r, ...JSON.parse(s)], u = Xe(
|
|
612
612
|
a,
|
|
613
613
|
e,
|
|
614
614
|
n,
|
|
615
615
|
l,
|
|
616
616
|
i
|
|
617
617
|
);
|
|
618
|
-
|
|
618
|
+
o = o && u;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
return
|
|
621
|
+
return o;
|
|
622
622
|
}
|
|
623
623
|
default:
|
|
624
624
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function $n(t, e, n = !1) {
|
|
628
628
|
const r = [];
|
|
629
|
-
return { isComplete:
|
|
629
|
+
return { isComplete: Xe(t, e, r, [], n), data: r };
|
|
630
630
|
}
|
|
631
|
-
const
|
|
631
|
+
const ve = (t) => {
|
|
632
632
|
if (t.endsWith(".index"))
|
|
633
633
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
634
634
|
if (t.endsWith(".values"))
|
|
635
635
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
636
636
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
637
637
|
};
|
|
638
|
-
function
|
|
638
|
+
function Ot(t) {
|
|
639
639
|
if (!t) return;
|
|
640
640
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
641
641
|
let i = 0;
|
|
642
642
|
switch (e) {
|
|
643
|
-
case
|
|
643
|
+
case le:
|
|
644
644
|
i = n.keyLength;
|
|
645
645
|
break;
|
|
646
|
-
case
|
|
646
|
+
case ue:
|
|
647
647
|
i = n.partitionKeyLength + n.keyLength;
|
|
648
648
|
break;
|
|
649
649
|
case H:
|
|
650
|
-
case
|
|
650
|
+
case J:
|
|
651
651
|
i = n.partitionKeyLength;
|
|
652
652
|
break;
|
|
653
|
-
case
|
|
654
|
-
case
|
|
653
|
+
case z:
|
|
654
|
+
case ce:
|
|
655
655
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
656
656
|
break;
|
|
657
657
|
}
|
|
658
658
|
switch (e) {
|
|
659
|
-
case
|
|
659
|
+
case le:
|
|
660
660
|
case H:
|
|
661
|
-
case
|
|
662
|
-
for (let
|
|
663
|
-
e ===
|
|
664
|
-
const
|
|
665
|
-
r.push(
|
|
661
|
+
case J:
|
|
662
|
+
for (let o of t.listInputFields()) {
|
|
663
|
+
e === J && (o = ve(o).baseKey);
|
|
664
|
+
const s = [...JSON.parse(o)];
|
|
665
|
+
r.push(s);
|
|
666
666
|
}
|
|
667
667
|
break;
|
|
668
|
-
case
|
|
669
|
-
case
|
|
670
|
-
case
|
|
671
|
-
for (const
|
|
672
|
-
const
|
|
668
|
+
case ue:
|
|
669
|
+
case z:
|
|
670
|
+
case ce:
|
|
671
|
+
for (const o of t.listInputFields()) {
|
|
672
|
+
const s = [...JSON.parse(o)], a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
673
673
|
if (a !== void 0)
|
|
674
674
|
for (let l of a.listInputFields()) {
|
|
675
|
-
e ===
|
|
676
|
-
const u = [...
|
|
675
|
+
e === z && (l = ve(l).baseKey);
|
|
676
|
+
const u = [...s, ...JSON.parse(l)];
|
|
677
677
|
r.push(u);
|
|
678
678
|
}
|
|
679
679
|
}
|
|
@@ -681,60 +681,60 @@ function Tt(t) {
|
|
|
681
681
|
}
|
|
682
682
|
return { data: r, keyLength: i };
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Dt(t) {
|
|
685
685
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
686
686
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
687
687
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
688
688
|
for (let i = 0; i < n; ++i)
|
|
689
689
|
r.push(/* @__PURE__ */ new Set());
|
|
690
690
|
for (const i of e) {
|
|
691
|
-
const
|
|
692
|
-
if (
|
|
691
|
+
const o = i.key;
|
|
692
|
+
if (o.length !== n)
|
|
693
693
|
throw new Error(
|
|
694
|
-
`Key length (${
|
|
695
|
-
|
|
694
|
+
`Key length (${o.length}) does not match partition length (${n}) for key: ${JSON.stringify(
|
|
695
|
+
o
|
|
696
696
|
)}`
|
|
697
697
|
);
|
|
698
|
-
for (let
|
|
699
|
-
r[
|
|
698
|
+
for (let s = 0; s < n; ++s)
|
|
699
|
+
r[s].add(o[s]);
|
|
700
700
|
}
|
|
701
701
|
return r.map((i) => Array.from(i.values()));
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Rt(t) {
|
|
704
704
|
if (t === void 0) return;
|
|
705
|
-
if (
|
|
706
|
-
return
|
|
707
|
-
const e =
|
|
705
|
+
if (je(t))
|
|
706
|
+
return Dt(t);
|
|
707
|
+
const e = Ot(t);
|
|
708
708
|
if (!e) return;
|
|
709
709
|
const { data: n, keyLength: r } = e, i = [];
|
|
710
|
-
for (let
|
|
710
|
+
for (let o = 0; o < r; ++o)
|
|
711
711
|
i.push(/* @__PURE__ */ new Set());
|
|
712
|
-
for (const
|
|
713
|
-
if (
|
|
712
|
+
for (const o of n) {
|
|
713
|
+
if (o.length !== r)
|
|
714
714
|
throw new Error("key length does not match partition length");
|
|
715
|
-
for (let
|
|
716
|
-
i[
|
|
715
|
+
for (let s = 0; s < r; ++s)
|
|
716
|
+
i[s].add(o[s]);
|
|
717
717
|
}
|
|
718
|
-
return i.map((
|
|
718
|
+
return i.map((o) => Array.from(o.values()));
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Ce(t, e = []) {
|
|
721
721
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
722
722
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
723
|
-
if (e.length > 0 && (n ===
|
|
723
|
+
if (e.length > 0 && (n === ce || n === z))
|
|
724
724
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
725
725
|
switch (n) {
|
|
726
|
-
case
|
|
727
|
-
case
|
|
726
|
+
case le:
|
|
727
|
+
case ue:
|
|
728
728
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
729
729
|
case H: {
|
|
730
730
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
731
731
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
732
732
|
const i = [];
|
|
733
|
-
for (const
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
736
|
-
const a = [...e, ...JSON.parse(
|
|
737
|
-
i.push({ key: a, value:
|
|
733
|
+
for (const o of t.listInputFields()) {
|
|
734
|
+
const s = t.resolve({ field: o, assertFieldType: "Input" });
|
|
735
|
+
if (s === void 0) return;
|
|
736
|
+
const a = [...e, ...JSON.parse(o)];
|
|
737
|
+
i.push({ key: a, value: s });
|
|
738
738
|
}
|
|
739
739
|
return {
|
|
740
740
|
type: "JsonPartitioned",
|
|
@@ -742,19 +742,19 @@ function be(t, e = []) {
|
|
|
742
742
|
parts: i
|
|
743
743
|
};
|
|
744
744
|
}
|
|
745
|
-
case
|
|
745
|
+
case J: {
|
|
746
746
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
747
747
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
748
|
-
const i = [],
|
|
749
|
-
for (const
|
|
750
|
-
const a =
|
|
748
|
+
const i = [], o = /* @__PURE__ */ new Map();
|
|
749
|
+
for (const s of t.listInputFields()) {
|
|
750
|
+
const a = ve(s), l = t.resolve({ field: s, assertFieldType: "Input" });
|
|
751
751
|
if (l === void 0) return;
|
|
752
|
-
let u =
|
|
753
|
-
u || (u = {},
|
|
752
|
+
let u = o.get(a.baseKey);
|
|
753
|
+
u || (u = {}, o.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
|
|
754
754
|
}
|
|
755
|
-
for (const [
|
|
755
|
+
for (const [s, a] of o.entries()) {
|
|
756
756
|
if (!a.index || !a.values) return;
|
|
757
|
-
const l = [...e, ...JSON.parse(
|
|
757
|
+
const l = [...e, ...JSON.parse(s)];
|
|
758
758
|
i.push({
|
|
759
759
|
key: l,
|
|
760
760
|
value: {
|
|
@@ -769,127 +769,127 @@ function be(t, e = []) {
|
|
|
769
769
|
parts: i
|
|
770
770
|
};
|
|
771
771
|
}
|
|
772
|
-
case
|
|
772
|
+
case ce: {
|
|
773
773
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
774
774
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
775
|
-
const i = r.superPartitionKeyLength + r.partitionKeyLength,
|
|
776
|
-
for (const
|
|
777
|
-
const a = t.resolve({ field:
|
|
775
|
+
const i = r.superPartitionKeyLength + r.partitionKeyLength, o = [];
|
|
776
|
+
for (const s of t.listInputFields()) {
|
|
777
|
+
const a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
778
778
|
if (a === void 0) return;
|
|
779
779
|
if (a.resourceType.name !== H)
|
|
780
780
|
throw new Error(`Expected ${H} inside ${n}, but got ${a.resourceType.name}`);
|
|
781
|
-
const l =
|
|
781
|
+
const l = Ce(a, JSON.parse(s));
|
|
782
782
|
if (l === void 0) return;
|
|
783
783
|
if (l.type !== "JsonPartitioned")
|
|
784
784
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
785
|
-
|
|
785
|
+
o.push(...l.parts);
|
|
786
786
|
}
|
|
787
787
|
return {
|
|
788
788
|
type: "JsonPartitioned",
|
|
789
789
|
partitionKeyLength: i,
|
|
790
|
-
parts:
|
|
790
|
+
parts: o
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
|
-
case
|
|
793
|
+
case z: {
|
|
794
794
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
795
795
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
796
|
-
const i = r.superPartitionKeyLength + r.partitionKeyLength,
|
|
797
|
-
for (const
|
|
798
|
-
const a = t.resolve({ field:
|
|
796
|
+
const i = r.superPartitionKeyLength + r.partitionKeyLength, o = [];
|
|
797
|
+
for (const s of t.listInputFields()) {
|
|
798
|
+
const a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
799
799
|
if (a === void 0) return;
|
|
800
|
-
if (a.resourceType.name !==
|
|
801
|
-
throw new Error(`Expected ${
|
|
802
|
-
const l =
|
|
800
|
+
if (a.resourceType.name !== J)
|
|
801
|
+
throw new Error(`Expected ${J} inside ${n}, but got ${a.resourceType.name}`);
|
|
802
|
+
const l = Ce(a, JSON.parse(s));
|
|
803
803
|
if (l === void 0) return;
|
|
804
804
|
if (l.type !== "BinaryPartitioned")
|
|
805
805
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
806
|
-
|
|
806
|
+
o.push(...l.parts);
|
|
807
807
|
}
|
|
808
808
|
return {
|
|
809
809
|
type: "BinaryPartitioned",
|
|
810
810
|
partitionKeyLength: i,
|
|
811
|
-
parts:
|
|
811
|
+
parts: o
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
814
|
default:
|
|
815
815
|
throw new Error(`Unknown resource type: ${n}`);
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Nt(t) {
|
|
819
819
|
if (t !== void 0) {
|
|
820
|
-
if (
|
|
821
|
-
if (
|
|
822
|
-
if (t instanceof
|
|
820
|
+
if (je(t)) return t;
|
|
821
|
+
if (pe(t)) return ot(t);
|
|
822
|
+
if (t instanceof O) return Ce(t);
|
|
823
823
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
const n = [...e].sort((
|
|
826
|
+
function Ut(t, e) {
|
|
827
|
+
const n = [...e].sort((o, s) => s[0] - o[0]);
|
|
828
828
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
829
|
-
const { partitionKeyLength:
|
|
830
|
-
for (const [
|
|
831
|
-
if (
|
|
832
|
-
throw new Error(`Can't filter on non-partitioned axis ${
|
|
829
|
+
const { partitionKeyLength: o } = t;
|
|
830
|
+
for (const [s] of e)
|
|
831
|
+
if (s >= o)
|
|
832
|
+
throw new Error(`Can't filter on non-partitioned axis ${s}. Must be >= ${o}`);
|
|
833
833
|
} else if (t.type === "Json") {
|
|
834
|
-
const { keyLength:
|
|
835
|
-
for (const [
|
|
836
|
-
if (
|
|
837
|
-
throw new Error(`Can't filter on non-data axis ${
|
|
838
|
-
}
|
|
839
|
-
const r = (
|
|
840
|
-
for (const [
|
|
841
|
-
if (s
|
|
834
|
+
const { keyLength: o } = t;
|
|
835
|
+
for (const [s] of e)
|
|
836
|
+
if (s >= o)
|
|
837
|
+
throw new Error(`Can't filter on non-data axis ${s}. Must be >= ${o}`);
|
|
838
|
+
}
|
|
839
|
+
const r = (o) => {
|
|
840
|
+
for (const [s, a] of n)
|
|
841
|
+
if (o[s] !== a)
|
|
842
842
|
return !1;
|
|
843
843
|
return !0;
|
|
844
|
-
}, i = (
|
|
845
|
-
const
|
|
844
|
+
}, i = (o) => {
|
|
845
|
+
const s = [...o];
|
|
846
846
|
for (const [a] of n)
|
|
847
|
-
|
|
848
|
-
return
|
|
847
|
+
s.splice(a, 1);
|
|
848
|
+
return s;
|
|
849
849
|
};
|
|
850
850
|
switch (t.type) {
|
|
851
851
|
case "Json": {
|
|
852
|
-
const
|
|
853
|
-
key: i(
|
|
854
|
-
value:
|
|
852
|
+
const o = t.data.filter((s) => r(s.key)).map((s) => ({
|
|
853
|
+
key: i(s.key),
|
|
854
|
+
value: s.value
|
|
855
855
|
}));
|
|
856
856
|
return {
|
|
857
857
|
type: "Json",
|
|
858
858
|
keyLength: t.keyLength - e.length,
|
|
859
|
-
data:
|
|
859
|
+
data: o
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
862
|
case "JsonPartitioned": {
|
|
863
|
-
const
|
|
864
|
-
key: i(
|
|
865
|
-
value:
|
|
863
|
+
const o = t.parts.filter((s) => r(s.key)).map((s) => ({
|
|
864
|
+
key: i(s.key),
|
|
865
|
+
value: s.value
|
|
866
866
|
}));
|
|
867
867
|
return {
|
|
868
868
|
type: "JsonPartitioned",
|
|
869
869
|
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
870
|
-
parts:
|
|
870
|
+
parts: o
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
case "BinaryPartitioned": {
|
|
874
|
-
const
|
|
875
|
-
key: i(
|
|
876
|
-
value:
|
|
874
|
+
const o = t.parts.filter((s) => r(s.key)).map((s) => ({
|
|
875
|
+
key: i(s.key),
|
|
876
|
+
value: s.value
|
|
877
877
|
}));
|
|
878
878
|
return {
|
|
879
879
|
type: "BinaryPartitioned",
|
|
880
880
|
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
881
|
-
parts:
|
|
881
|
+
parts: o
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function Kt(t) {
|
|
887
887
|
if (!Array.isArray(t)) return !1;
|
|
888
888
|
if (t.length === 0) return !0;
|
|
889
889
|
const e = t[0];
|
|
890
890
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
891
891
|
}
|
|
892
|
-
class
|
|
892
|
+
class Mt {
|
|
893
893
|
constructor(e) {
|
|
894
894
|
this.columns = e;
|
|
895
895
|
}
|
|
@@ -898,30 +898,30 @@ class Rt {
|
|
|
898
898
|
return this.columns.filter((r) => n(r.spec));
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function jt(t) {
|
|
902
902
|
if (t)
|
|
903
903
|
return t.map((e) => ({
|
|
904
|
-
type: `split:${
|
|
904
|
+
type: `split:${ut(e.axisId)}`,
|
|
905
905
|
label: e.label,
|
|
906
906
|
importance: 1e6
|
|
907
907
|
// High importance for split filters in labels
|
|
908
908
|
}));
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function qt(t) {
|
|
911
911
|
if (t)
|
|
912
912
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Bt(t, e) {
|
|
915
915
|
if (!e || e.length === 0) return t;
|
|
916
916
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
917
|
-
return
|
|
917
|
+
return qe({ id: t, axisFilters: n });
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Ee(t) {
|
|
920
920
|
if (!t || typeof t != "object") return !1;
|
|
921
921
|
const e = t, n = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
922
922
|
return !!e.domainAnchor || n || r;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function Jt(t) {
|
|
925
925
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
926
926
|
return [];
|
|
927
927
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -929,10 +929,10 @@ function Vt(t) {
|
|
|
929
929
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
930
930
|
return e.sort((n, r) => n - r), e;
|
|
931
931
|
}
|
|
932
|
-
class
|
|
932
|
+
class Q {
|
|
933
933
|
constructor() {
|
|
934
934
|
k(this, "defaultProviderStore", []);
|
|
935
|
-
k(this, "providers", [new
|
|
935
|
+
k(this, "providers", [new Mt(this.defaultProviderStore)]);
|
|
936
936
|
k(this, "axisLabelProviders", []);
|
|
937
937
|
}
|
|
938
938
|
addColumnProvider(e) {
|
|
@@ -955,94 +955,94 @@ class X {
|
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
getUniversalEntries(e, n) {
|
|
958
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData:
|
|
959
|
-
...
|
|
958
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: o = !1, overrideLabelAnnotation: s = !1, exclude: a } = n ?? {}, l = {
|
|
959
|
+
...s && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
960
960
|
...i ?? {}
|
|
961
961
|
};
|
|
962
962
|
let u = () => !1;
|
|
963
963
|
if (a) {
|
|
964
|
-
const p = (Array.isArray(a) ? a : [a]).map((
|
|
965
|
-
if (
|
|
964
|
+
const p = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
965
|
+
if (Ee(y)) {
|
|
966
966
|
if (!r)
|
|
967
967
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
968
|
-
return Y(we(r.anchors,
|
|
968
|
+
return Y(we(r.anchors, y, n));
|
|
969
969
|
} else
|
|
970
|
-
return Y(
|
|
970
|
+
return Y(y);
|
|
971
971
|
});
|
|
972
|
-
u = (
|
|
972
|
+
u = (y) => p.some((C) => C(y));
|
|
973
973
|
}
|
|
974
|
-
const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [],
|
|
974
|
+
const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], m = /* @__PURE__ */ new Set();
|
|
975
975
|
for (const p of h) {
|
|
976
|
-
const
|
|
976
|
+
const y = Ee(p);
|
|
977
977
|
let C;
|
|
978
|
-
if (
|
|
978
|
+
if (y) {
|
|
979
979
|
if (!r)
|
|
980
980
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
981
981
|
C = we(r.anchors, p, n);
|
|
982
982
|
} else
|
|
983
983
|
C = p;
|
|
984
|
-
const E = /* @__PURE__ */ new Set(),
|
|
985
|
-
for (const
|
|
986
|
-
const
|
|
987
|
-
for (const c of
|
|
984
|
+
const E = /* @__PURE__ */ new Set(), x = [];
|
|
985
|
+
for (const T of this.providers) {
|
|
986
|
+
const F = T.selectColumns(C);
|
|
987
|
+
for (const c of F) {
|
|
988
988
|
if (u(c.spec)) continue;
|
|
989
989
|
if (E.has(c.id))
|
|
990
|
-
throw new Error(`Duplicate column id ${c.id} in provider ${
|
|
991
|
-
const b =
|
|
992
|
-
|
|
990
|
+
throw new Error(`Duplicate column id ${c.id} in provider ${T.constructor.name}`);
|
|
991
|
+
const b = st(c.spec);
|
|
992
|
+
m.has(b) || (E.add(c.id), m.add(b), x.push(c));
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
if (
|
|
996
|
-
const
|
|
997
|
-
for (const
|
|
998
|
-
if (!
|
|
999
|
-
const
|
|
1000
|
-
if (
|
|
1001
|
-
if (
|
|
1002
|
-
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${
|
|
1003
|
-
const c =
|
|
995
|
+
if (x.length === 0) continue;
|
|
996
|
+
const S = Jt(p), P = S.length > 0;
|
|
997
|
+
for (const T of x) {
|
|
998
|
+
if (!oe(T.spec)) continue;
|
|
999
|
+
const F = T.spec;
|
|
1000
|
+
if (P) {
|
|
1001
|
+
if (Kt(T.data))
|
|
1002
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${T.id}`);
|
|
1003
|
+
const c = Nt(T.data);
|
|
1004
1004
|
if (!c) {
|
|
1005
|
-
if (
|
|
1005
|
+
if (o) continue;
|
|
1006
1006
|
return;
|
|
1007
1007
|
}
|
|
1008
|
-
if (!
|
|
1009
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${
|
|
1010
|
-
const b =
|
|
1011
|
-
if (
|
|
1012
|
-
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${
|
|
1013
|
-
const
|
|
1014
|
-
if (W >=
|
|
1015
|
-
if (
|
|
1008
|
+
if (!at(c))
|
|
1009
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c.type} for column ${T.id}`);
|
|
1010
|
+
const b = Rt(c), I = S[S.length - 1];
|
|
1011
|
+
if (I >= c.partitionKeyLength)
|
|
1012
|
+
throw new Error(`Not enough partition keys (${c.partitionKeyLength}) for requested split axes (max index ${I}) in column ${F.name}`);
|
|
1013
|
+
const $ = S.map((_) => this.findLabels(V(F.axesSpec[_]))), K = [], j = (_, W) => {
|
|
1014
|
+
if (W >= S.length) {
|
|
1015
|
+
if (K.push([..._]), K.length > 1e4)
|
|
1016
1016
|
throw new Error("Too many key combinations, aborting.");
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
|
-
const M =
|
|
1019
|
+
const M = S[W];
|
|
1020
1020
|
if (M >= b.length)
|
|
1021
|
-
throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${b.length}) during split key generation for column ${
|
|
1022
|
-
const
|
|
1023
|
-
if (!
|
|
1024
|
-
|
|
1021
|
+
throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${b.length}) during split key generation for column ${T.id}`);
|
|
1022
|
+
const q = b[M];
|
|
1023
|
+
if (!q || q.length === 0) {
|
|
1024
|
+
K.length = 0;
|
|
1025
1025
|
return;
|
|
1026
1026
|
}
|
|
1027
|
-
for (const
|
|
1028
|
-
|
|
1027
|
+
for (const te of q)
|
|
1028
|
+
_.push(te), j(_, W + 1), _.pop();
|
|
1029
1029
|
};
|
|
1030
|
-
if (j([], 0),
|
|
1030
|
+
if (j([], 0), K.length === 0)
|
|
1031
1031
|
continue;
|
|
1032
|
-
const
|
|
1033
|
-
for (let
|
|
1034
|
-
|
|
1035
|
-
const
|
|
1036
|
-
for (const
|
|
1037
|
-
const W =
|
|
1038
|
-
const
|
|
1039
|
-
return { axisIdx:
|
|
1032
|
+
const N = [...F.axesSpec], Ze = S.map((_) => _);
|
|
1033
|
+
for (let _ = S.length - 1; _ >= 0; _--)
|
|
1034
|
+
N.splice(S[_], 1);
|
|
1035
|
+
const et = { ...F, axesSpec: N };
|
|
1036
|
+
for (const _ of K) {
|
|
1037
|
+
const W = _.map((M, q) => {
|
|
1038
|
+
const te = Ze[q], tt = V(F.axesSpec[te]), de = $[q], nt = (de == null ? void 0 : de[M]) ?? String(M);
|
|
1039
|
+
return { axisIdx: te, axisId: tt, value: M, label: nt };
|
|
1040
1040
|
});
|
|
1041
1041
|
f.push({
|
|
1042
1042
|
type: "split",
|
|
1043
|
-
originalColumn:
|
|
1044
|
-
spec:
|
|
1045
|
-
adjustedSpec:
|
|
1043
|
+
originalColumn: T,
|
|
1044
|
+
spec: F,
|
|
1045
|
+
adjustedSpec: et,
|
|
1046
1046
|
dataEntries: c,
|
|
1047
1047
|
axisFilters: W
|
|
1048
1048
|
});
|
|
@@ -1050,40 +1050,40 @@ class X {
|
|
|
1050
1050
|
} else
|
|
1051
1051
|
f.push({
|
|
1052
1052
|
type: "direct",
|
|
1053
|
-
originalColumn:
|
|
1054
|
-
spec:
|
|
1055
|
-
adjustedSpec:
|
|
1053
|
+
originalColumn: T,
|
|
1054
|
+
spec: F,
|
|
1055
|
+
adjustedSpec: F
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
if (f.length === 0) return [];
|
|
1060
|
-
const d =
|
|
1060
|
+
const d = He(
|
|
1061
1061
|
f,
|
|
1062
1062
|
(p) => ({
|
|
1063
1063
|
spec: p.spec,
|
|
1064
|
-
suffixTrace: p.type === "split" ?
|
|
1064
|
+
suffixTrace: p.type === "split" ? jt(p.axisFilters) : void 0
|
|
1065
1065
|
}),
|
|
1066
1066
|
l
|
|
1067
|
-
),
|
|
1068
|
-
for (const { value: p, label:
|
|
1069
|
-
const { originalColumn: C, spec: E } = p,
|
|
1070
|
-
let
|
|
1071
|
-
r ?
|
|
1072
|
-
let
|
|
1073
|
-
|
|
1074
|
-
...
|
|
1067
|
+
), g = [];
|
|
1068
|
+
for (const { value: p, label: y } of d) {
|
|
1069
|
+
const { originalColumn: C, spec: E } = p, x = p.type === "split" ? p.axisFilters : void 0, S = qt(x);
|
|
1070
|
+
let P;
|
|
1071
|
+
r ? P = r.deriveS(E, S) : P = Bt(C.id, S);
|
|
1072
|
+
let T = { ...p.adjustedSpec };
|
|
1073
|
+
s && (T = {
|
|
1074
|
+
...T,
|
|
1075
1075
|
annotations: {
|
|
1076
|
-
...
|
|
1077
|
-
"pl7.app/label":
|
|
1076
|
+
...T.annotations ?? {},
|
|
1077
|
+
"pl7.app/label": y
|
|
1078
1078
|
}
|
|
1079
|
-
}),
|
|
1080
|
-
id:
|
|
1081
|
-
spec:
|
|
1082
|
-
data: () => p.type === "split" ?
|
|
1083
|
-
label:
|
|
1079
|
+
}), g.push({
|
|
1080
|
+
id: P,
|
|
1081
|
+
spec: T,
|
|
1082
|
+
data: () => p.type === "split" ? lt(Ut(p.dataEntries, S)) : p.originalColumn.data,
|
|
1083
|
+
label: y
|
|
1084
1084
|
});
|
|
1085
1085
|
}
|
|
1086
|
-
return
|
|
1086
|
+
return g;
|
|
1087
1087
|
}
|
|
1088
1088
|
getColumns(e, n) {
|
|
1089
1089
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1093,65 +1093,65 @@ class X {
|
|
|
1093
1093
|
});
|
|
1094
1094
|
if (!r) return;
|
|
1095
1095
|
const i = [];
|
|
1096
|
-
for (const
|
|
1097
|
-
const
|
|
1098
|
-
if (!
|
|
1096
|
+
for (const o of r) {
|
|
1097
|
+
const s = o.data();
|
|
1098
|
+
if (!s) {
|
|
1099
1099
|
if (n != null && n.dontWaitAllData) continue;
|
|
1100
1100
|
return;
|
|
1101
1101
|
}
|
|
1102
1102
|
i.push({
|
|
1103
|
-
id:
|
|
1104
|
-
spec:
|
|
1105
|
-
data:
|
|
1103
|
+
id: o.id,
|
|
1104
|
+
spec: o.spec,
|
|
1105
|
+
data: s
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
return i;
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Te(t) {
|
|
1112
1112
|
const e = (i) => i.operator !== "InSet" ? i : {
|
|
1113
1113
|
operator: "Or",
|
|
1114
|
-
operands: i.references.map((
|
|
1114
|
+
operands: i.references.map((o) => ({
|
|
1115
1115
|
operator: "Equal",
|
|
1116
|
-
reference:
|
|
1116
|
+
reference: o
|
|
1117
1117
|
}))
|
|
1118
|
-
}, n = (i,
|
|
1118
|
+
}, n = (i, o) => {
|
|
1119
1119
|
switch (i.operator) {
|
|
1120
1120
|
case "And":
|
|
1121
1121
|
return {
|
|
1122
1122
|
...i,
|
|
1123
|
-
operands: i.operands.map((a) => n(a,
|
|
1123
|
+
operands: i.operands.map((a) => n(a, o))
|
|
1124
1124
|
};
|
|
1125
1125
|
case "Or":
|
|
1126
1126
|
return {
|
|
1127
1127
|
...i,
|
|
1128
|
-
operands: i.operands.map((a) => n(a,
|
|
1128
|
+
operands: i.operands.map((a) => n(a, o))
|
|
1129
1129
|
};
|
|
1130
1130
|
case "Not":
|
|
1131
1131
|
return {
|
|
1132
1132
|
...i,
|
|
1133
|
-
operand: n(i.operand,
|
|
1133
|
+
operand: n(i.operand, o)
|
|
1134
1134
|
};
|
|
1135
1135
|
default:
|
|
1136
|
-
return
|
|
1136
|
+
return o(i);
|
|
1137
1137
|
}
|
|
1138
|
-
}, r = (i,
|
|
1138
|
+
}, r = (i, o) => ({
|
|
1139
1139
|
...i,
|
|
1140
|
-
predicate: n(i.predicate,
|
|
1140
|
+
predicate: n(i.predicate, o)
|
|
1141
1141
|
});
|
|
1142
1142
|
return t.map((i) => r(i, e));
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function he(t, e) {
|
|
1145
1145
|
if (t === void 0) return e === void 0;
|
|
1146
1146
|
if (e === void 0) return !0;
|
|
1147
1147
|
for (const n in e)
|
|
1148
1148
|
if (t[n] !== e[n]) return !1;
|
|
1149
1149
|
return !0;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1151
|
+
function ke(t) {
|
|
1152
|
+
return Pe(t, (e) => e instanceof O ? e.handle : pe(e) ? mt(e, (n) => n.handle) : e);
|
|
1153
1153
|
}
|
|
1154
|
-
class
|
|
1154
|
+
class $t {
|
|
1155
1155
|
constructor() {
|
|
1156
1156
|
k(this, "ctx", v());
|
|
1157
1157
|
}
|
|
@@ -1163,27 +1163,27 @@ class Mt {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
getOptions(e, n) {
|
|
1165
1165
|
const r = typeof e == "function" ? e : Y(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1166
|
-
let
|
|
1167
|
-
return typeof n < "u" && (typeof n == "function" ?
|
|
1168
|
-
ref:
|
|
1166
|
+
let o = {}, s = !1;
|
|
1167
|
+
return typeof n < "u" && (typeof n == "function" ? o = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? o = n : (n = n, o = n.label ?? {}, s = n.refsWithEnrichments ?? !1))), typeof o == "object" ? He(i, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1168
|
+
ref: xe(a, s),
|
|
1169
1169
|
label: l
|
|
1170
1170
|
})) : i.map(({ ref: a, obj: l }) => ({
|
|
1171
|
-
ref:
|
|
1172
|
-
label:
|
|
1171
|
+
ref: xe(a, s),
|
|
1172
|
+
label: o(l, a)
|
|
1173
1173
|
}));
|
|
1174
1174
|
}
|
|
1175
1175
|
resolveAnchorCtx(e) {
|
|
1176
|
-
if (e instanceof
|
|
1176
|
+
if (e instanceof Fe) return e;
|
|
1177
1177
|
const n = {};
|
|
1178
1178
|
for (const [r, i] of Object.entries(e))
|
|
1179
|
-
if (
|
|
1180
|
-
const
|
|
1181
|
-
if (!
|
|
1179
|
+
if (ct(i)) {
|
|
1180
|
+
const o = this.getPColumnSpecByRef(i);
|
|
1181
|
+
if (!o)
|
|
1182
1182
|
return;
|
|
1183
|
-
n[r] =
|
|
1183
|
+
n[r] = o;
|
|
1184
1184
|
} else
|
|
1185
1185
|
n[r] = i;
|
|
1186
|
-
return new
|
|
1186
|
+
return new Fe(n);
|
|
1187
1187
|
}
|
|
1188
1188
|
/**
|
|
1189
1189
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1196,7 +1196,7 @@ class Mt {
|
|
|
1196
1196
|
getAnchoredPColumns(e, n, r) {
|
|
1197
1197
|
const i = this.resolveAnchorCtx(e);
|
|
1198
1198
|
if (i)
|
|
1199
|
-
return new
|
|
1199
|
+
return new Q().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n, {
|
|
1200
1200
|
...r,
|
|
1201
1201
|
anchorCtx: i
|
|
1202
1202
|
});
|
|
@@ -1233,14 +1233,14 @@ class Mt {
|
|
|
1233
1233
|
getCanonicalOptions(e, n, r) {
|
|
1234
1234
|
const i = this.resolveAnchorCtx(e);
|
|
1235
1235
|
if (!i) return;
|
|
1236
|
-
const
|
|
1236
|
+
const o = new Q().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n, {
|
|
1237
1237
|
...r,
|
|
1238
1238
|
anchorCtx: i
|
|
1239
1239
|
});
|
|
1240
|
-
if (
|
|
1241
|
-
return
|
|
1242
|
-
value:
|
|
1243
|
-
label:
|
|
1240
|
+
if (o)
|
|
1241
|
+
return o.map((s) => ({
|
|
1242
|
+
value: s.id,
|
|
1243
|
+
label: s.label
|
|
1244
1244
|
}));
|
|
1245
1245
|
}
|
|
1246
1246
|
/**
|
|
@@ -1257,7 +1257,7 @@ class Mt {
|
|
|
1257
1257
|
ref: n.ref,
|
|
1258
1258
|
obj: {
|
|
1259
1259
|
...n.obj,
|
|
1260
|
-
data: new
|
|
1260
|
+
data: new O(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1261
1261
|
}
|
|
1262
1262
|
}))
|
|
1263
1263
|
};
|
|
@@ -1276,9 +1276,9 @@ class Mt {
|
|
|
1276
1276
|
ref: n.ref,
|
|
1277
1277
|
obj: {
|
|
1278
1278
|
...n.obj,
|
|
1279
|
-
data:
|
|
1279
|
+
data: pt(
|
|
1280
1280
|
n.obj.data,
|
|
1281
|
-
(r) => new
|
|
1281
|
+
(r) => new O(r, [n.ref.blockId, n.ref.name])
|
|
1282
1282
|
)
|
|
1283
1283
|
}
|
|
1284
1284
|
}))
|
|
@@ -1305,9 +1305,9 @@ class Mt {
|
|
|
1305
1305
|
)) == null ? void 0 : r.obj;
|
|
1306
1306
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1307
1307
|
if (n)
|
|
1308
|
-
return
|
|
1308
|
+
return Pe(
|
|
1309
1309
|
n,
|
|
1310
|
-
(i) => new
|
|
1310
|
+
(i) => new O(i, [e.blockId, e.name])
|
|
1311
1311
|
);
|
|
1312
1312
|
}
|
|
1313
1313
|
/**
|
|
@@ -1318,7 +1318,7 @@ class Mt {
|
|
|
1318
1318
|
getPColumnByRef(e) {
|
|
1319
1319
|
const n = this.getDataByRef(e);
|
|
1320
1320
|
if (n)
|
|
1321
|
-
return
|
|
1321
|
+
return dt(n);
|
|
1322
1322
|
}
|
|
1323
1323
|
/**
|
|
1324
1324
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1328,7 +1328,7 @@ class Mt {
|
|
|
1328
1328
|
getPColumnSpecByRef(e) {
|
|
1329
1329
|
const n = this.getSpecByRef(e);
|
|
1330
1330
|
if (n) {
|
|
1331
|
-
if (!
|
|
1331
|
+
if (!oe(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
1332
1332
|
return n;
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
@@ -1347,13 +1347,13 @@ class Mt {
|
|
|
1347
1347
|
findDataWithCompatibleSpec(e) {
|
|
1348
1348
|
const n = [];
|
|
1349
1349
|
e: for (const r of this.getData().entries) {
|
|
1350
|
-
if (!
|
|
1350
|
+
if (!oe(r.obj.spec))
|
|
1351
1351
|
continue;
|
|
1352
1352
|
const i = r.obj.spec;
|
|
1353
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1354
|
-
for (let
|
|
1355
|
-
const
|
|
1356
|
-
if (
|
|
1353
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && he(e.domain, i.domain)) {
|
|
1354
|
+
for (let o = 0; o < e.axesSpec.length; ++o) {
|
|
1355
|
+
const s = e.axesSpec[o], a = i.axesSpec[o];
|
|
1356
|
+
if (s.name !== a.name || s.type !== a.type || !he(s.domain, a.domain))
|
|
1357
1357
|
continue e;
|
|
1358
1358
|
}
|
|
1359
1359
|
n.push(r.obj);
|
|
@@ -1368,15 +1368,15 @@ class Mt {
|
|
|
1368
1368
|
findLabels(e) {
|
|
1369
1369
|
const n = this.getData();
|
|
1370
1370
|
for (const r of n.entries) {
|
|
1371
|
-
if (!
|
|
1371
|
+
if (!Me(r.obj)) continue;
|
|
1372
1372
|
const i = r.obj.spec;
|
|
1373
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1373
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && he(e.domain, i.axesSpec[0].domain)) {
|
|
1374
1374
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1375
1375
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1376
1376
|
return Object.fromEntries(
|
|
1377
1377
|
Object.entries(
|
|
1378
1378
|
r.obj.data.getDataAsJson().data
|
|
1379
|
-
).map((
|
|
1379
|
+
).map((s) => [JSON.parse(s[0])[0], s[1]])
|
|
1380
1380
|
);
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
@@ -1390,13 +1390,13 @@ class Mt {
|
|
|
1390
1390
|
*/
|
|
1391
1391
|
selectColumns(e) {
|
|
1392
1392
|
const n = typeof e == "function" ? e : Y(e);
|
|
1393
|
-
return this.getSpecs().entries.filter(({ obj: i }) =>
|
|
1394
|
-
const
|
|
1393
|
+
return this.getSpecs().entries.filter(({ obj: i }) => oe(i) ? n(i) : !1).map(({ ref: i, obj: o }) => {
|
|
1394
|
+
const s = o;
|
|
1395
1395
|
let a = null;
|
|
1396
1396
|
const l = this;
|
|
1397
1397
|
return {
|
|
1398
|
-
id:
|
|
1399
|
-
spec:
|
|
1398
|
+
id: qe(i),
|
|
1399
|
+
spec: s,
|
|
1400
1400
|
get data() {
|
|
1401
1401
|
var u;
|
|
1402
1402
|
return a !== null || (a = (u = l.getPColumnByRef(i)) == null ? void 0 : u.data), a;
|
|
@@ -1409,25 +1409,25 @@ class Mt {
|
|
|
1409
1409
|
* @returns a map of axis value => label
|
|
1410
1410
|
*/
|
|
1411
1411
|
findLabelsForColumnAxis(e, n) {
|
|
1412
|
-
var
|
|
1412
|
+
var o;
|
|
1413
1413
|
const r = this.findLabels(e.axesSpec[n]);
|
|
1414
1414
|
if (!r) return;
|
|
1415
|
-
const i = (
|
|
1415
|
+
const i = (o = e.annotations) == null ? void 0 : o["pl7.app/axisKeys/" + n];
|
|
1416
1416
|
if (i !== void 0) {
|
|
1417
|
-
const
|
|
1418
|
-
return Object.fromEntries(
|
|
1417
|
+
const s = JSON.parse(i);
|
|
1418
|
+
return Object.fromEntries(s.map((a) => [a, r[a] ?? "Unlabelled"]));
|
|
1419
1419
|
} else
|
|
1420
1420
|
return r;
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
|
-
class
|
|
1423
|
+
class ne {
|
|
1424
1424
|
constructor() {
|
|
1425
1425
|
k(this, "ctx");
|
|
1426
1426
|
k(this, "_argsCache");
|
|
1427
1427
|
k(this, "_uiStateCache");
|
|
1428
1428
|
// lazy rendering because this feature is rarely used
|
|
1429
1429
|
k(this, "_activeArgsCache");
|
|
1430
|
-
k(this, "resultPool", new
|
|
1430
|
+
k(this, "resultPool", new $t());
|
|
1431
1431
|
this.ctx = v();
|
|
1432
1432
|
}
|
|
1433
1433
|
get args() {
|
|
@@ -1464,14 +1464,14 @@ class te {
|
|
|
1464
1464
|
getNamedAccessor(e) {
|
|
1465
1465
|
return ge(
|
|
1466
1466
|
this.ctx.getAccessorHandleByName(e),
|
|
1467
|
-
(n) => new
|
|
1467
|
+
(n) => new O(n, [e])
|
|
1468
1468
|
);
|
|
1469
1469
|
}
|
|
1470
1470
|
get prerun() {
|
|
1471
|
-
return this.getNamedAccessor(
|
|
1471
|
+
return this.getNamedAccessor($e);
|
|
1472
1472
|
}
|
|
1473
1473
|
get outputs() {
|
|
1474
|
-
return this.getNamedAccessor(
|
|
1474
|
+
return this.getNamedAccessor(We);
|
|
1475
1475
|
}
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1483,7 +1483,7 @@ class te {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1485
1485
|
var i;
|
|
1486
|
-
const n = e.some((
|
|
1486
|
+
const n = e.some((o) => !(o.data instanceof O) || pe(o.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1487
1487
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1488
1488
|
}
|
|
1489
1489
|
patchPTableDef(e) {
|
|
@@ -1494,14 +1494,14 @@ class te {
|
|
|
1494
1494
|
filters: [...e.partitionFilters, ...e.filters]
|
|
1495
1495
|
}), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
1496
1496
|
...e,
|
|
1497
|
-
partitionFilters:
|
|
1498
|
-
filters:
|
|
1497
|
+
partitionFilters: Te(e.partitionFilters),
|
|
1498
|
+
filters: Te(e.filters)
|
|
1499
1499
|
}), e;
|
|
1500
1500
|
}
|
|
1501
1501
|
// TODO remove all non-PColumn fields
|
|
1502
1502
|
createPFrame(e) {
|
|
1503
1503
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1504
|
-
e.map((n) =>
|
|
1504
|
+
e.map((n) => ke(n))
|
|
1505
1505
|
);
|
|
1506
1506
|
}
|
|
1507
1507
|
createPTable(e) {
|
|
@@ -1514,8 +1514,8 @@ class te {
|
|
|
1514
1514
|
partitionFilters: e.filters ?? [],
|
|
1515
1515
|
filters: [],
|
|
1516
1516
|
sorting: e.sorting ?? []
|
|
1517
|
-
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
1518
|
-
|
|
1517
|
+
}) : n = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(ft(n.src)), this.ctx.createPTable(
|
|
1518
|
+
ht(n, (r) => ke(r))
|
|
1519
1519
|
);
|
|
1520
1520
|
}
|
|
1521
1521
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1535,38 +1535,38 @@ class te {
|
|
|
1535
1535
|
this.ctx.logError(e);
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
|
-
const
|
|
1539
|
-
function
|
|
1538
|
+
const X = "1.40.5";
|
|
1539
|
+
function Wt(t) {
|
|
1540
1540
|
return t.__renderLambda === !0;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function me(t) {
|
|
1543
1543
|
if (t !== void 0)
|
|
1544
|
-
return
|
|
1544
|
+
return Wt(t) ? t.handle : t;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1546
|
+
function Wn(t) {
|
|
1547
|
+
return yt(t);
|
|
1548
1548
|
}
|
|
1549
|
-
const
|
|
1550
|
-
constructor(e, n, r, i,
|
|
1551
|
-
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid =
|
|
1549
|
+
const w = class w {
|
|
1550
|
+
constructor(e, n, r, i, o, s, a, l, u) {
|
|
1551
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = o, this._sections = s, this._title = a, this._enrichmentTargets = l, this._featureFlags = u;
|
|
1552
1552
|
}
|
|
1553
1553
|
static create(e = "Heavy") {
|
|
1554
|
-
return new
|
|
1554
|
+
return new w(
|
|
1555
1555
|
e,
|
|
1556
1556
|
void 0,
|
|
1557
1557
|
{},
|
|
1558
1558
|
{},
|
|
1559
|
-
|
|
1560
|
-
|
|
1559
|
+
se(!0),
|
|
1560
|
+
se([]),
|
|
1561
1561
|
void 0,
|
|
1562
1562
|
void 0,
|
|
1563
|
-
{ ...
|
|
1563
|
+
{ ...w.INITIAL_BLOCK_FEATURE_FLAGS }
|
|
1564
1564
|
);
|
|
1565
1565
|
}
|
|
1566
1566
|
output(e, n, r = {}) {
|
|
1567
1567
|
if (typeof n == "function") {
|
|
1568
1568
|
const i = `output#${e}`;
|
|
1569
|
-
return G(i, () => n(new
|
|
1569
|
+
return G(i, () => n(new ne())), new w(
|
|
1570
1570
|
this._renderingMode,
|
|
1571
1571
|
this._initialArgs,
|
|
1572
1572
|
this._initialUiState,
|
|
@@ -1585,7 +1585,7 @@ const x = class x {
|
|
|
1585
1585
|
this._featureFlags
|
|
1586
1586
|
);
|
|
1587
1587
|
} else
|
|
1588
|
-
return new
|
|
1588
|
+
return new w(
|
|
1589
1589
|
this._renderingMode,
|
|
1590
1590
|
this._initialArgs,
|
|
1591
1591
|
this._initialUiState,
|
|
@@ -1605,7 +1605,7 @@ const x = class x {
|
|
|
1605
1605
|
return this.output(e, n, { retentive: !0 });
|
|
1606
1606
|
}
|
|
1607
1607
|
argsValid(e) {
|
|
1608
|
-
return typeof e == "function" ? (G("inputsValid", () => e(new
|
|
1608
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new ne())), new w(
|
|
1609
1609
|
this._renderingMode,
|
|
1610
1610
|
this._initialArgs,
|
|
1611
1611
|
this._initialUiState,
|
|
@@ -1618,7 +1618,7 @@ const x = class x {
|
|
|
1618
1618
|
this._title,
|
|
1619
1619
|
this._enrichmentTargets,
|
|
1620
1620
|
this._featureFlags
|
|
1621
|
-
)) : new
|
|
1621
|
+
)) : new w(
|
|
1622
1622
|
this._renderingMode,
|
|
1623
1623
|
this._initialArgs,
|
|
1624
1624
|
this._initialUiState,
|
|
@@ -1631,7 +1631,7 @@ const x = class x {
|
|
|
1631
1631
|
);
|
|
1632
1632
|
}
|
|
1633
1633
|
sections(e) {
|
|
1634
|
-
return Array.isArray(e) ? this.sections(
|
|
1634
|
+
return Array.isArray(e) ? this.sections(se(e)) : typeof e == "function" ? (G("sections", () => e(new ne())), new w(
|
|
1635
1635
|
this._renderingMode,
|
|
1636
1636
|
this._initialArgs,
|
|
1637
1637
|
this._initialUiState,
|
|
@@ -1641,7 +1641,7 @@ const x = class x {
|
|
|
1641
1641
|
this._title,
|
|
1642
1642
|
this._enrichmentTargets,
|
|
1643
1643
|
this._featureFlags
|
|
1644
|
-
)) : new
|
|
1644
|
+
)) : new w(
|
|
1645
1645
|
this._renderingMode,
|
|
1646
1646
|
this._initialArgs,
|
|
1647
1647
|
this._initialUiState,
|
|
@@ -1655,7 +1655,7 @@ const x = class x {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1657
1657
|
title(e) {
|
|
1658
|
-
return G("title", () => e(new
|
|
1658
|
+
return G("title", () => e(new ne())), new w(
|
|
1659
1659
|
this._renderingMode,
|
|
1660
1660
|
this._initialArgs,
|
|
1661
1661
|
this._initialUiState,
|
|
@@ -1672,7 +1672,7 @@ const x = class x {
|
|
|
1672
1672
|
* @deprecated use {@link withArgs}
|
|
1673
1673
|
* */
|
|
1674
1674
|
initialArgs(e) {
|
|
1675
|
-
return new
|
|
1675
|
+
return new w(
|
|
1676
1676
|
this._renderingMode,
|
|
1677
1677
|
e,
|
|
1678
1678
|
this._initialUiState,
|
|
@@ -1686,7 +1686,7 @@ const x = class x {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
/** Sets initial args for the block, this value must be specified. */
|
|
1688
1688
|
withArgs(e) {
|
|
1689
|
-
return new
|
|
1689
|
+
return new w(
|
|
1690
1690
|
this._renderingMode,
|
|
1691
1691
|
e,
|
|
1692
1692
|
this._initialUiState,
|
|
@@ -1700,7 +1700,7 @@ const x = class x {
|
|
|
1700
1700
|
}
|
|
1701
1701
|
/** Defines type and sets initial value for block UiState. */
|
|
1702
1702
|
withUiState(e) {
|
|
1703
|
-
return new
|
|
1703
|
+
return new w(
|
|
1704
1704
|
this._renderingMode,
|
|
1705
1705
|
this._initialArgs,
|
|
1706
1706
|
e,
|
|
@@ -1717,7 +1717,7 @@ const x = class x {
|
|
|
1717
1717
|
* Influences dependency graph construction.
|
|
1718
1718
|
*/
|
|
1719
1719
|
enriches(e) {
|
|
1720
|
-
return G("enrichmentTargets", e), new
|
|
1720
|
+
return G("enrichmentTargets", e), new w(
|
|
1721
1721
|
this._renderingMode,
|
|
1722
1722
|
this._initialArgs,
|
|
1723
1723
|
this._initialUiState,
|
|
@@ -1736,7 +1736,7 @@ const x = class x {
|
|
|
1736
1736
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1737
1737
|
const e = {
|
|
1738
1738
|
v3: {
|
|
1739
|
-
sdkVersion:
|
|
1739
|
+
sdkVersion: X,
|
|
1740
1740
|
renderingMode: this._renderingMode,
|
|
1741
1741
|
initialArgs: this._initialArgs,
|
|
1742
1742
|
initialUiState: this._initialUiState,
|
|
@@ -1748,25 +1748,25 @@ const x = class x {
|
|
|
1748
1748
|
featureFlags: this._featureFlags
|
|
1749
1749
|
},
|
|
1750
1750
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1751
|
-
sdkVersion:
|
|
1751
|
+
sdkVersion: X,
|
|
1752
1752
|
renderingMode: this._renderingMode,
|
|
1753
1753
|
initialArgs: this._initialArgs,
|
|
1754
|
-
inputsValid:
|
|
1755
|
-
sections:
|
|
1754
|
+
inputsValid: me(this._inputsValid),
|
|
1755
|
+
sections: me(this._sections),
|
|
1756
1756
|
outputs: Object.fromEntries(
|
|
1757
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1757
|
+
Object.entries(this._outputs).map(([n, r]) => [n, me(r)])
|
|
1758
1758
|
)
|
|
1759
1759
|
};
|
|
1760
|
-
return
|
|
1760
|
+
return Pt() ? Je({ sdkVersion: X }) : { config: e };
|
|
1761
1761
|
}
|
|
1762
1762
|
};
|
|
1763
|
-
k(
|
|
1763
|
+
k(w, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
1764
1764
|
supportsLazyState: !0,
|
|
1765
1765
|
requiresUIAPIVersion: 1,
|
|
1766
1766
|
requiresModelAPIVersion: 1
|
|
1767
1767
|
});
|
|
1768
|
-
let
|
|
1769
|
-
function
|
|
1768
|
+
let Ve = w;
|
|
1769
|
+
function Ye() {
|
|
1770
1770
|
return {
|
|
1771
1771
|
sourceId: null,
|
|
1772
1772
|
hiddenColIds: null,
|
|
@@ -1775,72 +1775,72 @@ function Ge() {
|
|
|
1775
1775
|
sorting: []
|
|
1776
1776
|
};
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function Oe() {
|
|
1779
1779
|
return {
|
|
1780
|
-
version:
|
|
1780
|
+
version: 4,
|
|
1781
1781
|
stateCache: [],
|
|
1782
|
-
pTableParams:
|
|
1782
|
+
pTableParams: Ye()
|
|
1783
1783
|
};
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return "version" in t
|
|
1785
|
+
function Gt(t) {
|
|
1786
|
+
return "version" in t || (t = Oe()), t.version === 2 && (t = {
|
|
1787
1787
|
version: 3,
|
|
1788
1788
|
stateCache: t.stateCache.map((e) => ({
|
|
1789
1789
|
...e,
|
|
1790
1790
|
filtersState: []
|
|
1791
1791
|
})),
|
|
1792
|
-
pTableParams:
|
|
1793
|
-
}), t
|
|
1792
|
+
pTableParams: Ye()
|
|
1793
|
+
}), t.version === 3 && (t = Oe()), t;
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function Se(t) {
|
|
1796
1796
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return new
|
|
1798
|
+
function Ht(t) {
|
|
1799
|
+
return new Q().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1800
1800
|
name: "pl7.app/label",
|
|
1801
1801
|
axes: [{}]
|
|
1802
1802
|
// exactly one axis
|
|
1803
1803
|
}, { dontWaitAllData: !0 });
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function De(t, e) {
|
|
1806
1806
|
const n = [], r = [];
|
|
1807
1807
|
for (const a of t)
|
|
1808
|
-
|
|
1808
|
+
Se(a.spec) ? n.push(a) : r.push(a);
|
|
1809
1809
|
const i = [];
|
|
1810
1810
|
for (const a of r)
|
|
1811
1811
|
for (const l of a.spec.axesSpec) {
|
|
1812
|
-
const u =
|
|
1813
|
-
i.some((h) =>
|
|
1812
|
+
const u = V(l);
|
|
1813
|
+
i.some((h) => U(h, u)) || i.push(u);
|
|
1814
1814
|
}
|
|
1815
1815
|
for (const a of n) {
|
|
1816
|
-
const l =
|
|
1816
|
+
const l = V(a.spec.axesSpec[0]), u = i.findIndex((h) => U(h, l));
|
|
1817
1817
|
u !== -1 && i.splice(u, 1);
|
|
1818
1818
|
}
|
|
1819
|
-
const
|
|
1819
|
+
const o = (a, l) => {
|
|
1820
1820
|
let u = a.toString();
|
|
1821
1821
|
if (l)
|
|
1822
1822
|
for (const h in l)
|
|
1823
1823
|
u += h, u += l[h];
|
|
1824
1824
|
return u;
|
|
1825
|
-
},
|
|
1825
|
+
}, s = [];
|
|
1826
1826
|
for (const a of e) {
|
|
1827
|
-
const l = a.spec.axesSpec[0], u =
|
|
1827
|
+
const l = a.spec.axesSpec[0], u = V(l), h = i.findIndex((f) => U(f, u));
|
|
1828
1828
|
if (h !== -1) {
|
|
1829
|
-
const f = i[h],
|
|
1830
|
-
|
|
1831
|
-
id:
|
|
1829
|
+
const f = i[h], m = Object.keys(f.domain ?? {}).length, d = Object.keys(l.domain ?? {}).length;
|
|
1830
|
+
m > d ? s.push({
|
|
1831
|
+
id: o(a.id, f.domain),
|
|
1832
1832
|
spec: {
|
|
1833
1833
|
...a.spec,
|
|
1834
1834
|
axesSpec: [{ ...f, annotations: l.annotations }]
|
|
1835
1835
|
},
|
|
1836
1836
|
data: a.data
|
|
1837
|
-
}) :
|
|
1837
|
+
}) : s.push(a), i.splice(h, 1);
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
1840
|
-
return
|
|
1840
|
+
return s;
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1843
|
-
const e = (i) => Array.isArray(i), n = (i) => i instanceof
|
|
1842
|
+
function zt(t) {
|
|
1843
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof O, r = (i) => typeof i == "object" && "type" in i;
|
|
1844
1844
|
return t.map((i) => i.data).every((i) => {
|
|
1845
1845
|
if (e(i))
|
|
1846
1846
|
return !0;
|
|
@@ -1851,15 +1851,15 @@ function Ut(t) {
|
|
|
1851
1851
|
case "Json":
|
|
1852
1852
|
return !0;
|
|
1853
1853
|
case "JsonPartitioned":
|
|
1854
|
-
return Object.values(i.parts).every((
|
|
1854
|
+
return Object.values(i.parts).every((s) => s.getIsReadyOrError());
|
|
1855
1855
|
case "BinaryPartitioned":
|
|
1856
|
-
return Object.values(i.parts).every((
|
|
1856
|
+
return Object.values(i.parts).every((s) => s.index.getIsReadyOrError() && s.values.getIsReadyOrError());
|
|
1857
1857
|
}
|
|
1858
1858
|
else
|
|
1859
1859
|
throw Error(`unsupported column data type: ${i}`);
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function Re(t) {
|
|
1863
1863
|
let e = t.columns;
|
|
1864
1864
|
const n = [];
|
|
1865
1865
|
if (t.coreColumnPredicate) {
|
|
@@ -1881,80 +1881,80 @@ function ke(t) {
|
|
|
1881
1881
|
sorting: t.sorting
|
|
1882
1882
|
};
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function Xt(t) {
|
|
1885
1885
|
var e;
|
|
1886
1886
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function Yt(t) {
|
|
1889
1889
|
var e;
|
|
1890
1890
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function ye(t, e) {
|
|
1893
1893
|
return [...new Map(t.map((n) => [e(n), n])).values()];
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1895
|
+
function Gn(t, e, n, r) {
|
|
1896
1896
|
if (e.length === 0) return;
|
|
1897
|
-
const i = e.filter((c) => !
|
|
1898
|
-
if (!
|
|
1899
|
-
const a =
|
|
1900
|
-
...
|
|
1901
|
-
[...l.flatMap((c) => c.spec.axesSpec.map((b) =>
|
|
1902
|
-
(c) =>
|
|
1897
|
+
const i = e.filter((c) => !Xt(c.spec)), o = Gt(n), s = Ht(t.resultPool);
|
|
1898
|
+
if (!s) return;
|
|
1899
|
+
const a = De(i.map(Ie), s), l = [...i, ...a], h = [
|
|
1900
|
+
...ye(
|
|
1901
|
+
[...l.flatMap((c) => c.spec.axesSpec.map((b) => V(b)))],
|
|
1902
|
+
(c) => D(c)
|
|
1903
1903
|
).map((c) => ({ type: "axis", id: c })),
|
|
1904
1904
|
...l.map((c) => ({ type: "column", id: c.id }))
|
|
1905
|
-
], f = new Set(h.map((c) =>
|
|
1906
|
-
const b =
|
|
1905
|
+
], f = new Set(h.map((c) => D(c))), m = (c) => f.has(D(c)), d = (r == null ? void 0 : r.coreJoinType) ?? "full", g = o.pTableParams.partitionFilters.filter((c) => {
|
|
1906
|
+
const b = m(c.column);
|
|
1907
1907
|
return b || t.logWarn(`Partition filter ${JSON.stringify(c)} does not match provided columns, skipping`), b;
|
|
1908
|
-
}), p =
|
|
1909
|
-
[...(r == null ? void 0 : r.filters) ?? [], ...
|
|
1910
|
-
(c) =>
|
|
1908
|
+
}), p = ye(
|
|
1909
|
+
[...(r == null ? void 0 : r.filters) ?? [], ...o.pTableParams.filters],
|
|
1910
|
+
(c) => D(c.column)
|
|
1911
1911
|
).filter((c) => {
|
|
1912
|
-
const b =
|
|
1912
|
+
const b = m(c.column);
|
|
1913
1913
|
return b || t.logWarn(`Filter ${JSON.stringify(c)} does not match provided columns, skipping`), b;
|
|
1914
|
-
}),
|
|
1915
|
-
[...(r == null ? void 0 : r.sorting) ?? [], ...
|
|
1916
|
-
(c) =>
|
|
1914
|
+
}), y = ye(
|
|
1915
|
+
[...(r == null ? void 0 : r.sorting) ?? [], ...o.pTableParams.sorting],
|
|
1916
|
+
(c) => D(c.column)
|
|
1917
1917
|
).filter((c) => {
|
|
1918
|
-
const b =
|
|
1918
|
+
const b = m(c.column);
|
|
1919
1919
|
return b || t.logWarn(`Sorting ${JSON.stringify(c)} does not match provided columns, skipping`), b;
|
|
1920
|
-
}), C =
|
|
1920
|
+
}), C = Re({
|
|
1921
1921
|
columns: i,
|
|
1922
1922
|
labelColumns: a,
|
|
1923
1923
|
coreJoinType: d,
|
|
1924
|
-
partitionFilters:
|
|
1924
|
+
partitionFilters: g,
|
|
1925
1925
|
filters: p,
|
|
1926
|
-
sorting:
|
|
1926
|
+
sorting: y,
|
|
1927
1927
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1928
|
-
}), E = t.createPTable(C),
|
|
1928
|
+
}), E = t.createPTable(C), x = new Set((() => {
|
|
1929
1929
|
if (d === "inner") return [];
|
|
1930
|
-
const c =
|
|
1931
|
-
return c || i.filter((b) =>
|
|
1930
|
+
const c = o.pTableParams.hiddenColIds;
|
|
1931
|
+
return c || i.filter((b) => Yt(b.spec)).map((b) => b.id);
|
|
1932
1932
|
})());
|
|
1933
1933
|
i.filter((c) => {
|
|
1934
1934
|
var b;
|
|
1935
1935
|
return ((b = c.spec.annotations) == null ? void 0 : b["pl7.app/isLinkerColumn"]) === "true";
|
|
1936
|
-
}).forEach((c) =>
|
|
1937
|
-
var
|
|
1938
|
-
return (
|
|
1939
|
-
}).forEach((b) =>
|
|
1940
|
-
const
|
|
1941
|
-
if (!
|
|
1942
|
-
const
|
|
1943
|
-
columns:
|
|
1944
|
-
labelColumns:
|
|
1936
|
+
}).forEach((c) => x.delete(c.id)), r != null && r.coreColumnPredicate && i.flatMap((b) => {
|
|
1937
|
+
var I;
|
|
1938
|
+
return (I = r == null ? void 0 : r.coreColumnPredicate) != null && I.call(r, b.spec) ? [b.id] : [];
|
|
1939
|
+
}).forEach((b) => x.delete(b)), [...g.map((c) => c.column), ...p.map((c) => c.column), ...y.map((c) => c.column)].filter((c) => c.type === "column").forEach((c) => x.delete(c.id));
|
|
1940
|
+
const S = i.filter((c) => !x.has(c.id)), P = De(S.map(Ie), s);
|
|
1941
|
+
if (!zt([...S, ...P])) return;
|
|
1942
|
+
const T = Re({
|
|
1943
|
+
columns: S,
|
|
1944
|
+
labelColumns: P,
|
|
1945
1945
|
coreJoinType: d,
|
|
1946
|
-
partitionFilters:
|
|
1946
|
+
partitionFilters: g,
|
|
1947
1947
|
filters: p,
|
|
1948
|
-
sorting:
|
|
1948
|
+
sorting: y,
|
|
1949
1949
|
coreColumnPredicate: r == null ? void 0 : r.coreColumnPredicate
|
|
1950
|
-
}),
|
|
1950
|
+
}), F = t.createPTable(T);
|
|
1951
1951
|
return {
|
|
1952
|
-
sourceId:
|
|
1952
|
+
sourceId: o.pTableParams.sourceId,
|
|
1953
1953
|
fullTableHandle: E,
|
|
1954
|
-
visibleTableHandle:
|
|
1954
|
+
visibleTableHandle: F
|
|
1955
1955
|
};
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function Hn(t, e, n) {
|
|
1958
1958
|
const r = t.resultPool.findLabels(e);
|
|
1959
1959
|
return {
|
|
1960
1960
|
axis: e,
|
|
@@ -1965,190 +1965,190 @@ function $n(t, e, n) {
|
|
|
1965
1965
|
defaultValue: n[0]
|
|
1966
1966
|
};
|
|
1967
1967
|
}
|
|
1968
|
-
const
|
|
1968
|
+
const Qt = (t, e) => {
|
|
1969
1969
|
let n = t.toString();
|
|
1970
1970
|
return e == null || e.forEach((r) => {
|
|
1971
1971
|
if (r)
|
|
1972
|
-
for (const [i,
|
|
1973
|
-
n += i, n +=
|
|
1972
|
+
for (const [i, o] of Object.entries(r))
|
|
1973
|
+
n += i, n += o;
|
|
1974
1974
|
}), n;
|
|
1975
1975
|
};
|
|
1976
|
-
function
|
|
1976
|
+
function Zt(t) {
|
|
1977
1977
|
if (!t.length)
|
|
1978
1978
|
return [];
|
|
1979
1979
|
let e = [[]];
|
|
1980
1980
|
return t.forEach((n) => {
|
|
1981
1981
|
const r = [];
|
|
1982
1982
|
n.forEach((i) => {
|
|
1983
|
-
r.push(...e.map((
|
|
1983
|
+
r.push(...e.map((o) => [...o, i]));
|
|
1984
1984
|
}), e = r;
|
|
1985
1985
|
}), e;
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function en(t) {
|
|
1988
1988
|
var e;
|
|
1989
|
-
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[
|
|
1989
|
+
return t.axesSpec.length === 2 && ((e = t.annotations) == null ? void 0 : e[nn]) === "true";
|
|
1990
1990
|
}
|
|
1991
|
-
const
|
|
1992
|
-
function
|
|
1991
|
+
const tn = "pl7.app/graph/isVirtual", Ne = "pl7.app/label", nn = "pl7.app/isLinkerColumn";
|
|
1992
|
+
function rn(t) {
|
|
1993
1993
|
var n, r;
|
|
1994
1994
|
const e = /* @__PURE__ */ new Map();
|
|
1995
1995
|
for (const { spec: i } of t) {
|
|
1996
|
-
const
|
|
1997
|
-
|
|
1998
|
-
e.has(
|
|
1996
|
+
const o = i.axesSpec.map(V).map(D);
|
|
1997
|
+
o.forEach((s) => {
|
|
1998
|
+
e.has(s) || e.set(s, /* @__PURE__ */ new Set());
|
|
1999
1999
|
});
|
|
2000
|
-
for (let
|
|
2001
|
-
for (let a =
|
|
2002
|
-
const l = s
|
|
2000
|
+
for (let s = 0; s < o.length - 1; s++)
|
|
2001
|
+
for (let a = s + 1; a < o.length; a++) {
|
|
2002
|
+
const l = o[s], u = o[a];
|
|
2003
2003
|
(n = e.get(l)) == null || n.add(u), (r = e.get(u)) == null || r.add(l);
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
2006
|
return e;
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const n =
|
|
2008
|
+
function on(t, e) {
|
|
2009
|
+
const n = rn(t), r = [...n.keys()].map(_e), i = [];
|
|
2010
2010
|
for (const l of e.values()) {
|
|
2011
|
-
const u = r.find((h) =>
|
|
2012
|
-
u && i.push(
|
|
2011
|
+
const u = r.find((h) => U(l, h));
|
|
2012
|
+
u && i.push(D(u));
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2014
|
+
const o = new Set(i), s = /* @__PURE__ */ new Map();
|
|
2015
2015
|
let a = [...i];
|
|
2016
2016
|
for (; a.length; ) {
|
|
2017
2017
|
const l = [];
|
|
2018
2018
|
for (const u of a)
|
|
2019
2019
|
for (const h of n.get(u) ?? [])
|
|
2020
|
-
|
|
2020
|
+
o.has(h) || (l.push(h), o.add(h), s.set(h, _e(h)));
|
|
2021
2021
|
a = l;
|
|
2022
2022
|
}
|
|
2023
|
-
return
|
|
2023
|
+
return s;
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function Ue(t, e) {
|
|
2026
2026
|
const n = [];
|
|
2027
2027
|
return e.forEach((r) => {
|
|
2028
|
-
n.push(...
|
|
2028
|
+
n.push(...sn(t, r));
|
|
2029
2029
|
}), n;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2032
|
-
const n = e.spec.axesSpec.map(
|
|
2033
|
-
if (n.every((u) => t.has(
|
|
2031
|
+
function sn(t, e) {
|
|
2032
|
+
const n = e.spec.axesSpec.map(V);
|
|
2033
|
+
if (n.every((u) => t.has(D(u))))
|
|
2034
2034
|
return [e];
|
|
2035
2035
|
const r = n.map((u) => {
|
|
2036
2036
|
const h = [];
|
|
2037
|
-
for (const [f,
|
|
2038
|
-
|
|
2037
|
+
for (const [f, m] of t)
|
|
2038
|
+
U(m, u) && !U(u, m) && h.push(m);
|
|
2039
2039
|
return h;
|
|
2040
|
-
}), i =
|
|
2040
|
+
}), i = Zt(r), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = i.map((u) => {
|
|
2041
2041
|
const h = /* @__PURE__ */ new Set();
|
|
2042
|
-
return u.map((f,
|
|
2043
|
-
const d = e.spec.axesSpec[
|
|
2044
|
-
return Object.entries(
|
|
2042
|
+
return u.map((f, m) => {
|
|
2043
|
+
const d = e.spec.axesSpec[m].domain, g = f.domain;
|
|
2044
|
+
return Object.entries(g ?? {}).forEach(([p, y]) => {
|
|
2045
2045
|
if ((d == null ? void 0 : d[p]) === void 0) {
|
|
2046
|
-
const C = JSON.stringify([p,
|
|
2047
|
-
h.add(C),
|
|
2046
|
+
const C = JSON.stringify([p, y]);
|
|
2047
|
+
h.add(C), o.add(C);
|
|
2048
2048
|
}
|
|
2049
2049
|
}), {
|
|
2050
2050
|
...f,
|
|
2051
|
-
annotations: e.spec.axesSpec[
|
|
2051
|
+
annotations: e.spec.axesSpec[m].annotations
|
|
2052
2052
|
};
|
|
2053
2053
|
}), h;
|
|
2054
2054
|
});
|
|
2055
|
-
[...
|
|
2056
|
-
a.some((h) => !h.has(u)) &&
|
|
2055
|
+
[...o].forEach((u) => {
|
|
2056
|
+
a.some((h) => !h.has(u)) && s.add(u);
|
|
2057
2057
|
});
|
|
2058
2058
|
const l = i.map((u, h) => {
|
|
2059
2059
|
var p;
|
|
2060
|
-
const f =
|
|
2060
|
+
const f = Qt(e.id, u.map((y) => y.domain)), m = ((p = e.spec.annotations) == null ? void 0 : p[Ne]) ?? "", d = [...a[h]].filter((y) => s.has(y)).sort().map((y) => {
|
|
2061
2061
|
var C;
|
|
2062
|
-
return (C = JSON.parse(
|
|
2063
|
-
}).join(" / "),
|
|
2062
|
+
return (C = JSON.parse(y)) == null ? void 0 : C[1];
|
|
2063
|
+
}).join(" / "), g = {
|
|
2064
2064
|
...e.spec.annotations,
|
|
2065
|
-
[
|
|
2065
|
+
[tn]: "true"
|
|
2066
2066
|
};
|
|
2067
|
-
return (
|
|
2067
|
+
return (m || d) && (g[Ne] = m && d ? m + " / " + d : m + d), {
|
|
2068
2068
|
id: f,
|
|
2069
2069
|
spec: {
|
|
2070
2070
|
...e.spec,
|
|
2071
|
-
axesSpec: u.map((
|
|
2072
|
-
...
|
|
2071
|
+
axesSpec: u.map((y, C) => ({
|
|
2072
|
+
...y,
|
|
2073
2073
|
annotations: e.spec.axesSpec[C].annotations
|
|
2074
2074
|
})),
|
|
2075
|
-
annotations:
|
|
2075
|
+
annotations: g
|
|
2076
2076
|
},
|
|
2077
2077
|
data: e.data
|
|
2078
2078
|
};
|
|
2079
2079
|
});
|
|
2080
2080
|
return [e, ...l];
|
|
2081
2081
|
}
|
|
2082
|
-
function
|
|
2082
|
+
function an(t) {
|
|
2083
2083
|
let e = !0;
|
|
2084
|
-
return t.data instanceof
|
|
2084
|
+
return t.data instanceof O ? e = e && t.data.getIsReadyOrError() : pe(t.data) && gt(t.data, (n) => {
|
|
2085
2085
|
e = e && n.getIsReadyOrError();
|
|
2086
2086
|
}), e;
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2089
|
-
return t.every(
|
|
2088
|
+
function re(t) {
|
|
2089
|
+
return t.every(an);
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function zn(t, e) {
|
|
2092
2092
|
if (!e) {
|
|
2093
|
-
const f = new
|
|
2093
|
+
const f = new Q();
|
|
2094
2094
|
f.addColumnProvider(t.resultPool);
|
|
2095
|
-
const
|
|
2096
|
-
if (!
|
|
2095
|
+
const m = f.getColumns(() => !0, { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? [];
|
|
2096
|
+
if (!re(m))
|
|
2097
2097
|
return;
|
|
2098
|
-
const d = new Map(
|
|
2099
|
-
const
|
|
2100
|
-
return [
|
|
2101
|
-
})),
|
|
2102
|
-
return t.createPFrame(
|
|
2098
|
+
const d = new Map(m.flatMap((p) => p.spec.axesSpec).map((p) => {
|
|
2099
|
+
const y = V(p);
|
|
2100
|
+
return [D(y), y];
|
|
2101
|
+
})), g = Ue(d, m);
|
|
2102
|
+
return t.createPFrame(g);
|
|
2103
2103
|
}
|
|
2104
|
-
if (!
|
|
2104
|
+
if (!re(e))
|
|
2105
2105
|
return;
|
|
2106
|
-
const n = new
|
|
2106
|
+
const n = new Q();
|
|
2107
2107
|
n.addColumnProvider(t.resultPool), n.addColumns(e);
|
|
2108
2108
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
2109
2109
|
for (const f of e)
|
|
2110
|
-
for (const
|
|
2111
|
-
const d =
|
|
2112
|
-
r.set(
|
|
2110
|
+
for (const m of f.spec.axesSpec) {
|
|
2111
|
+
const d = V(m);
|
|
2112
|
+
r.set(D(d), d), i.set(D(d), d);
|
|
2113
2113
|
}
|
|
2114
|
-
const
|
|
2115
|
-
for (const f of
|
|
2114
|
+
const o = n.getColumns((f) => en(f)) ?? [], s = on(o, r);
|
|
2115
|
+
for (const f of s)
|
|
2116
2116
|
r.set(...f), i.set(...f);
|
|
2117
|
-
const a = (n.getColumns((f) => f.axesSpec.some((
|
|
2118
|
-
const d =
|
|
2119
|
-
for (const
|
|
2120
|
-
if (
|
|
2117
|
+
const a = (n.getColumns((f) => f.axesSpec.some((m) => {
|
|
2118
|
+
const d = V(m);
|
|
2119
|
+
for (const g of r.values())
|
|
2120
|
+
if (U(g, d))
|
|
2121
2121
|
return !0;
|
|
2122
2122
|
return !1;
|
|
2123
|
-
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !
|
|
2124
|
-
if (!
|
|
2123
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => !Se(f.spec));
|
|
2124
|
+
if (!re(a))
|
|
2125
2125
|
return;
|
|
2126
2126
|
for (const f of a)
|
|
2127
|
-
for (const
|
|
2128
|
-
const d =
|
|
2129
|
-
i.set(
|
|
2127
|
+
for (const m of f.spec.axesSpec) {
|
|
2128
|
+
const d = V(m);
|
|
2129
|
+
i.set(D(d), d);
|
|
2130
2130
|
}
|
|
2131
|
-
const l = (n.getColumns((f) => f.axesSpec.some((
|
|
2132
|
-
const d =
|
|
2133
|
-
for (const
|
|
2134
|
-
if (
|
|
2131
|
+
const l = (n.getColumns((f) => f.axesSpec.some((m) => {
|
|
2132
|
+
const d = V(m);
|
|
2133
|
+
for (const g of i.values())
|
|
2134
|
+
if (U(g, d))
|
|
2135
2135
|
return !0;
|
|
2136
2136
|
return !1;
|
|
2137
|
-
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) =>
|
|
2138
|
-
if (!
|
|
2137
|
+
}), { dontWaitAllData: !0, overrideLabelAnnotation: !1 }) ?? []).filter((f) => Se(f.spec));
|
|
2138
|
+
if (!re(l))
|
|
2139
2139
|
return;
|
|
2140
|
-
const u = [...a, ...l], h =
|
|
2140
|
+
const u = [...a, ...l], h = Ue(r, u);
|
|
2141
2141
|
return t.createPFrame(h);
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function Xn({
|
|
2144
2144
|
selection: t,
|
|
2145
|
-
columnId: e =
|
|
2145
|
+
columnId: e = vt(),
|
|
2146
2146
|
label: n = "Selection marker",
|
|
2147
2147
|
domain: r
|
|
2148
2148
|
}) {
|
|
2149
2149
|
if (!(t != null && t.axesSpec.length))
|
|
2150
2150
|
return;
|
|
2151
|
-
const i = t.selectedKeys.filter((
|
|
2151
|
+
const i = t.selectedKeys.filter((o) => o.every((s) => !bt(s))).map((o) => ({ key: o, val: 1 }));
|
|
2152
2152
|
if (i.length)
|
|
2153
2153
|
return {
|
|
2154
2154
|
id: e,
|
|
@@ -2166,10 +2166,525 @@ function Un({
|
|
|
2166
2166
|
data: i
|
|
2167
2167
|
};
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2170
|
-
return t ===
|
|
2169
|
+
function Yn(t) {
|
|
2170
|
+
return t === Ct ? (console.error("Axis value can never be N/A"), "") : t;
|
|
2171
|
+
}
|
|
2172
|
+
function ln(t) {
|
|
2173
|
+
throw new Error("Unexpected object: " + t);
|
|
2174
|
+
}
|
|
2175
|
+
function R(t) {
|
|
2176
|
+
return t.valueType === "Int" || t.valueType === "Long" || t.valueType === "Float" || t.valueType === "Double";
|
|
2177
|
+
}
|
|
2178
|
+
function ie(t) {
|
|
2179
|
+
return t.valueType === "String";
|
|
2180
|
+
}
|
|
2181
|
+
const Qe = {
|
|
2182
|
+
lessThan: {
|
|
2183
|
+
label: "Col < X (Less Than)",
|
|
2184
|
+
form: {
|
|
2185
|
+
column: {
|
|
2186
|
+
label: "Column",
|
|
2187
|
+
fieldType: "SUniversalPColumnId",
|
|
2188
|
+
defaultValue: () => {
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
type: {
|
|
2192
|
+
label: "Predicate",
|
|
2193
|
+
fieldType: "FilterUiType",
|
|
2194
|
+
defaultValue: () => "lessThan"
|
|
2195
|
+
},
|
|
2196
|
+
x: {
|
|
2197
|
+
label: "X",
|
|
2198
|
+
fieldType: "number",
|
|
2199
|
+
defaultValue: () => 0
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
supportedFor: R
|
|
2203
|
+
},
|
|
2204
|
+
greaterThan: {
|
|
2205
|
+
label: "Col > X (Greater Than)",
|
|
2206
|
+
form: {
|
|
2207
|
+
column: {
|
|
2208
|
+
label: "Column",
|
|
2209
|
+
fieldType: "SUniversalPColumnId",
|
|
2210
|
+
defaultValue: () => {
|
|
2211
|
+
}
|
|
2212
|
+
},
|
|
2213
|
+
type: {
|
|
2214
|
+
label: "Predicate",
|
|
2215
|
+
fieldType: "FilterUiType",
|
|
2216
|
+
defaultValue: () => "greaterThan"
|
|
2217
|
+
},
|
|
2218
|
+
x: {
|
|
2219
|
+
label: "X",
|
|
2220
|
+
fieldType: "number",
|
|
2221
|
+
defaultValue: () => 0
|
|
2222
|
+
}
|
|
2223
|
+
},
|
|
2224
|
+
supportedFor: R
|
|
2225
|
+
},
|
|
2226
|
+
lessThanOrEqual: {
|
|
2227
|
+
label: "Col ≤ X (Less Than or Equal)",
|
|
2228
|
+
form: {
|
|
2229
|
+
column: {
|
|
2230
|
+
label: "Column",
|
|
2231
|
+
fieldType: "SUniversalPColumnId",
|
|
2232
|
+
defaultValue: () => {
|
|
2233
|
+
}
|
|
2234
|
+
},
|
|
2235
|
+
type: {
|
|
2236
|
+
label: "Predicate",
|
|
2237
|
+
fieldType: "FilterUiType",
|
|
2238
|
+
defaultValue: () => "lessThanOrEqual"
|
|
2239
|
+
},
|
|
2240
|
+
x: {
|
|
2241
|
+
label: "X",
|
|
2242
|
+
fieldType: "number",
|
|
2243
|
+
defaultValue: () => 0
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
supportedFor: R
|
|
2247
|
+
},
|
|
2248
|
+
greaterThanOrEqual: {
|
|
2249
|
+
label: "Col ≥ X (Greater Than or Equal)",
|
|
2250
|
+
form: {
|
|
2251
|
+
column: {
|
|
2252
|
+
label: "Column",
|
|
2253
|
+
fieldType: "SUniversalPColumnId",
|
|
2254
|
+
defaultValue: () => {
|
|
2255
|
+
}
|
|
2256
|
+
},
|
|
2257
|
+
type: {
|
|
2258
|
+
label: "Predicate",
|
|
2259
|
+
fieldType: "FilterUiType",
|
|
2260
|
+
defaultValue: () => "greaterThanOrEqual"
|
|
2261
|
+
},
|
|
2262
|
+
x: {
|
|
2263
|
+
label: "X",
|
|
2264
|
+
fieldType: "number",
|
|
2265
|
+
defaultValue: () => 0
|
|
2266
|
+
}
|
|
2267
|
+
},
|
|
2268
|
+
supportedFor: R
|
|
2269
|
+
},
|
|
2270
|
+
lessThanColumn: {
|
|
2271
|
+
label: "Col₁ < Col₂ (Compare Columns)",
|
|
2272
|
+
form: {
|
|
2273
|
+
column: {
|
|
2274
|
+
label: "Col₁",
|
|
2275
|
+
fieldType: "SUniversalPColumnId",
|
|
2276
|
+
defaultValue: () => {
|
|
2277
|
+
}
|
|
2278
|
+
},
|
|
2279
|
+
type: {
|
|
2280
|
+
label: "Predicate",
|
|
2281
|
+
fieldType: "FilterUiType",
|
|
2282
|
+
defaultValue: () => "lessThanColumn"
|
|
2283
|
+
},
|
|
2284
|
+
rhs: {
|
|
2285
|
+
label: "Col₂",
|
|
2286
|
+
fieldType: "SUniversalPColumnId",
|
|
2287
|
+
defaultValue: () => {
|
|
2288
|
+
}
|
|
2289
|
+
},
|
|
2290
|
+
minDiff: {
|
|
2291
|
+
label: "Margin (positive)",
|
|
2292
|
+
fieldType: "number?",
|
|
2293
|
+
defaultValue: () => {
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2297
|
+
supportedFor: (t, e) => R(t) && (e === void 0 || R(e))
|
|
2298
|
+
},
|
|
2299
|
+
lessThanColumnOrEqual: {
|
|
2300
|
+
label: "Col₁ ≤ Col₂ (Compare Columns)",
|
|
2301
|
+
form: {
|
|
2302
|
+
column: {
|
|
2303
|
+
label: "Col₁",
|
|
2304
|
+
fieldType: "SUniversalPColumnId",
|
|
2305
|
+
defaultValue: () => {
|
|
2306
|
+
}
|
|
2307
|
+
},
|
|
2308
|
+
type: {
|
|
2309
|
+
label: "Predicate",
|
|
2310
|
+
fieldType: "FilterUiType",
|
|
2311
|
+
defaultValue: () => "lessThanColumnOrEqual"
|
|
2312
|
+
},
|
|
2313
|
+
rhs: {
|
|
2314
|
+
label: "Col₂",
|
|
2315
|
+
fieldType: "SUniversalPColumnId",
|
|
2316
|
+
defaultValue: () => {
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2319
|
+
minDiff: {
|
|
2320
|
+
label: "Margin (positive)",
|
|
2321
|
+
fieldType: "number?",
|
|
2322
|
+
defaultValue: () => {
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
},
|
|
2326
|
+
supportedFor: (t, e) => R(t) && (e === void 0 || R(e))
|
|
2327
|
+
},
|
|
2328
|
+
topN: {
|
|
2329
|
+
label: "Top N",
|
|
2330
|
+
form: {
|
|
2331
|
+
column: {
|
|
2332
|
+
label: "Rank By Column",
|
|
2333
|
+
fieldType: "SUniversalPColumnId",
|
|
2334
|
+
defaultValue: () => {
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
type: {
|
|
2338
|
+
label: "Predicate",
|
|
2339
|
+
fieldType: "FilterUiType",
|
|
2340
|
+
defaultValue: () => "topN"
|
|
2341
|
+
},
|
|
2342
|
+
n: {
|
|
2343
|
+
label: "N",
|
|
2344
|
+
fieldType: "number",
|
|
2345
|
+
defaultValue: () => 10
|
|
2346
|
+
}
|
|
2347
|
+
},
|
|
2348
|
+
supportedFor: R
|
|
2349
|
+
},
|
|
2350
|
+
bottomN: {
|
|
2351
|
+
label: "Bottom N",
|
|
2352
|
+
form: {
|
|
2353
|
+
column: {
|
|
2354
|
+
label: "Rank By Column",
|
|
2355
|
+
fieldType: "SUniversalPColumnId",
|
|
2356
|
+
defaultValue: () => {
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2359
|
+
type: {
|
|
2360
|
+
label: "Predicate",
|
|
2361
|
+
fieldType: "FilterUiType",
|
|
2362
|
+
defaultValue: () => "bottomN"
|
|
2363
|
+
},
|
|
2364
|
+
n: {
|
|
2365
|
+
label: "N",
|
|
2366
|
+
fieldType: "number",
|
|
2367
|
+
defaultValue: () => 10
|
|
2368
|
+
}
|
|
2369
|
+
},
|
|
2370
|
+
supportedFor: R
|
|
2371
|
+
},
|
|
2372
|
+
patternContainSubsequence: {
|
|
2373
|
+
label: "Col ~ Seq (Contain Subsequence)",
|
|
2374
|
+
form: {
|
|
2375
|
+
column: {
|
|
2376
|
+
label: "Column",
|
|
2377
|
+
fieldType: "SUniversalPColumnId",
|
|
2378
|
+
defaultValue: () => {
|
|
2379
|
+
}
|
|
2380
|
+
},
|
|
2381
|
+
type: {
|
|
2382
|
+
label: "Predicate",
|
|
2383
|
+
fieldType: "FilterUiType",
|
|
2384
|
+
defaultValue: () => "patternContainSubsequence"
|
|
2385
|
+
},
|
|
2386
|
+
value: {
|
|
2387
|
+
label: "Seq",
|
|
2388
|
+
fieldType: "string",
|
|
2389
|
+
defaultValue: () => ""
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
supportedFor: ie
|
|
2393
|
+
},
|
|
2394
|
+
patternNotContainSubsequence: {
|
|
2395
|
+
label: "Col ≁ Seq (Not Contain Subsequence)",
|
|
2396
|
+
form: {
|
|
2397
|
+
column: {
|
|
2398
|
+
label: "Column",
|
|
2399
|
+
fieldType: "SUniversalPColumnId",
|
|
2400
|
+
defaultValue: () => {
|
|
2401
|
+
}
|
|
2402
|
+
},
|
|
2403
|
+
type: {
|
|
2404
|
+
label: "Predicate",
|
|
2405
|
+
fieldType: "FilterUiType",
|
|
2406
|
+
defaultValue: () => "patternNotContainSubsequence"
|
|
2407
|
+
},
|
|
2408
|
+
value: {
|
|
2409
|
+
label: "Seq",
|
|
2410
|
+
fieldType: "string",
|
|
2411
|
+
defaultValue: () => ""
|
|
2412
|
+
}
|
|
2413
|
+
},
|
|
2414
|
+
supportedFor: ie
|
|
2415
|
+
},
|
|
2416
|
+
patternEquals: {
|
|
2417
|
+
label: "Col = Seq (Equals)",
|
|
2418
|
+
form: {
|
|
2419
|
+
column: {
|
|
2420
|
+
label: "Column",
|
|
2421
|
+
fieldType: "SUniversalPColumnId",
|
|
2422
|
+
defaultValue: () => {
|
|
2423
|
+
}
|
|
2424
|
+
},
|
|
2425
|
+
type: {
|
|
2426
|
+
label: "Predicate",
|
|
2427
|
+
fieldType: "FilterUiType",
|
|
2428
|
+
defaultValue: () => "patternEquals"
|
|
2429
|
+
},
|
|
2430
|
+
value: {
|
|
2431
|
+
label: "Seq",
|
|
2432
|
+
fieldType: "string",
|
|
2433
|
+
defaultValue: () => ""
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
supportedFor: ie
|
|
2437
|
+
},
|
|
2438
|
+
patternNotEquals: {
|
|
2439
|
+
label: "Col ≠ Seq (Not Equal)",
|
|
2440
|
+
form: {
|
|
2441
|
+
column: {
|
|
2442
|
+
label: "Column",
|
|
2443
|
+
fieldType: "SUniversalPColumnId",
|
|
2444
|
+
defaultValue: () => {
|
|
2445
|
+
}
|
|
2446
|
+
},
|
|
2447
|
+
type: {
|
|
2448
|
+
label: "Predicate",
|
|
2449
|
+
fieldType: "FilterUiType",
|
|
2450
|
+
defaultValue: () => "patternNotEquals"
|
|
2451
|
+
},
|
|
2452
|
+
value: {
|
|
2453
|
+
label: "Seq",
|
|
2454
|
+
fieldType: "string",
|
|
2455
|
+
defaultValue: () => ""
|
|
2456
|
+
}
|
|
2457
|
+
},
|
|
2458
|
+
supportedFor: ie
|
|
2459
|
+
},
|
|
2460
|
+
isNA: {
|
|
2461
|
+
label: "Is NA",
|
|
2462
|
+
form: {
|
|
2463
|
+
column: {
|
|
2464
|
+
label: "Column",
|
|
2465
|
+
fieldType: "SUniversalPColumnId",
|
|
2466
|
+
defaultValue: () => {
|
|
2467
|
+
}
|
|
2468
|
+
},
|
|
2469
|
+
type: {
|
|
2470
|
+
label: "Predicate",
|
|
2471
|
+
fieldType: "FilterUiType",
|
|
2472
|
+
defaultValue: () => "isNA"
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
supportedFor: () => !0
|
|
2476
|
+
},
|
|
2477
|
+
isNotNA: {
|
|
2478
|
+
label: "Is Not NA",
|
|
2479
|
+
form: {
|
|
2480
|
+
column: {
|
|
2481
|
+
label: "Column",
|
|
2482
|
+
fieldType: "SUniversalPColumnId",
|
|
2483
|
+
defaultValue: () => {
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
type: {
|
|
2487
|
+
label: "Predicate",
|
|
2488
|
+
fieldType: "FilterUiType",
|
|
2489
|
+
defaultValue: () => "isNotNA"
|
|
2490
|
+
}
|
|
2491
|
+
},
|
|
2492
|
+
supportedFor: () => !0
|
|
2493
|
+
},
|
|
2494
|
+
or: {
|
|
2495
|
+
label: "Or",
|
|
2496
|
+
form: {
|
|
2497
|
+
type: {
|
|
2498
|
+
fieldType: "FilterUiType",
|
|
2499
|
+
label: "Predicate",
|
|
2500
|
+
defaultValue: () => "or"
|
|
2501
|
+
},
|
|
2502
|
+
filters: {
|
|
2503
|
+
fieldType: "unknown[]",
|
|
2504
|
+
label: "Filters",
|
|
2505
|
+
defaultValue: () => []
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
supportedFor: () => !1
|
|
2509
|
+
},
|
|
2510
|
+
and: {
|
|
2511
|
+
label: "And",
|
|
2512
|
+
form: {
|
|
2513
|
+
type: {
|
|
2514
|
+
fieldType: "FilterUiType",
|
|
2515
|
+
label: "Predicate",
|
|
2516
|
+
defaultValue: () => "and"
|
|
2517
|
+
},
|
|
2518
|
+
filters: {
|
|
2519
|
+
fieldType: "unknown[]",
|
|
2520
|
+
label: "Filters",
|
|
2521
|
+
defaultValue: () => []
|
|
2522
|
+
}
|
|
2523
|
+
},
|
|
2524
|
+
supportedFor: () => !1
|
|
2525
|
+
},
|
|
2526
|
+
not: {
|
|
2527
|
+
label: "Not",
|
|
2528
|
+
form: {
|
|
2529
|
+
type: {
|
|
2530
|
+
fieldType: "FilterUiType",
|
|
2531
|
+
label: "Predicate",
|
|
2532
|
+
defaultValue: () => "not"
|
|
2533
|
+
},
|
|
2534
|
+
filter: {
|
|
2535
|
+
fieldType: "form",
|
|
2536
|
+
label: "Filter",
|
|
2537
|
+
defaultValue: () => {
|
|
2538
|
+
}
|
|
2539
|
+
// TODO:
|
|
2540
|
+
}
|
|
2541
|
+
},
|
|
2542
|
+
supportedFor: () => !1
|
|
2543
|
+
}
|
|
2544
|
+
};
|
|
2545
|
+
function Qn(t) {
|
|
2546
|
+
return t ? Object.entries(Qe).filter(([e, n]) => n.supportedFor(t)).map(([e, n]) => ({
|
|
2547
|
+
label: n.label,
|
|
2548
|
+
value: e
|
|
2549
|
+
})) : [];
|
|
2550
|
+
}
|
|
2551
|
+
function Zn(t) {
|
|
2552
|
+
return Qe[t];
|
|
2171
2553
|
}
|
|
2172
|
-
|
|
2554
|
+
function Ae(t) {
|
|
2555
|
+
if (t.type === "or")
|
|
2556
|
+
return {
|
|
2557
|
+
type: "or",
|
|
2558
|
+
filters: Ke(t.filters)
|
|
2559
|
+
};
|
|
2560
|
+
if (t.type === "and")
|
|
2561
|
+
return {
|
|
2562
|
+
type: "and",
|
|
2563
|
+
filters: Ke(t.filters)
|
|
2564
|
+
};
|
|
2565
|
+
if (t.type === "not")
|
|
2566
|
+
return {
|
|
2567
|
+
type: "not",
|
|
2568
|
+
filter: Ae(t.filter)
|
|
2569
|
+
};
|
|
2570
|
+
if (t.type === "isNA")
|
|
2571
|
+
return {
|
|
2572
|
+
type: "isNA",
|
|
2573
|
+
column: t.column
|
|
2574
|
+
};
|
|
2575
|
+
if (t.type === "isNotNA")
|
|
2576
|
+
return { type: "not", filter: { type: "isNA", column: t.column } };
|
|
2577
|
+
if (t.type === "patternEquals")
|
|
2578
|
+
return {
|
|
2579
|
+
type: "pattern",
|
|
2580
|
+
column: t.column,
|
|
2581
|
+
predicate: {
|
|
2582
|
+
type: "equals",
|
|
2583
|
+
value: t.value
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
if (t.type === "patternNotEquals")
|
|
2587
|
+
return { type: "not", filter: {
|
|
2588
|
+
type: "pattern",
|
|
2589
|
+
column: t.column,
|
|
2590
|
+
predicate: { type: "equals", value: t.value }
|
|
2591
|
+
} };
|
|
2592
|
+
if (t.type === "patternContainSubsequence")
|
|
2593
|
+
return {
|
|
2594
|
+
type: "pattern",
|
|
2595
|
+
column: t.column,
|
|
2596
|
+
predicate: {
|
|
2597
|
+
type: "containSubsequence",
|
|
2598
|
+
value: t.value
|
|
2599
|
+
}
|
|
2600
|
+
};
|
|
2601
|
+
if (t.type === "patternNotContainSubsequence")
|
|
2602
|
+
return { type: "not", filter: {
|
|
2603
|
+
type: "pattern",
|
|
2604
|
+
column: t.column,
|
|
2605
|
+
predicate: { type: "containSubsequence", value: t.value }
|
|
2606
|
+
} };
|
|
2607
|
+
if (t.type === "topN")
|
|
2608
|
+
return {
|
|
2609
|
+
type: "numericalComparison",
|
|
2610
|
+
lhs: {
|
|
2611
|
+
transformer: "rank",
|
|
2612
|
+
column: t.column,
|
|
2613
|
+
descending: !0
|
|
2614
|
+
},
|
|
2615
|
+
rhs: t.n,
|
|
2616
|
+
allowEqual: !0
|
|
2617
|
+
};
|
|
2618
|
+
if (t.type === "bottomN")
|
|
2619
|
+
return {
|
|
2620
|
+
type: "numericalComparison",
|
|
2621
|
+
lhs: {
|
|
2622
|
+
transformer: "rank",
|
|
2623
|
+
column: t.column
|
|
2624
|
+
},
|
|
2625
|
+
rhs: t.n,
|
|
2626
|
+
allowEqual: !0
|
|
2627
|
+
};
|
|
2628
|
+
if (t.type === "lessThan")
|
|
2629
|
+
return {
|
|
2630
|
+
type: "numericalComparison",
|
|
2631
|
+
lhs: t.column,
|
|
2632
|
+
rhs: t.x
|
|
2633
|
+
};
|
|
2634
|
+
if (t.type === "greaterThan")
|
|
2635
|
+
return {
|
|
2636
|
+
type: "numericalComparison",
|
|
2637
|
+
rhs: t.column,
|
|
2638
|
+
lhs: t.x
|
|
2639
|
+
};
|
|
2640
|
+
if (t.type === "greaterThanOrEqual")
|
|
2641
|
+
return {
|
|
2642
|
+
type: "numericalComparison",
|
|
2643
|
+
rhs: t.column,
|
|
2644
|
+
lhs: t.x,
|
|
2645
|
+
allowEqual: !0
|
|
2646
|
+
};
|
|
2647
|
+
if (t.type === "lessThanOrEqual")
|
|
2648
|
+
return {
|
|
2649
|
+
type: "numericalComparison",
|
|
2650
|
+
lhs: t.column,
|
|
2651
|
+
rhs: t.x,
|
|
2652
|
+
allowEqual: !0
|
|
2653
|
+
};
|
|
2654
|
+
if (t.type === "lessThanColumn")
|
|
2655
|
+
return {
|
|
2656
|
+
type: "numericalComparison",
|
|
2657
|
+
lhs: t.column,
|
|
2658
|
+
rhs: t.rhs,
|
|
2659
|
+
minDiff: t.minDiff,
|
|
2660
|
+
allowEqual: void 0
|
|
2661
|
+
};
|
|
2662
|
+
if (t.type === "lessThanColumnOrEqual")
|
|
2663
|
+
return {
|
|
2664
|
+
type: "numericalComparison",
|
|
2665
|
+
lhs: t.column,
|
|
2666
|
+
rhs: t.rhs,
|
|
2667
|
+
minDiff: t.minDiff,
|
|
2668
|
+
allowEqual: !0
|
|
2669
|
+
};
|
|
2670
|
+
if (t.type === void 0)
|
|
2671
|
+
throw new Error("Filter type is undefined, this should not happen");
|
|
2672
|
+
ln(t);
|
|
2673
|
+
}
|
|
2674
|
+
function Ke(t) {
|
|
2675
|
+
return t.filter((e) => e.type !== void 0).map(Ae);
|
|
2676
|
+
}
|
|
2677
|
+
function er(t) {
|
|
2678
|
+
return {
|
|
2679
|
+
title: t.title,
|
|
2680
|
+
mode: t.mode,
|
|
2681
|
+
steps: t.steps.filter((e) => e.filter.type == null ? !1 : e.filter.type === "or" || e.filter.type === "and" ? e.filter.filters.length > 0 : !1).map((e) => ({
|
|
2682
|
+
label: e.label.trim(),
|
|
2683
|
+
filter: Ae(e.filter)
|
|
2684
|
+
}))
|
|
2685
|
+
};
|
|
2686
|
+
}
|
|
2687
|
+
class tr {
|
|
2173
2688
|
constructor(e) {
|
|
2174
2689
|
this.handle = e;
|
|
2175
2690
|
}
|
|
@@ -2186,137 +2701,144 @@ class Gn {
|
|
|
2186
2701
|
var r;
|
|
2187
2702
|
return (r = cfgRenderCtx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
2188
2703
|
...e,
|
|
2189
|
-
filters:
|
|
2704
|
+
filters: Te(e.filters)
|
|
2190
2705
|
}), await platforma.pFrameDriver.calculateTableData(this.handle, e, n);
|
|
2191
2706
|
}
|
|
2192
2707
|
async getUniqueValues(e) {
|
|
2193
2708
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2194
2709
|
}
|
|
2195
2710
|
}
|
|
2196
|
-
function
|
|
2197
|
-
return
|
|
2711
|
+
function un(t) {
|
|
2712
|
+
return Be({
|
|
2198
2713
|
__isRef: !0,
|
|
2199
|
-
blockId:
|
|
2200
|
-
name:
|
|
2714
|
+
blockId: ae(t, "blockId"),
|
|
2715
|
+
name: ae(t, "name")
|
|
2201
2716
|
});
|
|
2202
2717
|
}
|
|
2203
|
-
function
|
|
2204
|
-
return
|
|
2205
|
-
ref:
|
|
2206
|
-
label:
|
|
2718
|
+
function nr(t) {
|
|
2719
|
+
return Be({
|
|
2720
|
+
ref: un(ae(t, "ref")),
|
|
2721
|
+
label: ae(t, "label")
|
|
2207
2722
|
});
|
|
2208
2723
|
}
|
|
2209
|
-
const
|
|
2210
|
-
sdkVersion:
|
|
2724
|
+
const rr = {
|
|
2725
|
+
sdkVersion: X
|
|
2211
2726
|
};
|
|
2212
|
-
function
|
|
2213
|
-
return
|
|
2727
|
+
function cn() {
|
|
2728
|
+
return Je({ sdkVersion: X });
|
|
2214
2729
|
}
|
|
2215
|
-
function
|
|
2730
|
+
function ir(t) {
|
|
2216
2731
|
try {
|
|
2217
|
-
return
|
|
2732
|
+
return cn();
|
|
2218
2733
|
} catch {
|
|
2219
2734
|
return t;
|
|
2220
2735
|
}
|
|
2221
2736
|
}
|
|
2222
|
-
function
|
|
2737
|
+
function or(t) {
|
|
2223
2738
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2224
2739
|
return globalThis.getEnvironmentValue(t);
|
|
2225
2740
|
}
|
|
2226
2741
|
export {
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2742
|
+
gn as Args,
|
|
2743
|
+
Ve as BlockModel,
|
|
2744
|
+
rr as CurrentSdkInfo,
|
|
2745
|
+
L as FutureRef,
|
|
2746
|
+
tn as IS_VIRTUAL_COLUMN,
|
|
2747
|
+
bn as It,
|
|
2748
|
+
Jn as JsRenderInternal,
|
|
2749
|
+
Ne as LABEL_ANNOTATION,
|
|
2750
|
+
nn as LINKER_COLUMN_ANNOTATION,
|
|
2751
|
+
vn as MainOutputs,
|
|
2752
|
+
Tt as OutputError,
|
|
2753
|
+
It as PAnnotationLabel,
|
|
2754
|
+
_t as PAnnotationTrace,
|
|
2755
|
+
Q as PColumnCollection,
|
|
2756
|
+
tr as PFrameImpl,
|
|
2757
|
+
J as RT_BINARY_PARTITIONED,
|
|
2758
|
+
z as RT_BINARY_SUPER_PARTITIONED,
|
|
2244
2759
|
H as RT_JSON_PARTITIONED,
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2760
|
+
ce as RT_JSON_SUPER_PARTITIONED,
|
|
2761
|
+
le as RT_RESOURCE_MAP,
|
|
2762
|
+
ue as RT_RESOURCE_MAP_PARTITIONED,
|
|
2763
|
+
ne as RenderCtx,
|
|
2764
|
+
$t as ResultPool,
|
|
2765
|
+
Cn as StagingOutputs,
|
|
2766
|
+
Et as Trace,
|
|
2767
|
+
Lt as TraceEntry,
|
|
2768
|
+
O as TreeNodeAccessor,
|
|
2769
|
+
Tn as UiState,
|
|
2770
|
+
zt as allColumnsComputed,
|
|
2771
|
+
re as allColumnsReady,
|
|
2772
|
+
In as and,
|
|
2773
|
+
er as compileAnnotationScript,
|
|
2774
|
+
Ae as compileFilter,
|
|
2775
|
+
Ke as compileFilters,
|
|
2776
|
+
Nt as convertOrParsePColumnData,
|
|
2777
|
+
zn as createPFrameForGraphs,
|
|
2778
|
+
Hn as createPlDataTableSheet,
|
|
2779
|
+
Oe as createPlDataTableStateV2,
|
|
2780
|
+
Gn as createPlDataTableV2,
|
|
2781
|
+
Xn as createRowSelectionColumn,
|
|
2782
|
+
He as deriveLabels,
|
|
2783
|
+
me as downgradeCfgOrLambda,
|
|
2784
|
+
Ue as enrichCompatible,
|
|
2785
|
+
Un as extractArchiveAndGetURL,
|
|
2786
|
+
Wn as extractConfig,
|
|
2787
|
+
Ut as filterDataInfoEntries,
|
|
2788
|
+
Qe as filterUiMetadata,
|
|
2789
|
+
wn as flatten,
|
|
2790
|
+
nr as fromPlOption,
|
|
2791
|
+
un as fromPlRef,
|
|
2792
|
+
Ht as getAllLabelColumns,
|
|
2793
|
+
on as getAvailableWithLinkersAxes,
|
|
2794
|
+
Vn as getBlobContent,
|
|
2795
|
+
Dn as getBlobContentAsJson,
|
|
2796
|
+
On as getBlobContentAsString,
|
|
2797
|
+
Rn as getDownloadedBlobContent,
|
|
2798
|
+
or as getEnvironmentValue,
|
|
2799
|
+
Zn as getFilterUiMetadata,
|
|
2800
|
+
Qn as getFilterUiTypeOptions,
|
|
2801
|
+
Z as getFromCfg,
|
|
2802
|
+
se as getImmediate,
|
|
2803
|
+
Kn as getImportProgress,
|
|
2804
|
+
ae as getJsonField,
|
|
2805
|
+
Mn as getLastLogs,
|
|
2806
|
+
rn as getLinkerColumnsMap,
|
|
2807
|
+
Bn as getLogHandle,
|
|
2808
|
+
De as getMatchingLabelColumns,
|
|
2809
|
+
Nn as getOnDemandBlobContent,
|
|
2810
|
+
Ot as getPartitionKeysList,
|
|
2811
|
+
ir as getPlatformaOrDefault,
|
|
2812
|
+
jn as getProgressLog,
|
|
2813
|
+
qn as getProgressLogWithInfo,
|
|
2814
|
+
cn as getRawPlatformaInstance,
|
|
2815
|
+
Ln as getResourceField,
|
|
2816
|
+
En as getResourceValueAsJson,
|
|
2817
|
+
Rt as getUniquePartitionKeys,
|
|
2297
2818
|
ge as ifDef,
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2819
|
+
Xt as isColumnHidden,
|
|
2820
|
+
Yt as isColumnOptional,
|
|
2821
|
+
an as isColumnReady,
|
|
2822
|
+
Wt as isConfigLambda,
|
|
2823
|
+
xn as isEmpty,
|
|
2824
|
+
Se as isLabelColumn,
|
|
2825
|
+
en as isLinkerColumn,
|
|
2826
|
+
yn as isolate,
|
|
2827
|
+
Sn as makeArray,
|
|
2828
|
+
Ye as makeDefaultPTableParams,
|
|
2829
|
+
Be as makeObject,
|
|
2830
|
+
An as mapArrayValues,
|
|
2831
|
+
Yn as mapPTableValueToAxisKey,
|
|
2832
|
+
Pn as mapRecordValues,
|
|
2833
|
+
kn as mapResourceFields,
|
|
2834
|
+
Fn as not,
|
|
2835
|
+
_n as or,
|
|
2836
|
+
Ce as parsePColumnData,
|
|
2837
|
+
$n as parseResourceMap,
|
|
2838
|
+
St as readOutput,
|
|
2839
|
+
ye as uniqueBy,
|
|
2840
|
+
ln as unreachable,
|
|
2841
|
+
Gt as upgradePlDataTableStateV2,
|
|
2842
|
+
mn as wrapOutputs
|
|
2321
2843
|
};
|
|
2322
2844
|
//# sourceMappingURL=index.mjs.map
|