@milaboratories/milaboratories.ui-examples.model 1.1.55 → 1.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +470 -443
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}, "");
|
|
36
36
|
return `{${values}}`;
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const De = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
|
|
39
39
|
var util;
|
|
40
40
|
(function(util2) {
|
|
41
41
|
util2.assertEqual = (val) => val;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
88
88
|
}
|
|
89
89
|
util2.joinValues = joinValues;
|
|
90
|
-
util2.jsonStringifyReplacer = (
|
|
90
|
+
util2.jsonStringifyReplacer = (_, value) => {
|
|
91
91
|
if (typeof value === "bigint") {
|
|
92
92
|
return value.toString();
|
|
93
93
|
}
|
|
@@ -3105,29 +3105,29 @@
|
|
|
3105
3105
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3106
3106
|
const fn = ctx.data;
|
|
3107
3107
|
if (this._def.returns instanceof ZodPromise) {
|
|
3108
|
-
const
|
|
3108
|
+
const me2 = this;
|
|
3109
3109
|
return OK(async function(...args) {
|
|
3110
3110
|
const error = new ZodError([]);
|
|
3111
|
-
const parsedArgs = await
|
|
3111
|
+
const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e) => {
|
|
3112
3112
|
error.addIssue(makeArgsIssue(args, e));
|
|
3113
3113
|
throw error;
|
|
3114
3114
|
});
|
|
3115
3115
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
3116
|
-
const parsedReturns = await
|
|
3116
|
+
const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3117
3117
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3118
3118
|
throw error;
|
|
3119
3119
|
});
|
|
3120
3120
|
return parsedReturns;
|
|
3121
3121
|
});
|
|
3122
3122
|
} else {
|
|
3123
|
-
const
|
|
3123
|
+
const me2 = this;
|
|
3124
3124
|
return OK(function(...args) {
|
|
3125
|
-
const parsedArgs =
|
|
3125
|
+
const parsedArgs = me2._def.args.safeParse(args, params);
|
|
3126
3126
|
if (!parsedArgs.success) {
|
|
3127
3127
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3128
3128
|
}
|
|
3129
3129
|
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
3130
|
-
const parsedReturns =
|
|
3130
|
+
const parsedReturns = me2._def.returns.safeParse(result, params);
|
|
3131
3131
|
if (!parsedReturns.success) {
|
|
3132
3132
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
3133
3133
|
}
|
|
@@ -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$1(n2) {
|
|
4003
4003
|
if (!n2 || typeof n2 != "object")
|
|
4004
4004
|
return false;
|
|
4005
4005
|
const e = n2;
|
|
@@ -4017,7 +4017,7 @@
|
|
|
4017
4017
|
}
|
|
4018
4018
|
}
|
|
4019
4019
|
function yn(n2) {
|
|
4020
|
-
return
|
|
4020
|
+
return F$1(n2) ? n2.type === "JsonPartitioned" || n2.type === "BinaryPartitioned" : false;
|
|
4021
4021
|
}
|
|
4022
4022
|
function hn(n2) {
|
|
4023
4023
|
switch (n2.type) {
|
|
@@ -4081,33 +4081,36 @@
|
|
|
4081
4081
|
}
|
|
4082
4082
|
}
|
|
4083
4083
|
}
|
|
4084
|
-
function Cn
|
|
4084
|
+
function Cn(n2) {
|
|
4085
4085
|
return {
|
|
4086
4086
|
columnId: n2.id,
|
|
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
|
|
4098
|
+
return De(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 {
|
|
@@ -4127,28 +4130,28 @@
|
|
|
4127
4130
|
case "full":
|
|
4128
4131
|
return {
|
|
4129
4132
|
type: n2.type,
|
|
4130
|
-
entries: n2.entries.map((t) =>
|
|
4133
|
+
entries: n2.entries.map((t) => h(t, e))
|
|
4131
4134
|
};
|
|
4132
4135
|
case "outer":
|
|
4133
4136
|
return {
|
|
4134
4137
|
type: "outer",
|
|
4135
|
-
primary:
|
|
4136
|
-
secondary: n2.secondary.map((t) =>
|
|
4138
|
+
primary: h(n2.primary, e),
|
|
4139
|
+
secondary: n2.secondary.map((t) => h(t, e))
|
|
4137
4140
|
};
|
|
4138
4141
|
default:
|
|
4139
4142
|
w(n2);
|
|
4140
4143
|
}
|
|
4141
4144
|
}
|
|
4142
4145
|
function G$1(n2) {
|
|
4143
|
-
return
|
|
4146
|
+
return De(n2);
|
|
4144
4147
|
}
|
|
4145
4148
|
function x(n2) {
|
|
4146
|
-
return
|
|
4149
|
+
return De(p$1(n2));
|
|
4147
4150
|
}
|
|
4148
4151
|
function A(n2, e) {
|
|
4149
4152
|
return JSON.stringify([n2, e]);
|
|
4150
4153
|
}
|
|
4151
|
-
class
|
|
4154
|
+
class $n {
|
|
4152
4155
|
/**
|
|
4153
4156
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4154
4157
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -4210,7 +4213,7 @@
|
|
|
4210
4213
|
}
|
|
4211
4214
|
if (r.axes = e.axesSpec.map((a) => {
|
|
4212
4215
|
const i = x(a), u2 = this.axes.get(i);
|
|
4213
|
-
return u2 === void 0 ?
|
|
4216
|
+
return u2 === void 0 ? p$1(a) : u2;
|
|
4214
4217
|
}), !t || t.length === 0)
|
|
4215
4218
|
return r;
|
|
4216
4219
|
const s2 = [];
|
|
@@ -4269,9 +4272,9 @@
|
|
|
4269
4272
|
}
|
|
4270
4273
|
r.domain = s2;
|
|
4271
4274
|
}
|
|
4272
|
-
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;
|
|
4273
4276
|
}
|
|
4274
|
-
function Q(n2, e) {
|
|
4277
|
+
function Q$1(n2, e) {
|
|
4275
4278
|
if (!Y(e))
|
|
4276
4279
|
return e;
|
|
4277
4280
|
const t = e.anchor, r = n2[t];
|
|
@@ -4289,7 +4292,7 @@
|
|
|
4289
4292
|
throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
|
|
4290
4293
|
return o[0];
|
|
4291
4294
|
} else if ("id" in e) {
|
|
4292
|
-
const o = r.axesSpec.filter((s2) => X
|
|
4295
|
+
const o = r.axesSpec.filter((s2) => X(e.id, p$1(s2)));
|
|
4293
4296
|
if (o.length > 1)
|
|
4294
4297
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4295
4298
|
if (o.length === 0)
|
|
@@ -4301,14 +4304,14 @@
|
|
|
4301
4304
|
function Y(n2) {
|
|
4302
4305
|
return typeof n2 == "object" && "anchor" in n2;
|
|
4303
4306
|
}
|
|
4304
|
-
function f(n2) {
|
|
4307
|
+
function f$1(n2) {
|
|
4305
4308
|
return n2.kind === "PColumn";
|
|
4306
4309
|
}
|
|
4307
|
-
function Z
|
|
4308
|
-
return f(n2.spec);
|
|
4310
|
+
function Z(n2) {
|
|
4311
|
+
return f$1(n2.spec);
|
|
4309
4312
|
}
|
|
4310
4313
|
function jn(n2) {
|
|
4311
|
-
if (!Z
|
|
4314
|
+
if (!Z(n2)) throw new Error(`not a PColumn (kind = ${n2.spec.kind})`);
|
|
4312
4315
|
return n2;
|
|
4313
4316
|
}
|
|
4314
4317
|
function Fn(n2, e) {
|
|
@@ -4377,7 +4380,7 @@
|
|
|
4377
4380
|
return false;
|
|
4378
4381
|
}
|
|
4379
4382
|
if (e.axes !== void 0) {
|
|
4380
|
-
const t = n2.axesSpec.map(
|
|
4383
|
+
const t = n2.axesSpec.map(p$1);
|
|
4381
4384
|
if (e.partialAxesMatch) {
|
|
4382
4385
|
for (const r of e.axes)
|
|
4383
4386
|
if (!t.some((o) => k(r, o)))
|
|
@@ -4407,20 +4410,27 @@
|
|
|
4407
4410
|
return true;
|
|
4408
4411
|
}
|
|
4409
4412
|
function Kn(n2) {
|
|
4410
|
-
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$1(e) && N(e, t)) : (e) => f$1(e) && N(e, n2);
|
|
4414
|
+
}
|
|
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$1(n2) && (e.axesSpec = C(n2.axesSpec)), De(e);
|
|
4411
4421
|
}
|
|
4412
|
-
z$
|
|
4413
|
-
__isRef: z$
|
|
4414
|
-
blockId: z$
|
|
4415
|
-
name: z$
|
|
4416
|
-
requireEnrichments: z$
|
|
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")
|
|
4417
4427
|
}).describe(
|
|
4418
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."
|
|
4419
4429
|
).readonly();
|
|
4420
4430
|
function Mn(n2) {
|
|
4421
4431
|
return typeof n2 == "object" && n2 !== null && "__isRef" in n2 && n2.__isRef === true && "blockId" in n2 && "name" in n2;
|
|
4422
4432
|
}
|
|
4423
|
-
function
|
|
4433
|
+
function Hn(n2, e = true) {
|
|
4424
4434
|
if (e)
|
|
4425
4435
|
return {
|
|
4426
4436
|
...n2,
|
|
@@ -4431,11 +4441,11 @@
|
|
|
4431
4441
|
return r;
|
|
4432
4442
|
}
|
|
4433
4443
|
}
|
|
4434
|
-
function
|
|
4444
|
+
function Wn(n2, e) {
|
|
4435
4445
|
return n2.ok ? { ok: true, value: e(n2.value) } : n2;
|
|
4436
4446
|
}
|
|
4437
4447
|
const sn = 24;
|
|
4438
|
-
z$
|
|
4448
|
+
z$2.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4439
4449
|
var stringify = { exports: {} };
|
|
4440
4450
|
(function(module2, exports3) {
|
|
4441
4451
|
exports3 = module2.exports = stringify2;
|
|
@@ -4460,82 +4470,82 @@
|
|
|
4460
4470
|
};
|
|
4461
4471
|
}
|
|
4462
4472
|
})(stringify, stringify.exports);
|
|
4463
|
-
const l = z$
|
|
4464
|
-
type: z$
|
|
4465
|
-
name: z$
|
|
4466
|
-
message: z$
|
|
4473
|
+
const l = z$2.object({
|
|
4474
|
+
type: z$2.literal("PlError"),
|
|
4475
|
+
name: z$2.string(),
|
|
4476
|
+
message: z$2.string(),
|
|
4467
4477
|
/** The message with all details needed for SDK developers. */
|
|
4468
|
-
fullMessage: z$
|
|
4469
|
-
stack: z$
|
|
4478
|
+
fullMessage: z$2.string().optional(),
|
|
4479
|
+
stack: z$2.string().optional()
|
|
4470
4480
|
}), c = l.extend({
|
|
4471
|
-
cause: z$
|
|
4472
|
-
errors: z$
|
|
4473
|
-
}), m = z$
|
|
4474
|
-
type: z$
|
|
4475
|
-
name: z$
|
|
4476
|
-
message: z$
|
|
4477
|
-
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()
|
|
4478
4488
|
}), p = m.extend({
|
|
4479
|
-
cause: z$
|
|
4480
|
-
errors: z$
|
|
4481
|
-
}), s = z$
|
|
4482
|
-
const u = z$
|
|
4483
|
-
name: z$
|
|
4484
|
-
message: z$
|
|
4485
|
-
fullMessage: z$
|
|
4486
|
-
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()
|
|
4487
4497
|
}), n = u.extend({
|
|
4488
|
-
cause: z$
|
|
4489
|
-
errors: z$
|
|
4498
|
+
cause: z$2.lazy(() => n).optional(),
|
|
4499
|
+
errors: z$2.lazy(() => n.array()).optional()
|
|
4490
4500
|
});
|
|
4491
|
-
var
|
|
4492
|
-
var
|
|
4493
|
-
var
|
|
4494
|
-
function
|
|
4501
|
+
var ze = Object.defineProperty;
|
|
4502
|
+
var Ye = (t, e, n2) => e in t ? ze(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4503
|
+
var F = (t, e, n2) => Ye(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4504
|
+
function ne(t) {
|
|
4495
4505
|
return { type: "Immediate", value: t };
|
|
4496
4506
|
}
|
|
4497
|
-
function
|
|
4507
|
+
function ct() {
|
|
4498
4508
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4499
4509
|
}
|
|
4500
|
-
function
|
|
4510
|
+
function Oe(t) {
|
|
4501
4511
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4502
4512
|
return globalThis.getPlatforma(t);
|
|
4503
4513
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4504
4514
|
throw new Error("Can't get platforma instance.");
|
|
4505
4515
|
}
|
|
4506
|
-
function
|
|
4516
|
+
function dt() {
|
|
4507
4517
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4508
4518
|
}
|
|
4509
|
-
function
|
|
4519
|
+
function f() {
|
|
4510
4520
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4511
4521
|
throw new Error("Not in config rendering context");
|
|
4512
4522
|
}
|
|
4513
|
-
function
|
|
4514
|
-
const n2 =
|
|
4523
|
+
function G(t, e) {
|
|
4524
|
+
const n2 = dt();
|
|
4515
4525
|
if (n2 === void 0) return false;
|
|
4516
4526
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4517
4527
|
return n2.callbackRegistry[t] = e, true;
|
|
4518
4528
|
}
|
|
4519
|
-
const
|
|
4520
|
-
function
|
|
4521
|
-
t in
|
|
4522
|
-
for (const r of
|
|
4529
|
+
const ue = /* @__PURE__ */ new Map();
|
|
4530
|
+
function pt(t, e) {
|
|
4531
|
+
t in f().callbackRegistry || (f().callbackRegistry[t] = (n2) => {
|
|
4532
|
+
for (const r of ue.get(t))
|
|
4523
4533
|
r(n2);
|
|
4524
|
-
},
|
|
4534
|
+
}, ue.set(t, [])), ue.get(t).push(e);
|
|
4525
4535
|
}
|
|
4526
|
-
class
|
|
4536
|
+
class I {
|
|
4527
4537
|
constructor(e, n2 = (r) => r) {
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
this.handle = e, this.postProcess = n2,
|
|
4538
|
+
F(this, "isResolved", false);
|
|
4539
|
+
F(this, "resolvedValue");
|
|
4540
|
+
this.handle = e, this.postProcess = n2, pt(e, (r) => {
|
|
4531
4541
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4532
4542
|
});
|
|
4533
4543
|
}
|
|
4534
4544
|
map(e) {
|
|
4535
|
-
return new
|
|
4545
|
+
return new I(this.handle, (n2) => e(this.postProcess(n2)));
|
|
4536
4546
|
}
|
|
4537
4547
|
mapDefined(e) {
|
|
4538
|
-
return new
|
|
4548
|
+
return new I(this.handle, (n2) => {
|
|
4539
4549
|
const r = this.postProcess(n2);
|
|
4540
4550
|
return r ? e(r) : void 0;
|
|
4541
4551
|
});
|
|
@@ -4547,7 +4557,7 @@
|
|
|
4547
4557
|
function pe(t, e) {
|
|
4548
4558
|
return t === void 0 ? void 0 : e(t);
|
|
4549
4559
|
}
|
|
4550
|
-
class
|
|
4560
|
+
class E {
|
|
4551
4561
|
constructor(e, n2) {
|
|
4552
4562
|
this.handle = e, this.resolvePath = n2;
|
|
4553
4563
|
}
|
|
@@ -4587,46 +4597,46 @@
|
|
|
4587
4597
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4588
4598
|
];
|
|
4589
4599
|
return pe(
|
|
4590
|
-
|
|
4591
|
-
(i) => new
|
|
4600
|
+
f().resolveWithCommon(this.handle, e, ...n2),
|
|
4601
|
+
(i) => new E(i, r)
|
|
4592
4602
|
);
|
|
4593
4603
|
}
|
|
4594
4604
|
get resourceType() {
|
|
4595
|
-
return
|
|
4605
|
+
return f().getResourceType(this.handle);
|
|
4596
4606
|
}
|
|
4597
4607
|
getInputsLocked() {
|
|
4598
|
-
return
|
|
4608
|
+
return f().getInputsLocked(this.handle);
|
|
4599
4609
|
}
|
|
4600
4610
|
getOutputsLocked() {
|
|
4601
|
-
return
|
|
4611
|
+
return f().getOutputsLocked(this.handle);
|
|
4602
4612
|
}
|
|
4603
4613
|
getIsReadyOrError() {
|
|
4604
|
-
return
|
|
4614
|
+
return f().getIsReadyOrError(this.handle);
|
|
4605
4615
|
}
|
|
4606
4616
|
getIsFinal() {
|
|
4607
|
-
return
|
|
4617
|
+
return f().getIsFinal(this.handle);
|
|
4608
4618
|
}
|
|
4609
4619
|
getError() {
|
|
4610
4620
|
const e = [...this.resolvePath, "error"];
|
|
4611
4621
|
return pe(
|
|
4612
|
-
|
|
4613
|
-
(n2) => new
|
|
4622
|
+
f().getError(this.handle),
|
|
4623
|
+
(n2) => new E(n2, e)
|
|
4614
4624
|
);
|
|
4615
4625
|
}
|
|
4616
4626
|
listInputFields() {
|
|
4617
|
-
return
|
|
4627
|
+
return f().listInputFields(this.handle);
|
|
4618
4628
|
}
|
|
4619
4629
|
listOutputFields() {
|
|
4620
|
-
return
|
|
4630
|
+
return f().listOutputFields(this.handle);
|
|
4621
4631
|
}
|
|
4622
4632
|
listDynamicFields() {
|
|
4623
|
-
return
|
|
4633
|
+
return f().listDynamicFields(this.handle);
|
|
4624
4634
|
}
|
|
4625
4635
|
getKeyValueBase64(e) {
|
|
4626
|
-
return
|
|
4636
|
+
return f().getKeyValueBase64(this.handle, e);
|
|
4627
4637
|
}
|
|
4628
4638
|
getKeyValueAsString(e) {
|
|
4629
|
-
return
|
|
4639
|
+
return f().getKeyValueAsString(this.handle, e);
|
|
4630
4640
|
}
|
|
4631
4641
|
getKeyValueAsJson(e) {
|
|
4632
4642
|
const n2 = this.getKeyValueAsString(e);
|
|
@@ -4634,10 +4644,10 @@
|
|
|
4634
4644
|
return JSON.parse(n2);
|
|
4635
4645
|
}
|
|
4636
4646
|
getDataBase64() {
|
|
4637
|
-
return
|
|
4647
|
+
return f().getDataBase64(this.handle);
|
|
4638
4648
|
}
|
|
4639
4649
|
getDataAsString() {
|
|
4640
|
-
return
|
|
4650
|
+
return f().getDataAsString(this.handle);
|
|
4641
4651
|
}
|
|
4642
4652
|
getDataAsJson() {
|
|
4643
4653
|
const e = this.getDataAsString();
|
|
@@ -4650,7 +4660,7 @@
|
|
|
4650
4660
|
getPColumns(e = false, n2 = "") {
|
|
4651
4661
|
const r = this.parsePObjectCollection(e, n2);
|
|
4652
4662
|
return r === void 0 ? void 0 : Object.entries(r).map(([, s2]) => {
|
|
4653
|
-
if (!Z
|
|
4663
|
+
if (!Z(s2)) throw new Error(`not a PColumn (kind = ${s2.spec.kind})`);
|
|
4654
4664
|
return s2;
|
|
4655
4665
|
});
|
|
4656
4666
|
}
|
|
@@ -4658,7 +4668,7 @@
|
|
|
4658
4668
|
*
|
|
4659
4669
|
*/
|
|
4660
4670
|
parsePObjectCollection(e = false, n2 = "") {
|
|
4661
|
-
const r =
|
|
4671
|
+
const r = f().parsePObjectCollection(
|
|
4662
4672
|
this.handle,
|
|
4663
4673
|
e,
|
|
4664
4674
|
n2,
|
|
@@ -4668,19 +4678,19 @@
|
|
|
4668
4678
|
const i = {};
|
|
4669
4679
|
for (const [s2, o] of Object.entries(r)) {
|
|
4670
4680
|
const a = [...this.resolvePath, s2];
|
|
4671
|
-
i[s2] = Fn(o, (l2) => new
|
|
4681
|
+
i[s2] = Fn(o, (l2) => new E(l2, a));
|
|
4672
4682
|
}
|
|
4673
4683
|
return i;
|
|
4674
4684
|
}
|
|
4675
4685
|
getFileContentAsBase64() {
|
|
4676
|
-
return new
|
|
4686
|
+
return new I(f().getBlobContentAsBase64(this.handle));
|
|
4677
4687
|
}
|
|
4678
4688
|
getFileContentAsString() {
|
|
4679
|
-
return new
|
|
4689
|
+
return new I(f().getBlobContentAsString(this.handle));
|
|
4680
4690
|
}
|
|
4681
4691
|
getFileContentAsJson() {
|
|
4682
|
-
return new
|
|
4683
|
-
|
|
4692
|
+
return new I(
|
|
4693
|
+
f().getBlobContentAsString(this.handle)
|
|
4684
4694
|
).mapDefined((e) => JSON.parse(e));
|
|
4685
4695
|
}
|
|
4686
4696
|
/**
|
|
@@ -4699,7 +4709,7 @@
|
|
|
4699
4709
|
* @returns downloaded file handle
|
|
4700
4710
|
*/
|
|
4701
4711
|
getFileHandle() {
|
|
4702
|
-
return new
|
|
4712
|
+
return new I(f().getDownloadedBlobContentHandle(this.handle));
|
|
4703
4713
|
}
|
|
4704
4714
|
/**
|
|
4705
4715
|
* @deprecated use getFileHandle
|
|
@@ -4711,7 +4721,7 @@
|
|
|
4711
4721
|
* @returns downloaded file handle
|
|
4712
4722
|
*/
|
|
4713
4723
|
getRemoteFileHandle() {
|
|
4714
|
-
return new
|
|
4724
|
+
return new I(f().getOnDemandBlobContentHandle(this.handle));
|
|
4715
4725
|
}
|
|
4716
4726
|
/**
|
|
4717
4727
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4723,22 +4733,22 @@
|
|
|
4723
4733
|
* @returns the url to the extracted folder
|
|
4724
4734
|
*/
|
|
4725
4735
|
extractArchiveAndGetURL(e) {
|
|
4726
|
-
return new
|
|
4736
|
+
return new I(f().extractArchiveAndGetURL(this.handle, e));
|
|
4727
4737
|
}
|
|
4728
4738
|
getImportProgress() {
|
|
4729
|
-
return new
|
|
4739
|
+
return new I(f().getImportProgress(this.handle));
|
|
4730
4740
|
}
|
|
4731
4741
|
getLastLogs(e) {
|
|
4732
|
-
return new
|
|
4742
|
+
return new I(f().getLastLogs(this.handle, e));
|
|
4733
4743
|
}
|
|
4734
4744
|
getProgressLog(e) {
|
|
4735
|
-
return new
|
|
4745
|
+
return new I(f().getProgressLog(this.handle, e));
|
|
4736
4746
|
}
|
|
4737
4747
|
getProgressLogWithInfo(e) {
|
|
4738
|
-
return new
|
|
4748
|
+
return new I(f().getProgressLogWithInfo(this.handle, e));
|
|
4739
4749
|
}
|
|
4740
4750
|
getLogHandle() {
|
|
4741
|
-
return new
|
|
4751
|
+
return new I(f().getLogHandle(this.handle));
|
|
4742
4752
|
}
|
|
4743
4753
|
allFieldsResolved(e = "Input") {
|
|
4744
4754
|
switch (e) {
|
|
@@ -4767,131 +4777,132 @@
|
|
|
4767
4777
|
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, p2]) => o(u2, p2));
|
|
4768
4778
|
}
|
|
4769
4779
|
}
|
|
4770
|
-
const
|
|
4771
|
-
const
|
|
4772
|
-
type: z$
|
|
4773
|
-
importance: z$
|
|
4774
|
-
id: z$
|
|
4775
|
-
label: z$
|
|
4776
|
-
}),
|
|
4777
|
-
function
|
|
4778
|
-
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(),
|
|
4779
|
-
var
|
|
4780
|
-
const
|
|
4781
|
-
let
|
|
4782
|
-
"spec" in
|
|
4783
|
-
const b = (
|
|
4784
|
-
...
|
|
4785
|
-
...
|
|
4786
|
-
...
|
|
4780
|
+
const Re = "staging", ke = "main";
|
|
4781
|
+
const gt = "pl7.app/label", mt = "pl7.app/trace", yt = 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
|
+
}), vt = z$2.array(yt), bt = 1e-3, wt = "__LABEL__", Ce = "__LABEL__@1";
|
|
4787
|
+
function Ve(t, e, n2 = {}) {
|
|
4788
|
+
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((g) => {
|
|
4789
|
+
var S, R;
|
|
4790
|
+
const m2 = e(g);
|
|
4791
|
+
let c2, y, d;
|
|
4792
|
+
"spec" in m2 && typeof m2.spec == "object" ? (c2 = m2.spec, y = m2.prefixTrace, d = m2.suffixTrace) : c2 = m2;
|
|
4793
|
+
const b = (S = c2.annotations) == null ? void 0 : S[gt], A2 = (R = c2.annotations) == null ? void 0 : R[mt], v = (A2 ? vt.safeParse(JSON.parse(A2)).data : void 0) ?? [], P = [
|
|
4794
|
+
...y ?? [],
|
|
4795
|
+
...v,
|
|
4796
|
+
...d ?? []
|
|
4787
4797
|
];
|
|
4788
|
-
if (b) {
|
|
4789
|
-
const
|
|
4790
|
-
n2.addLabelAsSuffix ?
|
|
4791
|
-
}
|
|
4792
|
-
const
|
|
4793
|
-
for (let
|
|
4794
|
-
const { type:
|
|
4795
|
-
|
|
4796
|
-
const
|
|
4797
|
-
|
|
4798
|
-
|
|
4798
|
+
if (b !== void 0) {
|
|
4799
|
+
const D2 = { label: b, type: wt, importance: -2 };
|
|
4800
|
+
n2.addLabelAsSuffix ? P.push(D2) : P.splice(0, 0, D2);
|
|
4801
|
+
}
|
|
4802
|
+
const x2 = [], T = /* @__PURE__ */ new Map();
|
|
4803
|
+
for (let D2 = P.length - 1; D2 >= 0; --D2) {
|
|
4804
|
+
const { type: M } = P[D2], j = P[D2].importance ?? 0, $2 = (T.get(M) ?? 0) + 1;
|
|
4805
|
+
T.set(M, $2);
|
|
4806
|
+
const k2 = `${M}@${$2}`;
|
|
4807
|
+
s2.set(k2, (s2.get(k2) ?? 0) + 1), r.set(
|
|
4808
|
+
k2,
|
|
4799
4809
|
Math.max(
|
|
4800
|
-
r.get(
|
|
4801
|
-
|
|
4810
|
+
r.get(k2) ?? Number.NEGATIVE_INFINITY,
|
|
4811
|
+
j - (P.length - D2) * bt
|
|
4802
4812
|
)
|
|
4803
|
-
),
|
|
4813
|
+
), x2.push({ ...P[D2], fullType: k2, occurrenceIndex: $2 });
|
|
4804
4814
|
}
|
|
4805
|
-
return
|
|
4806
|
-
value:
|
|
4807
|
-
spec:
|
|
4815
|
+
return x2.reverse(), {
|
|
4816
|
+
value: g,
|
|
4817
|
+
spec: c2,
|
|
4808
4818
|
label: b,
|
|
4809
|
-
fullTrace:
|
|
4819
|
+
fullTrace: x2
|
|
4810
4820
|
};
|
|
4811
|
-
}),
|
|
4812
|
-
|
|
4813
|
-
for (const [
|
|
4814
|
-
|
|
4815
|
-
const
|
|
4816
|
-
const
|
|
4817
|
-
for (let
|
|
4818
|
-
const
|
|
4819
|
-
if (
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4821
|
+
}), a = [], l2 = [], u2 = [...r];
|
|
4822
|
+
u2.sort(([, g], [, m2]) => m2 - g);
|
|
4823
|
+
for (const [g] of u2)
|
|
4824
|
+
g.endsWith("@1") || s2.get(g) === t.length ? a.push(g) : l2.push(g);
|
|
4825
|
+
const p2 = (g, m2 = false) => {
|
|
4826
|
+
const c2 = [];
|
|
4827
|
+
for (let y = 0; y < o.length; y++) {
|
|
4828
|
+
const d = o[y], b = d.fullTrace.filter((P) => g.has(P.fullType) || i && i.has(P.type));
|
|
4829
|
+
if (b.length === 0)
|
|
4830
|
+
if (m2)
|
|
4831
|
+
c2.push({
|
|
4832
|
+
label: "Unlabeled",
|
|
4833
|
+
value: d.value
|
|
4834
|
+
});
|
|
4835
|
+
else return;
|
|
4836
|
+
const A2 = b.map((P) => P.label), v = n2.separator ?? " / ";
|
|
4837
|
+
c2.push({
|
|
4838
|
+
label: A2.join(v),
|
|
4839
|
+
value: d.value
|
|
4825
4840
|
});
|
|
4826
4841
|
}
|
|
4827
|
-
return
|
|
4842
|
+
return c2;
|
|
4828
4843
|
};
|
|
4829
|
-
if (
|
|
4830
|
-
if (
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
return d;
|
|
4848
|
-
}
|
|
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";
|
|
4850
|
-
const fe = (t) => {
|
|
4844
|
+
if (a.length === 0) {
|
|
4845
|
+
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4846
|
+
return p2(new Set(Ce), true);
|
|
4847
|
+
}
|
|
4848
|
+
let h2 = 0, w2 = -1;
|
|
4849
|
+
for (; h2 < a.length; ) {
|
|
4850
|
+
const g = /* @__PURE__ */ new Set();
|
|
4851
|
+
n2.includeNativeLabel && g.add(Ce);
|
|
4852
|
+
for (let c2 = 0; c2 < h2; ++c2) g.add(a[c2]);
|
|
4853
|
+
w2 >= 0 && g.add(a[w2]);
|
|
4854
|
+
const m2 = p2(g);
|
|
4855
|
+
if (m2 !== void 0 && new Set(m2.map((c2) => c2.label)).size === t.length) return m2;
|
|
4856
|
+
w2++, w2 >= a.length && (h2++, w2 = h2);
|
|
4857
|
+
}
|
|
4858
|
+
return p2(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
4859
|
+
}
|
|
4860
|
+
const Q = "PColumnData/", se = Q + "ResourceMap", oe = Q + "Partitioned/ResourceMap", H = Q + "JsonPartitioned", B = Q + "BinaryPartitioned", Ke = Q + "Partitioned/", ae = Ke + "JsonPartitioned", q = Ke + "BinaryPartitioned";
|
|
4861
|
+
const he = (t) => {
|
|
4851
4862
|
if (t.endsWith(".index"))
|
|
4852
4863
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4853
4864
|
if (t.endsWith(".values"))
|
|
4854
4865
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4855
4866
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4856
4867
|
};
|
|
4857
|
-
function
|
|
4868
|
+
function At(t) {
|
|
4858
4869
|
if (!t) return;
|
|
4859
4870
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4860
4871
|
let i = 0;
|
|
4861
4872
|
switch (e) {
|
|
4862
|
-
case
|
|
4873
|
+
case se:
|
|
4863
4874
|
i = n2.keyLength;
|
|
4864
4875
|
break;
|
|
4865
|
-
case
|
|
4876
|
+
case oe:
|
|
4866
4877
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4867
4878
|
break;
|
|
4868
|
-
case
|
|
4869
|
-
case
|
|
4879
|
+
case H:
|
|
4880
|
+
case B:
|
|
4870
4881
|
i = n2.partitionKeyLength;
|
|
4871
4882
|
break;
|
|
4872
|
-
case
|
|
4873
|
-
case
|
|
4883
|
+
case q:
|
|
4884
|
+
case ae:
|
|
4874
4885
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4875
4886
|
break;
|
|
4876
4887
|
}
|
|
4877
4888
|
switch (e) {
|
|
4878
|
-
case
|
|
4879
|
-
case
|
|
4880
|
-
case
|
|
4889
|
+
case se:
|
|
4890
|
+
case H:
|
|
4891
|
+
case B:
|
|
4881
4892
|
for (let s2 of t.listInputFields()) {
|
|
4882
|
-
e ===
|
|
4893
|
+
e === B && (s2 = he(s2).baseKey);
|
|
4883
4894
|
const o = [...JSON.parse(s2)];
|
|
4884
4895
|
r.push(o);
|
|
4885
4896
|
}
|
|
4886
4897
|
break;
|
|
4887
|
-
case
|
|
4888
|
-
case
|
|
4889
|
-
case
|
|
4898
|
+
case oe:
|
|
4899
|
+
case q:
|
|
4900
|
+
case ae:
|
|
4890
4901
|
for (const s2 of t.listInputFields()) {
|
|
4891
4902
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4892
4903
|
if (a !== void 0)
|
|
4893
4904
|
for (let l2 of a.listInputFields()) {
|
|
4894
|
-
e ===
|
|
4905
|
+
e === q && (l2 = he(l2).baseKey);
|
|
4895
4906
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4896
4907
|
r.push(u2);
|
|
4897
4908
|
}
|
|
@@ -4900,7 +4911,7 @@
|
|
|
4900
4911
|
}
|
|
4901
4912
|
return { data: r, keyLength: i };
|
|
4902
4913
|
}
|
|
4903
|
-
function
|
|
4914
|
+
function xt(t) {
|
|
4904
4915
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4905
4916
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4906
4917
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4919,11 +4930,11 @@
|
|
|
4919
4930
|
}
|
|
4920
4931
|
return r.map((i) => Array.from(i.values()));
|
|
4921
4932
|
}
|
|
4922
|
-
function
|
|
4933
|
+
function Pt(t) {
|
|
4923
4934
|
if (t === void 0) return;
|
|
4924
|
-
if (
|
|
4925
|
-
return
|
|
4926
|
-
const e =
|
|
4935
|
+
if (F$1(t))
|
|
4936
|
+
return xt(t);
|
|
4937
|
+
const e = At(t);
|
|
4927
4938
|
if (!e) return;
|
|
4928
4939
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4929
4940
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4936,16 +4947,16 @@
|
|
|
4936
4947
|
}
|
|
4937
4948
|
return i.map((s2) => Array.from(s2.values()));
|
|
4938
4949
|
}
|
|
4939
|
-
function
|
|
4950
|
+
function ge(t, e = []) {
|
|
4940
4951
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4941
4952
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4942
|
-
if (e.length > 0 && (n2 ===
|
|
4953
|
+
if (e.length > 0 && (n2 === ae || n2 === q))
|
|
4943
4954
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4944
4955
|
switch (n2) {
|
|
4945
|
-
case
|
|
4946
|
-
case
|
|
4956
|
+
case se:
|
|
4957
|
+
case oe:
|
|
4947
4958
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4948
|
-
case
|
|
4959
|
+
case H: {
|
|
4949
4960
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4950
4961
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4951
4962
|
const i = [];
|
|
@@ -4961,12 +4972,12 @@
|
|
|
4961
4972
|
parts: i
|
|
4962
4973
|
};
|
|
4963
4974
|
}
|
|
4964
|
-
case
|
|
4975
|
+
case B: {
|
|
4965
4976
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4966
4977
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
4967
4978
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
4968
4979
|
for (const o of t.listInputFields()) {
|
|
4969
|
-
const a =
|
|
4980
|
+
const a = he(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4970
4981
|
if (l2 === void 0) return;
|
|
4971
4982
|
let u2 = s2.get(a.baseKey);
|
|
4972
4983
|
u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
|
|
@@ -4988,16 +4999,16 @@
|
|
|
4988
4999
|
parts: i
|
|
4989
5000
|
};
|
|
4990
5001
|
}
|
|
4991
|
-
case
|
|
5002
|
+
case ae: {
|
|
4992
5003
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4993
5004
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
4994
5005
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
4995
5006
|
for (const o of t.listInputFields()) {
|
|
4996
5007
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4997
5008
|
if (a === void 0) return;
|
|
4998
|
-
if (a.resourceType.name !==
|
|
4999
|
-
throw new Error(`Expected ${
|
|
5000
|
-
const l2 =
|
|
5009
|
+
if (a.resourceType.name !== H)
|
|
5010
|
+
throw new Error(`Expected ${H} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5011
|
+
const l2 = ge(a, JSON.parse(o));
|
|
5001
5012
|
if (l2 === void 0) return;
|
|
5002
5013
|
if (l2.type !== "JsonPartitioned")
|
|
5003
5014
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5009,16 +5020,16 @@
|
|
|
5009
5020
|
parts: s2
|
|
5010
5021
|
};
|
|
5011
5022
|
}
|
|
5012
|
-
case
|
|
5023
|
+
case q: {
|
|
5013
5024
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5014
5025
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5015
5026
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
5016
5027
|
for (const o of t.listInputFields()) {
|
|
5017
5028
|
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5018
5029
|
if (a === void 0) return;
|
|
5019
|
-
if (a.resourceType.name !==
|
|
5020
|
-
throw new Error(`Expected ${
|
|
5021
|
-
const l2 =
|
|
5030
|
+
if (a.resourceType.name !== B)
|
|
5031
|
+
throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5032
|
+
const l2 = ge(a, JSON.parse(o));
|
|
5022
5033
|
if (l2 === void 0) return;
|
|
5023
5034
|
if (l2.type !== "BinaryPartitioned")
|
|
5024
5035
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5034,15 +5045,15 @@
|
|
|
5034
5045
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5035
5046
|
}
|
|
5036
5047
|
}
|
|
5037
|
-
function
|
|
5048
|
+
function Ct(t) {
|
|
5038
5049
|
if (t !== void 0) {
|
|
5039
|
-
if (
|
|
5040
|
-
if (
|
|
5041
|
-
if (t instanceof
|
|
5050
|
+
if (F$1(t)) return t;
|
|
5051
|
+
if (pn(t)) return hn(t);
|
|
5052
|
+
if (t instanceof E) return ge(t);
|
|
5042
5053
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5043
5054
|
}
|
|
5044
5055
|
}
|
|
5045
|
-
function
|
|
5056
|
+
function St(t, e) {
|
|
5046
5057
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5047
5058
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5048
5059
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5102,7 +5113,7 @@
|
|
|
5102
5113
|
}
|
|
5103
5114
|
}
|
|
5104
5115
|
}
|
|
5105
|
-
class
|
|
5116
|
+
class _t {
|
|
5106
5117
|
constructor(e) {
|
|
5107
5118
|
this.columns = e;
|
|
5108
5119
|
}
|
|
@@ -5111,7 +5122,7 @@
|
|
|
5111
5122
|
return this.columns.filter((r) => n2(r.spec));
|
|
5112
5123
|
}
|
|
5113
5124
|
}
|
|
5114
|
-
function
|
|
5125
|
+
function It(t) {
|
|
5115
5126
|
if (t)
|
|
5116
5127
|
return t.map((e) => ({
|
|
5117
5128
|
type: `split:${Jn(e.axisId)}`,
|
|
@@ -5120,21 +5131,21 @@
|
|
|
5120
5131
|
// High importance for split filters in labels
|
|
5121
5132
|
}));
|
|
5122
5133
|
}
|
|
5123
|
-
function
|
|
5134
|
+
function Tt(t) {
|
|
5124
5135
|
if (t)
|
|
5125
5136
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5126
5137
|
}
|
|
5127
|
-
function
|
|
5138
|
+
function Lt(t, e) {
|
|
5128
5139
|
if (!e || e.length === 0) return t;
|
|
5129
5140
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5130
|
-
return
|
|
5141
|
+
return De({ id: t, axisFilters: n2 });
|
|
5131
5142
|
}
|
|
5132
|
-
function
|
|
5143
|
+
function Se(t) {
|
|
5133
5144
|
if (!t || typeof t != "object") return false;
|
|
5134
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);
|
|
5135
5146
|
return !!e.domainAnchor || n2 || r;
|
|
5136
5147
|
}
|
|
5137
|
-
function
|
|
5148
|
+
function Et(t) {
|
|
5138
5149
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5139
5150
|
return [];
|
|
5140
5151
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5142,11 +5153,11 @@
|
|
|
5142
5153
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
5143
5154
|
return e.sort((n2, r) => n2 - r), e;
|
|
5144
5155
|
}
|
|
5145
|
-
class
|
|
5156
|
+
class me {
|
|
5146
5157
|
constructor() {
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5158
|
+
F(this, "defaultProviderStore", []);
|
|
5159
|
+
F(this, "providers", [new _t(this.defaultProviderStore)]);
|
|
5160
|
+
F(this, "axisLabelProviders", []);
|
|
5150
5161
|
}
|
|
5151
5162
|
addColumnProvider(e) {
|
|
5152
5163
|
return this.providers.push(e), this;
|
|
@@ -5168,117 +5179,133 @@
|
|
|
5168
5179
|
}
|
|
5169
5180
|
}
|
|
5170
5181
|
getUniversalEntries(e, n2) {
|
|
5171
|
-
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false } = n2 ?? {},
|
|
5182
|
+
const { anchorCtx: r, labelOps: i, dontWaitAllData: s2 = false, overrideLabelAnnotation: o = false, exclude: a } = n2 ?? {}, l2 = {
|
|
5172
5183
|
...o && (i == null ? void 0 : i.includeNativeLabel) !== false ? { includeNativeLabel: true } : {},
|
|
5173
5184
|
...i ?? {}
|
|
5174
|
-
}
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5185
|
+
};
|
|
5186
|
+
let u2 = () => false;
|
|
5187
|
+
if (a) {
|
|
5188
|
+
const c2 = (Array.isArray(a) ? a : [a]).map((y) => {
|
|
5189
|
+
if (Se(y)) {
|
|
5190
|
+
if (!r)
|
|
5191
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5192
|
+
return Kn(Dn(r.anchors, y, n2));
|
|
5193
|
+
} else
|
|
5194
|
+
return Kn(y);
|
|
5195
|
+
});
|
|
5196
|
+
u2 = (y) => c2.some((d) => d(y));
|
|
5197
|
+
}
|
|
5198
|
+
const p2 = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], h2 = [], w2 = /* @__PURE__ */ new Set();
|
|
5199
|
+
for (const c2 of p2) {
|
|
5200
|
+
const y = Se(c2);
|
|
5201
|
+
let d;
|
|
5202
|
+
if (y) {
|
|
5179
5203
|
if (!r)
|
|
5180
5204
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5181
|
-
|
|
5205
|
+
d = Dn(r.anchors, c2, n2);
|
|
5182
5206
|
} else
|
|
5183
|
-
|
|
5184
|
-
const
|
|
5185
|
-
for (const
|
|
5186
|
-
const
|
|
5187
|
-
for (const
|
|
5188
|
-
if (
|
|
5189
|
-
|
|
5207
|
+
d = c2;
|
|
5208
|
+
const b = /* @__PURE__ */ new Set(), A2 = [];
|
|
5209
|
+
for (const x2 of this.providers) {
|
|
5210
|
+
const T = x2.selectColumns(d);
|
|
5211
|
+
for (const S of T) {
|
|
5212
|
+
if (u2(S.spec)) continue;
|
|
5213
|
+
if (b.has(S.id))
|
|
5214
|
+
throw new Error(`Duplicate column id ${S.id} in provider ${x2.constructor.name}`);
|
|
5215
|
+
const R = Rn(S.spec);
|
|
5216
|
+
w2.has(R) || (b.add(S.id), w2.add(R), A2.push(S));
|
|
5190
5217
|
}
|
|
5191
5218
|
}
|
|
5192
|
-
if (
|
|
5193
|
-
const
|
|
5194
|
-
for (const
|
|
5195
|
-
if (!f(
|
|
5196
|
-
const
|
|
5197
|
-
if (
|
|
5198
|
-
const
|
|
5199
|
-
if (!
|
|
5219
|
+
if (A2.length === 0) continue;
|
|
5220
|
+
const v = Et(c2), P = v.length > 0;
|
|
5221
|
+
for (const x2 of A2) {
|
|
5222
|
+
if (!f$1(x2.spec)) continue;
|
|
5223
|
+
const T = x2.spec;
|
|
5224
|
+
if (P) {
|
|
5225
|
+
const S = Ct(x2.data);
|
|
5226
|
+
if (!S) {
|
|
5200
5227
|
if (s2) continue;
|
|
5201
5228
|
return;
|
|
5202
5229
|
}
|
|
5203
|
-
if (!yn(
|
|
5204
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${
|
|
5205
|
-
const
|
|
5206
|
-
if (
|
|
5207
|
-
throw new Error(`Not enough partition keys (${
|
|
5208
|
-
const
|
|
5209
|
-
if (
|
|
5210
|
-
if (
|
|
5230
|
+
if (!yn(S))
|
|
5231
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${S.type} for column ${x2.id}`);
|
|
5232
|
+
const R = Pt(S), D2 = v[v.length - 1];
|
|
5233
|
+
if (D2 >= S.partitionKeyLength)
|
|
5234
|
+
throw new Error(`Not enough partition keys (${S.partitionKeyLength}) for requested split axes (max index ${D2}) in column ${T.name}`);
|
|
5235
|
+
const M = v.map((_) => this.findLabels(p$1(T.axesSpec[_]))), j = [], $2 = (_, W) => {
|
|
5236
|
+
if (W >= v.length) {
|
|
5237
|
+
if (j.push([..._]), j.length > 1e4)
|
|
5211
5238
|
throw new Error("Too many key combinations, aborting.");
|
|
5212
5239
|
return;
|
|
5213
5240
|
}
|
|
5214
|
-
const
|
|
5215
|
-
if (
|
|
5216
|
-
throw new Error(`Axis index ${
|
|
5217
|
-
const
|
|
5218
|
-
if (!
|
|
5219
|
-
|
|
5241
|
+
const V = v[W];
|
|
5242
|
+
if (V >= R.length)
|
|
5243
|
+
throw new Error(`Axis index ${V} out of bounds for unique keys array (length ${R.length}) during split key generation for column ${x2.id}`);
|
|
5244
|
+
const J = R[V];
|
|
5245
|
+
if (!J || J.length === 0) {
|
|
5246
|
+
j.length = 0;
|
|
5220
5247
|
return;
|
|
5221
5248
|
}
|
|
5222
|
-
for (const
|
|
5223
|
-
|
|
5249
|
+
for (const Z2 of J)
|
|
5250
|
+
_.push(Z2), $2(_, W + 1), _.pop();
|
|
5224
5251
|
};
|
|
5225
|
-
if (
|
|
5252
|
+
if ($2([], 0), j.length === 0)
|
|
5226
5253
|
continue;
|
|
5227
|
-
const k2 = [...
|
|
5228
|
-
for (let
|
|
5229
|
-
k2.splice(
|
|
5230
|
-
const
|
|
5231
|
-
for (const
|
|
5232
|
-
const
|
|
5233
|
-
const
|
|
5234
|
-
return { axisIdx:
|
|
5254
|
+
const k2 = [...T.axesSpec], We = v.map((_) => _);
|
|
5255
|
+
for (let _ = v.length - 1; _ >= 0; _--)
|
|
5256
|
+
k2.splice(v[_], 1);
|
|
5257
|
+
const Ge = { ...T, axesSpec: k2 };
|
|
5258
|
+
for (const _ of j) {
|
|
5259
|
+
const W = _.map((V, J) => {
|
|
5260
|
+
const Z2 = We[J], He = p$1(T.axesSpec[Z2]), le = M[J], qe = (le == null ? void 0 : le[V]) ?? String(V);
|
|
5261
|
+
return { axisIdx: Z2, axisId: He, value: V, label: qe };
|
|
5235
5262
|
});
|
|
5236
|
-
|
|
5263
|
+
h2.push({
|
|
5237
5264
|
type: "split",
|
|
5238
|
-
originalColumn:
|
|
5239
|
-
spec:
|
|
5240
|
-
adjustedSpec:
|
|
5241
|
-
dataEntries:
|
|
5242
|
-
axisFilters:
|
|
5265
|
+
originalColumn: x2,
|
|
5266
|
+
spec: T,
|
|
5267
|
+
adjustedSpec: Ge,
|
|
5268
|
+
dataEntries: S,
|
|
5269
|
+
axisFilters: W
|
|
5243
5270
|
});
|
|
5244
5271
|
}
|
|
5245
5272
|
} else
|
|
5246
|
-
|
|
5273
|
+
h2.push({
|
|
5247
5274
|
type: "direct",
|
|
5248
|
-
originalColumn:
|
|
5249
|
-
spec:
|
|
5250
|
-
adjustedSpec:
|
|
5275
|
+
originalColumn: x2,
|
|
5276
|
+
spec: T,
|
|
5277
|
+
adjustedSpec: T
|
|
5251
5278
|
});
|
|
5252
5279
|
}
|
|
5253
5280
|
}
|
|
5254
|
-
if (
|
|
5255
|
-
const
|
|
5256
|
-
|
|
5257
|
-
(
|
|
5258
|
-
spec:
|
|
5259
|
-
suffixTrace:
|
|
5281
|
+
if (h2.length === 0) return [];
|
|
5282
|
+
const g = Ve(
|
|
5283
|
+
h2,
|
|
5284
|
+
(c2) => ({
|
|
5285
|
+
spec: c2.spec,
|
|
5286
|
+
suffixTrace: c2.type === "split" ? It(c2.axisFilters) : void 0
|
|
5260
5287
|
}),
|
|
5261
|
-
|
|
5262
|
-
),
|
|
5263
|
-
for (const { value:
|
|
5264
|
-
const { originalColumn:
|
|
5265
|
-
let
|
|
5266
|
-
r ?
|
|
5267
|
-
let
|
|
5268
|
-
o && (
|
|
5269
|
-
...
|
|
5288
|
+
l2
|
|
5289
|
+
), m2 = [];
|
|
5290
|
+
for (const { value: c2, label: y } of g) {
|
|
5291
|
+
const { originalColumn: d, spec: b } = c2, A2 = c2.type === "split" ? c2.axisFilters : void 0, v = Tt(A2);
|
|
5292
|
+
let P;
|
|
5293
|
+
r ? P = r.deriveS(b, v) : P = Lt(d.id, v);
|
|
5294
|
+
let x2 = { ...c2.adjustedSpec };
|
|
5295
|
+
o && (x2 = {
|
|
5296
|
+
...x2,
|
|
5270
5297
|
annotations: {
|
|
5271
|
-
...
|
|
5272
|
-
"pl7.app/label":
|
|
5298
|
+
...x2.annotations ?? {},
|
|
5299
|
+
"pl7.app/label": y
|
|
5273
5300
|
}
|
|
5274
|
-
}),
|
|
5275
|
-
id:
|
|
5276
|
-
spec:
|
|
5277
|
-
data: () =>
|
|
5278
|
-
label:
|
|
5301
|
+
}), m2.push({
|
|
5302
|
+
id: P,
|
|
5303
|
+
spec: x2,
|
|
5304
|
+
data: () => c2.type === "split" ? gn(St(c2.dataEntries, v)) : c2.originalColumn.data,
|
|
5305
|
+
label: y
|
|
5279
5306
|
});
|
|
5280
5307
|
}
|
|
5281
|
-
return
|
|
5308
|
+
return m2;
|
|
5282
5309
|
}
|
|
5283
5310
|
getColumns(e, n2) {
|
|
5284
5311
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5303,19 +5330,19 @@
|
|
|
5303
5330
|
return i;
|
|
5304
5331
|
}
|
|
5305
5332
|
}
|
|
5306
|
-
function
|
|
5333
|
+
function ce(t, e) {
|
|
5307
5334
|
if (t === void 0) return e === void 0;
|
|
5308
5335
|
if (e === void 0) return true;
|
|
5309
5336
|
for (const n2 in e)
|
|
5310
5337
|
if (t[n2] !== e[n2]) return false;
|
|
5311
5338
|
return true;
|
|
5312
5339
|
}
|
|
5313
|
-
function
|
|
5314
|
-
return Fn(t, (e) => e instanceof
|
|
5340
|
+
function _e(t) {
|
|
5341
|
+
return Fn(t, (e) => e instanceof E ? e.handle : pn(e) ? ln(e, (n2) => n2.handle) : e);
|
|
5315
5342
|
}
|
|
5316
|
-
class
|
|
5343
|
+
class Dt {
|
|
5317
5344
|
constructor() {
|
|
5318
|
-
|
|
5345
|
+
F(this, "ctx", f());
|
|
5319
5346
|
}
|
|
5320
5347
|
/**
|
|
5321
5348
|
* @deprecated use getOptions()
|
|
@@ -5326,16 +5353,16 @@
|
|
|
5326
5353
|
getOptions(e, n2) {
|
|
5327
5354
|
const r = typeof e == "function" ? e : Kn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5328
5355
|
let s2 = {}, o = false;
|
|
5329
|
-
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" ?
|
|
5330
|
-
ref:
|
|
5356
|
+
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? Ve(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5357
|
+
ref: Hn(a, o),
|
|
5331
5358
|
label: l2
|
|
5332
5359
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5333
|
-
ref:
|
|
5360
|
+
ref: Hn(a, o),
|
|
5334
5361
|
label: s2(l2, a)
|
|
5335
5362
|
}));
|
|
5336
5363
|
}
|
|
5337
5364
|
resolveAnchorCtx(e) {
|
|
5338
|
-
if (e instanceof
|
|
5365
|
+
if (e instanceof $n) return e;
|
|
5339
5366
|
const n2 = {};
|
|
5340
5367
|
for (const [r, i] of Object.entries(e))
|
|
5341
5368
|
if (Mn(i)) {
|
|
@@ -5345,7 +5372,7 @@
|
|
|
5345
5372
|
n2[r] = s2;
|
|
5346
5373
|
} else
|
|
5347
5374
|
n2[r] = i;
|
|
5348
|
-
return new
|
|
5375
|
+
return new $n(n2);
|
|
5349
5376
|
}
|
|
5350
5377
|
/**
|
|
5351
5378
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5358,7 +5385,7 @@
|
|
|
5358
5385
|
getAnchoredPColumns(e, n2, r) {
|
|
5359
5386
|
const i = this.resolveAnchorCtx(e);
|
|
5360
5387
|
if (i)
|
|
5361
|
-
return new
|
|
5388
|
+
return new me().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
|
|
5362
5389
|
...r,
|
|
5363
5390
|
anchorCtx: i
|
|
5364
5391
|
});
|
|
@@ -5395,7 +5422,7 @@
|
|
|
5395
5422
|
getCanonicalOptions(e, n2, r) {
|
|
5396
5423
|
const i = this.resolveAnchorCtx(e);
|
|
5397
5424
|
if (!i) return;
|
|
5398
|
-
const s2 = new
|
|
5425
|
+
const s2 = new me().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
|
|
5399
5426
|
...r,
|
|
5400
5427
|
anchorCtx: i
|
|
5401
5428
|
});
|
|
@@ -5419,7 +5446,7 @@
|
|
|
5419
5446
|
ref: n2.ref,
|
|
5420
5447
|
obj: {
|
|
5421
5448
|
...n2.obj,
|
|
5422
|
-
data: new
|
|
5449
|
+
data: new E(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5423
5450
|
}
|
|
5424
5451
|
}))
|
|
5425
5452
|
};
|
|
@@ -5438,9 +5465,9 @@
|
|
|
5438
5465
|
ref: n2.ref,
|
|
5439
5466
|
obj: {
|
|
5440
5467
|
...n2.obj,
|
|
5441
|
-
data:
|
|
5468
|
+
data: Wn(
|
|
5442
5469
|
n2.obj.data,
|
|
5443
|
-
(r) => new
|
|
5470
|
+
(r) => new E(r, [n2.ref.blockId, n2.ref.name])
|
|
5444
5471
|
)
|
|
5445
5472
|
}
|
|
5446
5473
|
}))
|
|
@@ -5469,7 +5496,7 @@
|
|
|
5469
5496
|
if (n2)
|
|
5470
5497
|
return Fn(
|
|
5471
5498
|
n2,
|
|
5472
|
-
(i) => new
|
|
5499
|
+
(i) => new E(i, [e.blockId, e.name])
|
|
5473
5500
|
);
|
|
5474
5501
|
}
|
|
5475
5502
|
/**
|
|
@@ -5490,7 +5517,7 @@
|
|
|
5490
5517
|
getPColumnSpecByRef(e) {
|
|
5491
5518
|
const n2 = this.getSpecByRef(e);
|
|
5492
5519
|
if (n2) {
|
|
5493
|
-
if (!f(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
|
|
5520
|
+
if (!f$1(n2)) throw new Error(`not a PColumn spec (kind = ${n2.kind})`);
|
|
5494
5521
|
return n2;
|
|
5495
5522
|
}
|
|
5496
5523
|
}
|
|
@@ -5509,13 +5536,13 @@
|
|
|
5509
5536
|
findDataWithCompatibleSpec(e) {
|
|
5510
5537
|
const n2 = [];
|
|
5511
5538
|
e: for (const r of this.getData().entries) {
|
|
5512
|
-
if (!f(r.obj.spec))
|
|
5539
|
+
if (!f$1(r.obj.spec))
|
|
5513
5540
|
continue;
|
|
5514
5541
|
const i = r.obj.spec;
|
|
5515
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
5542
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && ce(e.domain, i.domain)) {
|
|
5516
5543
|
for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
|
|
5517
5544
|
const o = e.axesSpec[s2], a = i.axesSpec[s2];
|
|
5518
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
5545
|
+
if (o.name !== a.name || o.type !== a.type || !ce(o.domain, a.domain))
|
|
5519
5546
|
continue e;
|
|
5520
5547
|
}
|
|
5521
5548
|
n2.push(r.obj);
|
|
@@ -5530,9 +5557,9 @@
|
|
|
5530
5557
|
findLabels(e) {
|
|
5531
5558
|
const n2 = this.getData();
|
|
5532
5559
|
for (const r of n2.entries) {
|
|
5533
|
-
if (!Z
|
|
5560
|
+
if (!Z(r.obj)) continue;
|
|
5534
5561
|
const i = r.obj.spec;
|
|
5535
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
5562
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && ce(e.domain, i.axesSpec[0].domain)) {
|
|
5536
5563
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
5537
5564
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
5538
5565
|
return Object.fromEntries(
|
|
@@ -5552,12 +5579,12 @@
|
|
|
5552
5579
|
*/
|
|
5553
5580
|
selectColumns(e) {
|
|
5554
5581
|
const n2 = typeof e == "function" ? e : Kn(e);
|
|
5555
|
-
return this.getSpecs().entries.filter(({ obj: i }) => f(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5582
|
+
return this.getSpecs().entries.filter(({ obj: i }) => f$1(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5556
5583
|
const o = s2;
|
|
5557
5584
|
let a = null;
|
|
5558
5585
|
const l2 = this;
|
|
5559
5586
|
return {
|
|
5560
|
-
id:
|
|
5587
|
+
id: De(i),
|
|
5561
5588
|
spec: o,
|
|
5562
5589
|
get data() {
|
|
5563
5590
|
var u2;
|
|
@@ -5582,14 +5609,14 @@
|
|
|
5582
5609
|
return r;
|
|
5583
5610
|
}
|
|
5584
5611
|
}
|
|
5585
|
-
class
|
|
5612
|
+
class ee {
|
|
5586
5613
|
constructor() {
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
this.ctx =
|
|
5614
|
+
F(this, "ctx");
|
|
5615
|
+
F(this, "args");
|
|
5616
|
+
F(this, "uiState");
|
|
5617
|
+
F(this, "_activeArgsCache");
|
|
5618
|
+
F(this, "resultPool", new Dt());
|
|
5619
|
+
this.ctx = f(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
5593
5620
|
}
|
|
5594
5621
|
/**
|
|
5595
5622
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -5607,14 +5634,14 @@
|
|
|
5607
5634
|
getNamedAccessor(e) {
|
|
5608
5635
|
return pe(
|
|
5609
5636
|
this.ctx.getAccessorHandleByName(e),
|
|
5610
|
-
(n2) => new
|
|
5637
|
+
(n2) => new E(n2, [e])
|
|
5611
5638
|
);
|
|
5612
5639
|
}
|
|
5613
5640
|
get prerun() {
|
|
5614
|
-
return this.getNamedAccessor(
|
|
5641
|
+
return this.getNamedAccessor(Re);
|
|
5615
5642
|
}
|
|
5616
5643
|
get outputs() {
|
|
5617
|
-
return this.getNamedAccessor(
|
|
5644
|
+
return this.getNamedAccessor(ke);
|
|
5618
5645
|
}
|
|
5619
5646
|
/**
|
|
5620
5647
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5626,13 +5653,13 @@
|
|
|
5626
5653
|
}
|
|
5627
5654
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5628
5655
|
var i;
|
|
5629
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5656
|
+
const n2 = e.some((s2) => !(s2.data instanceof E) || pn(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5630
5657
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5631
5658
|
}
|
|
5632
5659
|
// TODO remove all non-PColumn fields
|
|
5633
5660
|
createPFrame(e) {
|
|
5634
5661
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5635
|
-
e.map((n2) =>
|
|
5662
|
+
e.map((n2) => _e(n2))
|
|
5636
5663
|
);
|
|
5637
5664
|
}
|
|
5638
5665
|
createPTable(e) {
|
|
@@ -5645,7 +5672,7 @@
|
|
|
5645
5672
|
filters: e.filters ?? [],
|
|
5646
5673
|
sorting: e.sorting ?? []
|
|
5647
5674
|
} : n2 = e, this.verifyInlineAndExplicitColumnsSupport(Un(n2.src)), this.ctx.createPTable(
|
|
5648
|
-
On(n2, (r) =>
|
|
5675
|
+
On(n2, (r) => _e(r))
|
|
5649
5676
|
);
|
|
5650
5677
|
}
|
|
5651
5678
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5656,26 +5683,26 @@
|
|
|
5656
5683
|
return this.ctx.getCurrentUnstableMarker();
|
|
5657
5684
|
}
|
|
5658
5685
|
}
|
|
5659
|
-
const
|
|
5660
|
-
function
|
|
5686
|
+
const z = "1.30.26";
|
|
5687
|
+
function Ft(t) {
|
|
5661
5688
|
return t.__renderLambda === true;
|
|
5662
5689
|
}
|
|
5663
|
-
function
|
|
5690
|
+
function de(t) {
|
|
5664
5691
|
if (t !== void 0)
|
|
5665
|
-
return
|
|
5692
|
+
return Ft(t) ? t.handle : t;
|
|
5666
5693
|
}
|
|
5667
|
-
class
|
|
5694
|
+
class L {
|
|
5668
5695
|
constructor(e, n2, r, i, s2, o, a, l2) {
|
|
5669
5696
|
this._renderingMode = e, this._initialArgs = n2, this._initialUiState = r, this._outputs = i, this._inputsValid = s2, this._sections = o, this._title = a, this._enrichmentTargets = l2;
|
|
5670
5697
|
}
|
|
5671
5698
|
static create(e = "Heavy") {
|
|
5672
|
-
return new
|
|
5699
|
+
return new L(
|
|
5673
5700
|
e,
|
|
5674
5701
|
void 0,
|
|
5675
5702
|
{},
|
|
5676
5703
|
{},
|
|
5677
|
-
|
|
5678
|
-
|
|
5704
|
+
ne(true),
|
|
5705
|
+
ne([]),
|
|
5679
5706
|
void 0,
|
|
5680
5707
|
void 0
|
|
5681
5708
|
);
|
|
@@ -5683,7 +5710,7 @@
|
|
|
5683
5710
|
output(e, n2, r = {}) {
|
|
5684
5711
|
if (typeof n2 == "function") {
|
|
5685
5712
|
const i = `output#${e}`;
|
|
5686
|
-
return
|
|
5713
|
+
return G(i, () => n2(new ee())), new L(
|
|
5687
5714
|
this._renderingMode,
|
|
5688
5715
|
this._initialArgs,
|
|
5689
5716
|
this._initialUiState,
|
|
@@ -5701,7 +5728,7 @@
|
|
|
5701
5728
|
this._enrichmentTargets
|
|
5702
5729
|
);
|
|
5703
5730
|
} else
|
|
5704
|
-
return new
|
|
5731
|
+
return new L(
|
|
5705
5732
|
this._renderingMode,
|
|
5706
5733
|
this._initialArgs,
|
|
5707
5734
|
this._initialUiState,
|
|
@@ -5720,7 +5747,7 @@
|
|
|
5720
5747
|
return this.output(e, n2, { retentive: true });
|
|
5721
5748
|
}
|
|
5722
5749
|
argsValid(e) {
|
|
5723
|
-
return typeof e == "function" ? (
|
|
5750
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new ee())), new L(
|
|
5724
5751
|
this._renderingMode,
|
|
5725
5752
|
this._initialArgs,
|
|
5726
5753
|
this._initialUiState,
|
|
@@ -5732,7 +5759,7 @@
|
|
|
5732
5759
|
this._sections,
|
|
5733
5760
|
this._title,
|
|
5734
5761
|
this._enrichmentTargets
|
|
5735
|
-
)) : new
|
|
5762
|
+
)) : new L(
|
|
5736
5763
|
this._renderingMode,
|
|
5737
5764
|
this._initialArgs,
|
|
5738
5765
|
this._initialUiState,
|
|
@@ -5744,7 +5771,7 @@
|
|
|
5744
5771
|
);
|
|
5745
5772
|
}
|
|
5746
5773
|
sections(e) {
|
|
5747
|
-
return Array.isArray(e) ? this.sections(
|
|
5774
|
+
return Array.isArray(e) ? this.sections(ne(e)) : typeof e == "function" ? (G("sections", () => e(new ee())), new L(
|
|
5748
5775
|
this._renderingMode,
|
|
5749
5776
|
this._initialArgs,
|
|
5750
5777
|
this._initialUiState,
|
|
@@ -5753,7 +5780,7 @@
|
|
|
5753
5780
|
{ __renderLambda: true, handle: "sections" },
|
|
5754
5781
|
this._title,
|
|
5755
5782
|
this._enrichmentTargets
|
|
5756
|
-
)) : new
|
|
5783
|
+
)) : new L(
|
|
5757
5784
|
this._renderingMode,
|
|
5758
5785
|
this._initialArgs,
|
|
5759
5786
|
this._initialUiState,
|
|
@@ -5766,7 +5793,7 @@
|
|
|
5766
5793
|
}
|
|
5767
5794
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5768
5795
|
title(e) {
|
|
5769
|
-
return
|
|
5796
|
+
return G("title", () => e(new ee())), new L(
|
|
5770
5797
|
this._renderingMode,
|
|
5771
5798
|
this._initialArgs,
|
|
5772
5799
|
this._initialUiState,
|
|
@@ -5782,7 +5809,7 @@
|
|
|
5782
5809
|
* @deprecated use {@link withArgs}
|
|
5783
5810
|
* */
|
|
5784
5811
|
initialArgs(e) {
|
|
5785
|
-
return new
|
|
5812
|
+
return new L(
|
|
5786
5813
|
this._renderingMode,
|
|
5787
5814
|
e,
|
|
5788
5815
|
this._initialUiState,
|
|
@@ -5795,7 +5822,7 @@
|
|
|
5795
5822
|
}
|
|
5796
5823
|
/** Sets initial args for the block, this value must be specified. */
|
|
5797
5824
|
withArgs(e) {
|
|
5798
|
-
return new
|
|
5825
|
+
return new L(
|
|
5799
5826
|
this._renderingMode,
|
|
5800
5827
|
e,
|
|
5801
5828
|
this._initialUiState,
|
|
@@ -5808,7 +5835,7 @@
|
|
|
5808
5835
|
}
|
|
5809
5836
|
/** Defines type and sets initial value for block UiState. */
|
|
5810
5837
|
withUiState(e) {
|
|
5811
|
-
return new
|
|
5838
|
+
return new L(
|
|
5812
5839
|
this._renderingMode,
|
|
5813
5840
|
this._initialArgs,
|
|
5814
5841
|
e,
|
|
@@ -5824,7 +5851,7 @@
|
|
|
5824
5851
|
* Influences dependency graph construction.
|
|
5825
5852
|
*/
|
|
5826
5853
|
enriches(e) {
|
|
5827
|
-
return
|
|
5854
|
+
return G("enrichmentTargets", e), new L(
|
|
5828
5855
|
this._renderingMode,
|
|
5829
5856
|
this._initialArgs,
|
|
5830
5857
|
this._initialUiState,
|
|
@@ -5842,7 +5869,7 @@
|
|
|
5842
5869
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5843
5870
|
const e = {
|
|
5844
5871
|
v3: {
|
|
5845
|
-
sdkVersion:
|
|
5872
|
+
sdkVersion: z,
|
|
5846
5873
|
renderingMode: this._renderingMode,
|
|
5847
5874
|
initialArgs: this._initialArgs,
|
|
5848
5875
|
initialUiState: this._initialUiState,
|
|
@@ -5853,43 +5880,43 @@
|
|
|
5853
5880
|
enrichmentTargets: this._enrichmentTargets
|
|
5854
5881
|
},
|
|
5855
5882
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5856
|
-
sdkVersion:
|
|
5883
|
+
sdkVersion: z,
|
|
5857
5884
|
renderingMode: this._renderingMode,
|
|
5858
5885
|
initialArgs: this._initialArgs,
|
|
5859
|
-
inputsValid:
|
|
5860
|
-
sections:
|
|
5886
|
+
inputsValid: de(this._inputsValid),
|
|
5887
|
+
sections: de(this._sections),
|
|
5861
5888
|
outputs: Object.fromEntries(
|
|
5862
|
-
Object.entries(this._outputs).map(([n2, r]) => [n2,
|
|
5889
|
+
Object.entries(this._outputs).map(([n2, r]) => [n2, de(r)])
|
|
5863
5890
|
)
|
|
5864
5891
|
};
|
|
5865
|
-
return
|
|
5892
|
+
return ct() ? Oe({ sdkVersion: z }) : { config: e };
|
|
5866
5893
|
}
|
|
5867
5894
|
}
|
|
5868
|
-
function
|
|
5895
|
+
function Ot(t) {
|
|
5869
5896
|
return JSON.parse(t);
|
|
5870
5897
|
}
|
|
5871
|
-
function
|
|
5898
|
+
function Rt(t) {
|
|
5872
5899
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
5873
5900
|
}
|
|
5874
|
-
function
|
|
5875
|
-
return new
|
|
5901
|
+
function Je(t) {
|
|
5902
|
+
return new me().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
5876
5903
|
name: "pl7.app/label",
|
|
5877
5904
|
axes: [{}]
|
|
5878
5905
|
// exactly one axis
|
|
5879
5906
|
}, { dontWaitAllData: true });
|
|
5880
5907
|
}
|
|
5881
|
-
function
|
|
5908
|
+
function Ne(t, e) {
|
|
5882
5909
|
const n2 = [], r = [];
|
|
5883
5910
|
for (const a of t)
|
|
5884
|
-
|
|
5911
|
+
Rt(a.spec) ? n2.push(a) : r.push(a);
|
|
5885
5912
|
const i = [];
|
|
5886
5913
|
for (const a of r)
|
|
5887
5914
|
for (const l2 of a.spec.axesSpec) {
|
|
5888
|
-
const u2 =
|
|
5889
|
-
i.some((p2) => X
|
|
5915
|
+
const u2 = p$1(l2);
|
|
5916
|
+
i.some((p2) => X(p2, u2)) || i.push(u2);
|
|
5890
5917
|
}
|
|
5891
5918
|
for (const a of n2) {
|
|
5892
|
-
const l2 =
|
|
5919
|
+
const l2 = p$1(a.spec.axesSpec[0]), u2 = i.findIndex((p2) => X(p2, l2));
|
|
5893
5920
|
u2 !== -1 && i.splice(u2, 1);
|
|
5894
5921
|
}
|
|
5895
5922
|
const s2 = (a, l2) => {
|
|
@@ -5900,14 +5927,14 @@
|
|
|
5900
5927
|
return u2;
|
|
5901
5928
|
}, o = [];
|
|
5902
5929
|
for (const a of e) {
|
|
5903
|
-
const l2 = a.spec.axesSpec[0], u2 =
|
|
5930
|
+
const l2 = a.spec.axesSpec[0], u2 = p$1(l2), p2 = i.findIndex((h2) => X(h2, u2));
|
|
5904
5931
|
if (p2 !== -1) {
|
|
5905
|
-
const
|
|
5906
|
-
|
|
5907
|
-
id: s2(a.id,
|
|
5932
|
+
const h2 = i[p2], w2 = Object.keys(h2.domain ?? {}).length, g = Object.keys(l2.domain ?? {}).length;
|
|
5933
|
+
w2 > g ? o.push({
|
|
5934
|
+
id: s2(a.id, h2.domain),
|
|
5908
5935
|
spec: {
|
|
5909
5936
|
...a.spec,
|
|
5910
|
-
axesSpec: [{ ...
|
|
5937
|
+
axesSpec: [{ ...h2, annotations: l2.annotations }]
|
|
5911
5938
|
},
|
|
5912
5939
|
data: a.data
|
|
5913
5940
|
}) : o.push(a), i.splice(p2, 1);
|
|
@@ -5915,8 +5942,8 @@
|
|
|
5915
5942
|
}
|
|
5916
5943
|
return o;
|
|
5917
5944
|
}
|
|
5918
|
-
function
|
|
5919
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
5945
|
+
function Ue(t) {
|
|
5946
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof E, r = (i) => typeof i == "object" && "type" in i;
|
|
5920
5947
|
return t.map((i) => i.data).every((i) => {
|
|
5921
5948
|
if (e(i))
|
|
5922
5949
|
return true;
|
|
@@ -5935,7 +5962,7 @@
|
|
|
5935
5962
|
throw Error(`unsupported column data type: ${i}`);
|
|
5936
5963
|
});
|
|
5937
5964
|
}
|
|
5938
|
-
function
|
|
5965
|
+
function Be(t, e, n2, r, i, s2) {
|
|
5939
5966
|
let o = t;
|
|
5940
5967
|
const a = [];
|
|
5941
5968
|
if (s2) {
|
|
@@ -5956,56 +5983,56 @@
|
|
|
5956
5983
|
sorting: i
|
|
5957
5984
|
};
|
|
5958
5985
|
}
|
|
5959
|
-
function
|
|
5986
|
+
function Tn(t, e, n2, r) {
|
|
5960
5987
|
var u2, p2;
|
|
5961
5988
|
Array.isArray(r) && (r = { filters: r });
|
|
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 =
|
|
5989
|
+
const i = (r == null ? void 0 : r.coreJoinType) ?? "full", s2 = [...(r == null ? void 0 : r.filters) ?? [], ...((u2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : u2.filters) ?? []], o = ((p2 = n2 == null ? void 0 : n2.pTableParams) == null ? void 0 : p2.sorting) ?? [], a = Je(t.resultPool);
|
|
5963
5990
|
if (!a) return;
|
|
5964
|
-
const l2 =
|
|
5965
|
-
if (
|
|
5991
|
+
const l2 = Ne(e.map(Cn), a);
|
|
5992
|
+
if (Ue([...e, ...l2]))
|
|
5966
5993
|
return t.createPTable(
|
|
5967
|
-
|
|
5994
|
+
Be(e, l2, i, s2, o, r == null ? void 0 : r.coreColumnPredicate)
|
|
5968
5995
|
);
|
|
5969
5996
|
}
|
|
5970
|
-
function
|
|
5997
|
+
function kt(t) {
|
|
5971
5998
|
var e;
|
|
5972
5999
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
5973
6000
|
}
|
|
5974
|
-
function
|
|
5975
|
-
var
|
|
5976
|
-
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((
|
|
6001
|
+
function Ln(t, e, n2, r, i) {
|
|
6002
|
+
var c2, y;
|
|
6003
|
+
const s2 = (i == null ? void 0 : i.coreJoinType) ?? "full", o = [...(i == null ? void 0 : i.filters) ?? [], ...((c2 = r == null ? void 0 : r.pTableParams) == null ? void 0 : c2.filters) ?? []], a = ((y = r == null ? void 0 : r.pTableParams) == null ? void 0 : y.sorting) ?? [], l2 = e.find((d) => n2(d.spec));
|
|
5977
6004
|
if (!l2) return;
|
|
5978
|
-
const u2 =
|
|
6005
|
+
const u2 = Je(t.resultPool);
|
|
5979
6006
|
if (!u2) return;
|
|
5980
6007
|
const p2 = new Set((() => {
|
|
5981
|
-
var b,
|
|
6008
|
+
var b, A2;
|
|
5982
6009
|
if (s2 === "inner") return [];
|
|
5983
|
-
const
|
|
5984
|
-
return
|
|
6010
|
+
const d = (A2 = (b = r == null ? void 0 : r.gridState.columnVisibility) == null ? void 0 : b.hiddenColIds) == null ? void 0 : A2.map(Ot).filter((v) => v.type === "column").map((v) => v.id);
|
|
6011
|
+
return d || e.filter((v) => kt(v.spec)).map((v) => v.id);
|
|
5985
6012
|
})());
|
|
5986
|
-
p2.delete(l2.id), [...o.map((
|
|
5987
|
-
const
|
|
5988
|
-
...l2.spec.axesSpec.map((
|
|
6013
|
+
p2.delete(l2.id), [...o.map((d) => d.column), ...a.map((d) => d.column)].filter((d) => d.type === "column").map((d) => p2.delete(d.id));
|
|
6014
|
+
const h2 = e.filter((d) => !p2.has(d.id)), w2 = Ne(h2.map(Cn), u2), g = [
|
|
6015
|
+
...l2.spec.axesSpec.map((d) => ({
|
|
5989
6016
|
type: "axis",
|
|
5990
|
-
id:
|
|
5991
|
-
spec:
|
|
6017
|
+
id: p$1(d),
|
|
6018
|
+
spec: d
|
|
5992
6019
|
})),
|
|
5993
|
-
...[...e, ...
|
|
6020
|
+
...[...e, ...w2].map((d) => ({
|
|
5994
6021
|
type: "column",
|
|
5995
|
-
id:
|
|
5996
|
-
spec:
|
|
6022
|
+
id: d.id,
|
|
6023
|
+
spec: d.spec
|
|
5997
6024
|
}))
|
|
5998
6025
|
];
|
|
5999
|
-
if (
|
|
6000
|
-
const
|
|
6001
|
-
|
|
6026
|
+
if (!Ue([...h2, ...w2])) return;
|
|
6027
|
+
const m2 = t.createPTable(
|
|
6028
|
+
Be(e, w2, s2, o, a, i == null ? void 0 : i.coreColumnPredicate)
|
|
6002
6029
|
);
|
|
6003
6030
|
return {
|
|
6004
|
-
tableSpec:
|
|
6005
|
-
tableHandle:
|
|
6031
|
+
tableSpec: g,
|
|
6032
|
+
tableHandle: m2
|
|
6006
6033
|
};
|
|
6007
6034
|
}
|
|
6008
|
-
const ImportFileHandleSchema = z$
|
|
6035
|
+
const ImportFileHandleSchema = z$2.string().optional().refine(
|
|
6009
6036
|
(_a) => true
|
|
6010
6037
|
);
|
|
6011
6038
|
function* range(from, to, step = 1) {
|
|
@@ -6023,12 +6050,12 @@
|
|
|
6023
6050
|
function times(n2, cb) {
|
|
6024
6051
|
return toList(range(0, n2)).map(cb);
|
|
6025
6052
|
}
|
|
6026
|
-
const $BlockArgs = z$
|
|
6027
|
-
tableNumRows: z$
|
|
6028
|
-
numbers: z$
|
|
6029
|
-
handles: z$
|
|
6053
|
+
const $BlockArgs = z$2.object({
|
|
6054
|
+
tableNumRows: z$2.number().default(100),
|
|
6055
|
+
numbers: z$2.array(z$2.coerce.number()),
|
|
6056
|
+
handles: z$2.array(ImportFileHandleSchema)
|
|
6030
6057
|
});
|
|
6031
|
-
const platforma =
|
|
6058
|
+
const platforma = L.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
|
|
6032
6059
|
if (ctx.args.numbers.length === 5) {
|
|
6033
6060
|
throw new Error("argsValid: test error");
|
|
6034
6061
|
}
|
|
@@ -6042,7 +6069,7 @@
|
|
|
6042
6069
|
const progresses = m2 == null ? void 0 : m2.mapFields((name, val) => [name, val == null ? void 0 : val.getImportProgress()]);
|
|
6043
6070
|
return Object.fromEntries(progresses ?? []);
|
|
6044
6071
|
}).output("pt", (ctx) => {
|
|
6045
|
-
var _a, _b, _c, _d,
|
|
6072
|
+
var _a, _b, _c, _d, _e2;
|
|
6046
6073
|
if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
|
|
6047
6074
|
const data = times(ctx.args.tableNumRows ?? 0, (i) => {
|
|
6048
6075
|
const v = i + 1;
|
|
@@ -6051,7 +6078,7 @@
|
|
|
6051
6078
|
val: v.toString()
|
|
6052
6079
|
};
|
|
6053
6080
|
});
|
|
6054
|
-
return
|
|
6081
|
+
return Tn(
|
|
6055
6082
|
ctx,
|
|
6056
6083
|
[
|
|
6057
6084
|
{
|
|
@@ -6090,12 +6117,12 @@
|
|
|
6090
6117
|
{
|
|
6091
6118
|
filters: [
|
|
6092
6119
|
...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
|
|
6093
|
-
...((
|
|
6120
|
+
...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
|
|
6094
6121
|
]
|
|
6095
6122
|
}
|
|
6096
6123
|
);
|
|
6097
6124
|
}).output("ptV2", (ctx) => {
|
|
6098
|
-
var _a, _b, _c, _d,
|
|
6125
|
+
var _a, _b, _c, _d, _e2;
|
|
6099
6126
|
if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
|
|
6100
6127
|
const data = times(ctx.args.tableNumRows ?? 0, (i) => {
|
|
6101
6128
|
const v = i + 1;
|
|
@@ -6104,7 +6131,7 @@
|
|
|
6104
6131
|
val: v.toString()
|
|
6105
6132
|
};
|
|
6106
6133
|
});
|
|
6107
|
-
return
|
|
6134
|
+
return Ln(
|
|
6108
6135
|
ctx,
|
|
6109
6136
|
[
|
|
6110
6137
|
{
|
|
@@ -6146,7 +6173,7 @@
|
|
|
6146
6173
|
{
|
|
6147
6174
|
filters: [
|
|
6148
6175
|
...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
|
|
6149
|
-
...((
|
|
6176
|
+
...((_e2 = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e2.filters) ?? []
|
|
6150
6177
|
]
|
|
6151
6178
|
}
|
|
6152
6179
|
);
|