@milaboratories/milaboratories.ui-examples.model 1.1.56 → 1.1.57
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 +6 -6
- package/CHANGELOG.md +7 -0
- package/dist/bundle.js +391 -377
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +2 -2
package/dist/bundle.js
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}, "");
|
|
36
36
|
return `{${values}}`;
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const De = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
|
|
39
39
|
var util;
|
|
40
40
|
(function(util2) {
|
|
41
41
|
util2.assertEqual = (val) => val;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
88
88
|
}
|
|
89
89
|
util2.joinValues = joinValues;
|
|
90
|
-
util2.jsonStringifyReplacer = (
|
|
90
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
91
91
|
if (typeof value === "bigint") {
|
|
92
92
|
return value.toString();
|
|
93
93
|
}
|
|
@@ -3105,29 +3105,29 @@
|
|
|
3105
3105
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3106
3106
|
const fn = ctx.data;
|
|
3107
3107
|
if (this._def.returns instanceof ZodPromise) {
|
|
3108
|
-
const
|
|
3108
|
+
const me2 = this;
|
|
3109
3109
|
return OK(async function(...args) {
|
|
3110
3110
|
const error = new ZodError([]);
|
|
3111
|
-
const parsedArgs = await
|
|
3111
|
+
const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
|
|
3112
3112
|
error.addIssue(makeArgsIssue(args, e));
|
|
3113
3113
|
throw error;
|
|
3114
3114
|
});
|
|
3115
3115
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
3116
|
-
const parsedReturns = await
|
|
3116
|
+
const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3117
3117
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3118
3118
|
throw error;
|
|
3119
3119
|
});
|
|
3120
3120
|
return parsedReturns;
|
|
3121
3121
|
});
|
|
3122
3122
|
} else {
|
|
3123
|
-
const
|
|
3123
|
+
const me2 = this;
|
|
3124
3124
|
return OK(function(...args) {
|
|
3125
|
-
const parsedArgs =
|
|
3125
|
+
const parsedArgs = me2._def.args.safeParse(args, params);
|
|
3126
3126
|
if (!parsedArgs.success) {
|
|
3127
3127
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3128
3128
|
}
|
|
3129
3129
|
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
3130
|
-
const parsedReturns =
|
|
3130
|
+
const parsedReturns = me2._def.returns.safeParse(result, params);
|
|
3131
3131
|
if (!parsedReturns.success) {
|
|
3132
3132
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
3133
3133
|
}
|
|
@@ -3999,7 +3999,7 @@
|
|
|
3999
3999
|
}
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
4002
|
-
function F(n2) {
|
|
4002
|
+
function F$1(n2) {
|
|
4003
4003
|
if (!n2 || typeof n2 != "object")
|
|
4004
4004
|
return false;
|
|
4005
4005
|
const e = n2;
|
|
@@ -4017,7 +4017,7 @@
|
|
|
4017
4017
|
}
|
|
4018
4018
|
}
|
|
4019
4019
|
function yn(n2) {
|
|
4020
|
-
return F(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4020
|
+
return F$1(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4021
4021
|
}
|
|
4022
4022
|
function hn(n2) {
|
|
4023
4023
|
switch (n2.type) {
|
|
@@ -4095,7 +4095,7 @@
|
|
|
4095
4095
|
return n2.map(p$1);
|
|
4096
4096
|
}
|
|
4097
4097
|
function Jn(n2) {
|
|
4098
|
-
return
|
|
4098
|
+
return De(p$1(n2));
|
|
4099
4099
|
}
|
|
4100
4100
|
function z$1(n2, e) {
|
|
4101
4101
|
if (n2 === void 0) return e === void 0;
|
|
@@ -4143,10 +4143,10 @@
|
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
4145
|
function G$1(n2) {
|
|
4146
|
-
return
|
|
4146
|
+
return De(n2);
|
|
4147
4147
|
}
|
|
4148
4148
|
function x(n2) {
|
|
4149
|
-
return
|
|
4149
|
+
return De(p$1(n2));
|
|
4150
4150
|
}
|
|
4151
4151
|
function A(n2, e) {
|
|
4152
4152
|
return JSON.stringify([n2, e]);
|
|
@@ -4304,11 +4304,11 @@
|
|
|
4304
4304
|
function Y(n2) {
|
|
4305
4305
|
return typeof n2 == "object" && "anchor" in n2;
|
|
4306
4306
|
}
|
|
4307
|
-
function f(n2) {
|
|
4307
|
+
function f$1(n2) {
|
|
4308
4308
|
return n2.kind === "PColumn";
|
|
4309
4309
|
}
|
|
4310
4310
|
function Z(n2) {
|
|
4311
|
-
return f(n2.spec);
|
|
4311
|
+
return f$1(n2.spec);
|
|
4312
4312
|
}
|
|
4313
4313
|
function jn(n2) {
|
|
4314
4314
|
if (!Z(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
@@ -4363,7 +4363,7 @@
|
|
|
4363
4363
|
}
|
|
4364
4364
|
return true;
|
|
4365
4365
|
}
|
|
4366
|
-
function N
|
|
4366
|
+
function N(n2, e) {
|
|
4367
4367
|
if (e.name !== void 0 && n2.name !== e.name || e.namePattern !== void 0 && !new RegExp(e.namePattern).test(n2.name))
|
|
4368
4368
|
return false;
|
|
4369
4369
|
if (e.type !== void 0) {
|
|
@@ -4410,14 +4410,14 @@
|
|
|
4410
4410
|
return true;
|
|
4411
4411
|
}
|
|
4412
4412
|
function Kn(n2) {
|
|
4413
|
-
return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N
|
|
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
4415
|
function Rn(n2) {
|
|
4416
4416
|
const e = {
|
|
4417
4417
|
kind: n2.kind,
|
|
4418
4418
|
name: n2.name
|
|
4419
4419
|
};
|
|
4420
|
-
return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = C(n2.axesSpec)),
|
|
4420
|
+
return n2.domain !== void 0 && (e.domain = n2.domain), f$1(n2) && (e.axesSpec = C(n2.axesSpec)), De(e);
|
|
4421
4421
|
}
|
|
4422
4422
|
z$2.object({
|
|
4423
4423
|
__isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
@@ -4498,54 +4498,54 @@
|
|
|
4498
4498
|
cause: z$2.lazy(() => n).optional(),
|
|
4499
4499
|
errors: z$2.lazy(() => n.array()).optional()
|
|
4500
4500
|
});
|
|
4501
|
-
var
|
|
4502
|
-
var
|
|
4503
|
-
var
|
|
4504
|
-
function
|
|
4501
|
+
var ze = Object.defineProperty;
|
|
4502
|
+
var Ye = (t, e, n2) => e in t ? ze(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4503
|
+
var F = (t, e, n2) => Ye(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4504
|
+
function ne(t) {
|
|
4505
4505
|
return { type: "Immediate", value: t };
|
|
4506
4506
|
}
|
|
4507
|
-
function
|
|
4507
|
+
function ct() {
|
|
4508
4508
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4509
4509
|
}
|
|
4510
|
-
function
|
|
4510
|
+
function Oe(t) {
|
|
4511
4511
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4512
4512
|
return globalThis.getPlatforma(t);
|
|
4513
4513
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4514
4514
|
throw new Error("Can't get platforma instance.");
|
|
4515
4515
|
}
|
|
4516
|
-
function
|
|
4516
|
+
function dt() {
|
|
4517
4517
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4518
4518
|
}
|
|
4519
|
-
function
|
|
4519
|
+
function f() {
|
|
4520
4520
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4521
4521
|
throw new Error("Not in config rendering context");
|
|
4522
4522
|
}
|
|
4523
|
-
function
|
|
4524
|
-
const n2 =
|
|
4523
|
+
function G(t, e) {
|
|
4524
|
+
const n2 = dt();
|
|
4525
4525
|
if (n2 === void 0) return false;
|
|
4526
4526
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4527
4527
|
return n2.callbackRegistry[t] = e, true;
|
|
4528
4528
|
}
|
|
4529
|
-
const
|
|
4530
|
-
function
|
|
4531
|
-
t in
|
|
4532
|
-
for (const r of
|
|
4529
|
+
const ue = /* @__PURE__ */ new Map();
|
|
4530
|
+
function pt(t, e) {
|
|
4531
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n2) => {
|
|
4532
|
+
for (const r of ue.get(t))
|
|
4533
4533
|
r(n2);
|
|
4534
|
-
},
|
|
4534
|
+
}, ue.set(t, [])), ue.get(t).push(e);
|
|
4535
4535
|
}
|
|
4536
|
-
class
|
|
4536
|
+
class I {
|
|
4537
4537
|
constructor(e, n2 = (r) => r) {
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
this.handle = e, this.postProcess = n2,
|
|
4538
|
+
F(this, "isResolved", false);
|
|
4539
|
+
F(this, "resolvedValue");
|
|
4540
|
+
this.handle = e, this.postProcess = n2, pt(e, (r) => {
|
|
4541
4541
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4542
4542
|
});
|
|
4543
4543
|
}
|
|
4544
4544
|
map(e) {
|
|
4545
|
-
return new
|
|
4545
|
+
return new I(this.handle, (n2) => e(this.postProcess(n2)));
|
|
4546
4546
|
}
|
|
4547
4547
|
mapDefined(e) {
|
|
4548
|
-
return new
|
|
4548
|
+
return new I(this.handle, (n2) => {
|
|
4549
4549
|
const r = this.postProcess(n2);
|
|
4550
4550
|
return r ? e(r) : void 0;
|
|
4551
4551
|
});
|
|
@@ -4557,7 +4557,7 @@
|
|
|
4557
4557
|
function pe(t, e) {
|
|
4558
4558
|
return t === void 0 ? void 0 : e(t);
|
|
4559
4559
|
}
|
|
4560
|
-
class
|
|
4560
|
+
class E {
|
|
4561
4561
|
constructor(e, n2) {
|
|
4562
4562
|
this.handle = e, this.resolvePath = n2;
|
|
4563
4563
|
}
|
|
@@ -4597,46 +4597,46 @@
|
|
|
4597
4597
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4598
4598
|
];
|
|
4599
4599
|
return pe(
|
|
4600
|
-
|
|
4601
|
-
(i) => new
|
|
4600
|
+
f().resolveWithCommon(this.handle, e, ...n2),
|
|
4601
|
+
(i) => new E(i, r)
|
|
4602
4602
|
);
|
|
4603
4603
|
}
|
|
4604
4604
|
get resourceType() {
|
|
4605
|
-
return
|
|
4605
|
+
return f().getResourceType(this.handle);
|
|
4606
4606
|
}
|
|
4607
4607
|
getInputsLocked() {
|
|
4608
|
-
return
|
|
4608
|
+
return f().getInputsLocked(this.handle);
|
|
4609
4609
|
}
|
|
4610
4610
|
getOutputsLocked() {
|
|
4611
|
-
return
|
|
4611
|
+
return f().getOutputsLocked(this.handle);
|
|
4612
4612
|
}
|
|
4613
4613
|
getIsReadyOrError() {
|
|
4614
|
-
return
|
|
4614
|
+
return f().getIsReadyOrError(this.handle);
|
|
4615
4615
|
}
|
|
4616
4616
|
getIsFinal() {
|
|
4617
|
-
return
|
|
4617
|
+
return f().getIsFinal(this.handle);
|
|
4618
4618
|
}
|
|
4619
4619
|
getError() {
|
|
4620
4620
|
const e = [...this.resolvePath, "error"];
|
|
4621
4621
|
return pe(
|
|
4622
|
-
|
|
4623
|
-
(n2) => new
|
|
4622
|
+
f().getError(this.handle),
|
|
4623
|
+
(n2) => new E(n2, e)
|
|
4624
4624
|
);
|
|
4625
4625
|
}
|
|
4626
4626
|
listInputFields() {
|
|
4627
|
-
return
|
|
4627
|
+
return f().listInputFields(this.handle);
|
|
4628
4628
|
}
|
|
4629
4629
|
listOutputFields() {
|
|
4630
|
-
return
|
|
4630
|
+
return f().listOutputFields(this.handle);
|
|
4631
4631
|
}
|
|
4632
4632
|
listDynamicFields() {
|
|
4633
|
-
return
|
|
4633
|
+
return f().listDynamicFields(this.handle);
|
|
4634
4634
|
}
|
|
4635
4635
|
getKeyValueBase64(e) {
|
|
4636
|
-
return
|
|
4636
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
4637
4637
|
}
|
|
4638
4638
|
getKeyValueAsString(e) {
|
|
4639
|
-
return
|
|
4639
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
4640
4640
|
}
|
|
4641
4641
|
getKeyValueAsJson(e) {
|
|
4642
4642
|
const n2 = this.getKeyValueAsString(e);
|
|
@@ -4644,10 +4644,10 @@
|
|
|
4644
4644
|
return JSON.parse(n2);
|
|
4645
4645
|
}
|
|
4646
4646
|
getDataBase64() {
|
|
4647
|
-
return
|
|
4647
|
+
return f().getDataBase64(this.handle);
|
|
4648
4648
|
}
|
|
4649
4649
|
getDataAsString() {
|
|
4650
|
-
return
|
|
4650
|
+
return f().getDataAsString(this.handle);
|
|
4651
4651
|
}
|
|
4652
4652
|
getDataAsJson() {
|
|
4653
4653
|
const e = this.getDataAsString();
|
|
@@ -4668,7 +4668,7 @@
|
|
|
4668
4668
|
*
|
|
4669
4669
|
*/
|
|
4670
4670
|
parsePObjectCollection(e = false, n2 = "") {
|
|
4671
|
-
const r =
|
|
4671
|
+
const r = f().parsePObjectCollection(
|
|
4672
4672
|
this.handle,
|
|
4673
4673
|
e,
|
|
4674
4674
|
n2,
|
|
@@ -4678,19 +4678,19 @@
|
|
|
4678
4678
|
const i = {};
|
|
4679
4679
|
for (const [s2, o] of Object.entries(r)) {
|
|
4680
4680
|
const a = [...this.resolvePath, s2];
|
|
4681
|
-
i[s2] = Fn(o, (l2) => new
|
|
4681
|
+
i[s2] = Fn(o, (l2) => new E(l2, a));
|
|
4682
4682
|
}
|
|
4683
4683
|
return i;
|
|
4684
4684
|
}
|
|
4685
4685
|
getFileContentAsBase64() {
|
|
4686
|
-
return new
|
|
4686
|
+
return new I(f().getBlobContentAsBase64(this.handle));
|
|
4687
4687
|
}
|
|
4688
4688
|
getFileContentAsString() {
|
|
4689
|
-
return new
|
|
4689
|
+
return new I(f().getBlobContentAsString(this.handle));
|
|
4690
4690
|
}
|
|
4691
4691
|
getFileContentAsJson() {
|
|
4692
|
-
return new
|
|
4693
|
-
|
|
4692
|
+
return new I(
|
|
4693
|
+
f().getBlobContentAsString(this.handle)
|
|
4694
4694
|
).mapDefined((e) => JSON.parse(e));
|
|
4695
4695
|
}
|
|
4696
4696
|
/**
|
|
@@ -4709,7 +4709,7 @@
|
|
|
4709
4709
|
* @returns downloaded file handle
|
|
4710
4710
|
*/
|
|
4711
4711
|
getFileHandle() {
|
|
4712
|
-
return new
|
|
4712
|
+
return new I(f().getDownloadedBlobContentHandle(this.handle));
|
|
4713
4713
|
}
|
|
4714
4714
|
/**
|
|
4715
4715
|
* @deprecated use getFileHandle
|
|
@@ -4721,7 +4721,7 @@
|
|
|
4721
4721
|
* @returns downloaded file handle
|
|
4722
4722
|
*/
|
|
4723
4723
|
getRemoteFileHandle() {
|
|
4724
|
-
return new
|
|
4724
|
+
return new I(f().getOnDemandBlobContentHandle(this.handle));
|
|
4725
4725
|
}
|
|
4726
4726
|
/**
|
|
4727
4727
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4733,22 +4733,22 @@
|
|
|
4733
4733
|
* @returns the url to the extracted folder
|
|
4734
4734
|
*/
|
|
4735
4735
|
extractArchiveAndGetURL(e) {
|
|
4736
|
-
return new
|
|
4736
|
+
return new I(f().extractArchiveAndGetURL(this.handle, e));
|
|
4737
4737
|
}
|
|
4738
4738
|
getImportProgress() {
|
|
4739
|
-
return new
|
|
4739
|
+
return new I(f().getImportProgress(this.handle));
|
|
4740
4740
|
}
|
|
4741
4741
|
getLastLogs(e) {
|
|
4742
|
-
return new
|
|
4742
|
+
return new I(f().getLastLogs(this.handle, e));
|
|
4743
4743
|
}
|
|
4744
4744
|
getProgressLog(e) {
|
|
4745
|
-
return new
|
|
4745
|
+
return new I(f().getProgressLog(this.handle, e));
|
|
4746
4746
|
}
|
|
4747
4747
|
getProgressLogWithInfo(e) {
|
|
4748
|
-
return new
|
|
4748
|
+
return new I(f().getProgressLogWithInfo(this.handle, e));
|
|
4749
4749
|
}
|
|
4750
4750
|
getLogHandle() {
|
|
4751
|
-
return new
|
|
4751
|
+
return new I(f().getLogHandle(this.handle));
|
|
4752
4752
|
}
|
|
4753
4753
|
allFieldsResolved(e = "Input") {
|
|
4754
4754
|
switch (e) {
|
|
@@ -4774,135 +4774,135 @@
|
|
|
4774
4774
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4775
4775
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4776
4776
|
);
|
|
4777
|
-
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2,
|
|
4777
|
+
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, p2]) => o(u2, p2));
|
|
4778
4778
|
}
|
|
4779
4779
|
}
|
|
4780
|
-
const
|
|
4781
|
-
const
|
|
4780
|
+
const Re = "staging", ke = "main";
|
|
4781
|
+
const gt = "pl7.app/label", mt = "pl7.app/trace", yt = z$2.object({
|
|
4782
4782
|
type: z$2.string(),
|
|
4783
4783
|
importance: z$2.number().optional(),
|
|
4784
4784
|
id: z$2.string().optional(),
|
|
4785
4785
|
label: z$2.string()
|
|
4786
|
-
}),
|
|
4787
|
-
function
|
|
4788
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(),
|
|
4789
|
-
var
|
|
4790
|
-
const
|
|
4791
|
-
let
|
|
4792
|
-
"spec" in
|
|
4793
|
-
const
|
|
4794
|
-
...
|
|
4795
|
-
...
|
|
4796
|
-
...
|
|
4786
|
+
}), vt = z$2.array(yt), bt = 1e-3, wt = "__LABEL__", Ce = "__LABEL__@1";
|
|
4787
|
+
function Ve(t, e, n2 = {}) {
|
|
4788
|
+
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, R;
|
|
4790
|
+
const m2 = e(g);
|
|
4791
|
+
let c2, y, d;
|
|
4792
|
+
"spec" in m2 && typeof m2.spec == "object" ? (c2 = m2.spec, y = m2.prefixTrace, d = m2.suffixTrace) : c2 = m2;
|
|
4793
|
+
const b = (S = c2.annotations) == null ? void 0 : S[gt], A2 = (R = c2.annotations) == null ? void 0 : R[mt], v = (A2 ? vt.safeParse(JSON.parse(A2)).data : void 0) ?? [], P = [
|
|
4794
|
+
...y ?? [],
|
|
4795
|
+
...v,
|
|
4796
|
+
...d ?? []
|
|
4797
4797
|
];
|
|
4798
|
-
if (
|
|
4799
|
-
const
|
|
4800
|
-
n2.addLabelAsSuffix ?
|
|
4801
|
-
}
|
|
4802
|
-
const
|
|
4803
|
-
for (let
|
|
4804
|
-
const { type:
|
|
4805
|
-
|
|
4806
|
-
const
|
|
4807
|
-
|
|
4808
|
-
|
|
4798
|
+
if (b !== void 0) {
|
|
4799
|
+
const D2 = { label: b, type: wt, importance: -2 };
|
|
4800
|
+
n2.addLabelAsSuffix ? P.push(D2) : P.splice(0, 0, D2);
|
|
4801
|
+
}
|
|
4802
|
+
const x2 = [], T = /* @__PURE__ */ new Map();
|
|
4803
|
+
for (let D2 = P.length - 1; D2 >= 0; --D2) {
|
|
4804
|
+
const { type: M } = P[D2], j = P[D2].importance ?? 0, $2 = (T.get(M) ?? 0) + 1;
|
|
4805
|
+
T.set(M, $2);
|
|
4806
|
+
const k2 = `${M}@${$2}`;
|
|
4807
|
+
s2.set(k2, (s2.get(k2) ?? 0) + 1), r.set(
|
|
4808
|
+
k2,
|
|
4809
4809
|
Math.max(
|
|
4810
|
-
r.get(
|
|
4811
|
-
|
|
4810
|
+
r.get(k2) ?? Number.NEGATIVE_INFINITY,
|
|
4811
|
+
j - (P.length - D2) * bt
|
|
4812
4812
|
)
|
|
4813
|
-
),
|
|
4813
|
+
), x2.push({ ...P[D2], fullType: k2, occurrenceIndex: $2 });
|
|
4814
4814
|
}
|
|
4815
|
-
return
|
|
4816
|
-
value:
|
|
4817
|
-
spec:
|
|
4818
|
-
label:
|
|
4819
|
-
fullTrace:
|
|
4815
|
+
return x2.reverse(), {
|
|
4816
|
+
value: g,
|
|
4817
|
+
spec: c2,
|
|
4818
|
+
label: b,
|
|
4819
|
+
fullTrace: x2
|
|
4820
4820
|
};
|
|
4821
|
-
}),
|
|
4822
|
-
|
|
4823
|
-
for (const [
|
|
4824
|
-
|
|
4825
|
-
const
|
|
4826
|
-
const
|
|
4827
|
-
for (let
|
|
4828
|
-
const
|
|
4829
|
-
if (
|
|
4830
|
-
if (
|
|
4831
|
-
|
|
4821
|
+
}), a = [], l2 = [], u2 = [...r];
|
|
4822
|
+
u2.sort(([, g], [, m2]) => m2 - g);
|
|
4823
|
+
for (const [g] of u2)
|
|
4824
|
+
g.endsWith("@1") || s2.get(g) === t.length ? a.push(g) : l2.push(g);
|
|
4825
|
+
const p2 = (g, m2 = false) => {
|
|
4826
|
+
const c2 = [];
|
|
4827
|
+
for (let y = 0; y < o.length; y++) {
|
|
4828
|
+
const d = o[y], b = d.fullTrace.filter((P) => g.has(P.fullType) || i && i.has(P.type));
|
|
4829
|
+
if (b.length === 0)
|
|
4830
|
+
if (m2)
|
|
4831
|
+
c2.push({
|
|
4832
4832
|
label: "Unlabeled",
|
|
4833
|
-
value:
|
|
4833
|
+
value: d.value
|
|
4834
4834
|
});
|
|
4835
4835
|
else return;
|
|
4836
|
-
const
|
|
4837
|
-
|
|
4838
|
-
label:
|
|
4839
|
-
value:
|
|
4836
|
+
const A2 = b.map((P) => P.label), v = n2.separator ?? " / ";
|
|
4837
|
+
c2.push({
|
|
4838
|
+
label: A2.join(v),
|
|
4839
|
+
value: d.value
|
|
4840
4840
|
});
|
|
4841
4841
|
}
|
|
4842
|
-
return
|
|
4842
|
+
return c2;
|
|
4843
4843
|
};
|
|
4844
|
-
if (
|
|
4845
|
-
if (
|
|
4846
|
-
return
|
|
4847
|
-
}
|
|
4848
|
-
let
|
|
4849
|
-
for (;
|
|
4850
|
-
const
|
|
4851
|
-
n2.includeNativeLabel &&
|
|
4852
|
-
for (let
|
|
4853
|
-
|
|
4854
|
-
const
|
|
4855
|
-
if (
|
|
4856
|
-
|
|
4857
|
-
}
|
|
4858
|
-
return
|
|
4859
|
-
}
|
|
4860
|
-
const
|
|
4861
|
-
const
|
|
4844
|
+
if (a.length === 0) {
|
|
4845
|
+
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4846
|
+
return p2(new Set(Ce), true);
|
|
4847
|
+
}
|
|
4848
|
+
let h2 = 0, w2 = -1;
|
|
4849
|
+
for (; h2 < a.length; ) {
|
|
4850
|
+
const g = /* @__PURE__ */ new Set();
|
|
4851
|
+
n2.includeNativeLabel && g.add(Ce);
|
|
4852
|
+
for (let c2 = 0; c2 < h2; ++c2) g.add(a[c2]);
|
|
4853
|
+
w2 >= 0 && g.add(a[w2]);
|
|
4854
|
+
const m2 = p2(g);
|
|
4855
|
+
if (m2 !== void 0 && new Set(m2.map((c2) => c2.label)).size === t.length) return m2;
|
|
4856
|
+
w2++, w2 >= a.length && (h2++, w2 = h2);
|
|
4857
|
+
}
|
|
4858
|
+
return p2(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
4859
|
+
}
|
|
4860
|
+
const Q = "PColumnData/", se = Q + "ResourceMap", oe = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned", Ke = Q + "Partitioned/", ae = Ke + "JsonPartitioned", q = Ke + "BinaryPartitioned";
|
|
4861
|
+
const he = (t) => {
|
|
4862
4862
|
if (t.endsWith(".index"))
|
|
4863
4863
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4864
4864
|
if (t.endsWith(".values"))
|
|
4865
4865
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4866
4866
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4867
4867
|
};
|
|
4868
|
-
function
|
|
4868
|
+
function At(t) {
|
|
4869
4869
|
if (!t) return;
|
|
4870
4870
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4871
4871
|
let i = 0;
|
|
4872
4872
|
switch (e) {
|
|
4873
|
-
case
|
|
4873
|
+
case se:
|
|
4874
4874
|
i = n2.keyLength;
|
|
4875
4875
|
break;
|
|
4876
|
-
case
|
|
4876
|
+
case oe:
|
|
4877
4877
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4878
4878
|
break;
|
|
4879
|
-
case
|
|
4880
|
-
case
|
|
4879
|
+
case H:
|
|
4880
|
+
case B:
|
|
4881
4881
|
i = n2.partitionKeyLength;
|
|
4882
4882
|
break;
|
|
4883
|
-
case
|
|
4884
|
-
case
|
|
4883
|
+
case q:
|
|
4884
|
+
case ae:
|
|
4885
4885
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4886
4886
|
break;
|
|
4887
4887
|
}
|
|
4888
4888
|
switch (e) {
|
|
4889
|
-
case
|
|
4890
|
-
case
|
|
4891
|
-
case
|
|
4889
|
+
case se:
|
|
4890
|
+
case H:
|
|
4891
|
+
case B:
|
|
4892
4892
|
for (let s2 of t.listInputFields()) {
|
|
4893
|
-
e ===
|
|
4893
|
+
e === B && (s2 = he(s2).baseKey);
|
|
4894
4894
|
const o = [...JSON.parse(s2)];
|
|
4895
4895
|
r.push(o);
|
|
4896
4896
|
}
|
|
4897
4897
|
break;
|
|
4898
|
-
case
|
|
4899
|
-
case
|
|
4900
|
-
case
|
|
4898
|
+
case oe:
|
|
4899
|
+
case q:
|
|
4900
|
+
case ae:
|
|
4901
4901
|
for (const s2 of t.listInputFields()) {
|
|
4902
4902
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4903
4903
|
if (a !== void 0)
|
|
4904
4904
|
for (let l2 of a.listInputFields()) {
|
|
4905
|
-
e ===
|
|
4905
|
+
e === q && (l2 = he(l2).baseKey);
|
|
4906
4906
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4907
4907
|
r.push(u2);
|
|
4908
4908
|
}
|
|
@@ -4911,7 +4911,7 @@
|
|
|
4911
4911
|
}
|
|
4912
4912
|
return { data: r, keyLength: i };
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function xt(t) {
|
|
4915
4915
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4916
4916
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4917
4917
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4930,11 +4930,11 @@
|
|
|
4930
4930
|
}
|
|
4931
4931
|
return r.map((i) => Array.from(i.values()));
|
|
4932
4932
|
}
|
|
4933
|
-
function
|
|
4933
|
+
function Pt(t) {
|
|
4934
4934
|
if (t === void 0) return;
|
|
4935
|
-
if (F(t))
|
|
4936
|
-
return
|
|
4937
|
-
const e =
|
|
4935
|
+
if (F$1(t))
|
|
4936
|
+
return xt(t);
|
|
4937
|
+
const e = At(t);
|
|
4938
4938
|
if (!e) return;
|
|
4939
4939
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4940
4940
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4947,16 +4947,16 @@
|
|
|
4947
4947
|
}
|
|
4948
4948
|
return i.map((s2) => Array.from(s2.values()));
|
|
4949
4949
|
}
|
|
4950
|
-
function
|
|
4950
|
+
function ge(t, e = []) {
|
|
4951
4951
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4952
4952
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4953
|
-
if (e.length > 0 && (n2 ===
|
|
4953
|
+
if (e.length > 0 && (n2 === ae || n2 === q))
|
|
4954
4954
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4955
4955
|
switch (n2) {
|
|
4956
|
-
case
|
|
4957
|
-
case
|
|
4956
|
+
case se:
|
|
4957
|
+
case oe:
|
|
4958
4958
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4959
|
-
case
|
|
4959
|
+
case H: {
|
|
4960
4960
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4961
4961
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4962
4962
|
const i = [];
|
|
@@ -4972,12 +4972,12 @@
|
|
|
4972
4972
|
parts: i
|
|
4973
4973
|
};
|
|
4974
4974
|
}
|
|
4975
|
-
case
|
|
4975
|
+
case B: {
|
|
4976
4976
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4977
4977
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4978
4978
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
4979
4979
|
for (const o of t.listInputFields()) {
|
|
4980
|
-
const a =
|
|
4980
|
+
const a = he(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4981
4981
|
if (l2 === void 0) return;
|
|
4982
4982
|
let u2 = s2.get(a.baseKey);
|
|
4983
4983
|
u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
|
|
@@ -4999,16 +4999,16 @@
|
|
|
4999
4999
|
parts: i
|
|
5000
5000
|
};
|
|
5001
5001
|
}
|
|
5002
|
-
case
|
|
5002
|
+
case ae: {
|
|
5003
5003
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5004
5004
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5005
5005
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5006
5006
|
for (const o of t.listInputFields()) {
|
|
5007
5007
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5008
5008
|
if (a === void 0) return;
|
|
5009
|
-
if (a.resourceType.name !==
|
|
5010
|
-
throw new Error(`Expected ${
|
|
5011
|
-
const l2 =
|
|
5009
|
+
if (a.resourceType.name !== H)
|
|
5010
|
+
throw new Error(`Expected ${H} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5011
|
+
const l2 = ge(a, JSON.parse(o));
|
|
5012
5012
|
if (l2 === void 0) return;
|
|
5013
5013
|
if (l2.type !== "JsonPartitioned")
|
|
5014
5014
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5020,16 +5020,16 @@
|
|
|
5020
5020
|
parts: s2
|
|
5021
5021
|
};
|
|
5022
5022
|
}
|
|
5023
|
-
case
|
|
5023
|
+
case q: {
|
|
5024
5024
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5025
5025
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5026
5026
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5027
5027
|
for (const o of t.listInputFields()) {
|
|
5028
5028
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5029
5029
|
if (a === void 0) return;
|
|
5030
|
-
if (a.resourceType.name !==
|
|
5031
|
-
throw new Error(`Expected ${
|
|
5032
|
-
const l2 =
|
|
5030
|
+
if (a.resourceType.name !== B)
|
|
5031
|
+
throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5032
|
+
const l2 = ge(a, JSON.parse(o));
|
|
5033
5033
|
if (l2 === void 0) return;
|
|
5034
5034
|
if (l2.type !== "BinaryPartitioned")
|
|
5035
5035
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5045,15 +5045,15 @@
|
|
|
5045
5045
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5046
5046
|
}
|
|
5047
5047
|
}
|
|
5048
|
-
function
|
|
5048
|
+
function Ct(t) {
|
|
5049
5049
|
if (t !== void 0) {
|
|
5050
|
-
if (F(t)) return t;
|
|
5050
|
+
if (F$1(t)) return t;
|
|
5051
5051
|
if (pn(t)) return hn(t);
|
|
5052
|
-
if (t instanceof
|
|
5052
|
+
if (t instanceof E) return ge(t);
|
|
5053
5053
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5054
5054
|
}
|
|
5055
5055
|
}
|
|
5056
|
-
function
|
|
5056
|
+
function St(t, e) {
|
|
5057
5057
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5058
5058
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5059
5059
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5113,7 +5113,7 @@
|
|
|
5113
5113
|
}
|
|
5114
5114
|
}
|
|
5115
5115
|
}
|
|
5116
|
-
class
|
|
5116
|
+
class _t {
|
|
5117
5117
|
constructor(e) {
|
|
5118
5118
|
this.columns = e;
|
|
5119
5119
|
}
|
|
@@ -5122,7 +5122,7 @@
|
|
|
5122
5122
|
return this.columns.filter((r) => n2(r.spec));
|
|
5123
5123
|
}
|
|
5124
5124
|
}
|
|
5125
|
-
function
|
|
5125
|
+
function It(t) {
|
|
5126
5126
|
if (t)
|
|
5127
5127
|
return t.map((e) => ({
|
|
5128
5128
|
type: `split:${Jn(e.axisId)}`,
|
|
@@ -5131,21 +5131,21 @@
|
|
|
5131
5131
|
// High importance for split filters in labels
|
|
5132
5132
|
}));
|
|
5133
5133
|
}
|
|
5134
|
-
function
|
|
5134
|
+
function Tt(t) {
|
|
5135
5135
|
if (t)
|
|
5136
5136
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5137
5137
|
}
|
|
5138
|
-
function
|
|
5138
|
+
function Lt(t, e) {
|
|
5139
5139
|
if (!e || e.length === 0) return t;
|
|
5140
5140
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5141
|
-
return
|
|
5141
|
+
return De({ id: t, axisFilters: n2 });
|
|
5142
5142
|
}
|
|
5143
|
-
function
|
|
5143
|
+
function Se(t) {
|
|
5144
5144
|
if (!t || typeof t != "object") return false;
|
|
5145
5145
|
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
5146
|
return !!e.domainAnchor || n2 || r;
|
|
5147
5147
|
}
|
|
5148
|
-
function
|
|
5148
|
+
function Et(t) {
|
|
5149
5149
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5150
5150
|
return [];
|
|
5151
5151
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5153,11 +5153,11 @@
|
|
|
5153
5153
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
5154
5154
|
return e.sort((n2, r) => n2 - r), e;
|
|
5155
5155
|
}
|
|
5156
|
-
class
|
|
5156
|
+
class me {
|
|
5157
5157
|
constructor() {
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5158
|
+
F(this, "defaultProviderStore", []);
|
|
5159
|
+
F(this, "providers", [new _t(this.defaultProviderStore)]);
|
|
5160
|
+
F(this, "axisLabelProviders", []);
|
|
5161
5161
|
}
|
|
5162
5162
|
addColumnProvider(e) {
|
|
5163
5163
|
return this.providers.push(e), this;
|
|
@@ -5179,119 +5179,133 @@
|
|
|
5179
5179
|
}
|
|
5180
5180
|
}
|
|
5181
5181
|
getUniversalEntries(e, n2) {
|
|
5182
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false } = n2 ?? {},
|
|
5182
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false, exclude: a } = n2 ?? {}, l2 = {
|
|
5183
5183
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
|
|
5184
5184
|
...i ?? {}
|
|
5185
|
-
}
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5185
|
+
};
|
|
5186
|
+
let u2 = () => false;
|
|
5187
|
+
if (a) {
|
|
5188
|
+
const c2 = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
5189
|
+
if (Se(y)) {
|
|
5190
|
+
if (!r)
|
|
5191
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5192
|
+
return Kn(Dn(r.anchors, y, n2));
|
|
5193
|
+
} else
|
|
5194
|
+
return Kn(y);
|
|
5195
|
+
});
|
|
5196
|
+
u2 = (y) => c2.some((d) => d(y));
|
|
5197
|
+
}
|
|
5198
|
+
const p2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h2 = [], w2 = /* @__PURE__ */ new Set();
|
|
5199
|
+
for (const c2 of p2) {
|
|
5200
|
+
const y = Se(c2);
|
|
5201
|
+
let d;
|
|
5202
|
+
if (y) {
|
|
5190
5203
|
if (!r)
|
|
5191
5204
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5192
|
-
|
|
5205
|
+
d = Dn(r.anchors, c2, n2);
|
|
5193
5206
|
} else
|
|
5194
|
-
|
|
5195
|
-
const
|
|
5196
|
-
for (const
|
|
5197
|
-
const
|
|
5198
|
-
for (const
|
|
5199
|
-
if (
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5207
|
+
d = c2;
|
|
5208
|
+
const b = /* @__PURE__ */ new Set(), A2 = [];
|
|
5209
|
+
for (const x2 of this.providers) {
|
|
5210
|
+
const T = x2.selectColumns(d);
|
|
5211
|
+
for (const S of T) {
|
|
5212
|
+
if (u2(S.spec)) continue;
|
|
5213
|
+
if (b.has(S.id))
|
|
5214
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${x2.constructor.name}`);
|
|
5215
|
+
const R = Rn(S.spec);
|
|
5216
|
+
w2.has(R) || (b.add(S.id), w2.add(R), A2.push(S));
|
|
5203
5217
|
}
|
|
5204
5218
|
}
|
|
5205
|
-
if (
|
|
5206
|
-
const
|
|
5207
|
-
for (const
|
|
5208
|
-
if (!f
|
|
5209
|
-
const
|
|
5210
|
-
if (
|
|
5211
|
-
const
|
|
5212
|
-
if (!
|
|
5219
|
+
if (A2.length === 0) continue;
|
|
5220
|
+
const v = Et(c2), P = v.length > 0;
|
|
5221
|
+
for (const x2 of A2) {
|
|
5222
|
+
if (!f$1(x2.spec)) continue;
|
|
5223
|
+
const T = x2.spec;
|
|
5224
|
+
if (P) {
|
|
5225
|
+
const S = Ct(x2.data);
|
|
5226
|
+
if (!S) {
|
|
5213
5227
|
if (s2) continue;
|
|
5214
5228
|
return;
|
|
5215
5229
|
}
|
|
5216
|
-
if (!yn(
|
|
5217
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
5218
|
-
const
|
|
5219
|
-
if (
|
|
5220
|
-
throw new Error(`Not enough partition keys (${
|
|
5221
|
-
const
|
|
5222
|
-
if (
|
|
5223
|
-
if (
|
|
5230
|
+
if (!yn(S))
|
|
5231
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${x2.id}`);
|
|
5232
|
+
const R = Pt(S), D2 = v[v.length - 1];
|
|
5233
|
+
if (D2 >= S.partitionKeyLength)
|
|
5234
|
+
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D2}) in column ${T.name}`);
|
|
5235
|
+
const M = v.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j = [], $2 = (_, W) => {
|
|
5236
|
+
if (W >= v.length) {
|
|
5237
|
+
if (j.push([..._]), j.length > 1e4)
|
|
5224
5238
|
throw new Error("Too many key combinations, aborting.");
|
|
5225
5239
|
return;
|
|
5226
5240
|
}
|
|
5227
|
-
const
|
|
5228
|
-
if (
|
|
5229
|
-
throw new Error(`Axis index ${
|
|
5230
|
-
const
|
|
5231
|
-
if (!
|
|
5232
|
-
|
|
5241
|
+
const V = v[W];
|
|
5242
|
+
if (V >= R.length)
|
|
5243
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${x2.id}`);
|
|
5244
|
+
const J = R[V];
|
|
5245
|
+
if (!J || J.length === 0) {
|
|
5246
|
+
j.length = 0;
|
|
5233
5247
|
return;
|
|
5234
5248
|
}
|
|
5235
|
-
for (const
|
|
5236
|
-
|
|
5249
|
+
for (const Z2 of J)
|
|
5250
|
+
_.push(Z2), $2(_, W + 1), _.pop();
|
|
5237
5251
|
};
|
|
5238
|
-
if (
|
|
5252
|
+
if ($2([], 0), j.length === 0)
|
|
5239
5253
|
continue;
|
|
5240
|
-
const
|
|
5241
|
-
for (let
|
|
5242
|
-
|
|
5243
|
-
const
|
|
5244
|
-
for (const
|
|
5245
|
-
const
|
|
5246
|
-
const
|
|
5247
|
-
return { axisIdx:
|
|
5254
|
+
const k2 = [...T.axesSpec], We = v.map((_) => _);
|
|
5255
|
+
for (let _ = v.length - 1; _ >= 0; _--)
|
|
5256
|
+
k2.splice(v[_], 1);
|
|
5257
|
+
const Ge = { ...T, axesSpec: k2 };
|
|
5258
|
+
for (const _ of j) {
|
|
5259
|
+
const W = _.map((V, J) => {
|
|
5260
|
+
const Z2 = We[J], He = p$1(T.axesSpec[Z2]), le = M[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
5261
|
+
return { axisIdx: Z2, axisId: He, value: V, label: qe };
|
|
5248
5262
|
});
|
|
5249
|
-
|
|
5263
|
+
h2.push({
|
|
5250
5264
|
type: "split",
|
|
5251
|
-
originalColumn:
|
|
5252
|
-
spec:
|
|
5253
|
-
adjustedSpec:
|
|
5254
|
-
dataEntries:
|
|
5255
|
-
axisFilters:
|
|
5265
|
+
originalColumn: x2,
|
|
5266
|
+
spec: T,
|
|
5267
|
+
adjustedSpec: Ge,
|
|
5268
|
+
dataEntries: S,
|
|
5269
|
+
axisFilters: W
|
|
5256
5270
|
});
|
|
5257
5271
|
}
|
|
5258
5272
|
} else
|
|
5259
|
-
|
|
5273
|
+
h2.push({
|
|
5260
5274
|
type: "direct",
|
|
5261
|
-
originalColumn:
|
|
5262
|
-
spec:
|
|
5263
|
-
adjustedSpec:
|
|
5275
|
+
originalColumn: x2,
|
|
5276
|
+
spec: T,
|
|
5277
|
+
adjustedSpec: T
|
|
5264
5278
|
});
|
|
5265
5279
|
}
|
|
5266
5280
|
}
|
|
5267
|
-
if (
|
|
5268
|
-
const
|
|
5269
|
-
|
|
5281
|
+
if (h2.length === 0) return [];
|
|
5282
|
+
const g = Ve(
|
|
5283
|
+
h2,
|
|
5270
5284
|
(c2) => ({
|
|
5271
5285
|
spec: c2.spec,
|
|
5272
|
-
suffixTrace: c2.type === "split" ?
|
|
5286
|
+
suffixTrace: c2.type === "split" ? It(c2.axisFilters) : void 0
|
|
5273
5287
|
}),
|
|
5274
|
-
|
|
5275
|
-
),
|
|
5276
|
-
for (const { value: c2, label:
|
|
5277
|
-
const { originalColumn:
|
|
5278
|
-
let
|
|
5279
|
-
r ?
|
|
5280
|
-
let
|
|
5281
|
-
o && (
|
|
5282
|
-
...
|
|
5288
|
+
l2
|
|
5289
|
+
), m2 = [];
|
|
5290
|
+
for (const { value: c2, label: y } of g) {
|
|
5291
|
+
const { originalColumn: d, spec: b } = c2, A2 = c2.type === "split" ? c2.axisFilters : void 0, v = Tt(A2);
|
|
5292
|
+
let P;
|
|
5293
|
+
r ? P = r.deriveS(b, v) : P = Lt(d.id, v);
|
|
5294
|
+
let x2 = { ...c2.adjustedSpec };
|
|
5295
|
+
o && (x2 = {
|
|
5296
|
+
...x2,
|
|
5283
5297
|
annotations: {
|
|
5284
|
-
...
|
|
5285
|
-
"pl7.app/label":
|
|
5298
|
+
...x2.annotations ?? {},
|
|
5299
|
+
"pl7.app/label": y
|
|
5286
5300
|
}
|
|
5287
|
-
}),
|
|
5288
|
-
id:
|
|
5289
|
-
spec:
|
|
5290
|
-
data: () => c2.type === "split" ? gn(
|
|
5291
|
-
label:
|
|
5301
|
+
}), m2.push({
|
|
5302
|
+
id: P,
|
|
5303
|
+
spec: x2,
|
|
5304
|
+
data: () => c2.type === "split" ? gn(St(c2.dataEntries, v)) : c2.originalColumn.data,
|
|
5305
|
+
label: y
|
|
5292
5306
|
});
|
|
5293
5307
|
}
|
|
5294
|
-
return
|
|
5308
|
+
return m2;
|
|
5295
5309
|
}
|
|
5296
5310
|
getColumns(e, n2) {
|
|
5297
5311
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5316,19 +5330,19 @@
|
|
|
5316
5330
|
return i;
|
|
5317
5331
|
}
|
|
5318
5332
|
}
|
|
5319
|
-
function
|
|
5333
|
+
function ce(t, e) {
|
|
5320
5334
|
if (t === void 0) return e === void 0;
|
|
5321
5335
|
if (e === void 0) return true;
|
|
5322
5336
|
for (const n2 in e)
|
|
5323
5337
|
if (t[n2] !== e[n2]) return false;
|
|
5324
5338
|
return true;
|
|
5325
5339
|
}
|
|
5326
|
-
function
|
|
5327
|
-
return Fn(t, (e) => e instanceof
|
|
5340
|
+
function _e(t) {
|
|
5341
|
+
return Fn(t, (e) => e instanceof E ? e.handle : pn(e) ? ln(e, (n2) => n2.handle) : e);
|
|
5328
5342
|
}
|
|
5329
|
-
class
|
|
5343
|
+
class Dt {
|
|
5330
5344
|
constructor() {
|
|
5331
|
-
|
|
5345
|
+
F(this, "ctx", f());
|
|
5332
5346
|
}
|
|
5333
5347
|
/**
|
|
5334
5348
|
* @deprecated use getOptions()
|
|
@@ -5339,7 +5353,7 @@
|
|
|
5339
5353
|
getOptions(e, n2) {
|
|
5340
5354
|
const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5341
5355
|
let s2 = {}, o = false;
|
|
5342
|
-
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" ?
|
|
5356
|
+
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 }) => ({
|
|
5343
5357
|
ref: Hn(a, o),
|
|
5344
5358
|
label: l2
|
|
5345
5359
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
@@ -5371,7 +5385,7 @@
|
|
|
5371
5385
|
getAnchoredPColumns(e, n2, r) {
|
|
5372
5386
|
const i = this.resolveAnchorCtx(e);
|
|
5373
5387
|
if (i)
|
|
5374
|
-
return new
|
|
5388
|
+
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
|
|
5375
5389
|
...r,
|
|
5376
5390
|
anchorCtx: i
|
|
5377
5391
|
});
|
|
@@ -5408,7 +5422,7 @@
|
|
|
5408
5422
|
getCanonicalOptions(e, n2, r) {
|
|
5409
5423
|
const i = this.resolveAnchorCtx(e);
|
|
5410
5424
|
if (!i) return;
|
|
5411
|
-
const s2 = new
|
|
5425
|
+
const s2 = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
|
|
5412
5426
|
...r,
|
|
5413
5427
|
anchorCtx: i
|
|
5414
5428
|
});
|
|
@@ -5432,7 +5446,7 @@
|
|
|
5432
5446
|
ref: n2.ref,
|
|
5433
5447
|
obj: {
|
|
5434
5448
|
...n2.obj,
|
|
5435
|
-
data: new
|
|
5449
|
+
data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5436
5450
|
}
|
|
5437
5451
|
}))
|
|
5438
5452
|
};
|
|
@@ -5453,7 +5467,7 @@
|
|
|
5453
5467
|
...n2.obj,
|
|
5454
5468
|
data: Wn(
|
|
5455
5469
|
n2.obj.data,
|
|
5456
|
-
(r) => new
|
|
5470
|
+
(r) => new E(r, [n2.ref.blockId, n2.ref.name])
|
|
5457
5471
|
)
|
|
5458
5472
|
}
|
|
5459
5473
|
}))
|
|
@@ -5482,7 +5496,7 @@
|
|
|
5482
5496
|
if (n2)
|
|
5483
5497
|
return Fn(
|
|
5484
5498
|
n2,
|
|
5485
|
-
(i) => new
|
|
5499
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
5486
5500
|
);
|
|
5487
5501
|
}
|
|
5488
5502
|
/**
|
|
@@ -5503,7 +5517,7 @@
|
|
|
5503
5517
|
getPColumnSpecByRef(e) {
|
|
5504
5518
|
const n2 = this.getSpecByRef(e);
|
|
5505
5519
|
if (n2) {
|
|
5506
|
-
if (!f(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
|
|
5520
|
+
if (!f$1(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
|
|
5507
5521
|
return n2;
|
|
5508
5522
|
}
|
|
5509
5523
|
}
|
|
@@ -5522,13 +5536,13 @@
|
|
|
5522
5536
|
findDataWithCompatibleSpec(e) {
|
|
5523
5537
|
const n2 = [];
|
|
5524
5538
|
e: for (const r of this.getData().entries) {
|
|
5525
|
-
if (!f(r.obj.spec))
|
|
5539
|
+
if (!f$1(r.obj.spec))
|
|
5526
5540
|
continue;
|
|
5527
5541
|
const i = r.obj.spec;
|
|
5528
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
5542
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
|
|
5529
5543
|
for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
|
|
5530
5544
|
const o = e.axesSpec[s2], a = i.axesSpec[s2];
|
|
5531
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
5545
|
+
if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
|
|
5532
5546
|
continue e;
|
|
5533
5547
|
}
|
|
5534
5548
|
n2.push(r.obj);
|
|
@@ -5545,7 +5559,7 @@
|
|
|
5545
5559
|
for (const r of n2.entries) {
|
|
5546
5560
|
if (!Z(r.obj)) continue;
|
|
5547
5561
|
const i = r.obj.spec;
|
|
5548
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
5562
|
+
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)) {
|
|
5549
5563
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
5550
5564
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
5551
5565
|
return Object.fromEntries(
|
|
@@ -5565,12 +5579,12 @@
|
|
|
5565
5579
|
*/
|
|
5566
5580
|
selectColumns(e) {
|
|
5567
5581
|
const n2 = typeof e == "function" ? e : Kn(e);
|
|
5568
|
-
return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5582
|
+
return this.getSpecs().entries.filter(({ obj: i }) => f$1(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5569
5583
|
const o = s2;
|
|
5570
5584
|
let a = null;
|
|
5571
5585
|
const l2 = this;
|
|
5572
5586
|
return {
|
|
5573
|
-
id:
|
|
5587
|
+
id: De(i),
|
|
5574
5588
|
spec: o,
|
|
5575
5589
|
get data() {
|
|
5576
5590
|
var u2;
|
|
@@ -5595,14 +5609,14 @@
|
|
|
5595
5609
|
return r;
|
|
5596
5610
|
}
|
|
5597
5611
|
}
|
|
5598
|
-
class
|
|
5612
|
+
class ee {
|
|
5599
5613
|
constructor() {
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
this.ctx =
|
|
5614
|
+
F(this, "ctx");
|
|
5615
|
+
F(this, "args");
|
|
5616
|
+
F(this, "uiState");
|
|
5617
|
+
F(this, "_activeArgsCache");
|
|
5618
|
+
F(this, "resultPool", new Dt());
|
|
5619
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5606
5620
|
}
|
|
5607
5621
|
/**
|
|
5608
5622
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -5620,14 +5634,14 @@
|
|
|
5620
5634
|
getNamedAccessor(e) {
|
|
5621
5635
|
return pe(
|
|
5622
5636
|
this.ctx.getAccessorHandleByName(e),
|
|
5623
|
-
(n2) => new
|
|
5637
|
+
(n2) => new E(n2, [e])
|
|
5624
5638
|
);
|
|
5625
5639
|
}
|
|
5626
5640
|
get prerun() {
|
|
5627
|
-
return this.getNamedAccessor(
|
|
5641
|
+
return this.getNamedAccessor(Re);
|
|
5628
5642
|
}
|
|
5629
5643
|
get outputs() {
|
|
5630
|
-
return this.getNamedAccessor(
|
|
5644
|
+
return this.getNamedAccessor(ke);
|
|
5631
5645
|
}
|
|
5632
5646
|
/**
|
|
5633
5647
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5639,13 +5653,13 @@
|
|
|
5639
5653
|
}
|
|
5640
5654
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5641
5655
|
var i;
|
|
5642
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5656
|
+
const n2 = e.some((s2) => !(s2.data instanceof E) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5643
5657
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5644
5658
|
}
|
|
5645
5659
|
// TODO remove all non-PColumn fields
|
|
5646
5660
|
createPFrame(e) {
|
|
5647
5661
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5648
|
-
e.map((n2) =>
|
|
5662
|
+
e.map((n2) => _e(n2))
|
|
5649
5663
|
);
|
|
5650
5664
|
}
|
|
5651
5665
|
createPTable(e) {
|
|
@@ -5658,7 +5672,7 @@
|
|
|
5658
5672
|
filters: e.filters ?? [],
|
|
5659
5673
|
sorting: e.sorting ?? []
|
|
5660
5674
|
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
|
|
5661
|
-
On(n2, (r) =>
|
|
5675
|
+
On(n2, (r) => _e(r))
|
|
5662
5676
|
);
|
|
5663
5677
|
}
|
|
5664
5678
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5669,26 +5683,26 @@
|
|
|
5669
5683
|
return this.ctx.getCurrentUnstableMarker();
|
|
5670
5684
|
}
|
|
5671
5685
|
}
|
|
5672
|
-
const
|
|
5673
|
-
function
|
|
5686
|
+
const z = "1.30.26";
|
|
5687
|
+
function Ft(t) {
|
|
5674
5688
|
return t.__renderLambda === true;
|
|
5675
5689
|
}
|
|
5676
|
-
function
|
|
5690
|
+
function de(t) {
|
|
5677
5691
|
if (t !== void 0)
|
|
5678
|
-
return
|
|
5692
|
+
return Ft(t) ? t.handle : t;
|
|
5679
5693
|
}
|
|
5680
|
-
class
|
|
5694
|
+
class L {
|
|
5681
5695
|
constructor(e, n2, r, i, s2, o, a, l2) {
|
|
5682
5696
|
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
|
|
5683
5697
|
}
|
|
5684
5698
|
static create(e = "Heavy") {
|
|
5685
|
-
return new
|
|
5699
|
+
return new L(
|
|
5686
5700
|
e,
|
|
5687
5701
|
void 0,
|
|
5688
5702
|
{},
|
|
5689
5703
|
{},
|
|
5690
|
-
|
|
5691
|
-
|
|
5704
|
+
ne(true),
|
|
5705
|
+
ne([]),
|
|
5692
5706
|
void 0,
|
|
5693
5707
|
void 0
|
|
5694
5708
|
);
|
|
@@ -5696,7 +5710,7 @@
|
|
|
5696
5710
|
output(e, n2, r = {}) {
|
|
5697
5711
|
if (typeof n2 == "function") {
|
|
5698
5712
|
const i = `output#${e}`;
|
|
5699
|
-
return
|
|
5713
|
+
return G(i, () => n2(new ee())), new L(
|
|
5700
5714
|
this._renderingMode,
|
|
5701
5715
|
this._initialArgs,
|
|
5702
5716
|
this._initialUiState,
|
|
@@ -5714,7 +5728,7 @@
|
|
|
5714
5728
|
this._enrichmentTargets
|
|
5715
5729
|
);
|
|
5716
5730
|
} else
|
|
5717
|
-
return new
|
|
5731
|
+
return new L(
|
|
5718
5732
|
this._renderingMode,
|
|
5719
5733
|
this._initialArgs,
|
|
5720
5734
|
this._initialUiState,
|
|
@@ -5733,7 +5747,7 @@
|
|
|
5733
5747
|
return this.output(e, n2, { retentive: true });
|
|
5734
5748
|
}
|
|
5735
5749
|
argsValid(e) {
|
|
5736
|
-
return typeof e == "function" ? (
|
|
5750
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new ee())), new L(
|
|
5737
5751
|
this._renderingMode,
|
|
5738
5752
|
this._initialArgs,
|
|
5739
5753
|
this._initialUiState,
|
|
@@ -5745,7 +5759,7 @@
|
|
|
5745
5759
|
this._sections,
|
|
5746
5760
|
this._title,
|
|
5747
5761
|
this._enrichmentTargets
|
|
5748
|
-
)) : new
|
|
5762
|
+
)) : new L(
|
|
5749
5763
|
this._renderingMode,
|
|
5750
5764
|
this._initialArgs,
|
|
5751
5765
|
this._initialUiState,
|
|
@@ -5757,7 +5771,7 @@
|
|
|
5757
5771
|
);
|
|
5758
5772
|
}
|
|
5759
5773
|
sections(e) {
|
|
5760
|
-
return Array.isArray(e) ? this.sections(
|
|
5774
|
+
return Array.isArray(e) ? this.sections(ne(e)) : typeof e == "function" ? (G("sections", () => e(new ee())), new L(
|
|
5761
5775
|
this._renderingMode,
|
|
5762
5776
|
this._initialArgs,
|
|
5763
5777
|
this._initialUiState,
|
|
@@ -5766,7 +5780,7 @@
|
|
|
5766
5780
|
{ __renderLambda: true, handle: "sections" },
|
|
5767
5781
|
this._title,
|
|
5768
5782
|
this._enrichmentTargets
|
|
5769
|
-
)) : new
|
|
5783
|
+
)) : new L(
|
|
5770
5784
|
this._renderingMode,
|
|
5771
5785
|
this._initialArgs,
|
|
5772
5786
|
this._initialUiState,
|
|
@@ -5779,7 +5793,7 @@
|
|
|
5779
5793
|
}
|
|
5780
5794
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5781
5795
|
title(e) {
|
|
5782
|
-
return
|
|
5796
|
+
return G("title", () => e(new ee())), new L(
|
|
5783
5797
|
this._renderingMode,
|
|
5784
5798
|
this._initialArgs,
|
|
5785
5799
|
this._initialUiState,
|
|
@@ -5795,7 +5809,7 @@
|
|
|
5795
5809
|
* @deprecated use {@link withArgs}
|
|
5796
5810
|
* */
|
|
5797
5811
|
initialArgs(e) {
|
|
5798
|
-
return new
|
|
5812
|
+
return new L(
|
|
5799
5813
|
this._renderingMode,
|
|
5800
5814
|
e,
|
|
5801
5815
|
this._initialUiState,
|
|
@@ -5808,7 +5822,7 @@
|
|
|
5808
5822
|
}
|
|
5809
5823
|
/** Sets initial args for the block, this value must be specified. */
|
|
5810
5824
|
withArgs(e) {
|
|
5811
|
-
return new
|
|
5825
|
+
return new L(
|
|
5812
5826
|
this._renderingMode,
|
|
5813
5827
|
e,
|
|
5814
5828
|
this._initialUiState,
|
|
@@ -5821,7 +5835,7 @@
|
|
|
5821
5835
|
}
|
|
5822
5836
|
/** Defines type and sets initial value for block UiState. */
|
|
5823
5837
|
withUiState(e) {
|
|
5824
|
-
return new
|
|
5838
|
+
return new L(
|
|
5825
5839
|
this._renderingMode,
|
|
5826
5840
|
this._initialArgs,
|
|
5827
5841
|
e,
|
|
@@ -5837,7 +5851,7 @@
|
|
|
5837
5851
|
* Influences dependency graph construction.
|
|
5838
5852
|
*/
|
|
5839
5853
|
enriches(e) {
|
|
5840
|
-
return
|
|
5854
|
+
return G("enrichmentTargets", e), new L(
|
|
5841
5855
|
this._renderingMode,
|
|
5842
5856
|
this._initialArgs,
|
|
5843
5857
|
this._initialUiState,
|
|
@@ -5855,7 +5869,7 @@
|
|
|
5855
5869
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5856
5870
|
const e = {
|
|
5857
5871
|
v3: {
|
|
5858
|
-
sdkVersion:
|
|
5872
|
+
sdkVersion: z,
|
|
5859
5873
|
renderingMode: this._renderingMode,
|
|
5860
5874
|
initialArgs: this._initialArgs,
|
|
5861
5875
|
initialUiState: this._initialUiState,
|
|
@@ -5866,70 +5880,70 @@
|
|
|
5866
5880
|
enrichmentTargets: this._enrichmentTargets
|
|
5867
5881
|
},
|
|
5868
5882
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5869
|
-
sdkVersion:
|
|
5883
|
+
sdkVersion: z,
|
|
5870
5884
|
renderingMode: this._renderingMode,
|
|
5871
5885
|
initialArgs: this._initialArgs,
|
|
5872
|
-
inputsValid:
|
|
5873
|
-
sections:
|
|
5886
|
+
inputsValid: de(this._inputsValid),
|
|
5887
|
+
sections: de(this._sections),
|
|
5874
5888
|
outputs: Object.fromEntries(
|
|
5875
|
-
Object.entries(this._outputs).map(([n2, r]) => [n2,
|
|
5889
|
+
Object.entries(this._outputs).map(([n2, r]) => [n2, de(r)])
|
|
5876
5890
|
)
|
|
5877
5891
|
};
|
|
5878
|
-
return
|
|
5892
|
+
return ct() ? Oe({ sdkVersion: z }) : { config: e };
|
|
5879
5893
|
}
|
|
5880
5894
|
}
|
|
5881
|
-
function
|
|
5895
|
+
function Ot(t) {
|
|
5882
5896
|
return JSON.parse(t);
|
|
5883
5897
|
}
|
|
5884
|
-
function
|
|
5898
|
+
function Rt(t) {
|
|
5885
5899
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5886
5900
|
}
|
|
5887
|
-
function
|
|
5888
|
-
return new
|
|
5901
|
+
function Je(t) {
|
|
5902
|
+
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5889
5903
|
name: "pl7.app/label",
|
|
5890
5904
|
axes: [{}]
|
|
5891
5905
|
// exactly one axis
|
|
5892
5906
|
}, { dontWaitAllData: true });
|
|
5893
5907
|
}
|
|
5894
|
-
function
|
|
5908
|
+
function Ne(t, e) {
|
|
5895
5909
|
const n2 = [], r = [];
|
|
5896
5910
|
for (const a of t)
|
|
5897
|
-
|
|
5911
|
+
Rt(a.spec) ? n2.push(a) : r.push(a);
|
|
5898
5912
|
const i = [];
|
|
5899
5913
|
for (const a of r)
|
|
5900
5914
|
for (const l2 of a.spec.axesSpec) {
|
|
5901
5915
|
const u2 = p$1(l2);
|
|
5902
|
-
i.some((
|
|
5916
|
+
i.some((p2) => X(p2, u2)) || i.push(u2);
|
|
5903
5917
|
}
|
|
5904
5918
|
for (const a of n2) {
|
|
5905
|
-
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((
|
|
5919
|
+
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((p2) => X(p2, l2));
|
|
5906
5920
|
u2 !== -1 && i.splice(u2, 1);
|
|
5907
5921
|
}
|
|
5908
5922
|
const s2 = (a, l2) => {
|
|
5909
5923
|
let u2 = a.toString();
|
|
5910
5924
|
if (l2)
|
|
5911
|
-
for (const
|
|
5912
|
-
u2 +=
|
|
5925
|
+
for (const p2 in l2)
|
|
5926
|
+
u2 += p2, u2 += l2[p2];
|
|
5913
5927
|
return u2;
|
|
5914
5928
|
}, o = [];
|
|
5915
5929
|
for (const a of e) {
|
|
5916
|
-
const l2 = a.spec.axesSpec[0], u2 = p$1(l2),
|
|
5917
|
-
if (
|
|
5918
|
-
const
|
|
5919
|
-
|
|
5920
|
-
id: s2(a.id,
|
|
5930
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(l2), p2 = i.findIndex((h2) => X(h2, u2));
|
|
5931
|
+
if (p2 !== -1) {
|
|
5932
|
+
const h2 = i[p2], w2 = Object.keys(h2.domain ?? {}).length, g = Object.keys(l2.domain ?? {}).length;
|
|
5933
|
+
w2 > g ? o.push({
|
|
5934
|
+
id: s2(a.id, h2.domain),
|
|
5921
5935
|
spec: {
|
|
5922
5936
|
...a.spec,
|
|
5923
|
-
axesSpec: [{ ...
|
|
5937
|
+
axesSpec: [{ ...h2, annotations: l2.annotations }]
|
|
5924
5938
|
},
|
|
5925
5939
|
data: a.data
|
|
5926
|
-
}) : o.push(a), i.splice(
|
|
5940
|
+
}) : o.push(a), i.splice(p2, 1);
|
|
5927
5941
|
}
|
|
5928
5942
|
}
|
|
5929
5943
|
return o;
|
|
5930
5944
|
}
|
|
5931
|
-
function
|
|
5932
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
5945
|
+
function Ue(t) {
|
|
5946
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
5933
5947
|
return t.map((i) => i.data).every((i) => {
|
|
5934
5948
|
if (e(i))
|
|
5935
5949
|
return true;
|
|
@@ -5948,7 +5962,7 @@
|
|
|
5948
5962
|
throw Error(`unsupported column data type: ${i}`);
|
|
5949
5963
|
});
|
|
5950
5964
|
}
|
|
5951
|
-
function
|
|
5965
|
+
function Be(t, e, n2, r, i, s2) {
|
|
5952
5966
|
let o = t;
|
|
5953
5967
|
const a = [];
|
|
5954
5968
|
if (s2) {
|
|
@@ -5969,52 +5983,52 @@
|
|
|
5969
5983
|
sorting: i
|
|
5970
5984
|
};
|
|
5971
5985
|
}
|
|
5972
|
-
function
|
|
5973
|
-
var u2,
|
|
5986
|
+
function Tn(t, e, n2, r) {
|
|
5987
|
+
var u2, p2;
|
|
5974
5988
|
Array.isArray(r) && (r = { filters: r });
|
|
5975
|
-
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 = ((p2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : p2.sorting) ?? [], a = Je(t.resultPool);
|
|
5976
5990
|
if (!a) return;
|
|
5977
|
-
const l2 =
|
|
5978
|
-
if (
|
|
5991
|
+
const l2 = Ne(e.map(Cn), a);
|
|
5992
|
+
if (Ue([...e, ...l2]))
|
|
5979
5993
|
return t.createPTable(
|
|
5980
|
-
|
|
5994
|
+
Be(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5981
5995
|
);
|
|
5982
5996
|
}
|
|
5983
|
-
function
|
|
5997
|
+
function kt(t) {
|
|
5984
5998
|
var e;
|
|
5985
5999
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
5986
6000
|
}
|
|
5987
|
-
function
|
|
5988
|
-
var
|
|
5989
|
-
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
6001
|
+
function Ln(t, e, n2, r, i) {
|
|
6002
|
+
var c2, y;
|
|
6003
|
+
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((c2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : c2.filters) ?? []], a = ((y = r == null ? void 0 : r.pTableParams) == null ? void 0 : y.sorting) ?? [], l2 = e.find((d) => n2(d.spec));
|
|
5990
6004
|
if (!l2) return;
|
|
5991
|
-
const u2 =
|
|
6005
|
+
const u2 = Je(t.resultPool);
|
|
5992
6006
|
if (!u2) return;
|
|
5993
|
-
const
|
|
5994
|
-
var
|
|
6007
|
+
const p2 = new Set((() => {
|
|
6008
|
+
var b, A2;
|
|
5995
6009
|
if (s2 === "inner") return [];
|
|
5996
|
-
const
|
|
5997
|
-
return
|
|
6010
|
+
const d = (A2 = (b = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : b.hiddenColIds) == null ? void 0 : A2.map(Ot).filter((v) => v.type === "column").map((v) => v.id);
|
|
6011
|
+
return d || e.filter((v) => kt(v.spec)).map((v) => v.id);
|
|
5998
6012
|
})());
|
|
5999
|
-
|
|
6000
|
-
const
|
|
6001
|
-
...l2.spec.axesSpec.map((
|
|
6013
|
+
p2.delete(l2.id), [...o.map((d) => d.column), ...a.map((d) => d.column)].filter((d) => d.type === "column").map((d) => p2.delete(d.id));
|
|
6014
|
+
const h2 = e.filter((d) => !p2.has(d.id)), w2 = Ne(h2.map(Cn), u2), g = [
|
|
6015
|
+
...l2.spec.axesSpec.map((d) => ({
|
|
6002
6016
|
type: "axis",
|
|
6003
|
-
id: p$1(
|
|
6004
|
-
spec:
|
|
6017
|
+
id: p$1(d),
|
|
6018
|
+
spec: d
|
|
6005
6019
|
})),
|
|
6006
|
-
...[...e, ...
|
|
6020
|
+
...[...e, ...w2].map((d) => ({
|
|
6007
6021
|
type: "column",
|
|
6008
|
-
id:
|
|
6009
|
-
spec:
|
|
6022
|
+
id: d.id,
|
|
6023
|
+
spec: d.spec
|
|
6010
6024
|
}))
|
|
6011
6025
|
];
|
|
6012
|
-
if (
|
|
6026
|
+
if (!Ue([...h2, ...w2])) return;
|
|
6013
6027
|
const m2 = t.createPTable(
|
|
6014
|
-
|
|
6028
|
+
Be(e, w2, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
6015
6029
|
);
|
|
6016
6030
|
return {
|
|
6017
|
-
tableSpec:
|
|
6031
|
+
tableSpec: g,
|
|
6018
6032
|
tableHandle: m2
|
|
6019
6033
|
};
|
|
6020
6034
|
}
|
|
@@ -6041,7 +6055,7 @@
|
|
|
6041
6055
|
numbers: z$2.array(z$2.coerce.number()),
|
|
6042
6056
|
handles: z$2.array(ImportFileHandleSchema)
|
|
6043
6057
|
});
|
|
6044
|
-
const platforma =
|
|
6058
|
+
const platforma = L.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
|
|
6045
6059
|
if (ctx.args.numbers.length === 5) {
|
|
6046
6060
|
throw new Error("argsValid: test error");
|
|
6047
6061
|
}
|
|
@@ -6055,7 +6069,7 @@
|
|
|
6055
6069
|
const progresses = m2 == null ? void 0 : m2.mapFields((name, val) => [name, val == null ? void 0 : val.getImportProgress()]);
|
|
6056
6070
|
return Object.fromEntries(progresses ?? []);
|
|
6057
6071
|
}).output("pt", (ctx) => {
|
|
6058
|
-
var _a, _b, _c, _d,
|
|
6072
|
+
var _a, _b, _c, _d, _e2;
|
|
6059
6073
|
if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
|
|
6060
6074
|
const data = times(ctx.args.tableNumRows ?? 0, (i) => {
|
|
6061
6075
|
const v = i + 1;
|
|
@@ -6064,7 +6078,7 @@
|
|
|
6064
6078
|
val: v.toString()
|
|
6065
6079
|
};
|
|
6066
6080
|
});
|
|
6067
|
-
return
|
|
6081
|
+
return Tn(
|
|
6068
6082
|
ctx,
|
|
6069
6083
|
[
|
|
6070
6084
|
{
|
|
@@ -6103,12 +6117,12 @@
|
|
|
6103
6117
|
{
|
|
6104
6118
|
filters: [
|
|
6105
6119
|
...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
|
|
6106
|
-
...((
|
|
6120
|
+
...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
|
|
6107
6121
|
]
|
|
6108
6122
|
}
|
|
6109
6123
|
);
|
|
6110
6124
|
}).output("ptV2", (ctx) => {
|
|
6111
|
-
var _a, _b, _c, _d,
|
|
6125
|
+
var _a, _b, _c, _d, _e2;
|
|
6112
6126
|
if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
|
|
6113
6127
|
const data = times(ctx.args.tableNumRows ?? 0, (i) => {
|
|
6114
6128
|
const v = i + 1;
|
|
@@ -6117,7 +6131,7 @@
|
|
|
6117
6131
|
val: v.toString()
|
|
6118
6132
|
};
|
|
6119
6133
|
});
|
|
6120
|
-
return
|
|
6134
|
+
return Ln(
|
|
6121
6135
|
ctx,
|
|
6122
6136
|
[
|
|
6123
6137
|
{
|
|
@@ -6159,7 +6173,7 @@
|
|
|
6159
6173
|
{
|
|
6160
6174
|
filters: [
|
|
6161
6175
|
...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
|
|
6162
|
-
...((
|
|
6176
|
+
...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
|
|
6163
6177
|
]
|
|
6164
6178
|
}
|
|
6165
6179
|
);
|