@platforma-sdk/model 1.30.26 → 1.31.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PlDataTable.d.ts +12 -5
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +13 -0
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +1 -0
- package/dist/components/PlSelectionModel.d.ts +18 -0
- package/dist/components/PlSelectionModel.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/config/actions.d.ts +4 -4
- package/dist/config/actions.d.ts.map +1 -1
- package/dist/config/model.d.ts +4 -1
- package/dist/config/model.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +486 -445
- package/dist/index.mjs.map +1 -1
- package/dist/render/accessor.d.ts +4 -4
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/internal.d.ts +3 -3
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/PlDataTable.ts +32 -11
- package/src/components/PlMultiSequenceAlignment.ts +71 -0
- package/src/components/PlSelectionModel.ts +27 -0
- package/src/components/index.ts +3 -1
- package/src/config/actions.ts +7 -1
- package/src/config/model.ts +4 -1
- package/src/render/accessor.ts +7 -6
- package/src/render/internal.ts +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
var ze = Object.defineProperty;
|
|
2
2
|
var Ye = (t, e, n) => e in t ? ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var F = (t, e, n) => Ye(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { isPColumn as ye, mapPObjectData as ve, isDataInfoEntries as Le, isDataInfo as be, dataInfoToEntries as Xe, selectorsToPredicate as
|
|
4
|
+
import { isPColumn as ye, mapPObjectData as ve, isDataInfoEntries as Le, isDataInfo as be, dataInfoToEntries as Xe, selectorsToPredicate as X, resolveAnchors as we, deriveNativeId as Qe, isPColumnSpec as ne, isPartitionedDataInfoEntries as Ze, getAxisId as R, entriesToDataInfo as et, canonicalizeAxisId as tt, withEnrichments as Ae, AnchoredIdDeriver as xe, isPlRef as nt, mapValueInVOE as rt, ensurePColumn as it, extractAllColumns as st, mapPTableDef as ot, mapDataInfo as at, canonicalizeJson as M, getPColumnSpecId as Pe, matchAxisId as K, getColumnIdAndSpec as Ee, parseJson as lt, isPTableAbsent as ut, PTableNA as ct } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import De from "canonicalize";
|
|
7
7
|
import { z as U } from "zod";
|
|
8
8
|
export * from "@milaboratories/pl-error-like";
|
|
9
|
-
class
|
|
9
|
+
class pt extends Error {
|
|
10
10
|
constructor(e, n) {
|
|
11
11
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0].message), this.errors = e, this.moreErrors = n;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (!t.ok) throw new
|
|
14
|
+
function dt(t) {
|
|
15
|
+
if (!t.ok) throw new pt(t.errors, t.moreErrors);
|
|
16
16
|
return t.value;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Xt(t) {
|
|
19
19
|
return new Proxy(t, {
|
|
20
20
|
get(e, n) {
|
|
21
|
-
return
|
|
21
|
+
return dt(e[n]);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function C(t) {
|
|
26
|
-
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ?
|
|
26
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? re(t) : t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Q(t) {
|
|
29
29
|
return { type: "GetFromCtx", variable: t };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Qt(t) {
|
|
32
32
|
return {
|
|
33
33
|
type: "Isolate",
|
|
34
34
|
cfg: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
37
|
+
const Zt = Q("$args"), en = Q("$it"), tn = Q("$prod"), nn = Q("$staging"), rn = Q("$ui");
|
|
38
|
+
function re(t) {
|
|
39
39
|
return { type: "Immediate", value: t };
|
|
40
40
|
}
|
|
41
41
|
function Fe(t) {
|
|
@@ -46,7 +46,7 @@ function Fe(t) {
|
|
|
46
46
|
template: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function sn(...t) {
|
|
50
50
|
const e = [];
|
|
51
51
|
for (const n of t) e.push(C(n));
|
|
52
52
|
return {
|
|
@@ -61,7 +61,7 @@ function ie(t, e) {
|
|
|
61
61
|
field: C(e)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function on(t, e, n = "$it") {
|
|
65
65
|
return {
|
|
66
66
|
type: "MapRecordValues",
|
|
67
67
|
source: t,
|
|
@@ -69,7 +69,7 @@ function nn(t, e, n = "$it") {
|
|
|
69
69
|
itVar: n
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function an(t, e, n = "$it") {
|
|
73
73
|
return {
|
|
74
74
|
type: "MapArrayValues",
|
|
75
75
|
source: t,
|
|
@@ -77,46 +77,46 @@ function rn(t, e, n = "$it") {
|
|
|
77
77
|
itVar: n
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ln(t) {
|
|
81
81
|
return {
|
|
82
82
|
type: "Flatten",
|
|
83
83
|
source: t
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function un(t) {
|
|
87
87
|
return {
|
|
88
88
|
type: "IsEmpty",
|
|
89
89
|
arg: t
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function cn(t) {
|
|
93
93
|
return {
|
|
94
94
|
type: "Not",
|
|
95
95
|
operand: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function pn(t, e) {
|
|
99
99
|
return {
|
|
100
100
|
type: "And",
|
|
101
101
|
operand1: t,
|
|
102
102
|
operand2: e
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function dn(t, e) {
|
|
106
106
|
return {
|
|
107
107
|
type: "Or",
|
|
108
108
|
operand1: t,
|
|
109
109
|
operand2: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function fn(t, e) {
|
|
113
113
|
return {
|
|
114
114
|
type: "GetResourceField",
|
|
115
115
|
source: C(t),
|
|
116
116
|
field: C(e)
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function hn() {
|
|
120
120
|
return function(t) {
|
|
121
121
|
return {
|
|
122
122
|
type: "GetResourceValueAsJson",
|
|
@@ -124,7 +124,7 @@ function dn() {
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function gn(t, e, n = "$it") {
|
|
128
128
|
return {
|
|
129
129
|
type: "MapResourceFields",
|
|
130
130
|
source: t,
|
|
@@ -132,102 +132,105 @@ function pn(t, e, n = "$it") {
|
|
|
132
132
|
itVar: n
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function mn(t, e) {
|
|
136
136
|
return {
|
|
137
137
|
type: "GetBlobContent",
|
|
138
|
+
range: e,
|
|
138
139
|
source: C(t)
|
|
139
140
|
};
|
|
140
141
|
}
|
|
141
|
-
function
|
|
142
|
+
function yn(t, e) {
|
|
142
143
|
return {
|
|
143
144
|
type: "GetBlobContentAsString",
|
|
145
|
+
range: e,
|
|
144
146
|
source: C(t)
|
|
145
147
|
};
|
|
146
148
|
}
|
|
147
|
-
function
|
|
148
|
-
return function(t) {
|
|
149
|
+
function vn() {
|
|
150
|
+
return function(t, e) {
|
|
149
151
|
return {
|
|
150
152
|
type: "GetBlobContentAsJson",
|
|
153
|
+
range: e,
|
|
151
154
|
source: C(t)
|
|
152
155
|
};
|
|
153
156
|
};
|
|
154
157
|
}
|
|
155
|
-
function
|
|
158
|
+
function bn(t) {
|
|
156
159
|
return {
|
|
157
160
|
type: "GetDownloadedBlobContent",
|
|
158
161
|
source: C(t)
|
|
159
162
|
};
|
|
160
163
|
}
|
|
161
|
-
function
|
|
164
|
+
function wn(t) {
|
|
162
165
|
return {
|
|
163
166
|
type: "GetOnDemandBlobContent",
|
|
164
167
|
source: C(t)
|
|
165
168
|
};
|
|
166
169
|
}
|
|
167
|
-
function
|
|
170
|
+
function An(t, e) {
|
|
168
171
|
return {
|
|
169
172
|
type: "ExtractArchiveAndGetURL",
|
|
170
173
|
format: e,
|
|
171
174
|
source: C(t)
|
|
172
175
|
};
|
|
173
176
|
}
|
|
174
|
-
function
|
|
177
|
+
function xn(t) {
|
|
175
178
|
return {
|
|
176
179
|
type: "GetImportProgress",
|
|
177
180
|
source: C(t)
|
|
178
181
|
};
|
|
179
182
|
}
|
|
180
|
-
function
|
|
183
|
+
function Pn(t, e) {
|
|
181
184
|
return {
|
|
182
185
|
type: "GetLastLogs",
|
|
183
186
|
source: C(t),
|
|
184
187
|
lines: e
|
|
185
188
|
};
|
|
186
189
|
}
|
|
187
|
-
function
|
|
190
|
+
function Cn(t, e) {
|
|
188
191
|
return {
|
|
189
192
|
type: "GetProgressLog",
|
|
190
193
|
source: C(t),
|
|
191
194
|
patternToSearch: e
|
|
192
195
|
};
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function Sn(t, e) {
|
|
195
198
|
return {
|
|
196
199
|
type: "GetProgressLogWithInfo",
|
|
197
200
|
source: C(t),
|
|
198
201
|
patternToSearch: e
|
|
199
202
|
};
|
|
200
203
|
}
|
|
201
|
-
function
|
|
204
|
+
function _n(t) {
|
|
202
205
|
return {
|
|
203
206
|
type: "GetLogHandle",
|
|
204
207
|
source: C(t)
|
|
205
208
|
};
|
|
206
209
|
}
|
|
207
|
-
function
|
|
210
|
+
function ft() {
|
|
208
211
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
209
212
|
}
|
|
210
|
-
function
|
|
213
|
+
function Re(t) {
|
|
211
214
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
212
215
|
return globalThis.getPlatforma(t);
|
|
213
216
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
214
217
|
throw new Error("Can't get platforma instance.");
|
|
215
218
|
}
|
|
216
|
-
function
|
|
219
|
+
function ht() {
|
|
217
220
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
218
221
|
}
|
|
219
222
|
function f() {
|
|
220
223
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
221
224
|
throw new Error("Not in config rendering context");
|
|
222
225
|
}
|
|
223
|
-
function
|
|
224
|
-
const n =
|
|
226
|
+
function H(t, e) {
|
|
227
|
+
const n = ht();
|
|
225
228
|
if (n === void 0) return !1;
|
|
226
229
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
227
230
|
return n.callbackRegistry[t] = e, !0;
|
|
228
231
|
}
|
|
229
232
|
const ue = /* @__PURE__ */ new Map();
|
|
230
|
-
function
|
|
233
|
+
function gt(t, e) {
|
|
231
234
|
t in f().callbackRegistry || (f().callbackRegistry[t] = (n) => {
|
|
232
235
|
for (const r of ue.get(t))
|
|
233
236
|
r(n);
|
|
@@ -237,7 +240,7 @@ class I {
|
|
|
237
240
|
constructor(e, n = (r) => r) {
|
|
238
241
|
F(this, "isResolved", !1);
|
|
239
242
|
F(this, "resolvedValue");
|
|
240
|
-
this.handle = e, this.postProcess = n,
|
|
243
|
+
this.handle = e, this.postProcess = n, gt(e, (r) => {
|
|
241
244
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
242
245
|
});
|
|
243
246
|
}
|
|
@@ -254,7 +257,7 @@ class I {
|
|
|
254
257
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
255
258
|
}
|
|
256
259
|
}
|
|
257
|
-
function
|
|
260
|
+
function de(t, e) {
|
|
258
261
|
return t === void 0 ? void 0 : e(t);
|
|
259
262
|
}
|
|
260
263
|
class E {
|
|
@@ -296,7 +299,7 @@ class E {
|
|
|
296
299
|
...this.resolvePath,
|
|
297
300
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
298
301
|
];
|
|
299
|
-
return
|
|
302
|
+
return de(
|
|
300
303
|
f().resolveWithCommon(this.handle, e, ...n),
|
|
301
304
|
(i) => new E(i, r)
|
|
302
305
|
);
|
|
@@ -318,7 +321,7 @@ class E {
|
|
|
318
321
|
}
|
|
319
322
|
getError() {
|
|
320
323
|
const e = [...this.resolvePath, "error"];
|
|
321
|
-
return
|
|
324
|
+
return de(
|
|
322
325
|
f().getError(this.handle),
|
|
323
326
|
(n) => new E(n, e)
|
|
324
327
|
);
|
|
@@ -382,16 +385,16 @@ class E {
|
|
|
382
385
|
}
|
|
383
386
|
return i;
|
|
384
387
|
}
|
|
385
|
-
getFileContentAsBase64() {
|
|
386
|
-
return new I(f().getBlobContentAsBase64(this.handle));
|
|
388
|
+
getFileContentAsBase64(e) {
|
|
389
|
+
return new I(f().getBlobContentAsBase64(this.handle, e));
|
|
387
390
|
}
|
|
388
|
-
getFileContentAsString() {
|
|
389
|
-
return new I(f().getBlobContentAsString(this.handle));
|
|
391
|
+
getFileContentAsString(e) {
|
|
392
|
+
return new I(f().getBlobContentAsString(this.handle, e));
|
|
390
393
|
}
|
|
391
|
-
getFileContentAsJson() {
|
|
394
|
+
getFileContentAsJson(e) {
|
|
392
395
|
return new I(
|
|
393
|
-
f().getBlobContentAsString(this.handle)
|
|
394
|
-
).mapDefined((
|
|
396
|
+
f().getBlobContentAsString(this.handle, e)
|
|
397
|
+
).mapDefined((n) => JSON.parse(n));
|
|
395
398
|
}
|
|
396
399
|
/**
|
|
397
400
|
* @deprecated use getFileContentAsBase64
|
|
@@ -474,10 +477,10 @@ class E {
|
|
|
474
477
|
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
475
478
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
476
479
|
);
|
|
477
|
-
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u,
|
|
480
|
+
return s && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, d]) => o(u, d));
|
|
478
481
|
}
|
|
479
482
|
}
|
|
480
|
-
const
|
|
483
|
+
const Oe = "staging", ke = "main", mt = {
|
|
481
484
|
explicitColumnsSupport: !0,
|
|
482
485
|
inlineColumnsSupport: !0,
|
|
483
486
|
activeArgs: !0
|
|
@@ -495,83 +498,83 @@ function fe(t, e, n) {
|
|
|
495
498
|
for (const [, i] of Object.entries(n))
|
|
496
499
|
i !== n && fe(t, e, i);
|
|
497
500
|
}
|
|
498
|
-
function
|
|
501
|
+
function yt(t) {
|
|
499
502
|
const e = /* @__PURE__ */ new Set();
|
|
500
503
|
return fe(e, /* @__PURE__ */ new Set(), t), e;
|
|
501
504
|
}
|
|
502
|
-
const
|
|
505
|
+
const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
503
506
|
__proto__: null,
|
|
504
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
507
|
+
GlobalCfgRenderCtxFeatureFlags: mt,
|
|
505
508
|
MainAccessorName: ke,
|
|
506
|
-
StagingAccessorName:
|
|
507
|
-
getAllFutureAwaits:
|
|
509
|
+
StagingAccessorName: Oe,
|
|
510
|
+
getAllFutureAwaits: yt,
|
|
508
511
|
isFutureAwait: je
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
512
|
+
}, Symbol.toStringTag, { value: "Module" })), vt = "pl7.app/label", bt = "pl7.app/trace", wt = U.object({
|
|
510
513
|
type: U.string(),
|
|
511
514
|
importance: U.number().optional(),
|
|
512
515
|
id: U.string().optional(),
|
|
513
516
|
label: U.string()
|
|
514
|
-
}),
|
|
517
|
+
}), At = U.array(wt), xt = 1e-3, Pt = "__LABEL__", Ce = "__LABEL__@1";
|
|
515
518
|
function Ve(t, e, n = {}) {
|
|
516
519
|
const r = /* @__PURE__ */ new Map(), i = n.forceTraceElements !== void 0 && n.forceTraceElements.length > 0 ? new Set(n.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = t.map((g) => {
|
|
517
|
-
var S,
|
|
520
|
+
var S, O;
|
|
518
521
|
const m = e(g);
|
|
519
|
-
let c,
|
|
520
|
-
"spec" in m && typeof m.spec == "object" ? (c = m.spec,
|
|
521
|
-
const
|
|
522
|
-
...
|
|
523
|
-
...
|
|
524
|
-
...
|
|
522
|
+
let c, v, b;
|
|
523
|
+
"spec" in m && typeof m.spec == "object" ? (c = m.spec, v = m.prefixTrace, b = m.suffixTrace) : c = m;
|
|
524
|
+
const p = (S = c.annotations) == null ? void 0 : S[vt], A = (O = c.annotations) == null ? void 0 : O[bt], x = (A ? At.safeParse(JSON.parse(A)).data : void 0) ?? [], y = [
|
|
525
|
+
...v ?? [],
|
|
526
|
+
...x,
|
|
527
|
+
...b ?? []
|
|
525
528
|
];
|
|
526
|
-
if (
|
|
527
|
-
const D = { label:
|
|
528
|
-
n.addLabelAsSuffix ?
|
|
529
|
+
if (p !== void 0) {
|
|
530
|
+
const D = { label: p, type: Pt, importance: -2 };
|
|
531
|
+
n.addLabelAsSuffix ? y.push(D) : y.splice(0, 0, D);
|
|
529
532
|
}
|
|
530
|
-
const
|
|
531
|
-
for (let D =
|
|
532
|
-
const { type:
|
|
533
|
-
T.set(
|
|
534
|
-
const k = `${
|
|
533
|
+
const P = [], T = /* @__PURE__ */ new Map();
|
|
534
|
+
for (let D = y.length - 1; D >= 0; --D) {
|
|
535
|
+
const { type: W } = y[D], j = y[D].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
|
|
536
|
+
T.set(W, $);
|
|
537
|
+
const k = `${W}@${$}`;
|
|
535
538
|
s.set(k, (s.get(k) ?? 0) + 1), r.set(
|
|
536
539
|
k,
|
|
537
540
|
Math.max(
|
|
538
541
|
r.get(k) ?? Number.NEGATIVE_INFINITY,
|
|
539
|
-
j - (
|
|
542
|
+
j - (y.length - D) * xt
|
|
540
543
|
)
|
|
541
|
-
),
|
|
544
|
+
), P.push({ ...y[D], fullType: k, occurrenceIndex: $ });
|
|
542
545
|
}
|
|
543
|
-
return
|
|
546
|
+
return P.reverse(), {
|
|
544
547
|
value: g,
|
|
545
548
|
spec: c,
|
|
546
|
-
label:
|
|
547
|
-
fullTrace:
|
|
549
|
+
label: p,
|
|
550
|
+
fullTrace: P
|
|
548
551
|
};
|
|
549
552
|
}), a = [], l = [], u = [...r];
|
|
550
553
|
u.sort(([, g], [, m]) => m - g);
|
|
551
554
|
for (const [g] of u)
|
|
552
555
|
g.endsWith("@1") || s.get(g) === t.length ? a.push(g) : l.push(g);
|
|
553
|
-
const
|
|
556
|
+
const d = (g, m = !1) => {
|
|
554
557
|
const c = [];
|
|
555
|
-
for (let
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
+
for (let v = 0; v < o.length; v++) {
|
|
559
|
+
const b = o[v], p = b.fullTrace.filter((y) => g.has(y.fullType) || i && i.has(y.type));
|
|
560
|
+
if (p.length === 0)
|
|
558
561
|
if (m)
|
|
559
562
|
c.push({
|
|
560
563
|
label: "Unlabeled",
|
|
561
|
-
value:
|
|
564
|
+
value: b.value
|
|
562
565
|
});
|
|
563
566
|
else return;
|
|
564
|
-
const A =
|
|
567
|
+
const A = p.map((y) => y.label), x = n.separator ?? " / ";
|
|
565
568
|
c.push({
|
|
566
|
-
label: A.join(
|
|
567
|
-
value:
|
|
569
|
+
label: A.join(x),
|
|
570
|
+
value: b.value
|
|
568
571
|
});
|
|
569
572
|
}
|
|
570
573
|
return c;
|
|
571
574
|
};
|
|
572
575
|
if (a.length === 0) {
|
|
573
576
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
574
|
-
return
|
|
577
|
+
return d(new Set(Ce), !0);
|
|
575
578
|
}
|
|
576
579
|
let h = 0, w = -1;
|
|
577
580
|
for (; h < a.length; ) {
|
|
@@ -579,13 +582,13 @@ function Ve(t, e, n = {}) {
|
|
|
579
582
|
n.includeNativeLabel && g.add(Ce);
|
|
580
583
|
for (let c = 0; c < h; ++c) g.add(a[c]);
|
|
581
584
|
w >= 0 && g.add(a[w]);
|
|
582
|
-
const m =
|
|
585
|
+
const m = d(g);
|
|
583
586
|
if (m !== void 0 && new Set(m.map((c) => c.label)).size === t.length) return m;
|
|
584
587
|
w++, w >= a.length && (h++, w = h);
|
|
585
588
|
}
|
|
586
|
-
return
|
|
589
|
+
return d(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
587
590
|
}
|
|
588
|
-
const
|
|
591
|
+
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ke = Z + "Partitioned/", ae = Ke + "JsonPartitioned", z = Ke + "BinaryPartitioned";
|
|
589
592
|
function $e(t, e, n, r = [], i) {
|
|
590
593
|
if (t === void 0) return !1;
|
|
591
594
|
switch (t.resourceType.name) {
|
|
@@ -619,7 +622,7 @@ function $e(t, e, n, r = [], i) {
|
|
|
619
622
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
620
623
|
}
|
|
621
624
|
}
|
|
622
|
-
function
|
|
625
|
+
function Tn(t, e, n = !1) {
|
|
623
626
|
const r = [];
|
|
624
627
|
return { isComplete: $e(t, e, r, [], n), data: r };
|
|
625
628
|
}
|
|
@@ -630,7 +633,7 @@ const he = (t) => {
|
|
|
630
633
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
631
634
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
632
635
|
};
|
|
633
|
-
function
|
|
636
|
+
function Ct(t) {
|
|
634
637
|
if (!t) return;
|
|
635
638
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
636
639
|
let i = 0;
|
|
@@ -641,18 +644,18 @@ function At(t) {
|
|
|
641
644
|
case oe:
|
|
642
645
|
i = n.partitionKeyLength + n.keyLength;
|
|
643
646
|
break;
|
|
644
|
-
case
|
|
647
|
+
case q:
|
|
645
648
|
case B:
|
|
646
649
|
i = n.partitionKeyLength;
|
|
647
650
|
break;
|
|
648
|
-
case
|
|
651
|
+
case z:
|
|
649
652
|
case ae:
|
|
650
653
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
651
654
|
break;
|
|
652
655
|
}
|
|
653
656
|
switch (e) {
|
|
654
657
|
case se:
|
|
655
|
-
case
|
|
658
|
+
case q:
|
|
656
659
|
case B:
|
|
657
660
|
for (let s of t.listInputFields()) {
|
|
658
661
|
e === B && (s = he(s).baseKey);
|
|
@@ -661,13 +664,13 @@ function At(t) {
|
|
|
661
664
|
}
|
|
662
665
|
break;
|
|
663
666
|
case oe:
|
|
664
|
-
case
|
|
667
|
+
case z:
|
|
665
668
|
case ae:
|
|
666
669
|
for (const s of t.listInputFields()) {
|
|
667
670
|
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
668
671
|
if (a !== void 0)
|
|
669
672
|
for (let l of a.listInputFields()) {
|
|
670
|
-
e ===
|
|
673
|
+
e === z && (l = he(l).baseKey);
|
|
671
674
|
const u = [...o, ...JSON.parse(l)];
|
|
672
675
|
r.push(u);
|
|
673
676
|
}
|
|
@@ -676,7 +679,7 @@ function At(t) {
|
|
|
676
679
|
}
|
|
677
680
|
return { data: r, keyLength: i };
|
|
678
681
|
}
|
|
679
|
-
function
|
|
682
|
+
function St(t) {
|
|
680
683
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
681
684
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
682
685
|
const { parts: e, partitionKeyLength: n } = t, r = [];
|
|
@@ -695,11 +698,11 @@ function xt(t) {
|
|
|
695
698
|
}
|
|
696
699
|
return r.map((i) => Array.from(i.values()));
|
|
697
700
|
}
|
|
698
|
-
function
|
|
701
|
+
function _t(t) {
|
|
699
702
|
if (t === void 0) return;
|
|
700
703
|
if (Le(t))
|
|
701
|
-
return
|
|
702
|
-
const e =
|
|
704
|
+
return St(t);
|
|
705
|
+
const e = Ct(t);
|
|
703
706
|
if (!e) return;
|
|
704
707
|
const { data: n, keyLength: r } = e, i = [];
|
|
705
708
|
for (let s = 0; s < r; ++s)
|
|
@@ -715,13 +718,13 @@ function Pt(t) {
|
|
|
715
718
|
function ge(t, e = []) {
|
|
716
719
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
717
720
|
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
718
|
-
if (e.length > 0 && (n === ae || n ===
|
|
721
|
+
if (e.length > 0 && (n === ae || n === z))
|
|
719
722
|
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
720
723
|
switch (n) {
|
|
721
724
|
case se:
|
|
722
725
|
case oe:
|
|
723
726
|
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
724
|
-
case
|
|
727
|
+
case q: {
|
|
725
728
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
726
729
|
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
727
730
|
const i = [];
|
|
@@ -771,8 +774,8 @@ function ge(t, e = []) {
|
|
|
771
774
|
for (const o of t.listInputFields()) {
|
|
772
775
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
773
776
|
if (a === void 0) return;
|
|
774
|
-
if (a.resourceType.name !==
|
|
775
|
-
throw new Error(`Expected ${
|
|
777
|
+
if (a.resourceType.name !== q)
|
|
778
|
+
throw new Error(`Expected ${q} inside ${n}, but got ${a.resourceType.name}`);
|
|
776
779
|
const l = ge(a, JSON.parse(o));
|
|
777
780
|
if (l === void 0) return;
|
|
778
781
|
if (l.type !== "JsonPartitioned")
|
|
@@ -785,7 +788,7 @@ function ge(t, e = []) {
|
|
|
785
788
|
parts: s
|
|
786
789
|
};
|
|
787
790
|
}
|
|
788
|
-
case
|
|
791
|
+
case z: {
|
|
789
792
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
790
793
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
791
794
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
@@ -810,7 +813,7 @@ function ge(t, e = []) {
|
|
|
810
813
|
throw new Error(`Unknown resource type: ${n}`);
|
|
811
814
|
}
|
|
812
815
|
}
|
|
813
|
-
function
|
|
816
|
+
function It(t) {
|
|
814
817
|
if (t !== void 0) {
|
|
815
818
|
if (Le(t)) return t;
|
|
816
819
|
if (be(t)) return Xe(t);
|
|
@@ -818,7 +821,7 @@ function Ct(t) {
|
|
|
818
821
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
819
822
|
}
|
|
820
823
|
}
|
|
821
|
-
function
|
|
824
|
+
function Tt(t, e) {
|
|
822
825
|
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
823
826
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
824
827
|
const { partitionKeyLength: s } = t;
|
|
@@ -878,16 +881,16 @@ function St(t, e) {
|
|
|
878
881
|
}
|
|
879
882
|
}
|
|
880
883
|
}
|
|
881
|
-
class
|
|
884
|
+
class Lt {
|
|
882
885
|
constructor(e) {
|
|
883
886
|
this.columns = e;
|
|
884
887
|
}
|
|
885
888
|
selectColumns(e) {
|
|
886
|
-
const n = typeof e == "function" ? e :
|
|
889
|
+
const n = typeof e == "function" ? e : X(e);
|
|
887
890
|
return this.columns.filter((r) => n(r.spec));
|
|
888
891
|
}
|
|
889
892
|
}
|
|
890
|
-
function
|
|
893
|
+
function Et(t) {
|
|
891
894
|
if (t)
|
|
892
895
|
return t.map((e) => ({
|
|
893
896
|
type: `split:${tt(e.axisId)}`,
|
|
@@ -896,11 +899,11 @@ function It(t) {
|
|
|
896
899
|
// High importance for split filters in labels
|
|
897
900
|
}));
|
|
898
901
|
}
|
|
899
|
-
function
|
|
902
|
+
function Dt(t) {
|
|
900
903
|
if (t)
|
|
901
904
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
902
905
|
}
|
|
903
|
-
function
|
|
906
|
+
function Ft(t, e) {
|
|
904
907
|
if (!e || e.length === 0) return t;
|
|
905
908
|
const n = [...e].sort((r, i) => r[0] - i[0]);
|
|
906
909
|
return De({ id: t, axisFilters: n });
|
|
@@ -910,7 +913,7 @@ function Se(t) {
|
|
|
910
913
|
const e = t, n = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
911
914
|
return !!e.domainAnchor || n || r;
|
|
912
915
|
}
|
|
913
|
-
function
|
|
916
|
+
function Rt(t) {
|
|
914
917
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
915
918
|
return [];
|
|
916
919
|
const e = t.axes.map((n, r) => typeof n == "object" && "split" in n && n.split === !0 ? r : -1).filter((n) => n !== -1);
|
|
@@ -921,7 +924,7 @@ function Et(t) {
|
|
|
921
924
|
class me {
|
|
922
925
|
constructor() {
|
|
923
926
|
F(this, "defaultProviderStore", []);
|
|
924
|
-
F(this, "providers", [new
|
|
927
|
+
F(this, "providers", [new Lt(this.defaultProviderStore)]);
|
|
925
928
|
F(this, "axisLabelProviders", []);
|
|
926
929
|
}
|
|
927
930
|
addColumnProvider(e) {
|
|
@@ -950,94 +953,94 @@ class me {
|
|
|
950
953
|
};
|
|
951
954
|
let u = () => !1;
|
|
952
955
|
if (a) {
|
|
953
|
-
const c = (Array.isArray(a) ? a : [a]).map((
|
|
954
|
-
if (Se(
|
|
956
|
+
const c = (Array.isArray(a) ? a : [a]).map((v) => {
|
|
957
|
+
if (Se(v)) {
|
|
955
958
|
if (!r)
|
|
956
959
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
957
|
-
return
|
|
960
|
+
return X(we(r.anchors, v, n));
|
|
958
961
|
} else
|
|
959
|
-
return
|
|
962
|
+
return X(v);
|
|
960
963
|
});
|
|
961
|
-
u = (
|
|
964
|
+
u = (v) => c.some((b) => b(v));
|
|
962
965
|
}
|
|
963
|
-
const
|
|
964
|
-
for (const c of
|
|
965
|
-
const
|
|
966
|
-
let
|
|
967
|
-
if (
|
|
966
|
+
const d = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h = [], w = /* @__PURE__ */ new Set();
|
|
967
|
+
for (const c of d) {
|
|
968
|
+
const v = Se(c);
|
|
969
|
+
let b;
|
|
970
|
+
if (v) {
|
|
968
971
|
if (!r)
|
|
969
972
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
970
|
-
|
|
973
|
+
b = we(r.anchors, c, n);
|
|
971
974
|
} else
|
|
972
|
-
|
|
973
|
-
const
|
|
974
|
-
for (const
|
|
975
|
-
const T =
|
|
975
|
+
b = c;
|
|
976
|
+
const p = /* @__PURE__ */ new Set(), A = [];
|
|
977
|
+
for (const P of this.providers) {
|
|
978
|
+
const T = P.selectColumns(b);
|
|
976
979
|
for (const S of T) {
|
|
977
980
|
if (u(S.spec)) continue;
|
|
978
|
-
if (
|
|
979
|
-
throw new Error(`Duplicate column id ${S.id} in provider ${
|
|
980
|
-
const
|
|
981
|
-
w.has(
|
|
981
|
+
if (p.has(S.id))
|
|
982
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${P.constructor.name}`);
|
|
983
|
+
const O = Qe(S.spec);
|
|
984
|
+
w.has(O) || (p.add(S.id), w.add(O), A.push(S));
|
|
982
985
|
}
|
|
983
986
|
}
|
|
984
987
|
if (A.length === 0) continue;
|
|
985
|
-
const
|
|
986
|
-
for (const
|
|
987
|
-
if (!
|
|
988
|
-
const T =
|
|
989
|
-
if (
|
|
990
|
-
const S =
|
|
988
|
+
const x = Rt(c), y = x.length > 0;
|
|
989
|
+
for (const P of A) {
|
|
990
|
+
if (!ne(P.spec)) continue;
|
|
991
|
+
const T = P.spec;
|
|
992
|
+
if (y) {
|
|
993
|
+
const S = It(P.data);
|
|
991
994
|
if (!S) {
|
|
992
995
|
if (s) continue;
|
|
993
996
|
return;
|
|
994
997
|
}
|
|
995
998
|
if (!Ze(S))
|
|
996
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${
|
|
997
|
-
const
|
|
999
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${P.id}`);
|
|
1000
|
+
const O = _t(S), D = x[x.length - 1];
|
|
998
1001
|
if (D >= S.partitionKeyLength)
|
|
999
1002
|
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D}) in column ${T.name}`);
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1003
|
+
const W = x.map((_) => this.findLabels(R(T.axesSpec[_]))), j = [], $ = (_, G) => {
|
|
1004
|
+
if (G >= x.length) {
|
|
1002
1005
|
if (j.push([..._]), j.length > 1e4)
|
|
1003
1006
|
throw new Error("Too many key combinations, aborting.");
|
|
1004
1007
|
return;
|
|
1005
1008
|
}
|
|
1006
|
-
const V =
|
|
1007
|
-
if (V >=
|
|
1008
|
-
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${
|
|
1009
|
-
const J =
|
|
1009
|
+
const V = x[G];
|
|
1010
|
+
if (V >= O.length)
|
|
1011
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${P.id}`);
|
|
1012
|
+
const J = O[V];
|
|
1010
1013
|
if (!J || J.length === 0) {
|
|
1011
1014
|
j.length = 0;
|
|
1012
1015
|
return;
|
|
1013
1016
|
}
|
|
1014
|
-
for (const
|
|
1015
|
-
_.push(
|
|
1017
|
+
for (const ee of J)
|
|
1018
|
+
_.push(ee), $(_, G + 1), _.pop();
|
|
1016
1019
|
};
|
|
1017
1020
|
if ($([], 0), j.length === 0)
|
|
1018
1021
|
continue;
|
|
1019
|
-
const k = [...T.axesSpec], We =
|
|
1020
|
-
for (let _ =
|
|
1021
|
-
k.splice(
|
|
1022
|
+
const k = [...T.axesSpec], We = x.map((_) => _);
|
|
1023
|
+
for (let _ = x.length - 1; _ >= 0; _--)
|
|
1024
|
+
k.splice(x[_], 1);
|
|
1022
1025
|
const Ge = { ...T, axesSpec: k };
|
|
1023
1026
|
for (const _ of j) {
|
|
1024
|
-
const
|
|
1025
|
-
const
|
|
1026
|
-
return { axisIdx:
|
|
1027
|
+
const G = _.map((V, J) => {
|
|
1028
|
+
const ee = We[J], He = R(T.axesSpec[ee]), le = W[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
1029
|
+
return { axisIdx: ee, axisId: He, value: V, label: qe };
|
|
1027
1030
|
});
|
|
1028
1031
|
h.push({
|
|
1029
1032
|
type: "split",
|
|
1030
|
-
originalColumn:
|
|
1033
|
+
originalColumn: P,
|
|
1031
1034
|
spec: T,
|
|
1032
1035
|
adjustedSpec: Ge,
|
|
1033
1036
|
dataEntries: S,
|
|
1034
|
-
axisFilters:
|
|
1037
|
+
axisFilters: G
|
|
1035
1038
|
});
|
|
1036
1039
|
}
|
|
1037
1040
|
} else
|
|
1038
1041
|
h.push({
|
|
1039
1042
|
type: "direct",
|
|
1040
|
-
originalColumn:
|
|
1043
|
+
originalColumn: P,
|
|
1041
1044
|
spec: T,
|
|
1042
1045
|
adjustedSpec: T
|
|
1043
1046
|
});
|
|
@@ -1048,26 +1051,26 @@ class me {
|
|
|
1048
1051
|
h,
|
|
1049
1052
|
(c) => ({
|
|
1050
1053
|
spec: c.spec,
|
|
1051
|
-
suffixTrace: c.type === "split" ?
|
|
1054
|
+
suffixTrace: c.type === "split" ? Et(c.axisFilters) : void 0
|
|
1052
1055
|
}),
|
|
1053
1056
|
l
|
|
1054
1057
|
), m = [];
|
|
1055
|
-
for (const { value: c, label:
|
|
1056
|
-
const { originalColumn:
|
|
1057
|
-
let
|
|
1058
|
-
r ?
|
|
1059
|
-
let
|
|
1060
|
-
o && (
|
|
1061
|
-
...
|
|
1058
|
+
for (const { value: c, label: v } of g) {
|
|
1059
|
+
const { originalColumn: b, spec: p } = c, A = c.type === "split" ? c.axisFilters : void 0, x = Dt(A);
|
|
1060
|
+
let y;
|
|
1061
|
+
r ? y = r.deriveS(p, x) : y = Ft(b.id, x);
|
|
1062
|
+
let P = { ...c.adjustedSpec };
|
|
1063
|
+
o && (P = {
|
|
1064
|
+
...P,
|
|
1062
1065
|
annotations: {
|
|
1063
|
-
...
|
|
1064
|
-
"pl7.app/label":
|
|
1066
|
+
...P.annotations ?? {},
|
|
1067
|
+
"pl7.app/label": v
|
|
1065
1068
|
}
|
|
1066
1069
|
}), m.push({
|
|
1067
|
-
id:
|
|
1068
|
-
spec:
|
|
1069
|
-
data: () => c.type === "split" ? et(
|
|
1070
|
-
label:
|
|
1070
|
+
id: y,
|
|
1071
|
+
spec: P,
|
|
1072
|
+
data: () => c.type === "split" ? et(Tt(c.dataEntries, x)) : c.originalColumn.data,
|
|
1073
|
+
label: v
|
|
1071
1074
|
});
|
|
1072
1075
|
}
|
|
1073
1076
|
return m;
|
|
@@ -1105,7 +1108,7 @@ function ce(t, e) {
|
|
|
1105
1108
|
function _e(t) {
|
|
1106
1109
|
return ve(t, (e) => e instanceof E ? e.handle : be(e) ? at(e, (n) => n.handle) : e);
|
|
1107
1110
|
}
|
|
1108
|
-
class
|
|
1111
|
+
class Ot {
|
|
1109
1112
|
constructor() {
|
|
1110
1113
|
F(this, "ctx", f());
|
|
1111
1114
|
}
|
|
@@ -1116,7 +1119,7 @@ class Dt {
|
|
|
1116
1119
|
return this.ctx.calculateOptions(e);
|
|
1117
1120
|
}
|
|
1118
1121
|
getOptions(e, n) {
|
|
1119
|
-
const r = typeof e == "function" ? e :
|
|
1122
|
+
const r = typeof e == "function" ? e : X(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
1120
1123
|
let s = {}, o = !1;
|
|
1121
1124
|
return typeof n < "u" && (typeof n == "function" ? s = n : typeof n == "object" && ("includeNativeLabel" in n || "separator" in n || "addLabelAsSuffix" in n ? s = n : (n = n, s = n.label ?? {}, o = n.refsWithEnrichments ?? !1))), typeof s == "object" ? Ve(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
1122
1125
|
ref: Ae(a, o),
|
|
@@ -1282,7 +1285,7 @@ class Dt {
|
|
|
1282
1285
|
getPColumnSpecByRef(e) {
|
|
1283
1286
|
const n = this.getSpecByRef(e);
|
|
1284
1287
|
if (n) {
|
|
1285
|
-
if (!
|
|
1288
|
+
if (!ne(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
1286
1289
|
return n;
|
|
1287
1290
|
}
|
|
1288
1291
|
}
|
|
@@ -1301,7 +1304,7 @@ class Dt {
|
|
|
1301
1304
|
findDataWithCompatibleSpec(e) {
|
|
1302
1305
|
const n = [];
|
|
1303
1306
|
e: for (const r of this.getData().entries) {
|
|
1304
|
-
if (!
|
|
1307
|
+
if (!ne(r.obj.spec))
|
|
1305
1308
|
continue;
|
|
1306
1309
|
const i = r.obj.spec;
|
|
1307
1310
|
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
|
|
@@ -1343,8 +1346,8 @@ class Dt {
|
|
|
1343
1346
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
1344
1347
|
*/
|
|
1345
1348
|
selectColumns(e) {
|
|
1346
|
-
const n = typeof e == "function" ? e :
|
|
1347
|
-
return this.getSpecs().entries.filter(({ obj: i }) =>
|
|
1349
|
+
const n = typeof e == "function" ? e : X(e);
|
|
1350
|
+
return this.getSpecs().entries.filter(({ obj: i }) => ne(i) ? n(i) : !1).map(({ ref: i, obj: s }) => {
|
|
1348
1351
|
const o = s;
|
|
1349
1352
|
let a = null;
|
|
1350
1353
|
const l = this;
|
|
@@ -1374,14 +1377,14 @@ class Dt {
|
|
|
1374
1377
|
return r;
|
|
1375
1378
|
}
|
|
1376
1379
|
}
|
|
1377
|
-
class
|
|
1380
|
+
class te {
|
|
1378
1381
|
constructor() {
|
|
1379
1382
|
F(this, "ctx");
|
|
1380
1383
|
F(this, "args");
|
|
1381
1384
|
F(this, "uiState");
|
|
1382
1385
|
// lazy rendering because this feature is rarely used
|
|
1383
1386
|
F(this, "_activeArgsCache");
|
|
1384
|
-
F(this, "resultPool", new
|
|
1387
|
+
F(this, "resultPool", new Ot());
|
|
1385
1388
|
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
1386
1389
|
}
|
|
1387
1390
|
/**
|
|
@@ -1398,13 +1401,13 @@ class ee {
|
|
|
1398
1401
|
// return this.ctx.featureFlags;
|
|
1399
1402
|
// }
|
|
1400
1403
|
getNamedAccessor(e) {
|
|
1401
|
-
return
|
|
1404
|
+
return de(
|
|
1402
1405
|
this.ctx.getAccessorHandleByName(e),
|
|
1403
1406
|
(n) => new E(n, [e])
|
|
1404
1407
|
);
|
|
1405
1408
|
}
|
|
1406
1409
|
get prerun() {
|
|
1407
|
-
return this.getNamedAccessor(
|
|
1410
|
+
return this.getNamedAccessor(Oe);
|
|
1408
1411
|
}
|
|
1409
1412
|
get outputs() {
|
|
1410
1413
|
return this.getNamedAccessor(ke);
|
|
@@ -1449,19 +1452,19 @@ class ee {
|
|
|
1449
1452
|
return this.ctx.getCurrentUnstableMarker();
|
|
1450
1453
|
}
|
|
1451
1454
|
}
|
|
1452
|
-
const
|
|
1453
|
-
function
|
|
1455
|
+
const Y = "1.31.6";
|
|
1456
|
+
function kt(t) {
|
|
1454
1457
|
return t.__renderLambda === !0;
|
|
1455
1458
|
}
|
|
1456
|
-
function
|
|
1459
|
+
function pe(t) {
|
|
1457
1460
|
if (t !== void 0)
|
|
1458
|
-
return
|
|
1461
|
+
return kt(t) ? t.handle : t;
|
|
1459
1462
|
}
|
|
1460
1463
|
function N(t) {
|
|
1461
1464
|
if (t !== void 0)
|
|
1462
1465
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
1463
1466
|
}
|
|
1464
|
-
function
|
|
1467
|
+
function Ln(t) {
|
|
1465
1468
|
if (t.v3 !== void 0) {
|
|
1466
1469
|
const {
|
|
1467
1470
|
initialArgs: e,
|
|
@@ -1473,7 +1476,7 @@ function _n(t) {
|
|
|
1473
1476
|
sections: a,
|
|
1474
1477
|
title: l,
|
|
1475
1478
|
enrichmentTargets: u
|
|
1476
|
-
} = t.v3, { code:
|
|
1479
|
+
} = t.v3, { code: d } = t;
|
|
1477
1480
|
return {
|
|
1478
1481
|
initialArgs: e,
|
|
1479
1482
|
initialUiState: n,
|
|
@@ -1483,7 +1486,7 @@ function _n(t) {
|
|
|
1483
1486
|
sdkVersion: o,
|
|
1484
1487
|
sections: a,
|
|
1485
1488
|
title: l,
|
|
1486
|
-
code:
|
|
1489
|
+
code: d,
|
|
1487
1490
|
enrichmentTargets: u
|
|
1488
1491
|
};
|
|
1489
1492
|
} else if (t.inputsValid !== void 0) {
|
|
@@ -1497,7 +1500,7 @@ function _n(t) {
|
|
|
1497
1500
|
renderingMode: n,
|
|
1498
1501
|
initialArgs: o,
|
|
1499
1502
|
outputs: Object.fromEntries(
|
|
1500
|
-
Object.entries(r).map(([u,
|
|
1503
|
+
Object.entries(r).map(([u, d]) => [u, N(d)])
|
|
1501
1504
|
),
|
|
1502
1505
|
inputsValid: N(i),
|
|
1503
1506
|
sections: N(s),
|
|
@@ -1515,7 +1518,7 @@ function _n(t) {
|
|
|
1515
1518
|
renderingMode: r,
|
|
1516
1519
|
initialArgs: o,
|
|
1517
1520
|
outputs: Object.fromEntries(
|
|
1518
|
-
Object.entries(i).map(([u,
|
|
1521
|
+
Object.entries(i).map(([u, d]) => [u, N(d)])
|
|
1519
1522
|
),
|
|
1520
1523
|
inputsValid: N(n),
|
|
1521
1524
|
sections: N(s),
|
|
@@ -1539,8 +1542,8 @@ class L {
|
|
|
1539
1542
|
void 0,
|
|
1540
1543
|
{},
|
|
1541
1544
|
{},
|
|
1542
|
-
|
|
1543
|
-
|
|
1545
|
+
re(!0),
|
|
1546
|
+
re([]),
|
|
1544
1547
|
void 0,
|
|
1545
1548
|
void 0
|
|
1546
1549
|
);
|
|
@@ -1548,7 +1551,7 @@ class L {
|
|
|
1548
1551
|
output(e, n, r = {}) {
|
|
1549
1552
|
if (typeof n == "function") {
|
|
1550
1553
|
const i = `output#${e}`;
|
|
1551
|
-
return
|
|
1554
|
+
return H(i, () => n(new te())), new L(
|
|
1552
1555
|
this._renderingMode,
|
|
1553
1556
|
this._initialArgs,
|
|
1554
1557
|
this._initialUiState,
|
|
@@ -1585,7 +1588,7 @@ class L {
|
|
|
1585
1588
|
return this.output(e, n, { retentive: !0 });
|
|
1586
1589
|
}
|
|
1587
1590
|
argsValid(e) {
|
|
1588
|
-
return typeof e == "function" ? (
|
|
1591
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
|
|
1589
1592
|
this._renderingMode,
|
|
1590
1593
|
this._initialArgs,
|
|
1591
1594
|
this._initialUiState,
|
|
@@ -1609,7 +1612,7 @@ class L {
|
|
|
1609
1612
|
);
|
|
1610
1613
|
}
|
|
1611
1614
|
sections(e) {
|
|
1612
|
-
return Array.isArray(e) ? this.sections(
|
|
1615
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
|
|
1613
1616
|
this._renderingMode,
|
|
1614
1617
|
this._initialArgs,
|
|
1615
1618
|
this._initialUiState,
|
|
@@ -1631,7 +1634,7 @@ class L {
|
|
|
1631
1634
|
}
|
|
1632
1635
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1633
1636
|
title(e) {
|
|
1634
|
-
return
|
|
1637
|
+
return H("title", () => e(new te())), new L(
|
|
1635
1638
|
this._renderingMode,
|
|
1636
1639
|
this._initialArgs,
|
|
1637
1640
|
this._initialUiState,
|
|
@@ -1689,7 +1692,7 @@ class L {
|
|
|
1689
1692
|
* Influences dependency graph construction.
|
|
1690
1693
|
*/
|
|
1691
1694
|
enriches(e) {
|
|
1692
|
-
return
|
|
1695
|
+
return H("enrichmentTargets", e), new L(
|
|
1693
1696
|
this._renderingMode,
|
|
1694
1697
|
this._initialArgs,
|
|
1695
1698
|
this._initialUiState,
|
|
@@ -1707,7 +1710,7 @@ class L {
|
|
|
1707
1710
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1708
1711
|
const e = {
|
|
1709
1712
|
v3: {
|
|
1710
|
-
sdkVersion:
|
|
1713
|
+
sdkVersion: Y,
|
|
1711
1714
|
renderingMode: this._renderingMode,
|
|
1712
1715
|
initialArgs: this._initialArgs,
|
|
1713
1716
|
initialUiState: this._initialUiState,
|
|
@@ -1718,67 +1721,177 @@ class L {
|
|
|
1718
1721
|
enrichmentTargets: this._enrichmentTargets
|
|
1719
1722
|
},
|
|
1720
1723
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1721
|
-
sdkVersion:
|
|
1724
|
+
sdkVersion: Y,
|
|
1722
1725
|
renderingMode: this._renderingMode,
|
|
1723
1726
|
initialArgs: this._initialArgs,
|
|
1724
|
-
inputsValid:
|
|
1725
|
-
sections:
|
|
1727
|
+
inputsValid: pe(this._inputsValid),
|
|
1728
|
+
sections: pe(this._sections),
|
|
1726
1729
|
outputs: Object.fromEntries(
|
|
1727
|
-
Object.entries(this._outputs).map(([n, r]) => [n,
|
|
1730
|
+
Object.entries(this._outputs).map(([n, r]) => [n, pe(r)])
|
|
1728
1731
|
)
|
|
1729
1732
|
};
|
|
1730
|
-
return
|
|
1733
|
+
return ft() ? Re({ sdkVersion: Y }) : { config: e };
|
|
1731
1734
|
}
|
|
1732
1735
|
}
|
|
1733
|
-
|
|
1736
|
+
const jt = (t, e) => {
|
|
1737
|
+
let n = t.toString();
|
|
1738
|
+
return e == null || e.forEach((r) => {
|
|
1739
|
+
if (r)
|
|
1740
|
+
for (const [i, s] of Object.entries(r))
|
|
1741
|
+
n += i, n += s;
|
|
1742
|
+
}), n;
|
|
1743
|
+
};
|
|
1744
|
+
function Vt(t) {
|
|
1745
|
+
if (!t.length)
|
|
1746
|
+
return [];
|
|
1747
|
+
let e = [[]];
|
|
1748
|
+
return t.forEach((n) => {
|
|
1749
|
+
const r = [];
|
|
1750
|
+
n.forEach((i) => {
|
|
1751
|
+
r.push(...e.map((s) => [...s, i]));
|
|
1752
|
+
}), e = r;
|
|
1753
|
+
}), e;
|
|
1754
|
+
}
|
|
1755
|
+
function Kt(t, e) {
|
|
1756
|
+
const n = t.axesSpec.map(R);
|
|
1757
|
+
return e.axesSpec.map(R).every((i) => n.some((s) => K(s, i) && K(i, s)));
|
|
1758
|
+
}
|
|
1759
|
+
function Je(t, e) {
|
|
1760
|
+
const n = t.axesSpec.map(R);
|
|
1761
|
+
return e.axesSpec.map(R).every((i) => n.some((s) => K(s, i)));
|
|
1762
|
+
}
|
|
1763
|
+
const $t = "pl7.app/graph/isVirtual", Ie = "pl7.app/label";
|
|
1764
|
+
function Te(t, e) {
|
|
1765
|
+
const n = t.spec.axesSpec.map(R), r = e.spec.axesSpec.map(R);
|
|
1766
|
+
if (Kt(t.spec, e.spec))
|
|
1767
|
+
return [];
|
|
1768
|
+
if (!Je(t.spec, e.spec))
|
|
1769
|
+
return [];
|
|
1770
|
+
const o = r.map((h) => n.filter((w) => K(w, h))), a = Vt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = a.map((h) => {
|
|
1771
|
+
const w = /* @__PURE__ */ new Set();
|
|
1772
|
+
return h.map((g, m) => {
|
|
1773
|
+
const c = e.spec.axesSpec[m].domain, v = g.domain;
|
|
1774
|
+
return Object.entries(v ?? {}).forEach(([b, p]) => {
|
|
1775
|
+
if ((c == null ? void 0 : c[b]) === void 0) {
|
|
1776
|
+
const A = JSON.stringify([b, p]);
|
|
1777
|
+
w.add(A), l.add(A);
|
|
1778
|
+
}
|
|
1779
|
+
}), {
|
|
1780
|
+
...g,
|
|
1781
|
+
annotations: e.spec.axesSpec[m].annotations
|
|
1782
|
+
};
|
|
1783
|
+
}), w;
|
|
1784
|
+
});
|
|
1785
|
+
return [...l].forEach((h) => {
|
|
1786
|
+
d.some((w) => !w.has(h)) && u.add(h);
|
|
1787
|
+
}), a.map((h, w) => {
|
|
1788
|
+
var b;
|
|
1789
|
+
const g = jt(e.id, h.map((p) => p.domain)), m = ((b = e.spec.annotations) == null ? void 0 : b[Ie]) ?? "", c = [...d[w]].filter((p) => u.has(p)).sort().map((p) => {
|
|
1790
|
+
var A;
|
|
1791
|
+
return (A = JSON.parse(p)) == null ? void 0 : A[1];
|
|
1792
|
+
}).join(" / "), v = {
|
|
1793
|
+
...e.spec.annotations,
|
|
1794
|
+
[$t]: "true"
|
|
1795
|
+
};
|
|
1796
|
+
return (m || c) && (v[Ie] = m && c ? m + " / " + c : m + c), {
|
|
1797
|
+
id: g,
|
|
1798
|
+
spec: {
|
|
1799
|
+
...e.spec,
|
|
1800
|
+
axesSpec: h.map((p, A) => ({
|
|
1801
|
+
...p,
|
|
1802
|
+
annotations: e.spec.axesSpec[A].annotations
|
|
1803
|
+
})),
|
|
1804
|
+
annotations: v
|
|
1805
|
+
},
|
|
1806
|
+
data: e.data
|
|
1807
|
+
};
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1810
|
+
function Jt(t) {
|
|
1811
|
+
const e = [];
|
|
1812
|
+
for (let n = 0; n < t.length; n++)
|
|
1813
|
+
for (let r = n + 1; r < t.length; r++) {
|
|
1814
|
+
const i = t[n], s = t[r];
|
|
1815
|
+
e.push(
|
|
1816
|
+
...Te(i, s),
|
|
1817
|
+
...Te(s, i)
|
|
1818
|
+
);
|
|
1819
|
+
}
|
|
1820
|
+
return e;
|
|
1821
|
+
}
|
|
1822
|
+
function Nt(t, e) {
|
|
1823
|
+
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1824
|
+
t.forEach((s) => {
|
|
1825
|
+
n.add(s.id), r.set(M(Pe(s.spec)), s);
|
|
1826
|
+
});
|
|
1827
|
+
const i = /* @__PURE__ */ new Map();
|
|
1828
|
+
for (const s of e) {
|
|
1829
|
+
if (n.has(s.id)) continue;
|
|
1830
|
+
const o = M(Pe(s.spec));
|
|
1831
|
+
if (!r.has(o)) {
|
|
1832
|
+
for (const a of r.values())
|
|
1833
|
+
if (Je(a.spec, s.spec)) {
|
|
1834
|
+
i.set(o, s);
|
|
1835
|
+
break;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
return [...r.values(), ...i.values()];
|
|
1840
|
+
}
|
|
1841
|
+
function En(t, e) {
|
|
1842
|
+
if (!e) return;
|
|
1843
|
+
const n = t.resultPool.getData().entries.map((s) => s.obj).filter(ye), r = Nt(e, n), i = [...r, ...Jt(r)];
|
|
1844
|
+
if (!i.some(
|
|
1845
|
+
(s) => s.data instanceof E && !s.data.getIsReadyOrError()
|
|
1846
|
+
))
|
|
1847
|
+
return t.createPFrame(i);
|
|
1848
|
+
}
|
|
1849
|
+
function Dn(t) {
|
|
1734
1850
|
const e = t.type;
|
|
1735
1851
|
switch (e) {
|
|
1736
1852
|
case "axis":
|
|
1737
|
-
return
|
|
1853
|
+
return M(t);
|
|
1738
1854
|
case "column":
|
|
1739
|
-
return
|
|
1855
|
+
return M(t);
|
|
1740
1856
|
default:
|
|
1741
1857
|
throw Error(`unsupported column type: ${e}`);
|
|
1742
1858
|
}
|
|
1743
1859
|
}
|
|
1744
|
-
function
|
|
1745
|
-
return JSON.parse(t);
|
|
1746
|
-
}
|
|
1747
|
-
function Rt(t) {
|
|
1860
|
+
function Ut(t) {
|
|
1748
1861
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
1749
1862
|
}
|
|
1750
|
-
function
|
|
1863
|
+
function Ne(t) {
|
|
1751
1864
|
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
1752
1865
|
name: "pl7.app/label",
|
|
1753
1866
|
axes: [{}]
|
|
1754
1867
|
// exactly one axis
|
|
1755
1868
|
}, { dontWaitAllData: !0 });
|
|
1756
1869
|
}
|
|
1757
|
-
function
|
|
1870
|
+
function Ue(t, e) {
|
|
1758
1871
|
const n = [], r = [];
|
|
1759
1872
|
for (const a of t)
|
|
1760
|
-
|
|
1873
|
+
Ut(a.spec) ? n.push(a) : r.push(a);
|
|
1761
1874
|
const i = [];
|
|
1762
1875
|
for (const a of r)
|
|
1763
1876
|
for (const l of a.spec.axesSpec) {
|
|
1764
|
-
const u =
|
|
1765
|
-
i.some((
|
|
1877
|
+
const u = R(l);
|
|
1878
|
+
i.some((d) => K(d, u)) || i.push(u);
|
|
1766
1879
|
}
|
|
1767
1880
|
for (const a of n) {
|
|
1768
|
-
const l =
|
|
1881
|
+
const l = R(a.spec.axesSpec[0]), u = i.findIndex((d) => K(d, l));
|
|
1769
1882
|
u !== -1 && i.splice(u, 1);
|
|
1770
1883
|
}
|
|
1771
1884
|
const s = (a, l) => {
|
|
1772
1885
|
let u = a.toString();
|
|
1773
1886
|
if (l)
|
|
1774
|
-
for (const
|
|
1775
|
-
u +=
|
|
1887
|
+
for (const d in l)
|
|
1888
|
+
u += d, u += l[d];
|
|
1776
1889
|
return u;
|
|
1777
1890
|
}, o = [];
|
|
1778
1891
|
for (const a of e) {
|
|
1779
|
-
const l = a.spec.axesSpec[0], u =
|
|
1780
|
-
if (
|
|
1781
|
-
const h = i[
|
|
1892
|
+
const l = a.spec.axesSpec[0], u = R(l), d = i.findIndex((h) => K(h, u));
|
|
1893
|
+
if (d !== -1) {
|
|
1894
|
+
const h = i[d], w = Object.keys(h.domain ?? {}).length, g = Object.keys(l.domain ?? {}).length;
|
|
1782
1895
|
w > g ? o.push({
|
|
1783
1896
|
id: s(a.id, h.domain),
|
|
1784
1897
|
spec: {
|
|
@@ -1786,12 +1899,12 @@ function Ne(t, e) {
|
|
|
1786
1899
|
axesSpec: [{ ...h, annotations: l.annotations }]
|
|
1787
1900
|
},
|
|
1788
1901
|
data: a.data
|
|
1789
|
-
}) : o.push(a), i.splice(
|
|
1902
|
+
}) : o.push(a), i.splice(d, 1);
|
|
1790
1903
|
}
|
|
1791
1904
|
}
|
|
1792
1905
|
return o;
|
|
1793
1906
|
}
|
|
1794
|
-
function
|
|
1907
|
+
function Be(t) {
|
|
1795
1908
|
const e = (i) => Array.isArray(i), n = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
1796
1909
|
return t.map((i) => i.data).every((i) => {
|
|
1797
1910
|
if (e(i))
|
|
@@ -1811,7 +1924,7 @@ function Ue(t) {
|
|
|
1811
1924
|
throw Error(`unsupported column data type: ${i}`);
|
|
1812
1925
|
});
|
|
1813
1926
|
}
|
|
1814
|
-
function
|
|
1927
|
+
function Me(t, e, n, r, i, s) {
|
|
1815
1928
|
let o = t;
|
|
1816
1929
|
const a = [];
|
|
1817
1930
|
if (s) {
|
|
@@ -1832,56 +1945,60 @@ function Be(t, e, n, r, i, s) {
|
|
|
1832
1945
|
sorting: i
|
|
1833
1946
|
};
|
|
1834
1947
|
}
|
|
1835
|
-
function
|
|
1836
|
-
var u,
|
|
1948
|
+
function Fn(t, e, n, r) {
|
|
1949
|
+
var u, d;
|
|
1837
1950
|
Array.isArray(r) && (r = { filters: r });
|
|
1838
|
-
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 = ((
|
|
1951
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s = [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []], o = ((d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Ne(t.resultPool);
|
|
1839
1952
|
if (!a) return;
|
|
1840
|
-
const l =
|
|
1841
|
-
if (
|
|
1953
|
+
const l = Ue(e.map(Ee), a);
|
|
1954
|
+
if (Be([...e, ...l]))
|
|
1842
1955
|
return t.createPTable(
|
|
1843
|
-
|
|
1956
|
+
Me(e, l, i, s, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
1844
1957
|
);
|
|
1845
1958
|
}
|
|
1846
|
-
function
|
|
1959
|
+
function Bt(t) {
|
|
1960
|
+
var e;
|
|
1961
|
+
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
1962
|
+
}
|
|
1963
|
+
function Mt(t) {
|
|
1847
1964
|
var e;
|
|
1848
1965
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
1849
1966
|
}
|
|
1850
|
-
function
|
|
1851
|
-
var
|
|
1852
|
-
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
1853
|
-
if (!l) return;
|
|
1854
|
-
const u = Je(t.resultPool);
|
|
1967
|
+
function Rn(t, e, n, r, i) {
|
|
1968
|
+
var v, b;
|
|
1969
|
+
const s = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((v = r == null ? void 0 : r.pTableParams) == null ? void 0 : v.filters) ?? []], a = ((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.sorting) ?? [], l = e.filter((p) => !Bt(p.spec)), u = l.find((p) => n(p.spec));
|
|
1855
1970
|
if (!u) return;
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1971
|
+
const d = Ne(t.resultPool);
|
|
1972
|
+
if (!d) return;
|
|
1973
|
+
const h = new Set((() => {
|
|
1974
|
+
var A, x;
|
|
1858
1975
|
if (s === "inner") return [];
|
|
1859
|
-
const
|
|
1860
|
-
return
|
|
1976
|
+
const p = (x = (A = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A.hiddenColIds) == null ? void 0 : x.map(lt).filter((y) => y.type === "column").map((y) => y.id);
|
|
1977
|
+
return p || l.filter((y) => Mt(y.spec)).map((y) => y.id);
|
|
1861
1978
|
})());
|
|
1862
|
-
|
|
1863
|
-
const
|
|
1864
|
-
...
|
|
1979
|
+
h.delete(u.id), [...o.map((p) => p.column), ...a.map((p) => p.column)].filter((p) => p.type === "column").map((p) => h.delete(p.id));
|
|
1980
|
+
const w = l.filter((p) => !h.has(p.id)), g = Ue(w.map(Ee), d), m = [
|
|
1981
|
+
...u.spec.axesSpec.map((p) => ({
|
|
1865
1982
|
type: "axis",
|
|
1866
|
-
id:
|
|
1867
|
-
spec:
|
|
1983
|
+
id: R(p),
|
|
1984
|
+
spec: p
|
|
1868
1985
|
})),
|
|
1869
|
-
...[...
|
|
1986
|
+
...[...l, ...g].map((p) => ({
|
|
1870
1987
|
type: "column",
|
|
1871
|
-
id:
|
|
1872
|
-
spec:
|
|
1988
|
+
id: p.id,
|
|
1989
|
+
spec: p.spec
|
|
1873
1990
|
}))
|
|
1874
1991
|
];
|
|
1875
|
-
if (!
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1992
|
+
if (!Be([...w, ...g])) return;
|
|
1993
|
+
const c = t.createPTable(
|
|
1994
|
+
Me(l, g, s, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
1878
1995
|
);
|
|
1879
1996
|
return {
|
|
1880
|
-
tableSpec:
|
|
1881
|
-
tableHandle:
|
|
1997
|
+
tableSpec: m,
|
|
1998
|
+
tableHandle: c
|
|
1882
1999
|
};
|
|
1883
2000
|
}
|
|
1884
|
-
function
|
|
2001
|
+
function On(t, e, n) {
|
|
1885
2002
|
const r = t.resultPool.findLabels(e);
|
|
1886
2003
|
return {
|
|
1887
2004
|
axis: e,
|
|
@@ -1892,120 +2009,41 @@ function En(t, e, n) {
|
|
|
1892
2009
|
defaultValue: n[0]
|
|
1893
2010
|
};
|
|
1894
2011
|
}
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
return [];
|
|
1906
|
-
let e = [[]];
|
|
1907
|
-
return t.forEach((n) => {
|
|
1908
|
-
const r = [];
|
|
1909
|
-
n.forEach((i) => {
|
|
1910
|
-
r.push(...e.map((s) => [...s, i]));
|
|
1911
|
-
}), e = r;
|
|
1912
|
-
}), e;
|
|
1913
|
-
}
|
|
1914
|
-
function Kt(t, e) {
|
|
1915
|
-
const n = t.axesSpec.map(O);
|
|
1916
|
-
return e.axesSpec.map(O).every((i) => n.some((s) => K(s, i) && K(i, s)));
|
|
1917
|
-
}
|
|
1918
|
-
function Me(t, e) {
|
|
1919
|
-
const n = t.axesSpec.map(O);
|
|
1920
|
-
return e.axesSpec.map(O).every((i) => n.some((s) => K(s, i)));
|
|
2012
|
+
function kn(t) {
|
|
2013
|
+
const e = t.type;
|
|
2014
|
+
switch (e) {
|
|
2015
|
+
case "axis":
|
|
2016
|
+
return M(t);
|
|
2017
|
+
case "column":
|
|
2018
|
+
return M(t);
|
|
2019
|
+
default:
|
|
2020
|
+
throw Error(`unsupported column type: ${e}`);
|
|
2021
|
+
}
|
|
1921
2022
|
}
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
return [];
|
|
1927
|
-
if (!Me(t.spec, e.spec))
|
|
1928
|
-
return [];
|
|
1929
|
-
const o = r.map((h) => n.filter((w) => K(w, h))), a = Vt(o), l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), p = a.map((h) => {
|
|
1930
|
-
const w = /* @__PURE__ */ new Set();
|
|
1931
|
-
return h.map((g, m) => {
|
|
1932
|
-
const c = e.spec.axesSpec[m].domain, y = g.domain;
|
|
1933
|
-
return Object.entries(y ?? {}).forEach(([d, b]) => {
|
|
1934
|
-
if ((c == null ? void 0 : c[d]) === void 0) {
|
|
1935
|
-
const A = JSON.stringify([d, b]);
|
|
1936
|
-
w.add(A), l.add(A);
|
|
1937
|
-
}
|
|
1938
|
-
}), {
|
|
1939
|
-
...g,
|
|
1940
|
-
annotations: e.spec.axesSpec[m].annotations
|
|
1941
|
-
};
|
|
1942
|
-
}), w;
|
|
1943
|
-
});
|
|
1944
|
-
return [...l].forEach((h) => {
|
|
1945
|
-
p.some((w) => !w.has(h)) && u.add(h);
|
|
1946
|
-
}), a.map((h, w) => {
|
|
1947
|
-
var d;
|
|
1948
|
-
const g = jt(e.id, h.map((b) => b.domain)), m = ((d = e.spec.annotations) == null ? void 0 : d[Ie]) ?? "", c = [...p[w]].filter((b) => u.has(b)).sort().map((b) => {
|
|
1949
|
-
var A;
|
|
1950
|
-
return (A = JSON.parse(b)) == null ? void 0 : A[1];
|
|
1951
|
-
}).join(" / "), y = {
|
|
1952
|
-
...e.spec.annotations,
|
|
1953
|
-
[$t]: "true"
|
|
1954
|
-
};
|
|
1955
|
-
return (m || c) && (y[Ie] = m && c ? m + " / " + c : m + c), {
|
|
1956
|
-
id: g,
|
|
2023
|
+
function jn(t, e, n, r) {
|
|
2024
|
+
if (!(!e || e.axesSpec.length === 0))
|
|
2025
|
+
return {
|
|
2026
|
+
id: t,
|
|
1957
2027
|
spec: {
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
}
|
|
1963
|
-
annotations:
|
|
2028
|
+
kind: "PColumn",
|
|
2029
|
+
valueType: "Int",
|
|
2030
|
+
name: "pl7.app/table/row-selection",
|
|
2031
|
+
axesSpec: e.axesSpec,
|
|
2032
|
+
...r && { domain: r },
|
|
2033
|
+
annotations: {
|
|
2034
|
+
"pl7.app/label": n ?? "Selected rows",
|
|
2035
|
+
"pl7.app/discreteValues": "[1]"
|
|
2036
|
+
}
|
|
1964
2037
|
},
|
|
1965
|
-
data: e.
|
|
2038
|
+
data: e.selectedKeys.filter((i) => !i.some((s) => ut(s))).map((i) => ({ key: i, val: 1 }))
|
|
1966
2039
|
};
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
function Jt(t) {
|
|
1970
|
-
const e = [];
|
|
1971
|
-
for (let n = 0; n < t.length; n++)
|
|
1972
|
-
for (let r = n + 1; r < t.length; r++) {
|
|
1973
|
-
const i = t[n], s = t[r];
|
|
1974
|
-
e.push(
|
|
1975
|
-
...Te(i, s),
|
|
1976
|
-
...Te(s, i)
|
|
1977
|
-
);
|
|
1978
|
-
}
|
|
1979
|
-
return e;
|
|
1980
|
-
}
|
|
1981
|
-
function Nt(t, e) {
|
|
1982
|
-
const n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
1983
|
-
t.forEach((s) => {
|
|
1984
|
-
n.add(s.id), r.set(re(Pe(s.spec)), s);
|
|
1985
|
-
});
|
|
1986
|
-
const i = /* @__PURE__ */ new Map();
|
|
1987
|
-
for (const s of e) {
|
|
1988
|
-
if (n.has(s.id)) continue;
|
|
1989
|
-
const o = re(Pe(s.spec));
|
|
1990
|
-
if (!r.has(o)) {
|
|
1991
|
-
for (const a of r.values())
|
|
1992
|
-
if (Me(a.spec, s.spec)) {
|
|
1993
|
-
i.set(o, s);
|
|
1994
|
-
break;
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
return [...r.values(), ...i.values()];
|
|
1999
2040
|
}
|
|
2000
|
-
function
|
|
2001
|
-
if (
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
(s) => s.data instanceof E && !s.data.getIsReadyOrError()
|
|
2005
|
-
))
|
|
2006
|
-
return t.createPFrame(i);
|
|
2041
|
+
function Vn(t) {
|
|
2042
|
+
if (t === ct)
|
|
2043
|
+
throw new Error("Axis value can never be N/A");
|
|
2044
|
+
return t;
|
|
2007
2045
|
}
|
|
2008
|
-
class
|
|
2046
|
+
class Kn {
|
|
2009
2047
|
constructor(e) {
|
|
2010
2048
|
this.handle = e;
|
|
2011
2049
|
}
|
|
@@ -2025,121 +2063,124 @@ class Fn {
|
|
|
2025
2063
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
2026
2064
|
}
|
|
2027
2065
|
}
|
|
2028
|
-
function
|
|
2066
|
+
function Wt(t) {
|
|
2029
2067
|
return Fe({
|
|
2030
2068
|
__isRef: !0,
|
|
2031
2069
|
blockId: ie(t, "blockId"),
|
|
2032
2070
|
name: ie(t, "name")
|
|
2033
2071
|
});
|
|
2034
2072
|
}
|
|
2035
|
-
function
|
|
2073
|
+
function $n(t) {
|
|
2036
2074
|
return Fe({
|
|
2037
|
-
ref:
|
|
2075
|
+
ref: Wt(ie(t, "ref")),
|
|
2038
2076
|
label: ie(t, "label")
|
|
2039
2077
|
});
|
|
2040
2078
|
}
|
|
2041
|
-
const
|
|
2042
|
-
sdkVersion:
|
|
2079
|
+
const Jn = {
|
|
2080
|
+
sdkVersion: Y
|
|
2043
2081
|
};
|
|
2044
|
-
function
|
|
2045
|
-
return
|
|
2082
|
+
function Gt() {
|
|
2083
|
+
return Re({ sdkVersion: Y });
|
|
2046
2084
|
}
|
|
2047
|
-
function
|
|
2085
|
+
function Nn(t) {
|
|
2048
2086
|
try {
|
|
2049
|
-
return
|
|
2087
|
+
return Gt();
|
|
2050
2088
|
} catch {
|
|
2051
2089
|
return t;
|
|
2052
2090
|
}
|
|
2053
2091
|
}
|
|
2054
|
-
function
|
|
2092
|
+
function Un(t) {
|
|
2055
2093
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
2056
2094
|
return globalThis.getEnvironmentValue(t);
|
|
2057
2095
|
}
|
|
2058
2096
|
export {
|
|
2059
|
-
|
|
2097
|
+
Zt as Args,
|
|
2060
2098
|
L as BlockModel,
|
|
2061
|
-
|
|
2099
|
+
Jn as CurrentSdkInfo,
|
|
2062
2100
|
I as FutureRef,
|
|
2063
2101
|
$t as IS_VIRTUAL_COLUMN,
|
|
2064
|
-
|
|
2065
|
-
|
|
2102
|
+
en as It,
|
|
2103
|
+
In as JsRenderInternal,
|
|
2066
2104
|
Ie as LABEL_ANNOTATION,
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2105
|
+
tn as MainOutputs,
|
|
2106
|
+
pt as OutputError,
|
|
2107
|
+
vt as PAnnotationLabel,
|
|
2108
|
+
bt as PAnnotationTrace,
|
|
2071
2109
|
me as PColumnCollection,
|
|
2072
|
-
|
|
2110
|
+
Kn as PFrameImpl,
|
|
2073
2111
|
B as RT_BINARY_PARTITIONED,
|
|
2074
|
-
|
|
2075
|
-
|
|
2112
|
+
z as RT_BINARY_SUPER_PARTITIONED,
|
|
2113
|
+
q as RT_JSON_PARTITIONED,
|
|
2076
2114
|
ae as RT_JSON_SUPER_PARTITIONED,
|
|
2077
2115
|
se as RT_RESOURCE_MAP,
|
|
2078
2116
|
oe as RT_RESOURCE_MAP_PARTITIONED,
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2117
|
+
te as RenderCtx,
|
|
2118
|
+
Ot as ResultPool,
|
|
2119
|
+
nn as StagingOutputs,
|
|
2120
|
+
At as Trace,
|
|
2121
|
+
wt as TraceEntry,
|
|
2084
2122
|
E as TreeNodeAccessor,
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2123
|
+
rn as UiState,
|
|
2124
|
+
Be as allColumnsComputed,
|
|
2125
|
+
pn as and,
|
|
2126
|
+
It as convertOrParsePColumnData,
|
|
2127
|
+
En as createPFrameForGraphs,
|
|
2128
|
+
Fn as createPlDataTable,
|
|
2129
|
+
On as createPlDataTableSheet,
|
|
2130
|
+
Rn as createPlDataTableV2,
|
|
2131
|
+
jn as createRowSelectionColumn,
|
|
2093
2132
|
Ve as deriveLabels,
|
|
2094
|
-
|
|
2133
|
+
pe as downgradeCfgOrLambda,
|
|
2095
2134
|
Nt as enrichColumnsWithCompatible,
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2135
|
+
An as extractArchiveAndGetURL,
|
|
2136
|
+
Ln as extractConfig,
|
|
2137
|
+
Tt as filterDataInfoEntries,
|
|
2138
|
+
ln as flatten,
|
|
2139
|
+
$n as fromPlOption,
|
|
2140
|
+
Wt as fromPlRef,
|
|
2102
2141
|
Jt as getAdditionalColumns,
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2142
|
+
Ne as getAllLabelColumns,
|
|
2143
|
+
mn as getBlobContent,
|
|
2144
|
+
vn as getBlobContentAsJson,
|
|
2145
|
+
yn as getBlobContentAsString,
|
|
2146
|
+
bn as getDownloadedBlobContent,
|
|
2147
|
+
Un as getEnvironmentValue,
|
|
2148
|
+
Q as getFromCfg,
|
|
2149
|
+
re as getImmediate,
|
|
2150
|
+
xn as getImportProgress,
|
|
2112
2151
|
ie as getJsonField,
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2152
|
+
Pn as getLastLogs,
|
|
2153
|
+
_n as getLogHandle,
|
|
2154
|
+
Ue as getMatchingLabelColumns,
|
|
2155
|
+
wn as getOnDemandBlobContent,
|
|
2156
|
+
Ct as getPartitionKeysList,
|
|
2157
|
+
Nn as getPlatformaOrDefault,
|
|
2158
|
+
Cn as getProgressLog,
|
|
2159
|
+
Sn as getProgressLogWithInfo,
|
|
2160
|
+
Gt as getRawPlatformaInstance,
|
|
2161
|
+
fn as getResourceField,
|
|
2162
|
+
hn as getResourceValueAsJson,
|
|
2163
|
+
_t as getUniquePartitionKeys,
|
|
2164
|
+
de as ifDef,
|
|
2165
|
+
Bt as isColumnHidden,
|
|
2166
|
+
Mt as isColumnOptional,
|
|
2167
|
+
kt as isConfigLambda,
|
|
2168
|
+
un as isEmpty,
|
|
2169
|
+
Ut as isLabelColumn,
|
|
2170
|
+
Qt as isolate,
|
|
2171
|
+
sn as makeArray,
|
|
2132
2172
|
Fe as makeObject,
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2173
|
+
an as mapArrayValues,
|
|
2174
|
+
Vn as mapPTableValueToAxisKey,
|
|
2175
|
+
on as mapRecordValues,
|
|
2176
|
+
gn as mapResourceFields,
|
|
2177
|
+
cn as not,
|
|
2178
|
+
dn as or,
|
|
2138
2179
|
ge as parsePColumnData,
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2180
|
+
Tn as parseResourceMap,
|
|
2181
|
+
dt as readOutput,
|
|
2182
|
+
kn as stringifyPTableColumnId,
|
|
2183
|
+
Dn as stringifyPTableColumnSpec,
|
|
2184
|
+
Xt as wrapOutputs
|
|
2144
2185
|
};
|
|
2145
2186
|
//# sourceMappingURL=index.mjs.map
|