@milaboratories/uikit 2.4.0 → 2.4.1
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 +19 -19
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.js +11 -11
- package/dist/components/PlTextArea/PlTextArea.vue.js +1 -1
- package/dist/components/PlTextField/PlTextField.vue.js +1 -1
- package/dist/generated/components/svg/images/{SvgRequired.vue2.js → SvgRequired.vue.js} +1 -1
- package/dist/generated/components/svg/images/SvgRequired.vue.js.map +1 -0
- package/dist/lib/model/common/dist/index.js +182 -159
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/sdk/model/dist/index.js +334 -322
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/.turbo/turbo-test.log +0 -133
- package/dist/components/PlAccordion/ExpandTransition.vue2.js +0 -27
- package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
- package/dist/generated/components/svg/images/SvgRequired.vue2.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
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 De, isPartitionedDataInfoEntries as Re, getAxisId as de, entriesToDataInfo 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 De, isPartitionedDataInfoEntries as Re, getAxisId as de, entriesToDataInfo as Ke, isDataInfoEntries as _e, dataInfoToEntries as $e, canonicalizeAxisId as Ne, mapDataInfo as je } 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 St, matchAxis as Lt, 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
|
-
import
|
|
4
|
+
import $ from "../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.js";
|
|
5
5
|
import { BasePlErrorLike as kt, ErrorLike as Ot, PlErrorLike as Dt, StandardErrorLike as Rt } from "../../../lib/model/pl-error-like/dist/index.js";
|
|
6
|
-
var Be = Object.defineProperty, Ve = (
|
|
7
|
-
function Q(
|
|
8
|
-
return { type: "Immediate", value:
|
|
6
|
+
var Be = Object.defineProperty, Ve = (i, e, t) => e in i ? Be(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, I = (i, e, t) => Ve(i, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
+
function Q(i) {
|
|
8
|
+
return { type: "Immediate", value: i };
|
|
9
9
|
}
|
|
10
10
|
function Je() {
|
|
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(i) {
|
|
14
|
+
if (i && typeof globalThis.getPlatforma == "function")
|
|
15
|
+
return globalThis.getPlatforma(i);
|
|
16
16
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
17
17
|
throw new Error("Can't get platforma instance.");
|
|
18
18
|
}
|
|
@@ -23,18 +23,18 @@ 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 J(
|
|
26
|
+
function J(i, e) {
|
|
27
27
|
const t = Ue();
|
|
28
28
|
if (t === void 0) return !1;
|
|
29
|
-
if (
|
|
30
|
-
return t.callbackRegistry[
|
|
29
|
+
if (i in t.callbackRegistry) throw new Error(`Callback with key ${i} already registered.`);
|
|
30
|
+
return t.callbackRegistry[i] = 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(i, e) {
|
|
34
|
+
i in c().callbackRegistry || (c().callbackRegistry[i] = (t) => {
|
|
35
|
+
for (const r of Z.get(i))
|
|
36
36
|
r(t);
|
|
37
|
-
}, Z.set(
|
|
37
|
+
}, Z.set(i, [])), Z.get(i).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(i, e) {
|
|
59
|
+
return i === void 0 ? void 0 : e(i);
|
|
60
60
|
}
|
|
61
61
|
class S {
|
|
62
62
|
constructor(e, t) {
|
|
@@ -95,11 +95,11 @@ class S {
|
|
|
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 S(n, r)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
get resourceType() {
|
|
@@ -160,9 +160,9 @@ class S {
|
|
|
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 S {
|
|
|
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, s] of Object.entries(r)) {
|
|
181
|
+
const a = [...this.resolvePath, o];
|
|
182
|
+
n[o] = le(s, (l) => new S(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,33 +264,33 @@ class S {
|
|
|
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
|
+
}, s = 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]) => s(l, y));
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
const We = "staging",
|
|
282
|
-
type:
|
|
283
|
-
importance:
|
|
284
|
-
id:
|
|
285
|
-
label:
|
|
286
|
-
}), Ye =
|
|
287
|
-
function Ae(
|
|
288
|
-
const r = /* @__PURE__ */ new Map(),
|
|
281
|
+
const We = "staging", qe = "main", He = "pl7.app/label", Ge = "pl7.app/trace", ze = $.object({
|
|
282
|
+
type: $.string(),
|
|
283
|
+
importance: $.number().optional(),
|
|
284
|
+
id: $.string().optional(),
|
|
285
|
+
label: $.string()
|
|
286
|
+
}), Ye = $.array(ze), Xe = 1e-3, Qe = "__LABEL__", fe = "__LABEL__@1";
|
|
287
|
+
function Ae(i, 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(), s = i.map((f) => {
|
|
289
289
|
var P, u;
|
|
290
290
|
const h = e(f);
|
|
291
291
|
let v, L, C;
|
|
292
292
|
"spec" in h && typeof h.spec == "object" ? (v = h.spec, L = h.prefixTrace, C = h.suffixTrace) : v = h;
|
|
293
|
-
const p = (P = v.annotations) == null ? void 0 : P[
|
|
293
|
+
const p = (P = v.annotations) == null ? void 0 : P[He], A = (u = v.annotations) == null ? void 0 : u[Ge], d = (A ? Ye.safeParse(JSON.parse(A)).data : void 0) ?? [], g = [
|
|
294
294
|
...L ?? [],
|
|
295
295
|
...d,
|
|
296
296
|
...C ?? []
|
|
@@ -304,7 +304,7 @@ function Ae(n, e, t = {}) {
|
|
|
304
304
|
const { type: B } = g[x], O = g[x].importance ?? 0, R = (T.get(B) ?? 0) + 1;
|
|
305
305
|
T.set(B, R);
|
|
306
306
|
const k = `${B}@${R}`;
|
|
307
|
-
|
|
307
|
+
o.set(k, (o.get(k) ?? 0) + 1), r.set(
|
|
308
308
|
k,
|
|
309
309
|
Math.max(
|
|
310
310
|
r.get(k) ?? Number.NEGATIVE_INFINITY,
|
|
@@ -321,11 +321,11 @@ function Ae(n, 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) === i.length ? a.push(f) : l.push(f);
|
|
325
|
+
const j = (f, P = !1) => {
|
|
326
326
|
const u = [];
|
|
327
|
-
for (let h = 0; h <
|
|
328
|
-
const v =
|
|
327
|
+
for (let h = 0; h < s.length; h++) {
|
|
328
|
+
const v = s[h], L = v.fullTrace.filter((A) => f.has(A.fullType) || n && n.has(A.type));
|
|
329
329
|
if (L.length === 0)
|
|
330
330
|
if (P)
|
|
331
331
|
u.push({
|
|
@@ -343,7 +343,7 @@ function Ae(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 j(new Set(fe), !0);
|
|
347
347
|
}
|
|
348
348
|
let E = 0, F = -1;
|
|
349
349
|
for (; E < a.length; ) {
|
|
@@ -351,104 +351,104 @@ function Ae(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 = j(f);
|
|
355
|
+
if (P !== void 0 && new Set(P.map((u) => u.label)).size === i.length) return P;
|
|
356
356
|
F++, F >= a.length && (E++, F = E);
|
|
357
357
|
}
|
|
358
|
-
return
|
|
358
|
+
return j(/* @__PURE__ */ new Set([...a, ...l]), !0);
|
|
359
359
|
}
|
|
360
|
-
const
|
|
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/", ne = q + "ResourceMap", ie = q + "Partitioned/ResourceMap", U = q + "JsonPartitioned", N = q + "BinaryPartitioned", xe = q + "Partitioned/", X = xe + "JsonPartitioned", M = xe + "BinaryPartitioned", se = (i) => {
|
|
361
|
+
if (i.endsWith(".index"))
|
|
362
|
+
return { baseKey: i.substring(0, i.length - 6), type: "index" };
|
|
363
|
+
if (i.endsWith(".values"))
|
|
364
|
+
return { baseKey: i.substring(0, i.length - 7), type: "values" };
|
|
365
|
+
throw new Error(`key must ends on .index/.values for binary p-column, got: ${i}`);
|
|
366
366
|
};
|
|
367
|
-
function Ze(
|
|
368
|
-
if (!
|
|
369
|
-
const e =
|
|
370
|
-
let
|
|
367
|
+
function Ze(i) {
|
|
368
|
+
if (!i) return;
|
|
369
|
+
const e = i.resourceType.name, t = i.getDataAsJson(), r = [];
|
|
370
|
+
let n = 0;
|
|
371
371
|
switch (e) {
|
|
372
372
|
case ne:
|
|
373
|
-
|
|
373
|
+
n = t.keyLength;
|
|
374
374
|
break;
|
|
375
375
|
case ie:
|
|
376
|
-
|
|
376
|
+
n = t.partitionKeyLength + t.keyLength;
|
|
377
377
|
break;
|
|
378
378
|
case U:
|
|
379
|
-
case
|
|
380
|
-
|
|
379
|
+
case N:
|
|
380
|
+
n = t.partitionKeyLength;
|
|
381
381
|
break;
|
|
382
382
|
case M:
|
|
383
383
|
case X:
|
|
384
|
-
|
|
384
|
+
n = t.superPartitionKeyLength + t.partitionKeyLength;
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
387
|
switch (e) {
|
|
388
388
|
case ne:
|
|
389
389
|
case U:
|
|
390
|
-
case
|
|
391
|
-
for (let
|
|
392
|
-
e ===
|
|
393
|
-
const
|
|
394
|
-
r.push(
|
|
390
|
+
case N:
|
|
391
|
+
for (let o of i.listInputFields()) {
|
|
392
|
+
e === N && (o = se(o).baseKey);
|
|
393
|
+
const s = [...JSON.parse(o)];
|
|
394
|
+
r.push(s);
|
|
395
395
|
}
|
|
396
396
|
break;
|
|
397
397
|
case ie:
|
|
398
398
|
case M:
|
|
399
399
|
case X:
|
|
400
|
-
for (const
|
|
401
|
-
const
|
|
400
|
+
for (const o of i.listInputFields()) {
|
|
401
|
+
const s = [...JSON.parse(o)], a = i.resolve({ field: o, 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
|
-
const y = [...
|
|
405
|
+
const y = [...s, ...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(i) {
|
|
414
|
+
if (i.type !== "JsonPartitioned" && i.type !== "BinaryPartitioned")
|
|
415
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${i.type}`);
|
|
416
|
+
const { parts: e, partitionKeyLength: t } = i, 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 s = 0; s < t; ++s)
|
|
428
|
+
r[s].add(o[s]);
|
|
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(i) {
|
|
433
|
+
if (i === void 0) return;
|
|
434
|
+
if (_e(i))
|
|
435
|
+
return et(i);
|
|
436
|
+
const e = Ze(i);
|
|
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 s = 0; s < r; ++s)
|
|
445
|
+
n[s].add(o[s]);
|
|
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(i, e = []) {
|
|
450
|
+
if (i === void 0 || !i.getIsReadyOrError()) return;
|
|
451
|
+
const t = i.resourceType.name, r = i.getDataAsJson();
|
|
452
452
|
if (e.length > 0 && (t === X || t === M))
|
|
453
453
|
throw new Error(`Unexpected nested super-partitioned resource: ${t}`);
|
|
454
454
|
switch (t) {
|
|
@@ -458,33 +458,33 @@ function oe(n, e = []) {
|
|
|
458
458
|
case U: {
|
|
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 i.listInputFields()) {
|
|
463
|
+
const s = i.resolve({ field: o, assertFieldType: "Input" });
|
|
464
|
+
if (s === void 0) return;
|
|
465
|
+
const a = [...e, ...JSON.parse(o)];
|
|
466
|
+
n.push({ key: a, value: s });
|
|
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 N: {
|
|
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 = se(
|
|
477
|
+
const n = [], o = /* @__PURE__ */ new Map();
|
|
478
|
+
for (const s of i.listInputFields()) {
|
|
479
|
+
const a = se(s), l = i.resolve({ field: s, 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 [s, 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(s)];
|
|
487
|
+
n.push({
|
|
488
488
|
key: l,
|
|
489
489
|
value: {
|
|
490
490
|
index: a.index,
|
|
@@ -495,127 +495,139 @@ function oe(n, 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 X: {
|
|
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 s of i.listInputFields()) {
|
|
506
|
+
const a = i.resolve({ field: s, 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}`);
|
|
510
|
-
const l = oe(a, JSON.parse(
|
|
510
|
+
const l = oe(a, JSON.parse(s));
|
|
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 s of i.listInputFields()) {
|
|
527
|
+
const a = i.resolve({ field: s, 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 !== N)
|
|
530
|
+
throw new Error(`Expected ${N} inside ${t}, but got ${a.resourceType.name}`);
|
|
531
|
+
const l = oe(a, JSON.parse(s));
|
|
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(i) {
|
|
548
|
+
if (i !== void 0) {
|
|
549
|
+
if (_e(i)) return i;
|
|
550
|
+
if (ae(i)) return $e(i);
|
|
551
|
+
if (i instanceof S) return oe(i);
|
|
552
|
+
throw new Error(`Unexpected input type: ${typeof i}`);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function nt(
|
|
556
|
-
const t = [...e].sort((s,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
555
|
+
function nt(i, e) {
|
|
556
|
+
const t = [...e].sort((s, a) => a[0] - s[0]), { type: r } = i;
|
|
557
|
+
switch (r) {
|
|
558
|
+
case "Json": {
|
|
559
|
+
const { keyLength: s } = i;
|
|
560
|
+
for (const [a] of e)
|
|
561
|
+
if (a >= s)
|
|
562
|
+
throw new Error(`Can't filter on non-data axis ${a}. Must be >= ${s}`);
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
case "JsonPartitioned":
|
|
566
|
+
case "BinaryPartitioned":
|
|
567
|
+
case "ParquetPartitioned": {
|
|
568
|
+
const { partitionKeyLength: s } = i;
|
|
569
|
+
for (const [a] of e)
|
|
570
|
+
if (a >= s)
|
|
571
|
+
throw new Error(`Can't filter on non-partitioned axis ${a}. Must be >= ${s}`);
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
default:
|
|
575
|
+
throw new Error(`Unsupported data info type: ${r}`);
|
|
576
|
+
}
|
|
577
|
+
const n = (s) => {
|
|
578
|
+
for (const [a, l] of t)
|
|
579
|
+
if (s[a] !== l)
|
|
571
580
|
return !1;
|
|
572
581
|
return !0;
|
|
573
|
-
},
|
|
574
|
-
const
|
|
575
|
-
for (const [
|
|
576
|
-
|
|
577
|
-
return
|
|
582
|
+
}, o = (s) => {
|
|
583
|
+
const a = [...s];
|
|
584
|
+
for (const [l] of t)
|
|
585
|
+
a.splice(l, 1);
|
|
586
|
+
return a;
|
|
578
587
|
};
|
|
579
|
-
switch (
|
|
580
|
-
case "Json":
|
|
581
|
-
const s = n.data.filter((o) => r(o.key)).map((o) => ({
|
|
582
|
-
key: i(o.key),
|
|
583
|
-
value: o.value
|
|
584
|
-
}));
|
|
588
|
+
switch (i.type) {
|
|
589
|
+
case "Json":
|
|
585
590
|
return {
|
|
586
591
|
type: "Json",
|
|
587
|
-
keyLength:
|
|
588
|
-
data: s
|
|
592
|
+
keyLength: i.keyLength - e.length,
|
|
593
|
+
data: i.data.filter((s) => n(s.key)).map((s) => ({
|
|
594
|
+
key: o(s.key),
|
|
595
|
+
value: s.value
|
|
596
|
+
}))
|
|
589
597
|
};
|
|
590
|
-
|
|
591
|
-
case "JsonPartitioned": {
|
|
592
|
-
const s = n.parts.filter((o) => r(o.key)).map((o) => ({
|
|
593
|
-
key: i(o.key),
|
|
594
|
-
value: o.value
|
|
595
|
-
}));
|
|
598
|
+
case "JsonPartitioned":
|
|
596
599
|
return {
|
|
597
600
|
type: "JsonPartitioned",
|
|
598
|
-
partitionKeyLength:
|
|
599
|
-
parts: s
|
|
601
|
+
partitionKeyLength: i.partitionKeyLength - e.length,
|
|
602
|
+
parts: i.parts.filter((s) => n(s.key)).map((s) => ({
|
|
603
|
+
key: o(s.key),
|
|
604
|
+
value: s.value
|
|
605
|
+
}))
|
|
600
606
|
};
|
|
601
|
-
|
|
602
|
-
case "BinaryPartitioned": {
|
|
603
|
-
const s = n.parts.filter((o) => r(o.key)).map((o) => ({
|
|
604
|
-
key: i(o.key),
|
|
605
|
-
value: o.value
|
|
606
|
-
}));
|
|
607
|
+
case "BinaryPartitioned":
|
|
607
608
|
return {
|
|
608
609
|
type: "BinaryPartitioned",
|
|
609
|
-
partitionKeyLength:
|
|
610
|
-
parts: s
|
|
610
|
+
partitionKeyLength: i.partitionKeyLength - e.length,
|
|
611
|
+
parts: i.parts.filter((s) => n(s.key)).map((s) => ({
|
|
612
|
+
key: o(s.key),
|
|
613
|
+
value: s.value
|
|
614
|
+
}))
|
|
615
|
+
};
|
|
616
|
+
case "ParquetPartitioned":
|
|
617
|
+
return {
|
|
618
|
+
type: "ParquetPartitioned",
|
|
619
|
+
partitionKeyLength: i.partitionKeyLength - e.length,
|
|
620
|
+
parts: i.parts.filter((s) => n(s.key)).map((s) => ({
|
|
621
|
+
key: o(s.key),
|
|
622
|
+
value: s.value
|
|
623
|
+
}))
|
|
611
624
|
};
|
|
612
|
-
}
|
|
613
625
|
}
|
|
614
626
|
}
|
|
615
|
-
function it(
|
|
616
|
-
if (!Array.isArray(
|
|
617
|
-
if (
|
|
618
|
-
const e =
|
|
627
|
+
function it(i) {
|
|
628
|
+
if (!Array.isArray(i)) return !1;
|
|
629
|
+
if (i.length === 0) return !0;
|
|
630
|
+
const e = i[0];
|
|
619
631
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
620
632
|
}
|
|
621
633
|
class st {
|
|
@@ -627,34 +639,34 @@ class st {
|
|
|
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(i) {
|
|
643
|
+
if (i)
|
|
644
|
+
return i.map((e) => ({
|
|
645
|
+
type: `split:${Ne(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(i) {
|
|
652
|
+
if (i)
|
|
653
|
+
return i.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(i, e) {
|
|
656
|
+
if (!e || e.length === 0) return i;
|
|
657
|
+
const t = [...e].sort((r, n) => r[0] - n[0]);
|
|
658
|
+
return we({ id: i, axisFilters: t });
|
|
647
659
|
}
|
|
648
|
-
function ge(
|
|
649
|
-
if (!
|
|
650
|
-
const e =
|
|
660
|
+
function ge(i) {
|
|
661
|
+
if (!i || typeof i != "object") return !1;
|
|
662
|
+
const e = i, 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(i) {
|
|
666
|
+
if (typeof i != "object" || !("axes" in i) || i.axes === void 0)
|
|
655
667
|
return [];
|
|
656
|
-
const e =
|
|
657
|
-
if (e.length > 0 &&
|
|
668
|
+
const e = i.axes.map((t, r) => typeof t == "object" && "split" in t && t.split === !0 ? r : -1).filter((t) => t !== -1);
|
|
669
|
+
if (e.length > 0 && i.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
|
}
|
|
@@ -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: s = !1, exclude: a } = t ?? {}, l = {
|
|
698
|
+
...s && (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 j = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], E = [], F = /* @__PURE__ */ new Set();
|
|
714
|
+
for (const u of j) {
|
|
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 (!Re(m))
|
|
@@ -746,13 +758,13 @@ class me {
|
|
|
746
758
|
const D = p[V];
|
|
747
759
|
if (D >= T.length)
|
|
748
760
|
throw new Error(`Axis index ${D} out of bounds for unique keys array (length ${T.length}) during split key generation for column ${d.id}`);
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
761
|
+
const K = T[D];
|
|
762
|
+
if (!K || K.length === 0) {
|
|
751
763
|
O.length = 0;
|
|
752
764
|
return;
|
|
753
765
|
}
|
|
754
|
-
for (const
|
|
755
|
-
_.push(
|
|
766
|
+
for (const H of K)
|
|
767
|
+
_.push(H), R(_, V + 1), _.pop();
|
|
756
768
|
};
|
|
757
769
|
if (R([], 0), O.length === 0)
|
|
758
770
|
continue;
|
|
@@ -761,9 +773,9 @@ class me {
|
|
|
761
773
|
k.splice(p[_], 1);
|
|
762
774
|
const Se = { ...g, axesSpec: k };
|
|
763
775
|
for (const _ of O) {
|
|
764
|
-
const V = _.map((D,
|
|
765
|
-
const
|
|
766
|
-
return { axisIdx:
|
|
776
|
+
const V = _.map((D, K) => {
|
|
777
|
+
const H = Ie[K], Le = de(g.axesSpec[H]), ue = B[K], Ce = (ue == null ? void 0 : ue[D]) ?? String(D);
|
|
778
|
+
return { axisIdx: H, axisId: Le, value: D, label: Ce };
|
|
767
779
|
});
|
|
768
780
|
E.push({
|
|
769
781
|
type: "split",
|
|
@@ -797,7 +809,7 @@ class me {
|
|
|
797
809
|
let A;
|
|
798
810
|
r ? A = r.deriveS(L, p) : A = lt(v.id, p);
|
|
799
811
|
let d = { ...u.adjustedSpec };
|
|
800
|
-
|
|
812
|
+
s && (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" ?
|
|
821
|
+
data: () => u.type === "split" ? Ke(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 s = o.data();
|
|
837
|
+
if (!s) {
|
|
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: s
|
|
833
845
|
});
|
|
834
846
|
}
|
|
835
|
-
return
|
|
847
|
+
return n;
|
|
836
848
|
}
|
|
837
849
|
}
|
|
838
|
-
function ye(
|
|
839
|
-
const e = (
|
|
850
|
+
function ye(i) {
|
|
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((s) => t(s, o))
|
|
851
863
|
};
|
|
852
864
|
case "Or":
|
|
853
865
|
return {
|
|
854
|
-
...
|
|
855
|
-
operands:
|
|
866
|
+
...n,
|
|
867
|
+
operands: n.operands.map((s) => t(s, 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
|
|
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 i.map((n) => r(n, e));
|
|
870
882
|
}
|
|
871
|
-
function ee(
|
|
872
|
-
if (
|
|
883
|
+
function ee(i, e) {
|
|
884
|
+
if (i === 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 (i[t] !== e[t]) return !1;
|
|
876
888
|
return !0;
|
|
877
889
|
}
|
|
878
|
-
function ve(
|
|
879
|
-
return le(
|
|
890
|
+
function ve(i) {
|
|
891
|
+
return le(i, (e) => e instanceof S ? e.handle : ae(e) ? je(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 = {}, s = !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 ?? {}, s = t.refsWithEnrichments ?? !1))), typeof o == "object" ? Ae(n, (a) => a.obj, o ?? {}).map(({ value: { ref: a }, label: l }) => ({
|
|
907
|
+
ref: ce(a, s),
|
|
896
908
|
label: l
|
|
897
|
-
})) :
|
|
898
|
-
ref: ce(a,
|
|
899
|
-
label:
|
|
909
|
+
})) : n.map(({ ref: a, obj: l }) => ({
|
|
910
|
+
ref: ce(a, s),
|
|
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((s) => ({
|
|
981
|
+
value: s.id,
|
|
982
|
+
label: s.label
|
|
971
983
|
}));
|
|
972
984
|
}
|
|
973
985
|
/**
|
|
@@ -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 S(n, [e.blockId, e.name])
|
|
1038
1050
|
);
|
|
1039
1051
|
}
|
|
1040
1052
|
/**
|
|
@@ -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 s = e.axesSpec[o], a = n.axesSpec[o];
|
|
1095
|
+
if (s.name !== a.name || s.type !== a.type || !ee(s.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 s = 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 s !== null || (s = (l = a.getPColumnByRef(r)) == null ? void 0 : l.data), s;
|
|
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 s = JSON.parse(o);
|
|
1157
|
+
return Object.fromEntries(s.map((a) => [a, n[a] ?? "Unlabelled"]));
|
|
1146
1158
|
} else
|
|
1147
|
-
return
|
|
1159
|
+
return n;
|
|
1148
1160
|
}
|
|
1149
1161
|
}
|
|
1150
1162
|
class G {
|
|
@@ -1192,7 +1204,7 @@ class G {
|
|
|
1192
1204
|
return this.getNamedAccessor(We);
|
|
1193
1205
|
}
|
|
1194
1206
|
get outputs() {
|
|
1195
|
-
return this.getNamedAccessor(
|
|
1207
|
+
return this.getNamedAccessor(qe);
|
|
1196
1208
|
}
|
|
1197
1209
|
/**
|
|
1198
1210
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -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 S) || 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(i) {
|
|
1273
|
+
return i.__renderLambda === !0;
|
|
1262
1274
|
}
|
|
1263
|
-
function te(
|
|
1264
|
-
if (
|
|
1265
|
-
return pt(
|
|
1275
|
+
function te(i) {
|
|
1276
|
+
if (i !== void 0)
|
|
1277
|
+
return pt(i) ? i.handle : i;
|
|
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, s, a, l, y) {
|
|
1281
|
+
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = n, this._inputsValid = o, this._sections = s, 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 J(
|
|
1298
|
+
const n = `output#${e}`;
|
|
1299
|
+
return J(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
|
},
|
|
@@ -1493,7 +1505,7 @@ 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
1511
|
return globalThis.platformaApiVersion = e, Je() ? Pe({ sdkVersion: Y, apiVersion: platformaApiVersion }) : { config: t };
|
|
@@ -1512,12 +1524,12 @@ export {
|
|
|
1512
1524
|
kt as BasePlErrorLike,
|
|
1513
1525
|
Ot as ErrorLike,
|
|
1514
1526
|
w as FutureRef,
|
|
1515
|
-
|
|
1527
|
+
He as PAnnotationLabel,
|
|
1516
1528
|
Ge as PAnnotationTrace,
|
|
1517
1529
|
me as PColumnCollection,
|
|
1518
1530
|
Dt as PlErrorLike,
|
|
1519
1531
|
_t as PlIdLength,
|
|
1520
|
-
|
|
1532
|
+
N as RT_BINARY_PARTITIONED,
|
|
1521
1533
|
M as RT_BINARY_SUPER_PARTITIONED,
|
|
1522
1534
|
U as RT_JSON_PARTITIONED,
|
|
1523
1535
|
X as RT_JSON_SUPER_PARTITIONED,
|
|
@@ -1529,14 +1541,14 @@ export {
|
|
|
1529
1541
|
Ye as Trace,
|
|
1530
1542
|
ze as TraceEntry,
|
|
1531
1543
|
S as TreeNodeAccessor,
|
|
1532
|
-
|
|
1544
|
+
Ne as canonicalizeAxisId,
|
|
1533
1545
|
rt as convertOrParsePColumnData,
|
|
1534
|
-
|
|
1546
|
+
$e as dataInfoToEntries,
|
|
1535
1547
|
Ae as deriveLabels,
|
|
1536
1548
|
De as deriveNativeId,
|
|
1537
1549
|
te as downgradeCfgOrLambda,
|
|
1538
1550
|
Oe as ensurePColumn,
|
|
1539
|
-
|
|
1551
|
+
Ke as entriesToDataInfo,
|
|
1540
1552
|
Ee as extractAllColumns,
|
|
1541
1553
|
nt as filterDataInfoEntries,
|
|
1542
1554
|
wt as getAxesId,
|
|
@@ -1557,7 +1569,7 @@ export {
|
|
|
1557
1569
|
z as isPColumnSpec,
|
|
1558
1570
|
Re as isPartitionedDataInfoEntries,
|
|
1559
1571
|
Fe as isPlRef,
|
|
1560
|
-
|
|
1572
|
+
je as mapDataInfo,
|
|
1561
1573
|
St as mapJoinEntry,
|
|
1562
1574
|
le as mapPObjectData,
|
|
1563
1575
|
Te as mapPTableDef,
|