@milaboratories/graph-maker 1.1.133 → 1.1.135
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/GraphMaker/components/Chart.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/Chart.vue.js +49 -47
- package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.js +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +7 -7
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +159 -162
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/Lasso.js +104 -104
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/Lasso.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +50 -51
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js +21 -23
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +49 -54
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +1348 -1163
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js +212 -208
- package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js.map +1 -1
- package/dist/node_modules/@platforma-sdk/model/dist/index.js +242 -241
- package/dist/node_modules/@platforma-sdk/model/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { isDataInfo as ae, extractAllColumns as Le, mapPTableDef as Ee, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as he, isPlRef as Te, mapValueInVOE as Fe, mapPObjectData as le, ensurePColumn as Oe, isPColumnSpec as G, isPColumn as be, resolveAnchors as pe, deriveNativeId as ke, isPartitionedDataInfoEntries as Re, getAxisId as de, entriesToDataInfo as De, isDataInfoEntries as _e, dataInfoToEntries as $e, canonicalizeAxisId as Ke, mapDataInfo as
|
|
2
|
-
import { PlIdLength as bt,
|
|
1
|
+
import { isDataInfo as ae, extractAllColumns as Le, mapPTableDef as Ee, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as he, isPlRef as Te, mapValueInVOE as Fe, mapPObjectData as le, ensurePColumn as Oe, isPColumnSpec as G, isPColumn as be, resolveAnchors as pe, deriveNativeId as ke, isPartitionedDataInfoEntries as Re, getAxisId as de, entriesToDataInfo as De, isDataInfoEntries as _e, dataInfoToEntries as $e, canonicalizeAxisId as Ke, mapDataInfo as je } from "../../../@milaboratories/pl-model-common/dist/index.js";
|
|
2
|
+
import { PlIdLength as bt, canonicalizeJson as _t, getAxesId as wt, mapJoinEntry as Pt, matchAxis as At, matchAxisId as xt, matchPColumn as St, stringifyColumnId as It } from "../../../@milaboratories/pl-model-common/dist/index.js";
|
|
3
3
|
import we from "../../../canonicalize/lib/canonicalize.js";
|
|
4
4
|
import K from "../../../zod/lib/index.js";
|
|
5
|
-
import { BasePlErrorLike as
|
|
6
|
-
var
|
|
7
|
-
function Z(
|
|
8
|
-
return { type: "Immediate", value:
|
|
5
|
+
import { BasePlErrorLike as Lt, ErrorLike as Et, PlErrorLike as Tt, StandardErrorLike as Ft } from "../../../@milaboratories/pl-error-like/dist/index.js";
|
|
6
|
+
var Ne = Object.defineProperty, Be = (r, e, t) => e in r ? Ne(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, S = (r, e, t) => Be(r, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
+
function Z(r) {
|
|
8
|
+
return { type: "Immediate", value: r };
|
|
9
9
|
}
|
|
10
10
|
function Je() {
|
|
11
11
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
12
12
|
}
|
|
13
|
-
function Ve(
|
|
14
|
-
if (
|
|
15
|
-
return globalThis.getPlatforma(
|
|
13
|
+
function Ve(r) {
|
|
14
|
+
if (r && typeof globalThis.getPlatforma == "function")
|
|
15
|
+
return globalThis.getPlatforma(r);
|
|
16
16
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
17
17
|
throw new Error("Can't get platforma instance.");
|
|
18
18
|
}
|
|
@@ -23,23 +23,23 @@ function c() {
|
|
|
23
23
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
24
24
|
throw new Error("Not in config rendering context");
|
|
25
25
|
}
|
|
26
|
-
function V(
|
|
26
|
+
function V(r, e) {
|
|
27
27
|
const t = Ue();
|
|
28
28
|
if (t === void 0) return !1;
|
|
29
|
-
if (
|
|
30
|
-
return t.callbackRegistry[
|
|
29
|
+
if (r in t.callbackRegistry) throw new Error(`Callback with key ${r} already registered.`);
|
|
30
|
+
return t.callbackRegistry[r] = e, !0;
|
|
31
31
|
}
|
|
32
32
|
const Q = /* @__PURE__ */ new Map();
|
|
33
|
-
function Me(
|
|
34
|
-
|
|
35
|
-
for (const
|
|
36
|
-
|
|
37
|
-
}, Q.set(
|
|
33
|
+
function Me(r, e) {
|
|
34
|
+
r in c().callbackRegistry || (c().callbackRegistry[r] = (t) => {
|
|
35
|
+
for (const n of Q.get(r))
|
|
36
|
+
n(t);
|
|
37
|
+
}, Q.set(r, [])), Q.get(r).push(e);
|
|
38
38
|
}
|
|
39
39
|
class w {
|
|
40
|
-
constructor(e, t = (
|
|
41
|
-
S(this, "isResolved", !1), S(this, "resolvedValue"), this.handle = e, this.postProcess = t, Me(e, (
|
|
42
|
-
this.resolvedValue = t(
|
|
40
|
+
constructor(e, t = (n) => n) {
|
|
41
|
+
S(this, "isResolved", !1), S(this, "resolvedValue"), this.handle = e, this.postProcess = t, Me(e, (n) => {
|
|
42
|
+
this.resolvedValue = t(n), this.isResolved = !0;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
map(e) {
|
|
@@ -47,16 +47,16 @@ class w {
|
|
|
47
47
|
}
|
|
48
48
|
mapDefined(e) {
|
|
49
49
|
return new w(this.handle, (t) => {
|
|
50
|
-
const
|
|
51
|
-
return
|
|
50
|
+
const n = this.postProcess(t);
|
|
51
|
+
return n ? e(n) : void 0;
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
toJSON() {
|
|
55
55
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
58
|
+
function ne(r, e) {
|
|
59
|
+
return r === void 0 ? void 0 : e(r);
|
|
60
60
|
}
|
|
61
61
|
class I {
|
|
62
62
|
constructor(e, t) {
|
|
@@ -64,27 +64,27 @@ class I {
|
|
|
64
64
|
}
|
|
65
65
|
resolve(...e) {
|
|
66
66
|
const t = e.map(
|
|
67
|
-
(
|
|
67
|
+
(n) => ({
|
|
68
68
|
assertFieldType: "Input",
|
|
69
|
-
...typeof
|
|
69
|
+
...typeof n == "string" ? { field: n } : n
|
|
70
70
|
})
|
|
71
71
|
);
|
|
72
72
|
return this.resolveWithCommon({}, ...t);
|
|
73
73
|
}
|
|
74
74
|
resolveOutput(...e) {
|
|
75
75
|
const t = e.map(
|
|
76
|
-
(
|
|
76
|
+
(n) => ({
|
|
77
77
|
assertFieldType: "Output",
|
|
78
|
-
...typeof
|
|
78
|
+
...typeof n == "string" ? { field: n } : n
|
|
79
79
|
})
|
|
80
80
|
);
|
|
81
81
|
return this.resolveWithCommon({}, ...t);
|
|
82
82
|
}
|
|
83
83
|
resolveInput(...e) {
|
|
84
84
|
const t = e.map(
|
|
85
|
-
(
|
|
85
|
+
(n) => ({
|
|
86
86
|
assertFieldType: "Input",
|
|
87
|
-
...typeof
|
|
87
|
+
...typeof n == "string" ? { field: n } : n
|
|
88
88
|
})
|
|
89
89
|
);
|
|
90
90
|
return this.resolveWithCommon({}, ...t);
|
|
@@ -93,13 +93,13 @@ class I {
|
|
|
93
93
|
return this.resolveWithCommon({}, ...e);
|
|
94
94
|
}
|
|
95
95
|
resolveWithCommon(e, ...t) {
|
|
96
|
-
const
|
|
96
|
+
const n = [
|
|
97
97
|
...this.resolvePath,
|
|
98
98
|
...t.map((i) => typeof i == "string" ? i : i.field)
|
|
99
99
|
];
|
|
100
|
-
return
|
|
100
|
+
return ne(
|
|
101
101
|
c().resolveWithCommon(this.handle, e, ...t),
|
|
102
|
-
(i) => new I(i,
|
|
102
|
+
(i) => new I(i, n)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
get resourceType() {
|
|
@@ -119,7 +119,7 @@ class I {
|
|
|
119
119
|
}
|
|
120
120
|
getError() {
|
|
121
121
|
const e = [...this.resolvePath, "error"];
|
|
122
|
-
return
|
|
122
|
+
return ne(
|
|
123
123
|
c().getError(this.handle),
|
|
124
124
|
(t) => new I(t, e)
|
|
125
125
|
);
|
|
@@ -159,8 +159,8 @@ class I {
|
|
|
159
159
|
*
|
|
160
160
|
*/
|
|
161
161
|
getPColumns(e = !1, t = "") {
|
|
162
|
-
const
|
|
163
|
-
return
|
|
162
|
+
const n = this.parsePObjectCollection(e, t);
|
|
163
|
+
return n === void 0 ? void 0 : Object.entries(n).map(([, i]) => {
|
|
164
164
|
if (!be(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
165
165
|
return i;
|
|
166
166
|
});
|
|
@@ -169,15 +169,15 @@ class I {
|
|
|
169
169
|
*
|
|
170
170
|
*/
|
|
171
171
|
parsePObjectCollection(e = !1, t = "") {
|
|
172
|
-
const
|
|
172
|
+
const n = c().parsePObjectCollection(
|
|
173
173
|
this.handle,
|
|
174
174
|
e,
|
|
175
175
|
t,
|
|
176
176
|
...this.resolvePath
|
|
177
177
|
);
|
|
178
|
-
if (
|
|
178
|
+
if (n === void 0) return;
|
|
179
179
|
const i = {};
|
|
180
|
-
for (const [s, o] of Object.entries(
|
|
180
|
+
for (const [s, o] of Object.entries(n)) {
|
|
181
181
|
const a = [...this.resolvePath, s];
|
|
182
182
|
i[s] = le(o, (l) => new I(l, a));
|
|
183
183
|
}
|
|
@@ -264,16 +264,16 @@ class I {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
mapFields(e, t) {
|
|
267
|
-
const { fieldType:
|
|
267
|
+
const { fieldType: n, requireLocked: i, skipUnresolved: s } = {
|
|
268
268
|
fieldType: "Input",
|
|
269
269
|
requireLocked: !0,
|
|
270
270
|
skipUnresolved: !1,
|
|
271
271
|
...t
|
|
272
272
|
}, o = e;
|
|
273
|
-
if (i && (
|
|
273
|
+
if (i && (n === "Input" && !this.getInputsLocked() || n === "Output" && !this.getOutputsLocked()))
|
|
274
274
|
return;
|
|
275
|
-
let a = (
|
|
276
|
-
(l) => [l, this.resolve({ field: l, assertFieldType:
|
|
275
|
+
let a = (n === "Input" ? this.listInputFields() : n === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
276
|
+
(l) => [l, this.resolve({ field: l, assertFieldType: n })]
|
|
277
277
|
);
|
|
278
278
|
return s && (a = a.filter((l) => l[1] !== void 0)), a.map(([l, y]) => o(l, y));
|
|
279
279
|
}
|
|
@@ -284,8 +284,8 @@ const We = "staging", qe = "main", He = "pl7.app/label", ze = "pl7.app/trace", G
|
|
|
284
284
|
id: K.string().optional(),
|
|
285
285
|
label: K.string()
|
|
286
286
|
}), Ye = K.array(Ge), Ze = 1e-3, Qe = "__LABEL__", fe = "__LABEL__@1";
|
|
287
|
-
function Pe(
|
|
288
|
-
const
|
|
287
|
+
function Pe(r, e, t = {}) {
|
|
288
|
+
const n = /* @__PURE__ */ new Map(), i = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0, s = /* @__PURE__ */ new Map(), o = r.map((f) => {
|
|
289
289
|
var P, u;
|
|
290
290
|
const h = e(f);
|
|
291
291
|
let v, C, L;
|
|
@@ -304,10 +304,10 @@ function Pe(n, e, t = {}) {
|
|
|
304
304
|
const { type: B } = g[x], k = g[x].importance ?? 0, D = (T.get(B) ?? 0) + 1;
|
|
305
305
|
T.set(B, D);
|
|
306
306
|
const O = `${B}@${D}`;
|
|
307
|
-
s.set(O, (s.get(O) ?? 0) + 1),
|
|
307
|
+
s.set(O, (s.get(O) ?? 0) + 1), n.set(
|
|
308
308
|
O,
|
|
309
309
|
Math.max(
|
|
310
|
-
|
|
310
|
+
n.get(O) ?? Number.NEGATIVE_INFINITY,
|
|
311
311
|
k - (g.length - x) * Ze
|
|
312
312
|
)
|
|
313
313
|
), m.push({ ...g[x], fullType: O, occurrenceIndex: D });
|
|
@@ -318,11 +318,11 @@ function Pe(n, e, t = {}) {
|
|
|
318
318
|
label: p,
|
|
319
319
|
fullTrace: m
|
|
320
320
|
};
|
|
321
|
-
}), a = [], l = [], y = [...
|
|
321
|
+
}), a = [], l = [], y = [...n];
|
|
322
322
|
y.sort(([, f], [, P]) => P - f);
|
|
323
323
|
for (const [f] of y)
|
|
324
|
-
f.endsWith("@1") || s.get(f) ===
|
|
325
|
-
const
|
|
324
|
+
f.endsWith("@1") || s.get(f) === r.length ? a.push(f) : l.push(f);
|
|
325
|
+
const N = (f, P = !1) => {
|
|
326
326
|
const u = [];
|
|
327
327
|
for (let h = 0; h < o.length; h++) {
|
|
328
328
|
const v = o[h], C = v.fullTrace.filter((A) => f.has(A.fullType) || i && i.has(A.type));
|
|
@@ -343,7 +343,7 @@ function Pe(n, e, t = {}) {
|
|
|
343
343
|
};
|
|
344
344
|
if (a.length === 0) {
|
|
345
345
|
if (l.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
346
|
-
return
|
|
346
|
+
return N(new Set(fe), !0);
|
|
347
347
|
}
|
|
348
348
|
let E = 0, F = -1;
|
|
349
349
|
for (; E < a.length; ) {
|
|
@@ -351,32 +351,32 @@ function Pe(n, e, t = {}) {
|
|
|
351
351
|
t.includeNativeLabel && f.add(fe);
|
|
352
352
|
for (let u = 0; u < E; ++u) f.add(a[u]);
|
|
353
353
|
F >= 0 && f.add(a[F]);
|
|
354
|
-
const P =
|
|
355
|
-
if (P !== void 0 && new Set(P.map((u) => u.label)).size ===
|
|
354
|
+
const P = N(f);
|
|
355
|
+
if (P !== void 0 && new Set(P.map((u) => u.label)).size === r.length) return P;
|
|
356
356
|
F++, F >= a.length && (E++, F = E);
|
|
357
357
|
}
|
|
358
|
-
return
|
|
358
|
+
return N(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
359
359
|
}
|
|
360
|
-
const q = "PColumnData/",
|
|
361
|
-
if (
|
|
362
|
-
return { baseKey:
|
|
363
|
-
if (
|
|
364
|
-
return { baseKey:
|
|
365
|
-
throw new Error(`key must ends on .index/.values for binary p-column, got: ${
|
|
360
|
+
const q = "PColumnData/", re = q + "ResourceMap", ie = q + "Partitioned/ResourceMap", U = q + "JsonPartitioned", j = q + "BinaryPartitioned", Ae = q + "Partitioned/", Y = Ae + "JsonPartitioned", M = Ae + "BinaryPartitioned", se = (r) => {
|
|
361
|
+
if (r.endsWith(".index"))
|
|
362
|
+
return { baseKey: r.substring(0, r.length - 6), type: "index" };
|
|
363
|
+
if (r.endsWith(".values"))
|
|
364
|
+
return { baseKey: r.substring(0, r.length - 7), type: "values" };
|
|
365
|
+
throw new Error(`key must ends on .index/.values for binary p-column, got: ${r}`);
|
|
366
366
|
};
|
|
367
|
-
function Xe(
|
|
368
|
-
if (!
|
|
369
|
-
const e =
|
|
367
|
+
function Xe(r) {
|
|
368
|
+
if (!r) return;
|
|
369
|
+
const e = r.resourceType.name, t = r.getDataAsJson(), n = [];
|
|
370
370
|
let i = 0;
|
|
371
371
|
switch (e) {
|
|
372
|
-
case
|
|
372
|
+
case re:
|
|
373
373
|
i = t.keyLength;
|
|
374
374
|
break;
|
|
375
375
|
case ie:
|
|
376
376
|
i = t.partitionKeyLength + t.keyLength;
|
|
377
377
|
break;
|
|
378
378
|
case U:
|
|
379
|
-
case
|
|
379
|
+
case j:
|
|
380
380
|
i = t.partitionKeyLength;
|
|
381
381
|
break;
|
|
382
382
|
case M:
|
|
@@ -385,37 +385,37 @@ function Xe(n) {
|
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
387
|
switch (e) {
|
|
388
|
-
case
|
|
388
|
+
case re:
|
|
389
389
|
case U:
|
|
390
|
-
case
|
|
391
|
-
for (let s of
|
|
392
|
-
e ===
|
|
390
|
+
case j:
|
|
391
|
+
for (let s of r.listInputFields()) {
|
|
392
|
+
e === j && (s = se(s).baseKey);
|
|
393
393
|
const o = [...JSON.parse(s)];
|
|
394
|
-
|
|
394
|
+
n.push(o);
|
|
395
395
|
}
|
|
396
396
|
break;
|
|
397
397
|
case ie:
|
|
398
398
|
case M:
|
|
399
399
|
case Y:
|
|
400
|
-
for (const s of
|
|
401
|
-
const o = [...JSON.parse(s)], a =
|
|
400
|
+
for (const s of r.listInputFields()) {
|
|
401
|
+
const o = [...JSON.parse(s)], a = r.resolve({ field: s, assertFieldType: "Input" });
|
|
402
402
|
if (a !== void 0)
|
|
403
403
|
for (let l of a.listInputFields()) {
|
|
404
404
|
e === M && (l = se(l).baseKey);
|
|
405
405
|
const y = [...o, ...JSON.parse(l)];
|
|
406
|
-
|
|
406
|
+
n.push(y);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
|
-
return { data:
|
|
411
|
+
return { data: n, keyLength: i };
|
|
412
412
|
}
|
|
413
|
-
function et(
|
|
414
|
-
if (
|
|
415
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${
|
|
416
|
-
const { parts: e, partitionKeyLength: t } =
|
|
413
|
+
function et(r) {
|
|
414
|
+
if (r.type !== "JsonPartitioned" && r.type !== "BinaryPartitioned")
|
|
415
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${r.type}`);
|
|
416
|
+
const { parts: e, partitionKeyLength: t } = r, n = [];
|
|
417
417
|
for (let i = 0; i < t; ++i)
|
|
418
|
-
|
|
418
|
+
n.push(/* @__PURE__ */ new Set());
|
|
419
419
|
for (const i of e) {
|
|
420
420
|
const s = i.key;
|
|
421
421
|
if (s.length !== t)
|
|
@@ -425,58 +425,58 @@ function et(n) {
|
|
|
425
425
|
)}`
|
|
426
426
|
);
|
|
427
427
|
for (let o = 0; o < t; ++o)
|
|
428
|
-
|
|
428
|
+
n[o].add(s[o]);
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return n.map((i) => Array.from(i.values()));
|
|
431
431
|
}
|
|
432
|
-
function tt(
|
|
433
|
-
if (
|
|
434
|
-
if (_e(
|
|
435
|
-
return et(
|
|
436
|
-
const e = Xe(
|
|
432
|
+
function tt(r) {
|
|
433
|
+
if (r === void 0) return;
|
|
434
|
+
if (_e(r))
|
|
435
|
+
return et(r);
|
|
436
|
+
const e = Xe(r);
|
|
437
437
|
if (!e) return;
|
|
438
|
-
const { data: t, keyLength:
|
|
439
|
-
for (let s = 0; s <
|
|
438
|
+
const { data: t, keyLength: n } = e, i = [];
|
|
439
|
+
for (let s = 0; s < n; ++s)
|
|
440
440
|
i.push(/* @__PURE__ */ new Set());
|
|
441
441
|
for (const s of t) {
|
|
442
|
-
if (s.length !==
|
|
442
|
+
if (s.length !== n)
|
|
443
443
|
throw new Error("key length does not match partition length");
|
|
444
|
-
for (let o = 0; o <
|
|
444
|
+
for (let o = 0; o < n; ++o)
|
|
445
445
|
i[o].add(s[o]);
|
|
446
446
|
}
|
|
447
447
|
return i.map((s) => Array.from(s.values()));
|
|
448
448
|
}
|
|
449
|
-
function oe(
|
|
450
|
-
if (
|
|
451
|
-
const t =
|
|
449
|
+
function oe(r, e = []) {
|
|
450
|
+
if (r === void 0 || !r.getIsReadyOrError()) return;
|
|
451
|
+
const t = r.resourceType.name, n = r.getDataAsJson();
|
|
452
452
|
if (e.length > 0 && (t === Y || t === M))
|
|
453
453
|
throw new Error(`Unexpected nested super-partitioned resource: ${t}`);
|
|
454
454
|
switch (t) {
|
|
455
|
-
case
|
|
455
|
+
case re:
|
|
456
456
|
case ie:
|
|
457
457
|
throw new Error(`Only data columns are supported, got: ${t}`);
|
|
458
458
|
case U: {
|
|
459
|
-
if (typeof (
|
|
459
|
+
if (typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
|
|
460
460
|
throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
|
|
461
461
|
const i = [];
|
|
462
|
-
for (const s of
|
|
463
|
-
const o =
|
|
462
|
+
for (const s of r.listInputFields()) {
|
|
463
|
+
const o = r.resolve({ field: s, assertFieldType: "Input" });
|
|
464
464
|
if (o === void 0) return;
|
|
465
465
|
const a = [...e, ...JSON.parse(s)];
|
|
466
466
|
i.push({ key: a, value: o });
|
|
467
467
|
}
|
|
468
468
|
return {
|
|
469
469
|
type: "JsonPartitioned",
|
|
470
|
-
partitionKeyLength:
|
|
470
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
471
471
|
parts: i
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
case
|
|
475
|
-
if (typeof (
|
|
474
|
+
case j: {
|
|
475
|
+
if (typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
|
|
476
476
|
throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
|
|
477
477
|
const i = [], s = /* @__PURE__ */ new Map();
|
|
478
|
-
for (const o of
|
|
479
|
-
const a = se(o), l =
|
|
478
|
+
for (const o of r.listInputFields()) {
|
|
479
|
+
const a = se(o), l = r.resolve({ field: o, assertFieldType: "Input" });
|
|
480
480
|
if (l === void 0) return;
|
|
481
481
|
let y = s.get(a.baseKey);
|
|
482
482
|
y || (y = {}, s.set(a.baseKey, y)), a.type === "index" ? y.index = l : y.values = l;
|
|
@@ -494,16 +494,16 @@ function oe(n, e = []) {
|
|
|
494
494
|
}
|
|
495
495
|
return {
|
|
496
496
|
type: "BinaryPartitioned",
|
|
497
|
-
partitionKeyLength:
|
|
497
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
498
498
|
parts: i
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
501
|
case Y: {
|
|
502
|
-
if (typeof (
|
|
502
|
+
if (typeof (n == null ? void 0 : n.superPartitionKeyLength) != "number" || typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
|
|
503
503
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
|
|
504
|
-
const i =
|
|
505
|
-
for (const o of
|
|
506
|
-
const a =
|
|
504
|
+
const i = n.superPartitionKeyLength + n.partitionKeyLength, s = [];
|
|
505
|
+
for (const o of r.listInputFields()) {
|
|
506
|
+
const a = r.resolve({ field: o, assertFieldType: "Input" });
|
|
507
507
|
if (a === void 0) return;
|
|
508
508
|
if (a.resourceType.name !== U)
|
|
509
509
|
throw new Error(`Expected ${U} inside ${t}, but got ${a.resourceType.name}`);
|
|
@@ -520,14 +520,14 @@ function oe(n, e = []) {
|
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
522
|
case M: {
|
|
523
|
-
if (typeof (
|
|
523
|
+
if (typeof (n == null ? void 0 : n.superPartitionKeyLength) != "number" || typeof (n == null ? void 0 : n.partitionKeyLength) != "number")
|
|
524
524
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
|
|
525
|
-
const i =
|
|
526
|
-
for (const o of
|
|
527
|
-
const a =
|
|
525
|
+
const i = n.superPartitionKeyLength + n.partitionKeyLength, s = [];
|
|
526
|
+
for (const o of r.listInputFields()) {
|
|
527
|
+
const a = r.resolve({ field: o, assertFieldType: "Input" });
|
|
528
528
|
if (a === void 0) return;
|
|
529
|
-
if (a.resourceType.name !==
|
|
530
|
-
throw new Error(`Expected ${
|
|
529
|
+
if (a.resourceType.name !== j)
|
|
530
|
+
throw new Error(`Expected ${j} inside ${t}, but got ${a.resourceType.name}`);
|
|
531
531
|
const l = oe(a, JSON.parse(o));
|
|
532
532
|
if (l === void 0) return;
|
|
533
533
|
if (l.type !== "BinaryPartitioned")
|
|
@@ -544,28 +544,28 @@ function oe(n, e = []) {
|
|
|
544
544
|
throw new Error(`Unknown resource type: ${t}`);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function
|
|
548
|
-
if (
|
|
549
|
-
if (_e(
|
|
550
|
-
if (ae(
|
|
551
|
-
if (
|
|
552
|
-
throw new Error(`Unexpected input type: ${typeof
|
|
547
|
+
function nt(r) {
|
|
548
|
+
if (r !== void 0) {
|
|
549
|
+
if (_e(r)) return r;
|
|
550
|
+
if (ae(r)) return $e(r);
|
|
551
|
+
if (r instanceof I) return oe(r);
|
|
552
|
+
throw new Error(`Unexpected input type: ${typeof r}`);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function rt(r, e) {
|
|
556
556
|
const t = [...e].sort((s, o) => o[0] - s[0]);
|
|
557
|
-
if (
|
|
558
|
-
const { partitionKeyLength: s } =
|
|
557
|
+
if (r.type === "JsonPartitioned" || r.type === "BinaryPartitioned") {
|
|
558
|
+
const { partitionKeyLength: s } = r;
|
|
559
559
|
for (const [o] of e)
|
|
560
560
|
if (o >= s)
|
|
561
561
|
throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s}`);
|
|
562
|
-
} else if (
|
|
563
|
-
const { keyLength: s } =
|
|
562
|
+
} else if (r.type === "Json") {
|
|
563
|
+
const { keyLength: s } = r;
|
|
564
564
|
for (const [o] of e)
|
|
565
565
|
if (o >= s)
|
|
566
566
|
throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s}`);
|
|
567
567
|
}
|
|
568
|
-
const
|
|
568
|
+
const n = (s) => {
|
|
569
569
|
for (const [o, a] of t)
|
|
570
570
|
if (s[o] !== a)
|
|
571
571
|
return !1;
|
|
@@ -576,46 +576,46 @@ function nt(n, e) {
|
|
|
576
576
|
o.splice(a, 1);
|
|
577
577
|
return o;
|
|
578
578
|
};
|
|
579
|
-
switch (
|
|
579
|
+
switch (r.type) {
|
|
580
580
|
case "Json": {
|
|
581
|
-
const s =
|
|
581
|
+
const s = r.data.filter((o) => n(o.key)).map((o) => ({
|
|
582
582
|
key: i(o.key),
|
|
583
583
|
value: o.value
|
|
584
584
|
}));
|
|
585
585
|
return {
|
|
586
586
|
type: "Json",
|
|
587
|
-
keyLength:
|
|
587
|
+
keyLength: r.keyLength - e.length,
|
|
588
588
|
data: s
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
case "JsonPartitioned": {
|
|
592
|
-
const s =
|
|
592
|
+
const s = r.parts.filter((o) => n(o.key)).map((o) => ({
|
|
593
593
|
key: i(o.key),
|
|
594
594
|
value: o.value
|
|
595
595
|
}));
|
|
596
596
|
return {
|
|
597
597
|
type: "JsonPartitioned",
|
|
598
|
-
partitionKeyLength:
|
|
598
|
+
partitionKeyLength: r.partitionKeyLength - e.length,
|
|
599
599
|
parts: s
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
602
|
case "BinaryPartitioned": {
|
|
603
|
-
const s =
|
|
603
|
+
const s = r.parts.filter((o) => n(o.key)).map((o) => ({
|
|
604
604
|
key: i(o.key),
|
|
605
605
|
value: o.value
|
|
606
606
|
}));
|
|
607
607
|
return {
|
|
608
608
|
type: "BinaryPartitioned",
|
|
609
|
-
partitionKeyLength:
|
|
609
|
+
partitionKeyLength: r.partitionKeyLength - e.length,
|
|
610
610
|
parts: s
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function it(
|
|
616
|
-
if (!Array.isArray(
|
|
617
|
-
if (
|
|
618
|
-
const e =
|
|
615
|
+
function it(r) {
|
|
616
|
+
if (!Array.isArray(r)) return !1;
|
|
617
|
+
if (r.length === 0) return !0;
|
|
618
|
+
const e = r[0];
|
|
619
619
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
620
620
|
}
|
|
621
621
|
class st {
|
|
@@ -624,39 +624,39 @@ class st {
|
|
|
624
624
|
}
|
|
625
625
|
selectColumns(e) {
|
|
626
626
|
const t = typeof e == "function" ? e : W(e);
|
|
627
|
-
return this.columns.filter((
|
|
627
|
+
return this.columns.filter((n) => t(n.spec));
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function ot(
|
|
631
|
-
if (
|
|
632
|
-
return
|
|
630
|
+
function ot(r) {
|
|
631
|
+
if (r)
|
|
632
|
+
return r.map((e) => ({
|
|
633
633
|
type: `split:${Ke(e.axisId)}`,
|
|
634
634
|
label: e.label,
|
|
635
635
|
importance: 1e6
|
|
636
636
|
// High importance for split filters in labels
|
|
637
637
|
}));
|
|
638
638
|
}
|
|
639
|
-
function at(
|
|
640
|
-
if (
|
|
641
|
-
return
|
|
639
|
+
function at(r) {
|
|
640
|
+
if (r)
|
|
641
|
+
return r.map((e) => [e.axisIdx, e.value]);
|
|
642
642
|
}
|
|
643
|
-
function lt(
|
|
644
|
-
if (!e || e.length === 0) return
|
|
645
|
-
const t = [...e].sort((
|
|
646
|
-
return we({ id:
|
|
643
|
+
function lt(r, e) {
|
|
644
|
+
if (!e || e.length === 0) return r;
|
|
645
|
+
const t = [...e].sort((n, i) => n[0] - i[0]);
|
|
646
|
+
return we({ id: r, axisFilters: t });
|
|
647
647
|
}
|
|
648
|
-
function ge(
|
|
649
|
-
if (!
|
|
650
|
-
const e =
|
|
651
|
-
return !!e.domainAnchor || t ||
|
|
648
|
+
function ge(r) {
|
|
649
|
+
if (!r || typeof r != "object") return !1;
|
|
650
|
+
const e = r, t = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), n = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
651
|
+
return !!e.domainAnchor || t || n;
|
|
652
652
|
}
|
|
653
|
-
function ut(
|
|
654
|
-
if (typeof
|
|
653
|
+
function ut(r) {
|
|
654
|
+
if (typeof r != "object" || !("axes" in r) || r.axes === void 0)
|
|
655
655
|
return [];
|
|
656
|
-
const e =
|
|
657
|
-
if (e.length > 0 &&
|
|
656
|
+
const e = r.axes.map((t, n) => typeof t == "object" && "split" in t && t.split === !0 ? n : -1).filter((t) => t !== -1);
|
|
657
|
+
if (e.length > 0 && r.partialAxesMatch !== void 0)
|
|
658
658
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
659
|
-
return e.sort((t,
|
|
659
|
+
return e.sort((t, n) => t - n), e;
|
|
660
660
|
}
|
|
661
661
|
class me {
|
|
662
662
|
constructor() {
|
|
@@ -677,12 +677,12 @@ class me {
|
|
|
677
677
|
/** Fetches labels for a given axis from the registered providers */
|
|
678
678
|
findLabels(e) {
|
|
679
679
|
for (const t of this.axisLabelProviders) {
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
680
|
+
const n = t.findLabels(e);
|
|
681
|
+
if (n) return n;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
getUniversalEntries(e, t) {
|
|
685
|
-
const { anchorCtx:
|
|
685
|
+
const { anchorCtx: n, labelOps: i, dontWaitAllData: s = !1, overrideLabelAnnotation: o = !1, exclude: a } = t ?? {}, l = {
|
|
686
686
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
687
687
|
...i ?? {}
|
|
688
688
|
};
|
|
@@ -690,22 +690,22 @@ class me {
|
|
|
690
690
|
if (a) {
|
|
691
691
|
const u = (Array.isArray(a) ? a : [a]).map((h) => {
|
|
692
692
|
if (ge(h)) {
|
|
693
|
-
if (!
|
|
693
|
+
if (!n)
|
|
694
694
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
695
|
-
return W(pe(
|
|
695
|
+
return W(pe(n.anchors, h, t));
|
|
696
696
|
} else
|
|
697
697
|
return W(h);
|
|
698
698
|
});
|
|
699
699
|
y = (h) => u.some((v) => v(h));
|
|
700
700
|
}
|
|
701
|
-
const
|
|
702
|
-
for (const u of
|
|
701
|
+
const N = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], E = [], F = /* @__PURE__ */ new Set();
|
|
702
|
+
for (const u of N) {
|
|
703
703
|
const h = ge(u);
|
|
704
704
|
let v;
|
|
705
705
|
if (h) {
|
|
706
|
-
if (!
|
|
706
|
+
if (!n)
|
|
707
707
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
708
|
-
v = pe(
|
|
708
|
+
v = pe(n.anchors, u, t);
|
|
709
709
|
} else
|
|
710
710
|
v = u;
|
|
711
711
|
const C = /* @__PURE__ */ new Set(), L = [];
|
|
@@ -727,7 +727,7 @@ class me {
|
|
|
727
727
|
if (A) {
|
|
728
728
|
if (it(d.data))
|
|
729
729
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${d.id}`);
|
|
730
|
-
const m =
|
|
730
|
+
const m = nt(d.data);
|
|
731
731
|
if (!m) {
|
|
732
732
|
if (s) continue;
|
|
733
733
|
return;
|
|
@@ -795,7 +795,7 @@ class me {
|
|
|
795
795
|
for (const { value: u, label: h } of f) {
|
|
796
796
|
const { originalColumn: v, spec: C } = u, L = u.type === "split" ? u.axisFilters : void 0, p = at(L);
|
|
797
797
|
let A;
|
|
798
|
-
|
|
798
|
+
n ? A = n.deriveS(C, p) : A = lt(v.id, p);
|
|
799
799
|
let d = { ...u.adjustedSpec };
|
|
800
800
|
o && (d = {
|
|
801
801
|
...d,
|
|
@@ -806,21 +806,21 @@ class me {
|
|
|
806
806
|
}), P.push({
|
|
807
807
|
id: A,
|
|
808
808
|
spec: d,
|
|
809
|
-
data: () => u.type === "split" ? De(
|
|
809
|
+
data: () => u.type === "split" ? De(rt(u.dataEntries, p)) : u.originalColumn.data,
|
|
810
810
|
label: h
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
813
|
return P;
|
|
814
814
|
}
|
|
815
815
|
getColumns(e, t) {
|
|
816
|
-
const
|
|
816
|
+
const n = this.getUniversalEntries(e, {
|
|
817
817
|
overrideLabelAnnotation: !0,
|
|
818
818
|
// default for getColumns
|
|
819
819
|
...t ?? {}
|
|
820
820
|
});
|
|
821
|
-
if (!
|
|
821
|
+
if (!n) return;
|
|
822
822
|
const i = [];
|
|
823
|
-
for (const s of
|
|
823
|
+
for (const s of n) {
|
|
824
824
|
const o = s.data();
|
|
825
825
|
if (!o) {
|
|
826
826
|
if (t != null && t.dontWaitAllData) continue;
|
|
@@ -835,7 +835,7 @@ class me {
|
|
|
835
835
|
return i;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
function ye(
|
|
838
|
+
function ye(r) {
|
|
839
839
|
const e = (i) => i.operator !== "InSet" ? i : {
|
|
840
840
|
operator: "Or",
|
|
841
841
|
operands: i.references.map((s) => ({
|
|
@@ -862,21 +862,21 @@ function ye(n) {
|
|
|
862
862
|
default:
|
|
863
863
|
return s(i);
|
|
864
864
|
}
|
|
865
|
-
},
|
|
865
|
+
}, n = (i, s) => ({
|
|
866
866
|
...i,
|
|
867
867
|
predicate: t(i.predicate, s)
|
|
868
868
|
});
|
|
869
|
-
return
|
|
869
|
+
return r.map((i) => n(i, e));
|
|
870
870
|
}
|
|
871
|
-
function X(
|
|
872
|
-
if (
|
|
871
|
+
function X(r, e) {
|
|
872
|
+
if (r === void 0) return e === void 0;
|
|
873
873
|
if (e === void 0) return !0;
|
|
874
874
|
for (const t in e)
|
|
875
|
-
if (
|
|
875
|
+
if (r[t] !== e[t]) return !1;
|
|
876
876
|
return !0;
|
|
877
877
|
}
|
|
878
|
-
function ve(
|
|
879
|
-
return le(
|
|
878
|
+
function ve(r) {
|
|
879
|
+
return le(r, (e) => e instanceof I ? e.handle : ae(e) ? je(e, (t) => t.handle) : e);
|
|
880
880
|
}
|
|
881
881
|
class ct {
|
|
882
882
|
constructor() {
|
|
@@ -889,7 +889,7 @@ class ct {
|
|
|
889
889
|
return this.ctx.calculateOptions(e);
|
|
890
890
|
}
|
|
891
891
|
getOptions(e, t) {
|
|
892
|
-
const
|
|
892
|
+
const n = typeof e == "function" ? e : W(e), i = this.getSpecs().entries.filter((a) => n(a.obj));
|
|
893
893
|
let s = {}, o = !1;
|
|
894
894
|
return typeof t < "u" && (typeof t == "function" ? s = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? s = t : (t = t, s = t.label ?? {}, o = t.refsWithEnrichments ?? !1))), typeof s == "object" ? Pe(i, (a) => a.obj, s ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
895
895
|
ref: ce(a, o),
|
|
@@ -902,14 +902,14 @@ class ct {
|
|
|
902
902
|
resolveAnchorCtx(e) {
|
|
903
903
|
if (e instanceof he) return e;
|
|
904
904
|
const t = {};
|
|
905
|
-
for (const [
|
|
905
|
+
for (const [n, i] of Object.entries(e))
|
|
906
906
|
if (Te(i)) {
|
|
907
907
|
const s = this.getPColumnSpecByRef(i);
|
|
908
908
|
if (!s)
|
|
909
909
|
return;
|
|
910
|
-
t[
|
|
910
|
+
t[n] = s;
|
|
911
911
|
} else
|
|
912
|
-
t[
|
|
912
|
+
t[n] = i;
|
|
913
913
|
return new he(t);
|
|
914
914
|
}
|
|
915
915
|
/**
|
|
@@ -920,11 +920,11 @@ class ct {
|
|
|
920
920
|
* @param opts - Optional configuration for label generation and data waiting
|
|
921
921
|
* @returns A PFrameHandle for the created PFrame, or undefined if any required data is missing
|
|
922
922
|
*/
|
|
923
|
-
getAnchoredPColumns(e, t,
|
|
923
|
+
getAnchoredPColumns(e, t, n) {
|
|
924
924
|
const i = this.resolveAnchorCtx(e);
|
|
925
925
|
if (i)
|
|
926
926
|
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t, {
|
|
927
|
-
...
|
|
927
|
+
...n,
|
|
928
928
|
anchorCtx: i
|
|
929
929
|
});
|
|
930
930
|
}
|
|
@@ -957,11 +957,11 @@ class ct {
|
|
|
957
957
|
* @returns An array of objects with `label` (display text) and `value` (anchored ID string) properties,
|
|
958
958
|
* or undefined if any PlRef resolution fails.
|
|
959
959
|
*/
|
|
960
|
-
getCanonicalOptions(e, t,
|
|
960
|
+
getCanonicalOptions(e, t, n) {
|
|
961
961
|
const i = this.resolveAnchorCtx(e);
|
|
962
962
|
if (!i) return;
|
|
963
963
|
const s = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t, {
|
|
964
|
-
...
|
|
964
|
+
...n,
|
|
965
965
|
anchorCtx: i
|
|
966
966
|
});
|
|
967
967
|
if (s)
|
|
@@ -1005,7 +1005,7 @@ class ct {
|
|
|
1005
1005
|
...t.obj,
|
|
1006
1006
|
data: Fe(
|
|
1007
1007
|
t.obj.data,
|
|
1008
|
-
(
|
|
1008
|
+
(n) => new I(n, [t.ref.blockId, t.ref.name])
|
|
1009
1009
|
)
|
|
1010
1010
|
}
|
|
1011
1011
|
}))
|
|
@@ -1030,10 +1030,10 @@ class ct {
|
|
|
1030
1030
|
return (t = this.getData().entries.find(
|
|
1031
1031
|
(i) => i.ref.blockId === e.blockId && i.ref.name === e.name
|
|
1032
1032
|
)) == null ? void 0 : t.obj;
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1033
|
+
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1034
|
+
if (n)
|
|
1035
1035
|
return le(
|
|
1036
|
-
|
|
1036
|
+
n,
|
|
1037
1037
|
(i) => new I(i, [e.blockId, e.name])
|
|
1038
1038
|
);
|
|
1039
1039
|
}
|
|
@@ -1073,17 +1073,17 @@ class ct {
|
|
|
1073
1073
|
*/
|
|
1074
1074
|
findDataWithCompatibleSpec(e) {
|
|
1075
1075
|
const t = [];
|
|
1076
|
-
e: for (const
|
|
1077
|
-
if (!G(
|
|
1076
|
+
e: for (const n of this.getData().entries) {
|
|
1077
|
+
if (!G(n.obj.spec))
|
|
1078
1078
|
continue;
|
|
1079
|
-
const i =
|
|
1079
|
+
const i = n.obj.spec;
|
|
1080
1080
|
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && X(e.domain, i.domain)) {
|
|
1081
1081
|
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
1082
1082
|
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
1083
1083
|
if (o.name !== a.name || o.type !== a.type || !X(o.domain, a.domain))
|
|
1084
1084
|
continue e;
|
|
1085
1085
|
}
|
|
1086
|
-
t.push(
|
|
1086
|
+
t.push(n.obj);
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
1089
|
return t;
|
|
@@ -1094,15 +1094,15 @@ class ct {
|
|
|
1094
1094
|
*/
|
|
1095
1095
|
findLabels(e) {
|
|
1096
1096
|
const t = this.getData();
|
|
1097
|
-
for (const
|
|
1098
|
-
if (!be(
|
|
1099
|
-
const i =
|
|
1097
|
+
for (const n of t.entries) {
|
|
1098
|
+
if (!be(n.obj)) continue;
|
|
1099
|
+
const i = n.obj.spec;
|
|
1100
1100
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && X(e.domain, i.axesSpec[0].domain)) {
|
|
1101
|
-
if (
|
|
1102
|
-
throw Error(`Expected JSON column for labels, got: ${
|
|
1101
|
+
if (n.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1102
|
+
throw Error(`Expected JSON column for labels, got: ${n.obj.data.resourceType.name}`);
|
|
1103
1103
|
return Object.fromEntries(
|
|
1104
1104
|
Object.entries(
|
|
1105
|
-
|
|
1105
|
+
n.obj.data.getDataAsJson().data
|
|
1106
1106
|
).map((s) => [JSON.parse(s[0])[0], s[1]])
|
|
1107
1107
|
);
|
|
1108
1108
|
}
|
|
@@ -1117,16 +1117,16 @@ class ct {
|
|
|
1117
1117
|
*/
|
|
1118
1118
|
selectColumns(e) {
|
|
1119
1119
|
const t = typeof e == "function" ? e : W(e);
|
|
1120
|
-
return this.getSpecs().entries.filter(({ obj:
|
|
1120
|
+
return this.getSpecs().entries.filter(({ obj: n }) => G(n) ? t(n) : !1).map(({ ref: n, obj: i }) => {
|
|
1121
1121
|
const s = i;
|
|
1122
1122
|
let o = null;
|
|
1123
1123
|
const a = this;
|
|
1124
1124
|
return {
|
|
1125
|
-
id: we(
|
|
1125
|
+
id: we(n),
|
|
1126
1126
|
spec: s,
|
|
1127
1127
|
get data() {
|
|
1128
1128
|
var l;
|
|
1129
|
-
return o !== null || (o = (l = a.getPColumnByRef(
|
|
1129
|
+
return o !== null || (o = (l = a.getPColumnByRef(n)) == null ? void 0 : l.data), o;
|
|
1130
1130
|
}
|
|
1131
1131
|
};
|
|
1132
1132
|
});
|
|
@@ -1136,10 +1136,10 @@ class ct {
|
|
|
1136
1136
|
* @returns a map of axis value => label
|
|
1137
1137
|
*/
|
|
1138
1138
|
findLabelsForColumnAxis(e, t) {
|
|
1139
|
-
var
|
|
1139
|
+
var n;
|
|
1140
1140
|
const i = this.findLabels(e.axesSpec[t]);
|
|
1141
1141
|
if (!i) return;
|
|
1142
|
-
const s = (
|
|
1142
|
+
const s = (n = e.annotations) == null ? void 0 : n["pl7.app/axisKeys/" + t];
|
|
1143
1143
|
if (s !== void 0) {
|
|
1144
1144
|
const o = JSON.parse(s);
|
|
1145
1145
|
return Object.fromEntries(o.map((a) => [a, i[a] ?? "Unlabelled"]));
|
|
@@ -1183,7 +1183,7 @@ class z {
|
|
|
1183
1183
|
// return this.ctx.featureFlags;
|
|
1184
1184
|
// }
|
|
1185
1185
|
getNamedAccessor(e) {
|
|
1186
|
-
return
|
|
1186
|
+
return ne(
|
|
1187
1187
|
this.ctx.getAccessorHandleByName(e),
|
|
1188
1188
|
(t) => new I(t, [e])
|
|
1189
1189
|
);
|
|
@@ -1204,16 +1204,16 @@ class z {
|
|
|
1204
1204
|
}
|
|
1205
1205
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1206
1206
|
var t;
|
|
1207
|
-
const
|
|
1208
|
-
if (
|
|
1207
|
+
const n = e.some((s) => !(s.data instanceof I) || ae(s.data)), i = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
|
|
1208
|
+
if (n && !i) throw Error("Inline or explicit columns not supported");
|
|
1209
1209
|
}
|
|
1210
1210
|
patchPTableDef(e) {
|
|
1211
|
-
var t,
|
|
1211
|
+
var t, n;
|
|
1212
1212
|
return (t = this.ctx.featureFlags) != null && t.pTablePartitionFiltersSupport || (e = {
|
|
1213
1213
|
...e,
|
|
1214
1214
|
partitionFilters: [],
|
|
1215
1215
|
filters: [...e.partitionFilters, ...e.filters]
|
|
1216
|
-
}), (
|
|
1216
|
+
}), (n = this.ctx.featureFlags) != null && n.pFrameInSetFilterSupport || (e = {
|
|
1217
1217
|
...e,
|
|
1218
1218
|
partitionFilters: ye(e.partitionFilters),
|
|
1219
1219
|
filters: ye(e.filters)
|
|
@@ -1230,13 +1230,13 @@ class z {
|
|
|
1230
1230
|
return "columns" in e ? t = this.patchPTableDef({
|
|
1231
1231
|
src: {
|
|
1232
1232
|
type: "full",
|
|
1233
|
-
entries: e.columns.map((
|
|
1233
|
+
entries: e.columns.map((n) => ({ type: "column", column: n }))
|
|
1234
1234
|
},
|
|
1235
1235
|
partitionFilters: e.filters ?? [],
|
|
1236
1236
|
filters: [],
|
|
1237
1237
|
sorting: e.sorting ?? []
|
|
1238
1238
|
}) : t = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(Le(t.src)), this.ctx.createPTable(
|
|
1239
|
-
Ee(t, (
|
|
1239
|
+
Ee(t, (n) => ve(n))
|
|
1240
1240
|
);
|
|
1241
1241
|
}
|
|
1242
1242
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -1257,16 +1257,16 @@ class z {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
const ee = "1.39.8";
|
|
1260
|
-
function ht(
|
|
1261
|
-
return
|
|
1260
|
+
function ht(r) {
|
|
1261
|
+
return r.__renderLambda === !0;
|
|
1262
1262
|
}
|
|
1263
|
-
function te(
|
|
1264
|
-
if (
|
|
1265
|
-
return ht(
|
|
1263
|
+
function te(r) {
|
|
1264
|
+
if (r !== void 0)
|
|
1265
|
+
return ht(r) ? r.handle : r;
|
|
1266
1266
|
}
|
|
1267
1267
|
const pt = class _ {
|
|
1268
|
-
constructor(e, t,
|
|
1269
|
-
this._renderingMode = e, this._initialArgs = t, this._initialUiState =
|
|
1268
|
+
constructor(e, t, n, i, s, o, a, l, y) {
|
|
1269
|
+
this._renderingMode = e, this._initialArgs = t, this._initialUiState = n, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a, this._enrichmentTargets = l, this._featureFlags = y;
|
|
1270
1270
|
}
|
|
1271
1271
|
static create(e = "Heavy") {
|
|
1272
1272
|
return new _(
|
|
@@ -1281,7 +1281,7 @@ const pt = class _ {
|
|
|
1281
1281
|
{ ..._.INITIAL_BLOCK_FEATURE_FLAGS }
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
|
-
output(e, t,
|
|
1284
|
+
output(e, t, n = {}) {
|
|
1285
1285
|
if (typeof t == "function") {
|
|
1286
1286
|
const i = `output#${e}`;
|
|
1287
1287
|
return V(i, () => t(new z())), new _(
|
|
@@ -1293,7 +1293,7 @@ const pt = class _ {
|
|
|
1293
1293
|
[e]: {
|
|
1294
1294
|
__renderLambda: !0,
|
|
1295
1295
|
handle: i,
|
|
1296
|
-
...
|
|
1296
|
+
...n
|
|
1297
1297
|
}
|
|
1298
1298
|
},
|
|
1299
1299
|
this._inputsValid,
|
|
@@ -1472,7 +1472,7 @@ const pt = class _ {
|
|
|
1472
1472
|
inputsValid: te(this._inputsValid),
|
|
1473
1473
|
sections: te(this._sections),
|
|
1474
1474
|
outputs: Object.fromEntries(
|
|
1475
|
-
Object.entries(this._outputs).map(([t,
|
|
1475
|
+
Object.entries(this._outputs).map(([t, n]) => [t, te(n)])
|
|
1476
1476
|
)
|
|
1477
1477
|
};
|
|
1478
1478
|
return Je() ? Ve({ sdkVersion: ee }) : { config: e };
|
|
@@ -1483,33 +1483,34 @@ S(pt, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
|
1483
1483
|
requiresUIAPIVersion: 1,
|
|
1484
1484
|
requiresModelAPIVersion: 1
|
|
1485
1485
|
});
|
|
1486
|
-
function mt(
|
|
1487
|
-
return
|
|
1486
|
+
function mt(r) {
|
|
1487
|
+
return r.axesSpec.length === 1 && r.name === "pl7.app/label";
|
|
1488
1488
|
}
|
|
1489
1489
|
export {
|
|
1490
1490
|
he as AnchoredIdDeriver,
|
|
1491
|
-
|
|
1492
|
-
|
|
1491
|
+
Lt as BasePlErrorLike,
|
|
1492
|
+
Et as ErrorLike,
|
|
1493
1493
|
w as FutureRef,
|
|
1494
1494
|
He as PAnnotationLabel,
|
|
1495
1495
|
ze as PAnnotationTrace,
|
|
1496
1496
|
me as PColumnCollection,
|
|
1497
|
-
|
|
1497
|
+
Tt as PlErrorLike,
|
|
1498
1498
|
bt as PlIdLength,
|
|
1499
|
-
|
|
1499
|
+
j as RT_BINARY_PARTITIONED,
|
|
1500
1500
|
M as RT_BINARY_SUPER_PARTITIONED,
|
|
1501
1501
|
U as RT_JSON_PARTITIONED,
|
|
1502
1502
|
Y as RT_JSON_SUPER_PARTITIONED,
|
|
1503
|
-
|
|
1503
|
+
re as RT_RESOURCE_MAP,
|
|
1504
1504
|
ie as RT_RESOURCE_MAP_PARTITIONED,
|
|
1505
1505
|
z as RenderCtx,
|
|
1506
1506
|
ct as ResultPool,
|
|
1507
|
-
|
|
1507
|
+
Ft as StandardErrorLike,
|
|
1508
1508
|
Ye as Trace,
|
|
1509
1509
|
Ge as TraceEntry,
|
|
1510
1510
|
I as TreeNodeAccessor,
|
|
1511
1511
|
Ke as canonicalizeAxisId,
|
|
1512
|
-
|
|
1512
|
+
_t as canonicalizeJson,
|
|
1513
|
+
nt as convertOrParsePColumnData,
|
|
1513
1514
|
$e as dataInfoToEntries,
|
|
1514
1515
|
Pe as deriveLabels,
|
|
1515
1516
|
ke as deriveNativeId,
|
|
@@ -1517,13 +1518,13 @@ export {
|
|
|
1517
1518
|
Oe as ensurePColumn,
|
|
1518
1519
|
De as entriesToDataInfo,
|
|
1519
1520
|
Le as extractAllColumns,
|
|
1520
|
-
|
|
1521
|
-
|
|
1521
|
+
rt as filterDataInfoEntries,
|
|
1522
|
+
wt as getAxesId,
|
|
1522
1523
|
de as getAxisId,
|
|
1523
1524
|
Z as getImmediate,
|
|
1524
1525
|
Xe as getPartitionKeysList,
|
|
1525
1526
|
tt as getUniquePartitionKeys,
|
|
1526
|
-
|
|
1527
|
+
ne as ifDef,
|
|
1527
1528
|
ht as isConfigLambda,
|
|
1528
1529
|
ae as isDataInfo,
|
|
1529
1530
|
_e as isDataInfoEntries,
|
|
@@ -1532,18 +1533,18 @@ export {
|
|
|
1532
1533
|
G as isPColumnSpec,
|
|
1533
1534
|
Re as isPartitionedDataInfoEntries,
|
|
1534
1535
|
Te as isPlRef,
|
|
1535
|
-
|
|
1536
|
-
|
|
1536
|
+
je as mapDataInfo,
|
|
1537
|
+
Pt as mapJoinEntry,
|
|
1537
1538
|
le as mapPObjectData,
|
|
1538
1539
|
Ee as mapPTableDef,
|
|
1539
1540
|
Fe as mapValueInVOE,
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1541
|
+
At as matchAxis,
|
|
1542
|
+
xt as matchAxisId,
|
|
1543
|
+
St as matchPColumn,
|
|
1543
1544
|
oe as parsePColumnData,
|
|
1544
1545
|
pe as resolveAnchors,
|
|
1545
1546
|
W as selectorsToPredicate,
|
|
1546
|
-
|
|
1547
|
+
It as stringifyColumnId,
|
|
1547
1548
|
ce as withEnrichments
|
|
1548
1549
|
};
|
|
1549
1550
|
//# sourceMappingURL=index.js.map
|