@platforma-sdk/ui-vue 1.42.10 → 1.42.15
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/.turbo/turbo-build.log +23 -23
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/components/PlAgDataTable/sources/table-source-v2.js +4 -4
- package/dist/components/PlAgDataTable/sources/table-state-v2.js +6 -6
- package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +12 -12
- package/dist/components/PlMultiSequenceAlignment/data.js +5 -5
- package/dist/lib/model/common/dist/index.js +194 -171
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAutocomplete/PlAutocomplete.vue.js +22 -22
- package/dist/lib/ui/uikit/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdown/OptionList.vue.js +2 -2
- package/dist/lib/ui/uikit/dist/components/PlDropdown/PlDropdown.vue.js +106 -103
- package/dist/lib/ui/uikit/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdownLine/PlDropdownLine.vue.js +81 -77
- package/dist/lib/ui/uikit/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +22 -22
- package/dist/lib/ui/uikit/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdownRef/PlDropdownRef.vue.js +24 -22
- package/dist/lib/ui/uikit/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlFileDialog/Remote.vue.js +8 -8
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js +20 -20
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlTextArea/PlTextArea.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlTextField/PlTextField.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/generated/components/svg/images/{SvgRequired.vue2.js → SvgRequired.vue.js} +1 -1
- package/dist/lib/ui/uikit/dist/generated/components/svg/images/SvgRequired.vue.js.map +1 -0
- package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js +179 -156
- package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +358 -346
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/utils/DropdownOverlay/DropdownOverlay.vue.js +13 -11
- package/dist/lib/ui/uikit/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
- package/dist/plugins/Monetization/MonetizationSidebar.vue.js +4 -4
- package/dist/sdk/model/dist/index.js +256 -244
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
- package/dist/lib/ui/uikit/dist/generated/components/svg/images/SvgRequired.vue2.js.map +0 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { isDataInfo as ae, extractAllColumns as Ee, mapPTableDef as Te, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as he, isPlRef as Fe, mapValueInVOE as
|
|
1
|
+
import { isDataInfo as ae, extractAllColumns as Ee, mapPTableDef as Te, selectorsToPredicate as W, withEnrichments as ce, AnchoredIdDeriver as he, isPlRef as Fe, mapValueInVOE as ke, mapPObjectData as le, ensurePColumn as Oe, isPColumnSpec as z, isPColumn as be, resolveAnchors as pe, deriveNativeId as Re, isPartitionedDataInfoEntries as De, getAxisId as de, entriesToDataInfo as $e, isDataInfoEntries as _e, dataInfoToEntries as Ke, canonicalizeAxisId as je, mapDataInfo as Ne } from "../../../lib/model/common/dist/index.js";
|
|
2
2
|
import { PlIdLength as _t, getAxesId as wt, getFileNameFromHandle as Pt, getFilePathFromHandle as At, isImportFileHandleIndex as xt, isImportFileHandleUpload as It, mapJoinEntry as Lt, matchAxis as St, matchAxisId as Ct, matchPColumn as Et, stringifyColumnId as Tt } from "../../../lib/model/common/dist/index.js";
|
|
3
3
|
import we from "../../../_virtual/canonicalize.js";
|
|
4
4
|
import K from "../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
|
|
5
|
-
import { BasePlErrorLike as
|
|
6
|
-
var Be = Object.defineProperty, Ve = (
|
|
7
|
-
function X(
|
|
8
|
-
return { type: "Immediate", value:
|
|
5
|
+
import { BasePlErrorLike as kt, ErrorLike as Ot, PlErrorLike as Rt, StandardErrorLike as Dt } from "../../../lib/model/pl-error-like/dist/index.js";
|
|
6
|
+
var Be = Object.defineProperty, Ve = (s, e, t) => e in s ? Be(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, I = (s, e, t) => Ve(s, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
+
function X(s) {
|
|
8
|
+
return { type: "Immediate", value: s };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Ue() {
|
|
11
11
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
12
12
|
}
|
|
13
|
-
function Pe(
|
|
14
|
-
if (
|
|
15
|
-
return globalThis.getPlatforma(
|
|
13
|
+
function Pe(s) {
|
|
14
|
+
if (s && typeof globalThis.getPlatforma == "function")
|
|
15
|
+
return globalThis.getPlatforma(s);
|
|
16
16
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
17
17
|
throw new Error("Can't get platforma instance.");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Je() {
|
|
20
20
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
21
21
|
}
|
|
22
22
|
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
|
|
27
|
-
const t =
|
|
26
|
+
function U(s, e) {
|
|
27
|
+
const t = Je();
|
|
28
28
|
if (t === void 0) return !1;
|
|
29
|
-
if (
|
|
30
|
-
return t.callbackRegistry[
|
|
29
|
+
if (s in t.callbackRegistry) throw new Error(`Callback with key ${s} already registered.`);
|
|
30
|
+
return t.callbackRegistry[s] = e, !0;
|
|
31
31
|
}
|
|
32
32
|
const Z = /* @__PURE__ */ new Map();
|
|
33
|
-
function Me(
|
|
34
|
-
|
|
35
|
-
for (const r of Z.get(
|
|
33
|
+
function Me(s, e) {
|
|
34
|
+
s in c().callbackRegistry || (c().callbackRegistry[s] = (t) => {
|
|
35
|
+
for (const r of Z.get(s))
|
|
36
36
|
r(t);
|
|
37
|
-
}, Z.set(
|
|
37
|
+
}, Z.set(s, [])), Z.get(s).push(e);
|
|
38
38
|
}
|
|
39
39
|
class w {
|
|
40
40
|
constructor(e, t = (r) => r) {
|
|
@@ -55,8 +55,8 @@ class w {
|
|
|
55
55
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function re(
|
|
59
|
-
return
|
|
58
|
+
function re(s, e) {
|
|
59
|
+
return s === void 0 ? void 0 : e(s);
|
|
60
60
|
}
|
|
61
61
|
class L {
|
|
62
62
|
constructor(e, t) {
|
|
@@ -95,11 +95,11 @@ class L {
|
|
|
95
95
|
resolveWithCommon(e, ...t) {
|
|
96
96
|
const r = [
|
|
97
97
|
...this.resolvePath,
|
|
98
|
-
...t.map((
|
|
98
|
+
...t.map((n) => typeof n == "string" ? n : n.field)
|
|
99
99
|
];
|
|
100
100
|
return re(
|
|
101
101
|
c().resolveWithCommon(this.handle, e, ...t),
|
|
102
|
-
(
|
|
102
|
+
(n) => new L(n, r)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
get resourceType() {
|
|
@@ -160,9 +160,9 @@ class L {
|
|
|
160
160
|
*/
|
|
161
161
|
getPColumns(e = !1, t = "") {
|
|
162
162
|
const r = this.parsePObjectCollection(e, t);
|
|
163
|
-
return r === void 0 ? void 0 : Object.entries(r).map(([,
|
|
164
|
-
if (!be(
|
|
165
|
-
return
|
|
163
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, n]) => {
|
|
164
|
+
if (!be(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
|
|
165
|
+
return n;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
@@ -176,12 +176,12 @@ class L {
|
|
|
176
176
|
...this.resolvePath
|
|
177
177
|
);
|
|
178
178
|
if (r === void 0) return;
|
|
179
|
-
const
|
|
180
|
-
for (const [
|
|
181
|
-
const a = [...this.resolvePath,
|
|
182
|
-
|
|
179
|
+
const n = {};
|
|
180
|
+
for (const [o, i] of Object.entries(r)) {
|
|
181
|
+
const a = [...this.resolvePath, o];
|
|
182
|
+
n[o] = le(i, (l) => new L(l, a));
|
|
183
183
|
}
|
|
184
|
-
return
|
|
184
|
+
return n;
|
|
185
185
|
}
|
|
186
186
|
getFileContentAsBase64(e) {
|
|
187
187
|
return new w(c().getBlobContentAsBase64(this.handle, e));
|
|
@@ -264,18 +264,18 @@ class L {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
mapFields(e, t) {
|
|
267
|
-
const { fieldType: r, requireLocked:
|
|
267
|
+
const { fieldType: r, requireLocked: n, skipUnresolved: o } = {
|
|
268
268
|
fieldType: "Input",
|
|
269
269
|
requireLocked: !0,
|
|
270
270
|
skipUnresolved: !1,
|
|
271
271
|
...t
|
|
272
|
-
},
|
|
273
|
-
if (
|
|
272
|
+
}, i = e;
|
|
273
|
+
if (n && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
274
274
|
return;
|
|
275
275
|
let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
276
276
|
(l) => [l, this.resolve({ field: l, assertFieldType: r })]
|
|
277
277
|
);
|
|
278
|
-
return
|
|
278
|
+
return o && (a = a.filter((l) => l[1] !== void 0)), a.map(([l, y]) => i(l, y));
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
const We = "staging", He = "main", qe = "pl7.app/label", Ge = "pl7.app/trace", ze = K.object({
|
|
@@ -284,8 +284,8 @@ const We = "staging", He = "main", qe = "pl7.app/label", Ge = "pl7.app/trace", z
|
|
|
284
284
|
id: K.string().optional(),
|
|
285
285
|
label: K.string()
|
|
286
286
|
}), Ye = K.array(ze), Qe = 1e-3, Xe = "__LABEL__", fe = "__LABEL__@1";
|
|
287
|
-
function Ae(
|
|
288
|
-
const r = /* @__PURE__ */ new Map(),
|
|
287
|
+
function Ae(s, e, t = {}) {
|
|
288
|
+
const r = /* @__PURE__ */ new Map(), n = t.forceTraceElements !== void 0 && t.forceTraceElements.length > 0 ? new Set(t.forceTraceElements) : void 0, o = /* @__PURE__ */ new Map(), i = s.map((f) => {
|
|
289
289
|
var P, u;
|
|
290
290
|
const h = e(f);
|
|
291
291
|
let v, S, C;
|
|
@@ -301,16 +301,16 @@ function Ae(i, e, t = {}) {
|
|
|
301
301
|
}
|
|
302
302
|
const m = [], T = /* @__PURE__ */ new Map();
|
|
303
303
|
for (let x = g.length - 1; x >= 0; --x) {
|
|
304
|
-
const { type: B } = g[x],
|
|
304
|
+
const { type: B } = g[x], O = g[x].importance ?? 0, D = (T.get(B) ?? 0) + 1;
|
|
305
305
|
T.set(B, D);
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
const k = `${B}@${D}`;
|
|
307
|
+
o.set(k, (o.get(k) ?? 0) + 1), r.set(
|
|
308
|
+
k,
|
|
309
309
|
Math.max(
|
|
310
|
-
r.get(
|
|
311
|
-
|
|
310
|
+
r.get(k) ?? Number.NEGATIVE_INFINITY,
|
|
311
|
+
O - (g.length - x) * Qe
|
|
312
312
|
)
|
|
313
|
-
), m.push({ ...g[x], fullType:
|
|
313
|
+
), m.push({ ...g[x], fullType: k, occurrenceIndex: D });
|
|
314
314
|
}
|
|
315
315
|
return m.reverse(), {
|
|
316
316
|
value: f,
|
|
@@ -321,11 +321,11 @@ function Ae(i, e, t = {}) {
|
|
|
321
321
|
}), a = [], l = [], y = [...r];
|
|
322
322
|
y.sort(([, f], [, P]) => P - f);
|
|
323
323
|
for (const [f] of y)
|
|
324
|
-
f.endsWith("@1") ||
|
|
325
|
-
const
|
|
324
|
+
f.endsWith("@1") || o.get(f) === s.length ? a.push(f) : l.push(f);
|
|
325
|
+
const N = (f, P = !1) => {
|
|
326
326
|
const u = [];
|
|
327
|
-
for (let h = 0; h <
|
|
328
|
-
const v =
|
|
327
|
+
for (let h = 0; h < i.length; h++) {
|
|
328
|
+
const v = i[h], S = v.fullTrace.filter((A) => f.has(A.fullType) || n && n.has(A.type));
|
|
329
329
|
if (S.length === 0)
|
|
330
330
|
if (P)
|
|
331
331
|
u.push({
|
|
@@ -343,7 +343,7 @@ function Ae(i, 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,140 +351,140 @@ function Ae(i, 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 === s.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 H = "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 H = "PColumnData/", ne = H + "ResourceMap", se = H + "Partitioned/ResourceMap", J = H + "JsonPartitioned", j = H + "BinaryPartitioned", xe = H + "Partitioned/", Q = xe + "JsonPartitioned", M = xe + "BinaryPartitioned", ie = (s) => {
|
|
361
|
+
if (s.endsWith(".index"))
|
|
362
|
+
return { baseKey: s.substring(0, s.length - 6), type: "index" };
|
|
363
|
+
if (s.endsWith(".values"))
|
|
364
|
+
return { baseKey: s.substring(0, s.length - 7), type: "values" };
|
|
365
|
+
throw new Error(`key must ends on .index/.values for binary p-column, got: ${s}`);
|
|
366
366
|
};
|
|
367
|
-
function Ze(
|
|
368
|
-
if (!
|
|
369
|
-
const e =
|
|
370
|
-
let
|
|
367
|
+
function Ze(s) {
|
|
368
|
+
if (!s) return;
|
|
369
|
+
const e = s.resourceType.name, t = s.getDataAsJson(), r = [];
|
|
370
|
+
let n = 0;
|
|
371
371
|
switch (e) {
|
|
372
|
-
case
|
|
373
|
-
|
|
372
|
+
case ne:
|
|
373
|
+
n = t.keyLength;
|
|
374
374
|
break;
|
|
375
375
|
case se:
|
|
376
|
-
|
|
376
|
+
n = t.partitionKeyLength + t.keyLength;
|
|
377
377
|
break;
|
|
378
|
-
case
|
|
379
|
-
case
|
|
380
|
-
|
|
378
|
+
case J:
|
|
379
|
+
case j:
|
|
380
|
+
n = t.partitionKeyLength;
|
|
381
381
|
break;
|
|
382
382
|
case M:
|
|
383
383
|
case Q:
|
|
384
|
-
|
|
384
|
+
n = t.superPartitionKeyLength + t.partitionKeyLength;
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
387
|
switch (e) {
|
|
388
|
-
case
|
|
389
|
-
case
|
|
390
|
-
case
|
|
391
|
-
for (let
|
|
392
|
-
e ===
|
|
393
|
-
const
|
|
394
|
-
r.push(
|
|
388
|
+
case ne:
|
|
389
|
+
case J:
|
|
390
|
+
case j:
|
|
391
|
+
for (let o of s.listInputFields()) {
|
|
392
|
+
e === j && (o = ie(o).baseKey);
|
|
393
|
+
const i = [...JSON.parse(o)];
|
|
394
|
+
r.push(i);
|
|
395
395
|
}
|
|
396
396
|
break;
|
|
397
397
|
case se:
|
|
398
398
|
case M:
|
|
399
399
|
case Q:
|
|
400
|
-
for (const
|
|
401
|
-
const
|
|
400
|
+
for (const o of s.listInputFields()) {
|
|
401
|
+
const i = [...JSON.parse(o)], a = s.resolve({ field: o, assertFieldType: "Input" });
|
|
402
402
|
if (a !== void 0)
|
|
403
403
|
for (let l of a.listInputFields()) {
|
|
404
|
-
e === M && (l =
|
|
405
|
-
const y = [...
|
|
404
|
+
e === M && (l = ie(l).baseKey);
|
|
405
|
+
const y = [...i, ...JSON.parse(l)];
|
|
406
406
|
r.push(y);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
|
-
return { data: r, keyLength:
|
|
411
|
+
return { data: r, keyLength: n };
|
|
412
412
|
}
|
|
413
|
-
function et(
|
|
414
|
-
if (
|
|
415
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${
|
|
416
|
-
const { parts: e, partitionKeyLength: t } =
|
|
417
|
-
for (let
|
|
413
|
+
function et(s) {
|
|
414
|
+
if (s.type !== "JsonPartitioned" && s.type !== "BinaryPartitioned")
|
|
415
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${s.type}`);
|
|
416
|
+
const { parts: e, partitionKeyLength: t } = s, r = [];
|
|
417
|
+
for (let n = 0; n < t; ++n)
|
|
418
418
|
r.push(/* @__PURE__ */ new Set());
|
|
419
|
-
for (const
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
419
|
+
for (const n of e) {
|
|
420
|
+
const o = n.key;
|
|
421
|
+
if (o.length !== t)
|
|
422
422
|
throw new Error(
|
|
423
|
-
`Key length (${
|
|
424
|
-
|
|
423
|
+
`Key length (${o.length}) does not match partition length (${t}) for key: ${JSON.stringify(
|
|
424
|
+
o
|
|
425
425
|
)}`
|
|
426
426
|
);
|
|
427
|
-
for (let
|
|
428
|
-
r[
|
|
427
|
+
for (let i = 0; i < t; ++i)
|
|
428
|
+
r[i].add(o[i]);
|
|
429
429
|
}
|
|
430
|
-
return r.map((
|
|
430
|
+
return r.map((n) => Array.from(n.values()));
|
|
431
431
|
}
|
|
432
|
-
function tt(
|
|
433
|
-
if (
|
|
434
|
-
if (_e(
|
|
435
|
-
return et(
|
|
436
|
-
const e = Ze(
|
|
432
|
+
function tt(s) {
|
|
433
|
+
if (s === void 0) return;
|
|
434
|
+
if (_e(s))
|
|
435
|
+
return et(s);
|
|
436
|
+
const e = Ze(s);
|
|
437
437
|
if (!e) return;
|
|
438
|
-
const { data: t, keyLength: r } = e,
|
|
439
|
-
for (let
|
|
440
|
-
|
|
441
|
-
for (const
|
|
442
|
-
if (
|
|
438
|
+
const { data: t, keyLength: r } = e, n = [];
|
|
439
|
+
for (let o = 0; o < r; ++o)
|
|
440
|
+
n.push(/* @__PURE__ */ new Set());
|
|
441
|
+
for (const o of t) {
|
|
442
|
+
if (o.length !== r)
|
|
443
443
|
throw new Error("key length does not match partition length");
|
|
444
|
-
for (let
|
|
445
|
-
|
|
444
|
+
for (let i = 0; i < r; ++i)
|
|
445
|
+
n[i].add(o[i]);
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return n.map((o) => Array.from(o.values()));
|
|
448
448
|
}
|
|
449
|
-
function oe(
|
|
450
|
-
if (
|
|
451
|
-
const t =
|
|
449
|
+
function oe(s, e = []) {
|
|
450
|
+
if (s === void 0 || !s.getIsReadyOrError()) return;
|
|
451
|
+
const t = s.resourceType.name, r = s.getDataAsJson();
|
|
452
452
|
if (e.length > 0 && (t === Q || t === M))
|
|
453
453
|
throw new Error(`Unexpected nested super-partitioned resource: ${t}`);
|
|
454
454
|
switch (t) {
|
|
455
|
-
case
|
|
455
|
+
case ne:
|
|
456
456
|
case se:
|
|
457
457
|
throw new Error(`Only data columns are supported, got: ${t}`);
|
|
458
|
-
case
|
|
458
|
+
case J: {
|
|
459
459
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
460
460
|
throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
|
|
461
|
-
const
|
|
462
|
-
for (const
|
|
463
|
-
const
|
|
464
|
-
if (
|
|
465
|
-
const a = [...e, ...JSON.parse(
|
|
466
|
-
|
|
461
|
+
const n = [];
|
|
462
|
+
for (const o of s.listInputFields()) {
|
|
463
|
+
const i = s.resolve({ field: o, assertFieldType: "Input" });
|
|
464
|
+
if (i === void 0) return;
|
|
465
|
+
const a = [...e, ...JSON.parse(o)];
|
|
466
|
+
n.push({ key: a, value: i });
|
|
467
467
|
}
|
|
468
468
|
return {
|
|
469
469
|
type: "JsonPartitioned",
|
|
470
470
|
partitionKeyLength: r.partitionKeyLength,
|
|
471
|
-
parts:
|
|
471
|
+
parts: n
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
case
|
|
474
|
+
case j: {
|
|
475
475
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
476
476
|
throw new Error(`Missing partitionKeyLength in metadata for ${t}`);
|
|
477
|
-
const
|
|
478
|
-
for (const
|
|
479
|
-
const a =
|
|
477
|
+
const n = [], o = /* @__PURE__ */ new Map();
|
|
478
|
+
for (const i of s.listInputFields()) {
|
|
479
|
+
const a = ie(i), l = s.resolve({ field: i, assertFieldType: "Input" });
|
|
480
480
|
if (l === void 0) return;
|
|
481
|
-
let y =
|
|
482
|
-
y || (y = {},
|
|
481
|
+
let y = o.get(a.baseKey);
|
|
482
|
+
y || (y = {}, o.set(a.baseKey, y)), a.type === "index" ? y.index = l : y.values = l;
|
|
483
483
|
}
|
|
484
|
-
for (const [
|
|
484
|
+
for (const [i, a] of o.entries()) {
|
|
485
485
|
if (!a.index || !a.values) return;
|
|
486
|
-
const l = [...e, ...JSON.parse(
|
|
487
|
-
|
|
486
|
+
const l = [...e, ...JSON.parse(i)];
|
|
487
|
+
n.push({
|
|
488
488
|
key: l,
|
|
489
489
|
value: {
|
|
490
490
|
index: a.index,
|
|
@@ -495,130 +495,142 @@ function oe(i, e = []) {
|
|
|
495
495
|
return {
|
|
496
496
|
type: "BinaryPartitioned",
|
|
497
497
|
partitionKeyLength: r.partitionKeyLength,
|
|
498
|
-
parts:
|
|
498
|
+
parts: n
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
501
|
case Q: {
|
|
502
502
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
503
503
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
|
|
504
|
-
const
|
|
505
|
-
for (const
|
|
506
|
-
const a =
|
|
504
|
+
const n = r.superPartitionKeyLength + r.partitionKeyLength, o = [];
|
|
505
|
+
for (const i of s.listInputFields()) {
|
|
506
|
+
const a = s.resolve({ field: i, assertFieldType: "Input" });
|
|
507
507
|
if (a === void 0) return;
|
|
508
|
-
if (a.resourceType.name !==
|
|
509
|
-
throw new Error(`Expected ${
|
|
510
|
-
const l = oe(a, JSON.parse(
|
|
508
|
+
if (a.resourceType.name !== J)
|
|
509
|
+
throw new Error(`Expected ${J} inside ${t}, but got ${a.resourceType.name}`);
|
|
510
|
+
const l = oe(a, JSON.parse(i));
|
|
511
511
|
if (l === void 0) return;
|
|
512
512
|
if (l.type !== "JsonPartitioned")
|
|
513
513
|
throw new Error(`Unexpected inner result type for ${t}: ${l.type}`);
|
|
514
|
-
|
|
514
|
+
o.push(...l.parts);
|
|
515
515
|
}
|
|
516
516
|
return {
|
|
517
517
|
type: "JsonPartitioned",
|
|
518
|
-
partitionKeyLength:
|
|
519
|
-
parts:
|
|
518
|
+
partitionKeyLength: n,
|
|
519
|
+
parts: o
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
522
|
case M: {
|
|
523
523
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
524
524
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${t}`);
|
|
525
|
-
const
|
|
526
|
-
for (const
|
|
527
|
-
const a =
|
|
525
|
+
const n = r.superPartitionKeyLength + r.partitionKeyLength, o = [];
|
|
526
|
+
for (const i of s.listInputFields()) {
|
|
527
|
+
const a = s.resolve({ field: i, assertFieldType: "Input" });
|
|
528
528
|
if (a === void 0) return;
|
|
529
|
-
if (a.resourceType.name !==
|
|
530
|
-
throw new Error(`Expected ${
|
|
531
|
-
const l = oe(a, JSON.parse(
|
|
529
|
+
if (a.resourceType.name !== j)
|
|
530
|
+
throw new Error(`Expected ${j} inside ${t}, but got ${a.resourceType.name}`);
|
|
531
|
+
const l = oe(a, JSON.parse(i));
|
|
532
532
|
if (l === void 0) return;
|
|
533
533
|
if (l.type !== "BinaryPartitioned")
|
|
534
534
|
throw new Error(`Unexpected inner result type for ${t}: ${l.type}`);
|
|
535
|
-
|
|
535
|
+
o.push(...l.parts);
|
|
536
536
|
}
|
|
537
537
|
return {
|
|
538
538
|
type: "BinaryPartitioned",
|
|
539
|
-
partitionKeyLength:
|
|
540
|
-
parts:
|
|
539
|
+
partitionKeyLength: n,
|
|
540
|
+
parts: o
|
|
541
541
|
};
|
|
542
542
|
}
|
|
543
543
|
default:
|
|
544
544
|
throw new Error(`Unknown resource type: ${t}`);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function rt(
|
|
548
|
-
if (
|
|
549
|
-
if (_e(
|
|
550
|
-
if (ae(
|
|
551
|
-
if (
|
|
552
|
-
throw new Error(`Unexpected input type: ${typeof
|
|
547
|
+
function rt(s) {
|
|
548
|
+
if (s !== void 0) {
|
|
549
|
+
if (_e(s)) return s;
|
|
550
|
+
if (ae(s)) return Ke(s);
|
|
551
|
+
if (s instanceof L) return oe(s);
|
|
552
|
+
throw new Error(`Unexpected input type: ${typeof s}`);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
const t = [...e].sort((
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
555
|
+
function nt(s, e) {
|
|
556
|
+
const t = [...e].sort((i, a) => a[0] - i[0]), { type: r } = s;
|
|
557
|
+
switch (r) {
|
|
558
|
+
case "Json": {
|
|
559
|
+
const { keyLength: i } = s;
|
|
560
|
+
for (const [a] of e)
|
|
561
|
+
if (a >= i)
|
|
562
|
+
throw new Error(`Can't filter on non-data axis ${a}. Must be >= ${i}`);
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
case "JsonPartitioned":
|
|
566
|
+
case "BinaryPartitioned":
|
|
567
|
+
case "ParquetPartitioned": {
|
|
568
|
+
const { partitionKeyLength: i } = s;
|
|
569
|
+
for (const [a] of e)
|
|
570
|
+
if (a >= i)
|
|
571
|
+
throw new Error(`Can't filter on non-partitioned axis ${a}. Must be >= ${i}`);
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
default:
|
|
575
|
+
throw new Error(`Unsupported data info type: ${r}`);
|
|
576
|
+
}
|
|
577
|
+
const n = (i) => {
|
|
578
|
+
for (const [a, l] of t)
|
|
579
|
+
if (i[a] !== l)
|
|
571
580
|
return !1;
|
|
572
581
|
return !0;
|
|
573
|
-
},
|
|
574
|
-
const
|
|
575
|
-
for (const [
|
|
576
|
-
|
|
577
|
-
return
|
|
582
|
+
}, o = (i) => {
|
|
583
|
+
const a = [...i];
|
|
584
|
+
for (const [l] of t)
|
|
585
|
+
a.splice(l, 1);
|
|
586
|
+
return a;
|
|
578
587
|
};
|
|
579
|
-
switch (
|
|
580
|
-
case "Json":
|
|
581
|
-
const n = i.data.filter((o) => r(o.key)).map((o) => ({
|
|
582
|
-
key: s(o.key),
|
|
583
|
-
value: o.value
|
|
584
|
-
}));
|
|
588
|
+
switch (s.type) {
|
|
589
|
+
case "Json":
|
|
585
590
|
return {
|
|
586
591
|
type: "Json",
|
|
587
|
-
keyLength:
|
|
588
|
-
data: n
|
|
592
|
+
keyLength: s.keyLength - e.length,
|
|
593
|
+
data: s.data.filter((i) => n(i.key)).map((i) => ({
|
|
594
|
+
key: o(i.key),
|
|
595
|
+
value: i.value
|
|
596
|
+
}))
|
|
589
597
|
};
|
|
590
|
-
|
|
591
|
-
case "JsonPartitioned": {
|
|
592
|
-
const n = i.parts.filter((o) => r(o.key)).map((o) => ({
|
|
593
|
-
key: s(o.key),
|
|
594
|
-
value: o.value
|
|
595
|
-
}));
|
|
598
|
+
case "JsonPartitioned":
|
|
596
599
|
return {
|
|
597
600
|
type: "JsonPartitioned",
|
|
598
|
-
partitionKeyLength:
|
|
599
|
-
parts: n
|
|
601
|
+
partitionKeyLength: s.partitionKeyLength - e.length,
|
|
602
|
+
parts: s.parts.filter((i) => n(i.key)).map((i) => ({
|
|
603
|
+
key: o(i.key),
|
|
604
|
+
value: i.value
|
|
605
|
+
}))
|
|
600
606
|
};
|
|
601
|
-
|
|
602
|
-
case "BinaryPartitioned": {
|
|
603
|
-
const n = i.parts.filter((o) => r(o.key)).map((o) => ({
|
|
604
|
-
key: s(o.key),
|
|
605
|
-
value: o.value
|
|
606
|
-
}));
|
|
607
|
+
case "BinaryPartitioned":
|
|
607
608
|
return {
|
|
608
609
|
type: "BinaryPartitioned",
|
|
609
|
-
partitionKeyLength:
|
|
610
|
-
parts: n
|
|
610
|
+
partitionKeyLength: s.partitionKeyLength - e.length,
|
|
611
|
+
parts: s.parts.filter((i) => n(i.key)).map((i) => ({
|
|
612
|
+
key: o(i.key),
|
|
613
|
+
value: i.value
|
|
614
|
+
}))
|
|
615
|
+
};
|
|
616
|
+
case "ParquetPartitioned":
|
|
617
|
+
return {
|
|
618
|
+
type: "ParquetPartitioned",
|
|
619
|
+
partitionKeyLength: s.partitionKeyLength - e.length,
|
|
620
|
+
parts: s.parts.filter((i) => n(i.key)).map((i) => ({
|
|
621
|
+
key: o(i.key),
|
|
622
|
+
value: i.value
|
|
623
|
+
}))
|
|
611
624
|
};
|
|
612
|
-
}
|
|
613
625
|
}
|
|
614
626
|
}
|
|
615
|
-
function st(
|
|
616
|
-
if (!Array.isArray(
|
|
617
|
-
if (
|
|
618
|
-
const e =
|
|
627
|
+
function st(s) {
|
|
628
|
+
if (!Array.isArray(s)) return !1;
|
|
629
|
+
if (s.length === 0) return !0;
|
|
630
|
+
const e = s[0];
|
|
619
631
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
620
632
|
}
|
|
621
|
-
class
|
|
633
|
+
class it {
|
|
622
634
|
constructor(e) {
|
|
623
635
|
this.columns = e;
|
|
624
636
|
}
|
|
@@ -627,40 +639,40 @@ class nt {
|
|
|
627
639
|
return this.columns.filter((r) => t(r.spec));
|
|
628
640
|
}
|
|
629
641
|
}
|
|
630
|
-
function ot(
|
|
631
|
-
if (
|
|
632
|
-
return
|
|
633
|
-
type: `split:${
|
|
642
|
+
function ot(s) {
|
|
643
|
+
if (s)
|
|
644
|
+
return s.map((e) => ({
|
|
645
|
+
type: `split:${je(e.axisId)}`,
|
|
634
646
|
label: e.label,
|
|
635
647
|
importance: 1e6
|
|
636
648
|
// High importance for split filters in labels
|
|
637
649
|
}));
|
|
638
650
|
}
|
|
639
|
-
function at(
|
|
640
|
-
if (
|
|
641
|
-
return
|
|
651
|
+
function at(s) {
|
|
652
|
+
if (s)
|
|
653
|
+
return s.map((e) => [e.axisIdx, e.value]);
|
|
642
654
|
}
|
|
643
|
-
function lt(
|
|
644
|
-
if (!e || e.length === 0) return
|
|
645
|
-
const t = [...e].sort((r,
|
|
646
|
-
return we({ id:
|
|
655
|
+
function lt(s, e) {
|
|
656
|
+
if (!e || e.length === 0) return s;
|
|
657
|
+
const t = [...e].sort((r, n) => r[0] - n[0]);
|
|
658
|
+
return we({ id: s, axisFilters: t });
|
|
647
659
|
}
|
|
648
|
-
function ge(
|
|
649
|
-
if (!
|
|
650
|
-
const e =
|
|
660
|
+
function ge(s) {
|
|
661
|
+
if (!s || typeof s != "object") return !1;
|
|
662
|
+
const e = s, t = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((n) => typeof n == "object" && n !== null && "anchor" in n), r = e.axes && Array.isArray(e.axes) && e.axes.some((n) => typeof n == "object" && n !== null && "anchor" in n);
|
|
651
663
|
return !!e.domainAnchor || t || r;
|
|
652
664
|
}
|
|
653
|
-
function ut(
|
|
654
|
-
if (typeof
|
|
665
|
+
function ut(s) {
|
|
666
|
+
if (typeof s != "object" || !("axes" in s) || s.axes === void 0)
|
|
655
667
|
return [];
|
|
656
|
-
const e =
|
|
657
|
-
if (e.length > 0 &&
|
|
668
|
+
const e = s.axes.map((t, r) => typeof t == "object" && "split" in t && t.split === !0 ? r : -1).filter((t) => t !== -1);
|
|
669
|
+
if (e.length > 0 && s.partialAxesMatch !== void 0)
|
|
658
670
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
659
671
|
return e.sort((t, r) => t - r), e;
|
|
660
672
|
}
|
|
661
673
|
class me {
|
|
662
674
|
constructor() {
|
|
663
|
-
I(this, "defaultProviderStore", []), I(this, "providers", [new
|
|
675
|
+
I(this, "defaultProviderStore", []), I(this, "providers", [new it(this.defaultProviderStore)]), I(this, "axisLabelProviders", []);
|
|
664
676
|
}
|
|
665
677
|
addColumnProvider(e) {
|
|
666
678
|
return this.providers.push(e), this;
|
|
@@ -682,9 +694,9 @@ class me {
|
|
|
682
694
|
}
|
|
683
695
|
}
|
|
684
696
|
getUniversalEntries(e, t) {
|
|
685
|
-
const { anchorCtx: r, labelOps:
|
|
686
|
-
...
|
|
687
|
-
...
|
|
697
|
+
const { anchorCtx: r, labelOps: n, dontWaitAllData: o = !1, overrideLabelAnnotation: i = !1, exclude: a } = t ?? {}, l = {
|
|
698
|
+
...i && (n == null ? void 0 : n.includeNativeLabel) !== !1 ? { includeNativeLabel: !0 } : {},
|
|
699
|
+
...n ?? {}
|
|
688
700
|
};
|
|
689
701
|
let y = () => !1;
|
|
690
702
|
if (a) {
|
|
@@ -698,8 +710,8 @@ class me {
|
|
|
698
710
|
});
|
|
699
711
|
y = (h) => u.some((v) => v(h));
|
|
700
712
|
}
|
|
701
|
-
const
|
|
702
|
-
for (const u of
|
|
713
|
+
const N = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], E = [], F = /* @__PURE__ */ new Set();
|
|
714
|
+
for (const u of N) {
|
|
703
715
|
const h = ge(u);
|
|
704
716
|
let v;
|
|
705
717
|
if (h) {
|
|
@@ -729,7 +741,7 @@ class me {
|
|
|
729
741
|
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${d.id}`);
|
|
730
742
|
const m = rt(d.data);
|
|
731
743
|
if (!m) {
|
|
732
|
-
if (
|
|
744
|
+
if (o) continue;
|
|
733
745
|
return;
|
|
734
746
|
}
|
|
735
747
|
if (!De(m))
|
|
@@ -737,9 +749,9 @@ class me {
|
|
|
737
749
|
const T = tt(m), x = p[p.length - 1];
|
|
738
750
|
if (x >= m.partitionKeyLength)
|
|
739
751
|
throw new Error(`Not enough partition keys (${m.partitionKeyLength}) for requested split axes (max index ${x}) in column ${g.name}`);
|
|
740
|
-
const B = p.map((_) => this.findLabels(de(g.axesSpec[_]))),
|
|
752
|
+
const B = p.map((_) => this.findLabels(de(g.axesSpec[_]))), O = [], D = (_, V) => {
|
|
741
753
|
if (V >= p.length) {
|
|
742
|
-
if (
|
|
754
|
+
if (O.push([..._]), O.length > 1e4)
|
|
743
755
|
throw new Error("Too many key combinations, aborting.");
|
|
744
756
|
return;
|
|
745
757
|
}
|
|
@@ -748,19 +760,19 @@ class me {
|
|
|
748
760
|
throw new Error(`Axis index ${R} out of bounds for unique keys array (length ${T.length}) during split key generation for column ${d.id}`);
|
|
749
761
|
const $ = T[R];
|
|
750
762
|
if (!$ || $.length === 0) {
|
|
751
|
-
|
|
763
|
+
O.length = 0;
|
|
752
764
|
return;
|
|
753
765
|
}
|
|
754
766
|
for (const q of $)
|
|
755
767
|
_.push(q), D(_, V + 1), _.pop();
|
|
756
768
|
};
|
|
757
|
-
if (D([], 0),
|
|
769
|
+
if (D([], 0), O.length === 0)
|
|
758
770
|
continue;
|
|
759
|
-
const
|
|
771
|
+
const k = [...g.axesSpec], Ie = p.map((_) => _);
|
|
760
772
|
for (let _ = p.length - 1; _ >= 0; _--)
|
|
761
|
-
|
|
762
|
-
const Le = { ...g, axesSpec:
|
|
763
|
-
for (const _ of
|
|
773
|
+
k.splice(p[_], 1);
|
|
774
|
+
const Le = { ...g, axesSpec: k };
|
|
775
|
+
for (const _ of O) {
|
|
764
776
|
const V = _.map((R, $) => {
|
|
765
777
|
const q = Ie[$], Se = de(g.axesSpec[q]), ue = B[$], Ce = (ue == null ? void 0 : ue[R]) ?? String(R);
|
|
766
778
|
return { axisIdx: q, axisId: Se, value: R, label: Ce };
|
|
@@ -797,7 +809,7 @@ class me {
|
|
|
797
809
|
let A;
|
|
798
810
|
r ? A = r.deriveS(S, p) : A = lt(v.id, p);
|
|
799
811
|
let d = { ...u.adjustedSpec };
|
|
800
|
-
|
|
812
|
+
i && (d = {
|
|
801
813
|
...d,
|
|
802
814
|
annotations: {
|
|
803
815
|
...d.annotations ?? {},
|
|
@@ -806,7 +818,7 @@ class me {
|
|
|
806
818
|
}), P.push({
|
|
807
819
|
id: A,
|
|
808
820
|
spec: d,
|
|
809
|
-
data: () => u.type === "split" ? $e(
|
|
821
|
+
data: () => u.type === "split" ? $e(nt(u.dataEntries, p)) : u.originalColumn.data,
|
|
810
822
|
label: h
|
|
811
823
|
});
|
|
812
824
|
}
|
|
@@ -819,64 +831,64 @@ class me {
|
|
|
819
831
|
...t ?? {}
|
|
820
832
|
});
|
|
821
833
|
if (!r) return;
|
|
822
|
-
const
|
|
823
|
-
for (const
|
|
824
|
-
const
|
|
825
|
-
if (!
|
|
834
|
+
const n = [];
|
|
835
|
+
for (const o of r) {
|
|
836
|
+
const i = o.data();
|
|
837
|
+
if (!i) {
|
|
826
838
|
if (t != null && t.dontWaitAllData) continue;
|
|
827
839
|
return;
|
|
828
840
|
}
|
|
829
|
-
|
|
830
|
-
id:
|
|
831
|
-
spec:
|
|
832
|
-
data:
|
|
841
|
+
n.push({
|
|
842
|
+
id: o.id,
|
|
843
|
+
spec: o.spec,
|
|
844
|
+
data: i
|
|
833
845
|
});
|
|
834
846
|
}
|
|
835
|
-
return
|
|
847
|
+
return n;
|
|
836
848
|
}
|
|
837
849
|
}
|
|
838
|
-
function ye(
|
|
839
|
-
const e = (
|
|
850
|
+
function ye(s) {
|
|
851
|
+
const e = (n) => n.operator !== "InSet" ? n : {
|
|
840
852
|
operator: "Or",
|
|
841
|
-
operands:
|
|
853
|
+
operands: n.references.map((o) => ({
|
|
842
854
|
operator: "Equal",
|
|
843
|
-
reference:
|
|
855
|
+
reference: o
|
|
844
856
|
}))
|
|
845
|
-
}, t = (
|
|
846
|
-
switch (
|
|
857
|
+
}, t = (n, o) => {
|
|
858
|
+
switch (n.operator) {
|
|
847
859
|
case "And":
|
|
848
860
|
return {
|
|
849
|
-
...
|
|
850
|
-
operands:
|
|
861
|
+
...n,
|
|
862
|
+
operands: n.operands.map((i) => t(i, o))
|
|
851
863
|
};
|
|
852
864
|
case "Or":
|
|
853
865
|
return {
|
|
854
|
-
...
|
|
855
|
-
operands:
|
|
866
|
+
...n,
|
|
867
|
+
operands: n.operands.map((i) => t(i, o))
|
|
856
868
|
};
|
|
857
869
|
case "Not":
|
|
858
870
|
return {
|
|
859
|
-
...
|
|
860
|
-
operand: t(
|
|
871
|
+
...n,
|
|
872
|
+
operand: t(n.operand, o)
|
|
861
873
|
};
|
|
862
874
|
default:
|
|
863
|
-
return n
|
|
875
|
+
return o(n);
|
|
864
876
|
}
|
|
865
|
-
}, r = (
|
|
866
|
-
...
|
|
867
|
-
predicate: t(
|
|
877
|
+
}, r = (n, o) => ({
|
|
878
|
+
...n,
|
|
879
|
+
predicate: t(n.predicate, o)
|
|
868
880
|
});
|
|
869
|
-
return
|
|
881
|
+
return s.map((n) => r(n, e));
|
|
870
882
|
}
|
|
871
|
-
function ee(
|
|
872
|
-
if (
|
|
883
|
+
function ee(s, e) {
|
|
884
|
+
if (s === void 0) return e === void 0;
|
|
873
885
|
if (e === void 0) return !0;
|
|
874
886
|
for (const t in e)
|
|
875
|
-
if (
|
|
887
|
+
if (s[t] !== e[t]) return !1;
|
|
876
888
|
return !0;
|
|
877
889
|
}
|
|
878
|
-
function ve(
|
|
879
|
-
return le(
|
|
890
|
+
function ve(s) {
|
|
891
|
+
return le(s, (e) => e instanceof L ? e.handle : ae(e) ? Ne(e, (t) => t.handle) : e);
|
|
880
892
|
}
|
|
881
893
|
class ct {
|
|
882
894
|
constructor() {
|
|
@@ -889,27 +901,27 @@ class ct {
|
|
|
889
901
|
return this.ctx.calculateOptions(e);
|
|
890
902
|
}
|
|
891
903
|
getOptions(e, t) {
|
|
892
|
-
const r = typeof e == "function" ? e : W(e),
|
|
893
|
-
let
|
|
894
|
-
return typeof t < "u" && (typeof t == "function" ?
|
|
895
|
-
ref: ce(a,
|
|
904
|
+
const r = typeof e == "function" ? e : W(e), n = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
905
|
+
let o = {}, i = !1;
|
|
906
|
+
return typeof t < "u" && (typeof t == "function" ? o = t : typeof t == "object" && ("includeNativeLabel" in t || "separator" in t || "addLabelAsSuffix" in t ? o = t : (t = t, o = t.label ?? {}, i = t.refsWithEnrichments ?? !1))), typeof o == "object" ? Ae(n, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
907
|
+
ref: ce(a, i),
|
|
896
908
|
label: l
|
|
897
|
-
})) :
|
|
898
|
-
ref: ce(a,
|
|
899
|
-
label:
|
|
909
|
+
})) : n.map(({ ref: a, obj: l }) => ({
|
|
910
|
+
ref: ce(a, i),
|
|
911
|
+
label: o(l, a)
|
|
900
912
|
}));
|
|
901
913
|
}
|
|
902
914
|
resolveAnchorCtx(e) {
|
|
903
915
|
if (e instanceof he) return e;
|
|
904
916
|
const t = {};
|
|
905
|
-
for (const [r,
|
|
906
|
-
if (Fe(
|
|
907
|
-
const
|
|
908
|
-
if (!
|
|
917
|
+
for (const [r, n] of Object.entries(e))
|
|
918
|
+
if (Fe(n)) {
|
|
919
|
+
const o = this.getPColumnSpecByRef(n);
|
|
920
|
+
if (!o)
|
|
909
921
|
return;
|
|
910
|
-
t[r] =
|
|
922
|
+
t[r] = o;
|
|
911
923
|
} else
|
|
912
|
-
t[r] =
|
|
924
|
+
t[r] = n;
|
|
913
925
|
return new he(t);
|
|
914
926
|
}
|
|
915
927
|
/**
|
|
@@ -921,11 +933,11 @@ class ct {
|
|
|
921
933
|
* @returns A PFrameHandle for the created PFrame, or undefined if any required data is missing
|
|
922
934
|
*/
|
|
923
935
|
getAnchoredPColumns(e, t, r) {
|
|
924
|
-
const
|
|
925
|
-
if (
|
|
936
|
+
const n = this.resolveAnchorCtx(e);
|
|
937
|
+
if (n)
|
|
926
938
|
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(t, {
|
|
927
939
|
...r,
|
|
928
|
-
anchorCtx:
|
|
940
|
+
anchorCtx: n
|
|
929
941
|
});
|
|
930
942
|
}
|
|
931
943
|
/**
|
|
@@ -958,16 +970,16 @@ class ct {
|
|
|
958
970
|
* or undefined if any PlRef resolution fails.
|
|
959
971
|
*/
|
|
960
972
|
getCanonicalOptions(e, t, r) {
|
|
961
|
-
const
|
|
962
|
-
if (!
|
|
963
|
-
const
|
|
973
|
+
const n = this.resolveAnchorCtx(e);
|
|
974
|
+
if (!n) return;
|
|
975
|
+
const o = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(t, {
|
|
964
976
|
...r,
|
|
965
|
-
anchorCtx:
|
|
977
|
+
anchorCtx: n
|
|
966
978
|
});
|
|
967
|
-
if (
|
|
968
|
-
return
|
|
969
|
-
value:
|
|
970
|
-
label:
|
|
979
|
+
if (o)
|
|
980
|
+
return o.map((i) => ({
|
|
981
|
+
value: i.id,
|
|
982
|
+
label: i.label
|
|
971
983
|
}));
|
|
972
984
|
}
|
|
973
985
|
/**
|
|
@@ -1003,7 +1015,7 @@ class ct {
|
|
|
1003
1015
|
ref: t.ref,
|
|
1004
1016
|
obj: {
|
|
1005
1017
|
...t.obj,
|
|
1006
|
-
data:
|
|
1018
|
+
data: ke(
|
|
1007
1019
|
t.obj.data,
|
|
1008
1020
|
(r) => new L(r, [t.ref.blockId, t.ref.name])
|
|
1009
1021
|
)
|
|
@@ -1028,13 +1040,13 @@ class ct {
|
|
|
1028
1040
|
var t;
|
|
1029
1041
|
if (typeof this.ctx.getDataFromResultPoolByRef > "u")
|
|
1030
1042
|
return (t = this.getData().entries.find(
|
|
1031
|
-
(
|
|
1043
|
+
(n) => n.ref.blockId === e.blockId && n.ref.name === e.name
|
|
1032
1044
|
)) == null ? void 0 : t.obj;
|
|
1033
1045
|
const r = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
1034
1046
|
if (r)
|
|
1035
1047
|
return le(
|
|
1036
1048
|
r,
|
|
1037
|
-
(
|
|
1049
|
+
(n) => new L(n, [e.blockId, e.name])
|
|
1038
1050
|
);
|
|
1039
1051
|
}
|
|
1040
1052
|
/**
|
|
@@ -1045,7 +1057,7 @@ class ct {
|
|
|
1045
1057
|
getPColumnByRef(e) {
|
|
1046
1058
|
const t = this.getDataByRef(e);
|
|
1047
1059
|
if (t)
|
|
1048
|
-
return
|
|
1060
|
+
return Oe(t);
|
|
1049
1061
|
}
|
|
1050
1062
|
/**
|
|
1051
1063
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -1076,11 +1088,11 @@ class ct {
|
|
|
1076
1088
|
e: for (const r of this.getData().entries) {
|
|
1077
1089
|
if (!z(r.obj.spec))
|
|
1078
1090
|
continue;
|
|
1079
|
-
const
|
|
1080
|
-
if (e.name ===
|
|
1081
|
-
for (let
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1091
|
+
const n = r.obj.spec;
|
|
1092
|
+
if (e.name === n.name && e.valueType === n.valueType && e.axesSpec.length === n.axesSpec.length && ee(e.domain, n.domain)) {
|
|
1093
|
+
for (let o = 0; o < e.axesSpec.length; ++o) {
|
|
1094
|
+
const i = e.axesSpec[o], a = n.axesSpec[o];
|
|
1095
|
+
if (i.name !== a.name || i.type !== a.type || !ee(i.domain, a.domain))
|
|
1084
1096
|
continue e;
|
|
1085
1097
|
}
|
|
1086
1098
|
t.push(r.obj);
|
|
@@ -1096,14 +1108,14 @@ class ct {
|
|
|
1096
1108
|
const t = this.getData();
|
|
1097
1109
|
for (const r of t.entries) {
|
|
1098
1110
|
if (!be(r.obj)) continue;
|
|
1099
|
-
const
|
|
1100
|
-
if (
|
|
1111
|
+
const n = r.obj.spec;
|
|
1112
|
+
if (n.name === "pl7.app/label" && n.axesSpec.length === 1 && n.axesSpec[0].name === e.name && n.axesSpec[0].type === e.type && ee(e.domain, n.axesSpec[0].domain)) {
|
|
1101
1113
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
1102
1114
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
1103
1115
|
return Object.fromEntries(
|
|
1104
1116
|
Object.entries(
|
|
1105
1117
|
r.obj.data.getDataAsJson().data
|
|
1106
|
-
).map((
|
|
1118
|
+
).map((o) => [JSON.parse(o[0])[0], o[1]])
|
|
1107
1119
|
);
|
|
1108
1120
|
}
|
|
1109
1121
|
}
|
|
@@ -1117,16 +1129,16 @@ class ct {
|
|
|
1117
1129
|
*/
|
|
1118
1130
|
selectColumns(e) {
|
|
1119
1131
|
const t = typeof e == "function" ? e : W(e);
|
|
1120
|
-
return this.getSpecs().entries.filter(({ obj: r }) => z(r) ? t(r) : !1).map(({ ref: r, obj:
|
|
1121
|
-
const
|
|
1122
|
-
let
|
|
1132
|
+
return this.getSpecs().entries.filter(({ obj: r }) => z(r) ? t(r) : !1).map(({ ref: r, obj: n }) => {
|
|
1133
|
+
const o = n;
|
|
1134
|
+
let i = null;
|
|
1123
1135
|
const a = this;
|
|
1124
1136
|
return {
|
|
1125
1137
|
id: we(r),
|
|
1126
|
-
spec:
|
|
1138
|
+
spec: o,
|
|
1127
1139
|
get data() {
|
|
1128
1140
|
var l;
|
|
1129
|
-
return
|
|
1141
|
+
return i !== null || (i = (l = a.getPColumnByRef(r)) == null ? void 0 : l.data), i;
|
|
1130
1142
|
}
|
|
1131
1143
|
};
|
|
1132
1144
|
});
|
|
@@ -1137,14 +1149,14 @@ class ct {
|
|
|
1137
1149
|
*/
|
|
1138
1150
|
findLabelsForColumnAxis(e, t) {
|
|
1139
1151
|
var r;
|
|
1140
|
-
const
|
|
1141
|
-
if (!
|
|
1142
|
-
const
|
|
1143
|
-
if (
|
|
1144
|
-
const
|
|
1145
|
-
return Object.fromEntries(
|
|
1152
|
+
const n = this.findLabels(e.axesSpec[t]);
|
|
1153
|
+
if (!n) return;
|
|
1154
|
+
const o = (r = e.annotations) == null ? void 0 : r["pl7.app/axisKeys/" + t];
|
|
1155
|
+
if (o !== void 0) {
|
|
1156
|
+
const i = JSON.parse(o);
|
|
1157
|
+
return Object.fromEntries(i.map((a) => [a, n[a] ?? "Unlabelled"]));
|
|
1146
1158
|
} else
|
|
1147
|
-
return
|
|
1159
|
+
return n;
|
|
1148
1160
|
}
|
|
1149
1161
|
}
|
|
1150
1162
|
class G {
|
|
@@ -1204,8 +1216,8 @@ class G {
|
|
|
1204
1216
|
}
|
|
1205
1217
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
1206
1218
|
var t;
|
|
1207
|
-
const r = e.some((
|
|
1208
|
-
if (r && !
|
|
1219
|
+
const r = e.some((o) => !(o.data instanceof L) || ae(o.data)), n = ((t = this.ctx.featureFlags) == null ? void 0 : t.inlineColumnsSupport) === !0;
|
|
1220
|
+
if (r && !n) throw Error("Inline or explicit columns not supported");
|
|
1209
1221
|
}
|
|
1210
1222
|
patchPTableDef(e) {
|
|
1211
1223
|
var t, r;
|
|
@@ -1256,17 +1268,17 @@ class G {
|
|
|
1256
1268
|
this.ctx.logError(e);
|
|
1257
1269
|
}
|
|
1258
1270
|
}
|
|
1259
|
-
const ht = "1.42.
|
|
1260
|
-
function pt(
|
|
1261
|
-
return
|
|
1271
|
+
const ht = "1.42.15", Y = ht;
|
|
1272
|
+
function pt(s) {
|
|
1273
|
+
return s.__renderLambda === !0;
|
|
1262
1274
|
}
|
|
1263
|
-
function te(
|
|
1264
|
-
if (
|
|
1265
|
-
return pt(
|
|
1275
|
+
function te(s) {
|
|
1276
|
+
if (s !== void 0)
|
|
1277
|
+
return pt(s) ? s.handle : s;
|
|
1266
1278
|
}
|
|
1267
1279
|
const dt = class b {
|
|
1268
|
-
constructor(e, t, r,
|
|
1269
|
-
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs =
|
|
1280
|
+
constructor(e, t, r, n, o, i, a, l, y) {
|
|
1281
|
+
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = n, this._inputsValid = o, this._sections = i, this._title = a, this._enrichmentTargets = l, this._featureFlags = y;
|
|
1270
1282
|
}
|
|
1271
1283
|
static create(e = "Heavy") {
|
|
1272
1284
|
return new b(
|
|
@@ -1283,8 +1295,8 @@ const dt = class b {
|
|
|
1283
1295
|
}
|
|
1284
1296
|
output(e, t, r = {}) {
|
|
1285
1297
|
if (typeof t == "function") {
|
|
1286
|
-
const
|
|
1287
|
-
return
|
|
1298
|
+
const n = `output#${e}`;
|
|
1299
|
+
return U(n, () => t(new G())), new b(
|
|
1288
1300
|
this._renderingMode,
|
|
1289
1301
|
this._initialArgs,
|
|
1290
1302
|
this._initialUiState,
|
|
@@ -1292,7 +1304,7 @@ const dt = class b {
|
|
|
1292
1304
|
...this._outputs,
|
|
1293
1305
|
[e]: {
|
|
1294
1306
|
__renderLambda: !0,
|
|
1295
|
-
handle:
|
|
1307
|
+
handle: n,
|
|
1296
1308
|
...r
|
|
1297
1309
|
}
|
|
1298
1310
|
},
|
|
@@ -1323,7 +1335,7 @@ const dt = class b {
|
|
|
1323
1335
|
return this.output(e, t, { retentive: !0 });
|
|
1324
1336
|
}
|
|
1325
1337
|
argsValid(e) {
|
|
1326
|
-
return typeof e == "function" ? (
|
|
1338
|
+
return typeof e == "function" ? (U("inputsValid", () => e(new G())), new b(
|
|
1327
1339
|
this._renderingMode,
|
|
1328
1340
|
this._initialArgs,
|
|
1329
1341
|
this._initialUiState,
|
|
@@ -1349,7 +1361,7 @@ const dt = class b {
|
|
|
1349
1361
|
);
|
|
1350
1362
|
}
|
|
1351
1363
|
sections(e) {
|
|
1352
|
-
return Array.isArray(e) ? this.sections(X(e)) : typeof e == "function" ? (
|
|
1364
|
+
return Array.isArray(e) ? this.sections(X(e)) : typeof e == "function" ? (U("sections", () => e(new G())), new b(
|
|
1353
1365
|
this._renderingMode,
|
|
1354
1366
|
this._initialArgs,
|
|
1355
1367
|
this._initialUiState,
|
|
@@ -1373,7 +1385,7 @@ const dt = class b {
|
|
|
1373
1385
|
}
|
|
1374
1386
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1375
1387
|
title(e) {
|
|
1376
|
-
return
|
|
1388
|
+
return U("title", () => e(new G())), new b(
|
|
1377
1389
|
this._renderingMode,
|
|
1378
1390
|
this._initialArgs,
|
|
1379
1391
|
this._initialUiState,
|
|
@@ -1449,7 +1461,7 @@ const dt = class b {
|
|
|
1449
1461
|
* Influences dependency graph construction.
|
|
1450
1462
|
*/
|
|
1451
1463
|
enriches(e) {
|
|
1452
|
-
return
|
|
1464
|
+
return U("enrichmentTargets", e), new b(
|
|
1453
1465
|
this._renderingMode,
|
|
1454
1466
|
this._initialArgs,
|
|
1455
1467
|
this._initialUiState,
|
|
@@ -1493,10 +1505,10 @@ const dt = class b {
|
|
|
1493
1505
|
inputsValid: te(this._inputsValid),
|
|
1494
1506
|
sections: te(this._sections),
|
|
1495
1507
|
outputs: Object.fromEntries(
|
|
1496
|
-
Object.entries(this._outputs).map(([r,
|
|
1508
|
+
Object.entries(this._outputs).map(([r, n]) => [r, te(n)])
|
|
1497
1509
|
)
|
|
1498
1510
|
};
|
|
1499
|
-
return globalThis.platformaApiVersion = e,
|
|
1511
|
+
return globalThis.platformaApiVersion = e, Ue() ? Pe({ sdkVersion: Y, apiVersion: platformaApiVersion }) : { config: t };
|
|
1500
1512
|
}
|
|
1501
1513
|
};
|
|
1502
1514
|
I(dt, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
@@ -1509,19 +1521,19 @@ function yt() {
|
|
|
1509
1521
|
}
|
|
1510
1522
|
export {
|
|
1511
1523
|
he as AnchoredIdDeriver,
|
|
1512
|
-
|
|
1513
|
-
|
|
1524
|
+
kt as BasePlErrorLike,
|
|
1525
|
+
Ot as ErrorLike,
|
|
1514
1526
|
w as FutureRef,
|
|
1515
1527
|
qe as PAnnotationLabel,
|
|
1516
1528
|
Ge as PAnnotationTrace,
|
|
1517
1529
|
me as PColumnCollection,
|
|
1518
1530
|
Rt as PlErrorLike,
|
|
1519
1531
|
_t as PlIdLength,
|
|
1520
|
-
|
|
1532
|
+
j as RT_BINARY_PARTITIONED,
|
|
1521
1533
|
M as RT_BINARY_SUPER_PARTITIONED,
|
|
1522
|
-
|
|
1534
|
+
J as RT_JSON_PARTITIONED,
|
|
1523
1535
|
Q as RT_JSON_SUPER_PARTITIONED,
|
|
1524
|
-
|
|
1536
|
+
ne as RT_RESOURCE_MAP,
|
|
1525
1537
|
se as RT_RESOURCE_MAP_PARTITIONED,
|
|
1526
1538
|
G as RenderCtx,
|
|
1527
1539
|
ct as ResultPool,
|
|
@@ -1529,16 +1541,16 @@ export {
|
|
|
1529
1541
|
Ye as Trace,
|
|
1530
1542
|
ze as TraceEntry,
|
|
1531
1543
|
L as TreeNodeAccessor,
|
|
1532
|
-
|
|
1544
|
+
je as canonicalizeAxisId,
|
|
1533
1545
|
rt as convertOrParsePColumnData,
|
|
1534
1546
|
Ke as dataInfoToEntries,
|
|
1535
1547
|
Ae as deriveLabels,
|
|
1536
1548
|
Re as deriveNativeId,
|
|
1537
1549
|
te as downgradeCfgOrLambda,
|
|
1538
|
-
|
|
1550
|
+
Oe as ensurePColumn,
|
|
1539
1551
|
$e as entriesToDataInfo,
|
|
1540
1552
|
Ee as extractAllColumns,
|
|
1541
|
-
|
|
1553
|
+
nt as filterDataInfoEntries,
|
|
1542
1554
|
wt as getAxesId,
|
|
1543
1555
|
de as getAxisId,
|
|
1544
1556
|
Pt as getFileNameFromHandle,
|
|
@@ -1557,11 +1569,11 @@ export {
|
|
|
1557
1569
|
z as isPColumnSpec,
|
|
1558
1570
|
De as isPartitionedDataInfoEntries,
|
|
1559
1571
|
Fe as isPlRef,
|
|
1560
|
-
|
|
1572
|
+
Ne as mapDataInfo,
|
|
1561
1573
|
Lt as mapJoinEntry,
|
|
1562
1574
|
le as mapPObjectData,
|
|
1563
1575
|
Te as mapPTableDef,
|
|
1564
|
-
|
|
1576
|
+
ke as mapValueInVOE,
|
|
1565
1577
|
St as matchAxis,
|
|
1566
1578
|
Ct as matchAxisId,
|
|
1567
1579
|
Et as matchPColumn,
|