@platforma-sdk/model 1.29.0 → 1.29.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PlDataTable.d.ts +40 -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 +563 -473
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +2 -2
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/util/column_collection.d.ts +2 -2
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/PlDataTable.ts +243 -67
- package/src/render/api.ts +2 -1
- package/src/render/util/column_collection.ts +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (t, e, n) =>
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var Ne = Object.defineProperty;
|
|
2
|
+
var Ue = (t, e, n) => e in t ? Ne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var L = (t, e, n) => Ue(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as ge, mapPObjectData as me, isDataInfoEntries as Ce, isDataInfo as ye, dataInfoToEntries as Be, resolveAnchors as Me, isPColumnSpec as Q, isPartitionedDataInfoEntries as We, getAxisId as E, entriesToDataInfo as Ge, selectorsToPredicate as ue, canonicalizeAxisId as He, AnchoredIdDeriver as be, isPlRef as qe, mapValueInVOE as ze, ensurePColumn as Ye, extractAllColumns as Xe, mapPTableDef as Qe, mapDataInfo as Ze, matchAxisId as W, getColumnIdAndSpec as Se } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
import
|
|
7
|
-
import { z as
|
|
6
|
+
import ve from "canonicalize";
|
|
7
|
+
import { z as V } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class et 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 tt(t) {
|
|
15
|
+
if (!t.ok) throw new et(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Nt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return tt(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 Ut(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const Bt = G("$args"), Mt = G("$it"), Wt = G("$prod"), Gt = G("$staging"), Ht = G("$ui");
|
|
38
38
|
function Z(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Ie(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 qt(...t) {
|
|
50
50
|
const e = [];
|
|
51
|
-
for (const n of t) e.push(
|
|
51
|
+
for (const n of t) e.push(C(n));
|
|
52
52
|
return {
|
|
53
53
|
type: "MakeArray",
|
|
54
54
|
template: e
|
|
@@ -57,11 +57,11 @@ function Nt(...t) {
|
|
|
57
57
|
function ee(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 zt(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 Yt(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 Xt(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Qt(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Zt(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function en(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 tn(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 nn(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 rn() {
|
|
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 sn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,79 +132,79 @@ function Xt(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function on(t) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
|
-
source:
|
|
138
|
+
source: C(t)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function an(t) {
|
|
142
142
|
return {
|
|
143
143
|
type: "GetBlobContentAsString",
|
|
144
|
-
source:
|
|
144
|
+
source: C(t)
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function ln() {
|
|
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 un(t) {
|
|
156
156
|
return {
|
|
157
157
|
type: "GetDownloadedBlobContent",
|
|
158
|
-
source:
|
|
158
|
+
source: C(t)
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function cn(t) {
|
|
162
162
|
return {
|
|
163
163
|
type: "GetOnDemandBlobContent",
|
|
164
|
-
source:
|
|
164
|
+
source: C(t)
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function pn(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 dn(t) {
|
|
175
175
|
return {
|
|
176
176
|
type: "GetImportProgress",
|
|
177
|
-
source:
|
|
177
|
+
source: C(t)
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function fn(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 hn(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 gn(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 mn(t) {
|
|
202
202
|
return {
|
|
203
203
|
type: "GetLogHandle",
|
|
204
|
-
source:
|
|
204
|
+
source: C(t)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function nt() {
|
|
208
208
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
209
|
}
|
|
210
210
|
function _e(t) {
|
|
@@ -213,7 +213,7 @@ function _e(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 rt() {
|
|
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 = rt();
|
|
225
225
|
if (n === void 0) return !1;
|
|
226
226
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
227
|
return n.callbackRegistry[t] = e, !0;
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
229
|
+
const oe = /* @__PURE__ */ new Map();
|
|
230
|
+
function it(t, e) {
|
|
231
231
|
t in m().callbackRegistry || (m().callbackRegistry[t] = (n) => {
|
|
232
|
-
for (const r of
|
|
232
|
+
for (const r of oe.get(t))
|
|
233
233
|
r(n);
|
|
234
|
-
},
|
|
234
|
+
}, oe.set(t, [])), oe.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, it(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
|
});
|
|
@@ -254,10 +254,10 @@ class C {
|
|
|
254
254
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function ce(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
|
}
|
|
@@ -296,9 +296,9 @@ class _ {
|
|
|
296
296
|
...this.resolvePath,
|
|
297
297
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
298
298
|
];
|
|
299
|
-
return
|
|
299
|
+
return ce(
|
|
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() {
|
|
@@ -318,9 +318,9 @@ class _ {
|
|
|
318
318
|
}
|
|
319
319
|
getError() {
|
|
320
320
|
const e = [...this.resolvePath, "error"];
|
|
321
|
-
return
|
|
321
|
+
return ce(
|
|
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 (!ge(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] = me(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,118 +474,118 @@ 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 Le = "staging", Te = "main", st = {
|
|
481
481
|
explicitColumnsSupport: !0,
|
|
482
482
|
inlineColumnsSupport: !0,
|
|
483
483
|
activeArgs: !0
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function Ee(t) {
|
|
486
486
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function pe(t, e, n) {
|
|
489
489
|
if (e.has(n)) return;
|
|
490
490
|
if (e.add(n), typeof n === "object")
|
|
491
|
-
if (
|
|
491
|
+
if (Ee(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
492
492
|
else if (Array.isArray(n))
|
|
493
|
-
for (const i of n)
|
|
493
|
+
for (const i of n) pe(t, e, i);
|
|
494
494
|
else
|
|
495
495
|
for (const [, i] of Object.entries(n))
|
|
496
|
-
i !== n &&
|
|
496
|
+
i !== n && pe(t, e, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ot(t) {
|
|
499
499
|
const e = /* @__PURE__ */ new Set();
|
|
500
|
-
return
|
|
500
|
+
return pe(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const yn = /* @__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: st,
|
|
505
|
+
MainAccessorName: Te,
|
|
506
|
+
StagingAccessorName: Le,
|
|
507
|
+
getAllFutureAwaits: ot,
|
|
508
|
+
isFutureAwait: Ee
|
|
509
|
+
}, Symbol.toStringTag, { value: "Module" })), at = "pl7.app/label", lt = "pl7.app/trace", ut = V.object({
|
|
510
|
+
type: V.string(),
|
|
511
|
+
importance: V.number().optional(),
|
|
512
|
+
id: V.string().optional(),
|
|
513
|
+
label: V.string()
|
|
514
|
+
}), ct = V.array(ut), pt = 1e-3, dt = "__LABEL__", we = "__LABEL__@1";
|
|
515
|
+
function Fe(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[at], g = (F = f.annotations) == null ? void 0 : F[lt], v = (g ? ct.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: dt, 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[_], ie = 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
|
-
|
|
538
|
+
r.get(P) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
+
ie - (A.length - _) * pt
|
|
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(we));
|
|
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/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned",
|
|
588
|
-
function
|
|
573
|
+
let w = 0, b = 0;
|
|
574
|
+
for (; w < o.length; ) {
|
|
575
|
+
const d = /* @__PURE__ */ new Set();
|
|
576
|
+
n.includeNativeLabel && d.add(we);
|
|
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/", te = H + "ResourceMap", ne = H + "Partitioned/ResourceMap", U = H + "JsonPartitioned", K = H + "BinaryPartitioned", De = H + "Partitioned/", re = De + "JsonPartitioned", B = De + "BinaryPartitioned";
|
|
588
|
+
function Oe(t, e, n, r = [], i) {
|
|
589
589
|
if (t === void 0) return !1;
|
|
590
590
|
switch (t.resourceType.name) {
|
|
591
591
|
case te: {
|
|
@@ -602,7 +602,7 @@ function ke(t, e, n, r = [], i) {
|
|
|
602
602
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
603
603
|
if (a === void 0) s = !1;
|
|
604
604
|
else {
|
|
605
|
-
const l = [...r, ...JSON.parse(o)], u =
|
|
605
|
+
const l = [...r, ...JSON.parse(o)], u = Oe(
|
|
606
606
|
a,
|
|
607
607
|
e,
|
|
608
608
|
n,
|
|
@@ -618,18 +618,18 @@ 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 vn(t, e, n = !1) {
|
|
622
622
|
const r = [];
|
|
623
|
-
return { isComplete:
|
|
623
|
+
return { isComplete: Oe(t, e, r, [], n), data: r };
|
|
624
624
|
}
|
|
625
|
-
const
|
|
625
|
+
const de = (t) => {
|
|
626
626
|
if (t.endsWith(".index"))
|
|
627
627
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
628
628
|
if (t.endsWith(".values"))
|
|
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 ft(t) {
|
|
633
633
|
if (!t) return;
|
|
634
634
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
635
635
|
let i = 0;
|
|
@@ -641,7 +641,7 @@ function lt(t) {
|
|
|
641
641
|
i = n.partitionKeyLength + n.keyLength;
|
|
642
642
|
break;
|
|
643
643
|
case U:
|
|
644
|
-
case
|
|
644
|
+
case K:
|
|
645
645
|
i = n.partitionKeyLength;
|
|
646
646
|
break;
|
|
647
647
|
case B:
|
|
@@ -652,9 +652,9 @@ function lt(t) {
|
|
|
652
652
|
switch (e) {
|
|
653
653
|
case te:
|
|
654
654
|
case U:
|
|
655
|
-
case
|
|
655
|
+
case K:
|
|
656
656
|
for (let s of t.listInputFields()) {
|
|
657
|
-
e ===
|
|
657
|
+
e === K && (s = de(s).baseKey);
|
|
658
658
|
const o = [...JSON.parse(s)];
|
|
659
659
|
r.push(o);
|
|
660
660
|
}
|
|
@@ -666,7 +666,7 @@ function lt(t) {
|
|
|
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 === B && (l =
|
|
669
|
+
e === B && (l = de(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 ht(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 gt(t) {
|
|
698
698
|
if (t === void 0) return;
|
|
699
|
-
if (
|
|
700
|
-
return
|
|
701
|
-
const e =
|
|
699
|
+
if (Ce(t))
|
|
700
|
+
return ht(t);
|
|
701
|
+
const e = ft(t);
|
|
702
702
|
if (!e) return;
|
|
703
703
|
const { data: n, keyLength: r } = e, i = [];
|
|
704
704
|
for (let s = 0; s < r; ++s)
|
|
@@ -711,7 +711,7 @@ function ct(t) {
|
|
|
711
711
|
}
|
|
712
712
|
return i.map((s) => Array.from(s.values()));
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function fe(t, e = []) {
|
|
715
715
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
716
716
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
717
717
|
if (e.length > 0 && (n === re || n === B))
|
|
@@ -736,12 +736,12 @@ 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();
|
|
743
743
|
for (const o of t.listInputFields()) {
|
|
744
|
-
const a =
|
|
744
|
+
const a = de(o), l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
745
745
|
if (l === void 0) return;
|
|
746
746
|
let u = s.get(a.baseKey);
|
|
747
747
|
u || (u = {}, s.set(a.baseKey, u)), a.type === "index" ? u.index = l : u.values = l;
|
|
@@ -772,7 +772,7 @@ function he(t, e = []) {
|
|
|
772
772
|
if (a === void 0) return;
|
|
773
773
|
if (a.resourceType.name !== U)
|
|
774
774
|
throw new Error(`Expected ${U} inside ${n}, but got ${a.resourceType.name}`);
|
|
775
|
-
const l =
|
|
775
|
+
const l = fe(a, JSON.parse(o));
|
|
776
776
|
if (l === void 0) return;
|
|
777
777
|
if (l.type !== "JsonPartitioned")
|
|
778
778
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -791,9 +791,9 @@ function he(t, e = []) {
|
|
|
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 ${
|
|
796
|
-
const l =
|
|
794
|
+
if (a.resourceType.name !== K)
|
|
795
|
+
throw new Error(`Expected ${K} inside ${n}, but got ${a.resourceType.name}`);
|
|
796
|
+
const l = fe(a, JSON.parse(o));
|
|
797
797
|
if (l === void 0) return;
|
|
798
798
|
if (l.type !== "BinaryPartitioned")
|
|
799
799
|
throw new Error(`Unexpected inner result type for ${n}: ${l.type}`);
|
|
@@ -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 mt(t) {
|
|
813
813
|
if (t !== void 0) {
|
|
814
|
-
if (
|
|
815
|
-
if (
|
|
816
|
-
if (t instanceof
|
|
814
|
+
if (Ce(t)) return t;
|
|
815
|
+
if (ye(t)) return Be(t);
|
|
816
|
+
if (t instanceof I) return fe(t);
|
|
817
817
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function yt(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,39 +877,39 @@ function dt(t, e) {
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
class
|
|
880
|
+
class vt {
|
|
881
881
|
constructor(e) {
|
|
882
882
|
this.columns = e;
|
|
883
883
|
}
|
|
884
884
|
selectColumns(e) {
|
|
885
|
-
const n = typeof e == "function" ? e :
|
|
885
|
+
const n = typeof e == "function" ? e : ue(e);
|
|
886
886
|
return this.columns.filter((r) => n(r.spec));
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function bt(t) {
|
|
890
890
|
if (t)
|
|
891
891
|
return t.map((e) => ({
|
|
892
|
-
type: `split:${
|
|
892
|
+
type: `split:${He(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 wt(t) {
|
|
899
899
|
if (t)
|
|
900
900
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function At(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 ve({ id: t, axisFilters: n });
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Pt(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 xt(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 he {
|
|
921
921
|
constructor() {
|
|
922
922
|
L(this, "defaultProviderStore", []);
|
|
923
|
-
L(this, "providers", [new
|
|
923
|
+
L(this, "providers", [new vt(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 = Pt(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 = Me(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 = xt(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 = mt(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 (!We(A))
|
|
979
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A.type} for column ${g.id}`);
|
|
980
|
+
const D = gt(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 =
|
|
1009
|
-
return { axisIdx: z, axisId:
|
|
1002
|
+
const R = [...v.axesSpec], ie = 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 = ie[k], $e = E(v.axesSpec[z]), se = q[k], Je = (se == null ? void 0 : se[O]) ?? String(O);
|
|
1009
|
+
return { axisIdx: z, axisId: $e, value: O, label: Je };
|
|
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 = Fe(
|
|
1031
1031
|
u,
|
|
1032
|
-
(
|
|
1033
|
-
spec:
|
|
1034
|
-
suffixTrace:
|
|
1032
|
+
(p) => ({
|
|
1033
|
+
spec: p.spec,
|
|
1034
|
+
suffixTrace: p.type === "split" ? bt(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 = wt(x);
|
|
1040
|
+
let y;
|
|
1041
|
+
r ? y = r.deriveS(f, c) : y = At(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" ? Ge(yt(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, {
|
|
@@ -1078,17 +1078,17 @@ class be {
|
|
|
1078
1078
|
return i;
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function ae(t, e) {
|
|
1082
1082
|
if (t === void 0) return e === void 0;
|
|
1083
1083
|
if (e === void 0) return !0;
|
|
1084
1084
|
for (const n in e)
|
|
1085
1085
|
if (t[n] !== e[n]) return !1;
|
|
1086
1086
|
return !0;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return
|
|
1088
|
+
function Ae(t) {
|
|
1089
|
+
return me(t, (e) => e instanceof I ? e.handle : ye(e) ? Ze(e, (n) => n.handle) : e);
|
|
1090
1090
|
}
|
|
1091
|
-
class
|
|
1091
|
+
class Ct {
|
|
1092
1092
|
constructor() {
|
|
1093
1093
|
L(this, "ctx", m());
|
|
1094
1094
|
}
|
|
@@ -1099,8 +1099,8 @@ class bt {
|
|
|
1099
1099
|
return this.ctx.calculateOptions(e);
|
|
1100
1100
|
}
|
|
1101
1101
|
getOptions(e, n) {
|
|
1102
|
-
const r = typeof e == "function" ? e :
|
|
1103
|
-
return typeof n == "object" || typeof n > "u" ?
|
|
1102
|
+
const r = typeof e == "function" ? e : ue(e), i = this.getSpecs().entries.filter((s) => r(s.obj));
|
|
1103
|
+
return typeof n == "object" || typeof n > "u" ? Fe(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 (qe(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 he().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 he().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: ze(
|
|
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 me(
|
|
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 Ye(n);
|
|
1258
1258
|
}
|
|
1259
1259
|
/**
|
|
1260
1260
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1286,10 +1286,10 @@ class bt {
|
|
|
1286
1286
|
if (!Q(r.obj.spec))
|
|
1287
1287
|
continue;
|
|
1288
1288
|
const i = r.obj.spec;
|
|
1289
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
1289
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ae(e.domain, i.domain)) {
|
|
1290
1290
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1291
1291
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1292
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
1292
|
+
if (o.name !== a.name || o.type !== a.type || !ae(o.domain, a.domain))
|
|
1293
1293
|
continue e;
|
|
1294
1294
|
}
|
|
1295
1295
|
n.push(r.obj);
|
|
@@ -1304,9 +1304,9 @@ class bt {
|
|
|
1304
1304
|
findLabels(e) {
|
|
1305
1305
|
const n = this.getData();
|
|
1306
1306
|
for (const r of n.entries) {
|
|
1307
|
-
if (!
|
|
1307
|
+
if (!ge(r.obj)) continue;
|
|
1308
1308
|
const i = r.obj.spec;
|
|
1309
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
1309
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ae(e.domain, i.axesSpec[0].domain)) {
|
|
1310
1310
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1311
1311
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1312
1312
|
return Object.fromEntries(
|
|
@@ -1325,13 +1325,13 @@ class bt {
|
|
|
1325
1325
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1326
1326
|
*/
|
|
1327
1327
|
selectColumns(e) {
|
|
1328
|
-
const n = typeof e == "function" ? e :
|
|
1328
|
+
const n = typeof e == "function" ? e : ue(e);
|
|
1329
1329
|
return this.getSpecs().entries.filter(({ obj: i }) => Q(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
|
|
1330
1330
|
const o = s;
|
|
1331
1331
|
let a = null;
|
|
1332
1332
|
const l = this;
|
|
1333
1333
|
return {
|
|
1334
|
-
id:
|
|
1334
|
+
id: ve(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 Ct());
|
|
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
|
/**
|
|
@@ -1380,16 +1380,16 @@ class X {
|
|
|
1380
1380
|
// return this.ctx.featureFlags;
|
|
1381
1381
|
// }
|
|
1382
1382
|
getNamedAccessor(e) {
|
|
1383
|
-
return
|
|
1383
|
+
return ce(
|
|
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(Le);
|
|
1390
1390
|
}
|
|
1391
1391
|
get outputs() {
|
|
1392
|
-
return this.getNamedAccessor(
|
|
1392
|
+
return this.getNamedAccessor(Te);
|
|
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) || ye(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) => Ae(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(Xe(n.src)), this.ctx.createPTable(
|
|
1423
|
+
Qe(n, (r) => Ae(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.12";
|
|
1436
|
+
function St(t) {
|
|
1437
1437
|
return t.__renderLambda === !0;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function le(t) {
|
|
1440
1440
|
if (t !== void 0)
|
|
1441
|
-
return
|
|
1441
|
+
return St(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 bn(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),
|
|
@@ -1674,72 +1674,154 @@ class T {
|
|
|
1674
1674
|
sdkVersion: M,
|
|
1675
1675
|
renderingMode: this._renderingMode,
|
|
1676
1676
|
initialArgs: this._initialArgs,
|
|
1677
|
-
inputsValid:
|
|
1678
|
-
sections:
|
|
1677
|
+
inputsValid: le(this._inputsValid),
|
|
1678
|
+
sections: le(this._sections),
|
|
1679
1679
|
outputs: Object.fromEntries(
|
|
1680
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1680
|
+
Object.entries(this._outputs).map(([n, r]) => [n, le(r)])
|
|
1681
1681
|
)
|
|
1682
1682
|
};
|
|
1683
|
-
return
|
|
1683
|
+
return nt() ? _e({ 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 wn(t) {
|
|
1687
|
+
return ve(t);
|
|
1688
|
+
}
|
|
1689
|
+
function It(t) {
|
|
1690
|
+
return JSON.parse(t);
|
|
1691
|
+
}
|
|
1692
|
+
function An(t) {
|
|
1693
|
+
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1694
|
+
}
|
|
1695
|
+
function Re(t) {
|
|
1696
|
+
return new he().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1697
|
+
name: "pl7.app/label",
|
|
1698
|
+
axes: [{}]
|
|
1699
|
+
// exactly one axis
|
|
1700
|
+
}, { dontWaitAllData: !0 });
|
|
1701
|
+
}
|
|
1702
|
+
function ke(t, e) {
|
|
1703
|
+
const n = (i, s) => {
|
|
1704
|
+
let o = i.toString();
|
|
1705
|
+
if (s)
|
|
1706
|
+
for (const a in s)
|
|
1707
|
+
o += a, o += s[a];
|
|
1708
|
+
return o;
|
|
1709
|
+
}, r = /* @__PURE__ */ new Map();
|
|
1710
|
+
for (const i of t)
|
|
1711
|
+
for (const s of i.spec.axesSpec) {
|
|
1712
|
+
const o = E(s);
|
|
1713
|
+
for (const a of e) {
|
|
1714
|
+
const l = a.spec.axesSpec[0], u = E(a.spec.axesSpec[0]);
|
|
1715
|
+
if (W(o, u)) {
|
|
1716
|
+
const w = Object.keys(o.domain ?? {}).length, b = Object.keys(u.domain ?? {}).length;
|
|
1717
|
+
if (w > b) {
|
|
1718
|
+
const p = n(a.id, o.domain);
|
|
1719
|
+
r.set(p, {
|
|
1720
|
+
id: p,
|
|
1707
1721
|
spec: {
|
|
1708
|
-
...
|
|
1709
|
-
axesSpec: [{ ...
|
|
1722
|
+
...a.spec,
|
|
1723
|
+
axesSpec: [{ ...o, annotations: l.annotations }]
|
|
1710
1724
|
},
|
|
1711
|
-
data:
|
|
1725
|
+
data: a.data
|
|
1712
1726
|
});
|
|
1713
1727
|
} else
|
|
1714
|
-
|
|
1728
|
+
r.set(n(a.id), a);
|
|
1715
1729
|
}
|
|
1716
1730
|
}
|
|
1717
1731
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1732
|
+
return [...r.values()];
|
|
1733
|
+
}
|
|
1734
|
+
function je(t) {
|
|
1735
|
+
const e = (i) => Array.isArray(i), n = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
|
|
1736
|
+
return t.map((i) => i.data).every((i) => {
|
|
1737
|
+
if (e(i))
|
|
1738
|
+
return !0;
|
|
1739
|
+
if (n(i))
|
|
1740
|
+
return i.getIsReadyOrError();
|
|
1741
|
+
if (r(i))
|
|
1742
|
+
switch (i.type) {
|
|
1743
|
+
case "Json":
|
|
1744
|
+
return !0;
|
|
1745
|
+
case "JsonPartitioned":
|
|
1746
|
+
return Object.values(i.parts).every((o) => o.getIsReadyOrError());
|
|
1747
|
+
case "BinaryPartitioned":
|
|
1748
|
+
return Object.values(i.parts).every((o) => o.index.getIsReadyOrError() && o.values.getIsReadyOrError());
|
|
1749
|
+
}
|
|
1750
|
+
else
|
|
1751
|
+
throw Error(`unsupported column data type: ${i}`);
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
function Ve(t, e, n, r, i, s) {
|
|
1755
|
+
let o = t;
|
|
1756
|
+
const a = [];
|
|
1757
|
+
if (s) {
|
|
1758
|
+
o = [];
|
|
1759
|
+
for (const l of t)
|
|
1760
|
+
s(l.spec) ? o.push(l) : a.push(l);
|
|
1761
|
+
}
|
|
1762
|
+
return a.push(...e), {
|
|
1730
1763
|
src: {
|
|
1731
1764
|
type: "outer",
|
|
1732
1765
|
primary: {
|
|
1733
|
-
type:
|
|
1734
|
-
entries:
|
|
1766
|
+
type: n,
|
|
1767
|
+
entries: o.map((l) => ({ type: "column", column: l }))
|
|
1735
1768
|
},
|
|
1736
|
-
secondary:
|
|
1769
|
+
secondary: a.map((l) => ({ type: "column", column: l }))
|
|
1737
1770
|
},
|
|
1738
|
-
filters:
|
|
1739
|
-
sorting:
|
|
1740
|
-
}
|
|
1771
|
+
filters: r,
|
|
1772
|
+
sorting: i
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
function Pn(t, e, n, r) {
|
|
1776
|
+
var u, w;
|
|
1777
|
+
Array.isArray(r) && (r = { filters: r });
|
|
1778
|
+
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 = Re(t.resultPool);
|
|
1779
|
+
if (!a) return;
|
|
1780
|
+
const l = ke(e.map(Se), a);
|
|
1781
|
+
if (je([...e, ...l]))
|
|
1782
|
+
return t.createPTable(
|
|
1783
|
+
Ve(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1784
|
+
);
|
|
1741
1785
|
}
|
|
1742
|
-
function
|
|
1786
|
+
function _t(t) {
|
|
1787
|
+
var e;
|
|
1788
|
+
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1789
|
+
}
|
|
1790
|
+
function xn(t, e, n, r, i) {
|
|
1791
|
+
var f, x;
|
|
1792
|
+
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));
|
|
1793
|
+
if (!l) return;
|
|
1794
|
+
const u = Re(t.resultPool);
|
|
1795
|
+
if (!u) return;
|
|
1796
|
+
const w = [
|
|
1797
|
+
...l.spec.axesSpec.map((c) => ({
|
|
1798
|
+
type: "axis",
|
|
1799
|
+
id: E(c),
|
|
1800
|
+
spec: c
|
|
1801
|
+
})),
|
|
1802
|
+
...[...e, ...u].map((c) => ({
|
|
1803
|
+
type: "column",
|
|
1804
|
+
id: c.id,
|
|
1805
|
+
spec: c.spec
|
|
1806
|
+
}))
|
|
1807
|
+
], b = new Set((() => {
|
|
1808
|
+
var y, g;
|
|
1809
|
+
if (s === "inner") return [];
|
|
1810
|
+
const c = (g = (y = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : y.hiddenColIds) == null ? void 0 : g.map(It).filter((v) => v.type === "column").map((v) => v.id);
|
|
1811
|
+
return c || e.filter((v) => _t(v.spec)).map((v) => v.id);
|
|
1812
|
+
})());
|
|
1813
|
+
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));
|
|
1814
|
+
const p = e.filter((c) => !b.has(c.id)), d = ke(p.map(Se), u);
|
|
1815
|
+
if (!je([...p, ...d])) return;
|
|
1816
|
+
const h = t.createPTable(
|
|
1817
|
+
Ve(e, d, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1818
|
+
);
|
|
1819
|
+
return {
|
|
1820
|
+
tableSpec: w,
|
|
1821
|
+
tableHandle: h
|
|
1822
|
+
};
|
|
1823
|
+
}
|
|
1824
|
+
function Cn(t, e, n) {
|
|
1743
1825
|
const r = t.resultPool.findLabels(e);
|
|
1744
1826
|
return {
|
|
1745
1827
|
axis: e,
|
|
@@ -1750,7 +1832,7 @@ function hn(t, e, n) {
|
|
|
1750
1832
|
defaultValue: n[0]
|
|
1751
1833
|
};
|
|
1752
1834
|
}
|
|
1753
|
-
const
|
|
1835
|
+
const Lt = (t, e) => {
|
|
1754
1836
|
let n = t.toString();
|
|
1755
1837
|
return e == null || e.forEach((r) => {
|
|
1756
1838
|
if (r)
|
|
@@ -1758,7 +1840,7 @@ const At = (t, e) => {
|
|
|
1758
1840
|
n += i, n += s;
|
|
1759
1841
|
}), n;
|
|
1760
1842
|
};
|
|
1761
|
-
function
|
|
1843
|
+
function Tt(t) {
|
|
1762
1844
|
if (!t.length)
|
|
1763
1845
|
return [];
|
|
1764
1846
|
let e = [[]];
|
|
@@ -1769,87 +1851,87 @@ function St(t) {
|
|
|
1769
1851
|
}), e = r;
|
|
1770
1852
|
}), e;
|
|
1771
1853
|
}
|
|
1772
|
-
function
|
|
1854
|
+
function Et(t, e) {
|
|
1773
1855
|
const n = t.spec.axesSpec.map(E);
|
|
1774
|
-
return e.spec.axesSpec.map(E).every((i) => n.some((s) =>
|
|
1856
|
+
return e.spec.axesSpec.map(E).every((i) => n.some((s) => W(s, i) && W(i, s)));
|
|
1775
1857
|
}
|
|
1776
|
-
function
|
|
1858
|
+
function Ke(t, e) {
|
|
1777
1859
|
const n = t.spec.axesSpec.map(E);
|
|
1778
|
-
return e.spec.axesSpec.map(E).every((i) => n.some((s) =>
|
|
1860
|
+
return e.spec.axesSpec.map(E).every((i) => n.some((s) => W(s, i)));
|
|
1779
1861
|
}
|
|
1780
|
-
const
|
|
1781
|
-
function
|
|
1862
|
+
const Ft = "pl7.app/graph/isVirtual", Pe = "pl7.app/label";
|
|
1863
|
+
function xe(t, e) {
|
|
1782
1864
|
const n = t.spec.axesSpec.map(E), r = e.spec.axesSpec.map(E);
|
|
1783
|
-
if (
|
|
1865
|
+
if (Et(t, e))
|
|
1784
1866
|
return [];
|
|
1785
|
-
if (!
|
|
1867
|
+
if (!Ke(t, e))
|
|
1786
1868
|
return [];
|
|
1787
|
-
const o = r.map((
|
|
1788
|
-
const
|
|
1789
|
-
return
|
|
1790
|
-
const
|
|
1791
|
-
return Object.entries(
|
|
1792
|
-
if ((
|
|
1793
|
-
const g = JSON.stringify([
|
|
1794
|
-
|
|
1869
|
+
const o = r.map((b) => n.filter((p) => W(p, b))), a = Tt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), w = a.map((b) => {
|
|
1870
|
+
const p = /* @__PURE__ */ new Set();
|
|
1871
|
+
return b.map((d, h) => {
|
|
1872
|
+
const f = e.spec.axesSpec[h].domain, x = d.domain;
|
|
1873
|
+
return Object.entries(x ?? {}).forEach(([c, y]) => {
|
|
1874
|
+
if ((f == null ? void 0 : f[c]) === void 0) {
|
|
1875
|
+
const g = JSON.stringify([c, y]);
|
|
1876
|
+
p.add(g), l.add(g);
|
|
1795
1877
|
}
|
|
1796
1878
|
}), {
|
|
1797
|
-
...
|
|
1798
|
-
annotations: e.spec.axesSpec[
|
|
1879
|
+
...d,
|
|
1880
|
+
annotations: e.spec.axesSpec[h].annotations
|
|
1799
1881
|
};
|
|
1800
|
-
}),
|
|
1882
|
+
}), p;
|
|
1801
1883
|
});
|
|
1802
|
-
return [...l].forEach((
|
|
1803
|
-
|
|
1804
|
-
}), a.map((
|
|
1805
|
-
var
|
|
1806
|
-
const
|
|
1884
|
+
return [...l].forEach((b) => {
|
|
1885
|
+
w.some((p) => !p.has(b)) && u.add(b);
|
|
1886
|
+
}), a.map((b, p) => {
|
|
1887
|
+
var c;
|
|
1888
|
+
const d = Lt(e.id, b.map((y) => y.domain)), h = ((c = e.spec.annotations) == null ? void 0 : c[Pe]) ?? "", f = [...w[p]].filter((y) => u.has(y)).sort().map((y) => {
|
|
1807
1889
|
var g;
|
|
1808
|
-
return (g = JSON.parse(
|
|
1809
|
-
}).join(" / "),
|
|
1890
|
+
return (g = JSON.parse(y)) == null ? void 0 : g[1];
|
|
1891
|
+
}).join(" / "), x = {
|
|
1810
1892
|
...e.spec.annotations,
|
|
1811
|
-
[
|
|
1893
|
+
[Ft]: "true"
|
|
1812
1894
|
};
|
|
1813
|
-
return (
|
|
1814
|
-
id:
|
|
1895
|
+
return (h || f) && (x[Pe] = h && f ? h + " / " + f : h + f), {
|
|
1896
|
+
id: d,
|
|
1815
1897
|
spec: {
|
|
1816
1898
|
...e.spec,
|
|
1817
|
-
axesSpec:
|
|
1818
|
-
...
|
|
1899
|
+
axesSpec: b.map((y, g) => ({
|
|
1900
|
+
...y,
|
|
1819
1901
|
annotations: e.spec.axesSpec[g].annotations
|
|
1820
1902
|
})),
|
|
1821
|
-
annotations:
|
|
1903
|
+
annotations: x
|
|
1822
1904
|
},
|
|
1823
1905
|
data: e.data
|
|
1824
1906
|
};
|
|
1825
1907
|
});
|
|
1826
1908
|
}
|
|
1827
|
-
function
|
|
1909
|
+
function Dt(t) {
|
|
1828
1910
|
const e = [];
|
|
1829
1911
|
for (let n = 0; n < t.length; n++)
|
|
1830
1912
|
for (let r = n + 1; r < t.length; r++) {
|
|
1831
1913
|
const i = t[n], s = t[r];
|
|
1832
1914
|
e.push(
|
|
1833
|
-
...
|
|
1834
|
-
...
|
|
1915
|
+
...xe(i, s),
|
|
1916
|
+
...xe(s, i)
|
|
1835
1917
|
);
|
|
1836
1918
|
}
|
|
1837
1919
|
return e;
|
|
1838
1920
|
}
|
|
1839
|
-
function
|
|
1921
|
+
function Ot(t, e) {
|
|
1840
1922
|
const n = [...t];
|
|
1841
1923
|
for (const r of e)
|
|
1842
1924
|
for (const i of t) {
|
|
1843
1925
|
if (i.id === r.id)
|
|
1844
1926
|
break;
|
|
1845
|
-
if (
|
|
1927
|
+
if (Ke(i, r)) {
|
|
1846
1928
|
n.push(r);
|
|
1847
1929
|
break;
|
|
1848
1930
|
}
|
|
1849
1931
|
}
|
|
1850
1932
|
return n;
|
|
1851
1933
|
}
|
|
1852
|
-
const
|
|
1934
|
+
const Rt = [
|
|
1853
1935
|
"Int",
|
|
1854
1936
|
"Long",
|
|
1855
1937
|
"Float",
|
|
@@ -1857,15 +1939,15 @@ const It = [
|
|
|
1857
1939
|
"String",
|
|
1858
1940
|
"Bytes"
|
|
1859
1941
|
];
|
|
1860
|
-
function
|
|
1942
|
+
function Sn(t, e) {
|
|
1861
1943
|
if (e === void 0) return;
|
|
1862
|
-
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(
|
|
1944
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ge).filter((s) => Rt.includes(s.spec.valueType)), r = Ot(e, n), i = [...r, ...Dt(r)];
|
|
1863
1945
|
if (!i.some(
|
|
1864
|
-
(s) => s.data instanceof
|
|
1946
|
+
(s) => s.data instanceof I && !s.data.getIsReadyOrError()
|
|
1865
1947
|
))
|
|
1866
1948
|
return t.createPFrame(i);
|
|
1867
1949
|
}
|
|
1868
|
-
class
|
|
1950
|
+
class In {
|
|
1869
1951
|
constructor(e) {
|
|
1870
1952
|
this.handle = e;
|
|
1871
1953
|
}
|
|
@@ -1885,113 +1967,121 @@ class mn {
|
|
|
1885
1967
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1886
1968
|
}
|
|
1887
1969
|
}
|
|
1888
|
-
function
|
|
1889
|
-
return
|
|
1970
|
+
function kt(t) {
|
|
1971
|
+
return Ie({
|
|
1890
1972
|
__isRef: !0,
|
|
1891
1973
|
blockId: ee(t, "blockId"),
|
|
1892
1974
|
name: ee(t, "name")
|
|
1893
1975
|
});
|
|
1894
1976
|
}
|
|
1895
|
-
function
|
|
1896
|
-
return
|
|
1897
|
-
ref:
|
|
1977
|
+
function _n(t) {
|
|
1978
|
+
return Ie({
|
|
1979
|
+
ref: kt(ee(t, "ref")),
|
|
1898
1980
|
label: ee(t, "label")
|
|
1899
1981
|
});
|
|
1900
1982
|
}
|
|
1901
|
-
const
|
|
1983
|
+
const Ln = {
|
|
1902
1984
|
sdkVersion: M
|
|
1903
1985
|
};
|
|
1904
|
-
function
|
|
1986
|
+
function jt() {
|
|
1905
1987
|
return _e({ sdkVersion: M });
|
|
1906
1988
|
}
|
|
1907
|
-
function
|
|
1989
|
+
function Tn(t) {
|
|
1908
1990
|
try {
|
|
1909
|
-
return
|
|
1991
|
+
return jt();
|
|
1910
1992
|
} catch {
|
|
1911
1993
|
return t;
|
|
1912
1994
|
}
|
|
1913
1995
|
}
|
|
1914
|
-
function
|
|
1996
|
+
function En(t) {
|
|
1915
1997
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
1916
1998
|
return globalThis.getEnvironmentValue(t);
|
|
1917
1999
|
}
|
|
1918
2000
|
export {
|
|
1919
|
-
|
|
2001
|
+
Bt as Args,
|
|
1920
2002
|
T as BlockModel,
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
2003
|
+
Ln as CurrentSdkInfo,
|
|
2004
|
+
S as FutureRef,
|
|
2005
|
+
Ft as IS_VIRTUAL_COLUMN,
|
|
2006
|
+
Mt as It,
|
|
2007
|
+
yn as JsRenderInternal,
|
|
2008
|
+
Pe as LABEL_ANNOTATION,
|
|
2009
|
+
Wt as MainOutputs,
|
|
2010
|
+
et as OutputError,
|
|
2011
|
+
at as PAnnotationLabel,
|
|
2012
|
+
lt as PAnnotationTrace,
|
|
2013
|
+
he as PColumnCollection,
|
|
2014
|
+
In as PFrameImpl,
|
|
2015
|
+
K as RT_BINARY_PARTITIONED,
|
|
1934
2016
|
B as RT_BINARY_SUPER_PARTITIONED,
|
|
1935
2017
|
U as RT_JSON_PARTITIONED,
|
|
1936
2018
|
re as RT_JSON_SUPER_PARTITIONED,
|
|
1937
2019
|
te as RT_RESOURCE_MAP,
|
|
1938
2020
|
ne as RT_RESOURCE_MAP_PARTITIONED,
|
|
1939
2021
|
X as RenderCtx,
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
2022
|
+
Ct as ResultPool,
|
|
2023
|
+
Gt as StagingOutputs,
|
|
2024
|
+
ct as Trace,
|
|
2025
|
+
ut as TraceEntry,
|
|
2026
|
+
I as TreeNodeAccessor,
|
|
2027
|
+
Ht as UiState,
|
|
2028
|
+
je as allColumnsComputed,
|
|
2029
|
+
en as and,
|
|
2030
|
+
mt as convertOrParsePColumnData,
|
|
2031
|
+
Sn as createPFrameForGraphs,
|
|
2032
|
+
Pn as createPlDataTable,
|
|
2033
|
+
Cn as createPlDataTableSheet,
|
|
2034
|
+
xn as createPlDataTableV2,
|
|
2035
|
+
Fe as deriveLabels,
|
|
2036
|
+
le as downgradeCfgOrLambda,
|
|
2037
|
+
Ot as enrichColumnsWithCompatible,
|
|
2038
|
+
pn as extractArchiveAndGetURL,
|
|
2039
|
+
bn as extractConfig,
|
|
2040
|
+
yt as filterDataInfoEntries,
|
|
2041
|
+
Xt as flatten,
|
|
2042
|
+
_n as fromPlOption,
|
|
2043
|
+
kt as fromPlRef,
|
|
2044
|
+
Dt as getAdditionalColumns,
|
|
2045
|
+
Re as getAllLabelColumns,
|
|
2046
|
+
on as getBlobContent,
|
|
2047
|
+
ln as getBlobContentAsJson,
|
|
2048
|
+
an as getBlobContentAsString,
|
|
2049
|
+
un as getDownloadedBlobContent,
|
|
2050
|
+
En as getEnvironmentValue,
|
|
2051
|
+
G as getFromCfg,
|
|
1967
2052
|
Z as getImmediate,
|
|
1968
|
-
|
|
2053
|
+
dn as getImportProgress,
|
|
1969
2054
|
ee as getJsonField,
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
2055
|
+
fn as getLastLogs,
|
|
2056
|
+
mn as getLogHandle,
|
|
2057
|
+
ke as getMatchingLabelColumns,
|
|
2058
|
+
cn as getOnDemandBlobContent,
|
|
2059
|
+
ft as getPartitionKeysList,
|
|
2060
|
+
Tn as getPlatformaOrDefault,
|
|
2061
|
+
hn as getProgressLog,
|
|
2062
|
+
gn as getProgressLogWithInfo,
|
|
2063
|
+
jt as getRawPlatformaInstance,
|
|
2064
|
+
nn as getResourceField,
|
|
2065
|
+
rn as getResourceValueAsJson,
|
|
2066
|
+
gt as getUniquePartitionKeys,
|
|
2067
|
+
ce as ifDef,
|
|
2068
|
+
_t as isColumnOptional,
|
|
2069
|
+
St as isConfigLambda,
|
|
2070
|
+
Qt as isEmpty,
|
|
2071
|
+
An as isLabelColumn,
|
|
2072
|
+
Ut as isolate,
|
|
2073
|
+
qt as makeArray,
|
|
2074
|
+
Ie as makeObject,
|
|
2075
|
+
Yt as mapArrayValues,
|
|
2076
|
+
zt as mapRecordValues,
|
|
2077
|
+
sn as mapResourceFields,
|
|
2078
|
+
Zt as not,
|
|
2079
|
+
tn as or,
|
|
2080
|
+
fe as parsePColumnData,
|
|
2081
|
+
It as parsePTableColumnId,
|
|
2082
|
+
vn as parseResourceMap,
|
|
2083
|
+
tt as readOutput,
|
|
2084
|
+
wn as strinfigyPTableColumnId,
|
|
2085
|
+
Nt as wrapOutputs
|
|
1996
2086
|
};
|
|
1997
2087
|
//# sourceMappingURL=index.mjs.map
|