@milaboratories/milaboratories.ui-examples.model 1.1.57 → 1.1.59
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 +7 -7
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +261 -257
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -3948,13 +3948,13 @@
|
|
|
3948
3948
|
quotelessJson,
|
|
3949
3949
|
ZodError
|
|
3950
3950
|
});
|
|
3951
|
-
var $ = Object.defineProperty;
|
|
3952
|
-
var D = (n2, e, t) => e in n2 ? $(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
|
|
3951
|
+
var I$1 = Object.defineProperty;
|
|
3952
|
+
var D = (n2, e, t) => e in n2 ? I$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
|
|
3953
3953
|
var l$1 = (n2, e, t) => D(n2, typeof e != "symbol" ? e + "" : e, t);
|
|
3954
3954
|
function w(n2) {
|
|
3955
3955
|
throw new Error("Unexpected object: " + n2);
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function yn(n2) {
|
|
3958
3958
|
if (!n2 || typeof n2 != "object")
|
|
3959
3959
|
return false;
|
|
3960
3960
|
const e = n2;
|
|
@@ -3971,7 +3971,7 @@
|
|
|
3971
3971
|
return false;
|
|
3972
3972
|
}
|
|
3973
3973
|
}
|
|
3974
|
-
function
|
|
3974
|
+
function hn(n2, e) {
|
|
3975
3975
|
if (n2 !== void 0)
|
|
3976
3976
|
switch (n2.type) {
|
|
3977
3977
|
case "Json":
|
|
@@ -4016,10 +4016,10 @@
|
|
|
4016
4016
|
return false;
|
|
4017
4017
|
}
|
|
4018
4018
|
}
|
|
4019
|
-
function
|
|
4019
|
+
function gn(n2) {
|
|
4020
4020
|
return F$1(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4021
4021
|
}
|
|
4022
|
-
function
|
|
4022
|
+
function bn(n2) {
|
|
4023
4023
|
switch (n2.type) {
|
|
4024
4024
|
case "Json": {
|
|
4025
4025
|
const e = Object.entries(n2.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
@@ -4047,7 +4047,7 @@
|
|
|
4047
4047
|
}
|
|
4048
4048
|
}
|
|
4049
4049
|
}
|
|
4050
|
-
function
|
|
4050
|
+
function wn(n2) {
|
|
4051
4051
|
switch (n2.type) {
|
|
4052
4052
|
case "Json": {
|
|
4053
4053
|
const e = {};
|
|
@@ -4081,7 +4081,7 @@
|
|
|
4081
4081
|
}
|
|
4082
4082
|
}
|
|
4083
4083
|
}
|
|
4084
|
-
function
|
|
4084
|
+
function On(n2) {
|
|
4085
4085
|
return {
|
|
4086
4086
|
columnId: n2.id,
|
|
4087
4087
|
spec: n2.spec
|
|
@@ -4094,7 +4094,7 @@
|
|
|
4094
4094
|
function C(n2) {
|
|
4095
4095
|
return n2.map(p$1);
|
|
4096
4096
|
}
|
|
4097
|
-
function
|
|
4097
|
+
function $n(n2) {
|
|
4098
4098
|
return De(p$1(n2));
|
|
4099
4099
|
}
|
|
4100
4100
|
function z$1(n2, e) {
|
|
@@ -4107,7 +4107,7 @@
|
|
|
4107
4107
|
function X(n2, e) {
|
|
4108
4108
|
return n2.name === e.name && z$1(n2.domain, e.domain);
|
|
4109
4109
|
}
|
|
4110
|
-
function
|
|
4110
|
+
function In(n2, e) {
|
|
4111
4111
|
return { ...n2, src: h(n2.src, e) };
|
|
4112
4112
|
}
|
|
4113
4113
|
function h(n2, e) {
|
|
@@ -4142,7 +4142,7 @@
|
|
|
4142
4142
|
w(n2);
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
|
-
function G
|
|
4145
|
+
function G(n2) {
|
|
4146
4146
|
return De(n2);
|
|
4147
4147
|
}
|
|
4148
4148
|
function x(n2) {
|
|
@@ -4151,7 +4151,7 @@
|
|
|
4151
4151
|
function A(n2, e) {
|
|
4152
4152
|
return JSON.stringify([n2, e]);
|
|
4153
4153
|
}
|
|
4154
|
-
class
|
|
4154
|
+
class Ln {
|
|
4155
4155
|
/**
|
|
4156
4156
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4157
4157
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -4242,10 +4242,10 @@
|
|
|
4242
4242
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4243
4243
|
*/
|
|
4244
4244
|
deriveS(e, t) {
|
|
4245
|
-
return G
|
|
4245
|
+
return G(this.derive(e, t));
|
|
4246
4246
|
}
|
|
4247
4247
|
}
|
|
4248
|
-
function
|
|
4248
|
+
function Vn(n2, e, t) {
|
|
4249
4249
|
const r = { ...e }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
|
|
4250
4250
|
if (r.domainAnchor !== void 0) {
|
|
4251
4251
|
const s2 = n2[r.domainAnchor];
|
|
@@ -4272,10 +4272,10 @@
|
|
|
4272
4272
|
}
|
|
4273
4273
|
r.domain = s2;
|
|
4274
4274
|
}
|
|
4275
|
-
return r.axes && (r.axes = r.axes.map((s2) => Q
|
|
4275
|
+
return r.axes && (r.axes = r.axes.map((s2) => Q(n2, s2))), r;
|
|
4276
4276
|
}
|
|
4277
|
-
function Q
|
|
4278
|
-
if (!Y(e))
|
|
4277
|
+
function Q(n2, e) {
|
|
4278
|
+
if (!Y$1(e))
|
|
4279
4279
|
return e;
|
|
4280
4280
|
const t = e.anchor, r = n2[t];
|
|
4281
4281
|
if (!r)
|
|
@@ -4301,26 +4301,26 @@
|
|
|
4301
4301
|
}
|
|
4302
4302
|
throw new Error("Unsupported axis reference type");
|
|
4303
4303
|
}
|
|
4304
|
-
function Y(n2) {
|
|
4304
|
+
function Y$1(n2) {
|
|
4305
4305
|
return typeof n2 == "object" && "anchor" in n2;
|
|
4306
4306
|
}
|
|
4307
4307
|
function f$1(n2) {
|
|
4308
4308
|
return n2.kind === "PColumn";
|
|
4309
4309
|
}
|
|
4310
|
-
function Z(n2) {
|
|
4310
|
+
function Z$1(n2) {
|
|
4311
4311
|
return f$1(n2.spec);
|
|
4312
4312
|
}
|
|
4313
|
-
function
|
|
4314
|
-
if (!Z(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4313
|
+
function Un(n2) {
|
|
4314
|
+
if (!Z$1(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4315
4315
|
return n2;
|
|
4316
4316
|
}
|
|
4317
|
-
function
|
|
4317
|
+
function Kn(n2, e) {
|
|
4318
4318
|
return n2 === void 0 ? void 0 : {
|
|
4319
4319
|
...n2,
|
|
4320
4320
|
data: e(n2.data)
|
|
4321
4321
|
};
|
|
4322
4322
|
}
|
|
4323
|
-
function
|
|
4323
|
+
function Rn$1(n2) {
|
|
4324
4324
|
const e = /* @__PURE__ */ new Map(), t = (r) => {
|
|
4325
4325
|
switch (r.type) {
|
|
4326
4326
|
case "column":
|
|
@@ -4409,10 +4409,10 @@
|
|
|
4409
4409
|
}
|
|
4410
4410
|
return true;
|
|
4411
4411
|
}
|
|
4412
|
-
function
|
|
4412
|
+
function vn(n2) {
|
|
4413
4413
|
return Array.isArray(n2) ? (e) => n2.some((t) => f$1(e) && N(e, t)) : (e) => f$1(e) && N(e, n2);
|
|
4414
4414
|
}
|
|
4415
|
-
function
|
|
4415
|
+
function _n(n2) {
|
|
4416
4416
|
const e = {
|
|
4417
4417
|
kind: n2.kind,
|
|
4418
4418
|
name: n2.name
|
|
@@ -4427,10 +4427,10 @@
|
|
|
4427
4427
|
}).describe(
|
|
4428
4428
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
4429
4429
|
).readonly();
|
|
4430
|
-
function
|
|
4430
|
+
function Hn(n2) {
|
|
4431
4431
|
return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
|
|
4432
4432
|
}
|
|
4433
|
-
function
|
|
4433
|
+
function Wn(n2, e = true) {
|
|
4434
4434
|
if (e)
|
|
4435
4435
|
return {
|
|
4436
4436
|
...n2,
|
|
@@ -4441,11 +4441,14 @@
|
|
|
4441
4441
|
return r;
|
|
4442
4442
|
}
|
|
4443
4443
|
}
|
|
4444
|
-
function
|
|
4444
|
+
function Xn(n2, e) {
|
|
4445
4445
|
return n2.ok ? { ok: true, value: e(n2.value) } : n2;
|
|
4446
4446
|
}
|
|
4447
4447
|
const sn = 24;
|
|
4448
4448
|
z$2.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4449
|
+
function ne(n2) {
|
|
4450
|
+
return JSON.parse(n2);
|
|
4451
|
+
}
|
|
4449
4452
|
var stringify = { exports: {} };
|
|
4450
4453
|
(function(module2, exports3) {
|
|
4451
4454
|
exports3 = module2.exports = stringify2;
|
|
@@ -4501,33 +4504,33 @@
|
|
|
4501
4504
|
var ze = Object.defineProperty;
|
|
4502
4505
|
var Ye = (t, e, n2) => e in t ? ze(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4503
4506
|
var F = (t, e, n2) => Ye(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4504
|
-
function
|
|
4507
|
+
function re(t) {
|
|
4505
4508
|
return { type: "Immediate", value: t };
|
|
4506
4509
|
}
|
|
4507
|
-
function
|
|
4510
|
+
function ft() {
|
|
4508
4511
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4509
4512
|
}
|
|
4510
|
-
function
|
|
4513
|
+
function Re(t) {
|
|
4511
4514
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4512
4515
|
return globalThis.getPlatforma(t);
|
|
4513
4516
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4514
4517
|
throw new Error("Can't get platforma instance.");
|
|
4515
4518
|
}
|
|
4516
|
-
function
|
|
4519
|
+
function ht() {
|
|
4517
4520
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4518
4521
|
}
|
|
4519
4522
|
function f() {
|
|
4520
4523
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4521
4524
|
throw new Error("Not in config rendering context");
|
|
4522
4525
|
}
|
|
4523
|
-
function
|
|
4524
|
-
const n2 =
|
|
4526
|
+
function H(t, e) {
|
|
4527
|
+
const n2 = ht();
|
|
4525
4528
|
if (n2 === void 0) return false;
|
|
4526
4529
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4527
4530
|
return n2.callbackRegistry[t] = e, true;
|
|
4528
4531
|
}
|
|
4529
4532
|
const ue = /* @__PURE__ */ new Map();
|
|
4530
|
-
function
|
|
4533
|
+
function gt(t, e) {
|
|
4531
4534
|
t in f().callbackRegistry || (f().callbackRegistry[t] = (n2) => {
|
|
4532
4535
|
for (const r of ue.get(t))
|
|
4533
4536
|
r(n2);
|
|
@@ -4537,7 +4540,7 @@
|
|
|
4537
4540
|
constructor(e, n2 = (r) => r) {
|
|
4538
4541
|
F(this, "isResolved", false);
|
|
4539
4542
|
F(this, "resolvedValue");
|
|
4540
|
-
this.handle = e, this.postProcess = n2,
|
|
4543
|
+
this.handle = e, this.postProcess = n2, gt(e, (r) => {
|
|
4541
4544
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4542
4545
|
});
|
|
4543
4546
|
}
|
|
@@ -4554,7 +4557,7 @@
|
|
|
4554
4557
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4555
4558
|
}
|
|
4556
4559
|
}
|
|
4557
|
-
function
|
|
4560
|
+
function de(t, e) {
|
|
4558
4561
|
return t === void 0 ? void 0 : e(t);
|
|
4559
4562
|
}
|
|
4560
4563
|
class E {
|
|
@@ -4596,7 +4599,7 @@
|
|
|
4596
4599
|
...this.resolvePath,
|
|
4597
4600
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4598
4601
|
];
|
|
4599
|
-
return
|
|
4602
|
+
return de(
|
|
4600
4603
|
f().resolveWithCommon(this.handle, e, ...n2),
|
|
4601
4604
|
(i) => new E(i, r)
|
|
4602
4605
|
);
|
|
@@ -4618,7 +4621,7 @@
|
|
|
4618
4621
|
}
|
|
4619
4622
|
getError() {
|
|
4620
4623
|
const e = [...this.resolvePath, "error"];
|
|
4621
|
-
return
|
|
4624
|
+
return de(
|
|
4622
4625
|
f().getError(this.handle),
|
|
4623
4626
|
(n2) => new E(n2, e)
|
|
4624
4627
|
);
|
|
@@ -4660,7 +4663,7 @@
|
|
|
4660
4663
|
getPColumns(e = false, n2 = "") {
|
|
4661
4664
|
const r = this.parsePObjectCollection(e, n2);
|
|
4662
4665
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
|
|
4663
|
-
if (!Z(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4666
|
+
if (!Z$1(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4664
4667
|
return s2;
|
|
4665
4668
|
});
|
|
4666
4669
|
}
|
|
@@ -4678,20 +4681,20 @@
|
|
|
4678
4681
|
const i = {};
|
|
4679
4682
|
for (const [s2, o] of Object.entries(r)) {
|
|
4680
4683
|
const a = [...this.resolvePath, s2];
|
|
4681
|
-
i[s2] =
|
|
4684
|
+
i[s2] = Kn(o, (l2) => new E(l2, a));
|
|
4682
4685
|
}
|
|
4683
4686
|
return i;
|
|
4684
4687
|
}
|
|
4685
|
-
getFileContentAsBase64() {
|
|
4686
|
-
return new I(f().getBlobContentAsBase64(this.handle));
|
|
4688
|
+
getFileContentAsBase64(e) {
|
|
4689
|
+
return new I(f().getBlobContentAsBase64(this.handle, e));
|
|
4687
4690
|
}
|
|
4688
|
-
getFileContentAsString() {
|
|
4689
|
-
return new I(f().getBlobContentAsString(this.handle));
|
|
4691
|
+
getFileContentAsString(e) {
|
|
4692
|
+
return new I(f().getBlobContentAsString(this.handle, e));
|
|
4690
4693
|
}
|
|
4691
|
-
getFileContentAsJson() {
|
|
4694
|
+
getFileContentAsJson(e) {
|
|
4692
4695
|
return new I(
|
|
4693
|
-
f().getBlobContentAsString(this.handle)
|
|
4694
|
-
).mapDefined((
|
|
4696
|
+
f().getBlobContentAsString(this.handle, e)
|
|
4697
|
+
).mapDefined((n2) => JSON.parse(n2));
|
|
4695
4698
|
}
|
|
4696
4699
|
/**
|
|
4697
4700
|
* @deprecated use getFileContentAsBase64
|
|
@@ -4774,76 +4777,76 @@
|
|
|
4774
4777
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4775
4778
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4776
4779
|
);
|
|
4777
|
-
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2,
|
|
4780
|
+
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, d]) => o(u2, d));
|
|
4778
4781
|
}
|
|
4779
4782
|
}
|
|
4780
|
-
const
|
|
4781
|
-
const
|
|
4783
|
+
const Oe = "staging", ke = "main";
|
|
4784
|
+
const vt = "pl7.app/label", bt = "pl7.app/trace", wt = z$2.object({
|
|
4782
4785
|
type: z$2.string(),
|
|
4783
4786
|
importance: z$2.number().optional(),
|
|
4784
4787
|
id: z$2.string().optional(),
|
|
4785
4788
|
label: z$2.string()
|
|
4786
|
-
}),
|
|
4789
|
+
}), At = z$2.array(wt), xt = 1e-3, Pt = "__LABEL__", Ce = "__LABEL__@1";
|
|
4787
4790
|
function Ve(t, e, n2 = {}) {
|
|
4788
4791
|
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((g) => {
|
|
4789
|
-
var S,
|
|
4792
|
+
var S, O;
|
|
4790
4793
|
const m2 = e(g);
|
|
4791
|
-
let c2,
|
|
4792
|
-
"spec" in m2 && typeof m2.spec == "object" ? (c2 = m2.spec,
|
|
4793
|
-
const
|
|
4794
|
-
...
|
|
4795
|
-
...
|
|
4796
|
-
...
|
|
4794
|
+
let c2, v, b;
|
|
4795
|
+
"spec" in m2 && typeof m2.spec == "object" ? (c2 = m2.spec, v = m2.prefixTrace, b = m2.suffixTrace) : c2 = m2;
|
|
4796
|
+
const p2 = (S = c2.annotations) == null ? void 0 : S[vt], A2 = (O = c2.annotations) == null ? void 0 : O[bt], x2 = (A2 ? At.safeParse(JSON.parse(A2)).data : void 0) ?? [], y = [
|
|
4797
|
+
...v ?? [],
|
|
4798
|
+
...x2,
|
|
4799
|
+
...b ?? []
|
|
4797
4800
|
];
|
|
4798
|
-
if (
|
|
4799
|
-
const D2 = { label:
|
|
4800
|
-
n2.addLabelAsSuffix ?
|
|
4801
|
-
}
|
|
4802
|
-
const
|
|
4803
|
-
for (let D2 =
|
|
4804
|
-
const { type:
|
|
4805
|
-
T.set(
|
|
4806
|
-
const k2 = `${
|
|
4801
|
+
if (p2 !== void 0) {
|
|
4802
|
+
const D2 = { label: p2, type: Pt, importance: -2 };
|
|
4803
|
+
n2.addLabelAsSuffix ? y.push(D2) : y.splice(0, 0, D2);
|
|
4804
|
+
}
|
|
4805
|
+
const P = [], T = /* @__PURE__ */ new Map();
|
|
4806
|
+
for (let D2 = y.length - 1; D2 >= 0; --D2) {
|
|
4807
|
+
const { type: W } = y[D2], j = y[D2].importance ?? 0, $ = (T.get(W) ?? 0) + 1;
|
|
4808
|
+
T.set(W, $);
|
|
4809
|
+
const k2 = `${W}@${$}`;
|
|
4807
4810
|
s2.set(k2, (s2.get(k2) ?? 0) + 1), r.set(
|
|
4808
4811
|
k2,
|
|
4809
4812
|
Math.max(
|
|
4810
4813
|
r.get(k2) ?? Number.NEGATIVE_INFINITY,
|
|
4811
|
-
j - (
|
|
4814
|
+
j - (y.length - D2) * xt
|
|
4812
4815
|
)
|
|
4813
|
-
),
|
|
4816
|
+
), P.push({ ...y[D2], fullType: k2, occurrenceIndex: $ });
|
|
4814
4817
|
}
|
|
4815
|
-
return
|
|
4818
|
+
return P.reverse(), {
|
|
4816
4819
|
value: g,
|
|
4817
4820
|
spec: c2,
|
|
4818
|
-
label:
|
|
4819
|
-
fullTrace:
|
|
4821
|
+
label: p2,
|
|
4822
|
+
fullTrace: P
|
|
4820
4823
|
};
|
|
4821
4824
|
}), a = [], l2 = [], u2 = [...r];
|
|
4822
4825
|
u2.sort(([, g], [, m2]) => m2 - g);
|
|
4823
4826
|
for (const [g] of u2)
|
|
4824
4827
|
g.endsWith("@1") || s2.get(g) === t.length ? a.push(g) : l2.push(g);
|
|
4825
|
-
const
|
|
4828
|
+
const d = (g, m2 = false) => {
|
|
4826
4829
|
const c2 = [];
|
|
4827
|
-
for (let
|
|
4828
|
-
const
|
|
4829
|
-
if (
|
|
4830
|
+
for (let v = 0; v < o.length; v++) {
|
|
4831
|
+
const b = o[v], p2 = b.fullTrace.filter((y) => g.has(y.fullType) || i && i.has(y.type));
|
|
4832
|
+
if (p2.length === 0)
|
|
4830
4833
|
if (m2)
|
|
4831
4834
|
c2.push({
|
|
4832
4835
|
label: "Unlabeled",
|
|
4833
|
-
value:
|
|
4836
|
+
value: b.value
|
|
4834
4837
|
});
|
|
4835
4838
|
else return;
|
|
4836
|
-
const A2 =
|
|
4839
|
+
const A2 = p2.map((y) => y.label), x2 = n2.separator ?? " / ";
|
|
4837
4840
|
c2.push({
|
|
4838
|
-
label: A2.join(
|
|
4839
|
-
value:
|
|
4841
|
+
label: A2.join(x2),
|
|
4842
|
+
value: b.value
|
|
4840
4843
|
});
|
|
4841
4844
|
}
|
|
4842
4845
|
return c2;
|
|
4843
4846
|
};
|
|
4844
4847
|
if (a.length === 0) {
|
|
4845
4848
|
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4846
|
-
return
|
|
4849
|
+
return d(new Set(Ce), true);
|
|
4847
4850
|
}
|
|
4848
4851
|
let h2 = 0, w2 = -1;
|
|
4849
4852
|
for (; h2 < a.length; ) {
|
|
@@ -4851,13 +4854,13 @@
|
|
|
4851
4854
|
n2.includeNativeLabel && g.add(Ce);
|
|
4852
4855
|
for (let c2 = 0; c2 < h2; ++c2) g.add(a[c2]);
|
|
4853
4856
|
w2 >= 0 && g.add(a[w2]);
|
|
4854
|
-
const m2 =
|
|
4857
|
+
const m2 = d(g);
|
|
4855
4858
|
if (m2 !== void 0 && new Set(m2.map((c2) => c2.label)).size === t.length) return m2;
|
|
4856
4859
|
w2++, w2 >= a.length && (h2++, w2 = h2);
|
|
4857
4860
|
}
|
|
4858
|
-
return
|
|
4861
|
+
return d(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
4859
4862
|
}
|
|
4860
|
-
const
|
|
4863
|
+
const Z = "PColumnData/", se = Z + "ResourceMap", oe = Z + "Partitioned/ResourceMap", q = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ke = Z + "Partitioned/", ae = Ke + "JsonPartitioned", z = Ke + "BinaryPartitioned";
|
|
4861
4864
|
const he = (t) => {
|
|
4862
4865
|
if (t.endsWith(".index"))
|
|
4863
4866
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
@@ -4865,7 +4868,7 @@
|
|
|
4865
4868
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4866
4869
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4867
4870
|
};
|
|
4868
|
-
function
|
|
4871
|
+
function Ct(t) {
|
|
4869
4872
|
if (!t) return;
|
|
4870
4873
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4871
4874
|
let i = 0;
|
|
@@ -4876,18 +4879,18 @@
|
|
|
4876
4879
|
case oe:
|
|
4877
4880
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4878
4881
|
break;
|
|
4879
|
-
case
|
|
4882
|
+
case q:
|
|
4880
4883
|
case B:
|
|
4881
4884
|
i = n2.partitionKeyLength;
|
|
4882
4885
|
break;
|
|
4883
|
-
case
|
|
4886
|
+
case z:
|
|
4884
4887
|
case ae:
|
|
4885
4888
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4886
4889
|
break;
|
|
4887
4890
|
}
|
|
4888
4891
|
switch (e) {
|
|
4889
4892
|
case se:
|
|
4890
|
-
case
|
|
4893
|
+
case q:
|
|
4891
4894
|
case B:
|
|
4892
4895
|
for (let s2 of t.listInputFields()) {
|
|
4893
4896
|
e === B && (s2 = he(s2).baseKey);
|
|
@@ -4896,13 +4899,13 @@
|
|
|
4896
4899
|
}
|
|
4897
4900
|
break;
|
|
4898
4901
|
case oe:
|
|
4899
|
-
case
|
|
4902
|
+
case z:
|
|
4900
4903
|
case ae:
|
|
4901
4904
|
for (const s2 of t.listInputFields()) {
|
|
4902
4905
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4903
4906
|
if (a !== void 0)
|
|
4904
4907
|
for (let l2 of a.listInputFields()) {
|
|
4905
|
-
e ===
|
|
4908
|
+
e === z && (l2 = he(l2).baseKey);
|
|
4906
4909
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4907
4910
|
r.push(u2);
|
|
4908
4911
|
}
|
|
@@ -4911,7 +4914,7 @@
|
|
|
4911
4914
|
}
|
|
4912
4915
|
return { data: r, keyLength: i };
|
|
4913
4916
|
}
|
|
4914
|
-
function
|
|
4917
|
+
function St(t) {
|
|
4915
4918
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4916
4919
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4917
4920
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4930,11 +4933,11 @@
|
|
|
4930
4933
|
}
|
|
4931
4934
|
return r.map((i) => Array.from(i.values()));
|
|
4932
4935
|
}
|
|
4933
|
-
function
|
|
4936
|
+
function _t(t) {
|
|
4934
4937
|
if (t === void 0) return;
|
|
4935
4938
|
if (F$1(t))
|
|
4936
|
-
return
|
|
4937
|
-
const e =
|
|
4939
|
+
return St(t);
|
|
4940
|
+
const e = Ct(t);
|
|
4938
4941
|
if (!e) return;
|
|
4939
4942
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4940
4943
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4950,13 +4953,13 @@
|
|
|
4950
4953
|
function ge(t, e = []) {
|
|
4951
4954
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4952
4955
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4953
|
-
if (e.length > 0 && (n2 === ae || n2 ===
|
|
4956
|
+
if (e.length > 0 && (n2 === ae || n2 === z))
|
|
4954
4957
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4955
4958
|
switch (n2) {
|
|
4956
4959
|
case se:
|
|
4957
4960
|
case oe:
|
|
4958
4961
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4959
|
-
case
|
|
4962
|
+
case q: {
|
|
4960
4963
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4961
4964
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4962
4965
|
const i = [];
|
|
@@ -5006,8 +5009,8 @@
|
|
|
5006
5009
|
for (const o of t.listInputFields()) {
|
|
5007
5010
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5008
5011
|
if (a === void 0) return;
|
|
5009
|
-
if (a.resourceType.name !==
|
|
5010
|
-
throw new Error(`Expected ${
|
|
5012
|
+
if (a.resourceType.name !== q)
|
|
5013
|
+
throw new Error(`Expected ${q} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5011
5014
|
const l2 = ge(a, JSON.parse(o));
|
|
5012
5015
|
if (l2 === void 0) return;
|
|
5013
5016
|
if (l2.type !== "JsonPartitioned")
|
|
@@ -5020,7 +5023,7 @@
|
|
|
5020
5023
|
parts: s2
|
|
5021
5024
|
};
|
|
5022
5025
|
}
|
|
5023
|
-
case
|
|
5026
|
+
case z: {
|
|
5024
5027
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5025
5028
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5026
5029
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
@@ -5045,15 +5048,15 @@
|
|
|
5045
5048
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5046
5049
|
}
|
|
5047
5050
|
}
|
|
5048
|
-
function
|
|
5051
|
+
function It(t) {
|
|
5049
5052
|
if (t !== void 0) {
|
|
5050
5053
|
if (F$1(t)) return t;
|
|
5051
|
-
if (
|
|
5054
|
+
if (yn(t)) return bn(t);
|
|
5052
5055
|
if (t instanceof E) return ge(t);
|
|
5053
5056
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5054
5057
|
}
|
|
5055
5058
|
}
|
|
5056
|
-
function
|
|
5059
|
+
function Tt(t, e) {
|
|
5057
5060
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5058
5061
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5059
5062
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5113,29 +5116,29 @@
|
|
|
5113
5116
|
}
|
|
5114
5117
|
}
|
|
5115
5118
|
}
|
|
5116
|
-
class
|
|
5119
|
+
class Lt {
|
|
5117
5120
|
constructor(e) {
|
|
5118
5121
|
this.columns = e;
|
|
5119
5122
|
}
|
|
5120
5123
|
selectColumns(e) {
|
|
5121
|
-
const n2 = typeof e == "function" ? e :
|
|
5124
|
+
const n2 = typeof e == "function" ? e : vn(e);
|
|
5122
5125
|
return this.columns.filter((r) => n2(r.spec));
|
|
5123
5126
|
}
|
|
5124
5127
|
}
|
|
5125
|
-
function
|
|
5128
|
+
function Et(t) {
|
|
5126
5129
|
if (t)
|
|
5127
5130
|
return t.map((e) => ({
|
|
5128
|
-
type: `split:${
|
|
5131
|
+
type: `split:${$n(e.axisId)}`,
|
|
5129
5132
|
label: e.label,
|
|
5130
5133
|
importance: 1e6
|
|
5131
5134
|
// High importance for split filters in labels
|
|
5132
5135
|
}));
|
|
5133
5136
|
}
|
|
5134
|
-
function
|
|
5137
|
+
function Dt(t) {
|
|
5135
5138
|
if (t)
|
|
5136
5139
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5137
5140
|
}
|
|
5138
|
-
function
|
|
5141
|
+
function Ft(t, e) {
|
|
5139
5142
|
if (!e || e.length === 0) return t;
|
|
5140
5143
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5141
5144
|
return De({ id: t, axisFilters: n2 });
|
|
@@ -5145,7 +5148,7 @@
|
|
|
5145
5148
|
const e = t, n2 = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
5146
5149
|
return !!e.domainAnchor || n2 || r;
|
|
5147
5150
|
}
|
|
5148
|
-
function
|
|
5151
|
+
function Rt(t) {
|
|
5149
5152
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5150
5153
|
return [];
|
|
5151
5154
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5156,7 +5159,7 @@
|
|
|
5156
5159
|
class me {
|
|
5157
5160
|
constructor() {
|
|
5158
5161
|
F(this, "defaultProviderStore", []);
|
|
5159
|
-
F(this, "providers", [new
|
|
5162
|
+
F(this, "providers", [new Lt(this.defaultProviderStore)]);
|
|
5160
5163
|
F(this, "axisLabelProviders", []);
|
|
5161
5164
|
}
|
|
5162
5165
|
addColumnProvider(e) {
|
|
@@ -5185,94 +5188,94 @@
|
|
|
5185
5188
|
};
|
|
5186
5189
|
let u2 = () => false;
|
|
5187
5190
|
if (a) {
|
|
5188
|
-
const c2 = (Array.isArray(a) ? a : [a]).map((
|
|
5189
|
-
if (Se(
|
|
5191
|
+
const c2 = (Array.isArray(a) ? a : [a]).map((v) => {
|
|
5192
|
+
if (Se(v)) {
|
|
5190
5193
|
if (!r)
|
|
5191
5194
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5192
|
-
return
|
|
5195
|
+
return vn(Vn(r.anchors, v, n2));
|
|
5193
5196
|
} else
|
|
5194
|
-
return
|
|
5197
|
+
return vn(v);
|
|
5195
5198
|
});
|
|
5196
|
-
u2 = (
|
|
5199
|
+
u2 = (v) => c2.some((b) => b(v));
|
|
5197
5200
|
}
|
|
5198
|
-
const
|
|
5199
|
-
for (const c2 of
|
|
5200
|
-
const
|
|
5201
|
-
let
|
|
5202
|
-
if (
|
|
5201
|
+
const d = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h2 = [], w2 = /* @__PURE__ */ new Set();
|
|
5202
|
+
for (const c2 of d) {
|
|
5203
|
+
const v = Se(c2);
|
|
5204
|
+
let b;
|
|
5205
|
+
if (v) {
|
|
5203
5206
|
if (!r)
|
|
5204
5207
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5205
|
-
|
|
5208
|
+
b = Vn(r.anchors, c2, n2);
|
|
5206
5209
|
} else
|
|
5207
|
-
|
|
5208
|
-
const
|
|
5209
|
-
for (const
|
|
5210
|
-
const T =
|
|
5210
|
+
b = c2;
|
|
5211
|
+
const p2 = /* @__PURE__ */ new Set(), A2 = [];
|
|
5212
|
+
for (const P of this.providers) {
|
|
5213
|
+
const T = P.selectColumns(b);
|
|
5211
5214
|
for (const S of T) {
|
|
5212
5215
|
if (u2(S.spec)) continue;
|
|
5213
|
-
if (
|
|
5214
|
-
throw new Error(`Duplicate column id ${S.id} in provider ${
|
|
5215
|
-
const
|
|
5216
|
-
w2.has(
|
|
5216
|
+
if (p2.has(S.id))
|
|
5217
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${P.constructor.name}`);
|
|
5218
|
+
const O = _n(S.spec);
|
|
5219
|
+
w2.has(O) || (p2.add(S.id), w2.add(O), A2.push(S));
|
|
5217
5220
|
}
|
|
5218
5221
|
}
|
|
5219
5222
|
if (A2.length === 0) continue;
|
|
5220
|
-
const
|
|
5221
|
-
for (const
|
|
5222
|
-
if (!f$1(
|
|
5223
|
-
const T =
|
|
5224
|
-
if (
|
|
5225
|
-
const S =
|
|
5223
|
+
const x2 = Rt(c2), y = x2.length > 0;
|
|
5224
|
+
for (const P of A2) {
|
|
5225
|
+
if (!f$1(P.spec)) continue;
|
|
5226
|
+
const T = P.spec;
|
|
5227
|
+
if (y) {
|
|
5228
|
+
const S = It(P.data);
|
|
5226
5229
|
if (!S) {
|
|
5227
5230
|
if (s2) continue;
|
|
5228
5231
|
return;
|
|
5229
5232
|
}
|
|
5230
|
-
if (!
|
|
5231
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${
|
|
5232
|
-
const
|
|
5233
|
+
if (!gn(S))
|
|
5234
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${P.id}`);
|
|
5235
|
+
const O = _t(S), D2 = x2[x2.length - 1];
|
|
5233
5236
|
if (D2 >= S.partitionKeyLength)
|
|
5234
5237
|
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D2}) in column ${T.name}`);
|
|
5235
|
-
const
|
|
5236
|
-
if (
|
|
5238
|
+
const W = x2.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j = [], $ = (_, G2) => {
|
|
5239
|
+
if (G2 >= x2.length) {
|
|
5237
5240
|
if (j.push([..._]), j.length > 1e4)
|
|
5238
5241
|
throw new Error("Too many key combinations, aborting.");
|
|
5239
5242
|
return;
|
|
5240
5243
|
}
|
|
5241
|
-
const V =
|
|
5242
|
-
if (V >=
|
|
5243
|
-
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${
|
|
5244
|
-
const J =
|
|
5244
|
+
const V = x2[G2];
|
|
5245
|
+
if (V >= O.length)
|
|
5246
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${P.id}`);
|
|
5247
|
+
const J = O[V];
|
|
5245
5248
|
if (!J || J.length === 0) {
|
|
5246
5249
|
j.length = 0;
|
|
5247
5250
|
return;
|
|
5248
5251
|
}
|
|
5249
|
-
for (const
|
|
5250
|
-
_.push(
|
|
5252
|
+
for (const ee of J)
|
|
5253
|
+
_.push(ee), $(_, G2 + 1), _.pop();
|
|
5251
5254
|
};
|
|
5252
|
-
if ($
|
|
5255
|
+
if ($([], 0), j.length === 0)
|
|
5253
5256
|
continue;
|
|
5254
|
-
const k2 = [...T.axesSpec], We =
|
|
5255
|
-
for (let _ =
|
|
5256
|
-
k2.splice(
|
|
5257
|
+
const k2 = [...T.axesSpec], We = x2.map((_) => _);
|
|
5258
|
+
for (let _ = x2.length - 1; _ >= 0; _--)
|
|
5259
|
+
k2.splice(x2[_], 1);
|
|
5257
5260
|
const Ge = { ...T, axesSpec: k2 };
|
|
5258
5261
|
for (const _ of j) {
|
|
5259
|
-
const
|
|
5260
|
-
const
|
|
5261
|
-
return { axisIdx:
|
|
5262
|
+
const G2 = _.map((V, J) => {
|
|
5263
|
+
const ee = We[J], He = p$1(T.axesSpec[ee]), le = W[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
5264
|
+
return { axisIdx: ee, axisId: He, value: V, label: qe };
|
|
5262
5265
|
});
|
|
5263
5266
|
h2.push({
|
|
5264
5267
|
type: "split",
|
|
5265
|
-
originalColumn:
|
|
5268
|
+
originalColumn: P,
|
|
5266
5269
|
spec: T,
|
|
5267
5270
|
adjustedSpec: Ge,
|
|
5268
5271
|
dataEntries: S,
|
|
5269
|
-
axisFilters:
|
|
5272
|
+
axisFilters: G2
|
|
5270
5273
|
});
|
|
5271
5274
|
}
|
|
5272
5275
|
} else
|
|
5273
5276
|
h2.push({
|
|
5274
5277
|
type: "direct",
|
|
5275
|
-
originalColumn:
|
|
5278
|
+
originalColumn: P,
|
|
5276
5279
|
spec: T,
|
|
5277
5280
|
adjustedSpec: T
|
|
5278
5281
|
});
|
|
@@ -5283,26 +5286,26 @@
|
|
|
5283
5286
|
h2,
|
|
5284
5287
|
(c2) => ({
|
|
5285
5288
|
spec: c2.spec,
|
|
5286
|
-
suffixTrace: c2.type === "split" ?
|
|
5289
|
+
suffixTrace: c2.type === "split" ? Et(c2.axisFilters) : void 0
|
|
5287
5290
|
}),
|
|
5288
5291
|
l2
|
|
5289
5292
|
), m2 = [];
|
|
5290
|
-
for (const { value: c2, label:
|
|
5291
|
-
const { originalColumn:
|
|
5292
|
-
let
|
|
5293
|
-
r ?
|
|
5294
|
-
let
|
|
5295
|
-
o && (
|
|
5296
|
-
...
|
|
5293
|
+
for (const { value: c2, label: v } of g) {
|
|
5294
|
+
const { originalColumn: b, spec: p2 } = c2, A2 = c2.type === "split" ? c2.axisFilters : void 0, x2 = Dt(A2);
|
|
5295
|
+
let y;
|
|
5296
|
+
r ? y = r.deriveS(p2, x2) : y = Ft(b.id, x2);
|
|
5297
|
+
let P = { ...c2.adjustedSpec };
|
|
5298
|
+
o && (P = {
|
|
5299
|
+
...P,
|
|
5297
5300
|
annotations: {
|
|
5298
|
-
...
|
|
5299
|
-
"pl7.app/label":
|
|
5301
|
+
...P.annotations ?? {},
|
|
5302
|
+
"pl7.app/label": v
|
|
5300
5303
|
}
|
|
5301
5304
|
}), m2.push({
|
|
5302
|
-
id:
|
|
5303
|
-
spec:
|
|
5304
|
-
data: () => c2.type === "split" ?
|
|
5305
|
-
label:
|
|
5305
|
+
id: y,
|
|
5306
|
+
spec: P,
|
|
5307
|
+
data: () => c2.type === "split" ? wn(Tt(c2.dataEntries, x2)) : c2.originalColumn.data,
|
|
5308
|
+
label: v
|
|
5306
5309
|
});
|
|
5307
5310
|
}
|
|
5308
5311
|
return m2;
|
|
@@ -5338,9 +5341,9 @@
|
|
|
5338
5341
|
return true;
|
|
5339
5342
|
}
|
|
5340
5343
|
function _e(t) {
|
|
5341
|
-
return
|
|
5344
|
+
return Kn(t, (e) => e instanceof E ? e.handle : yn(e) ? hn(e, (n2) => n2.handle) : e);
|
|
5342
5345
|
}
|
|
5343
|
-
class
|
|
5346
|
+
class Ot {
|
|
5344
5347
|
constructor() {
|
|
5345
5348
|
F(this, "ctx", f());
|
|
5346
5349
|
}
|
|
@@ -5351,28 +5354,28 @@
|
|
|
5351
5354
|
return this.ctx.calculateOptions(e);
|
|
5352
5355
|
}
|
|
5353
5356
|
getOptions(e, n2) {
|
|
5354
|
-
const r = typeof e == "function" ? e :
|
|
5357
|
+
const r = typeof e == "function" ? e : vn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5355
5358
|
let s2 = {}, o = false;
|
|
5356
5359
|
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? Ve(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5357
|
-
ref:
|
|
5360
|
+
ref: Wn(a, o),
|
|
5358
5361
|
label: l2
|
|
5359
5362
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5360
|
-
ref:
|
|
5363
|
+
ref: Wn(a, o),
|
|
5361
5364
|
label: s2(l2, a)
|
|
5362
5365
|
}));
|
|
5363
5366
|
}
|
|
5364
5367
|
resolveAnchorCtx(e) {
|
|
5365
|
-
if (e instanceof
|
|
5368
|
+
if (e instanceof Ln) return e;
|
|
5366
5369
|
const n2 = {};
|
|
5367
5370
|
for (const [r, i] of Object.entries(e))
|
|
5368
|
-
if (
|
|
5371
|
+
if (Hn(i)) {
|
|
5369
5372
|
const s2 = this.getPColumnSpecByRef(i);
|
|
5370
5373
|
if (!s2)
|
|
5371
5374
|
return;
|
|
5372
5375
|
n2[r] = s2;
|
|
5373
5376
|
} else
|
|
5374
5377
|
n2[r] = i;
|
|
5375
|
-
return new
|
|
5378
|
+
return new Ln(n2);
|
|
5376
5379
|
}
|
|
5377
5380
|
/**
|
|
5378
5381
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5465,7 +5468,7 @@
|
|
|
5465
5468
|
ref: n2.ref,
|
|
5466
5469
|
obj: {
|
|
5467
5470
|
...n2.obj,
|
|
5468
|
-
data:
|
|
5471
|
+
data: Xn(
|
|
5469
5472
|
n2.obj.data,
|
|
5470
5473
|
(r) => new E(r, [n2.ref.blockId, n2.ref.name])
|
|
5471
5474
|
)
|
|
@@ -5494,7 +5497,7 @@
|
|
|
5494
5497
|
)) == null ? void 0 : r.obj;
|
|
5495
5498
|
const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5496
5499
|
if (n2)
|
|
5497
|
-
return
|
|
5500
|
+
return Kn(
|
|
5498
5501
|
n2,
|
|
5499
5502
|
(i) => new E(i, [e.blockId, e.name])
|
|
5500
5503
|
);
|
|
@@ -5507,7 +5510,7 @@
|
|
|
5507
5510
|
getPColumnByRef(e) {
|
|
5508
5511
|
const n2 = this.getDataByRef(e);
|
|
5509
5512
|
if (n2)
|
|
5510
|
-
return
|
|
5513
|
+
return Un(n2);
|
|
5511
5514
|
}
|
|
5512
5515
|
/**
|
|
5513
5516
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -5557,7 +5560,7 @@
|
|
|
5557
5560
|
findLabels(e) {
|
|
5558
5561
|
const n2 = this.getData();
|
|
5559
5562
|
for (const r of n2.entries) {
|
|
5560
|
-
if (!Z(r.obj)) continue;
|
|
5563
|
+
if (!Z$1(r.obj)) continue;
|
|
5561
5564
|
const i = r.obj.spec;
|
|
5562
5565
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
|
|
5563
5566
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -5578,7 +5581,7 @@
|
|
|
5578
5581
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
5579
5582
|
*/
|
|
5580
5583
|
selectColumns(e) {
|
|
5581
|
-
const n2 = typeof e == "function" ? e :
|
|
5584
|
+
const n2 = typeof e == "function" ? e : vn(e);
|
|
5582
5585
|
return this.getSpecs().entries.filter(({ obj: i }) => f$1(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5583
5586
|
const o = s2;
|
|
5584
5587
|
let a = null;
|
|
@@ -5609,13 +5612,13 @@
|
|
|
5609
5612
|
return r;
|
|
5610
5613
|
}
|
|
5611
5614
|
}
|
|
5612
|
-
class
|
|
5615
|
+
class te {
|
|
5613
5616
|
constructor() {
|
|
5614
5617
|
F(this, "ctx");
|
|
5615
5618
|
F(this, "args");
|
|
5616
5619
|
F(this, "uiState");
|
|
5617
5620
|
F(this, "_activeArgsCache");
|
|
5618
|
-
F(this, "resultPool", new
|
|
5621
|
+
F(this, "resultPool", new Ot());
|
|
5619
5622
|
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5620
5623
|
}
|
|
5621
5624
|
/**
|
|
@@ -5632,13 +5635,13 @@
|
|
|
5632
5635
|
// return this.ctx.featureFlags;
|
|
5633
5636
|
// }
|
|
5634
5637
|
getNamedAccessor(e) {
|
|
5635
|
-
return
|
|
5638
|
+
return de(
|
|
5636
5639
|
this.ctx.getAccessorHandleByName(e),
|
|
5637
5640
|
(n2) => new E(n2, [e])
|
|
5638
5641
|
);
|
|
5639
5642
|
}
|
|
5640
5643
|
get prerun() {
|
|
5641
|
-
return this.getNamedAccessor(
|
|
5644
|
+
return this.getNamedAccessor(Oe);
|
|
5642
5645
|
}
|
|
5643
5646
|
get outputs() {
|
|
5644
5647
|
return this.getNamedAccessor(ke);
|
|
@@ -5653,7 +5656,7 @@
|
|
|
5653
5656
|
}
|
|
5654
5657
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5655
5658
|
var i;
|
|
5656
|
-
const n2 = e.some((s2) => !(s2.data instanceof E) ||
|
|
5659
|
+
const n2 = e.some((s2) => !(s2.data instanceof E) || yn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5657
5660
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5658
5661
|
}
|
|
5659
5662
|
// TODO remove all non-PColumn fields
|
|
@@ -5671,8 +5674,8 @@
|
|
|
5671
5674
|
},
|
|
5672
5675
|
filters: e.filters ?? [],
|
|
5673
5676
|
sorting: e.sorting ?? []
|
|
5674
|
-
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(
|
|
5675
|
-
|
|
5677
|
+
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Rn$1(n2.src)), this.ctx.createPTable(
|
|
5678
|
+
In(n2, (r) => _e(r))
|
|
5676
5679
|
);
|
|
5677
5680
|
}
|
|
5678
5681
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5683,13 +5686,13 @@
|
|
|
5683
5686
|
return this.ctx.getCurrentUnstableMarker();
|
|
5684
5687
|
}
|
|
5685
5688
|
}
|
|
5686
|
-
const
|
|
5687
|
-
function
|
|
5689
|
+
const Y = "1.31.6";
|
|
5690
|
+
function kt(t) {
|
|
5688
5691
|
return t.__renderLambda === true;
|
|
5689
5692
|
}
|
|
5690
|
-
function
|
|
5693
|
+
function pe(t) {
|
|
5691
5694
|
if (t !== void 0)
|
|
5692
|
-
return
|
|
5695
|
+
return kt(t) ? t.handle : t;
|
|
5693
5696
|
}
|
|
5694
5697
|
class L {
|
|
5695
5698
|
constructor(e, n2, r, i, s2, o, a, l2) {
|
|
@@ -5701,8 +5704,8 @@
|
|
|
5701
5704
|
void 0,
|
|
5702
5705
|
{},
|
|
5703
5706
|
{},
|
|
5704
|
-
|
|
5705
|
-
|
|
5707
|
+
re(true),
|
|
5708
|
+
re([]),
|
|
5706
5709
|
void 0,
|
|
5707
5710
|
void 0
|
|
5708
5711
|
);
|
|
@@ -5710,7 +5713,7 @@
|
|
|
5710
5713
|
output(e, n2, r = {}) {
|
|
5711
5714
|
if (typeof n2 == "function") {
|
|
5712
5715
|
const i = `output#${e}`;
|
|
5713
|
-
return
|
|
5716
|
+
return H(i, () => n2(new te())), new L(
|
|
5714
5717
|
this._renderingMode,
|
|
5715
5718
|
this._initialArgs,
|
|
5716
5719
|
this._initialUiState,
|
|
@@ -5747,7 +5750,7 @@
|
|
|
5747
5750
|
return this.output(e, n2, { retentive: true });
|
|
5748
5751
|
}
|
|
5749
5752
|
argsValid(e) {
|
|
5750
|
-
return typeof e == "function" ? (
|
|
5753
|
+
return typeof e == "function" ? (H("inputsValid", () => e(new te())), new L(
|
|
5751
5754
|
this._renderingMode,
|
|
5752
5755
|
this._initialArgs,
|
|
5753
5756
|
this._initialUiState,
|
|
@@ -5771,7 +5774,7 @@
|
|
|
5771
5774
|
);
|
|
5772
5775
|
}
|
|
5773
5776
|
sections(e) {
|
|
5774
|
-
return Array.isArray(e) ? this.sections(
|
|
5777
|
+
return Array.isArray(e) ? this.sections(re(e)) : typeof e == "function" ? (H("sections", () => e(new te())), new L(
|
|
5775
5778
|
this._renderingMode,
|
|
5776
5779
|
this._initialArgs,
|
|
5777
5780
|
this._initialUiState,
|
|
@@ -5793,7 +5796,7 @@
|
|
|
5793
5796
|
}
|
|
5794
5797
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5795
5798
|
title(e) {
|
|
5796
|
-
return
|
|
5799
|
+
return H("title", () => e(new te())), new L(
|
|
5797
5800
|
this._renderingMode,
|
|
5798
5801
|
this._initialArgs,
|
|
5799
5802
|
this._initialUiState,
|
|
@@ -5851,7 +5854,7 @@
|
|
|
5851
5854
|
* Influences dependency graph construction.
|
|
5852
5855
|
*/
|
|
5853
5856
|
enriches(e) {
|
|
5854
|
-
return
|
|
5857
|
+
return H("enrichmentTargets", e), new L(
|
|
5855
5858
|
this._renderingMode,
|
|
5856
5859
|
this._initialArgs,
|
|
5857
5860
|
this._initialUiState,
|
|
@@ -5869,7 +5872,7 @@
|
|
|
5869
5872
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5870
5873
|
const e = {
|
|
5871
5874
|
v3: {
|
|
5872
|
-
sdkVersion:
|
|
5875
|
+
sdkVersion: Y,
|
|
5873
5876
|
renderingMode: this._renderingMode,
|
|
5874
5877
|
initialArgs: this._initialArgs,
|
|
5875
5878
|
initialUiState: this._initialUiState,
|
|
@@ -5880,56 +5883,53 @@
|
|
|
5880
5883
|
enrichmentTargets: this._enrichmentTargets
|
|
5881
5884
|
},
|
|
5882
5885
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5883
|
-
sdkVersion:
|
|
5886
|
+
sdkVersion: Y,
|
|
5884
5887
|
renderingMode: this._renderingMode,
|
|
5885
5888
|
initialArgs: this._initialArgs,
|
|
5886
|
-
inputsValid:
|
|
5887
|
-
sections:
|
|
5889
|
+
inputsValid: pe(this._inputsValid),
|
|
5890
|
+
sections: pe(this._sections),
|
|
5888
5891
|
outputs: Object.fromEntries(
|
|
5889
|
-
Object.entries(this._outputs).map(([n2, r]) => [n2,
|
|
5892
|
+
Object.entries(this._outputs).map(([n2, r]) => [n2, pe(r)])
|
|
5890
5893
|
)
|
|
5891
5894
|
};
|
|
5892
|
-
return
|
|
5895
|
+
return ft() ? Re({ sdkVersion: Y }) : { config: e };
|
|
5893
5896
|
}
|
|
5894
5897
|
}
|
|
5895
|
-
function
|
|
5896
|
-
return JSON.parse(t);
|
|
5897
|
-
}
|
|
5898
|
-
function Rt(t) {
|
|
5898
|
+
function Ut(t) {
|
|
5899
5899
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5900
5900
|
}
|
|
5901
|
-
function
|
|
5901
|
+
function Ne(t) {
|
|
5902
5902
|
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5903
5903
|
name: "pl7.app/label",
|
|
5904
5904
|
axes: [{}]
|
|
5905
5905
|
// exactly one axis
|
|
5906
5906
|
}, { dontWaitAllData: true });
|
|
5907
5907
|
}
|
|
5908
|
-
function
|
|
5908
|
+
function Ue(t, e) {
|
|
5909
5909
|
const n2 = [], r = [];
|
|
5910
5910
|
for (const a of t)
|
|
5911
|
-
|
|
5911
|
+
Ut(a.spec) ? n2.push(a) : r.push(a);
|
|
5912
5912
|
const i = [];
|
|
5913
5913
|
for (const a of r)
|
|
5914
5914
|
for (const l2 of a.spec.axesSpec) {
|
|
5915
5915
|
const u2 = p$1(l2);
|
|
5916
|
-
i.some((
|
|
5916
|
+
i.some((d) => X(d, u2)) || i.push(u2);
|
|
5917
5917
|
}
|
|
5918
5918
|
for (const a of n2) {
|
|
5919
|
-
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((
|
|
5919
|
+
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((d) => X(d, l2));
|
|
5920
5920
|
u2 !== -1 && i.splice(u2, 1);
|
|
5921
5921
|
}
|
|
5922
5922
|
const s2 = (a, l2) => {
|
|
5923
5923
|
let u2 = a.toString();
|
|
5924
5924
|
if (l2)
|
|
5925
|
-
for (const
|
|
5926
|
-
u2 +=
|
|
5925
|
+
for (const d in l2)
|
|
5926
|
+
u2 += d, u2 += l2[d];
|
|
5927
5927
|
return u2;
|
|
5928
5928
|
}, o = [];
|
|
5929
5929
|
for (const a of e) {
|
|
5930
|
-
const l2 = a.spec.axesSpec[0], u2 = p$1(l2),
|
|
5931
|
-
if (
|
|
5932
|
-
const h2 = i[
|
|
5930
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(l2), d = i.findIndex((h2) => X(h2, u2));
|
|
5931
|
+
if (d !== -1) {
|
|
5932
|
+
const h2 = i[d], w2 = Object.keys(h2.domain ?? {}).length, g = Object.keys(l2.domain ?? {}).length;
|
|
5933
5933
|
w2 > g ? o.push({
|
|
5934
5934
|
id: s2(a.id, h2.domain),
|
|
5935
5935
|
spec: {
|
|
@@ -5937,12 +5937,12 @@
|
|
|
5937
5937
|
axesSpec: [{ ...h2, annotations: l2.annotations }]
|
|
5938
5938
|
},
|
|
5939
5939
|
data: a.data
|
|
5940
|
-
}) : o.push(a), i.splice(
|
|
5940
|
+
}) : o.push(a), i.splice(d, 1);
|
|
5941
5941
|
}
|
|
5942
5942
|
}
|
|
5943
5943
|
return o;
|
|
5944
5944
|
}
|
|
5945
|
-
function
|
|
5945
|
+
function Be(t) {
|
|
5946
5946
|
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
5947
5947
|
return t.map((i) => i.data).every((i) => {
|
|
5948
5948
|
if (e(i))
|
|
@@ -5962,7 +5962,7 @@
|
|
|
5962
5962
|
throw Error(`unsupported column data type: ${i}`);
|
|
5963
5963
|
});
|
|
5964
5964
|
}
|
|
5965
|
-
function
|
|
5965
|
+
function Me(t, e, n2, r, i, s2) {
|
|
5966
5966
|
let o = t;
|
|
5967
5967
|
const a = [];
|
|
5968
5968
|
if (s2) {
|
|
@@ -5983,53 +5983,57 @@
|
|
|
5983
5983
|
sorting: i
|
|
5984
5984
|
};
|
|
5985
5985
|
}
|
|
5986
|
-
function
|
|
5987
|
-
var u2,
|
|
5986
|
+
function Fn(t, e, n2, r) {
|
|
5987
|
+
var u2, d;
|
|
5988
5988
|
Array.isArray(r) && (r = { filters: r });
|
|
5989
|
-
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((
|
|
5989
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((d = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Ne(t.resultPool);
|
|
5990
5990
|
if (!a) return;
|
|
5991
|
-
const l2 =
|
|
5992
|
-
if (
|
|
5991
|
+
const l2 = Ue(e.map(On), a);
|
|
5992
|
+
if (Be([...e, ...l2]))
|
|
5993
5993
|
return t.createPTable(
|
|
5994
|
-
|
|
5994
|
+
Me(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5995
5995
|
);
|
|
5996
5996
|
}
|
|
5997
|
-
function
|
|
5997
|
+
function Bt(t) {
|
|
5998
|
+
var e;
|
|
5999
|
+
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
6000
|
+
}
|
|
6001
|
+
function Mt(t) {
|
|
5998
6002
|
var e;
|
|
5999
6003
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
6000
6004
|
}
|
|
6001
|
-
function
|
|
6002
|
-
var
|
|
6003
|
-
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
6004
|
-
if (!l2) return;
|
|
6005
|
-
const u2 = Je(t.resultPool);
|
|
6005
|
+
function Rn(t, e, n2, r, i) {
|
|
6006
|
+
var v, b;
|
|
6007
|
+
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((v = r == null ? void 0 : r.pTableParams) == null ? void 0 : v.filters) ?? []], a = ((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.sorting) ?? [], l2 = e.filter((p2) => !Bt(p2.spec)), u2 = l2.find((p2) => n2(p2.spec));
|
|
6006
6008
|
if (!u2) return;
|
|
6007
|
-
const
|
|
6008
|
-
|
|
6009
|
+
const d = Ne(t.resultPool);
|
|
6010
|
+
if (!d) return;
|
|
6011
|
+
const h2 = new Set((() => {
|
|
6012
|
+
var A2, x2;
|
|
6009
6013
|
if (s2 === "inner") return [];
|
|
6010
|
-
const
|
|
6011
|
-
return
|
|
6014
|
+
const p2 = (x2 = (A2 = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : A2.hiddenColIds) == null ? void 0 : x2.map(ne).filter((y) => y.type === "column").map((y) => y.id);
|
|
6015
|
+
return p2 || l2.filter((y) => Mt(y.spec)).map((y) => y.id);
|
|
6012
6016
|
})());
|
|
6013
|
-
|
|
6014
|
-
const
|
|
6015
|
-
...
|
|
6017
|
+
h2.delete(u2.id), [...o.map((p2) => p2.column), ...a.map((p2) => p2.column)].filter((p2) => p2.type === "column").map((p2) => h2.delete(p2.id));
|
|
6018
|
+
const w2 = l2.filter((p2) => !h2.has(p2.id)), g = Ue(w2.map(On), d), m2 = [
|
|
6019
|
+
...u2.spec.axesSpec.map((p2) => ({
|
|
6016
6020
|
type: "axis",
|
|
6017
|
-
id: p$1(
|
|
6018
|
-
spec:
|
|
6021
|
+
id: p$1(p2),
|
|
6022
|
+
spec: p2
|
|
6019
6023
|
})),
|
|
6020
|
-
...[...
|
|
6024
|
+
...[...l2, ...g].map((p2) => ({
|
|
6021
6025
|
type: "column",
|
|
6022
|
-
id:
|
|
6023
|
-
spec:
|
|
6026
|
+
id: p2.id,
|
|
6027
|
+
spec: p2.spec
|
|
6024
6028
|
}))
|
|
6025
6029
|
];
|
|
6026
|
-
if (!
|
|
6027
|
-
const
|
|
6028
|
-
|
|
6030
|
+
if (!Be([...w2, ...g])) return;
|
|
6031
|
+
const c2 = t.createPTable(
|
|
6032
|
+
Me(l2, g, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
6029
6033
|
);
|
|
6030
6034
|
return {
|
|
6031
|
-
tableSpec:
|
|
6032
|
-
tableHandle:
|
|
6035
|
+
tableSpec: m2,
|
|
6036
|
+
tableHandle: c2
|
|
6033
6037
|
};
|
|
6034
6038
|
}
|
|
6035
6039
|
const ImportFileHandleSchema = z$2.string().optional().refine(
|
|
@@ -6078,7 +6082,7 @@
|
|
|
6078
6082
|
val: v.toString()
|
|
6079
6083
|
};
|
|
6080
6084
|
});
|
|
6081
|
-
return
|
|
6085
|
+
return Fn(
|
|
6082
6086
|
ctx,
|
|
6083
6087
|
[
|
|
6084
6088
|
{
|
|
@@ -6131,7 +6135,7 @@
|
|
|
6131
6135
|
val: v.toString()
|
|
6132
6136
|
};
|
|
6133
6137
|
});
|
|
6134
|
-
return
|
|
6138
|
+
return Rn(
|
|
6135
6139
|
ctx,
|
|
6136
6140
|
[
|
|
6137
6141
|
{
|
|
@@ -6166,7 +6170,7 @@
|
|
|
6166
6170
|
data
|
|
6167
6171
|
}
|
|
6168
6172
|
],
|
|
6169
|
-
|
|
6173
|
+
vn({
|
|
6170
6174
|
name: "example"
|
|
6171
6175
|
}),
|
|
6172
6176
|
ctx.uiState.dataTableState.tableState,
|