@milaboratories/milaboratories.ui-examples.model 1.1.53 → 1.1.55
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 +251 -239
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -3948,8 +3948,8 @@
|
|
|
3948
3948
|
quotelessJson,
|
|
3949
3949
|
ZodError
|
|
3950
3950
|
});
|
|
3951
|
-
var
|
|
3952
|
-
var I$1 = (n2, e, t) => e in n2 ?
|
|
3951
|
+
var $$1 = Object.defineProperty;
|
|
3952
|
+
var I$1 = (n2, e, t) => e in n2 ? $$1(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
|
|
3953
3953
|
var l$1 = (n2, e, t) => I$1(n2, typeof e != "symbol" ? e + "" : e, t);
|
|
3954
3954
|
function w(n2) {
|
|
3955
3955
|
throw new Error("Unexpected object: " + n2);
|
|
@@ -4087,12 +4087,12 @@
|
|
|
4087
4087
|
spec: n2.spec
|
|
4088
4088
|
};
|
|
4089
4089
|
}
|
|
4090
|
-
function m$
|
|
4090
|
+
function m$1(n2) {
|
|
4091
4091
|
const { type: e, name: t, domain: r } = n2;
|
|
4092
4092
|
return { type: e, name: t, ...r && { domain: r } };
|
|
4093
4093
|
}
|
|
4094
4094
|
function Jn(n2) {
|
|
4095
|
-
return Le(m$
|
|
4095
|
+
return Le(m$1(n2));
|
|
4096
4096
|
}
|
|
4097
4097
|
function z(n2, e) {
|
|
4098
4098
|
if (n2 === void 0) return e === void 0;
|
|
@@ -4105,9 +4105,9 @@
|
|
|
4105
4105
|
return n2.name === e.name && z(n2.domain, e.domain);
|
|
4106
4106
|
}
|
|
4107
4107
|
function On(n2, e) {
|
|
4108
|
-
return { ...n2, src: y(n2.src, e) };
|
|
4108
|
+
return { ...n2, src: y$1(n2.src, e) };
|
|
4109
4109
|
}
|
|
4110
|
-
function y(n2, e) {
|
|
4110
|
+
function y$1(n2, e) {
|
|
4111
4111
|
switch (n2.type) {
|
|
4112
4112
|
case "column":
|
|
4113
4113
|
return {
|
|
@@ -4121,27 +4121,29 @@
|
|
|
4121
4121
|
newId: n2.newId,
|
|
4122
4122
|
axisFilters: n2.axisFilters
|
|
4123
4123
|
};
|
|
4124
|
+
case "inlineColumn":
|
|
4125
|
+
return n2;
|
|
4124
4126
|
case "inner":
|
|
4125
4127
|
case "full":
|
|
4126
4128
|
return {
|
|
4127
4129
|
type: n2.type,
|
|
4128
|
-
entries: n2.entries.map((t) => y(t, e))
|
|
4130
|
+
entries: n2.entries.map((t) => y$1(t, e))
|
|
4129
4131
|
};
|
|
4130
4132
|
case "outer":
|
|
4131
4133
|
return {
|
|
4132
4134
|
type: "outer",
|
|
4133
|
-
primary: y(n2.primary, e),
|
|
4134
|
-
secondary: n2.secondary.map((t) => y(t, e))
|
|
4135
|
+
primary: y$1(n2.primary, e),
|
|
4136
|
+
secondary: n2.secondary.map((t) => y$1(t, e))
|
|
4135
4137
|
};
|
|
4136
4138
|
default:
|
|
4137
4139
|
w(n2);
|
|
4138
4140
|
}
|
|
4139
4141
|
}
|
|
4140
|
-
function G(n2) {
|
|
4142
|
+
function G$1(n2) {
|
|
4141
4143
|
return Le(n2);
|
|
4142
4144
|
}
|
|
4143
4145
|
function x(n2) {
|
|
4144
|
-
return Le(m$
|
|
4146
|
+
return Le(m$1(n2));
|
|
4145
4147
|
}
|
|
4146
4148
|
function A(n2, e) {
|
|
4147
4149
|
return JSON.stringify([n2, e]);
|
|
@@ -4208,7 +4210,7 @@
|
|
|
4208
4210
|
}
|
|
4209
4211
|
if (r.axes = e.axesSpec.map((a) => {
|
|
4210
4212
|
const i = x(a), u2 = this.axes.get(i);
|
|
4211
|
-
return u2 === void 0 ? m$
|
|
4213
|
+
return u2 === void 0 ? m$1(a) : u2;
|
|
4212
4214
|
}), !t || t.length === 0)
|
|
4213
4215
|
return r;
|
|
4214
4216
|
const s2 = [];
|
|
@@ -4237,7 +4239,7 @@
|
|
|
4237
4239
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4238
4240
|
*/
|
|
4239
4241
|
deriveS(e, t) {
|
|
4240
|
-
return G(this.derive(e, t));
|
|
4242
|
+
return G$1(this.derive(e, t));
|
|
4241
4243
|
}
|
|
4242
4244
|
}
|
|
4243
4245
|
function Dn(n2, e, t) {
|
|
@@ -4287,7 +4289,7 @@
|
|
|
4287
4289
|
throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
|
|
4288
4290
|
return o[0];
|
|
4289
4291
|
} else if ("id" in e) {
|
|
4290
|
-
const o = r.axesSpec.filter((s2) => X$1(e.id, m$
|
|
4292
|
+
const o = r.axesSpec.filter((s2) => X$1(e.id, m$1(s2)));
|
|
4291
4293
|
if (o.length > 1)
|
|
4292
4294
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4293
4295
|
if (o.length === 0)
|
|
@@ -4324,6 +4326,8 @@
|
|
|
4324
4326
|
case "slicedColumn":
|
|
4325
4327
|
e.set(r.column.id, r.column);
|
|
4326
4328
|
return;
|
|
4329
|
+
case "inlineColumn":
|
|
4330
|
+
return;
|
|
4327
4331
|
case "full":
|
|
4328
4332
|
case "inner":
|
|
4329
4333
|
for (const o of r.entries) t(o);
|
|
@@ -4373,7 +4377,7 @@
|
|
|
4373
4377
|
return false;
|
|
4374
4378
|
}
|
|
4375
4379
|
if (e.axes !== void 0) {
|
|
4376
|
-
const t = n2.axesSpec.map(m$
|
|
4380
|
+
const t = n2.axesSpec.map(m$1);
|
|
4377
4381
|
if (e.partialAxesMatch) {
|
|
4378
4382
|
for (const r of e.axes)
|
|
4379
4383
|
if (!t.some((o) => k(r, o)))
|
|
@@ -4466,12 +4470,12 @@
|
|
|
4466
4470
|
}), c = l.extend({
|
|
4467
4471
|
cause: z$1.lazy(() => s).optional(),
|
|
4468
4472
|
errors: z$1.lazy(() => s.array()).optional()
|
|
4469
|
-
}), m
|
|
4473
|
+
}), m = z$1.object({
|
|
4470
4474
|
type: z$1.literal("StandardError"),
|
|
4471
4475
|
name: z$1.string(),
|
|
4472
4476
|
message: z$1.string(),
|
|
4473
4477
|
stack: z$1.string().optional()
|
|
4474
|
-
}), p = m
|
|
4478
|
+
}), p = m.extend({
|
|
4475
4479
|
cause: z$1.lazy(() => s).optional(),
|
|
4476
4480
|
errors: z$1.lazy(() => s.array()).optional()
|
|
4477
4481
|
}), s = z$1.union([p, c]);
|
|
@@ -4502,11 +4506,11 @@
|
|
|
4502
4506
|
function ot() {
|
|
4503
4507
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4504
4508
|
}
|
|
4505
|
-
function
|
|
4509
|
+
function y() {
|
|
4506
4510
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4507
4511
|
throw new Error("Not in config rendering context");
|
|
4508
4512
|
}
|
|
4509
|
-
function
|
|
4513
|
+
function B(t, e) {
|
|
4510
4514
|
const n2 = ot();
|
|
4511
4515
|
if (n2 === void 0) return false;
|
|
4512
4516
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
@@ -4514,12 +4518,12 @@
|
|
|
4514
4518
|
}
|
|
4515
4519
|
const ae = /* @__PURE__ */ new Map();
|
|
4516
4520
|
function at(t, e) {
|
|
4517
|
-
t in
|
|
4521
|
+
t in y().callbackRegistry || (y().callbackRegistry[t] = (n2) => {
|
|
4518
4522
|
for (const r of ae.get(t))
|
|
4519
4523
|
r(n2);
|
|
4520
4524
|
}, ae.set(t, [])), ae.get(t).push(e);
|
|
4521
4525
|
}
|
|
4522
|
-
class
|
|
4526
|
+
class S {
|
|
4523
4527
|
constructor(e, n2 = (r) => r) {
|
|
4524
4528
|
T(this, "isResolved", false);
|
|
4525
4529
|
T(this, "resolvedValue");
|
|
@@ -4528,10 +4532,10 @@
|
|
|
4528
4532
|
});
|
|
4529
4533
|
}
|
|
4530
4534
|
map(e) {
|
|
4531
|
-
return new
|
|
4535
|
+
return new S(this.handle, (n2) => e(this.postProcess(n2)));
|
|
4532
4536
|
}
|
|
4533
4537
|
mapDefined(e) {
|
|
4534
|
-
return new
|
|
4538
|
+
return new S(this.handle, (n2) => {
|
|
4535
4539
|
const r = this.postProcess(n2);
|
|
4536
4540
|
return r ? e(r) : void 0;
|
|
4537
4541
|
});
|
|
@@ -4540,7 +4544,7 @@
|
|
|
4540
4544
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4541
4545
|
}
|
|
4542
4546
|
}
|
|
4543
|
-
function
|
|
4547
|
+
function pe(t, e) {
|
|
4544
4548
|
return t === void 0 ? void 0 : e(t);
|
|
4545
4549
|
}
|
|
4546
4550
|
class I {
|
|
@@ -4582,47 +4586,47 @@
|
|
|
4582
4586
|
...this.resolvePath,
|
|
4583
4587
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4584
4588
|
];
|
|
4585
|
-
return
|
|
4586
|
-
|
|
4589
|
+
return pe(
|
|
4590
|
+
y().resolveWithCommon(this.handle, e, ...n2),
|
|
4587
4591
|
(i) => new I(i, r)
|
|
4588
4592
|
);
|
|
4589
4593
|
}
|
|
4590
4594
|
get resourceType() {
|
|
4591
|
-
return
|
|
4595
|
+
return y().getResourceType(this.handle);
|
|
4592
4596
|
}
|
|
4593
4597
|
getInputsLocked() {
|
|
4594
|
-
return
|
|
4598
|
+
return y().getInputsLocked(this.handle);
|
|
4595
4599
|
}
|
|
4596
4600
|
getOutputsLocked() {
|
|
4597
|
-
return
|
|
4601
|
+
return y().getOutputsLocked(this.handle);
|
|
4598
4602
|
}
|
|
4599
4603
|
getIsReadyOrError() {
|
|
4600
|
-
return
|
|
4604
|
+
return y().getIsReadyOrError(this.handle);
|
|
4601
4605
|
}
|
|
4602
4606
|
getIsFinal() {
|
|
4603
|
-
return
|
|
4607
|
+
return y().getIsFinal(this.handle);
|
|
4604
4608
|
}
|
|
4605
4609
|
getError() {
|
|
4606
4610
|
const e = [...this.resolvePath, "error"];
|
|
4607
|
-
return
|
|
4608
|
-
|
|
4611
|
+
return pe(
|
|
4612
|
+
y().getError(this.handle),
|
|
4609
4613
|
(n2) => new I(n2, e)
|
|
4610
4614
|
);
|
|
4611
4615
|
}
|
|
4612
4616
|
listInputFields() {
|
|
4613
|
-
return
|
|
4617
|
+
return y().listInputFields(this.handle);
|
|
4614
4618
|
}
|
|
4615
4619
|
listOutputFields() {
|
|
4616
|
-
return
|
|
4620
|
+
return y().listOutputFields(this.handle);
|
|
4617
4621
|
}
|
|
4618
4622
|
listDynamicFields() {
|
|
4619
|
-
return
|
|
4623
|
+
return y().listDynamicFields(this.handle);
|
|
4620
4624
|
}
|
|
4621
4625
|
getKeyValueBase64(e) {
|
|
4622
|
-
return
|
|
4626
|
+
return y().getKeyValueBase64(this.handle, e);
|
|
4623
4627
|
}
|
|
4624
4628
|
getKeyValueAsString(e) {
|
|
4625
|
-
return
|
|
4629
|
+
return y().getKeyValueAsString(this.handle, e);
|
|
4626
4630
|
}
|
|
4627
4631
|
getKeyValueAsJson(e) {
|
|
4628
4632
|
const n2 = this.getKeyValueAsString(e);
|
|
@@ -4630,10 +4634,10 @@
|
|
|
4630
4634
|
return JSON.parse(n2);
|
|
4631
4635
|
}
|
|
4632
4636
|
getDataBase64() {
|
|
4633
|
-
return
|
|
4637
|
+
return y().getDataBase64(this.handle);
|
|
4634
4638
|
}
|
|
4635
4639
|
getDataAsString() {
|
|
4636
|
-
return
|
|
4640
|
+
return y().getDataAsString(this.handle);
|
|
4637
4641
|
}
|
|
4638
4642
|
getDataAsJson() {
|
|
4639
4643
|
const e = this.getDataAsString();
|
|
@@ -4654,7 +4658,7 @@
|
|
|
4654
4658
|
*
|
|
4655
4659
|
*/
|
|
4656
4660
|
parsePObjectCollection(e = false, n2 = "") {
|
|
4657
|
-
const r =
|
|
4661
|
+
const r = y().parsePObjectCollection(
|
|
4658
4662
|
this.handle,
|
|
4659
4663
|
e,
|
|
4660
4664
|
n2,
|
|
@@ -4669,14 +4673,14 @@
|
|
|
4669
4673
|
return i;
|
|
4670
4674
|
}
|
|
4671
4675
|
getFileContentAsBase64() {
|
|
4672
|
-
return new
|
|
4676
|
+
return new S(y().getBlobContentAsBase64(this.handle));
|
|
4673
4677
|
}
|
|
4674
4678
|
getFileContentAsString() {
|
|
4675
|
-
return new
|
|
4679
|
+
return new S(y().getBlobContentAsString(this.handle));
|
|
4676
4680
|
}
|
|
4677
4681
|
getFileContentAsJson() {
|
|
4678
|
-
return new
|
|
4679
|
-
|
|
4682
|
+
return new S(
|
|
4683
|
+
y().getBlobContentAsString(this.handle)
|
|
4680
4684
|
).mapDefined((e) => JSON.parse(e));
|
|
4681
4685
|
}
|
|
4682
4686
|
/**
|
|
@@ -4695,7 +4699,7 @@
|
|
|
4695
4699
|
* @returns downloaded file handle
|
|
4696
4700
|
*/
|
|
4697
4701
|
getFileHandle() {
|
|
4698
|
-
return new
|
|
4702
|
+
return new S(y().getDownloadedBlobContentHandle(this.handle));
|
|
4699
4703
|
}
|
|
4700
4704
|
/**
|
|
4701
4705
|
* @deprecated use getFileHandle
|
|
@@ -4707,7 +4711,7 @@
|
|
|
4707
4711
|
* @returns downloaded file handle
|
|
4708
4712
|
*/
|
|
4709
4713
|
getRemoteFileHandle() {
|
|
4710
|
-
return new
|
|
4714
|
+
return new S(y().getOnDemandBlobContentHandle(this.handle));
|
|
4711
4715
|
}
|
|
4712
4716
|
/**
|
|
4713
4717
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4719,22 +4723,22 @@
|
|
|
4719
4723
|
* @returns the url to the extracted folder
|
|
4720
4724
|
*/
|
|
4721
4725
|
extractArchiveAndGetURL(e) {
|
|
4722
|
-
return new
|
|
4726
|
+
return new S(y().extractArchiveAndGetURL(this.handle, e));
|
|
4723
4727
|
}
|
|
4724
4728
|
getImportProgress() {
|
|
4725
|
-
return new
|
|
4729
|
+
return new S(y().getImportProgress(this.handle));
|
|
4726
4730
|
}
|
|
4727
4731
|
getLastLogs(e) {
|
|
4728
|
-
return new
|
|
4732
|
+
return new S(y().getLastLogs(this.handle, e));
|
|
4729
4733
|
}
|
|
4730
4734
|
getProgressLog(e) {
|
|
4731
|
-
return new
|
|
4735
|
+
return new S(y().getProgressLog(this.handle, e));
|
|
4732
4736
|
}
|
|
4733
4737
|
getProgressLogWithInfo(e) {
|
|
4734
|
-
return new
|
|
4738
|
+
return new S(y().getProgressLogWithInfo(this.handle, e));
|
|
4735
4739
|
}
|
|
4736
4740
|
getLogHandle() {
|
|
4737
|
-
return new
|
|
4741
|
+
return new S(y().getLogHandle(this.handle));
|
|
4738
4742
|
}
|
|
4739
4743
|
allFieldsResolved(e = "Input") {
|
|
4740
4744
|
switch (e) {
|
|
@@ -4760,89 +4764,89 @@
|
|
|
4760
4764
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4761
4765
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4762
4766
|
);
|
|
4763
|
-
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2,
|
|
4767
|
+
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, p2]) => o(u2, p2));
|
|
4764
4768
|
}
|
|
4765
4769
|
}
|
|
4766
|
-
const Fe = "staging",
|
|
4767
|
-
const ct = "pl7.app/label",
|
|
4770
|
+
const Fe = "staging", Oe = "main";
|
|
4771
|
+
const ct = "pl7.app/label", pt = "pl7.app/trace", dt = z$1.object({
|
|
4768
4772
|
type: z$1.string(),
|
|
4769
4773
|
importance: z$1.number().optional(),
|
|
4770
4774
|
id: z$1.string().optional(),
|
|
4771
4775
|
label: z$1.string()
|
|
4772
|
-
}), ft = z$1.array(
|
|
4776
|
+
}), ft = z$1.array(dt), ht = 1e-3, gt = "__LABEL__", xe = "__LABEL__@1";
|
|
4773
4777
|
function Re(t, e, n2 = {}) {
|
|
4774
4778
|
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((f2) => {
|
|
4775
4779
|
var z2, F;
|
|
4776
|
-
const
|
|
4777
|
-
let
|
|
4778
|
-
"spec" in
|
|
4779
|
-
const
|
|
4780
|
-
...
|
|
4781
|
-
...
|
|
4780
|
+
const g = e(f2);
|
|
4781
|
+
let h, P, c2;
|
|
4782
|
+
"spec" in g && typeof g.spec == "object" ? (h = g.spec, P = g.prefixTrace, c2 = g.suffixTrace) : h = g;
|
|
4783
|
+
const b = (z2 = h.annotations) == null ? void 0 : z2[ct], m2 = (F = h.annotations) == null ? void 0 : F[pt], w2 = (m2 ? ft.safeParse(JSON.parse(m2)).data : void 0) ?? [], A2 = [
|
|
4784
|
+
...P ?? [],
|
|
4785
|
+
...w2,
|
|
4782
4786
|
...c2 ?? []
|
|
4783
4787
|
];
|
|
4784
|
-
if (
|
|
4785
|
-
const L = { label:
|
|
4788
|
+
if (b) {
|
|
4789
|
+
const L = { label: b, type: gt, importance: -2 };
|
|
4786
4790
|
n2.addLabelAsSuffix ? A2.push(L) : A2.splice(0, 0, L);
|
|
4787
4791
|
}
|
|
4788
|
-
const
|
|
4792
|
+
const O = [], J = /* @__PURE__ */ new Map();
|
|
4789
4793
|
for (let L = A2.length - 1; L >= 0; --L) {
|
|
4790
|
-
const { type:
|
|
4791
|
-
|
|
4792
|
-
const
|
|
4793
|
-
i.set(
|
|
4794
|
-
|
|
4794
|
+
const { type: k2 } = A2[L], se = A2[L].importance ?? 0, N2 = (J.get(k2) ?? 0) + 1;
|
|
4795
|
+
J.set(k2, N2);
|
|
4796
|
+
const x2 = `${k2}@${N2}`;
|
|
4797
|
+
i.set(x2, (i.get(x2) ?? 0) + 1), r.set(
|
|
4798
|
+
x2,
|
|
4795
4799
|
Math.max(
|
|
4796
|
-
r.get(
|
|
4800
|
+
r.get(x2) ?? Number.NEGATIVE_INFINITY,
|
|
4797
4801
|
se - (A2.length - L) * ht
|
|
4798
4802
|
)
|
|
4799
|
-
),
|
|
4803
|
+
), O.push({ ...A2[L], fullType: x2, occurrenceIndex: N2 });
|
|
4800
4804
|
}
|
|
4801
|
-
return
|
|
4805
|
+
return O.reverse(), {
|
|
4802
4806
|
value: f2,
|
|
4803
|
-
spec:
|
|
4804
|
-
label:
|
|
4805
|
-
fullTrace:
|
|
4807
|
+
spec: h,
|
|
4808
|
+
label: b,
|
|
4809
|
+
fullTrace: O
|
|
4806
4810
|
};
|
|
4807
4811
|
}), o = [], a = [], l2 = [...r];
|
|
4808
|
-
l2.sort(([, f2], [,
|
|
4812
|
+
l2.sort(([, f2], [, g]) => g - f2);
|
|
4809
4813
|
for (const [f2] of l2)
|
|
4810
4814
|
f2.endsWith("@1") || i.get(f2) === t.length ? o.push(f2) : a.push(f2);
|
|
4811
4815
|
const u2 = (f2) => {
|
|
4812
|
-
const
|
|
4813
|
-
for (let
|
|
4814
|
-
const
|
|
4816
|
+
const g = [];
|
|
4817
|
+
for (let h = 0; h < s2.length; h++) {
|
|
4818
|
+
const P = s2[h], c2 = P.fullTrace.filter((w2) => f2.has(w2.fullType));
|
|
4815
4819
|
if (c2.length === 0)
|
|
4816
4820
|
return;
|
|
4817
|
-
const
|
|
4818
|
-
|
|
4819
|
-
label:
|
|
4820
|
-
value:
|
|
4821
|
+
const b = c2.map((w2) => w2.label), m2 = n2.separator ?? " / ";
|
|
4822
|
+
g.push({
|
|
4823
|
+
label: b.join(m2),
|
|
4824
|
+
value: P.value
|
|
4821
4825
|
});
|
|
4822
4826
|
}
|
|
4823
|
-
return
|
|
4827
|
+
return g;
|
|
4824
4828
|
};
|
|
4825
4829
|
if (o.length === 0) {
|
|
4826
4830
|
if (a.length !== 0) throw new Error("Assertion error.");
|
|
4827
|
-
const f2 = u2(new Set(
|
|
4831
|
+
const f2 = u2(new Set(xe));
|
|
4828
4832
|
if (f2 === void 0) throw new Error("Assertion error.");
|
|
4829
4833
|
return f2;
|
|
4830
4834
|
}
|
|
4831
|
-
let
|
|
4832
|
-
for (;
|
|
4835
|
+
let p2 = 0, v = 0;
|
|
4836
|
+
for (; p2 < o.length; ) {
|
|
4833
4837
|
const f2 = /* @__PURE__ */ new Set();
|
|
4834
|
-
n2.includeNativeLabel && f2.add(
|
|
4835
|
-
for (let
|
|
4836
|
-
f2.add(o[
|
|
4837
|
-
const
|
|
4838
|
-
if (
|
|
4839
|
-
|
|
4838
|
+
n2.includeNativeLabel && f2.add(xe);
|
|
4839
|
+
for (let h = 0; h < p2; ++h) f2.add(o[h]);
|
|
4840
|
+
f2.add(o[v]);
|
|
4841
|
+
const g = u2(f2);
|
|
4842
|
+
if (g !== void 0 && new Set(g.map((h) => h.label)).size === t.length) return g;
|
|
4843
|
+
v++, v >= o.length && (p2++, v = p2);
|
|
4840
4844
|
}
|
|
4841
4845
|
const d = u2(/* @__PURE__ */ new Set([...o, ...a]));
|
|
4842
4846
|
if (d === void 0) throw new Error("Assertion error.");
|
|
4843
4847
|
return d;
|
|
4844
4848
|
}
|
|
4845
|
-
const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap",
|
|
4849
|
+
const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap", M = q + "JsonPartitioned", $ = q + "BinaryPartitioned", ke = q + "Partitioned/", ie = ke + "JsonPartitioned", W = ke + "BinaryPartitioned";
|
|
4846
4850
|
const fe = (t) => {
|
|
4847
4851
|
if (t.endsWith(".index"))
|
|
4848
4852
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
@@ -4861,33 +4865,33 @@
|
|
|
4861
4865
|
case re:
|
|
4862
4866
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4863
4867
|
break;
|
|
4864
|
-
case
|
|
4865
|
-
case
|
|
4868
|
+
case M:
|
|
4869
|
+
case $:
|
|
4866
4870
|
i = n2.partitionKeyLength;
|
|
4867
4871
|
break;
|
|
4868
|
-
case
|
|
4872
|
+
case W:
|
|
4869
4873
|
case ie:
|
|
4870
4874
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4871
4875
|
break;
|
|
4872
4876
|
}
|
|
4873
4877
|
switch (e) {
|
|
4874
4878
|
case ne:
|
|
4875
|
-
case
|
|
4876
|
-
case
|
|
4879
|
+
case M:
|
|
4880
|
+
case $:
|
|
4877
4881
|
for (let s2 of t.listInputFields()) {
|
|
4878
|
-
e ===
|
|
4882
|
+
e === $ && (s2 = fe(s2).baseKey);
|
|
4879
4883
|
const o = [...JSON.parse(s2)];
|
|
4880
4884
|
r.push(o);
|
|
4881
4885
|
}
|
|
4882
4886
|
break;
|
|
4883
4887
|
case re:
|
|
4884
|
-
case
|
|
4888
|
+
case W:
|
|
4885
4889
|
case ie:
|
|
4886
4890
|
for (const s2 of t.listInputFields()) {
|
|
4887
4891
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4888
4892
|
if (a !== void 0)
|
|
4889
4893
|
for (let l2 of a.listInputFields()) {
|
|
4890
|
-
e ===
|
|
4894
|
+
e === W && (l2 = fe(l2).baseKey);
|
|
4891
4895
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4892
4896
|
r.push(u2);
|
|
4893
4897
|
}
|
|
@@ -4935,13 +4939,13 @@
|
|
|
4935
4939
|
function he(t, e = []) {
|
|
4936
4940
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4937
4941
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4938
|
-
if (e.length > 0 && (n2 === ie || n2 ===
|
|
4942
|
+
if (e.length > 0 && (n2 === ie || n2 === W))
|
|
4939
4943
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4940
4944
|
switch (n2) {
|
|
4941
4945
|
case ne:
|
|
4942
4946
|
case re:
|
|
4943
4947
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4944
|
-
case
|
|
4948
|
+
case M: {
|
|
4945
4949
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4946
4950
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4947
4951
|
const i = [];
|
|
@@ -4957,7 +4961,7 @@
|
|
|
4957
4961
|
parts: i
|
|
4958
4962
|
};
|
|
4959
4963
|
}
|
|
4960
|
-
case
|
|
4964
|
+
case $: {
|
|
4961
4965
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4962
4966
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4963
4967
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
@@ -4991,8 +4995,8 @@
|
|
|
4991
4995
|
for (const o of t.listInputFields()) {
|
|
4992
4996
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4993
4997
|
if (a === void 0) return;
|
|
4994
|
-
if (a.resourceType.name !==
|
|
4995
|
-
throw new Error(`Expected ${
|
|
4998
|
+
if (a.resourceType.name !== M)
|
|
4999
|
+
throw new Error(`Expected ${M} inside ${n2}, but got ${a.resourceType.name}`);
|
|
4996
5000
|
const l2 = he(a, JSON.parse(o));
|
|
4997
5001
|
if (l2 === void 0) return;
|
|
4998
5002
|
if (l2.type !== "JsonPartitioned")
|
|
@@ -5005,15 +5009,15 @@
|
|
|
5005
5009
|
parts: s2
|
|
5006
5010
|
};
|
|
5007
5011
|
}
|
|
5008
|
-
case
|
|
5012
|
+
case W: {
|
|
5009
5013
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5010
5014
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5011
5015
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5012
5016
|
for (const o of t.listInputFields()) {
|
|
5013
5017
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5014
5018
|
if (a === void 0) return;
|
|
5015
|
-
if (a.resourceType.name !==
|
|
5016
|
-
throw new Error(`Expected ${
|
|
5019
|
+
if (a.resourceType.name !== $)
|
|
5020
|
+
throw new Error(`Expected ${$} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5017
5021
|
const l2 = he(a, JSON.parse(o));
|
|
5018
5022
|
if (l2 === void 0) return;
|
|
5019
5023
|
if (l2.type !== "BinaryPartitioned")
|
|
@@ -5107,7 +5111,7 @@
|
|
|
5107
5111
|
return this.columns.filter((r) => n2(r.spec));
|
|
5108
5112
|
}
|
|
5109
5113
|
}
|
|
5110
|
-
function
|
|
5114
|
+
function xt(t) {
|
|
5111
5115
|
if (t)
|
|
5112
5116
|
return t.map((e) => ({
|
|
5113
5117
|
type: `split:${Jn(e.axisId)}`,
|
|
@@ -5116,16 +5120,16 @@
|
|
|
5116
5120
|
// High importance for split filters in labels
|
|
5117
5121
|
}));
|
|
5118
5122
|
}
|
|
5119
|
-
function
|
|
5123
|
+
function Pt(t) {
|
|
5120
5124
|
if (t)
|
|
5121
5125
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5122
5126
|
}
|
|
5123
|
-
function
|
|
5127
|
+
function Ct(t, e) {
|
|
5124
5128
|
if (!e || e.length === 0) return t;
|
|
5125
5129
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5126
5130
|
return Le({ id: t, axisFilters: n2 });
|
|
5127
5131
|
}
|
|
5128
|
-
function
|
|
5132
|
+
function St(t) {
|
|
5129
5133
|
if (!t || typeof t != "object") return false;
|
|
5130
5134
|
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);
|
|
5131
5135
|
return !!e.domainAnchor || n2 || r;
|
|
@@ -5169,112 +5173,112 @@
|
|
|
5169
5173
|
...i ?? {}
|
|
5170
5174
|
}, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
|
|
5171
5175
|
for (const d of l2) {
|
|
5172
|
-
const f$1 =
|
|
5173
|
-
let
|
|
5176
|
+
const f$1 = St(d);
|
|
5177
|
+
let g;
|
|
5174
5178
|
if (f$1) {
|
|
5175
5179
|
if (!r)
|
|
5176
5180
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5177
|
-
|
|
5181
|
+
g = Dn(r.anchors, d, n2);
|
|
5178
5182
|
} else
|
|
5179
|
-
|
|
5180
|
-
const
|
|
5181
|
-
for (const
|
|
5182
|
-
const
|
|
5183
|
-
for (const A2 of
|
|
5184
|
-
if (
|
|
5185
|
-
|
|
5183
|
+
g = d;
|
|
5184
|
+
const h = /* @__PURE__ */ new Set(), P = [];
|
|
5185
|
+
for (const m2 of this.providers) {
|
|
5186
|
+
const w2 = m2.selectColumns(g);
|
|
5187
|
+
for (const A2 of w2) {
|
|
5188
|
+
if (h.has(A2.id)) throw new Error(`Duplicate column id ${A2.id} in provider ${m2.constructor.name}`);
|
|
5189
|
+
h.add(A2.id), P.push(A2);
|
|
5186
5190
|
}
|
|
5187
5191
|
}
|
|
5188
|
-
if (
|
|
5189
|
-
const c2 = _t(d),
|
|
5190
|
-
for (const
|
|
5191
|
-
if (!f(
|
|
5192
|
-
const
|
|
5193
|
-
if (
|
|
5194
|
-
const A2 = bt(
|
|
5192
|
+
if (P.length === 0) continue;
|
|
5193
|
+
const c2 = _t(d), b = c2.length > 0;
|
|
5194
|
+
for (const m2 of P) {
|
|
5195
|
+
if (!f(m2.spec)) continue;
|
|
5196
|
+
const w2 = m2.spec;
|
|
5197
|
+
if (b) {
|
|
5198
|
+
const A2 = bt(m2.data);
|
|
5195
5199
|
if (!A2) {
|
|
5196
5200
|
if (s2) continue;
|
|
5197
5201
|
return;
|
|
5198
5202
|
}
|
|
5199
5203
|
if (!yn(A2))
|
|
5200
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${
|
|
5201
|
-
const
|
|
5202
|
-
if (
|
|
5203
|
-
throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${
|
|
5204
|
-
const z2 = c2.map((
|
|
5205
|
-
if (
|
|
5206
|
-
if (F.push([...
|
|
5204
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${A2.type} for column ${m2.id}`);
|
|
5205
|
+
const O = vt(A2), J = c2[c2.length - 1];
|
|
5206
|
+
if (J >= A2.partitionKeyLength)
|
|
5207
|
+
throw new Error(`Not enough partition keys (${A2.partitionKeyLength}) for requested split axes (max index ${J}) in column ${w2.name}`);
|
|
5208
|
+
const z2 = c2.map((x2) => this.findLabels(m$1(w2.axesSpec[x2]))), F = [], L = (x2, U) => {
|
|
5209
|
+
if (U >= c2.length) {
|
|
5210
|
+
if (F.push([...x2]), F.length > 1e4)
|
|
5207
5211
|
throw new Error("Too many key combinations, aborting.");
|
|
5208
5212
|
return;
|
|
5209
5213
|
}
|
|
5210
|
-
const
|
|
5211
|
-
if (
|
|
5212
|
-
throw new Error(`Axis index ${
|
|
5213
|
-
const
|
|
5214
|
-
if (!
|
|
5214
|
+
const D = c2[U];
|
|
5215
|
+
if (D >= O.length)
|
|
5216
|
+
throw new Error(`Axis index ${D} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${m2.id}`);
|
|
5217
|
+
const j2 = O[D];
|
|
5218
|
+
if (!j2 || j2.length === 0) {
|
|
5215
5219
|
F.length = 0;
|
|
5216
5220
|
return;
|
|
5217
5221
|
}
|
|
5218
|
-
for (const Y2 of
|
|
5219
|
-
|
|
5222
|
+
for (const Y2 of j2)
|
|
5223
|
+
x2.push(Y2), L(x2, U + 1), x2.pop();
|
|
5220
5224
|
};
|
|
5221
5225
|
if (L([], 0), F.length === 0)
|
|
5222
5226
|
continue;
|
|
5223
|
-
const
|
|
5224
|
-
for (let
|
|
5225
|
-
|
|
5226
|
-
const
|
|
5227
|
-
for (const
|
|
5228
|
-
const
|
|
5229
|
-
const Y2 = se[
|
|
5230
|
-
return { axisIdx: Y2, axisId: Ue, value:
|
|
5227
|
+
const k2 = [...w2.axesSpec], se = c2.map((x2) => x2);
|
|
5228
|
+
for (let x2 = c2.length - 1; x2 >= 0; x2--)
|
|
5229
|
+
k2.splice(c2[x2], 1);
|
|
5230
|
+
const N2 = { ...w2, axesSpec: k2 };
|
|
5231
|
+
for (const x2 of F) {
|
|
5232
|
+
const U = x2.map((D, j2) => {
|
|
5233
|
+
const Y2 = se[j2], Ue = m$1(w2.axesSpec[Y2]), oe = z2[j2], Be = (oe == null ? void 0 : oe[D]) ?? String(D);
|
|
5234
|
+
return { axisIdx: Y2, axisId: Ue, value: D, label: Be };
|
|
5231
5235
|
});
|
|
5232
5236
|
u2.push({
|
|
5233
5237
|
type: "split",
|
|
5234
|
-
originalColumn:
|
|
5235
|
-
spec:
|
|
5236
|
-
adjustedSpec:
|
|
5238
|
+
originalColumn: m2,
|
|
5239
|
+
spec: w2,
|
|
5240
|
+
adjustedSpec: N2,
|
|
5237
5241
|
dataEntries: A2,
|
|
5238
|
-
axisFilters:
|
|
5242
|
+
axisFilters: U
|
|
5239
5243
|
});
|
|
5240
5244
|
}
|
|
5241
5245
|
} else
|
|
5242
5246
|
u2.push({
|
|
5243
5247
|
type: "direct",
|
|
5244
|
-
originalColumn:
|
|
5245
|
-
spec:
|
|
5246
|
-
adjustedSpec:
|
|
5248
|
+
originalColumn: m2,
|
|
5249
|
+
spec: w2,
|
|
5250
|
+
adjustedSpec: w2
|
|
5247
5251
|
});
|
|
5248
5252
|
}
|
|
5249
5253
|
}
|
|
5250
5254
|
if (u2.length === 0) return [];
|
|
5251
|
-
const
|
|
5255
|
+
const p2 = Re(
|
|
5252
5256
|
u2,
|
|
5253
5257
|
(d) => ({
|
|
5254
5258
|
spec: d.spec,
|
|
5255
|
-
suffixTrace: d.type === "split" ?
|
|
5259
|
+
suffixTrace: d.type === "split" ? xt(d.axisFilters) : void 0
|
|
5256
5260
|
}),
|
|
5257
5261
|
a
|
|
5258
|
-
),
|
|
5259
|
-
for (const { value: d, label: f2 } of
|
|
5260
|
-
const { originalColumn:
|
|
5261
|
-
let
|
|
5262
|
-
r ?
|
|
5263
|
-
let
|
|
5264
|
-
o && (
|
|
5265
|
-
...
|
|
5262
|
+
), v = [];
|
|
5263
|
+
for (const { value: d, label: f2 } of p2) {
|
|
5264
|
+
const { originalColumn: g, spec: h } = d, P = d.type === "split" ? d.axisFilters : void 0, c2 = Pt(P);
|
|
5265
|
+
let b;
|
|
5266
|
+
r ? b = r.deriveS(h, c2) : b = Ct(g.id, c2);
|
|
5267
|
+
let m2 = { ...d.adjustedSpec };
|
|
5268
|
+
o && (m2 = {
|
|
5269
|
+
...m2,
|
|
5266
5270
|
annotations: {
|
|
5267
|
-
...
|
|
5271
|
+
...m2.annotations ?? {},
|
|
5268
5272
|
"pl7.app/label": f2
|
|
5269
5273
|
}
|
|
5270
|
-
}),
|
|
5271
|
-
id:
|
|
5272
|
-
spec:
|
|
5274
|
+
}), v.push({
|
|
5275
|
+
id: b,
|
|
5276
|
+
spec: m2,
|
|
5273
5277
|
data: () => d.type === "split" ? gn(wt(d.dataEntries, c2)) : d.originalColumn.data,
|
|
5274
5278
|
label: f2
|
|
5275
5279
|
});
|
|
5276
5280
|
}
|
|
5277
|
-
return
|
|
5281
|
+
return v;
|
|
5278
5282
|
}
|
|
5279
5283
|
getColumns(e, n2) {
|
|
5280
5284
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5306,12 +5310,12 @@
|
|
|
5306
5310
|
if (t[n2] !== e[n2]) return false;
|
|
5307
5311
|
return true;
|
|
5308
5312
|
}
|
|
5309
|
-
function
|
|
5313
|
+
function Pe(t) {
|
|
5310
5314
|
return Fn(t, (e) => e instanceof I ? e.handle : mn(e) ? ln(e, (n2) => n2.handle) : e);
|
|
5311
5315
|
}
|
|
5312
5316
|
class It {
|
|
5313
5317
|
constructor() {
|
|
5314
|
-
T(this, "ctx",
|
|
5318
|
+
T(this, "ctx", y());
|
|
5315
5319
|
}
|
|
5316
5320
|
/**
|
|
5317
5321
|
* @deprecated use getOptions()
|
|
@@ -5585,7 +5589,7 @@
|
|
|
5585
5589
|
T(this, "uiState");
|
|
5586
5590
|
T(this, "_activeArgsCache");
|
|
5587
5591
|
T(this, "resultPool", new It());
|
|
5588
|
-
this.ctx =
|
|
5592
|
+
this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5589
5593
|
}
|
|
5590
5594
|
/**
|
|
5591
5595
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -5601,7 +5605,7 @@
|
|
|
5601
5605
|
// return this.ctx.featureFlags;
|
|
5602
5606
|
// }
|
|
5603
5607
|
getNamedAccessor(e) {
|
|
5604
|
-
return
|
|
5608
|
+
return pe(
|
|
5605
5609
|
this.ctx.getAccessorHandleByName(e),
|
|
5606
5610
|
(n2) => new I(n2, [e])
|
|
5607
5611
|
);
|
|
@@ -5610,7 +5614,7 @@
|
|
|
5610
5614
|
return this.getNamedAccessor(Fe);
|
|
5611
5615
|
}
|
|
5612
5616
|
get outputs() {
|
|
5613
|
-
return this.getNamedAccessor(
|
|
5617
|
+
return this.getNamedAccessor(Oe);
|
|
5614
5618
|
}
|
|
5615
5619
|
/**
|
|
5616
5620
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5628,7 +5632,7 @@
|
|
|
5628
5632
|
// TODO remove all non-PColumn fields
|
|
5629
5633
|
createPFrame(e) {
|
|
5630
5634
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5631
|
-
e.map((n2) =>
|
|
5635
|
+
e.map((n2) => Pe(n2))
|
|
5632
5636
|
);
|
|
5633
5637
|
}
|
|
5634
5638
|
createPTable(e) {
|
|
@@ -5641,7 +5645,7 @@
|
|
|
5641
5645
|
filters: e.filters ?? [],
|
|
5642
5646
|
sorting: e.sorting ?? []
|
|
5643
5647
|
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
|
|
5644
|
-
On(n2, (r) =>
|
|
5648
|
+
On(n2, (r) => Pe(r))
|
|
5645
5649
|
);
|
|
5646
5650
|
}
|
|
5647
5651
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5652,7 +5656,7 @@
|
|
|
5652
5656
|
return this.ctx.getCurrentUnstableMarker();
|
|
5653
5657
|
}
|
|
5654
5658
|
}
|
|
5655
|
-
const
|
|
5659
|
+
const G = "1.30.21";
|
|
5656
5660
|
function Lt(t) {
|
|
5657
5661
|
return t.__renderLambda === true;
|
|
5658
5662
|
}
|
|
@@ -5679,7 +5683,7 @@
|
|
|
5679
5683
|
output(e, n2, r = {}) {
|
|
5680
5684
|
if (typeof n2 == "function") {
|
|
5681
5685
|
const i = `output#${e}`;
|
|
5682
|
-
return
|
|
5686
|
+
return B(i, () => n2(new X())), new _(
|
|
5683
5687
|
this._renderingMode,
|
|
5684
5688
|
this._initialArgs,
|
|
5685
5689
|
this._initialUiState,
|
|
@@ -5716,7 +5720,7 @@
|
|
|
5716
5720
|
return this.output(e, n2, { retentive: true });
|
|
5717
5721
|
}
|
|
5718
5722
|
argsValid(e) {
|
|
5719
|
-
return typeof e == "function" ? (
|
|
5723
|
+
return typeof e == "function" ? (B("inputsValid", () => e(new X())), new _(
|
|
5720
5724
|
this._renderingMode,
|
|
5721
5725
|
this._initialArgs,
|
|
5722
5726
|
this._initialUiState,
|
|
@@ -5740,7 +5744,7 @@
|
|
|
5740
5744
|
);
|
|
5741
5745
|
}
|
|
5742
5746
|
sections(e) {
|
|
5743
|
-
return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (
|
|
5747
|
+
return Array.isArray(e) ? this.sections(Z(e)) : typeof e == "function" ? (B("sections", () => e(new X())), new _(
|
|
5744
5748
|
this._renderingMode,
|
|
5745
5749
|
this._initialArgs,
|
|
5746
5750
|
this._initialUiState,
|
|
@@ -5762,7 +5766,7 @@
|
|
|
5762
5766
|
}
|
|
5763
5767
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5764
5768
|
title(e) {
|
|
5765
|
-
return
|
|
5769
|
+
return B("title", () => e(new X())), new _(
|
|
5766
5770
|
this._renderingMode,
|
|
5767
5771
|
this._initialArgs,
|
|
5768
5772
|
this._initialUiState,
|
|
@@ -5820,7 +5824,7 @@
|
|
|
5820
5824
|
* Influences dependency graph construction.
|
|
5821
5825
|
*/
|
|
5822
5826
|
enriches(e) {
|
|
5823
|
-
return
|
|
5827
|
+
return B("enrichmentTargets", e), new _(
|
|
5824
5828
|
this._renderingMode,
|
|
5825
5829
|
this._initialArgs,
|
|
5826
5830
|
this._initialUiState,
|
|
@@ -5838,7 +5842,7 @@
|
|
|
5838
5842
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5839
5843
|
const e = {
|
|
5840
5844
|
v3: {
|
|
5841
|
-
sdkVersion:
|
|
5845
|
+
sdkVersion: G,
|
|
5842
5846
|
renderingMode: this._renderingMode,
|
|
5843
5847
|
initialArgs: this._initialArgs,
|
|
5844
5848
|
initialUiState: this._initialUiState,
|
|
@@ -5849,7 +5853,7 @@
|
|
|
5849
5853
|
enrichmentTargets: this._enrichmentTargets
|
|
5850
5854
|
},
|
|
5851
5855
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5852
|
-
sdkVersion:
|
|
5856
|
+
sdkVersion: G,
|
|
5853
5857
|
renderingMode: this._renderingMode,
|
|
5854
5858
|
initialArgs: this._initialArgs,
|
|
5855
5859
|
inputsValid: ue(this._inputsValid),
|
|
@@ -5858,12 +5862,15 @@
|
|
|
5858
5862
|
Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
|
|
5859
5863
|
)
|
|
5860
5864
|
};
|
|
5861
|
-
return st() ? Ee({ sdkVersion:
|
|
5865
|
+
return st() ? Ee({ sdkVersion: G }) : { config: e };
|
|
5862
5866
|
}
|
|
5863
5867
|
}
|
|
5864
5868
|
function Tt(t) {
|
|
5865
5869
|
return JSON.parse(t);
|
|
5866
5870
|
}
|
|
5871
|
+
function Et(t) {
|
|
5872
|
+
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5873
|
+
}
|
|
5867
5874
|
function Ve(t) {
|
|
5868
5875
|
return new ge().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5869
5876
|
name: "pl7.app/label",
|
|
@@ -5872,36 +5879,41 @@
|
|
|
5872
5879
|
}, { dontWaitAllData: true });
|
|
5873
5880
|
}
|
|
5874
5881
|
function Ke(t, e) {
|
|
5875
|
-
const n2 =
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5882
|
+
const n2 = [], r = [];
|
|
5883
|
+
for (const a of t)
|
|
5884
|
+
Et(a.spec) ? n2.push(a) : r.push(a);
|
|
5885
|
+
const i = [];
|
|
5886
|
+
for (const a of r)
|
|
5887
|
+
for (const l2 of a.spec.axesSpec) {
|
|
5888
|
+
const u2 = m$1(l2);
|
|
5889
|
+
i.some((p2) => X$1(p2, u2)) || i.push(u2);
|
|
5890
|
+
}
|
|
5891
|
+
for (const a of n2) {
|
|
5892
|
+
const l2 = m$1(a.spec.axesSpec[0]), u2 = i.findIndex((p2) => X$1(p2, l2));
|
|
5893
|
+
u2 !== -1 && i.splice(u2, 1);
|
|
5894
|
+
}
|
|
5895
|
+
const s2 = (a, l2) => {
|
|
5896
|
+
let u2 = a.toString();
|
|
5897
|
+
if (l2)
|
|
5898
|
+
for (const p2 in l2)
|
|
5899
|
+
u2 += p2, u2 += l2[p2];
|
|
5900
|
+
return u2;
|
|
5901
|
+
}, o = [];
|
|
5902
|
+
for (const a of e) {
|
|
5903
|
+
const l2 = a.spec.axesSpec[0], u2 = m$1(l2), p2 = i.findIndex((v) => X$1(v, u2));
|
|
5904
|
+
if (p2 !== -1) {
|
|
5905
|
+
const v = i[p2], d = Object.keys(v.domain ?? {}).length, f2 = Object.keys(l2.domain ?? {}).length;
|
|
5906
|
+
d > f2 ? o.push({
|
|
5907
|
+
id: s2(a.id, v.domain),
|
|
5908
|
+
spec: {
|
|
5909
|
+
...a.spec,
|
|
5910
|
+
axesSpec: [{ ...v, annotations: l2.annotations }]
|
|
5911
|
+
},
|
|
5912
|
+
data: a.data
|
|
5913
|
+
}) : o.push(a), i.splice(p2, 1);
|
|
5903
5914
|
}
|
|
5904
|
-
|
|
5915
|
+
}
|
|
5916
|
+
return o;
|
|
5905
5917
|
}
|
|
5906
5918
|
function $e(t) {
|
|
5907
5919
|
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof I, r = (i) => typeof i == "object" && "type" in i;
|
|
@@ -5945,9 +5957,9 @@
|
|
|
5945
5957
|
};
|
|
5946
5958
|
}
|
|
5947
5959
|
function Cn(t, e, n2, r) {
|
|
5948
|
-
var u2,
|
|
5960
|
+
var u2, p2;
|
|
5949
5961
|
Array.isArray(r) && (r = { filters: r });
|
|
5950
|
-
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 = ((
|
|
5962
|
+
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 = Ve(t.resultPool);
|
|
5951
5963
|
if (!a) return;
|
|
5952
5964
|
const l2 = Ke(e.map(Cn$1), a);
|
|
5953
5965
|
if ($e([...e, ...l2]))
|
|
@@ -5955,27 +5967,27 @@
|
|
|
5955
5967
|
Je(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5956
5968
|
);
|
|
5957
5969
|
}
|
|
5958
|
-
function
|
|
5970
|
+
function Ft(t) {
|
|
5959
5971
|
var e;
|
|
5960
5972
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
5961
5973
|
}
|
|
5962
|
-
function
|
|
5963
|
-
var
|
|
5964
|
-
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
5974
|
+
function Sn(t, e, n2, r, i) {
|
|
5975
|
+
var h, P;
|
|
5976
|
+
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((h = r == null ? void 0 : r.pTableParams) == null ? void 0 : h.filters) ?? []], a = ((P = r == null ? void 0 : r.pTableParams) == null ? void 0 : P.sorting) ?? [], l2 = e.find((c2) => n2(c2.spec));
|
|
5965
5977
|
if (!l2) return;
|
|
5966
5978
|
const u2 = Ve(t.resultPool);
|
|
5967
5979
|
if (!u2) return;
|
|
5968
|
-
const
|
|
5969
|
-
var
|
|
5980
|
+
const p2 = new Set((() => {
|
|
5981
|
+
var b, m2;
|
|
5970
5982
|
if (s2 === "inner") return [];
|
|
5971
|
-
const c2 = (
|
|
5972
|
-
return c2 || e.filter((
|
|
5983
|
+
const c2 = (m2 = (b = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : b.hiddenColIds) == null ? void 0 : m2.map(Tt).filter((w2) => w2.type === "column").map((w2) => w2.id);
|
|
5984
|
+
return c2 || e.filter((w2) => Ft(w2.spec)).map((w2) => w2.id);
|
|
5973
5985
|
})());
|
|
5974
|
-
|
|
5975
|
-
const
|
|
5986
|
+
p2.delete(l2.id), [...o.map((c2) => c2.column), ...a.map((c2) => c2.column)].filter((c2) => c2.type === "column").map((c2) => p2.delete(c2.id));
|
|
5987
|
+
const v = e.filter((c2) => !p2.has(c2.id)), d = Ke(v.map(Cn$1), u2), f2 = [
|
|
5976
5988
|
...l2.spec.axesSpec.map((c2) => ({
|
|
5977
5989
|
type: "axis",
|
|
5978
|
-
id: m$
|
|
5990
|
+
id: m$1(c2),
|
|
5979
5991
|
spec: c2
|
|
5980
5992
|
})),
|
|
5981
5993
|
...[...e, ...d].map((c2) => ({
|
|
@@ -5984,13 +5996,13 @@
|
|
|
5984
5996
|
spec: c2.spec
|
|
5985
5997
|
}))
|
|
5986
5998
|
];
|
|
5987
|
-
if (!$e([...
|
|
5988
|
-
const
|
|
5999
|
+
if (!$e([...v, ...d])) return;
|
|
6000
|
+
const g = t.createPTable(
|
|
5989
6001
|
Je(e, d, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
5990
6002
|
);
|
|
5991
6003
|
return {
|
|
5992
6004
|
tableSpec: f2,
|
|
5993
|
-
tableHandle:
|
|
6005
|
+
tableHandle: g
|
|
5994
6006
|
};
|
|
5995
6007
|
}
|
|
5996
6008
|
const ImportFileHandleSchema = z$1.string().optional().refine(
|
|
@@ -6092,7 +6104,7 @@
|
|
|
6092
6104
|
val: v.toString()
|
|
6093
6105
|
};
|
|
6094
6106
|
});
|
|
6095
|
-
return
|
|
6107
|
+
return Sn(
|
|
6096
6108
|
ctx,
|
|
6097
6109
|
[
|
|
6098
6110
|
{
|