@platforma-sdk/model 1.29.2 → 1.29.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/components/PlDataTable.d.ts +38 -4
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +583 -479
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/PFrameForGraphs.test.ts +37 -0
- package/src/components/PFrameForGraphs.ts +21 -7
- package/src/components/PlDataTable.ts +250 -67
package/dist/index.mjs
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (t, e, n) =>
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var Ue = Object.defineProperty;
|
|
2
|
+
var Me = (t, e, n) => e in t ? Ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var L = (t, e, n) => Me(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as me, mapPObjectData as ye, isDataInfoEntries as Se, isDataInfo as ve, dataInfoToEntries as We, resolveAnchors as Ge, isPColumnSpec as Q, isPartitionedDataInfoEntries as He, getAxisId as E, entriesToDataInfo as qe, selectorsToPredicate as ce, canonicalizeAxisId as ze, AnchoredIdDeriver as be, isPlRef as Ye, mapValueInVOE as Xe, ensurePColumn as Qe, extractAllColumns as Ze, mapPTableDef as et, mapDataInfo as tt, canonicalizeJson as ee, matchAxisId as W, getColumnIdAndSpec as Ie, getPColumnSpecId as we } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
6
|
+
import _e from "canonicalize";
|
|
7
|
+
import { z as V } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class nt 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 rt(t) {
|
|
15
|
+
if (!t.ok) throw new nt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ut(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return rt(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function C(t) {
|
|
26
26
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? Z(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function G(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Mt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const Wt = G("$args"), Gt = G("$it"), Ht = G("$prod"), qt = G("$staging"), zt = G("$ui");
|
|
38
38
|
function Z(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Le(t) {
|
|
42
42
|
const e = {};
|
|
43
|
-
for (const [n, r] of Object.entries(t)) e[n] =
|
|
43
|
+
for (const [n, r] of Object.entries(t)) e[n] = C(r);
|
|
44
44
|
return {
|
|
45
45
|
type: "MakeObject",
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Yt(...t) {
|
|
50
50
|
const e = [];
|
|
51
|
-
for (const n of t) e.push(
|
|
51
|
+
for (const n of t) e.push(C(n));
|
|
52
52
|
return {
|
|
53
53
|
type: "MakeArray",
|
|
54
54
|
template: e
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function te(t, e) {
|
|
58
58
|
return {
|
|
59
59
|
type: "GetJsonField",
|
|
60
|
-
source:
|
|
61
|
-
field:
|
|
60
|
+
source: C(t),
|
|
61
|
+
field: C(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Xt(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function Ut(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Qt(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,54 +77,54 @@ function Bt(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Zt(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function en(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function tn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function nn(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 rn(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 sn(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
|
-
source:
|
|
116
|
-
field:
|
|
115
|
+
source: C(t),
|
|
116
|
+
field: C(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function on() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
123
|
-
source:
|
|
123
|
+
source: C(t)
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function an(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,88 +132,88 @@ function Xt(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ln(t) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
|
-
source:
|
|
138
|
+
source: C(t)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function un(t) {
|
|
142
142
|
return {
|
|
143
143
|
type: "GetBlobContentAsString",
|
|
144
|
-
source:
|
|
144
|
+
source: C(t)
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function cn() {
|
|
148
148
|
return function(t) {
|
|
149
149
|
return {
|
|
150
150
|
type: "GetBlobContentAsJson",
|
|
151
|
-
source:
|
|
151
|
+
source: C(t)
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function pn(t) {
|
|
156
156
|
return {
|
|
157
157
|
type: "GetDownloadedBlobContent",
|
|
158
|
-
source:
|
|
158
|
+
source: C(t)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function dn(t) {
|
|
162
162
|
return {
|
|
163
163
|
type: "GetOnDemandBlobContent",
|
|
164
|
-
source:
|
|
164
|
+
source: C(t)
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function fn(t, e) {
|
|
168
168
|
return {
|
|
169
169
|
type: "ExtractArchiveAndGetURL",
|
|
170
170
|
format: e,
|
|
171
|
-
source:
|
|
171
|
+
source: C(t)
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function hn(t) {
|
|
175
175
|
return {
|
|
176
176
|
type: "GetImportProgress",
|
|
177
|
-
source:
|
|
177
|
+
source: C(t)
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function gn(t, e) {
|
|
181
181
|
return {
|
|
182
182
|
type: "GetLastLogs",
|
|
183
|
-
source:
|
|
183
|
+
source: C(t),
|
|
184
184
|
lines: e
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function mn(t, e) {
|
|
188
188
|
return {
|
|
189
189
|
type: "GetProgressLog",
|
|
190
|
-
source:
|
|
190
|
+
source: C(t),
|
|
191
191
|
patternToSearch: e
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function yn(t, e) {
|
|
195
195
|
return {
|
|
196
196
|
type: "GetProgressLogWithInfo",
|
|
197
|
-
source:
|
|
197
|
+
source: C(t),
|
|
198
198
|
patternToSearch: e
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function vn(t) {
|
|
202
202
|
return {
|
|
203
203
|
type: "GetLogHandle",
|
|
204
|
-
source:
|
|
204
|
+
source: C(t)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function it() {
|
|
208
208
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Te(t) {
|
|
211
211
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
212
212
|
return globalThis.getPlatforma(t);
|
|
213
213
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
214
214
|
throw new Error("Can't get platforma instance.");
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function st() {
|
|
217
217
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
218
218
|
}
|
|
219
219
|
function m() {
|
|
@@ -221,31 +221,31 @@ function m() {
|
|
|
221
221
|
throw new Error("Not in config rendering context");
|
|
222
222
|
}
|
|
223
223
|
function Y(t, e) {
|
|
224
|
-
const n =
|
|
224
|
+
const n = st();
|
|
225
225
|
if (n === void 0) return !1;
|
|
226
226
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
227
|
return n.callbackRegistry[t] = e, !0;
|
|
228
228
|
}
|
|
229
229
|
const ae = /* @__PURE__ */ new Map();
|
|
230
|
-
function
|
|
230
|
+
function ot(t, e) {
|
|
231
231
|
t in m().callbackRegistry || (m().callbackRegistry[t] = (n) => {
|
|
232
232
|
for (const r of ae.get(t))
|
|
233
233
|
r(n);
|
|
234
234
|
}, ae.set(t, [])), ae.get(t).push(e);
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class S {
|
|
237
237
|
constructor(e, n = (r) => r) {
|
|
238
238
|
L(this, "isResolved", !1);
|
|
239
239
|
L(this, "resolvedValue");
|
|
240
|
-
this.handle = e, this.postProcess = n,
|
|
240
|
+
this.handle = e, this.postProcess = n, ot(e, (r) => {
|
|
241
241
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
map(e) {
|
|
245
|
-
return new
|
|
245
|
+
return new S(this.handle, (n) => e(this.postProcess(n)));
|
|
246
246
|
}
|
|
247
247
|
mapDefined(e) {
|
|
248
|
-
return new
|
|
248
|
+
return new S(this.handle, (n) => {
|
|
249
249
|
const r = this.postProcess(n);
|
|
250
250
|
return r ? e(r) : void 0;
|
|
251
251
|
});
|
|
@@ -257,7 +257,7 @@ class C {
|
|
|
257
257
|
function pe(t, e) {
|
|
258
258
|
return t === void 0 ? void 0 : e(t);
|
|
259
259
|
}
|
|
260
|
-
class
|
|
260
|
+
class I {
|
|
261
261
|
constructor(e, n) {
|
|
262
262
|
this.handle = e, this.resolvePath = n;
|
|
263
263
|
}
|
|
@@ -298,7 +298,7 @@ class _ {
|
|
|
298
298
|
];
|
|
299
299
|
return pe(
|
|
300
300
|
m().resolveWithCommon(this.handle, e, ...n),
|
|
301
|
-
(i) => new
|
|
301
|
+
(i) => new I(i, r)
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
get resourceType() {
|
|
@@ -320,7 +320,7 @@ class _ {
|
|
|
320
320
|
const e = [...this.resolvePath, "error"];
|
|
321
321
|
return pe(
|
|
322
322
|
m().getError(this.handle),
|
|
323
|
-
(n) => new
|
|
323
|
+
(n) => new I(n, e)
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
326
|
listInputFields() {
|
|
@@ -360,7 +360,7 @@ class _ {
|
|
|
360
360
|
getPColumns(e = !1, n = "") {
|
|
361
361
|
const r = this.parsePObjectCollection(e, n);
|
|
362
362
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
363
|
-
if (!
|
|
363
|
+
if (!me(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
364
364
|
return s;
|
|
365
365
|
});
|
|
366
366
|
}
|
|
@@ -378,18 +378,18 @@ class _ {
|
|
|
378
378
|
const i = {};
|
|
379
379
|
for (const [s, o] of Object.entries(r)) {
|
|
380
380
|
const a = [...this.resolvePath, s];
|
|
381
|
-
i[s] =
|
|
381
|
+
i[s] = ye(o, (l) => new I(l, a));
|
|
382
382
|
}
|
|
383
383
|
return i;
|
|
384
384
|
}
|
|
385
385
|
getFileContentAsBase64() {
|
|
386
|
-
return new
|
|
386
|
+
return new S(m().getBlobContentAsBase64(this.handle));
|
|
387
387
|
}
|
|
388
388
|
getFileContentAsString() {
|
|
389
|
-
return new
|
|
389
|
+
return new S(m().getBlobContentAsString(this.handle));
|
|
390
390
|
}
|
|
391
391
|
getFileContentAsJson() {
|
|
392
|
-
return new
|
|
392
|
+
return new S(
|
|
393
393
|
m().getBlobContentAsString(this.handle)
|
|
394
394
|
).mapDefined((e) => JSON.parse(e));
|
|
395
395
|
}
|
|
@@ -409,7 +409,7 @@ class _ {
|
|
|
409
409
|
* @returns downloaded file handle
|
|
410
410
|
*/
|
|
411
411
|
getFileHandle() {
|
|
412
|
-
return new
|
|
412
|
+
return new S(m().getDownloadedBlobContentHandle(this.handle));
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* @deprecated use getFileHandle
|
|
@@ -421,7 +421,7 @@ class _ {
|
|
|
421
421
|
* @returns downloaded file handle
|
|
422
422
|
*/
|
|
423
423
|
getRemoteFileHandle() {
|
|
424
|
-
return new
|
|
424
|
+
return new S(m().getOnDemandBlobContentHandle(this.handle));
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @deprecated use getRemoteFileHandle
|
|
@@ -433,22 +433,22 @@ class _ {
|
|
|
433
433
|
* @returns the url to the extracted folder
|
|
434
434
|
*/
|
|
435
435
|
extractArchiveAndGetURL(e) {
|
|
436
|
-
return new
|
|
436
|
+
return new S(m().extractArchiveAndGetURL(this.handle, e));
|
|
437
437
|
}
|
|
438
438
|
getImportProgress() {
|
|
439
|
-
return new
|
|
439
|
+
return new S(m().getImportProgress(this.handle));
|
|
440
440
|
}
|
|
441
441
|
getLastLogs(e) {
|
|
442
|
-
return new
|
|
442
|
+
return new S(m().getLastLogs(this.handle, e));
|
|
443
443
|
}
|
|
444
444
|
getProgressLog(e) {
|
|
445
|
-
return new
|
|
445
|
+
return new S(m().getProgressLog(this.handle, e));
|
|
446
446
|
}
|
|
447
447
|
getProgressLogWithInfo(e) {
|
|
448
|
-
return new
|
|
448
|
+
return new S(m().getProgressLogWithInfo(this.handle, e));
|
|
449
449
|
}
|
|
450
450
|
getLogHandle() {
|
|
451
|
-
return new
|
|
451
|
+
return new S(m().getLogHandle(this.handle));
|
|
452
452
|
}
|
|
453
453
|
allFieldsResolved(e = "Input") {
|
|
454
454
|
switch (e) {
|
|
@@ -474,121 +474,121 @@ class _ {
|
|
|
474
474
|
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
475
475
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
476
476
|
);
|
|
477
|
-
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u,
|
|
477
|
+
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, w]) => o(u, w));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Ee = "staging", Fe = "main", at = {
|
|
481
481
|
explicitColumnsSupport: !0,
|
|
482
482
|
inlineColumnsSupport: !0,
|
|
483
483
|
activeArgs: !0
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function De(t) {
|
|
486
486
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
487
487
|
}
|
|
488
488
|
function de(t, e, n) {
|
|
489
489
|
if (e.has(n)) return;
|
|
490
490
|
if (e.add(n), typeof n === "object")
|
|
491
|
-
if (
|
|
491
|
+
if (De(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
492
492
|
else if (Array.isArray(n))
|
|
493
493
|
for (const i of n) de(t, e, i);
|
|
494
494
|
else
|
|
495
495
|
for (const [, i] of Object.entries(n))
|
|
496
496
|
i !== n && de(t, e, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function lt(t) {
|
|
499
499
|
const e = /* @__PURE__ */ new Set();
|
|
500
500
|
return de(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
503
|
__proto__: null,
|
|
504
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
505
|
-
MainAccessorName:
|
|
506
|
-
StagingAccessorName:
|
|
507
|
-
getAllFutureAwaits:
|
|
508
|
-
isFutureAwait:
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
510
|
-
type:
|
|
511
|
-
importance:
|
|
512
|
-
id:
|
|
513
|
-
label:
|
|
514
|
-
}),
|
|
515
|
-
function
|
|
516
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((
|
|
504
|
+
GlobalCfgRenderCtxFeatureFlags: at,
|
|
505
|
+
MainAccessorName: Fe,
|
|
506
|
+
StagingAccessorName: Ee,
|
|
507
|
+
getAllFutureAwaits: lt,
|
|
508
|
+
isFutureAwait: De
|
|
509
|
+
}, Symbol.toStringTag, { value: "Module" })), ut = "pl7.app/label", ct = "pl7.app/trace", pt = V.object({
|
|
510
|
+
type: V.string(),
|
|
511
|
+
importance: V.number().optional(),
|
|
512
|
+
id: V.string().optional(),
|
|
513
|
+
label: V.string()
|
|
514
|
+
}), dt = V.array(pt), ft = 1e-3, ht = "__LABEL__", Ae = "__LABEL__@1";
|
|
515
|
+
function Oe(t, e, n = {}) {
|
|
516
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((d) => {
|
|
517
517
|
var q, F;
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
"spec" in
|
|
521
|
-
const
|
|
522
|
-
...
|
|
523
|
-
...
|
|
524
|
-
...
|
|
518
|
+
const h = e(d);
|
|
519
|
+
let f, x, c;
|
|
520
|
+
"spec" in h && typeof h.spec == "object" ? (f = h.spec, x = h.prefixTrace, c = h.suffixTrace) : f = h;
|
|
521
|
+
const y = (q = f.annotations) == null ? void 0 : q[ut], g = (F = f.annotations) == null ? void 0 : F[ct], v = (g ? dt.safeParse(JSON.parse(g)).data : void 0) ?? [], A = [
|
|
522
|
+
...x ?? [],
|
|
523
|
+
...v,
|
|
524
|
+
...c ?? []
|
|
525
525
|
];
|
|
526
|
-
if (
|
|
527
|
-
const
|
|
528
|
-
n.addLabelAsSuffix ?
|
|
526
|
+
if (y) {
|
|
527
|
+
const _ = { label: y, type: ht, importance: -2 };
|
|
528
|
+
n.addLabelAsSuffix ? A.push(_) : A.splice(0, 0, _);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
for (let
|
|
532
|
-
const { type: R } =
|
|
530
|
+
const D = [], $ = /* @__PURE__ */ new Map();
|
|
531
|
+
for (let _ = A.length - 1; _ >= 0; --_) {
|
|
532
|
+
const { type: R } = A[_], se = A[_].importance ?? 0, J = ($.get(R) ?? 0) + 1;
|
|
533
533
|
$.set(R, J);
|
|
534
|
-
const
|
|
535
|
-
i.set(
|
|
536
|
-
|
|
534
|
+
const P = `${R}@${J}`;
|
|
535
|
+
i.set(P, (i.get(P) ?? 0) + 1), r.set(
|
|
536
|
+
P,
|
|
537
537
|
Math.max(
|
|
538
|
-
r.get(
|
|
539
|
-
se - (
|
|
538
|
+
r.get(P) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
+
se - (A.length - _) * ft
|
|
540
540
|
)
|
|
541
|
-
),
|
|
541
|
+
), D.push({ ...A[_], fullType: P, occurenceIndex: J });
|
|
542
542
|
}
|
|
543
|
-
return
|
|
544
|
-
value:
|
|
545
|
-
spec:
|
|
546
|
-
label:
|
|
547
|
-
fullTrace:
|
|
543
|
+
return D.reverse(), {
|
|
544
|
+
value: d,
|
|
545
|
+
spec: f,
|
|
546
|
+
label: y,
|
|
547
|
+
fullTrace: D
|
|
548
548
|
};
|
|
549
549
|
}), o = [], a = [], l = [...r];
|
|
550
|
-
l.sort(([,
|
|
551
|
-
for (const [
|
|
552
|
-
|
|
553
|
-
const u = (
|
|
554
|
-
const
|
|
555
|
-
for (let
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
550
|
+
l.sort(([, d], [, h]) => h - d);
|
|
551
|
+
for (const [d] of l)
|
|
552
|
+
d.endsWith("@1") || i.get(d) === t.length ? o.push(d) : a.push(d);
|
|
553
|
+
const u = (d) => {
|
|
554
|
+
const h = [];
|
|
555
|
+
for (let f = 0; f < s.length; f++) {
|
|
556
|
+
const x = s[f], c = x.fullTrace.filter((v) => d.has(v.fullType));
|
|
557
|
+
if (c.length === 0)
|
|
558
558
|
return;
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
label:
|
|
562
|
-
value:
|
|
559
|
+
const y = c.map((v) => v.label), g = n.separator ?? " / ";
|
|
560
|
+
h.push({
|
|
561
|
+
label: y.join(g),
|
|
562
|
+
value: x.value
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
-
return
|
|
565
|
+
return h;
|
|
566
566
|
};
|
|
567
567
|
if (o.length === 0) {
|
|
568
568
|
if (a.length !== 0) throw new Error("Assertion error.");
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
571
|
-
return
|
|
569
|
+
const d = u(new Set(Ae));
|
|
570
|
+
if (d === void 0) throw new Error("Assertion error.");
|
|
571
|
+
return d;
|
|
572
572
|
}
|
|
573
|
-
let
|
|
574
|
-
for (;
|
|
575
|
-
const
|
|
576
|
-
n.includeNativeLabel &&
|
|
577
|
-
for (let
|
|
578
|
-
|
|
579
|
-
const
|
|
580
|
-
if (
|
|
581
|
-
|
|
582
|
-
}
|
|
583
|
-
const
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
586
|
-
}
|
|
587
|
-
const H = "PColumnData/",
|
|
573
|
+
let w = 0, b = 0;
|
|
574
|
+
for (; w < o.length; ) {
|
|
575
|
+
const d = /* @__PURE__ */ new Set();
|
|
576
|
+
n.includeNativeLabel && d.add(Ae);
|
|
577
|
+
for (let f = 0; f < w; ++f) d.add(o[f]);
|
|
578
|
+
d.add(o[b]);
|
|
579
|
+
const h = u(d);
|
|
580
|
+
if (h !== void 0 && new Set(h.map((f) => f.label)).size === t.length) return h;
|
|
581
|
+
b++, b >= o.length && (w++, b = w);
|
|
582
|
+
}
|
|
583
|
+
const p = u(/* @__PURE__ */ new Set([...o, ...a]));
|
|
584
|
+
if (p === void 0) throw new Error("Assertion error.");
|
|
585
|
+
return p;
|
|
586
|
+
}
|
|
587
|
+
const H = "PColumnData/", ne = H + "ResourceMap", re = H + "Partitioned/ResourceMap", B = H + "JsonPartitioned", K = H + "BinaryPartitioned", Re = H + "Partitioned/", ie = Re + "JsonPartitioned", U = Re + "BinaryPartitioned";
|
|
588
588
|
function ke(t, e, n, r = [], i) {
|
|
589
589
|
if (t === void 0) return !1;
|
|
590
590
|
switch (t.resourceType.name) {
|
|
591
|
-
case
|
|
591
|
+
case ne: {
|
|
592
592
|
let s = t.getInputsLocked();
|
|
593
593
|
for (const o of t.listInputFields()) {
|
|
594
594
|
const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
|
|
@@ -596,7 +596,7 @@ function ke(t, e, n, r = [], i) {
|
|
|
596
596
|
}
|
|
597
597
|
return s;
|
|
598
598
|
}
|
|
599
|
-
case
|
|
599
|
+
case re: {
|
|
600
600
|
let s = t.getInputsLocked();
|
|
601
601
|
for (const o of t.listInputFields()) {
|
|
602
602
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
@@ -618,7 +618,7 @@ function ke(t, e, n, r = [], i) {
|
|
|
618
618
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function wn(t, e, n = !1) {
|
|
622
622
|
const r = [];
|
|
623
623
|
return { isComplete: ke(t, e, r, [], n), data: r };
|
|
624
624
|
}
|
|
@@ -629,44 +629,44 @@ const fe = (t) => {
|
|
|
629
629
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
630
630
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
631
631
|
};
|
|
632
|
-
function
|
|
632
|
+
function gt(t) {
|
|
633
633
|
if (!t) return;
|
|
634
634
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
635
635
|
let i = 0;
|
|
636
636
|
switch (e) {
|
|
637
|
-
case
|
|
637
|
+
case ne:
|
|
638
638
|
i = n.keyLength;
|
|
639
639
|
break;
|
|
640
|
-
case
|
|
640
|
+
case re:
|
|
641
641
|
i = n.partitionKeyLength + n.keyLength;
|
|
642
642
|
break;
|
|
643
|
-
case
|
|
644
|
-
case
|
|
643
|
+
case B:
|
|
644
|
+
case K:
|
|
645
645
|
i = n.partitionKeyLength;
|
|
646
646
|
break;
|
|
647
|
-
case
|
|
648
|
-
case
|
|
647
|
+
case U:
|
|
648
|
+
case ie:
|
|
649
649
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
650
650
|
break;
|
|
651
651
|
}
|
|
652
652
|
switch (e) {
|
|
653
|
-
case
|
|
654
|
-
case
|
|
655
|
-
case
|
|
653
|
+
case ne:
|
|
654
|
+
case B:
|
|
655
|
+
case K:
|
|
656
656
|
for (let s of t.listInputFields()) {
|
|
657
|
-
e ===
|
|
657
|
+
e === K && (s = fe(s).baseKey);
|
|
658
658
|
const o = [...JSON.parse(s)];
|
|
659
659
|
r.push(o);
|
|
660
660
|
}
|
|
661
661
|
break;
|
|
662
|
-
case ne:
|
|
663
|
-
case B:
|
|
664
662
|
case re:
|
|
663
|
+
case U:
|
|
664
|
+
case ie:
|
|
665
665
|
for (const s of t.listInputFields()) {
|
|
666
666
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
667
667
|
if (a !== void 0)
|
|
668
668
|
for (let l of a.listInputFields()) {
|
|
669
|
-
e ===
|
|
669
|
+
e === U && (l = fe(l).baseKey);
|
|
670
670
|
const u = [...o, ...JSON.parse(l)];
|
|
671
671
|
r.push(u);
|
|
672
672
|
}
|
|
@@ -675,7 +675,7 @@ function lt(t) {
|
|
|
675
675
|
}
|
|
676
676
|
return { data: r, keyLength: i };
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function mt(t) {
|
|
679
679
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
680
680
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
681
681
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -694,11 +694,11 @@ function ut(t) {
|
|
|
694
694
|
}
|
|
695
695
|
return r.map((i) => Array.from(i.values()));
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function yt(t) {
|
|
698
698
|
if (t === void 0) return;
|
|
699
|
-
if (
|
|
700
|
-
return
|
|
701
|
-
const e =
|
|
699
|
+
if (Se(t))
|
|
700
|
+
return mt(t);
|
|
701
|
+
const e = gt(t);
|
|
702
702
|
if (!e) return;
|
|
703
703
|
const { data: n, keyLength: r } = e, i = [];
|
|
704
704
|
for (let s = 0; s < r; ++s)
|
|
@@ -714,13 +714,13 @@ function ct(t) {
|
|
|
714
714
|
function he(t, e = []) {
|
|
715
715
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
716
716
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
717
|
-
if (e.length > 0 && (n ===
|
|
717
|
+
if (e.length > 0 && (n === ie || n === U))
|
|
718
718
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
719
719
|
switch (n) {
|
|
720
|
-
case te:
|
|
721
720
|
case ne:
|
|
721
|
+
case re:
|
|
722
722
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
723
|
-
case
|
|
723
|
+
case B: {
|
|
724
724
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
725
725
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
726
726
|
const i = [];
|
|
@@ -736,7 +736,7 @@ function he(t, e = []) {
|
|
|
736
736
|
parts: i
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
case
|
|
739
|
+
case K: {
|
|
740
740
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
741
741
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
742
742
|
const i = [], s = /* @__PURE__ */ new Map();
|
|
@@ -763,15 +763,15 @@ function he(t, e = []) {
|
|
|
763
763
|
parts: i
|
|
764
764
|
};
|
|
765
765
|
}
|
|
766
|
-
case
|
|
766
|
+
case ie: {
|
|
767
767
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
768
768
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
769
769
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
770
770
|
for (const o of t.listInputFields()) {
|
|
771
771
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
772
772
|
if (a === void 0) return;
|
|
773
|
-
if (a.resourceType.name !==
|
|
774
|
-
throw new Error(`Expected ${
|
|
773
|
+
if (a.resourceType.name !== B)
|
|
774
|
+
throw new Error(`Expected ${B} inside ${n}, but got ${a.resourceType.name}`);
|
|
775
775
|
const l = he(a, JSON.parse(o));
|
|
776
776
|
if (l === void 0) return;
|
|
777
777
|
if (l.type !== "JsonPartitioned")
|
|
@@ -784,15 +784,15 @@ function he(t, e = []) {
|
|
|
784
784
|
parts: s
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
-
case
|
|
787
|
+
case U: {
|
|
788
788
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
789
789
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
790
790
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
791
791
|
for (const o of t.listInputFields()) {
|
|
792
792
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
793
793
|
if (a === void 0) return;
|
|
794
|
-
if (a.resourceType.name !==
|
|
795
|
-
throw new Error(`Expected ${
|
|
794
|
+
if (a.resourceType.name !== K)
|
|
795
|
+
throw new Error(`Expected ${K} inside ${n}, but got ${a.resourceType.name}`);
|
|
796
796
|
const l = he(a, JSON.parse(o));
|
|
797
797
|
if (l === void 0) return;
|
|
798
798
|
if (l.type !== "BinaryPartitioned")
|
|
@@ -809,15 +809,15 @@ function he(t, e = []) {
|
|
|
809
809
|
throw new Error(`Unknown resource type: ${n}`);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function vt(t) {
|
|
813
813
|
if (t !== void 0) {
|
|
814
|
-
if (
|
|
815
|
-
if (
|
|
816
|
-
if (t instanceof
|
|
814
|
+
if (Se(t)) return t;
|
|
815
|
+
if (ve(t)) return We(t);
|
|
816
|
+
if (t instanceof I) return he(t);
|
|
817
817
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function bt(t, e) {
|
|
821
821
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
822
822
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
823
823
|
const { partitionKeyLength: s } = t;
|
|
@@ -877,7 +877,7 @@ function dt(t, e) {
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
class
|
|
880
|
+
class wt {
|
|
881
881
|
constructor(e) {
|
|
882
882
|
this.columns = e;
|
|
883
883
|
}
|
|
@@ -886,30 +886,30 @@ class ft {
|
|
|
886
886
|
return this.columns.filter((r) => n(r.spec));
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function At(t) {
|
|
890
890
|
if (t)
|
|
891
891
|
return t.map((e) => ({
|
|
892
|
-
type: `split:${
|
|
892
|
+
type: `split:${ze(e.axisId)}`,
|
|
893
893
|
label: e.label,
|
|
894
894
|
importance: 1e6
|
|
895
895
|
// High importance for split filters in labels
|
|
896
896
|
}));
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Pt(t) {
|
|
899
899
|
if (t)
|
|
900
900
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function xt(t, e) {
|
|
903
903
|
if (!e || e.length === 0) return t;
|
|
904
904
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
905
|
-
return
|
|
905
|
+
return _e({ id: t, axisFilters: n });
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Ct(t) {
|
|
908
908
|
if (!t || typeof t != "object") return !1;
|
|
909
909
|
const e = t, n = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
910
910
|
return !!e.domainAnchor || n || r;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function St(t) {
|
|
913
913
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
914
914
|
return [];
|
|
915
915
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -917,10 +917,10 @@ function vt(t) {
|
|
|
917
917
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
918
918
|
return e.sort((n, r) => n - r), e;
|
|
919
919
|
}
|
|
920
|
-
class
|
|
920
|
+
class ge {
|
|
921
921
|
constructor() {
|
|
922
922
|
L(this, "defaultProviderStore", []);
|
|
923
|
-
L(this, "providers", [new
|
|
923
|
+
L(this, "providers", [new wt(this.defaultProviderStore)]);
|
|
924
924
|
L(this, "axisLabelProviders", []);
|
|
925
925
|
}
|
|
926
926
|
addColumnProvider(e) {
|
|
@@ -947,73 +947,73 @@ class be {
|
|
|
947
947
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
948
948
|
...i ?? {}
|
|
949
949
|
}, l = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u = [];
|
|
950
|
-
for (const
|
|
951
|
-
const
|
|
952
|
-
let
|
|
953
|
-
if (
|
|
950
|
+
for (const p of l) {
|
|
951
|
+
const d = Ct(p);
|
|
952
|
+
let h;
|
|
953
|
+
if (d) {
|
|
954
954
|
if (!r)
|
|
955
955
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
956
|
-
|
|
956
|
+
h = Ge(r.anchors, p, n);
|
|
957
957
|
} else
|
|
958
|
-
|
|
959
|
-
const
|
|
958
|
+
h = p;
|
|
959
|
+
const f = /* @__PURE__ */ new Set(), x = [];
|
|
960
960
|
for (const g of this.providers) {
|
|
961
|
-
const
|
|
962
|
-
for (const
|
|
963
|
-
if (
|
|
964
|
-
|
|
961
|
+
const v = g.selectColumns(h);
|
|
962
|
+
for (const A of v) {
|
|
963
|
+
if (f.has(A.id)) throw new Error(`Duplicate column id ${A.id} in provider ${g.constructor.name}`);
|
|
964
|
+
f.add(A.id), x.push(A);
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
|
-
if (
|
|
968
|
-
const
|
|
969
|
-
for (const g of
|
|
967
|
+
if (x.length === 0) continue;
|
|
968
|
+
const c = St(p), y = c.length > 0;
|
|
969
|
+
for (const g of x) {
|
|
970
970
|
if (!Q(g.spec)) continue;
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
const
|
|
974
|
-
if (!
|
|
971
|
+
const v = g.spec;
|
|
972
|
+
if (y) {
|
|
973
|
+
const A = vt(g.data);
|
|
974
|
+
if (!A) {
|
|
975
975
|
if (s) continue;
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
|
-
if (!
|
|
979
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
980
|
-
const
|
|
981
|
-
if ($ >=
|
|
982
|
-
throw new Error(`Not enough partition keys (${
|
|
983
|
-
const q =
|
|
984
|
-
if (N >=
|
|
985
|
-
if (F.push([...
|
|
978
|
+
if (!He(A))
|
|
979
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A.type} for column ${g.id}`);
|
|
980
|
+
const D = yt(A), $ = c[c.length - 1];
|
|
981
|
+
if ($ >= A.partitionKeyLength)
|
|
982
|
+
throw new Error(`Not enough partition keys (${A.partitionKeyLength}) for requested split axes (max index ${$}) in column ${v.name}`);
|
|
983
|
+
const q = c.map((P) => this.findLabels(E(v.axesSpec[P]))), F = [], _ = (P, N) => {
|
|
984
|
+
if (N >= c.length) {
|
|
985
|
+
if (F.push([...P]), F.length > 1e4)
|
|
986
986
|
throw new Error("Too many key combinations, aborting.");
|
|
987
987
|
return;
|
|
988
988
|
}
|
|
989
|
-
const
|
|
990
|
-
if (
|
|
991
|
-
throw new Error(`Axis index ${
|
|
992
|
-
const
|
|
993
|
-
if (!
|
|
989
|
+
const O = c[N];
|
|
990
|
+
if (O >= D.length)
|
|
991
|
+
throw new Error(`Axis index ${O} out of bounds for unique keys array (length ${D.length}) during split key generation for column ${g.id}`);
|
|
992
|
+
const k = D[O];
|
|
993
|
+
if (!k || k.length === 0) {
|
|
994
994
|
F.length = 0;
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
997
|
-
for (const z of
|
|
998
|
-
|
|
997
|
+
for (const z of k)
|
|
998
|
+
P.push(z), _(P, N + 1), P.pop();
|
|
999
999
|
};
|
|
1000
|
-
if (
|
|
1000
|
+
if (_([], 0), F.length === 0)
|
|
1001
1001
|
continue;
|
|
1002
|
-
const R = [...
|
|
1003
|
-
for (let
|
|
1004
|
-
R.splice(
|
|
1005
|
-
const J = { ...
|
|
1006
|
-
for (const
|
|
1007
|
-
const N =
|
|
1008
|
-
const z = se[
|
|
1009
|
-
return { axisIdx: z, axisId:
|
|
1002
|
+
const R = [...v.axesSpec], se = c.map((P) => P);
|
|
1003
|
+
for (let P = c.length - 1; P >= 0; P--)
|
|
1004
|
+
R.splice(c[P], 1);
|
|
1005
|
+
const J = { ...v, axesSpec: R };
|
|
1006
|
+
for (const P of F) {
|
|
1007
|
+
const N = P.map((O, k) => {
|
|
1008
|
+
const z = se[k], Ne = E(v.axesSpec[z]), oe = q[k], Be = (oe == null ? void 0 : oe[O]) ?? String(O);
|
|
1009
|
+
return { axisIdx: z, axisId: Ne, value: O, label: Be };
|
|
1010
1010
|
});
|
|
1011
1011
|
u.push({
|
|
1012
1012
|
type: "split",
|
|
1013
1013
|
originalColumn: g,
|
|
1014
|
-
spec:
|
|
1014
|
+
spec: v,
|
|
1015
1015
|
adjustedSpec: J,
|
|
1016
|
-
dataEntries:
|
|
1016
|
+
dataEntries: A,
|
|
1017
1017
|
axisFilters: N
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
@@ -1021,39 +1021,39 @@ class be {
|
|
|
1021
1021
|
u.push({
|
|
1022
1022
|
type: "direct",
|
|
1023
1023
|
originalColumn: g,
|
|
1024
|
-
spec:
|
|
1025
|
-
adjustedSpec:
|
|
1024
|
+
spec: v,
|
|
1025
|
+
adjustedSpec: v
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
1029
|
if (u.length === 0) return [];
|
|
1030
|
-
const
|
|
1030
|
+
const w = Oe(
|
|
1031
1031
|
u,
|
|
1032
|
-
(
|
|
1033
|
-
spec:
|
|
1034
|
-
suffixTrace:
|
|
1032
|
+
(p) => ({
|
|
1033
|
+
spec: p.spec,
|
|
1034
|
+
suffixTrace: p.type === "split" ? At(p.axisFilters) : void 0
|
|
1035
1035
|
}),
|
|
1036
1036
|
a
|
|
1037
|
-
),
|
|
1038
|
-
for (const { value:
|
|
1039
|
-
const { originalColumn:
|
|
1040
|
-
let
|
|
1041
|
-
r ?
|
|
1042
|
-
let g = { ...
|
|
1037
|
+
), b = [];
|
|
1038
|
+
for (const { value: p, label: d } of w) {
|
|
1039
|
+
const { originalColumn: h, spec: f } = p, x = p.type === "split" ? p.axisFilters : void 0, c = Pt(x);
|
|
1040
|
+
let y;
|
|
1041
|
+
r ? y = r.deriveS(f, c) : y = xt(h.id, c);
|
|
1042
|
+
let g = { ...p.adjustedSpec };
|
|
1043
1043
|
o && (g = {
|
|
1044
1044
|
...g,
|
|
1045
1045
|
annotations: {
|
|
1046
1046
|
...g.annotations ?? {},
|
|
1047
|
-
"pl7.app/label":
|
|
1047
|
+
"pl7.app/label": d
|
|
1048
1048
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
id:
|
|
1049
|
+
}), b.push({
|
|
1050
|
+
id: y,
|
|
1051
1051
|
spec: g,
|
|
1052
|
-
data: () =>
|
|
1053
|
-
label:
|
|
1052
|
+
data: () => p.type === "split" ? qe(bt(p.dataEntries, c)) : p.originalColumn.data,
|
|
1053
|
+
label: d
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return b;
|
|
1057
1057
|
}
|
|
1058
1058
|
getColumns(e, n) {
|
|
1059
1059
|
const r = this.getUniversalEntries(e, {
|
|
@@ -1085,10 +1085,10 @@ function le(t, e) {
|
|
|
1085
1085
|
if (t[n] !== e[n]) return !1;
|
|
1086
1086
|
return !0;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return
|
|
1088
|
+
function Pe(t) {
|
|
1089
|
+
return ye(t, (e) => e instanceof I ? e.handle : ve(e) ? tt(e, (n) => n.handle) : e);
|
|
1090
1090
|
}
|
|
1091
|
-
class
|
|
1091
|
+
class It {
|
|
1092
1092
|
constructor() {
|
|
1093
1093
|
L(this, "ctx", m());
|
|
1094
1094
|
}
|
|
@@ -1100,7 +1100,7 @@ class bt {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
getOptions(e, n) {
|
|
1102
1102
|
const r = typeof e == "function" ? e : ce(e), i = this.getSpecs().entries.filter((s) => r(s.obj));
|
|
1103
|
-
return typeof n == "object" || typeof n > "u" ?
|
|
1103
|
+
return typeof n == "object" || typeof n > "u" ? Oe(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
|
|
1104
1104
|
ref: s,
|
|
1105
1105
|
label: o
|
|
1106
1106
|
})) : i.map((s) => ({
|
|
@@ -1109,17 +1109,17 @@ class bt {
|
|
|
1109
1109
|
}));
|
|
1110
1110
|
}
|
|
1111
1111
|
resolveAnchorCtx(e) {
|
|
1112
|
-
if (e instanceof
|
|
1112
|
+
if (e instanceof be) return e;
|
|
1113
1113
|
const n = {};
|
|
1114
1114
|
for (const [r, i] of Object.entries(e))
|
|
1115
|
-
if (
|
|
1115
|
+
if (Ye(i)) {
|
|
1116
1116
|
const s = this.getPColumnSpecByRef(i);
|
|
1117
1117
|
if (!s)
|
|
1118
1118
|
return;
|
|
1119
1119
|
n[r] = s;
|
|
1120
1120
|
} else
|
|
1121
1121
|
n[r] = i;
|
|
1122
|
-
return new
|
|
1122
|
+
return new be(n);
|
|
1123
1123
|
}
|
|
1124
1124
|
/**
|
|
1125
1125
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -1132,7 +1132,7 @@ class bt {
|
|
|
1132
1132
|
getAnchoredPColumns(e, n, r) {
|
|
1133
1133
|
const i = this.resolveAnchorCtx(e);
|
|
1134
1134
|
if (i)
|
|
1135
|
-
return new
|
|
1135
|
+
return new ge().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n, {
|
|
1136
1136
|
...r,
|
|
1137
1137
|
anchorCtx: i
|
|
1138
1138
|
});
|
|
@@ -1169,7 +1169,7 @@ class bt {
|
|
|
1169
1169
|
getCanonicalOptions(e, n, r) {
|
|
1170
1170
|
const i = this.resolveAnchorCtx(e);
|
|
1171
1171
|
if (!i) return;
|
|
1172
|
-
const s = new
|
|
1172
|
+
const s = new ge().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n, {
|
|
1173
1173
|
...r,
|
|
1174
1174
|
anchorCtx: i
|
|
1175
1175
|
});
|
|
@@ -1193,7 +1193,7 @@ class bt {
|
|
|
1193
1193
|
ref: n.ref,
|
|
1194
1194
|
obj: {
|
|
1195
1195
|
...n.obj,
|
|
1196
|
-
data: new
|
|
1196
|
+
data: new I(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
1197
1197
|
}
|
|
1198
1198
|
}))
|
|
1199
1199
|
};
|
|
@@ -1212,9 +1212,9 @@ class bt {
|
|
|
1212
1212
|
ref: n.ref,
|
|
1213
1213
|
obj: {
|
|
1214
1214
|
...n.obj,
|
|
1215
|
-
data:
|
|
1215
|
+
data: Xe(
|
|
1216
1216
|
n.obj.data,
|
|
1217
|
-
(r) => new
|
|
1217
|
+
(r) => new I(r, [n.ref.blockId, n.ref.name])
|
|
1218
1218
|
)
|
|
1219
1219
|
}
|
|
1220
1220
|
}))
|
|
@@ -1241,9 +1241,9 @@ class bt {
|
|
|
1241
1241
|
)) == null ? void 0 : r.obj;
|
|
1242
1242
|
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1243
1243
|
if (n)
|
|
1244
|
-
return
|
|
1244
|
+
return ye(
|
|
1245
1245
|
n,
|
|
1246
|
-
(i) => new
|
|
1246
|
+
(i) => new I(i, [e.blockId, e.name])
|
|
1247
1247
|
);
|
|
1248
1248
|
}
|
|
1249
1249
|
/**
|
|
@@ -1254,7 +1254,7 @@ class bt {
|
|
|
1254
1254
|
getPColumnByRef(e) {
|
|
1255
1255
|
const n = this.getDataByRef(e);
|
|
1256
1256
|
if (n)
|
|
1257
|
-
return
|
|
1257
|
+
return Qe(n);
|
|
1258
1258
|
}
|
|
1259
1259
|
/**
|
|
1260
1260
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1304,7 +1304,7 @@ class bt {
|
|
|
1304
1304
|
findLabels(e) {
|
|
1305
1305
|
const n = this.getData();
|
|
1306
1306
|
for (const r of n.entries) {
|
|
1307
|
-
if (!
|
|
1307
|
+
if (!me(r.obj)) continue;
|
|
1308
1308
|
const i = r.obj.spec;
|
|
1309
1309
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && le(e.domain, i.axesSpec[0].domain)) {
|
|
1310
1310
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -1331,7 +1331,7 @@ class bt {
|
|
|
1331
1331
|
let a = null;
|
|
1332
1332
|
const l = this;
|
|
1333
1333
|
return {
|
|
1334
|
-
id:
|
|
1334
|
+
id: _e(i),
|
|
1335
1335
|
spec: o,
|
|
1336
1336
|
get data() {
|
|
1337
1337
|
var u;
|
|
@@ -1363,7 +1363,7 @@ class X {
|
|
|
1363
1363
|
L(this, "uiState");
|
|
1364
1364
|
// lazy rendering because this feature is rarely used
|
|
1365
1365
|
L(this, "_activeArgsCache");
|
|
1366
|
-
L(this, "resultPool", new
|
|
1366
|
+
L(this, "resultPool", new It());
|
|
1367
1367
|
this.ctx = m(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1368
1368
|
}
|
|
1369
1369
|
/**
|
|
@@ -1382,14 +1382,14 @@ class X {
|
|
|
1382
1382
|
getNamedAccessor(e) {
|
|
1383
1383
|
return pe(
|
|
1384
1384
|
this.ctx.getAccessorHandleByName(e),
|
|
1385
|
-
(n) => new
|
|
1385
|
+
(n) => new I(n, [e])
|
|
1386
1386
|
);
|
|
1387
1387
|
}
|
|
1388
1388
|
get prerun() {
|
|
1389
|
-
return this.getNamedAccessor(
|
|
1389
|
+
return this.getNamedAccessor(Ee);
|
|
1390
1390
|
}
|
|
1391
1391
|
get outputs() {
|
|
1392
|
-
return this.getNamedAccessor(
|
|
1392
|
+
return this.getNamedAccessor(Fe);
|
|
1393
1393
|
}
|
|
1394
1394
|
/**
|
|
1395
1395
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -1401,13 +1401,13 @@ class X {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1403
1403
|
var i;
|
|
1404
|
-
const n = e.some((s) => !(s.data instanceof
|
|
1404
|
+
const n = e.some((s) => !(s.data instanceof I) || ve(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
1405
1405
|
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
1406
1406
|
}
|
|
1407
1407
|
// TODO remove all non-PColumn fields
|
|
1408
1408
|
createPFrame(e) {
|
|
1409
1409
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
1410
|
-
e.map((n) =>
|
|
1410
|
+
e.map((n) => Pe(n))
|
|
1411
1411
|
);
|
|
1412
1412
|
}
|
|
1413
1413
|
createPTable(e) {
|
|
@@ -1419,8 +1419,8 @@ class X {
|
|
|
1419
1419
|
},
|
|
1420
1420
|
filters: e.filters ?? [],
|
|
1421
1421
|
sorting: e.sorting ?? []
|
|
1422
|
-
} : n = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
1423
|
-
|
|
1422
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(Ze(n.src)), this.ctx.createPTable(
|
|
1423
|
+
et(n, (r) => Pe(r))
|
|
1424
1424
|
);
|
|
1425
1425
|
}
|
|
1426
1426
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1432,19 +1432,19 @@ class X {
|
|
|
1432
1432
|
return this.ctx.getCurrentUnstableMarker();
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
const M = "1.29.
|
|
1436
|
-
function
|
|
1435
|
+
const M = "1.29.13";
|
|
1436
|
+
function _t(t) {
|
|
1437
1437
|
return t.__renderLambda === !0;
|
|
1438
1438
|
}
|
|
1439
1439
|
function ue(t) {
|
|
1440
1440
|
if (t !== void 0)
|
|
1441
|
-
return
|
|
1441
|
+
return _t(t) ? t.handle : t;
|
|
1442
1442
|
}
|
|
1443
1443
|
function j(t) {
|
|
1444
1444
|
if (t !== void 0)
|
|
1445
1445
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function An(t) {
|
|
1448
1448
|
if (t.v3 !== void 0) {
|
|
1449
1449
|
const {
|
|
1450
1450
|
initialArgs: e,
|
|
@@ -1478,7 +1478,7 @@ function dn(t) {
|
|
|
1478
1478
|
renderingMode: n,
|
|
1479
1479
|
initialArgs: o,
|
|
1480
1480
|
outputs: Object.fromEntries(
|
|
1481
|
-
Object.entries(r).map(([u,
|
|
1481
|
+
Object.entries(r).map(([u, w]) => [u, j(w)])
|
|
1482
1482
|
),
|
|
1483
1483
|
inputsValid: j(i),
|
|
1484
1484
|
sections: j(s),
|
|
@@ -1496,7 +1496,7 @@ function dn(t) {
|
|
|
1496
1496
|
renderingMode: r,
|
|
1497
1497
|
initialArgs: o,
|
|
1498
1498
|
outputs: Object.fromEntries(
|
|
1499
|
-
Object.entries(i).map(([u,
|
|
1499
|
+
Object.entries(i).map(([u, w]) => [u, j(w)])
|
|
1500
1500
|
),
|
|
1501
1501
|
inputsValid: j(n),
|
|
1502
1502
|
sections: j(s),
|
|
@@ -1680,66 +1680,156 @@ class T {
|
|
|
1680
1680
|
Object.entries(this._outputs).map(([n, r]) => [n, ue(r)])
|
|
1681
1681
|
)
|
|
1682
1682
|
};
|
|
1683
|
-
return
|
|
1683
|
+
return it() ? Te({ sdkVersion: M }) : { config: e };
|
|
1684
1684
|
}
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1686
|
+
function Pn(t) {
|
|
1687
|
+
const e = t.type;
|
|
1688
|
+
switch (e) {
|
|
1689
|
+
case "axis":
|
|
1690
|
+
return ee(t);
|
|
1691
|
+
case "column":
|
|
1692
|
+
return ee(t);
|
|
1693
|
+
default:
|
|
1694
|
+
throw Error(`unsupported column type: ${e}`);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
function Lt(t) {
|
|
1698
|
+
return JSON.parse(t);
|
|
1699
|
+
}
|
|
1700
|
+
function xn(t) {
|
|
1701
|
+
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1702
|
+
}
|
|
1703
|
+
function je(t) {
|
|
1704
|
+
return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1705
|
+
name: "pl7.app/label",
|
|
1706
|
+
axes: [{}]
|
|
1707
|
+
// exactly one axis
|
|
1708
|
+
}, { dontWaitAllData: !0 });
|
|
1709
|
+
}
|
|
1710
|
+
function Ve(t, e) {
|
|
1711
|
+
const n = (i, s) => {
|
|
1712
|
+
let o = i.toString();
|
|
1713
|
+
if (s)
|
|
1714
|
+
for (const a in s)
|
|
1715
|
+
o += a, o += s[a];
|
|
1716
|
+
return o;
|
|
1717
|
+
}, r = /* @__PURE__ */ new Map();
|
|
1718
|
+
for (const i of t)
|
|
1719
|
+
for (const s of i.spec.axesSpec) {
|
|
1720
|
+
const o = E(s);
|
|
1721
|
+
for (const a of e) {
|
|
1722
|
+
const l = a.spec.axesSpec[0], u = E(a.spec.axesSpec[0]);
|
|
1723
|
+
if (W(o, u)) {
|
|
1724
|
+
const w = Object.keys(o.domain ?? {}).length, b = Object.keys(u.domain ?? {}).length;
|
|
1725
|
+
if (w > b) {
|
|
1726
|
+
const p = n(a.id, o.domain);
|
|
1727
|
+
r.set(p, {
|
|
1728
|
+
id: p,
|
|
1707
1729
|
spec: {
|
|
1708
|
-
...
|
|
1709
|
-
axesSpec: [{ ...
|
|
1730
|
+
...a.spec,
|
|
1731
|
+
axesSpec: [{ ...o, annotations: l.annotations }]
|
|
1710
1732
|
},
|
|
1711
|
-
data:
|
|
1733
|
+
data: a.data
|
|
1712
1734
|
});
|
|
1713
1735
|
} else
|
|
1714
|
-
|
|
1736
|
+
r.set(n(a.id), a);
|
|
1715
1737
|
}
|
|
1716
1738
|
}
|
|
1717
1739
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1740
|
+
return [...r.values()];
|
|
1741
|
+
}
|
|
1742
|
+
function Ke(t) {
|
|
1743
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
|
|
1744
|
+
return t.map((i) => i.data).every((i) => {
|
|
1745
|
+
if (e(i))
|
|
1746
|
+
return !0;
|
|
1747
|
+
if (n(i))
|
|
1748
|
+
return i.getIsReadyOrError();
|
|
1749
|
+
if (r(i))
|
|
1750
|
+
switch (i.type) {
|
|
1751
|
+
case "Json":
|
|
1752
|
+
return !0;
|
|
1753
|
+
case "JsonPartitioned":
|
|
1754
|
+
return Object.values(i.parts).every((o) => o.getIsReadyOrError());
|
|
1755
|
+
case "BinaryPartitioned":
|
|
1756
|
+
return Object.values(i.parts).every((o) => o.index.getIsReadyOrError() && o.values.getIsReadyOrError());
|
|
1757
|
+
}
|
|
1758
|
+
else
|
|
1759
|
+
throw Error(`unsupported column data type: ${i}`);
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1762
|
+
function $e(t, e, n, r, i, s) {
|
|
1763
|
+
let o = t;
|
|
1764
|
+
const a = [];
|
|
1765
|
+
if (s) {
|
|
1766
|
+
o = [];
|
|
1767
|
+
for (const l of t)
|
|
1768
|
+
s(l.spec) ? o.push(l) : a.push(l);
|
|
1769
|
+
}
|
|
1770
|
+
return a.push(...e), {
|
|
1730
1771
|
src: {
|
|
1731
1772
|
type: "outer",
|
|
1732
1773
|
primary: {
|
|
1733
|
-
type:
|
|
1734
|
-
entries:
|
|
1774
|
+
type: n,
|
|
1775
|
+
entries: o.map((l) => ({ type: "column", column: l }))
|
|
1735
1776
|
},
|
|
1736
|
-
secondary:
|
|
1777
|
+
secondary: a.map((l) => ({ type: "column", column: l }))
|
|
1737
1778
|
},
|
|
1738
|
-
filters:
|
|
1739
|
-
sorting:
|
|
1740
|
-
}
|
|
1779
|
+
filters: r,
|
|
1780
|
+
sorting: i
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
function Cn(t, e, n, r) {
|
|
1784
|
+
var u, w;
|
|
1785
|
+
Array.isArray(r) && (r = { filters: r });
|
|
1786
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((w = n == null ? void 0 : n.pTableParams) == null ? void 0 : w.sorting) ?? [], a = je(t.resultPool);
|
|
1787
|
+
if (!a) return;
|
|
1788
|
+
const l = Ve(e.map(Ie), a);
|
|
1789
|
+
if (Ke([...e, ...l]))
|
|
1790
|
+
return t.createPTable(
|
|
1791
|
+
$e(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1792
|
+
);
|
|
1793
|
+
}
|
|
1794
|
+
function Tt(t) {
|
|
1795
|
+
var e;
|
|
1796
|
+
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1797
|
+
}
|
|
1798
|
+
function Sn(t, e, n, r, i) {
|
|
1799
|
+
var f, x;
|
|
1800
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((f = r == null ? void 0 : r.pTableParams) == null ? void 0 : f.filters) ?? []], a = ((x = r == null ? void 0 : r.pTableParams) == null ? void 0 : x.sorting) ?? [], l = e.find((c) => n(c.spec));
|
|
1801
|
+
if (!l) return;
|
|
1802
|
+
const u = je(t.resultPool);
|
|
1803
|
+
if (!u) return;
|
|
1804
|
+
const w = [
|
|
1805
|
+
...l.spec.axesSpec.map((c) => ({
|
|
1806
|
+
type: "axis",
|
|
1807
|
+
id: E(c),
|
|
1808
|
+
spec: c
|
|
1809
|
+
})),
|
|
1810
|
+
...[...e, ...u].map((c) => ({
|
|
1811
|
+
type: "column",
|
|
1812
|
+
id: c.id,
|
|
1813
|
+
spec: c.spec
|
|
1814
|
+
}))
|
|
1815
|
+
], b = new Set((() => {
|
|
1816
|
+
var y, g;
|
|
1817
|
+
if (s === "inner") return [];
|
|
1818
|
+
const c = (g = (y = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : y.hiddenColIds) == null ? void 0 : g.map(Lt).filter((v) => v.type === "column").map((v) => v.id);
|
|
1819
|
+
return c || e.filter((v) => Tt(v.spec)).map((v) => v.id);
|
|
1820
|
+
})());
|
|
1821
|
+
b.delete(l.id), [...o.map((c) => c.column), ...a.map((c) => c.column)].filter((c) => c.type === "column").map((c) => b.delete(c.id));
|
|
1822
|
+
const p = e.filter((c) => !b.has(c.id)), d = Ve(p.map(Ie), u);
|
|
1823
|
+
if (!Ke([...p, ...d])) return;
|
|
1824
|
+
const h = t.createPTable(
|
|
1825
|
+
$e(e, d, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1826
|
+
);
|
|
1827
|
+
return {
|
|
1828
|
+
tableSpec: w,
|
|
1829
|
+
tableHandle: h
|
|
1830
|
+
};
|
|
1741
1831
|
}
|
|
1742
|
-
function
|
|
1832
|
+
function In(t, e, n) {
|
|
1743
1833
|
const r = t.resultPool.findLabels(e);
|
|
1744
1834
|
return {
|
|
1745
1835
|
axis: e,
|
|
@@ -1750,7 +1840,7 @@ function hn(t, e, n) {
|
|
|
1750
1840
|
defaultValue: n[0]
|
|
1751
1841
|
};
|
|
1752
1842
|
}
|
|
1753
|
-
const
|
|
1843
|
+
const Et = (t, e) => {
|
|
1754
1844
|
let n = t.toString();
|
|
1755
1845
|
return e == null || e.forEach((r) => {
|
|
1756
1846
|
if (r)
|
|
@@ -1758,7 +1848,7 @@ const At = (t, e) => {
|
|
|
1758
1848
|
n += i, n += s;
|
|
1759
1849
|
}), n;
|
|
1760
1850
|
};
|
|
1761
|
-
function
|
|
1851
|
+
function Ft(t) {
|
|
1762
1852
|
if (!t.length)
|
|
1763
1853
|
return [];
|
|
1764
1854
|
let e = [[]];
|
|
@@ -1769,87 +1859,93 @@ function St(t) {
|
|
|
1769
1859
|
}), e = r;
|
|
1770
1860
|
}), e;
|
|
1771
1861
|
}
|
|
1772
|
-
function
|
|
1862
|
+
function Dt(t, e) {
|
|
1773
1863
|
const n = t.spec.axesSpec.map(E);
|
|
1774
|
-
return e.spec.axesSpec.map(E).every((i) => n.some((s) =>
|
|
1864
|
+
return e.spec.axesSpec.map(E).every((i) => n.some((s) => W(s, i) && W(i, s)));
|
|
1775
1865
|
}
|
|
1776
|
-
function
|
|
1866
|
+
function Je(t, e) {
|
|
1777
1867
|
const n = t.spec.axesSpec.map(E);
|
|
1778
|
-
return e.spec.axesSpec.map(E).every((i) => n.some((s) =>
|
|
1868
|
+
return e.spec.axesSpec.map(E).every((i) => n.some((s) => W(s, i)));
|
|
1779
1869
|
}
|
|
1780
|
-
const
|
|
1781
|
-
function
|
|
1870
|
+
const Ot = "pl7.app/graph/isVirtual", xe = "pl7.app/label";
|
|
1871
|
+
function Ce(t, e) {
|
|
1782
1872
|
const n = t.spec.axesSpec.map(E), r = e.spec.axesSpec.map(E);
|
|
1783
|
-
if (
|
|
1873
|
+
if (Dt(t, e))
|
|
1784
1874
|
return [];
|
|
1785
|
-
if (!
|
|
1875
|
+
if (!Je(t, e))
|
|
1786
1876
|
return [];
|
|
1787
|
-
const o = r.map((
|
|
1788
|
-
const
|
|
1789
|
-
return
|
|
1790
|
-
const
|
|
1791
|
-
return Object.entries(
|
|
1792
|
-
if ((
|
|
1793
|
-
const g = JSON.stringify([
|
|
1794
|
-
|
|
1877
|
+
const o = r.map((b) => n.filter((p) => W(p, b))), a = Ft(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), w = a.map((b) => {
|
|
1878
|
+
const p = /* @__PURE__ */ new Set();
|
|
1879
|
+
return b.map((d, h) => {
|
|
1880
|
+
const f = e.spec.axesSpec[h].domain, x = d.domain;
|
|
1881
|
+
return Object.entries(x ?? {}).forEach(([c, y]) => {
|
|
1882
|
+
if ((f == null ? void 0 : f[c]) === void 0) {
|
|
1883
|
+
const g = JSON.stringify([c, y]);
|
|
1884
|
+
p.add(g), l.add(g);
|
|
1795
1885
|
}
|
|
1796
1886
|
}), {
|
|
1797
|
-
...
|
|
1798
|
-
annotations: e.spec.axesSpec[
|
|
1887
|
+
...d,
|
|
1888
|
+
annotations: e.spec.axesSpec[h].annotations
|
|
1799
1889
|
};
|
|
1800
|
-
}),
|
|
1890
|
+
}), p;
|
|
1801
1891
|
});
|
|
1802
|
-
return [...l].forEach((
|
|
1803
|
-
|
|
1804
|
-
}), a.map((
|
|
1805
|
-
var
|
|
1806
|
-
const
|
|
1892
|
+
return [...l].forEach((b) => {
|
|
1893
|
+
w.some((p) => !p.has(b)) && u.add(b);
|
|
1894
|
+
}), a.map((b, p) => {
|
|
1895
|
+
var c;
|
|
1896
|
+
const d = Et(e.id, b.map((y) => y.domain)), h = ((c = e.spec.annotations) == null ? void 0 : c[xe]) ?? "", f = [...w[p]].filter((y) => u.has(y)).sort().map((y) => {
|
|
1807
1897
|
var g;
|
|
1808
|
-
return (g = JSON.parse(
|
|
1809
|
-
}).join(" / "),
|
|
1898
|
+
return (g = JSON.parse(y)) == null ? void 0 : g[1];
|
|
1899
|
+
}).join(" / "), x = {
|
|
1810
1900
|
...e.spec.annotations,
|
|
1811
|
-
[
|
|
1901
|
+
[Ot]: "true"
|
|
1812
1902
|
};
|
|
1813
|
-
return (
|
|
1814
|
-
id:
|
|
1903
|
+
return (h || f) && (x[xe] = h && f ? h + " / " + f : h + f), {
|
|
1904
|
+
id: d,
|
|
1815
1905
|
spec: {
|
|
1816
1906
|
...e.spec,
|
|
1817
|
-
axesSpec:
|
|
1818
|
-
...
|
|
1907
|
+
axesSpec: b.map((y, g) => ({
|
|
1908
|
+
...y,
|
|
1819
1909
|
annotations: e.spec.axesSpec[g].annotations
|
|
1820
1910
|
})),
|
|
1821
|
-
annotations:
|
|
1911
|
+
annotations: x
|
|
1822
1912
|
},
|
|
1823
1913
|
data: e.data
|
|
1824
1914
|
};
|
|
1825
1915
|
});
|
|
1826
1916
|
}
|
|
1827
|
-
function
|
|
1917
|
+
function Rt(t) {
|
|
1828
1918
|
const e = [];
|
|
1829
1919
|
for (let n = 0; n < t.length; n++)
|
|
1830
1920
|
for (let r = n + 1; r < t.length; r++) {
|
|
1831
1921
|
const i = t[n], s = t[r];
|
|
1832
1922
|
e.push(
|
|
1833
|
-
...
|
|
1834
|
-
...
|
|
1923
|
+
...Ce(i, s),
|
|
1924
|
+
...Ce(s, i)
|
|
1835
1925
|
);
|
|
1836
1926
|
}
|
|
1837
1927
|
return e;
|
|
1838
1928
|
}
|
|
1839
|
-
function
|
|
1840
|
-
const n =
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1929
|
+
function kt(t, e) {
|
|
1930
|
+
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1931
|
+
t.forEach((s) => {
|
|
1932
|
+
n.add(s.id), r.set(ee(we(s.spec)), s);
|
|
1933
|
+
});
|
|
1934
|
+
const i = /* @__PURE__ */ new Map();
|
|
1935
|
+
for (const s of e) {
|
|
1936
|
+
if (n.has(s.id)) continue;
|
|
1937
|
+
const o = ee(we(s.spec));
|
|
1938
|
+
if (!r.has(o)) {
|
|
1939
|
+
for (const a of r.values())
|
|
1940
|
+
if (Je(a, s)) {
|
|
1941
|
+
i.set(o, s);
|
|
1942
|
+
break;
|
|
1943
|
+
}
|
|
1849
1944
|
}
|
|
1850
|
-
|
|
1945
|
+
}
|
|
1946
|
+
return [...r.values(), ...i.values()];
|
|
1851
1947
|
}
|
|
1852
|
-
const
|
|
1948
|
+
const jt = [
|
|
1853
1949
|
"Int",
|
|
1854
1950
|
"Long",
|
|
1855
1951
|
"Float",
|
|
@@ -1857,15 +1953,15 @@ const It = [
|
|
|
1857
1953
|
"String",
|
|
1858
1954
|
"Bytes"
|
|
1859
1955
|
];
|
|
1860
|
-
function
|
|
1956
|
+
function _n(t, e) {
|
|
1861
1957
|
if (e === void 0) return;
|
|
1862
|
-
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(
|
|
1958
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(me).filter((s) => jt.includes(s.spec.valueType)), r = kt(e, n), i = [...r, ...Rt(r)];
|
|
1863
1959
|
if (!i.some(
|
|
1864
|
-
(s) => s.data instanceof
|
|
1960
|
+
(s) => s.data instanceof I && !s.data.getIsReadyOrError()
|
|
1865
1961
|
))
|
|
1866
1962
|
return t.createPFrame(i);
|
|
1867
1963
|
}
|
|
1868
|
-
class
|
|
1964
|
+
class Ln {
|
|
1869
1965
|
constructor(e) {
|
|
1870
1966
|
this.handle = e;
|
|
1871
1967
|
}
|
|
@@ -1885,113 +1981,121 @@ class mn {
|
|
|
1885
1981
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1886
1982
|
}
|
|
1887
1983
|
}
|
|
1888
|
-
function
|
|
1889
|
-
return
|
|
1984
|
+
function Vt(t) {
|
|
1985
|
+
return Le({
|
|
1890
1986
|
__isRef: !0,
|
|
1891
|
-
blockId:
|
|
1892
|
-
name:
|
|
1987
|
+
blockId: te(t, "blockId"),
|
|
1988
|
+
name: te(t, "name")
|
|
1893
1989
|
});
|
|
1894
1990
|
}
|
|
1895
|
-
function
|
|
1896
|
-
return
|
|
1897
|
-
ref:
|
|
1898
|
-
label:
|
|
1991
|
+
function Tn(t) {
|
|
1992
|
+
return Le({
|
|
1993
|
+
ref: Vt(te(t, "ref")),
|
|
1994
|
+
label: te(t, "label")
|
|
1899
1995
|
});
|
|
1900
1996
|
}
|
|
1901
|
-
const
|
|
1997
|
+
const En = {
|
|
1902
1998
|
sdkVersion: M
|
|
1903
1999
|
};
|
|
1904
|
-
function
|
|
1905
|
-
return
|
|
2000
|
+
function Kt() {
|
|
2001
|
+
return Te({ sdkVersion: M });
|
|
1906
2002
|
}
|
|
1907
|
-
function
|
|
2003
|
+
function Fn(t) {
|
|
1908
2004
|
try {
|
|
1909
|
-
return
|
|
2005
|
+
return Kt();
|
|
1910
2006
|
} catch {
|
|
1911
2007
|
return t;
|
|
1912
2008
|
}
|
|
1913
2009
|
}
|
|
1914
|
-
function
|
|
2010
|
+
function Dn(t) {
|
|
1915
2011
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
1916
2012
|
return globalThis.getEnvironmentValue(t);
|
|
1917
2013
|
}
|
|
1918
2014
|
export {
|
|
1919
|
-
|
|
2015
|
+
Wt as Args,
|
|
1920
2016
|
T as BlockModel,
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
2017
|
+
En as CurrentSdkInfo,
|
|
2018
|
+
S as FutureRef,
|
|
2019
|
+
Ot as IS_VIRTUAL_COLUMN,
|
|
2020
|
+
Gt as It,
|
|
2021
|
+
bn as JsRenderInternal,
|
|
2022
|
+
xe as LABEL_ANNOTATION,
|
|
2023
|
+
Ht as MainOutputs,
|
|
2024
|
+
nt as OutputError,
|
|
2025
|
+
ut as PAnnotationLabel,
|
|
2026
|
+
ct as PAnnotationTrace,
|
|
2027
|
+
ge as PColumnCollection,
|
|
2028
|
+
Ln as PFrameImpl,
|
|
2029
|
+
K as RT_BINARY_PARTITIONED,
|
|
2030
|
+
U as RT_BINARY_SUPER_PARTITIONED,
|
|
2031
|
+
B as RT_JSON_PARTITIONED,
|
|
2032
|
+
ie as RT_JSON_SUPER_PARTITIONED,
|
|
2033
|
+
ne as RT_RESOURCE_MAP,
|
|
2034
|
+
re as RT_RESOURCE_MAP_PARTITIONED,
|
|
1939
2035
|
X as RenderCtx,
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
2036
|
+
It as ResultPool,
|
|
2037
|
+
qt as StagingOutputs,
|
|
2038
|
+
dt as Trace,
|
|
2039
|
+
pt as TraceEntry,
|
|
2040
|
+
I as TreeNodeAccessor,
|
|
2041
|
+
zt as UiState,
|
|
2042
|
+
Ke as allColumnsComputed,
|
|
2043
|
+
nn as and,
|
|
2044
|
+
vt as convertOrParsePColumnData,
|
|
2045
|
+
_n as createPFrameForGraphs,
|
|
2046
|
+
Cn as createPlDataTable,
|
|
2047
|
+
In as createPlDataTableSheet,
|
|
2048
|
+
Sn as createPlDataTableV2,
|
|
2049
|
+
Oe as deriveLabels,
|
|
1952
2050
|
ue as downgradeCfgOrLambda,
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
2051
|
+
kt as enrichColumnsWithCompatible,
|
|
2052
|
+
fn as extractArchiveAndGetURL,
|
|
2053
|
+
An as extractConfig,
|
|
2054
|
+
bt as filterDataInfoEntries,
|
|
2055
|
+
Zt as flatten,
|
|
2056
|
+
Tn as fromPlOption,
|
|
2057
|
+
Vt as fromPlRef,
|
|
2058
|
+
Rt as getAdditionalColumns,
|
|
2059
|
+
je as getAllLabelColumns,
|
|
2060
|
+
ln as getBlobContent,
|
|
2061
|
+
cn as getBlobContentAsJson,
|
|
2062
|
+
un as getBlobContentAsString,
|
|
2063
|
+
pn as getDownloadedBlobContent,
|
|
2064
|
+
Dn as getEnvironmentValue,
|
|
2065
|
+
G as getFromCfg,
|
|
1967
2066
|
Z as getImmediate,
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2067
|
+
hn as getImportProgress,
|
|
2068
|
+
te as getJsonField,
|
|
2069
|
+
gn as getLastLogs,
|
|
2070
|
+
vn as getLogHandle,
|
|
2071
|
+
Ve as getMatchingLabelColumns,
|
|
2072
|
+
dn as getOnDemandBlobContent,
|
|
2073
|
+
gt as getPartitionKeysList,
|
|
2074
|
+
Fn as getPlatformaOrDefault,
|
|
2075
|
+
mn as getProgressLog,
|
|
2076
|
+
yn as getProgressLogWithInfo,
|
|
2077
|
+
Kt as getRawPlatformaInstance,
|
|
2078
|
+
sn as getResourceField,
|
|
2079
|
+
on as getResourceValueAsJson,
|
|
2080
|
+
yt as getUniquePartitionKeys,
|
|
1981
2081
|
pe as ifDef,
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2082
|
+
Tt as isColumnOptional,
|
|
2083
|
+
_t as isConfigLambda,
|
|
2084
|
+
en as isEmpty,
|
|
2085
|
+
xn as isLabelColumn,
|
|
2086
|
+
Mt as isolate,
|
|
2087
|
+
Yt as makeArray,
|
|
2088
|
+
Le as makeObject,
|
|
2089
|
+
Qt as mapArrayValues,
|
|
2090
|
+
Xt as mapRecordValues,
|
|
2091
|
+
an as mapResourceFields,
|
|
2092
|
+
tn as not,
|
|
2093
|
+
rn as or,
|
|
1992
2094
|
he as parsePColumnData,
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
2095
|
+
Lt as parsePTableColumnId,
|
|
2096
|
+
wn as parseResourceMap,
|
|
2097
|
+
rt as readOutput,
|
|
2098
|
+
Pn as strinfigyPTableColumnId,
|
|
2099
|
+
Ut as wrapOutputs
|
|
1996
2100
|
};
|
|
1997
2101
|
//# sourceMappingURL=index.mjs.map
|