@milaboratories/milaboratories.ui-examples.model 1.1.54 → 1.1.56
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 +9 -9
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +372 -355
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -3832,7 +3832,7 @@
|
|
|
3832
3832
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
3833
3833
|
};
|
|
3834
3834
|
const NEVER = INVALID;
|
|
3835
|
-
var z$
|
|
3835
|
+
var z$2 = /* @__PURE__ */ Object.freeze({
|
|
3836
3836
|
__proto__: null,
|
|
3837
3837
|
defaultErrorMap: errorMap,
|
|
3838
3838
|
setErrorMap,
|
|
@@ -3948,13 +3948,13 @@
|
|
|
3948
3948
|
quotelessJson,
|
|
3949
3949
|
ZodError
|
|
3950
3950
|
});
|
|
3951
|
-
var
|
|
3952
|
-
var
|
|
3953
|
-
var l$1 = (n2, e, t) =>
|
|
3951
|
+
var $ = Object.defineProperty;
|
|
3952
|
+
var D = (n2, e, t) => e in n2 ? $(n2, e, { enumerable: true, configurable: true, writable: true, value: t }) : n2[e] = t;
|
|
3953
|
+
var l$1 = (n2, e, t) => D(n2, typeof e != "symbol" ? e + "" : e, t);
|
|
3954
3954
|
function w(n2) {
|
|
3955
3955
|
throw new Error("Unexpected object: " + n2);
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function pn(n2) {
|
|
3958
3958
|
if (!n2 || typeof n2 != "object")
|
|
3959
3959
|
return false;
|
|
3960
3960
|
const e = n2;
|
|
@@ -3999,7 +3999,7 @@
|
|
|
3999
3999
|
}
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
4002
|
-
function
|
|
4002
|
+
function F(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
|
|
4020
|
+
return F(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4021
4021
|
}
|
|
4022
4022
|
function hn(n2) {
|
|
4023
4023
|
switch (n2.type) {
|
|
@@ -4087,27 +4087,30 @@
|
|
|
4087
4087
|
spec: n2.spec
|
|
4088
4088
|
};
|
|
4089
4089
|
}
|
|
4090
|
-
function
|
|
4090
|
+
function p$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
|
+
function C(n2) {
|
|
4095
|
+
return n2.map(p$1);
|
|
4096
|
+
}
|
|
4094
4097
|
function Jn(n2) {
|
|
4095
|
-
return Le(
|
|
4098
|
+
return Le(p$1(n2));
|
|
4096
4099
|
}
|
|
4097
|
-
function z(n2, e) {
|
|
4100
|
+
function z$1(n2, e) {
|
|
4098
4101
|
if (n2 === void 0) return e === void 0;
|
|
4099
4102
|
if (e === void 0) return true;
|
|
4100
4103
|
for (const t in e)
|
|
4101
4104
|
if (n2[t] !== e[t]) return false;
|
|
4102
4105
|
return true;
|
|
4103
4106
|
}
|
|
4104
|
-
function X
|
|
4105
|
-
return n2.name === e.name && z(n2.domain, e.domain);
|
|
4107
|
+
function X(n2, e) {
|
|
4108
|
+
return n2.name === e.name && z$1(n2.domain, e.domain);
|
|
4106
4109
|
}
|
|
4107
4110
|
function On(n2, e) {
|
|
4108
|
-
return { ...n2, src:
|
|
4111
|
+
return { ...n2, src: h(n2.src, e) };
|
|
4109
4112
|
}
|
|
4110
|
-
function
|
|
4113
|
+
function h(n2, e) {
|
|
4111
4114
|
switch (n2.type) {
|
|
4112
4115
|
case "column":
|
|
4113
4116
|
return {
|
|
@@ -4121,17 +4124,19 @@
|
|
|
4121
4124
|
newId: n2.newId,
|
|
4122
4125
|
axisFilters: n2.axisFilters
|
|
4123
4126
|
};
|
|
4127
|
+
case "inlineColumn":
|
|
4128
|
+
return n2;
|
|
4124
4129
|
case "inner":
|
|
4125
4130
|
case "full":
|
|
4126
4131
|
return {
|
|
4127
4132
|
type: n2.type,
|
|
4128
|
-
entries: n2.entries.map((t) =>
|
|
4133
|
+
entries: n2.entries.map((t) => h(t, e))
|
|
4129
4134
|
};
|
|
4130
4135
|
case "outer":
|
|
4131
4136
|
return {
|
|
4132
4137
|
type: "outer",
|
|
4133
|
-
primary:
|
|
4134
|
-
secondary: n2.secondary.map((t) =>
|
|
4138
|
+
primary: h(n2.primary, e),
|
|
4139
|
+
secondary: n2.secondary.map((t) => h(t, e))
|
|
4135
4140
|
};
|
|
4136
4141
|
default:
|
|
4137
4142
|
w(n2);
|
|
@@ -4141,12 +4146,12 @@
|
|
|
4141
4146
|
return Le(n2);
|
|
4142
4147
|
}
|
|
4143
4148
|
function x(n2) {
|
|
4144
|
-
return Le(
|
|
4149
|
+
return Le(p$1(n2));
|
|
4145
4150
|
}
|
|
4146
4151
|
function A(n2, e) {
|
|
4147
4152
|
return JSON.stringify([n2, e]);
|
|
4148
4153
|
}
|
|
4149
|
-
class
|
|
4154
|
+
class $n {
|
|
4150
4155
|
/**
|
|
4151
4156
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4152
4157
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -4208,7 +4213,7 @@
|
|
|
4208
4213
|
}
|
|
4209
4214
|
if (r.axes = e.axesSpec.map((a) => {
|
|
4210
4215
|
const i = x(a), u2 = this.axes.get(i);
|
|
4211
|
-
return u2 === void 0 ?
|
|
4216
|
+
return u2 === void 0 ? p$1(a) : u2;
|
|
4212
4217
|
}), !t || t.length === 0)
|
|
4213
4218
|
return r;
|
|
4214
4219
|
const s2 = [];
|
|
@@ -4267,9 +4272,9 @@
|
|
|
4267
4272
|
}
|
|
4268
4273
|
r.domain = s2;
|
|
4269
4274
|
}
|
|
4270
|
-
return r.axes && (r.axes = r.axes.map((s2) => Q(n2, s2))), r;
|
|
4275
|
+
return r.axes && (r.axes = r.axes.map((s2) => Q$1(n2, s2))), r;
|
|
4271
4276
|
}
|
|
4272
|
-
function Q(n2, e) {
|
|
4277
|
+
function Q$1(n2, e) {
|
|
4273
4278
|
if (!Y(e))
|
|
4274
4279
|
return e;
|
|
4275
4280
|
const t = e.anchor, r = n2[t];
|
|
@@ -4287,7 +4292,7 @@
|
|
|
4287
4292
|
throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
|
|
4288
4293
|
return o[0];
|
|
4289
4294
|
} else if ("id" in e) {
|
|
4290
|
-
const o = r.axesSpec.filter((s2) => X
|
|
4295
|
+
const o = r.axesSpec.filter((s2) => X(e.id, p$1(s2)));
|
|
4291
4296
|
if (o.length > 1)
|
|
4292
4297
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4293
4298
|
if (o.length === 0)
|
|
@@ -4302,11 +4307,11 @@
|
|
|
4302
4307
|
function f(n2) {
|
|
4303
4308
|
return n2.kind === "PColumn";
|
|
4304
4309
|
}
|
|
4305
|
-
function Z
|
|
4310
|
+
function Z(n2) {
|
|
4306
4311
|
return f(n2.spec);
|
|
4307
4312
|
}
|
|
4308
4313
|
function jn(n2) {
|
|
4309
|
-
if (!Z
|
|
4314
|
+
if (!Z(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4310
4315
|
return n2;
|
|
4311
4316
|
}
|
|
4312
4317
|
function Fn(n2, e) {
|
|
@@ -4324,6 +4329,8 @@
|
|
|
4324
4329
|
case "slicedColumn":
|
|
4325
4330
|
e.set(r.column.id, r.column);
|
|
4326
4331
|
return;
|
|
4332
|
+
case "inlineColumn":
|
|
4333
|
+
return;
|
|
4327
4334
|
case "full":
|
|
4328
4335
|
case "inner":
|
|
4329
4336
|
for (const o of r.entries) t(o);
|
|
@@ -4356,7 +4363,7 @@
|
|
|
4356
4363
|
}
|
|
4357
4364
|
return true;
|
|
4358
4365
|
}
|
|
4359
|
-
function N(n2, e) {
|
|
4366
|
+
function N$1(n2, e) {
|
|
4360
4367
|
if (e.name !== void 0 && n2.name !== e.name || e.namePattern !== void 0 && !new RegExp(e.namePattern).test(n2.name))
|
|
4361
4368
|
return false;
|
|
4362
4369
|
if (e.type !== void 0) {
|
|
@@ -4373,7 +4380,7 @@
|
|
|
4373
4380
|
return false;
|
|
4374
4381
|
}
|
|
4375
4382
|
if (e.axes !== void 0) {
|
|
4376
|
-
const t = n2.axesSpec.map(
|
|
4383
|
+
const t = n2.axesSpec.map(p$1);
|
|
4377
4384
|
if (e.partialAxesMatch) {
|
|
4378
4385
|
for (const r of e.axes)
|
|
4379
4386
|
if (!t.some((o) => k(r, o)))
|
|
@@ -4403,20 +4410,27 @@
|
|
|
4403
4410
|
return true;
|
|
4404
4411
|
}
|
|
4405
4412
|
function Kn(n2) {
|
|
4406
|
-
return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n2);
|
|
4413
|
+
return Array.isArray(n2) ? (e) => n2.some((t) => f(e) && N$1(e, t)) : (e) => f(e) && N$1(e, n2);
|
|
4407
4414
|
}
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4415
|
+
function Rn(n2) {
|
|
4416
|
+
const e = {
|
|
4417
|
+
kind: n2.kind,
|
|
4418
|
+
name: n2.name
|
|
4419
|
+
};
|
|
4420
|
+
return n2.domain !== void 0 && (e.domain = n2.domain), f(n2) && (e.axesSpec = C(n2.axesSpec)), Le(e);
|
|
4421
|
+
}
|
|
4422
|
+
z$2.object({
|
|
4423
|
+
__isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4424
|
+
blockId: z$2.string().describe("Upstream block id"),
|
|
4425
|
+
name: z$2.string().describe("Name of the output provided to the upstream block's output context"),
|
|
4426
|
+
requireEnrichments: z$2.literal(true).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")
|
|
4413
4427
|
}).describe(
|
|
4414
4428
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
4415
4429
|
).readonly();
|
|
4416
4430
|
function Mn(n2) {
|
|
4417
4431
|
return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
|
|
4418
4432
|
}
|
|
4419
|
-
function
|
|
4433
|
+
function Hn(n2, e = true) {
|
|
4420
4434
|
if (e)
|
|
4421
4435
|
return {
|
|
4422
4436
|
...n2,
|
|
@@ -4427,11 +4441,11 @@
|
|
|
4427
4441
|
return r;
|
|
4428
4442
|
}
|
|
4429
4443
|
}
|
|
4430
|
-
function
|
|
4444
|
+
function Wn(n2, e) {
|
|
4431
4445
|
return n2.ok ? { ok: true, value: e(n2.value) } : n2;
|
|
4432
4446
|
}
|
|
4433
4447
|
const sn = 24;
|
|
4434
|
-
z$
|
|
4448
|
+
z$2.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4435
4449
|
var stringify = { exports: {} };
|
|
4436
4450
|
(function(module2, exports3) {
|
|
4437
4451
|
exports3 = module2.exports = stringify2;
|
|
@@ -4456,41 +4470,41 @@
|
|
|
4456
4470
|
};
|
|
4457
4471
|
}
|
|
4458
4472
|
})(stringify, stringify.exports);
|
|
4459
|
-
const l = z$
|
|
4460
|
-
type: z$
|
|
4461
|
-
name: z$
|
|
4462
|
-
message: z$
|
|
4473
|
+
const l = z$2.object({
|
|
4474
|
+
type: z$2.literal("PlError"),
|
|
4475
|
+
name: z$2.string(),
|
|
4476
|
+
message: z$2.string(),
|
|
4463
4477
|
/** The message with all details needed for SDK developers. */
|
|
4464
|
-
fullMessage: z$
|
|
4465
|
-
stack: z$
|
|
4478
|
+
fullMessage: z$2.string().optional(),
|
|
4479
|
+
stack: z$2.string().optional()
|
|
4466
4480
|
}), c = l.extend({
|
|
4467
|
-
cause: z$
|
|
4468
|
-
errors: z$
|
|
4469
|
-
}), m = z$
|
|
4470
|
-
type: z$
|
|
4471
|
-
name: z$
|
|
4472
|
-
message: z$
|
|
4473
|
-
stack: z$
|
|
4481
|
+
cause: z$2.lazy(() => s).optional(),
|
|
4482
|
+
errors: z$2.lazy(() => s.array()).optional()
|
|
4483
|
+
}), m = z$2.object({
|
|
4484
|
+
type: z$2.literal("StandardError"),
|
|
4485
|
+
name: z$2.string(),
|
|
4486
|
+
message: z$2.string(),
|
|
4487
|
+
stack: z$2.string().optional()
|
|
4474
4488
|
}), p = m.extend({
|
|
4475
|
-
cause: z$
|
|
4476
|
-
errors: z$
|
|
4477
|
-
}), s = z$
|
|
4478
|
-
const u = z$
|
|
4479
|
-
name: z$
|
|
4480
|
-
message: z$
|
|
4481
|
-
fullMessage: z$
|
|
4482
|
-
stack: z$
|
|
4489
|
+
cause: z$2.lazy(() => s).optional(),
|
|
4490
|
+
errors: z$2.lazy(() => s.array()).optional()
|
|
4491
|
+
}), s = z$2.union([p, c]);
|
|
4492
|
+
const u = z$2.object({
|
|
4493
|
+
name: z$2.string(),
|
|
4494
|
+
message: z$2.string(),
|
|
4495
|
+
fullMessage: z$2.string().optional(),
|
|
4496
|
+
stack: z$2.string().optional()
|
|
4483
4497
|
}), n = u.extend({
|
|
4484
|
-
cause: z$
|
|
4485
|
-
errors: z$
|
|
4498
|
+
cause: z$2.lazy(() => n).optional(),
|
|
4499
|
+
errors: z$2.lazy(() => n.array()).optional()
|
|
4486
4500
|
});
|
|
4487
|
-
var
|
|
4488
|
-
var
|
|
4489
|
-
var T = (t, e, n2) =>
|
|
4490
|
-
function
|
|
4501
|
+
var We = Object.defineProperty;
|
|
4502
|
+
var Ge = (t, e, n2) => e in t ? We(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4503
|
+
var T = (t, e, n2) => Ge(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4504
|
+
function ee(t) {
|
|
4491
4505
|
return { type: "Immediate", value: t };
|
|
4492
4506
|
}
|
|
4493
|
-
function
|
|
4507
|
+
function at() {
|
|
4494
4508
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4495
4509
|
}
|
|
4496
4510
|
function Ee(t) {
|
|
@@ -4499,39 +4513,39 @@
|
|
|
4499
4513
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4500
4514
|
throw new Error("Can't get platforma instance.");
|
|
4501
4515
|
}
|
|
4502
|
-
function
|
|
4516
|
+
function lt() {
|
|
4503
4517
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4504
4518
|
}
|
|
4505
4519
|
function y() {
|
|
4506
4520
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4507
4521
|
throw new Error("Not in config rendering context");
|
|
4508
4522
|
}
|
|
4509
|
-
function
|
|
4510
|
-
const n2 =
|
|
4523
|
+
function M(t, e) {
|
|
4524
|
+
const n2 = lt();
|
|
4511
4525
|
if (n2 === void 0) return false;
|
|
4512
4526
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4513
4527
|
return n2.callbackRegistry[t] = e, true;
|
|
4514
4528
|
}
|
|
4515
4529
|
const ae = /* @__PURE__ */ new Map();
|
|
4516
|
-
function
|
|
4530
|
+
function ut(t, e) {
|
|
4517
4531
|
t in y().callbackRegistry || (y().callbackRegistry[t] = (n2) => {
|
|
4518
4532
|
for (const r of ae.get(t))
|
|
4519
4533
|
r(n2);
|
|
4520
4534
|
}, ae.set(t, [])), ae.get(t).push(e);
|
|
4521
4535
|
}
|
|
4522
|
-
class
|
|
4536
|
+
class _ {
|
|
4523
4537
|
constructor(e, n2 = (r) => r) {
|
|
4524
4538
|
T(this, "isResolved", false);
|
|
4525
4539
|
T(this, "resolvedValue");
|
|
4526
|
-
this.handle = e, this.postProcess = n2,
|
|
4540
|
+
this.handle = e, this.postProcess = n2, ut(e, (r) => {
|
|
4527
4541
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4528
4542
|
});
|
|
4529
4543
|
}
|
|
4530
4544
|
map(e) {
|
|
4531
|
-
return new
|
|
4545
|
+
return new _(this.handle, (n2) => e(this.postProcess(n2)));
|
|
4532
4546
|
}
|
|
4533
4547
|
mapDefined(e) {
|
|
4534
|
-
return new
|
|
4548
|
+
return new _(this.handle, (n2) => {
|
|
4535
4549
|
const r = this.postProcess(n2);
|
|
4536
4550
|
return r ? e(r) : void 0;
|
|
4537
4551
|
});
|
|
@@ -4543,7 +4557,7 @@
|
|
|
4543
4557
|
function pe(t, e) {
|
|
4544
4558
|
return t === void 0 ? void 0 : e(t);
|
|
4545
4559
|
}
|
|
4546
|
-
class
|
|
4560
|
+
class L {
|
|
4547
4561
|
constructor(e, n2) {
|
|
4548
4562
|
this.handle = e, this.resolvePath = n2;
|
|
4549
4563
|
}
|
|
@@ -4584,7 +4598,7 @@
|
|
|
4584
4598
|
];
|
|
4585
4599
|
return pe(
|
|
4586
4600
|
y().resolveWithCommon(this.handle, e, ...n2),
|
|
4587
|
-
(i) => new
|
|
4601
|
+
(i) => new L(i, r)
|
|
4588
4602
|
);
|
|
4589
4603
|
}
|
|
4590
4604
|
get resourceType() {
|
|
@@ -4606,7 +4620,7 @@
|
|
|
4606
4620
|
const e = [...this.resolvePath, "error"];
|
|
4607
4621
|
return pe(
|
|
4608
4622
|
y().getError(this.handle),
|
|
4609
|
-
(n2) => new
|
|
4623
|
+
(n2) => new L(n2, e)
|
|
4610
4624
|
);
|
|
4611
4625
|
}
|
|
4612
4626
|
listInputFields() {
|
|
@@ -4646,7 +4660,7 @@
|
|
|
4646
4660
|
getPColumns(e = false, n2 = "") {
|
|
4647
4661
|
const r = this.parsePObjectCollection(e, n2);
|
|
4648
4662
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
|
|
4649
|
-
if (!Z
|
|
4663
|
+
if (!Z(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4650
4664
|
return s2;
|
|
4651
4665
|
});
|
|
4652
4666
|
}
|
|
@@ -4664,18 +4678,18 @@
|
|
|
4664
4678
|
const i = {};
|
|
4665
4679
|
for (const [s2, o] of Object.entries(r)) {
|
|
4666
4680
|
const a = [...this.resolvePath, s2];
|
|
4667
|
-
i[s2] = Fn(o, (l2) => new
|
|
4681
|
+
i[s2] = Fn(o, (l2) => new L(l2, a));
|
|
4668
4682
|
}
|
|
4669
4683
|
return i;
|
|
4670
4684
|
}
|
|
4671
4685
|
getFileContentAsBase64() {
|
|
4672
|
-
return new
|
|
4686
|
+
return new _(y().getBlobContentAsBase64(this.handle));
|
|
4673
4687
|
}
|
|
4674
4688
|
getFileContentAsString() {
|
|
4675
|
-
return new
|
|
4689
|
+
return new _(y().getBlobContentAsString(this.handle));
|
|
4676
4690
|
}
|
|
4677
4691
|
getFileContentAsJson() {
|
|
4678
|
-
return new
|
|
4692
|
+
return new _(
|
|
4679
4693
|
y().getBlobContentAsString(this.handle)
|
|
4680
4694
|
).mapDefined((e) => JSON.parse(e));
|
|
4681
4695
|
}
|
|
@@ -4695,7 +4709,7 @@
|
|
|
4695
4709
|
* @returns downloaded file handle
|
|
4696
4710
|
*/
|
|
4697
4711
|
getFileHandle() {
|
|
4698
|
-
return new
|
|
4712
|
+
return new _(y().getDownloadedBlobContentHandle(this.handle));
|
|
4699
4713
|
}
|
|
4700
4714
|
/**
|
|
4701
4715
|
* @deprecated use getFileHandle
|
|
@@ -4707,7 +4721,7 @@
|
|
|
4707
4721
|
* @returns downloaded file handle
|
|
4708
4722
|
*/
|
|
4709
4723
|
getRemoteFileHandle() {
|
|
4710
|
-
return new
|
|
4724
|
+
return new _(y().getOnDemandBlobContentHandle(this.handle));
|
|
4711
4725
|
}
|
|
4712
4726
|
/**
|
|
4713
4727
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4719,22 +4733,22 @@
|
|
|
4719
4733
|
* @returns the url to the extracted folder
|
|
4720
4734
|
*/
|
|
4721
4735
|
extractArchiveAndGetURL(e) {
|
|
4722
|
-
return new
|
|
4736
|
+
return new _(y().extractArchiveAndGetURL(this.handle, e));
|
|
4723
4737
|
}
|
|
4724
4738
|
getImportProgress() {
|
|
4725
|
-
return new
|
|
4739
|
+
return new _(y().getImportProgress(this.handle));
|
|
4726
4740
|
}
|
|
4727
4741
|
getLastLogs(e) {
|
|
4728
|
-
return new
|
|
4742
|
+
return new _(y().getLastLogs(this.handle, e));
|
|
4729
4743
|
}
|
|
4730
4744
|
getProgressLog(e) {
|
|
4731
|
-
return new
|
|
4745
|
+
return new _(y().getProgressLog(this.handle, e));
|
|
4732
4746
|
}
|
|
4733
4747
|
getProgressLogWithInfo(e) {
|
|
4734
|
-
return new
|
|
4748
|
+
return new _(y().getProgressLogWithInfo(this.handle, e));
|
|
4735
4749
|
}
|
|
4736
4750
|
getLogHandle() {
|
|
4737
|
-
return new
|
|
4751
|
+
return new _(y().getLogHandle(this.handle));
|
|
4738
4752
|
}
|
|
4739
4753
|
allFieldsResolved(e = "Input") {
|
|
4740
4754
|
switch (e) {
|
|
@@ -4760,89 +4774,90 @@
|
|
|
4760
4774
|
let l2 = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4761
4775
|
(u2) => [u2, this.resolve({ field: u2, assertFieldType: r })]
|
|
4762
4776
|
);
|
|
4763
|
-
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, d]) => o(u2, d));
|
|
4764
4778
|
}
|
|
4765
4779
|
}
|
|
4766
|
-
const Fe = "staging",
|
|
4767
|
-
const
|
|
4768
|
-
type: z$
|
|
4769
|
-
importance: z$
|
|
4770
|
-
id: z$
|
|
4771
|
-
label: z$
|
|
4772
|
-
}),
|
|
4780
|
+
const Fe = "staging", Oe = "main";
|
|
4781
|
+
const dt = "pl7.app/label", ft = "pl7.app/trace", ht = z$2.object({
|
|
4782
|
+
type: z$2.string(),
|
|
4783
|
+
importance: z$2.number().optional(),
|
|
4784
|
+
id: z$2.string().optional(),
|
|
4785
|
+
label: z$2.string()
|
|
4786
|
+
}), gt = z$2.array(ht), mt = 1e-3, yt = "__LABEL__", xe = "__LABEL__@1";
|
|
4773
4787
|
function Re(t, e, n2 = {}) {
|
|
4774
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((
|
|
4775
|
-
var
|
|
4776
|
-
const
|
|
4777
|
-
let
|
|
4778
|
-
"spec" in
|
|
4779
|
-
const
|
|
4780
|
-
...
|
|
4788
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s2 = t.map((h2) => {
|
|
4789
|
+
var O, U;
|
|
4790
|
+
const c2 = e(h2);
|
|
4791
|
+
let m2, b, A2;
|
|
4792
|
+
"spec" in c2 && typeof c2.spec == "object" ? (m2 = c2.spec, b = c2.prefixTrace, A2 = c2.suffixTrace) : m2 = c2;
|
|
4793
|
+
const p2 = (O = m2.annotations) == null ? void 0 : O[dt], g = (U = m2.annotations) == null ? void 0 : U[ft], w2 = (g ? gt.safeParse(JSON.parse(g)).data : void 0) ?? [], f2 = [
|
|
4794
|
+
...b ?? [],
|
|
4781
4795
|
...w2,
|
|
4782
|
-
...
|
|
4796
|
+
...A2 ?? []
|
|
4783
4797
|
];
|
|
4784
|
-
if (
|
|
4785
|
-
const
|
|
4786
|
-
n2.addLabelAsSuffix ?
|
|
4787
|
-
}
|
|
4788
|
-
const
|
|
4789
|
-
for (let
|
|
4790
|
-
const { type:
|
|
4791
|
-
|
|
4792
|
-
const
|
|
4793
|
-
i.set(
|
|
4794
|
-
|
|
4798
|
+
if (p2 !== void 0) {
|
|
4799
|
+
const F2 = { label: p2, type: yt, importance: -2 };
|
|
4800
|
+
n2.addLabelAsSuffix ? f2.push(F2) : f2.splice(0, 0, F2);
|
|
4801
|
+
}
|
|
4802
|
+
const C2 = [], P = /* @__PURE__ */ new Map();
|
|
4803
|
+
for (let F2 = f2.length - 1; F2 >= 0; --F2) {
|
|
4804
|
+
const { type: D2 } = f2[F2], Y2 = f2[F2].importance ?? 0, V = (P.get(D2) ?? 0) + 1;
|
|
4805
|
+
P.set(D2, V);
|
|
4806
|
+
const R = `${D2}@${V}`;
|
|
4807
|
+
i.set(R, (i.get(R) ?? 0) + 1), r.set(
|
|
4808
|
+
R,
|
|
4795
4809
|
Math.max(
|
|
4796
|
-
r.get(
|
|
4797
|
-
|
|
4810
|
+
r.get(R) ?? Number.NEGATIVE_INFINITY,
|
|
4811
|
+
Y2 - (f2.length - F2) * mt
|
|
4798
4812
|
)
|
|
4799
|
-
),
|
|
4813
|
+
), C2.push({ ...f2[F2], fullType: R, occurrenceIndex: V });
|
|
4800
4814
|
}
|
|
4801
|
-
return
|
|
4802
|
-
value:
|
|
4803
|
-
spec:
|
|
4804
|
-
label:
|
|
4805
|
-
fullTrace:
|
|
4815
|
+
return C2.reverse(), {
|
|
4816
|
+
value: h2,
|
|
4817
|
+
spec: m2,
|
|
4818
|
+
label: p2,
|
|
4819
|
+
fullTrace: C2
|
|
4806
4820
|
};
|
|
4807
4821
|
}), o = [], a = [], l2 = [...r];
|
|
4808
|
-
l2.sort(([,
|
|
4809
|
-
for (const [
|
|
4810
|
-
|
|
4811
|
-
const u2 = (
|
|
4812
|
-
const
|
|
4813
|
-
for (let
|
|
4814
|
-
const
|
|
4815
|
-
if (
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4822
|
+
l2.sort(([, h2], [, c2]) => c2 - h2);
|
|
4823
|
+
for (const [h2] of l2)
|
|
4824
|
+
h2.endsWith("@1") || i.get(h2) === t.length ? o.push(h2) : a.push(h2);
|
|
4825
|
+
const u2 = (h2, c2 = false) => {
|
|
4826
|
+
const m2 = [];
|
|
4827
|
+
for (let b = 0; b < s2.length; b++) {
|
|
4828
|
+
const A2 = s2[b], p2 = A2.fullTrace.filter((f2) => h2.has(f2.fullType));
|
|
4829
|
+
if (p2.length === 0)
|
|
4830
|
+
if (c2)
|
|
4831
|
+
m2.push({
|
|
4832
|
+
label: "Unlabeled",
|
|
4833
|
+
value: A2.value
|
|
4834
|
+
});
|
|
4835
|
+
else return;
|
|
4836
|
+
const g = p2.map((f2) => f2.label), w2 = n2.separator ?? " / ";
|
|
4837
|
+
m2.push({
|
|
4838
|
+
label: g.join(w2),
|
|
4839
|
+
value: A2.value
|
|
4821
4840
|
});
|
|
4822
4841
|
}
|
|
4823
|
-
return
|
|
4842
|
+
return m2;
|
|
4824
4843
|
};
|
|
4825
4844
|
if (o.length === 0) {
|
|
4826
|
-
if (a.length !== 0) throw new Error("
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
if (d === void 0) throw new Error("Assertion error.");
|
|
4843
|
-
return d;
|
|
4844
|
-
}
|
|
4845
|
-
const q = "PColumnData/", ne = q + "ResourceMap", re = q + "Partitioned/ResourceMap", M = q + "JsonPartitioned", $ = q + "BinaryPartitioned", ke = q + "Partitioned/", ie = ke + "JsonPartitioned", W = ke + "BinaryPartitioned";
|
|
4845
|
+
if (a.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4846
|
+
return u2(new Set(xe), true);
|
|
4847
|
+
}
|
|
4848
|
+
let d = 0, v = -1;
|
|
4849
|
+
for (; d < o.length; ) {
|
|
4850
|
+
const h2 = /* @__PURE__ */ new Set();
|
|
4851
|
+
n2.includeNativeLabel && h2.add(xe);
|
|
4852
|
+
for (let m2 = 0; m2 < d; ++m2) h2.add(o[m2]);
|
|
4853
|
+
v >= 0 && h2.add(o[v]);
|
|
4854
|
+
const c2 = u2(h2);
|
|
4855
|
+
if (c2 !== void 0 && new Set(c2.map((m2) => m2.label)).size === t.length) return c2;
|
|
4856
|
+
v++, v >= o.length && (d++, v = d);
|
|
4857
|
+
}
|
|
4858
|
+
return u2(/* @__PURE__ */ new Set([...o, ...a]), true);
|
|
4859
|
+
}
|
|
4860
|
+
const z = "PColumnData/", re = z + "ResourceMap", ie = z + "Partitioned/ResourceMap", W = z + "JsonPartitioned", N = z + "BinaryPartitioned", ke = z + "Partitioned/", se = ke + "JsonPartitioned", G = ke + "BinaryPartitioned";
|
|
4846
4861
|
const fe = (t) => {
|
|
4847
4862
|
if (t.endsWith(".index"))
|
|
4848
4863
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
@@ -4850,44 +4865,44 @@
|
|
|
4850
4865
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4851
4866
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4852
4867
|
};
|
|
4853
|
-
function
|
|
4868
|
+
function vt(t) {
|
|
4854
4869
|
if (!t) return;
|
|
4855
4870
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4856
4871
|
let i = 0;
|
|
4857
4872
|
switch (e) {
|
|
4858
|
-
case
|
|
4873
|
+
case re:
|
|
4859
4874
|
i = n2.keyLength;
|
|
4860
4875
|
break;
|
|
4861
|
-
case
|
|
4876
|
+
case ie:
|
|
4862
4877
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4863
4878
|
break;
|
|
4864
|
-
case
|
|
4865
|
-
case
|
|
4879
|
+
case W:
|
|
4880
|
+
case N:
|
|
4866
4881
|
i = n2.partitionKeyLength;
|
|
4867
4882
|
break;
|
|
4868
|
-
case
|
|
4869
|
-
case
|
|
4883
|
+
case G:
|
|
4884
|
+
case se:
|
|
4870
4885
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4871
4886
|
break;
|
|
4872
4887
|
}
|
|
4873
4888
|
switch (e) {
|
|
4874
|
-
case
|
|
4875
|
-
case
|
|
4876
|
-
case
|
|
4889
|
+
case re:
|
|
4890
|
+
case W:
|
|
4891
|
+
case N:
|
|
4877
4892
|
for (let s2 of t.listInputFields()) {
|
|
4878
|
-
e ===
|
|
4893
|
+
e === N && (s2 = fe(s2).baseKey);
|
|
4879
4894
|
const o = [...JSON.parse(s2)];
|
|
4880
4895
|
r.push(o);
|
|
4881
4896
|
}
|
|
4882
4897
|
break;
|
|
4883
|
-
case re:
|
|
4884
|
-
case W:
|
|
4885
4898
|
case ie:
|
|
4899
|
+
case G:
|
|
4900
|
+
case se:
|
|
4886
4901
|
for (const s2 of t.listInputFields()) {
|
|
4887
4902
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4888
4903
|
if (a !== void 0)
|
|
4889
4904
|
for (let l2 of a.listInputFields()) {
|
|
4890
|
-
e ===
|
|
4905
|
+
e === G && (l2 = fe(l2).baseKey);
|
|
4891
4906
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4892
4907
|
r.push(u2);
|
|
4893
4908
|
}
|
|
@@ -4896,7 +4911,7 @@
|
|
|
4896
4911
|
}
|
|
4897
4912
|
return { data: r, keyLength: i };
|
|
4898
4913
|
}
|
|
4899
|
-
function
|
|
4914
|
+
function bt(t) {
|
|
4900
4915
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4901
4916
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4902
4917
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4915,11 +4930,11 @@
|
|
|
4915
4930
|
}
|
|
4916
4931
|
return r.map((i) => Array.from(i.values()));
|
|
4917
4932
|
}
|
|
4918
|
-
function
|
|
4933
|
+
function wt(t) {
|
|
4919
4934
|
if (t === void 0) return;
|
|
4920
|
-
if (
|
|
4921
|
-
return
|
|
4922
|
-
const e =
|
|
4935
|
+
if (F(t))
|
|
4936
|
+
return bt(t);
|
|
4937
|
+
const e = vt(t);
|
|
4923
4938
|
if (!e) return;
|
|
4924
4939
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4925
4940
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4935,13 +4950,13 @@
|
|
|
4935
4950
|
function he(t, e = []) {
|
|
4936
4951
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4937
4952
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4938
|
-
if (e.length > 0 && (n2 ===
|
|
4953
|
+
if (e.length > 0 && (n2 === se || n2 === G))
|
|
4939
4954
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4940
4955
|
switch (n2) {
|
|
4941
|
-
case ne:
|
|
4942
4956
|
case re:
|
|
4957
|
+
case ie:
|
|
4943
4958
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4944
|
-
case
|
|
4959
|
+
case W: {
|
|
4945
4960
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4946
4961
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4947
4962
|
const i = [];
|
|
@@ -4957,7 +4972,7 @@
|
|
|
4957
4972
|
parts: i
|
|
4958
4973
|
};
|
|
4959
4974
|
}
|
|
4960
|
-
case
|
|
4975
|
+
case N: {
|
|
4961
4976
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4962
4977
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4963
4978
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
@@ -4984,15 +4999,15 @@
|
|
|
4984
4999
|
parts: i
|
|
4985
5000
|
};
|
|
4986
5001
|
}
|
|
4987
|
-
case
|
|
5002
|
+
case se: {
|
|
4988
5003
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4989
5004
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
4990
5005
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
4991
5006
|
for (const o of t.listInputFields()) {
|
|
4992
5007
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4993
5008
|
if (a === void 0) return;
|
|
4994
|
-
if (a.resourceType.name !==
|
|
4995
|
-
throw new Error(`Expected ${
|
|
5009
|
+
if (a.resourceType.name !== W)
|
|
5010
|
+
throw new Error(`Expected ${W} inside ${n2}, but got ${a.resourceType.name}`);
|
|
4996
5011
|
const l2 = he(a, JSON.parse(o));
|
|
4997
5012
|
if (l2 === void 0) return;
|
|
4998
5013
|
if (l2.type !== "JsonPartitioned")
|
|
@@ -5005,15 +5020,15 @@
|
|
|
5005
5020
|
parts: s2
|
|
5006
5021
|
};
|
|
5007
5022
|
}
|
|
5008
|
-
case
|
|
5023
|
+
case G: {
|
|
5009
5024
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5010
5025
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5011
5026
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5012
5027
|
for (const o of t.listInputFields()) {
|
|
5013
5028
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5014
5029
|
if (a === void 0) return;
|
|
5015
|
-
if (a.resourceType.name !==
|
|
5016
|
-
throw new Error(`Expected ${
|
|
5030
|
+
if (a.resourceType.name !== N)
|
|
5031
|
+
throw new Error(`Expected ${N} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5017
5032
|
const l2 = he(a, JSON.parse(o));
|
|
5018
5033
|
if (l2 === void 0) return;
|
|
5019
5034
|
if (l2.type !== "BinaryPartitioned")
|
|
@@ -5030,15 +5045,15 @@
|
|
|
5030
5045
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5031
5046
|
}
|
|
5032
5047
|
}
|
|
5033
|
-
function
|
|
5048
|
+
function At(t) {
|
|
5034
5049
|
if (t !== void 0) {
|
|
5035
|
-
if (
|
|
5036
|
-
if (
|
|
5037
|
-
if (t instanceof
|
|
5050
|
+
if (F(t)) return t;
|
|
5051
|
+
if (pn(t)) return hn(t);
|
|
5052
|
+
if (t instanceof L) return he(t);
|
|
5038
5053
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5039
5054
|
}
|
|
5040
5055
|
}
|
|
5041
|
-
function
|
|
5056
|
+
function xt(t, e) {
|
|
5042
5057
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5043
5058
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5044
5059
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5098,7 +5113,7 @@
|
|
|
5098
5113
|
}
|
|
5099
5114
|
}
|
|
5100
5115
|
}
|
|
5101
|
-
class
|
|
5116
|
+
class Pt {
|
|
5102
5117
|
constructor(e) {
|
|
5103
5118
|
this.columns = e;
|
|
5104
5119
|
}
|
|
@@ -5107,7 +5122,7 @@
|
|
|
5107
5122
|
return this.columns.filter((r) => n2(r.spec));
|
|
5108
5123
|
}
|
|
5109
5124
|
}
|
|
5110
|
-
function
|
|
5125
|
+
function Ct(t) {
|
|
5111
5126
|
if (t)
|
|
5112
5127
|
return t.map((e) => ({
|
|
5113
5128
|
type: `split:${Jn(e.axisId)}`,
|
|
@@ -5116,21 +5131,21 @@
|
|
|
5116
5131
|
// High importance for split filters in labels
|
|
5117
5132
|
}));
|
|
5118
5133
|
}
|
|
5119
|
-
function
|
|
5134
|
+
function St(t) {
|
|
5120
5135
|
if (t)
|
|
5121
5136
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5122
5137
|
}
|
|
5123
|
-
function
|
|
5138
|
+
function _t(t, e) {
|
|
5124
5139
|
if (!e || e.length === 0) return t;
|
|
5125
5140
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5126
5141
|
return Le({ id: t, axisFilters: n2 });
|
|
5127
5142
|
}
|
|
5128
|
-
function
|
|
5143
|
+
function It(t) {
|
|
5129
5144
|
if (!t || typeof t != "object") return false;
|
|
5130
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);
|
|
5131
5146
|
return !!e.domainAnchor || n2 || r;
|
|
5132
5147
|
}
|
|
5133
|
-
function
|
|
5148
|
+
function Lt(t) {
|
|
5134
5149
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5135
5150
|
return [];
|
|
5136
5151
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5141,7 +5156,7 @@
|
|
|
5141
5156
|
class ge {
|
|
5142
5157
|
constructor() {
|
|
5143
5158
|
T(this, "defaultProviderStore", []);
|
|
5144
|
-
T(this, "providers", [new
|
|
5159
|
+
T(this, "providers", [new Pt(this.defaultProviderStore)]);
|
|
5145
5160
|
T(this, "axisLabelProviders", []);
|
|
5146
5161
|
}
|
|
5147
5162
|
addColumnProvider(e) {
|
|
@@ -5167,114 +5182,116 @@
|
|
|
5167
5182
|
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false } = n2 ?? {}, a = {
|
|
5168
5183
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
|
|
5169
5184
|
...i ?? {}
|
|
5170
|
-
}, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [];
|
|
5171
|
-
for (const
|
|
5172
|
-
const
|
|
5173
|
-
let
|
|
5174
|
-
if (
|
|
5185
|
+
}, l2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], u2 = [], d = /* @__PURE__ */ new Set();
|
|
5186
|
+
for (const c2 of l2) {
|
|
5187
|
+
const m2 = It(c2);
|
|
5188
|
+
let b;
|
|
5189
|
+
if (m2) {
|
|
5175
5190
|
if (!r)
|
|
5176
5191
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5177
|
-
|
|
5192
|
+
b = Dn(r.anchors, c2, n2);
|
|
5178
5193
|
} else
|
|
5179
|
-
|
|
5180
|
-
const
|
|
5181
|
-
for (const
|
|
5182
|
-
const
|
|
5183
|
-
for (const
|
|
5184
|
-
if (
|
|
5185
|
-
|
|
5194
|
+
b = c2;
|
|
5195
|
+
const A2 = /* @__PURE__ */ new Set(), p2 = [];
|
|
5196
|
+
for (const f2 of this.providers) {
|
|
5197
|
+
const C2 = f2.selectColumns(b);
|
|
5198
|
+
for (const P of C2) {
|
|
5199
|
+
if (A2.has(P.id))
|
|
5200
|
+
throw new Error(`Duplicate column id ${P.id} in provider ${f2.constructor.name}`);
|
|
5201
|
+
const O = Rn(P.spec);
|
|
5202
|
+
d.has(O) || (A2.add(P.id), d.add(O), p2.push(P));
|
|
5186
5203
|
}
|
|
5187
5204
|
}
|
|
5188
|
-
if (
|
|
5189
|
-
const
|
|
5190
|
-
for (const
|
|
5191
|
-
if (!f(
|
|
5192
|
-
const
|
|
5193
|
-
if (
|
|
5194
|
-
const
|
|
5195
|
-
if (!
|
|
5205
|
+
if (p2.length === 0) continue;
|
|
5206
|
+
const g = Lt(c2), w2 = g.length > 0;
|
|
5207
|
+
for (const f$1 of p2) {
|
|
5208
|
+
if (!f(f$1.spec)) continue;
|
|
5209
|
+
const C2 = f$1.spec;
|
|
5210
|
+
if (w2) {
|
|
5211
|
+
const P = At(f$1.data);
|
|
5212
|
+
if (!P) {
|
|
5196
5213
|
if (s2) continue;
|
|
5197
5214
|
return;
|
|
5198
5215
|
}
|
|
5199
|
-
if (!yn(
|
|
5200
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
5201
|
-
const
|
|
5202
|
-
if (
|
|
5203
|
-
throw new Error(`Not enough partition keys (${
|
|
5204
|
-
const
|
|
5205
|
-
if (
|
|
5206
|
-
if (
|
|
5216
|
+
if (!yn(P))
|
|
5217
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${P.type} for column ${f$1.id}`);
|
|
5218
|
+
const O = wt(P), U = g[g.length - 1];
|
|
5219
|
+
if (U >= P.partitionKeyLength)
|
|
5220
|
+
throw new Error(`Not enough partition keys (${P.partitionKeyLength}) for requested split axes (max index ${U}) in column ${C2.name}`);
|
|
5221
|
+
const F2 = g.map((S) => this.findLabels(p$1(C2.axesSpec[S]))), D2 = [], Y2 = (S, B) => {
|
|
5222
|
+
if (B >= g.length) {
|
|
5223
|
+
if (D2.push([...S]), D2.length > 1e4)
|
|
5207
5224
|
throw new Error("Too many key combinations, aborting.");
|
|
5208
5225
|
return;
|
|
5209
5226
|
}
|
|
5210
|
-
const
|
|
5211
|
-
if (
|
|
5212
|
-
throw new Error(`Axis index ${
|
|
5213
|
-
const
|
|
5214
|
-
if (!
|
|
5215
|
-
|
|
5227
|
+
const k2 = g[B];
|
|
5228
|
+
if (k2 >= O.length)
|
|
5229
|
+
throw new Error(`Axis index ${k2} out of bounds for unique keys array (length ${O.length}) during split key generation for column ${f$1.id}`);
|
|
5230
|
+
const K = O[k2];
|
|
5231
|
+
if (!K || K.length === 0) {
|
|
5232
|
+
D2.length = 0;
|
|
5216
5233
|
return;
|
|
5217
5234
|
}
|
|
5218
|
-
for (const
|
|
5219
|
-
|
|
5235
|
+
for (const X2 of K)
|
|
5236
|
+
S.push(X2), Y2(S, B + 1), S.pop();
|
|
5220
5237
|
};
|
|
5221
|
-
if (
|
|
5238
|
+
if (Y2([], 0), D2.length === 0)
|
|
5222
5239
|
continue;
|
|
5223
|
-
const
|
|
5224
|
-
for (let
|
|
5225
|
-
|
|
5226
|
-
const
|
|
5227
|
-
for (const
|
|
5228
|
-
const
|
|
5229
|
-
const
|
|
5230
|
-
return { axisIdx:
|
|
5240
|
+
const V = [...C2.axesSpec], R = g.map((S) => S);
|
|
5241
|
+
for (let S = g.length - 1; S >= 0; S--)
|
|
5242
|
+
V.splice(g[S], 1);
|
|
5243
|
+
const Ue = { ...C2, axesSpec: V };
|
|
5244
|
+
for (const S of D2) {
|
|
5245
|
+
const B = S.map((k2, K) => {
|
|
5246
|
+
const X2 = R[K], Be = p$1(C2.axesSpec[X2]), oe = F2[K], Me = (oe == null ? void 0 : oe[k2]) ?? String(k2);
|
|
5247
|
+
return { axisIdx: X2, axisId: Be, value: k2, label: Me };
|
|
5231
5248
|
});
|
|
5232
5249
|
u2.push({
|
|
5233
5250
|
type: "split",
|
|
5234
|
-
originalColumn:
|
|
5235
|
-
spec:
|
|
5236
|
-
adjustedSpec:
|
|
5237
|
-
dataEntries:
|
|
5238
|
-
axisFilters:
|
|
5251
|
+
originalColumn: f$1,
|
|
5252
|
+
spec: C2,
|
|
5253
|
+
adjustedSpec: Ue,
|
|
5254
|
+
dataEntries: P,
|
|
5255
|
+
axisFilters: B
|
|
5239
5256
|
});
|
|
5240
5257
|
}
|
|
5241
5258
|
} else
|
|
5242
5259
|
u2.push({
|
|
5243
5260
|
type: "direct",
|
|
5244
|
-
originalColumn:
|
|
5245
|
-
spec:
|
|
5246
|
-
adjustedSpec:
|
|
5261
|
+
originalColumn: f$1,
|
|
5262
|
+
spec: C2,
|
|
5263
|
+
adjustedSpec: C2
|
|
5247
5264
|
});
|
|
5248
5265
|
}
|
|
5249
5266
|
}
|
|
5250
5267
|
if (u2.length === 0) return [];
|
|
5251
|
-
const
|
|
5268
|
+
const v = Re(
|
|
5252
5269
|
u2,
|
|
5253
|
-
(
|
|
5254
|
-
spec:
|
|
5255
|
-
suffixTrace:
|
|
5270
|
+
(c2) => ({
|
|
5271
|
+
spec: c2.spec,
|
|
5272
|
+
suffixTrace: c2.type === "split" ? Ct(c2.axisFilters) : void 0
|
|
5256
5273
|
}),
|
|
5257
5274
|
a
|
|
5258
|
-
),
|
|
5259
|
-
for (const { value:
|
|
5260
|
-
const { originalColumn:
|
|
5261
|
-
let
|
|
5262
|
-
r ?
|
|
5263
|
-
let
|
|
5264
|
-
o && (
|
|
5265
|
-
...
|
|
5275
|
+
), h2 = [];
|
|
5276
|
+
for (const { value: c2, label: m2 } of v) {
|
|
5277
|
+
const { originalColumn: b, spec: A2 } = c2, p2 = c2.type === "split" ? c2.axisFilters : void 0, g = St(p2);
|
|
5278
|
+
let w2;
|
|
5279
|
+
r ? w2 = r.deriveS(A2, g) : w2 = _t(b.id, g);
|
|
5280
|
+
let f2 = { ...c2.adjustedSpec };
|
|
5281
|
+
o && (f2 = {
|
|
5282
|
+
...f2,
|
|
5266
5283
|
annotations: {
|
|
5267
|
-
...
|
|
5268
|
-
"pl7.app/label":
|
|
5284
|
+
...f2.annotations ?? {},
|
|
5285
|
+
"pl7.app/label": m2
|
|
5269
5286
|
}
|
|
5270
|
-
}),
|
|
5271
|
-
id:
|
|
5272
|
-
spec:
|
|
5273
|
-
data: () =>
|
|
5274
|
-
label:
|
|
5287
|
+
}), h2.push({
|
|
5288
|
+
id: w2,
|
|
5289
|
+
spec: f2,
|
|
5290
|
+
data: () => c2.type === "split" ? gn(xt(c2.dataEntries, g)) : c2.originalColumn.data,
|
|
5291
|
+
label: m2
|
|
5275
5292
|
});
|
|
5276
5293
|
}
|
|
5277
|
-
return
|
|
5294
|
+
return h2;
|
|
5278
5295
|
}
|
|
5279
5296
|
getColumns(e, n2) {
|
|
5280
5297
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5307,9 +5324,9 @@
|
|
|
5307
5324
|
return true;
|
|
5308
5325
|
}
|
|
5309
5326
|
function Pe(t) {
|
|
5310
|
-
return Fn(t, (e) => e instanceof
|
|
5327
|
+
return Fn(t, (e) => e instanceof L ? e.handle : pn(e) ? ln(e, (n2) => n2.handle) : e);
|
|
5311
5328
|
}
|
|
5312
|
-
class
|
|
5329
|
+
class Tt {
|
|
5313
5330
|
constructor() {
|
|
5314
5331
|
T(this, "ctx", y());
|
|
5315
5332
|
}
|
|
@@ -5323,15 +5340,15 @@
|
|
|
5323
5340
|
const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5324
5341
|
let s2 = {}, o = false;
|
|
5325
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" ? Re(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5326
|
-
ref:
|
|
5343
|
+
ref: Hn(a, o),
|
|
5327
5344
|
label: l2
|
|
5328
5345
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5329
|
-
ref:
|
|
5346
|
+
ref: Hn(a, o),
|
|
5330
5347
|
label: s2(l2, a)
|
|
5331
5348
|
}));
|
|
5332
5349
|
}
|
|
5333
5350
|
resolveAnchorCtx(e) {
|
|
5334
|
-
if (e instanceof
|
|
5351
|
+
if (e instanceof $n) return e;
|
|
5335
5352
|
const n2 = {};
|
|
5336
5353
|
for (const [r, i] of Object.entries(e))
|
|
5337
5354
|
if (Mn(i)) {
|
|
@@ -5341,7 +5358,7 @@
|
|
|
5341
5358
|
n2[r] = s2;
|
|
5342
5359
|
} else
|
|
5343
5360
|
n2[r] = i;
|
|
5344
|
-
return new
|
|
5361
|
+
return new $n(n2);
|
|
5345
5362
|
}
|
|
5346
5363
|
/**
|
|
5347
5364
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5415,7 +5432,7 @@
|
|
|
5415
5432
|
ref: n2.ref,
|
|
5416
5433
|
obj: {
|
|
5417
5434
|
...n2.obj,
|
|
5418
|
-
data: new
|
|
5435
|
+
data: new L(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5419
5436
|
}
|
|
5420
5437
|
}))
|
|
5421
5438
|
};
|
|
@@ -5434,9 +5451,9 @@
|
|
|
5434
5451
|
ref: n2.ref,
|
|
5435
5452
|
obj: {
|
|
5436
5453
|
...n2.obj,
|
|
5437
|
-
data:
|
|
5454
|
+
data: Wn(
|
|
5438
5455
|
n2.obj.data,
|
|
5439
|
-
(r) => new
|
|
5456
|
+
(r) => new L(r, [n2.ref.blockId, n2.ref.name])
|
|
5440
5457
|
)
|
|
5441
5458
|
}
|
|
5442
5459
|
}))
|
|
@@ -5465,7 +5482,7 @@
|
|
|
5465
5482
|
if (n2)
|
|
5466
5483
|
return Fn(
|
|
5467
5484
|
n2,
|
|
5468
|
-
(i) => new
|
|
5485
|
+
(i) => new L(i, [e.blockId, e.name])
|
|
5469
5486
|
);
|
|
5470
5487
|
}
|
|
5471
5488
|
/**
|
|
@@ -5526,7 +5543,7 @@
|
|
|
5526
5543
|
findLabels(e) {
|
|
5527
5544
|
const n2 = this.getData();
|
|
5528
5545
|
for (const r of n2.entries) {
|
|
5529
|
-
if (!Z
|
|
5546
|
+
if (!Z(r.obj)) continue;
|
|
5530
5547
|
const i = r.obj.spec;
|
|
5531
5548
|
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && le(e.domain, i.axesSpec[0].domain)) {
|
|
5532
5549
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
@@ -5578,13 +5595,13 @@
|
|
|
5578
5595
|
return r;
|
|
5579
5596
|
}
|
|
5580
5597
|
}
|
|
5581
|
-
class
|
|
5598
|
+
class Q {
|
|
5582
5599
|
constructor() {
|
|
5583
5600
|
T(this, "ctx");
|
|
5584
5601
|
T(this, "args");
|
|
5585
5602
|
T(this, "uiState");
|
|
5586
5603
|
T(this, "_activeArgsCache");
|
|
5587
|
-
T(this, "resultPool", new
|
|
5604
|
+
T(this, "resultPool", new Tt());
|
|
5588
5605
|
this.ctx = y(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5589
5606
|
}
|
|
5590
5607
|
/**
|
|
@@ -5603,14 +5620,14 @@
|
|
|
5603
5620
|
getNamedAccessor(e) {
|
|
5604
5621
|
return pe(
|
|
5605
5622
|
this.ctx.getAccessorHandleByName(e),
|
|
5606
|
-
(n2) => new
|
|
5623
|
+
(n2) => new L(n2, [e])
|
|
5607
5624
|
);
|
|
5608
5625
|
}
|
|
5609
5626
|
get prerun() {
|
|
5610
5627
|
return this.getNamedAccessor(Fe);
|
|
5611
5628
|
}
|
|
5612
5629
|
get outputs() {
|
|
5613
|
-
return this.getNamedAccessor(
|
|
5630
|
+
return this.getNamedAccessor(Oe);
|
|
5614
5631
|
}
|
|
5615
5632
|
/**
|
|
5616
5633
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5622,7 +5639,7 @@
|
|
|
5622
5639
|
}
|
|
5623
5640
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5624
5641
|
var i;
|
|
5625
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5642
|
+
const n2 = e.some((s2) => !(s2.data instanceof L) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5626
5643
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5627
5644
|
}
|
|
5628
5645
|
// TODO remove all non-PColumn fields
|
|
@@ -5652,26 +5669,26 @@
|
|
|
5652
5669
|
return this.ctx.getCurrentUnstableMarker();
|
|
5653
5670
|
}
|
|
5654
5671
|
}
|
|
5655
|
-
const
|
|
5656
|
-
function
|
|
5672
|
+
const H = "1.30.24";
|
|
5673
|
+
function Et(t) {
|
|
5657
5674
|
return t.__renderLambda === true;
|
|
5658
5675
|
}
|
|
5659
5676
|
function ue(t) {
|
|
5660
5677
|
if (t !== void 0)
|
|
5661
|
-
return
|
|
5678
|
+
return Et(t) ? t.handle : t;
|
|
5662
5679
|
}
|
|
5663
|
-
class
|
|
5680
|
+
class I {
|
|
5664
5681
|
constructor(e, n2, r, i, s2, o, a, l2) {
|
|
5665
5682
|
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
|
|
5666
5683
|
}
|
|
5667
5684
|
static create(e = "Heavy") {
|
|
5668
|
-
return new
|
|
5685
|
+
return new I(
|
|
5669
5686
|
e,
|
|
5670
5687
|
void 0,
|
|
5671
5688
|
{},
|
|
5672
5689
|
{},
|
|
5673
|
-
|
|
5674
|
-
|
|
5690
|
+
ee(true),
|
|
5691
|
+
ee([]),
|
|
5675
5692
|
void 0,
|
|
5676
5693
|
void 0
|
|
5677
5694
|
);
|
|
@@ -5679,7 +5696,7 @@
|
|
|
5679
5696
|
output(e, n2, r = {}) {
|
|
5680
5697
|
if (typeof n2 == "function") {
|
|
5681
5698
|
const i = `output#${e}`;
|
|
5682
|
-
return
|
|
5699
|
+
return M(i, () => n2(new Q())), new I(
|
|
5683
5700
|
this._renderingMode,
|
|
5684
5701
|
this._initialArgs,
|
|
5685
5702
|
this._initialUiState,
|
|
@@ -5697,7 +5714,7 @@
|
|
|
5697
5714
|
this._enrichmentTargets
|
|
5698
5715
|
);
|
|
5699
5716
|
} else
|
|
5700
|
-
return new
|
|
5717
|
+
return new I(
|
|
5701
5718
|
this._renderingMode,
|
|
5702
5719
|
this._initialArgs,
|
|
5703
5720
|
this._initialUiState,
|
|
@@ -5716,7 +5733,7 @@
|
|
|
5716
5733
|
return this.output(e, n2, { retentive: true });
|
|
5717
5734
|
}
|
|
5718
5735
|
argsValid(e) {
|
|
5719
|
-
return typeof e == "function" ? (
|
|
5736
|
+
return typeof e == "function" ? (M("inputsValid", () => e(new Q())), new I(
|
|
5720
5737
|
this._renderingMode,
|
|
5721
5738
|
this._initialArgs,
|
|
5722
5739
|
this._initialUiState,
|
|
@@ -5728,7 +5745,7 @@
|
|
|
5728
5745
|
this._sections,
|
|
5729
5746
|
this._title,
|
|
5730
5747
|
this._enrichmentTargets
|
|
5731
|
-
)) : new
|
|
5748
|
+
)) : new I(
|
|
5732
5749
|
this._renderingMode,
|
|
5733
5750
|
this._initialArgs,
|
|
5734
5751
|
this._initialUiState,
|
|
@@ -5740,7 +5757,7 @@
|
|
|
5740
5757
|
);
|
|
5741
5758
|
}
|
|
5742
5759
|
sections(e) {
|
|
5743
|
-
return Array.isArray(e) ? this.sections(
|
|
5760
|
+
return Array.isArray(e) ? this.sections(ee(e)) : typeof e == "function" ? (M("sections", () => e(new Q())), new I(
|
|
5744
5761
|
this._renderingMode,
|
|
5745
5762
|
this._initialArgs,
|
|
5746
5763
|
this._initialUiState,
|
|
@@ -5749,7 +5766,7 @@
|
|
|
5749
5766
|
{ __renderLambda: true, handle: "sections" },
|
|
5750
5767
|
this._title,
|
|
5751
5768
|
this._enrichmentTargets
|
|
5752
|
-
)) : new
|
|
5769
|
+
)) : new I(
|
|
5753
5770
|
this._renderingMode,
|
|
5754
5771
|
this._initialArgs,
|
|
5755
5772
|
this._initialUiState,
|
|
@@ -5762,7 +5779,7 @@
|
|
|
5762
5779
|
}
|
|
5763
5780
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5764
5781
|
title(e) {
|
|
5765
|
-
return
|
|
5782
|
+
return M("title", () => e(new Q())), new I(
|
|
5766
5783
|
this._renderingMode,
|
|
5767
5784
|
this._initialArgs,
|
|
5768
5785
|
this._initialUiState,
|
|
@@ -5778,7 +5795,7 @@
|
|
|
5778
5795
|
* @deprecated use {@link withArgs}
|
|
5779
5796
|
* */
|
|
5780
5797
|
initialArgs(e) {
|
|
5781
|
-
return new
|
|
5798
|
+
return new I(
|
|
5782
5799
|
this._renderingMode,
|
|
5783
5800
|
e,
|
|
5784
5801
|
this._initialUiState,
|
|
@@ -5791,7 +5808,7 @@
|
|
|
5791
5808
|
}
|
|
5792
5809
|
/** Sets initial args for the block, this value must be specified. */
|
|
5793
5810
|
withArgs(e) {
|
|
5794
|
-
return new
|
|
5811
|
+
return new I(
|
|
5795
5812
|
this._renderingMode,
|
|
5796
5813
|
e,
|
|
5797
5814
|
this._initialUiState,
|
|
@@ -5804,7 +5821,7 @@
|
|
|
5804
5821
|
}
|
|
5805
5822
|
/** Defines type and sets initial value for block UiState. */
|
|
5806
5823
|
withUiState(e) {
|
|
5807
|
-
return new
|
|
5824
|
+
return new I(
|
|
5808
5825
|
this._renderingMode,
|
|
5809
5826
|
this._initialArgs,
|
|
5810
5827
|
e,
|
|
@@ -5820,7 +5837,7 @@
|
|
|
5820
5837
|
* Influences dependency graph construction.
|
|
5821
5838
|
*/
|
|
5822
5839
|
enriches(e) {
|
|
5823
|
-
return
|
|
5840
|
+
return M("enrichmentTargets", e), new I(
|
|
5824
5841
|
this._renderingMode,
|
|
5825
5842
|
this._initialArgs,
|
|
5826
5843
|
this._initialUiState,
|
|
@@ -5838,7 +5855,7 @@
|
|
|
5838
5855
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5839
5856
|
const e = {
|
|
5840
5857
|
v3: {
|
|
5841
|
-
sdkVersion:
|
|
5858
|
+
sdkVersion: H,
|
|
5842
5859
|
renderingMode: this._renderingMode,
|
|
5843
5860
|
initialArgs: this._initialArgs,
|
|
5844
5861
|
initialUiState: this._initialUiState,
|
|
@@ -5849,7 +5866,7 @@
|
|
|
5849
5866
|
enrichmentTargets: this._enrichmentTargets
|
|
5850
5867
|
},
|
|
5851
5868
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5852
|
-
sdkVersion:
|
|
5869
|
+
sdkVersion: H,
|
|
5853
5870
|
renderingMode: this._renderingMode,
|
|
5854
5871
|
initialArgs: this._initialArgs,
|
|
5855
5872
|
inputsValid: ue(this._inputsValid),
|
|
@@ -5858,13 +5875,13 @@
|
|
|
5858
5875
|
Object.entries(this._outputs).map(([n2, r]) => [n2, ue(r)])
|
|
5859
5876
|
)
|
|
5860
5877
|
};
|
|
5861
|
-
return
|
|
5878
|
+
return at() ? Ee({ sdkVersion: H }) : { config: e };
|
|
5862
5879
|
}
|
|
5863
5880
|
}
|
|
5864
|
-
function
|
|
5881
|
+
function Ft(t) {
|
|
5865
5882
|
return JSON.parse(t);
|
|
5866
5883
|
}
|
|
5867
|
-
function
|
|
5884
|
+
function Ot(t) {
|
|
5868
5885
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5869
5886
|
}
|
|
5870
5887
|
function Ve(t) {
|
|
@@ -5877,42 +5894,42 @@
|
|
|
5877
5894
|
function Ke(t, e) {
|
|
5878
5895
|
const n2 = [], r = [];
|
|
5879
5896
|
for (const a of t)
|
|
5880
|
-
|
|
5897
|
+
Ot(a.spec) ? n2.push(a) : r.push(a);
|
|
5881
5898
|
const i = [];
|
|
5882
5899
|
for (const a of r)
|
|
5883
5900
|
for (const l2 of a.spec.axesSpec) {
|
|
5884
|
-
const u2 =
|
|
5885
|
-
i.some((
|
|
5901
|
+
const u2 = p$1(l2);
|
|
5902
|
+
i.some((d) => X(d, u2)) || i.push(u2);
|
|
5886
5903
|
}
|
|
5887
5904
|
for (const a of n2) {
|
|
5888
|
-
const l2 =
|
|
5905
|
+
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((d) => X(d, l2));
|
|
5889
5906
|
u2 !== -1 && i.splice(u2, 1);
|
|
5890
5907
|
}
|
|
5891
5908
|
const s2 = (a, l2) => {
|
|
5892
5909
|
let u2 = a.toString();
|
|
5893
5910
|
if (l2)
|
|
5894
|
-
for (const
|
|
5895
|
-
u2 +=
|
|
5911
|
+
for (const d in l2)
|
|
5912
|
+
u2 += d, u2 += l2[d];
|
|
5896
5913
|
return u2;
|
|
5897
5914
|
}, o = [];
|
|
5898
5915
|
for (const a of e) {
|
|
5899
|
-
const l2 = a.spec.axesSpec[0], u2 =
|
|
5900
|
-
if (
|
|
5901
|
-
const v = i[
|
|
5902
|
-
|
|
5916
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(l2), d = i.findIndex((v) => X(v, u2));
|
|
5917
|
+
if (d !== -1) {
|
|
5918
|
+
const v = i[d], h2 = Object.keys(v.domain ?? {}).length, c2 = Object.keys(l2.domain ?? {}).length;
|
|
5919
|
+
h2 > c2 ? o.push({
|
|
5903
5920
|
id: s2(a.id, v.domain),
|
|
5904
5921
|
spec: {
|
|
5905
5922
|
...a.spec,
|
|
5906
5923
|
axesSpec: [{ ...v, annotations: l2.annotations }]
|
|
5907
5924
|
},
|
|
5908
5925
|
data: a.data
|
|
5909
|
-
}) : o.push(a), i.splice(
|
|
5926
|
+
}) : o.push(a), i.splice(d, 1);
|
|
5910
5927
|
}
|
|
5911
5928
|
}
|
|
5912
5929
|
return o;
|
|
5913
5930
|
}
|
|
5914
5931
|
function $e(t) {
|
|
5915
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
5932
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof L, r = (i) => typeof i == "object" && "type" in i;
|
|
5916
5933
|
return t.map((i) => i.data).every((i) => {
|
|
5917
5934
|
if (e(i))
|
|
5918
5935
|
return true;
|
|
@@ -5952,10 +5969,10 @@
|
|
|
5952
5969
|
sorting: i
|
|
5953
5970
|
};
|
|
5954
5971
|
}
|
|
5955
|
-
function
|
|
5956
|
-
var u2,
|
|
5972
|
+
function _n(t, e, n2, r) {
|
|
5973
|
+
var u2, d;
|
|
5957
5974
|
Array.isArray(r) && (r = { filters: r });
|
|
5958
|
-
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 = ((
|
|
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 = ((d = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : d.sorting) ?? [], a = Ve(t.resultPool);
|
|
5959
5976
|
if (!a) return;
|
|
5960
5977
|
const l2 = Ke(e.map(Cn), a);
|
|
5961
5978
|
if ($e([...e, ...l2]))
|
|
@@ -5963,45 +5980,45 @@
|
|
|
5963
5980
|
Je(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5964
5981
|
);
|
|
5965
5982
|
}
|
|
5966
|
-
function
|
|
5983
|
+
function Dt(t) {
|
|
5967
5984
|
var e;
|
|
5968
5985
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
5969
5986
|
}
|
|
5970
|
-
function
|
|
5971
|
-
var
|
|
5972
|
-
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
5987
|
+
function In(t, e, n2, r, i) {
|
|
5988
|
+
var b, A2;
|
|
5989
|
+
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((b = r == null ? void 0 : r.pTableParams) == null ? void 0 : b.filters) ?? []], a = ((A2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : A2.sorting) ?? [], l2 = e.find((p2) => n2(p2.spec));
|
|
5973
5990
|
if (!l2) return;
|
|
5974
5991
|
const u2 = Ve(t.resultPool);
|
|
5975
5992
|
if (!u2) return;
|
|
5976
|
-
const
|
|
5977
|
-
var
|
|
5993
|
+
const d = new Set((() => {
|
|
5994
|
+
var g, w2;
|
|
5978
5995
|
if (s2 === "inner") return [];
|
|
5979
|
-
const
|
|
5980
|
-
return
|
|
5996
|
+
const p2 = (w2 = (g = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : g.hiddenColIds) == null ? void 0 : w2.map(Ft).filter((f2) => f2.type === "column").map((f2) => f2.id);
|
|
5997
|
+
return p2 || e.filter((f2) => Dt(f2.spec)).map((f2) => f2.id);
|
|
5981
5998
|
})());
|
|
5982
|
-
|
|
5983
|
-
const v = e.filter((
|
|
5984
|
-
...l2.spec.axesSpec.map((
|
|
5999
|
+
d.delete(l2.id), [...o.map((p2) => p2.column), ...a.map((p2) => p2.column)].filter((p2) => p2.type === "column").map((p2) => d.delete(p2.id));
|
|
6000
|
+
const v = e.filter((p2) => !d.has(p2.id)), h2 = Ke(v.map(Cn), u2), c2 = [
|
|
6001
|
+
...l2.spec.axesSpec.map((p2) => ({
|
|
5985
6002
|
type: "axis",
|
|
5986
|
-
id:
|
|
5987
|
-
spec:
|
|
6003
|
+
id: p$1(p2),
|
|
6004
|
+
spec: p2
|
|
5988
6005
|
})),
|
|
5989
|
-
...[...e, ...
|
|
6006
|
+
...[...e, ...h2].map((p2) => ({
|
|
5990
6007
|
type: "column",
|
|
5991
|
-
id:
|
|
5992
|
-
spec:
|
|
6008
|
+
id: p2.id,
|
|
6009
|
+
spec: p2.spec
|
|
5993
6010
|
}))
|
|
5994
6011
|
];
|
|
5995
|
-
if (!$e([...v, ...
|
|
5996
|
-
const
|
|
5997
|
-
Je(e,
|
|
6012
|
+
if (!$e([...v, ...h2])) return;
|
|
6013
|
+
const m2 = t.createPTable(
|
|
6014
|
+
Je(e, h2, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
5998
6015
|
);
|
|
5999
6016
|
return {
|
|
6000
|
-
tableSpec:
|
|
6001
|
-
tableHandle:
|
|
6017
|
+
tableSpec: c2,
|
|
6018
|
+
tableHandle: m2
|
|
6002
6019
|
};
|
|
6003
6020
|
}
|
|
6004
|
-
const ImportFileHandleSchema = z$
|
|
6021
|
+
const ImportFileHandleSchema = z$2.string().optional().refine(
|
|
6005
6022
|
(_a) => true
|
|
6006
6023
|
);
|
|
6007
6024
|
function* range(from, to, step = 1) {
|
|
@@ -6019,12 +6036,12 @@
|
|
|
6019
6036
|
function times(n2, cb) {
|
|
6020
6037
|
return toList(range(0, n2)).map(cb);
|
|
6021
6038
|
}
|
|
6022
|
-
const $BlockArgs = z$
|
|
6023
|
-
tableNumRows: z$
|
|
6024
|
-
numbers: z$
|
|
6025
|
-
handles: z$
|
|
6039
|
+
const $BlockArgs = z$2.object({
|
|
6040
|
+
tableNumRows: z$2.number().default(100),
|
|
6041
|
+
numbers: z$2.array(z$2.coerce.number()),
|
|
6042
|
+
handles: z$2.array(ImportFileHandleSchema)
|
|
6026
6043
|
});
|
|
6027
|
-
const platforma =
|
|
6044
|
+
const platforma = I.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
|
|
6028
6045
|
if (ctx.args.numbers.length === 5) {
|
|
6029
6046
|
throw new Error("argsValid: test error");
|
|
6030
6047
|
}
|
|
@@ -6047,7 +6064,7 @@
|
|
|
6047
6064
|
val: v.toString()
|
|
6048
6065
|
};
|
|
6049
6066
|
});
|
|
6050
|
-
return
|
|
6067
|
+
return _n(
|
|
6051
6068
|
ctx,
|
|
6052
6069
|
[
|
|
6053
6070
|
{
|
|
@@ -6100,7 +6117,7 @@
|
|
|
6100
6117
|
val: v.toString()
|
|
6101
6118
|
};
|
|
6102
6119
|
});
|
|
6103
|
-
return
|
|
6120
|
+
return In(
|
|
6104
6121
|
ctx,
|
|
6105
6122
|
[
|
|
6106
6123
|
{
|