@milaboratories/milaboratories.ui-examples.model 1.1.30 → 1.1.31
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 +8 -7
- package/CHANGELOG.md +7 -0
- package/dist/bundle.js +804 -450
- 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 g
|
|
38
|
+
const g = /* @__PURE__ */ getDefaultExportFromCjs(canonicalize);
|
|
39
39
|
var util;
|
|
40
40
|
(function(util2) {
|
|
41
41
|
util2.assertEqual = (val) => val;
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
return obj;
|
|
55
55
|
};
|
|
56
56
|
util2.getValidEnumValues = (obj) => {
|
|
57
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
57
|
+
const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
|
|
58
58
|
const filtered = {};
|
|
59
|
-
for (const
|
|
60
|
-
filtered[
|
|
59
|
+
for (const k2 of validKeys) {
|
|
60
|
+
filtered[k2] = obj[k2];
|
|
61
61
|
}
|
|
62
62
|
return util2.objectValues(filtered);
|
|
63
63
|
};
|
|
@@ -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 = (_2, value) => {
|
|
91
91
|
if (typeof value === "bigint") {
|
|
92
92
|
return value.toString();
|
|
93
93
|
}
|
|
@@ -492,12 +492,12 @@
|
|
|
492
492
|
const isDirty = (x2) => x2.status === "dirty";
|
|
493
493
|
const isValid = (x2) => x2.status === "valid";
|
|
494
494
|
const isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
|
|
495
|
-
function __classPrivateFieldGet(receiver, state, kind,
|
|
496
|
-
if (typeof state === "function" ? receiver !== state || !
|
|
495
|
+
function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
496
|
+
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
497
497
|
return state.get(receiver);
|
|
498
498
|
}
|
|
499
|
-
function __classPrivateFieldSet(receiver, state, value, kind,
|
|
500
|
-
if (typeof state === "function" ? receiver !== state || !
|
|
499
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f2) {
|
|
500
|
+
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
501
501
|
return state.set(receiver, value), value;
|
|
502
502
|
}
|
|
503
503
|
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
@@ -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 me = this;
|
|
3109
3109
|
return OK(async function(...args) {
|
|
3110
3110
|
const error = new ZodError([]);
|
|
3111
|
-
const parsedArgs = await
|
|
3111
|
+
const parsedArgs = await me._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 me._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 me = this;
|
|
3124
3124
|
return OK(function(...args) {
|
|
3125
|
-
const parsedArgs =
|
|
3125
|
+
const parsedArgs = me._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 = me._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 = /* @__PURE__ */ Object.freeze({
|
|
3835
|
+
var z$2 = /* @__PURE__ */ Object.freeze({
|
|
3836
3836
|
__proto__: null,
|
|
3837
3837
|
defaultErrorMap: errorMap,
|
|
3838
3838
|
setErrorMap,
|
|
@@ -3948,33 +3948,112 @@
|
|
|
3948
3948
|
quotelessJson,
|
|
3949
3949
|
ZodError
|
|
3950
3950
|
});
|
|
3951
|
-
var
|
|
3952
|
-
var
|
|
3953
|
-
var
|
|
3951
|
+
var $ = Object.defineProperty;
|
|
3952
|
+
var L = (n, t, e) => t in n ? $(n, t, { enumerable: true, configurable: true, writable: true, value: e }) : n[t] = e;
|
|
3953
|
+
var p = (n, t, e) => L(n, typeof t != "symbol" ? t + "" : t, e);
|
|
3954
3954
|
function w(n) {
|
|
3955
3955
|
throw new Error("Unexpected object: " + n);
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function yn(n) {
|
|
3958
|
+
if (!n || typeof n != "object")
|
|
3959
|
+
return false;
|
|
3960
|
+
const t = n;
|
|
3961
|
+
if (!("type" in t))
|
|
3962
|
+
return false;
|
|
3963
|
+
switch (t.type) {
|
|
3964
|
+
case "Json":
|
|
3965
|
+
return typeof t.keyLength == "number" && t.data !== void 0 && typeof t.data == "object";
|
|
3966
|
+
case "JsonPartitioned":
|
|
3967
|
+
return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
|
|
3968
|
+
case "BinaryPartitioned":
|
|
3969
|
+
return typeof t.partitionKeyLength == "number" && t.parts !== void 0 && typeof t.parts == "object";
|
|
3970
|
+
default:
|
|
3971
|
+
return false;
|
|
3972
|
+
}
|
|
3973
|
+
}
|
|
3974
|
+
function mn(n, t) {
|
|
3975
|
+
if (n !== void 0)
|
|
3976
|
+
switch (n.type) {
|
|
3977
|
+
case "Json":
|
|
3978
|
+
return n;
|
|
3979
|
+
case "JsonPartitioned": {
|
|
3980
|
+
const e = {};
|
|
3981
|
+
for (const [r, o] of Object.entries(n.parts))
|
|
3982
|
+
e[r] = t(o);
|
|
3983
|
+
return {
|
|
3984
|
+
...n,
|
|
3985
|
+
parts: e
|
|
3986
|
+
};
|
|
3987
|
+
}
|
|
3988
|
+
case "BinaryPartitioned": {
|
|
3989
|
+
const e = {};
|
|
3990
|
+
for (const [r, o] of Object.entries(n.parts))
|
|
3991
|
+
e[r] = {
|
|
3992
|
+
index: t(o.index),
|
|
3993
|
+
values: t(o.values)
|
|
3994
|
+
};
|
|
3995
|
+
return {
|
|
3996
|
+
...n,
|
|
3997
|
+
parts: e
|
|
3998
|
+
};
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
4002
|
+
function bn(n) {
|
|
4003
|
+
switch (n.type) {
|
|
4004
|
+
case "Json": {
|
|
4005
|
+
const t = {};
|
|
4006
|
+
for (const e of n.data)
|
|
4007
|
+
t[JSON.stringify(e.key)] = e.value;
|
|
4008
|
+
return {
|
|
4009
|
+
type: "Json",
|
|
4010
|
+
keyLength: n.keyLength,
|
|
4011
|
+
data: t
|
|
4012
|
+
};
|
|
4013
|
+
}
|
|
4014
|
+
case "JsonPartitioned": {
|
|
4015
|
+
const t = {};
|
|
4016
|
+
for (const e of n.parts)
|
|
4017
|
+
t[JSON.stringify(e.key)] = e.value;
|
|
4018
|
+
return {
|
|
4019
|
+
type: "JsonPartitioned",
|
|
4020
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
4021
|
+
parts: t
|
|
4022
|
+
};
|
|
4023
|
+
}
|
|
4024
|
+
case "BinaryPartitioned": {
|
|
4025
|
+
const t = {};
|
|
4026
|
+
for (const e of n.parts)
|
|
4027
|
+
t[JSON.stringify(e.key)] = e.value;
|
|
4028
|
+
return {
|
|
4029
|
+
type: "BinaryPartitioned",
|
|
4030
|
+
partitionKeyLength: n.partitionKeyLength,
|
|
4031
|
+
parts: t
|
|
4032
|
+
};
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
}
|
|
4036
|
+
function m(n) {
|
|
3958
4037
|
const { type: t, name: e, domain: r } = n;
|
|
3959
4038
|
return { type: t, name: e, ...r && { domain: r } };
|
|
3960
4039
|
}
|
|
3961
|
-
function
|
|
3962
|
-
return g
|
|
4040
|
+
function Sn(n) {
|
|
4041
|
+
return g(m(n));
|
|
3963
4042
|
}
|
|
3964
|
-
function
|
|
4043
|
+
function z$1(n, t) {
|
|
3965
4044
|
if (n === void 0) return t === void 0;
|
|
3966
4045
|
if (t === void 0) return true;
|
|
3967
4046
|
for (const e in t)
|
|
3968
4047
|
if (n[e] !== t[e]) return false;
|
|
3969
4048
|
return true;
|
|
3970
4049
|
}
|
|
3971
|
-
function
|
|
3972
|
-
return n.name === t.name &&
|
|
4050
|
+
function G(n, t) {
|
|
4051
|
+
return n.name === t.name && z$1(n.domain, t.domain);
|
|
3973
4052
|
}
|
|
3974
|
-
function
|
|
3975
|
-
return { ...n, src:
|
|
4053
|
+
function En(n, t) {
|
|
4054
|
+
return { ...n, src: l(n.src, t) };
|
|
3976
4055
|
}
|
|
3977
|
-
function
|
|
4056
|
+
function l(n, t) {
|
|
3978
4057
|
switch (n.type) {
|
|
3979
4058
|
case "column":
|
|
3980
4059
|
return {
|
|
@@ -3985,51 +4064,51 @@
|
|
|
3985
4064
|
case "full":
|
|
3986
4065
|
return {
|
|
3987
4066
|
type: n.type,
|
|
3988
|
-
entries: n.entries.map((e) =>
|
|
4067
|
+
entries: n.entries.map((e) => l(e, t))
|
|
3989
4068
|
};
|
|
3990
4069
|
case "outer":
|
|
3991
4070
|
return {
|
|
3992
4071
|
type: "outer",
|
|
3993
|
-
primary:
|
|
3994
|
-
secondary: n.secondary.map((e) =>
|
|
4072
|
+
primary: l(n.primary, t),
|
|
4073
|
+
secondary: n.secondary.map((e) => l(e, t))
|
|
3995
4074
|
};
|
|
3996
4075
|
default:
|
|
3997
4076
|
w(n);
|
|
3998
4077
|
}
|
|
3999
4078
|
}
|
|
4000
|
-
function
|
|
4001
|
-
return g
|
|
4079
|
+
function Q$1(n) {
|
|
4080
|
+
return g(n);
|
|
4002
4081
|
}
|
|
4003
|
-
function
|
|
4004
|
-
return g
|
|
4082
|
+
function P(n) {
|
|
4083
|
+
return g(m(n));
|
|
4005
4084
|
}
|
|
4006
|
-
function
|
|
4085
|
+
function x(n, t) {
|
|
4007
4086
|
return JSON.stringify([n, t]);
|
|
4008
4087
|
}
|
|
4009
|
-
class
|
|
4088
|
+
class On {
|
|
4010
4089
|
/**
|
|
4011
4090
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4012
4091
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
4013
4092
|
*/
|
|
4014
4093
|
constructor(t) {
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4094
|
+
p(this, "domains", /* @__PURE__ */ new Map());
|
|
4095
|
+
p(this, "axes", /* @__PURE__ */ new Map());
|
|
4096
|
+
p(this, "domainPacks", []);
|
|
4097
|
+
p(this, "domainPackToAnchor", /* @__PURE__ */ new Map());
|
|
4019
4098
|
this.anchors = t;
|
|
4020
4099
|
const e = Object.entries(t);
|
|
4021
4100
|
e.sort((r, o) => r[0].localeCompare(o[0]));
|
|
4022
4101
|
for (const [r, o] of e) {
|
|
4023
4102
|
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
4024
|
-
const s = o.axesSpec[i], a =
|
|
4103
|
+
const s = o.axesSpec[i], a = P(s);
|
|
4025
4104
|
this.axes.set(a, { anchor: r, idx: i });
|
|
4026
4105
|
}
|
|
4027
4106
|
if (o.domain !== void 0) {
|
|
4028
4107
|
const i = Object.entries(o.domain);
|
|
4029
4108
|
i.sort((s, a) => s[0].localeCompare(a[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([s]) => s));
|
|
4030
4109
|
for (const [s, a] of i) {
|
|
4031
|
-
const
|
|
4032
|
-
this.domains.set(
|
|
4110
|
+
const c = x(s, a);
|
|
4111
|
+
this.domains.set(c, r);
|
|
4033
4112
|
}
|
|
4034
4113
|
}
|
|
4035
4114
|
}
|
|
@@ -4054,35 +4133,35 @@
|
|
|
4054
4133
|
else
|
|
4055
4134
|
break n;
|
|
4056
4135
|
}
|
|
4057
|
-
const
|
|
4058
|
-
if (
|
|
4059
|
-
r.domainAnchor =
|
|
4136
|
+
const c = this.domainPackToAnchor.get(JSON.stringify(a));
|
|
4137
|
+
if (c !== void 0) {
|
|
4138
|
+
r.domainAnchor = c, o = new Set(s);
|
|
4060
4139
|
break;
|
|
4061
4140
|
}
|
|
4062
4141
|
}
|
|
4063
4142
|
for (const [s, a] of Object.entries(t.domain ?? {})) {
|
|
4064
4143
|
if (o !== void 0 && o.has(s))
|
|
4065
4144
|
continue;
|
|
4066
|
-
const
|
|
4145
|
+
const c = x(s, a), u = this.domains.get(c);
|
|
4067
4146
|
r.domain ?? (r.domain = {}), r.domain[s] = u ? { anchor: u } : a;
|
|
4068
4147
|
}
|
|
4069
4148
|
if (r.axes = t.axesSpec.map((s) => {
|
|
4070
|
-
const a =
|
|
4149
|
+
const a = P(s);
|
|
4071
4150
|
return this.axes.get(a) ?? s;
|
|
4072
4151
|
}), !e || e.length === 0)
|
|
4073
4152
|
return r;
|
|
4074
4153
|
const i = [];
|
|
4075
4154
|
for (const s of e) {
|
|
4076
|
-
const [a,
|
|
4155
|
+
const [a, c] = s;
|
|
4077
4156
|
if (typeof a == "number") {
|
|
4078
4157
|
if (a < 0 || a >= t.axesSpec.length)
|
|
4079
4158
|
throw new Error(`Axis index ${a} is out of bounds (0-${t.axesSpec.length - 1})`);
|
|
4080
|
-
i.push([a,
|
|
4159
|
+
i.push([a, c]);
|
|
4081
4160
|
} else {
|
|
4082
4161
|
const u = t.axesSpec.findIndex((d) => d.name === a);
|
|
4083
4162
|
if (u === -1)
|
|
4084
4163
|
throw new Error(`Axis with name "${a}" not found in the column specification`);
|
|
4085
|
-
i.push([u,
|
|
4164
|
+
i.push([u, c]);
|
|
4086
4165
|
}
|
|
4087
4166
|
}
|
|
4088
4167
|
return i.sort((s, a) => s[0] - a[0]), {
|
|
@@ -4097,10 +4176,10 @@
|
|
|
4097
4176
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4098
4177
|
*/
|
|
4099
4178
|
deriveS(t, e) {
|
|
4100
|
-
return
|
|
4179
|
+
return Q$1(this.derive(t, e));
|
|
4101
4180
|
}
|
|
4102
4181
|
}
|
|
4103
|
-
function
|
|
4182
|
+
function Jn(n, t) {
|
|
4104
4183
|
const e = { ...t };
|
|
4105
4184
|
if (e.domainAnchor !== void 0) {
|
|
4106
4185
|
const r = n[e.domainAnchor];
|
|
@@ -4124,10 +4203,10 @@
|
|
|
4124
4203
|
}
|
|
4125
4204
|
e.domain = r;
|
|
4126
4205
|
}
|
|
4127
|
-
return e.axes && (e.axes = e.axes.map((r) =>
|
|
4206
|
+
return e.axes && (e.axes = e.axes.map((r) => Y$1(n, r))), e;
|
|
4128
4207
|
}
|
|
4129
|
-
function
|
|
4130
|
-
if (!
|
|
4208
|
+
function Y$1(n, t) {
|
|
4209
|
+
if (!Z$1(t))
|
|
4131
4210
|
return t;
|
|
4132
4211
|
const e = t.anchor, r = n[e];
|
|
4133
4212
|
if (!r)
|
|
@@ -4144,7 +4223,7 @@
|
|
|
4144
4223
|
throw new Error(`Axis with name "${t.name}" not found in anchor "${e}"`);
|
|
4145
4224
|
return o[0];
|
|
4146
4225
|
} else if ("id" in t) {
|
|
4147
|
-
const o = r.axesSpec.filter((i) =>
|
|
4226
|
+
const o = r.axesSpec.filter((i) => G(t.id, m(i)));
|
|
4148
4227
|
if (o.length > 1)
|
|
4149
4228
|
throw new Error(`Multiple matching axes found for matcher in anchor "${e}"`);
|
|
4150
4229
|
if (o.length === 0)
|
|
@@ -4153,26 +4232,26 @@
|
|
|
4153
4232
|
}
|
|
4154
4233
|
throw new Error("Unsupported axis reference type");
|
|
4155
4234
|
}
|
|
4156
|
-
function
|
|
4235
|
+
function Z$1(n) {
|
|
4157
4236
|
return typeof n == "object" && "anchor" in n;
|
|
4158
4237
|
}
|
|
4159
|
-
function
|
|
4238
|
+
function f(n) {
|
|
4160
4239
|
return n.kind === "PColumn";
|
|
4161
4240
|
}
|
|
4162
|
-
function
|
|
4163
|
-
return
|
|
4241
|
+
function q$1(n) {
|
|
4242
|
+
return f(n.spec);
|
|
4164
4243
|
}
|
|
4165
|
-
function
|
|
4166
|
-
if (!
|
|
4244
|
+
function Dn(n) {
|
|
4245
|
+
if (!q$1(n)) throw new Error(`not a PColumn (kind = ${n.spec.kind})`);
|
|
4167
4246
|
return n;
|
|
4168
4247
|
}
|
|
4169
|
-
function
|
|
4248
|
+
function jn(n, t) {
|
|
4170
4249
|
return n === void 0 ? void 0 : {
|
|
4171
4250
|
...n,
|
|
4172
4251
|
data: t(n.data)
|
|
4173
4252
|
};
|
|
4174
4253
|
}
|
|
4175
|
-
function
|
|
4254
|
+
function Bn(n) {
|
|
4176
4255
|
const t = /* @__PURE__ */ new Map(), e = (r) => {
|
|
4177
4256
|
switch (r.type) {
|
|
4178
4257
|
case "column":
|
|
@@ -4192,7 +4271,7 @@
|
|
|
4192
4271
|
};
|
|
4193
4272
|
return e(n), [...t.values()];
|
|
4194
4273
|
}
|
|
4195
|
-
function
|
|
4274
|
+
function k(n, t) {
|
|
4196
4275
|
if (n.name !== void 0 && n.name !== t.name)
|
|
4197
4276
|
return false;
|
|
4198
4277
|
if (n.type !== void 0) {
|
|
@@ -4210,7 +4289,7 @@
|
|
|
4210
4289
|
}
|
|
4211
4290
|
return true;
|
|
4212
4291
|
}
|
|
4213
|
-
function
|
|
4292
|
+
function N$1(n, t) {
|
|
4214
4293
|
if (t.name !== void 0 && n.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(n.name))
|
|
4215
4294
|
return false;
|
|
4216
4295
|
if (t.type !== void 0) {
|
|
@@ -4227,16 +4306,16 @@
|
|
|
4227
4306
|
return false;
|
|
4228
4307
|
}
|
|
4229
4308
|
if (t.axes !== void 0) {
|
|
4230
|
-
const e = n.axesSpec.map(
|
|
4309
|
+
const e = n.axesSpec.map(m);
|
|
4231
4310
|
if (t.partialAxesMatch) {
|
|
4232
4311
|
for (const r of t.axes)
|
|
4233
|
-
if (!e.some((o) =>
|
|
4312
|
+
if (!e.some((o) => k(r, o)))
|
|
4234
4313
|
return false;
|
|
4235
4314
|
} else {
|
|
4236
4315
|
if (e.length !== t.axes.length)
|
|
4237
4316
|
return false;
|
|
4238
4317
|
for (let r = 0; r < t.axes.length; r++)
|
|
4239
|
-
if (!
|
|
4318
|
+
if (!k(t.axes[r], e[r]))
|
|
4240
4319
|
return false;
|
|
4241
4320
|
}
|
|
4242
4321
|
}
|
|
@@ -4256,65 +4335,65 @@
|
|
|
4256
4335
|
}
|
|
4257
4336
|
return true;
|
|
4258
4337
|
}
|
|
4259
|
-
function
|
|
4260
|
-
return Array.isArray(n) ? (t) => n.some((e) =>
|
|
4338
|
+
function In(n) {
|
|
4339
|
+
return Array.isArray(n) ? (t) => n.some((e) => f(t) && N$1(t, e)) : (t) => f(t) && N$1(t, n);
|
|
4261
4340
|
}
|
|
4262
|
-
z.object({
|
|
4263
|
-
__isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4264
|
-
blockId: z.string().describe("Upstream block id"),
|
|
4265
|
-
name: z.string().describe("Name of the output provided to the upstream block's output context")
|
|
4341
|
+
z$2.object({
|
|
4342
|
+
__isRef: z$2.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
4343
|
+
blockId: z$2.string().describe("Upstream block id"),
|
|
4344
|
+
name: z$2.string().describe("Name of the output provided to the upstream block's output context")
|
|
4266
4345
|
}).describe(
|
|
4267
4346
|
"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."
|
|
4268
4347
|
).strict().readonly();
|
|
4269
|
-
function
|
|
4348
|
+
function Kn(n) {
|
|
4270
4349
|
return typeof n == "object" && n !== null && "__isRef" in n && n.__isRef === true && "blockId" in n && "name" in n;
|
|
4271
4350
|
}
|
|
4272
|
-
function
|
|
4351
|
+
function Mn(n, t) {
|
|
4273
4352
|
return n.ok ? { ok: true, value: t(n.value) } : n;
|
|
4274
4353
|
}
|
|
4275
4354
|
const an = 24;
|
|
4276
|
-
z.string().length(an).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4277
|
-
var
|
|
4278
|
-
var Ie = (t, e, n) => e in t ?
|
|
4279
|
-
var
|
|
4280
|
-
function
|
|
4355
|
+
z$2.string().length(an).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4356
|
+
var _e = Object.defineProperty;
|
|
4357
|
+
var Ie = (t, e, n) => e in t ? _e(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
|
|
4358
|
+
var T = (t, e, n) => Ie(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4359
|
+
function Y(t) {
|
|
4281
4360
|
return { type: "Immediate", value: t };
|
|
4282
4361
|
}
|
|
4283
|
-
function
|
|
4362
|
+
function Ke() {
|
|
4284
4363
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4285
4364
|
}
|
|
4286
|
-
function
|
|
4365
|
+
function be(t) {
|
|
4287
4366
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4288
4367
|
return globalThis.getPlatforma(t);
|
|
4289
4368
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4290
4369
|
throw new Error("Can't get platforma instance.");
|
|
4291
4370
|
}
|
|
4292
|
-
function
|
|
4371
|
+
function $e() {
|
|
4293
4372
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4294
4373
|
}
|
|
4295
|
-
function
|
|
4374
|
+
function h() {
|
|
4296
4375
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4297
4376
|
throw new Error("Not in config rendering context");
|
|
4298
4377
|
}
|
|
4299
|
-
function
|
|
4300
|
-
const n =
|
|
4378
|
+
function q(t, e) {
|
|
4379
|
+
const n = $e();
|
|
4301
4380
|
if (n === void 0) return false;
|
|
4302
4381
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4303
4382
|
return n.callbackRegistry[t] = e, true;
|
|
4304
4383
|
}
|
|
4305
|
-
const
|
|
4306
|
-
function
|
|
4307
|
-
t in
|
|
4308
|
-
for (const
|
|
4309
|
-
|
|
4310
|
-
},
|
|
4384
|
+
const ne = /* @__PURE__ */ new Map();
|
|
4385
|
+
function Je(t, e) {
|
|
4386
|
+
t in h().callbackRegistry || (h().callbackRegistry[t] = (n) => {
|
|
4387
|
+
for (const r of ne.get(t))
|
|
4388
|
+
r(n);
|
|
4389
|
+
}, ne.set(t, [])), ne.get(t).push(e);
|
|
4311
4390
|
}
|
|
4312
4391
|
class S {
|
|
4313
|
-
constructor(e, n = (
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
this.handle = e, this.postProcess = n,
|
|
4317
|
-
this.resolvedValue = n(
|
|
4392
|
+
constructor(e, n = (r) => r) {
|
|
4393
|
+
T(this, "isResolved", false);
|
|
4394
|
+
T(this, "resolvedValue");
|
|
4395
|
+
this.handle = e, this.postProcess = n, Je(e, (r) => {
|
|
4396
|
+
this.resolvedValue = n(r), this.isResolved = true;
|
|
4318
4397
|
});
|
|
4319
4398
|
}
|
|
4320
4399
|
map(e) {
|
|
@@ -4322,15 +4401,15 @@
|
|
|
4322
4401
|
}
|
|
4323
4402
|
mapDefined(e) {
|
|
4324
4403
|
return new S(this.handle, (n) => {
|
|
4325
|
-
const
|
|
4326
|
-
return
|
|
4404
|
+
const r = this.postProcess(n);
|
|
4405
|
+
return r ? e(r) : void 0;
|
|
4327
4406
|
});
|
|
4328
4407
|
}
|
|
4329
4408
|
toJSON() {
|
|
4330
4409
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4331
4410
|
}
|
|
4332
4411
|
}
|
|
4333
|
-
function
|
|
4412
|
+
function ie(t, e) {
|
|
4334
4413
|
return t === void 0 ? void 0 : e(t);
|
|
4335
4414
|
}
|
|
4336
4415
|
class I {
|
|
@@ -4339,27 +4418,27 @@
|
|
|
4339
4418
|
}
|
|
4340
4419
|
resolve(...e) {
|
|
4341
4420
|
const n = e.map(
|
|
4342
|
-
(
|
|
4421
|
+
(r) => ({
|
|
4343
4422
|
assertFieldType: "Input",
|
|
4344
|
-
...typeof
|
|
4423
|
+
...typeof r == "string" ? { field: r } : r
|
|
4345
4424
|
})
|
|
4346
4425
|
);
|
|
4347
4426
|
return this.resolveWithCommon({}, ...n);
|
|
4348
4427
|
}
|
|
4349
4428
|
resolveOutput(...e) {
|
|
4350
4429
|
const n = e.map(
|
|
4351
|
-
(
|
|
4430
|
+
(r) => ({
|
|
4352
4431
|
assertFieldType: "Output",
|
|
4353
|
-
...typeof
|
|
4432
|
+
...typeof r == "string" ? { field: r } : r
|
|
4354
4433
|
})
|
|
4355
4434
|
);
|
|
4356
4435
|
return this.resolveWithCommon({}, ...n);
|
|
4357
4436
|
}
|
|
4358
4437
|
resolveInput(...e) {
|
|
4359
4438
|
const n = e.map(
|
|
4360
|
-
(
|
|
4439
|
+
(r) => ({
|
|
4361
4440
|
assertFieldType: "Input",
|
|
4362
|
-
...typeof
|
|
4441
|
+
...typeof r == "string" ? { field: r } : r
|
|
4363
4442
|
})
|
|
4364
4443
|
);
|
|
4365
4444
|
return this.resolveWithCommon({}, ...n);
|
|
@@ -4368,51 +4447,51 @@
|
|
|
4368
4447
|
return this.resolveWithCommon({}, ...e);
|
|
4369
4448
|
}
|
|
4370
4449
|
resolveWithCommon(e, ...n) {
|
|
4371
|
-
const
|
|
4450
|
+
const r = [
|
|
4372
4451
|
...this.resolvePath,
|
|
4373
4452
|
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
4374
4453
|
];
|
|
4375
|
-
return
|
|
4376
|
-
|
|
4377
|
-
(i) => new I(i,
|
|
4454
|
+
return ie(
|
|
4455
|
+
h().resolveWithCommon(this.handle, e, ...n),
|
|
4456
|
+
(i) => new I(i, r)
|
|
4378
4457
|
);
|
|
4379
4458
|
}
|
|
4380
4459
|
get resourceType() {
|
|
4381
|
-
return
|
|
4460
|
+
return h().getResourceType(this.handle);
|
|
4382
4461
|
}
|
|
4383
4462
|
getInputsLocked() {
|
|
4384
|
-
return
|
|
4463
|
+
return h().getInputsLocked(this.handle);
|
|
4385
4464
|
}
|
|
4386
4465
|
getOutputsLocked() {
|
|
4387
|
-
return
|
|
4466
|
+
return h().getOutputsLocked(this.handle);
|
|
4388
4467
|
}
|
|
4389
4468
|
getIsReadyOrError() {
|
|
4390
|
-
return
|
|
4469
|
+
return h().getIsReadyOrError(this.handle);
|
|
4391
4470
|
}
|
|
4392
4471
|
getIsFinal() {
|
|
4393
|
-
return
|
|
4472
|
+
return h().getIsFinal(this.handle);
|
|
4394
4473
|
}
|
|
4395
4474
|
getError() {
|
|
4396
4475
|
const e = [...this.resolvePath, "error"];
|
|
4397
|
-
return
|
|
4398
|
-
|
|
4476
|
+
return ie(
|
|
4477
|
+
h().getError(this.handle),
|
|
4399
4478
|
(n) => new I(n, e)
|
|
4400
4479
|
);
|
|
4401
4480
|
}
|
|
4402
4481
|
listInputFields() {
|
|
4403
|
-
return
|
|
4482
|
+
return h().listInputFields(this.handle);
|
|
4404
4483
|
}
|
|
4405
4484
|
listOutputFields() {
|
|
4406
|
-
return
|
|
4485
|
+
return h().listOutputFields(this.handle);
|
|
4407
4486
|
}
|
|
4408
4487
|
listDynamicFields() {
|
|
4409
|
-
return
|
|
4488
|
+
return h().listDynamicFields(this.handle);
|
|
4410
4489
|
}
|
|
4411
4490
|
getKeyValueBase64(e) {
|
|
4412
|
-
return
|
|
4491
|
+
return h().getKeyValueBase64(this.handle, e);
|
|
4413
4492
|
}
|
|
4414
4493
|
getKeyValueAsString(e) {
|
|
4415
|
-
return
|
|
4494
|
+
return h().getKeyValueAsString(this.handle, e);
|
|
4416
4495
|
}
|
|
4417
4496
|
getKeyValueAsJson(e) {
|
|
4418
4497
|
const n = this.getKeyValueAsString(e);
|
|
@@ -4420,10 +4499,10 @@
|
|
|
4420
4499
|
return JSON.parse(n);
|
|
4421
4500
|
}
|
|
4422
4501
|
getDataBase64() {
|
|
4423
|
-
return
|
|
4502
|
+
return h().getDataBase64(this.handle);
|
|
4424
4503
|
}
|
|
4425
4504
|
getDataAsString() {
|
|
4426
|
-
return
|
|
4505
|
+
return h().getDataAsString(this.handle);
|
|
4427
4506
|
}
|
|
4428
4507
|
getDataAsJson() {
|
|
4429
4508
|
const e = this.getDataAsString();
|
|
@@ -4434,39 +4513,39 @@
|
|
|
4434
4513
|
*
|
|
4435
4514
|
*/
|
|
4436
4515
|
getPColumns(e = false, n = "") {
|
|
4437
|
-
const
|
|
4438
|
-
return
|
|
4439
|
-
if (!
|
|
4440
|
-
return
|
|
4516
|
+
const r = this.parsePObjectCollection(e, n);
|
|
4517
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
4518
|
+
if (!q$1(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
4519
|
+
return s;
|
|
4441
4520
|
});
|
|
4442
4521
|
}
|
|
4443
4522
|
/**
|
|
4444
4523
|
*
|
|
4445
4524
|
*/
|
|
4446
4525
|
parsePObjectCollection(e = false, n = "") {
|
|
4447
|
-
const
|
|
4526
|
+
const r = h().parsePObjectCollection(
|
|
4448
4527
|
this.handle,
|
|
4449
4528
|
e,
|
|
4450
4529
|
n,
|
|
4451
4530
|
...this.resolvePath
|
|
4452
4531
|
);
|
|
4453
|
-
if (
|
|
4532
|
+
if (r === void 0) return;
|
|
4454
4533
|
const i = {};
|
|
4455
|
-
for (const [
|
|
4456
|
-
const
|
|
4457
|
-
i[
|
|
4534
|
+
for (const [s, o] of Object.entries(r)) {
|
|
4535
|
+
const a = [...this.resolvePath, s];
|
|
4536
|
+
i[s] = jn(o, (c) => new I(c, a));
|
|
4458
4537
|
}
|
|
4459
4538
|
return i;
|
|
4460
4539
|
}
|
|
4461
4540
|
getFileContentAsBase64() {
|
|
4462
|
-
return new S(
|
|
4541
|
+
return new S(h().getBlobContentAsBase64(this.handle));
|
|
4463
4542
|
}
|
|
4464
4543
|
getFileContentAsString() {
|
|
4465
|
-
return new S(
|
|
4544
|
+
return new S(h().getBlobContentAsString(this.handle));
|
|
4466
4545
|
}
|
|
4467
4546
|
getFileContentAsJson() {
|
|
4468
4547
|
return new S(
|
|
4469
|
-
|
|
4548
|
+
h().getBlobContentAsString(this.handle)
|
|
4470
4549
|
).mapDefined((e) => JSON.parse(e));
|
|
4471
4550
|
}
|
|
4472
4551
|
/**
|
|
@@ -4485,7 +4564,7 @@
|
|
|
4485
4564
|
* @returns downloaded file handle
|
|
4486
4565
|
*/
|
|
4487
4566
|
getFileHandle() {
|
|
4488
|
-
return new S(
|
|
4567
|
+
return new S(h().getDownloadedBlobContentHandle(this.handle));
|
|
4489
4568
|
}
|
|
4490
4569
|
/**
|
|
4491
4570
|
* @deprecated use getFileHandle
|
|
@@ -4497,7 +4576,7 @@
|
|
|
4497
4576
|
* @returns downloaded file handle
|
|
4498
4577
|
*/
|
|
4499
4578
|
getRemoteFileHandle() {
|
|
4500
|
-
return new S(
|
|
4579
|
+
return new S(h().getOnDemandBlobContentHandle(this.handle));
|
|
4501
4580
|
}
|
|
4502
4581
|
/**
|
|
4503
4582
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4509,22 +4588,22 @@
|
|
|
4509
4588
|
* @returns the url to the extracted folder
|
|
4510
4589
|
*/
|
|
4511
4590
|
extractArchiveAndGetURL(e) {
|
|
4512
|
-
return new S(
|
|
4591
|
+
return new S(h().extractArchiveAndGetURL(this.handle, e));
|
|
4513
4592
|
}
|
|
4514
4593
|
getImportProgress() {
|
|
4515
|
-
return new S(
|
|
4594
|
+
return new S(h().getImportProgress(this.handle));
|
|
4516
4595
|
}
|
|
4517
4596
|
getLastLogs(e) {
|
|
4518
|
-
return new S(
|
|
4597
|
+
return new S(h().getLastLogs(this.handle, e));
|
|
4519
4598
|
}
|
|
4520
4599
|
getProgressLog(e) {
|
|
4521
|
-
return new S(
|
|
4600
|
+
return new S(h().getProgressLog(this.handle, e));
|
|
4522
4601
|
}
|
|
4523
4602
|
getProgressLogWithInfo(e) {
|
|
4524
|
-
return new S(
|
|
4603
|
+
return new S(h().getProgressLogWithInfo(this.handle, e));
|
|
4525
4604
|
}
|
|
4526
4605
|
getLogHandle() {
|
|
4527
|
-
return new S(
|
|
4606
|
+
return new S(h().getLogHandle(this.handle));
|
|
4528
4607
|
}
|
|
4529
4608
|
allFieldsResolved(e = "Input") {
|
|
4530
4609
|
switch (e) {
|
|
@@ -4539,178 +4618,340 @@
|
|
|
4539
4618
|
}
|
|
4540
4619
|
}
|
|
4541
4620
|
mapFields(e, n) {
|
|
4542
|
-
const { fieldType:
|
|
4621
|
+
const { fieldType: r, requireLocked: i, skipUnresolved: s } = {
|
|
4543
4622
|
fieldType: "Input",
|
|
4544
4623
|
requireLocked: true,
|
|
4545
4624
|
skipUnresolved: false,
|
|
4546
4625
|
...n
|
|
4547
4626
|
}, o = e;
|
|
4548
|
-
if (i && (
|
|
4627
|
+
if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
4549
4628
|
return;
|
|
4550
|
-
let
|
|
4551
|
-
(
|
|
4629
|
+
let c = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4630
|
+
(l2) => [l2, this.resolve({ field: l2, assertFieldType: r })]
|
|
4552
4631
|
);
|
|
4553
|
-
return
|
|
4632
|
+
return s && (c = c.filter((l2) => l2[1] !== void 0)), c.map(([l2, m2]) => o(l2, m2));
|
|
4554
4633
|
}
|
|
4555
4634
|
}
|
|
4556
|
-
const
|
|
4557
|
-
const
|
|
4558
|
-
type: z.string(),
|
|
4559
|
-
importance: z.number().optional(),
|
|
4560
|
-
id: z.string().optional(),
|
|
4561
|
-
label: z.string()
|
|
4562
|
-
}),
|
|
4563
|
-
function
|
|
4564
|
-
const
|
|
4565
|
-
var
|
|
4566
|
-
const
|
|
4567
|
-
let d, y,
|
|
4568
|
-
"spec" in
|
|
4569
|
-
const
|
|
4635
|
+
const ve = "staging", we = "main";
|
|
4636
|
+
const Ue = "pl7.app/label", Me = "pl7.app/trace", Ge = z$2.object({
|
|
4637
|
+
type: z$2.string(),
|
|
4638
|
+
importance: z$2.number().optional(),
|
|
4639
|
+
id: z$2.string().optional(),
|
|
4640
|
+
label: z$2.string()
|
|
4641
|
+
}), We = z$2.array(Ge), He = 1e-3, qe = "__LABEL__", pe = "__LABEL__@1";
|
|
4642
|
+
function de(t, e, n = {}) {
|
|
4643
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((f2) => {
|
|
4644
|
+
var R, k2;
|
|
4645
|
+
const p2 = e(f2);
|
|
4646
|
+
let d, y, g2;
|
|
4647
|
+
"spec" in p2 && typeof p2.spec == "object" ? (d = p2.spec, y = p2.prefixTrace, g2 = p2.suffixTrace) : d = p2;
|
|
4648
|
+
const v = (R = d.annotations) == null ? void 0 : R[Ue], w2 = (k2 = d.annotations) == null ? void 0 : k2[Me], x2 = (w2 ? We.safeParse(JSON.parse(w2)).data : void 0) ?? [], C = [
|
|
4570
4649
|
...y ?? [],
|
|
4571
|
-
...
|
|
4572
|
-
...
|
|
4650
|
+
...x2,
|
|
4651
|
+
...g2 ?? []
|
|
4573
4652
|
];
|
|
4574
|
-
if (
|
|
4575
|
-
const
|
|
4576
|
-
n.addLabelAsSuffix ?
|
|
4577
|
-
}
|
|
4578
|
-
const
|
|
4579
|
-
for (let
|
|
4580
|
-
const { type:
|
|
4581
|
-
|
|
4582
|
-
const
|
|
4583
|
-
i.set(
|
|
4584
|
-
|
|
4653
|
+
if (v) {
|
|
4654
|
+
const A = { label: v, type: qe, importance: -2 };
|
|
4655
|
+
n.addLabelAsSuffix ? C.push(A) : C.splice(0, 0, A);
|
|
4656
|
+
}
|
|
4657
|
+
const P2 = [], F = /* @__PURE__ */ new Map();
|
|
4658
|
+
for (let A = C.length - 1; A >= 0; --A) {
|
|
4659
|
+
const { type: j } = C[A], V = C[A].importance ?? 0, K = (F.get(j) ?? 0) + 1;
|
|
4660
|
+
F.set(j, K);
|
|
4661
|
+
const $2 = `${j}@${K}`;
|
|
4662
|
+
i.set($2, (i.get($2) ?? 0) + 1), r.set(
|
|
4663
|
+
$2,
|
|
4585
4664
|
Math.max(
|
|
4586
|
-
|
|
4587
|
-
|
|
4665
|
+
r.get($2) ?? Number.NEGATIVE_INFINITY,
|
|
4666
|
+
V - (C.length - A) * He
|
|
4588
4667
|
)
|
|
4589
|
-
),
|
|
4668
|
+
), P2.push({ ...C[A], fullType: $2, occurenceIndex: K });
|
|
4590
4669
|
}
|
|
4591
|
-
return
|
|
4592
|
-
value:
|
|
4670
|
+
return P2.reverse(), {
|
|
4671
|
+
value: f2,
|
|
4593
4672
|
spec: d,
|
|
4594
|
-
label:
|
|
4595
|
-
fullTrace:
|
|
4673
|
+
label: v,
|
|
4674
|
+
fullTrace: P2
|
|
4596
4675
|
};
|
|
4597
|
-
}), o = [],
|
|
4598
|
-
|
|
4599
|
-
for (const [
|
|
4600
|
-
|
|
4601
|
-
const
|
|
4602
|
-
const d =
|
|
4676
|
+
}), o = [], a = [], c = [...r];
|
|
4677
|
+
c.sort(([, f2], [, p2]) => p2 - f2);
|
|
4678
|
+
for (const [f2] of c)
|
|
4679
|
+
f2.endsWith("@1") || i.get(f2) === t.length ? o.push(f2) : a.push(f2);
|
|
4680
|
+
const l2 = (f2) => s.map((p2) => {
|
|
4681
|
+
const d = p2.fullTrace.filter((g2) => f2.has(g2.fullType)).map((g2) => g2.label), y = n.separator ?? " / ";
|
|
4603
4682
|
return {
|
|
4604
4683
|
label: d.join(y),
|
|
4605
|
-
value:
|
|
4684
|
+
value: p2.value
|
|
4606
4685
|
};
|
|
4607
4686
|
});
|
|
4608
4687
|
if (o.length === 0) {
|
|
4609
|
-
if (
|
|
4610
|
-
return
|
|
4611
|
-
}
|
|
4612
|
-
let
|
|
4613
|
-
for (;
|
|
4614
|
-
const
|
|
4615
|
-
n.includeNativeLabel &&
|
|
4616
|
-
for (let d = 0; d <
|
|
4617
|
-
|
|
4618
|
-
const
|
|
4619
|
-
if (new Set(
|
|
4620
|
-
|
|
4621
|
-
}
|
|
4622
|
-
return
|
|
4688
|
+
if (a.length !== 0) throw new Error("Assertion error.");
|
|
4689
|
+
return l2(new Set(pe));
|
|
4690
|
+
}
|
|
4691
|
+
let m2 = 0, u = 0;
|
|
4692
|
+
for (; m2 < o.length; ) {
|
|
4693
|
+
const f2 = /* @__PURE__ */ new Set();
|
|
4694
|
+
n.includeNativeLabel && f2.add(pe);
|
|
4695
|
+
for (let d = 0; d < m2; ++d) f2.add(o[d]);
|
|
4696
|
+
f2.add(o[u]);
|
|
4697
|
+
const p2 = l2(f2);
|
|
4698
|
+
if (new Set(p2.map((d) => d.label)).size === t.length) return p2;
|
|
4699
|
+
u++, u == o.length && (m2++, u = m2);
|
|
4700
|
+
}
|
|
4701
|
+
return l2(/* @__PURE__ */ new Set([...o, ...a]));
|
|
4623
4702
|
}
|
|
4624
|
-
const
|
|
4625
|
-
const
|
|
4626
|
-
if (
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
}
|
|
4703
|
+
const H = "PColumnData/", Q = H + "ResourceMap", Z = H + "Partitioned/ResourceMap", N = H + "JsonPartitioned", O = H + "BinaryPartitioned", Ae = H + "Partitioned/", ee = Ae + "JsonPartitioned", B = Ae + "BinaryPartitioned";
|
|
4704
|
+
const ae = (t) => {
|
|
4705
|
+
if (t.endsWith(".index"))
|
|
4706
|
+
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4707
|
+
if (t.endsWith(".values"))
|
|
4708
|
+
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4709
|
+
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4631
4710
|
};
|
|
4632
|
-
function
|
|
4711
|
+
function ze(t) {
|
|
4633
4712
|
if (!t) return;
|
|
4634
|
-
const e = t.resourceType.name, n = t.getDataAsJson(),
|
|
4713
|
+
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
4635
4714
|
let i = 0;
|
|
4636
4715
|
switch (e) {
|
|
4637
|
-
case
|
|
4716
|
+
case Q:
|
|
4638
4717
|
i = n.keyLength;
|
|
4639
4718
|
break;
|
|
4640
|
-
case
|
|
4719
|
+
case Z:
|
|
4641
4720
|
i = n.partitionKeyLength + n.keyLength;
|
|
4642
4721
|
break;
|
|
4643
|
-
case
|
|
4644
|
-
case
|
|
4722
|
+
case N:
|
|
4723
|
+
case O:
|
|
4645
4724
|
i = n.partitionKeyLength;
|
|
4646
4725
|
break;
|
|
4726
|
+
case B:
|
|
4647
4727
|
case ee:
|
|
4648
|
-
case pe:
|
|
4649
4728
|
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
4650
4729
|
break;
|
|
4651
4730
|
}
|
|
4652
4731
|
switch (e) {
|
|
4653
|
-
case
|
|
4654
|
-
case
|
|
4655
|
-
case
|
|
4656
|
-
for (let
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
else continue;
|
|
4661
|
-
}
|
|
4662
|
-
const o = [...JSON.parse(r)];
|
|
4663
|
-
s.push(o);
|
|
4732
|
+
case Q:
|
|
4733
|
+
case N:
|
|
4734
|
+
case O:
|
|
4735
|
+
for (let s of t.listInputFields()) {
|
|
4736
|
+
e === O && (s = ae(s).baseKey);
|
|
4737
|
+
const o = [...JSON.parse(s)];
|
|
4738
|
+
r.push(o);
|
|
4664
4739
|
}
|
|
4665
4740
|
break;
|
|
4666
|
-
case
|
|
4741
|
+
case Z:
|
|
4742
|
+
case B:
|
|
4667
4743
|
case ee:
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
if (h2) c2 = h2;
|
|
4676
|
-
else continue;
|
|
4677
|
-
}
|
|
4678
|
-
const a = [...o, ...JSON.parse(c2)];
|
|
4679
|
-
s.push(a);
|
|
4744
|
+
for (const s of t.listInputFields()) {
|
|
4745
|
+
const o = [...JSON.parse(s)], a = t.resolve({ field: s, assertFieldType: "Input" });
|
|
4746
|
+
if (a !== void 0)
|
|
4747
|
+
for (let c of a.listInputFields()) {
|
|
4748
|
+
e === B && (c = ae(c).baseKey);
|
|
4749
|
+
const l2 = [...o, ...JSON.parse(c)];
|
|
4750
|
+
r.push(l2);
|
|
4680
4751
|
}
|
|
4681
4752
|
}
|
|
4682
4753
|
break;
|
|
4683
4754
|
}
|
|
4684
|
-
return { data:
|
|
4755
|
+
return { data: r, keyLength: i };
|
|
4685
4756
|
}
|
|
4686
|
-
function
|
|
4687
|
-
const e =
|
|
4757
|
+
function Ye(t) {
|
|
4758
|
+
const e = ze(t);
|
|
4688
4759
|
if (!e) return;
|
|
4689
|
-
const { data: n, keyLength:
|
|
4690
|
-
for (let
|
|
4760
|
+
const { data: n, keyLength: r } = e, i = [];
|
|
4761
|
+
for (let s = 0; s < r; ++s)
|
|
4691
4762
|
i.push(/* @__PURE__ */ new Set());
|
|
4692
|
-
for (const
|
|
4693
|
-
if (
|
|
4763
|
+
for (const s of n) {
|
|
4764
|
+
if (s.length !== r)
|
|
4694
4765
|
throw new Error("key length does not match partition length");
|
|
4695
|
-
for (let o = 0; o <
|
|
4696
|
-
i[o].add(
|
|
4766
|
+
for (let o = 0; o < r; ++o)
|
|
4767
|
+
i[o].add(s[o]);
|
|
4768
|
+
}
|
|
4769
|
+
return i.map((s) => Array.from(s.values()));
|
|
4770
|
+
}
|
|
4771
|
+
function le(t, e = []) {
|
|
4772
|
+
if (t === void 0) return;
|
|
4773
|
+
const n = t.resourceType.name, r = t.getDataAsJson();
|
|
4774
|
+
if (e.length > 0 && (n === ee || n === B))
|
|
4775
|
+
throw new Error(`Unexpected nested super-partitioned resource: ${n}`);
|
|
4776
|
+
switch (n) {
|
|
4777
|
+
case Q:
|
|
4778
|
+
case Z:
|
|
4779
|
+
throw new Error(`Only data columns are supported, got: ${n}`);
|
|
4780
|
+
case N: {
|
|
4781
|
+
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4782
|
+
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
4783
|
+
const i = [];
|
|
4784
|
+
for (const s of t.listInputFields()) {
|
|
4785
|
+
const o = t.resolve({ field: s, assertFieldType: "Input" });
|
|
4786
|
+
if (o === void 0) return;
|
|
4787
|
+
const a = [...e, ...JSON.parse(s)];
|
|
4788
|
+
i.push({ key: a, value: o });
|
|
4789
|
+
}
|
|
4790
|
+
return {
|
|
4791
|
+
type: "JsonPartitioned",
|
|
4792
|
+
partitionKeyLength: r.partitionKeyLength,
|
|
4793
|
+
parts: i
|
|
4794
|
+
};
|
|
4795
|
+
}
|
|
4796
|
+
case O: {
|
|
4797
|
+
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4798
|
+
throw new Error(`Missing partitionKeyLength in metadata for ${n}`);
|
|
4799
|
+
const i = [], s = /* @__PURE__ */ new Map();
|
|
4800
|
+
for (const o of t.listInputFields()) {
|
|
4801
|
+
const a = ae(o), c = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4802
|
+
if (c === void 0) return;
|
|
4803
|
+
let l2 = s.get(a.baseKey);
|
|
4804
|
+
l2 || (l2 = {}, s.set(a.baseKey, l2)), a.type === "index" ? l2.index = c : l2.values = c;
|
|
4805
|
+
}
|
|
4806
|
+
for (const [o, a] of s.entries()) {
|
|
4807
|
+
if (!a.index || !a.values) return;
|
|
4808
|
+
const c = [...e, ...JSON.parse(o)];
|
|
4809
|
+
i.push({
|
|
4810
|
+
key: c,
|
|
4811
|
+
value: {
|
|
4812
|
+
index: a.index,
|
|
4813
|
+
values: a.values
|
|
4814
|
+
}
|
|
4815
|
+
});
|
|
4816
|
+
}
|
|
4817
|
+
return {
|
|
4818
|
+
type: "BinaryPartitioned",
|
|
4819
|
+
partitionKeyLength: r.partitionKeyLength,
|
|
4820
|
+
parts: i
|
|
4821
|
+
};
|
|
4822
|
+
}
|
|
4823
|
+
case ee: {
|
|
4824
|
+
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4825
|
+
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
4826
|
+
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
4827
|
+
for (const o of t.listInputFields()) {
|
|
4828
|
+
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4829
|
+
if (a === void 0) return;
|
|
4830
|
+
if (a.resourceType.name !== N)
|
|
4831
|
+
throw new Error(`Expected ${N} inside ${n}, but got ${a.resourceType.name}`);
|
|
4832
|
+
const c = le(a, JSON.parse(o));
|
|
4833
|
+
if (c === void 0) return;
|
|
4834
|
+
if (c.type !== "JsonPartitioned")
|
|
4835
|
+
throw new Error(`Unexpected inner result type for ${n}: ${c.type}`);
|
|
4836
|
+
s.push(...c.parts);
|
|
4837
|
+
}
|
|
4838
|
+
return {
|
|
4839
|
+
type: "JsonPartitioned",
|
|
4840
|
+
partitionKeyLength: i,
|
|
4841
|
+
parts: s
|
|
4842
|
+
};
|
|
4843
|
+
}
|
|
4844
|
+
case B: {
|
|
4845
|
+
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
4846
|
+
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n}`);
|
|
4847
|
+
const i = r.superPartitionKeyLength + r.partitionKeyLength, s = [];
|
|
4848
|
+
for (const o of t.listInputFields()) {
|
|
4849
|
+
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
4850
|
+
if (a === void 0) return;
|
|
4851
|
+
if (a.resourceType.name !== O)
|
|
4852
|
+
throw new Error(`Expected ${O} inside ${n}, but got ${a.resourceType.name}`);
|
|
4853
|
+
const c = le(a, JSON.parse(o));
|
|
4854
|
+
if (c === void 0) return;
|
|
4855
|
+
if (c.type !== "BinaryPartitioned")
|
|
4856
|
+
throw new Error(`Unexpected inner result type for ${n}: ${c.type}`);
|
|
4857
|
+
s.push(...c.parts);
|
|
4858
|
+
}
|
|
4859
|
+
return {
|
|
4860
|
+
type: "BinaryPartitioned",
|
|
4861
|
+
partitionKeyLength: i,
|
|
4862
|
+
parts: s
|
|
4863
|
+
};
|
|
4864
|
+
}
|
|
4865
|
+
default:
|
|
4866
|
+
throw new Error(`Unknown resource type: ${n}`);
|
|
4867
|
+
}
|
|
4868
|
+
}
|
|
4869
|
+
function Xe(t, e) {
|
|
4870
|
+
const n = [...e].sort((s, o) => o[0] - s[0]);
|
|
4871
|
+
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
4872
|
+
const { partitionKeyLength: s } = t;
|
|
4873
|
+
for (const [o] of e)
|
|
4874
|
+
if (o >= s)
|
|
4875
|
+
throw new Error(`Can't filter on non-partitioned axis ${o}. Must be >= ${s}`);
|
|
4876
|
+
} else if (t.type === "Json") {
|
|
4877
|
+
const { keyLength: s } = t;
|
|
4878
|
+
for (const [o] of e)
|
|
4879
|
+
if (o >= s)
|
|
4880
|
+
throw new Error(`Can't filter on non-data axis ${o}. Must be >= ${s}`);
|
|
4881
|
+
}
|
|
4882
|
+
const r = (s) => {
|
|
4883
|
+
for (const [o, a] of n)
|
|
4884
|
+
if (s[o] !== a)
|
|
4885
|
+
return false;
|
|
4886
|
+
return true;
|
|
4887
|
+
}, i = (s) => {
|
|
4888
|
+
const o = [...s];
|
|
4889
|
+
for (const [a] of n)
|
|
4890
|
+
o.splice(a, 1);
|
|
4891
|
+
return o;
|
|
4892
|
+
};
|
|
4893
|
+
switch (t.type) {
|
|
4894
|
+
case "Json": {
|
|
4895
|
+
const s = t.data.filter((o) => r(o.key)).map((o) => ({
|
|
4896
|
+
key: i(o.key),
|
|
4897
|
+
value: o.value
|
|
4898
|
+
}));
|
|
4899
|
+
return {
|
|
4900
|
+
type: "Json",
|
|
4901
|
+
keyLength: t.keyLength - e.length,
|
|
4902
|
+
data: s
|
|
4903
|
+
};
|
|
4904
|
+
}
|
|
4905
|
+
case "JsonPartitioned": {
|
|
4906
|
+
const s = t.parts.filter((o) => r(o.key)).map((o) => ({
|
|
4907
|
+
key: i(o.key),
|
|
4908
|
+
value: o.value
|
|
4909
|
+
}));
|
|
4910
|
+
return {
|
|
4911
|
+
type: "JsonPartitioned",
|
|
4912
|
+
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
4913
|
+
parts: s
|
|
4914
|
+
};
|
|
4915
|
+
}
|
|
4916
|
+
case "BinaryPartitioned": {
|
|
4917
|
+
const s = t.parts.filter((o) => r(o.key)).map((o) => ({
|
|
4918
|
+
key: i(o.key),
|
|
4919
|
+
value: o.value
|
|
4920
|
+
}));
|
|
4921
|
+
return {
|
|
4922
|
+
type: "BinaryPartitioned",
|
|
4923
|
+
partitionKeyLength: t.partitionKeyLength - e.length,
|
|
4924
|
+
parts: s
|
|
4925
|
+
};
|
|
4926
|
+
}
|
|
4697
4927
|
}
|
|
4698
|
-
return i.map((r) => Array.from(r.values()));
|
|
4699
4928
|
}
|
|
4700
|
-
function
|
|
4929
|
+
function re(t, e) {
|
|
4701
4930
|
if (t === void 0) return e === void 0;
|
|
4702
4931
|
if (e === void 0) return true;
|
|
4703
4932
|
for (const n in e)
|
|
4704
4933
|
if (t[n] !== e[n]) return false;
|
|
4705
4934
|
return true;
|
|
4706
4935
|
}
|
|
4707
|
-
|
|
4936
|
+
function fe(t) {
|
|
4937
|
+
return jn(t, (e) => e instanceof I ? e.handle : yn(e) ? mn(e, (n) => n.handle) : e);
|
|
4938
|
+
}
|
|
4939
|
+
function Qe(t) {
|
|
4940
|
+
if (t)
|
|
4941
|
+
return t.map((e) => ({
|
|
4942
|
+
type: `split:${Sn(e.axisId)}`,
|
|
4943
|
+
label: e.label,
|
|
4944
|
+
importance: 1e6
|
|
4945
|
+
// High importance for split filters in labels
|
|
4946
|
+
}));
|
|
4947
|
+
}
|
|
4948
|
+
function Ze(t) {
|
|
4949
|
+
if (t)
|
|
4950
|
+
return t.map((e) => [e.axisIdx, e.value]);
|
|
4951
|
+
}
|
|
4952
|
+
class et {
|
|
4708
4953
|
constructor() {
|
|
4709
|
-
|
|
4710
|
-
x(this, "defaultLabelFn", (e, n) => {
|
|
4711
|
-
var s;
|
|
4712
|
-
return ((s = e.annotations) == null ? void 0 : s["pl7.app/label"]) ?? "Unlabelled";
|
|
4713
|
-
});
|
|
4954
|
+
T(this, "ctx", h());
|
|
4714
4955
|
}
|
|
4715
4956
|
/**
|
|
4716
4957
|
* @deprecated use getOptions()
|
|
@@ -4719,87 +4960,199 @@
|
|
|
4719
4960
|
return this.ctx.calculateOptions(e);
|
|
4720
4961
|
}
|
|
4721
4962
|
getOptions(e, n) {
|
|
4722
|
-
const
|
|
4723
|
-
return typeof n == "object" || typeof n > "u" ?
|
|
4724
|
-
ref:
|
|
4963
|
+
const r = typeof e == "function" ? e : In(e), i = this.getSpecs().entries.filter((s) => r(s.obj));
|
|
4964
|
+
return typeof n == "object" || typeof n > "u" ? de(i, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: o }) => ({
|
|
4965
|
+
ref: s,
|
|
4725
4966
|
label: o
|
|
4726
|
-
})) : i.map((
|
|
4727
|
-
ref:
|
|
4728
|
-
label: n(
|
|
4967
|
+
})) : i.map((s) => ({
|
|
4968
|
+
ref: s.ref,
|
|
4969
|
+
label: n(s.obj, s.ref)
|
|
4729
4970
|
}));
|
|
4730
4971
|
}
|
|
4731
|
-
|
|
4732
|
-
|
|
4972
|
+
/**
|
|
4973
|
+
* Internal implementation that generates UniversalPColumnEntry objects from the provided
|
|
4974
|
+
* anchors and selectors.
|
|
4975
|
+
*/
|
|
4976
|
+
getUniversalPColumnEntries(e, n, r) {
|
|
4733
4977
|
const i = {};
|
|
4734
|
-
if (!(e instanceof
|
|
4735
|
-
for (const [
|
|
4736
|
-
if (
|
|
4737
|
-
const
|
|
4738
|
-
if (!
|
|
4978
|
+
if (!(e instanceof On))
|
|
4979
|
+
for (const [l2, m2] of Object.entries(e))
|
|
4980
|
+
if (Kn(m2)) {
|
|
4981
|
+
const u = this.getPColumnSpecByRef(m2);
|
|
4982
|
+
if (!u)
|
|
4739
4983
|
return;
|
|
4740
|
-
i[
|
|
4984
|
+
i[l2] = u;
|
|
4741
4985
|
} else
|
|
4742
|
-
i[
|
|
4743
|
-
const
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
if (!y) continue;
|
|
4757
|
-
if (h2 >= y.length)
|
|
4758
|
-
throw new Error(`Not enough partition keys for the requested split axes in column ${f.name}`);
|
|
4759
|
-
const _ = c$1.map((m2) => this.findLabels(p(f.axesSpec[m2]))), A = [], v$1 = (m2, w2) => {
|
|
4760
|
-
if (w2 >= c$1.length) {
|
|
4761
|
-
A.push([...m2]);
|
|
4986
|
+
i[l2] = m2;
|
|
4987
|
+
const s = typeof n == "function" ? [n] : Array.isArray(n) ? n : [n], o = e instanceof On ? e : new On(i), a = [];
|
|
4988
|
+
for (const l2 of s) {
|
|
4989
|
+
const m$1 = typeof l2 == "function" ? l2 : In(Jn(i, l2)), u = this.getSpecs().entries.filter(({ obj: p2 }) => f(p2) ? m$1(p2) : false);
|
|
4990
|
+
if (u.length === 0)
|
|
4991
|
+
continue;
|
|
4992
|
+
const f$1 = typeof l2 == "object" && "axes" in l2 && l2.axes !== void 0 && l2.partialAxesMatch === void 0 ? l2.axes.map((p2, d) => "split" in p2 && p2.split === true ? d : -1).filter((p2) => p2 !== -1) : [];
|
|
4993
|
+
if (f$1.sort((p2, d) => p2 - d), f$1.length > 0) {
|
|
4994
|
+
const p2 = f$1[f$1.length - 1];
|
|
4995
|
+
for (const { ref: d, obj: y } of u) {
|
|
4996
|
+
if (!f(y)) throw new Error(`Assertion failed: expected PColumnSpec, got ${y.kind}`);
|
|
4997
|
+
const g2 = this.getDataByRef(d);
|
|
4998
|
+
if (!g2) {
|
|
4999
|
+
if (r != null && r.dontWaitAllData) continue;
|
|
4762
5000
|
return;
|
|
4763
5001
|
}
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
}
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
5002
|
+
if (!q$1(g2)) throw new Error(`Assertion failed: expected PColumn, got ${g2.spec.kind}`);
|
|
5003
|
+
const v = Ye(g2.data);
|
|
5004
|
+
if (!v) {
|
|
5005
|
+
if (r != null && r.dontWaitAllData) continue;
|
|
5006
|
+
return;
|
|
5007
|
+
}
|
|
5008
|
+
if (p2 >= v.length)
|
|
5009
|
+
throw new Error(`Not enough partition keys for the requested split axes in column ${y.name}`);
|
|
5010
|
+
const w2 = f$1.map((P2) => this.findLabels(m(y.axesSpec[P2]))), x2 = [], C = (P2, F) => {
|
|
5011
|
+
if (F >= f$1.length) {
|
|
5012
|
+
x2.push([...P2]);
|
|
5013
|
+
return;
|
|
5014
|
+
}
|
|
5015
|
+
const R = f$1[F], k2 = v[R];
|
|
5016
|
+
for (const A of k2)
|
|
5017
|
+
P2.push(A), C(P2, F + 1), P2.pop();
|
|
5018
|
+
};
|
|
5019
|
+
C([], 0);
|
|
5020
|
+
for (const P2 of x2) {
|
|
5021
|
+
const F = P2.map((R, k2) => {
|
|
5022
|
+
const A = f$1[k2], j = m(y.axesSpec[A]), V = w2[k2], K = (V == null ? void 0 : V[R]) ?? String(R);
|
|
5023
|
+
return { axisIdx: A, axisId: j, value: R, label: K };
|
|
5024
|
+
});
|
|
5025
|
+
a.push({
|
|
5026
|
+
obj: y,
|
|
5027
|
+
ref: d,
|
|
5028
|
+
axisFilters: F
|
|
5029
|
+
});
|
|
5030
|
+
}
|
|
4784
5031
|
}
|
|
4785
|
-
}
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
s ?? {}
|
|
4793
|
-
).map((l) => ({
|
|
4794
|
-
value: u.deriveS(l.value.obj, l.value.filters),
|
|
4795
|
-
label: l.label
|
|
4796
|
-
}));
|
|
5032
|
+
} else
|
|
5033
|
+
for (const { ref: p2, obj: d } of u)
|
|
5034
|
+
f(d) && a.push({
|
|
5035
|
+
obj: d,
|
|
5036
|
+
ref: p2
|
|
5037
|
+
// No splitFilters needed here
|
|
5038
|
+
});
|
|
4797
5039
|
}
|
|
4798
|
-
return
|
|
4799
|
-
|
|
4800
|
-
|
|
5040
|
+
return a.length === 0 ? [] : de(
|
|
5041
|
+
a,
|
|
5042
|
+
(l2) => ({
|
|
5043
|
+
spec: l2.obj,
|
|
5044
|
+
suffixTrace: Qe(l2.axisFilters)
|
|
5045
|
+
// Use helper function
|
|
5046
|
+
}),
|
|
5047
|
+
(r == null ? void 0 : r.labelOps) ?? {}
|
|
5048
|
+
).map((l2) => ({
|
|
5049
|
+
id: o.deriveS(
|
|
5050
|
+
l2.value.obj,
|
|
5051
|
+
Ze(l2.value.axisFilters)
|
|
5052
|
+
// Use helper function
|
|
5053
|
+
),
|
|
5054
|
+
obj: l2.value.obj,
|
|
5055
|
+
ref: l2.value.ref,
|
|
5056
|
+
axisFilters: l2.value.axisFilters,
|
|
5057
|
+
label: l2.label
|
|
4801
5058
|
}));
|
|
4802
5059
|
}
|
|
5060
|
+
/**
|
|
5061
|
+
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
5062
|
+
*
|
|
5063
|
+
* @param anchorsOrCtx - Anchor context for column selection (same as in getCanonicalOptions)
|
|
5064
|
+
* @param predicateOrSelectors - Predicate or selectors for filtering columns (same as in getCanonicalOptions)
|
|
5065
|
+
* @param opts - Optional configuration for label generation and data waiting
|
|
5066
|
+
* @returns A PFrameHandle for the created PFrame, or undefined if any required data is missing
|
|
5067
|
+
*/
|
|
5068
|
+
getAnchoredPColumns(e, n, r) {
|
|
5069
|
+
const i = {
|
|
5070
|
+
...r,
|
|
5071
|
+
labelOps: {
|
|
5072
|
+
includeNativeLabel: true,
|
|
5073
|
+
...(r == null ? void 0 : r.labelOps) || {}
|
|
5074
|
+
}
|
|
5075
|
+
}, s = this.getUniversalPColumnEntries(
|
|
5076
|
+
e,
|
|
5077
|
+
n,
|
|
5078
|
+
i
|
|
5079
|
+
);
|
|
5080
|
+
if (!s || s.length === 0) return;
|
|
5081
|
+
const o = [];
|
|
5082
|
+
for (const a of s) {
|
|
5083
|
+
const c = this.getPColumnByRef(a.ref);
|
|
5084
|
+
if (!c) return;
|
|
5085
|
+
const l2 = le(c.data);
|
|
5086
|
+
if (!l2) return;
|
|
5087
|
+
let m2 = l2, u = { ...c.spec };
|
|
5088
|
+
if (a.axisFilters && a.axisFilters.length > 0) {
|
|
5089
|
+
const p2 = a.axisFilters.map((g2) => [
|
|
5090
|
+
g2.axisIdx,
|
|
5091
|
+
g2.value
|
|
5092
|
+
]);
|
|
5093
|
+
m2 = Xe(l2, p2);
|
|
5094
|
+
const d = [...a.axisFilters].map((g2) => g2.axisIdx).sort((g2, v) => v - g2), y = [...u.axesSpec];
|
|
5095
|
+
for (const g2 of d)
|
|
5096
|
+
y.splice(g2, 1);
|
|
5097
|
+
u = { ...u, axesSpec: y };
|
|
5098
|
+
}
|
|
5099
|
+
const f2 = bn(m2);
|
|
5100
|
+
u.annotations ? u = {
|
|
5101
|
+
...u,
|
|
5102
|
+
annotations: {
|
|
5103
|
+
...u.annotations,
|
|
5104
|
+
"pl7.app/label": a.label
|
|
5105
|
+
}
|
|
5106
|
+
} : u = {
|
|
5107
|
+
...u,
|
|
5108
|
+
annotations: {
|
|
5109
|
+
"pl7.app/label": a.label
|
|
5110
|
+
}
|
|
5111
|
+
}, o.push({
|
|
5112
|
+
id: a.id,
|
|
5113
|
+
spec: u,
|
|
5114
|
+
data: f2
|
|
5115
|
+
});
|
|
5116
|
+
}
|
|
5117
|
+
return o;
|
|
5118
|
+
}
|
|
5119
|
+
/**
|
|
5120
|
+
* Calculates anchored identifier options for columns matching a given predicate and returns their
|
|
5121
|
+
* canonicalized representations.
|
|
5122
|
+
*
|
|
5123
|
+
* This function filters column specifications from the result pool that match the provided predicate,
|
|
5124
|
+
* creates a standardized AnchorCtx from the provided anchors, and generates a list of label-value
|
|
5125
|
+
* pairs for UI components (like dropdowns).
|
|
5126
|
+
*
|
|
5127
|
+
* @param anchorsOrCtx - Either:
|
|
5128
|
+
* - An existing AnchorCtx instance
|
|
5129
|
+
* - A record mapping anchor IDs to PColumnSpec objects
|
|
5130
|
+
* - A record mapping anchor IDs to PlRef objects (which will be resolved to PColumnSpec)
|
|
5131
|
+
* @param predicateOrSelectors - Either:
|
|
5132
|
+
* - A predicate function that takes a PColumnSpec and returns a boolean.
|
|
5133
|
+
* Only specs that return true will be included.
|
|
5134
|
+
* - An APColumnSelector object for declarative filtering, which will be
|
|
5135
|
+
* resolved against the provided anchors and matched using matchPColumn.
|
|
5136
|
+
* - An array of APColumnSelector objects - columns matching ANY selector
|
|
5137
|
+
* in the array will be included (OR operation).
|
|
5138
|
+
* @param opts - Optional configuration for label generation:
|
|
5139
|
+
* - labelOps: Optional configuration for label generation:
|
|
5140
|
+
* - includeNativeLabel: Whether to include native column labels
|
|
5141
|
+
* - separator: String to use between label parts (defaults to " / ")
|
|
5142
|
+
* - addLabelAsSuffix: Whether to add labels as suffix instead of prefix
|
|
5143
|
+
* - dontWaitAllData: Whether to skip columns that don't have all data (if not set, will return undefined,
|
|
5144
|
+
* if at least one column that requires splitting is missing data)
|
|
5145
|
+
* @returns An array of objects with `label` (display text) and `value` (anchored ID string) properties,
|
|
5146
|
+
* or undefined if any PlRef resolution fails.
|
|
5147
|
+
*/
|
|
5148
|
+
getCanonicalOptions(e, n, r) {
|
|
5149
|
+
const i = this.getUniversalPColumnEntries(e, n, r);
|
|
5150
|
+
if (i)
|
|
5151
|
+
return i.map((s) => ({
|
|
5152
|
+
value: s.id,
|
|
5153
|
+
label: s.label
|
|
5154
|
+
}));
|
|
5155
|
+
}
|
|
4803
5156
|
/**
|
|
4804
5157
|
* @deprecated use getData()
|
|
4805
5158
|
*/
|
|
@@ -4833,9 +5186,9 @@
|
|
|
4833
5186
|
ref: n.ref,
|
|
4834
5187
|
obj: {
|
|
4835
5188
|
...n.obj,
|
|
4836
|
-
data:
|
|
5189
|
+
data: Mn(
|
|
4837
5190
|
n.obj.data,
|
|
4838
|
-
(
|
|
5191
|
+
(r) => new I(r, [n.ref.blockId, n.ref.name])
|
|
4839
5192
|
)
|
|
4840
5193
|
}
|
|
4841
5194
|
}))
|
|
@@ -4855,13 +5208,17 @@
|
|
|
4855
5208
|
* @returns data associated with the ref
|
|
4856
5209
|
*/
|
|
4857
5210
|
getDataByRef(e) {
|
|
4858
|
-
var
|
|
4859
|
-
|
|
4860
|
-
(
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
)
|
|
5211
|
+
var r;
|
|
5212
|
+
if (typeof this.ctx.getDataFromResultPoolByRef > "u")
|
|
5213
|
+
return (r = this.getData().entries.find(
|
|
5214
|
+
(i) => i.ref.blockId === e.blockId && i.ref.name === e.name
|
|
5215
|
+
)) == null ? void 0 : r.obj;
|
|
5216
|
+
const n = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5217
|
+
if (n)
|
|
5218
|
+
return jn(
|
|
5219
|
+
n,
|
|
5220
|
+
(i) => new I(i, [e.blockId, e.name])
|
|
5221
|
+
);
|
|
4865
5222
|
}
|
|
4866
5223
|
/**
|
|
4867
5224
|
* Returns data associated with the ref ensuring that it is a p-column.
|
|
@@ -4871,7 +5228,7 @@
|
|
|
4871
5228
|
getPColumnByRef(e) {
|
|
4872
5229
|
const n = this.getDataByRef(e);
|
|
4873
5230
|
if (n)
|
|
4874
|
-
return
|
|
5231
|
+
return Dn(n);
|
|
4875
5232
|
}
|
|
4876
5233
|
/**
|
|
4877
5234
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -4881,7 +5238,7 @@
|
|
|
4881
5238
|
getPColumnSpecByRef(e) {
|
|
4882
5239
|
const n = this.getSpecByRef(e);
|
|
4883
5240
|
if (n) {
|
|
4884
|
-
if (!
|
|
5241
|
+
if (!f(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
4885
5242
|
return n;
|
|
4886
5243
|
}
|
|
4887
5244
|
}
|
|
@@ -4899,17 +5256,17 @@
|
|
|
4899
5256
|
*/
|
|
4900
5257
|
findDataWithCompatibleSpec(e) {
|
|
4901
5258
|
const n = [];
|
|
4902
|
-
e: for (const
|
|
4903
|
-
if (!
|
|
5259
|
+
e: for (const r of this.getData().entries) {
|
|
5260
|
+
if (!f(r.obj.spec))
|
|
4904
5261
|
continue;
|
|
4905
|
-
const i =
|
|
4906
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
4907
|
-
for (let
|
|
4908
|
-
const o = e.axesSpec[
|
|
4909
|
-
if (o.name !==
|
|
5262
|
+
const i = r.obj.spec;
|
|
5263
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && re(e.domain, i.domain)) {
|
|
5264
|
+
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
5265
|
+
const o = e.axesSpec[s], a = i.axesSpec[s];
|
|
5266
|
+
if (o.name !== a.name || o.type !== a.type || !re(o.domain, a.domain))
|
|
4910
5267
|
continue e;
|
|
4911
5268
|
}
|
|
4912
|
-
n.push(
|
|
5269
|
+
n.push(r.obj);
|
|
4913
5270
|
}
|
|
4914
5271
|
}
|
|
4915
5272
|
return n;
|
|
@@ -4920,29 +5277,29 @@
|
|
|
4920
5277
|
*/
|
|
4921
5278
|
findLabels(e) {
|
|
4922
5279
|
const n = this.getData();
|
|
4923
|
-
for (const
|
|
4924
|
-
if (!
|
|
4925
|
-
const i =
|
|
4926
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
4927
|
-
if (
|
|
4928
|
-
throw Error(`Expected JSON column for labels, got: ${
|
|
5280
|
+
for (const r of n.entries) {
|
|
5281
|
+
if (!q$1(r.obj)) continue;
|
|
5282
|
+
const i = r.obj.spec;
|
|
5283
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && re(e.domain, i.axesSpec[0].domain)) {
|
|
5284
|
+
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
5285
|
+
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
4929
5286
|
return Object.fromEntries(
|
|
4930
5287
|
Object.entries(
|
|
4931
|
-
|
|
5288
|
+
r.obj.data.getDataAsJson().data
|
|
4932
5289
|
).map((o) => [JSON.parse(o[0])[0], o[1]])
|
|
4933
5290
|
);
|
|
4934
5291
|
}
|
|
4935
5292
|
}
|
|
4936
5293
|
}
|
|
4937
5294
|
}
|
|
4938
|
-
class
|
|
5295
|
+
class z {
|
|
4939
5296
|
constructor() {
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
this.ctx =
|
|
5297
|
+
T(this, "ctx");
|
|
5298
|
+
T(this, "args");
|
|
5299
|
+
T(this, "uiState");
|
|
5300
|
+
T(this, "_activeArgsCache");
|
|
5301
|
+
T(this, "resultPool", new et());
|
|
5302
|
+
this.ctx = h(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
4946
5303
|
}
|
|
4947
5304
|
/**
|
|
4948
5305
|
* Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
|
|
@@ -4958,16 +5315,16 @@
|
|
|
4958
5315
|
// return this.ctx.featureFlags;
|
|
4959
5316
|
// }
|
|
4960
5317
|
getNamedAccessor(e) {
|
|
4961
|
-
return
|
|
5318
|
+
return ie(
|
|
4962
5319
|
this.ctx.getAccessorHandleByName(e),
|
|
4963
5320
|
(n) => new I(n, [e])
|
|
4964
5321
|
);
|
|
4965
5322
|
}
|
|
4966
5323
|
get prerun() {
|
|
4967
|
-
return this.getNamedAccessor(
|
|
5324
|
+
return this.getNamedAccessor(ve);
|
|
4968
5325
|
}
|
|
4969
5326
|
get outputs() {
|
|
4970
|
-
return this.getNamedAccessor(
|
|
5327
|
+
return this.getNamedAccessor(we);
|
|
4971
5328
|
}
|
|
4972
5329
|
/**
|
|
4973
5330
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -4977,14 +5334,14 @@
|
|
|
4977
5334
|
findLabels(e) {
|
|
4978
5335
|
return this.resultPool.findLabels(e);
|
|
4979
5336
|
}
|
|
4980
|
-
|
|
5337
|
+
verifyInlineAndExplicitColumnsSupport(e) {
|
|
4981
5338
|
var i;
|
|
4982
|
-
const n = e.some((
|
|
4983
|
-
if (n && !
|
|
5339
|
+
const n = e.some((s) => !(s.data instanceof I) || yn(s.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5340
|
+
if (n && !r) throw Error("Inline or explicit columns not supported");
|
|
4984
5341
|
}
|
|
4985
5342
|
createPFrame(e) {
|
|
4986
|
-
return this.
|
|
4987
|
-
e.map((n) =>
|
|
5343
|
+
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5344
|
+
e.map((n) => fe(n))
|
|
4988
5345
|
);
|
|
4989
5346
|
}
|
|
4990
5347
|
createPTable(e) {
|
|
@@ -4992,15 +5349,12 @@
|
|
|
4992
5349
|
return "columns" in e ? n = {
|
|
4993
5350
|
src: {
|
|
4994
5351
|
type: "full",
|
|
4995
|
-
entries: e.columns.map((
|
|
5352
|
+
entries: e.columns.map((r) => ({ type: "column", column: r }))
|
|
4996
5353
|
},
|
|
4997
5354
|
filters: e.filters ?? [],
|
|
4998
5355
|
sorting: e.sorting ?? []
|
|
4999
|
-
} : n = e, this.
|
|
5000
|
-
|
|
5001
|
-
n,
|
|
5002
|
-
(s) => Cn(s, (i) => i instanceof I ? i.handle : i)
|
|
5003
|
-
)
|
|
5356
|
+
} : n = e, this.verifyInlineAndExplicitColumnsSupport(Bn(n.src)), this.ctx.createPTable(
|
|
5357
|
+
En(n, (r) => fe(r))
|
|
5004
5358
|
);
|
|
5005
5359
|
}
|
|
5006
5360
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5012,33 +5366,33 @@
|
|
|
5012
5366
|
return this.ctx.getCurrentUnstableMarker();
|
|
5013
5367
|
}
|
|
5014
5368
|
}
|
|
5015
|
-
const
|
|
5016
|
-
function
|
|
5369
|
+
const U = "1.26.0";
|
|
5370
|
+
function tt(t) {
|
|
5017
5371
|
return t.__renderLambda === true;
|
|
5018
5372
|
}
|
|
5019
|
-
function
|
|
5373
|
+
function se(t) {
|
|
5020
5374
|
if (t !== void 0)
|
|
5021
|
-
return
|
|
5375
|
+
return tt(t) ? t.handle : t;
|
|
5022
5376
|
}
|
|
5023
|
-
class
|
|
5024
|
-
constructor(e, n,
|
|
5025
|
-
this._renderingMode = e, this._initialArgs = n, this._initialUiState =
|
|
5377
|
+
class _ {
|
|
5378
|
+
constructor(e, n, r, i, s, o, a) {
|
|
5379
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = a;
|
|
5026
5380
|
}
|
|
5027
5381
|
static create(e = "Heavy") {
|
|
5028
|
-
return new
|
|
5382
|
+
return new _(
|
|
5029
5383
|
e,
|
|
5030
5384
|
void 0,
|
|
5031
5385
|
{},
|
|
5032
5386
|
{},
|
|
5033
|
-
|
|
5034
|
-
|
|
5387
|
+
Y(true),
|
|
5388
|
+
Y([]),
|
|
5035
5389
|
void 0
|
|
5036
5390
|
);
|
|
5037
5391
|
}
|
|
5038
|
-
output(e, n,
|
|
5392
|
+
output(e, n, r = {}) {
|
|
5039
5393
|
if (typeof n == "function") {
|
|
5040
5394
|
const i = `output#${e}`;
|
|
5041
|
-
return
|
|
5395
|
+
return q(i, () => n(new z())), new _(
|
|
5042
5396
|
this._renderingMode,
|
|
5043
5397
|
this._initialArgs,
|
|
5044
5398
|
this._initialUiState,
|
|
@@ -5047,7 +5401,7 @@
|
|
|
5047
5401
|
[e]: {
|
|
5048
5402
|
__renderLambda: true,
|
|
5049
5403
|
handle: i,
|
|
5050
|
-
...
|
|
5404
|
+
...r
|
|
5051
5405
|
}
|
|
5052
5406
|
},
|
|
5053
5407
|
this._inputsValid,
|
|
@@ -5055,7 +5409,7 @@
|
|
|
5055
5409
|
this._title
|
|
5056
5410
|
);
|
|
5057
5411
|
} else
|
|
5058
|
-
return new
|
|
5412
|
+
return new _(
|
|
5059
5413
|
this._renderingMode,
|
|
5060
5414
|
this._initialArgs,
|
|
5061
5415
|
this._initialUiState,
|
|
@@ -5073,7 +5427,7 @@
|
|
|
5073
5427
|
return this.output(e, n, { retentive: true });
|
|
5074
5428
|
}
|
|
5075
5429
|
argsValid(e) {
|
|
5076
|
-
return typeof e == "function" ? (
|
|
5430
|
+
return typeof e == "function" ? (q("inputsValid", () => e(new z())), new _(
|
|
5077
5431
|
this._renderingMode,
|
|
5078
5432
|
this._initialArgs,
|
|
5079
5433
|
this._initialUiState,
|
|
@@ -5084,7 +5438,7 @@
|
|
|
5084
5438
|
},
|
|
5085
5439
|
this._sections,
|
|
5086
5440
|
this._title
|
|
5087
|
-
)) : new
|
|
5441
|
+
)) : new _(
|
|
5088
5442
|
this._renderingMode,
|
|
5089
5443
|
this._initialArgs,
|
|
5090
5444
|
this._initialUiState,
|
|
@@ -5095,7 +5449,7 @@
|
|
|
5095
5449
|
);
|
|
5096
5450
|
}
|
|
5097
5451
|
sections(e) {
|
|
5098
|
-
return Array.isArray(e) ? this.sections(
|
|
5452
|
+
return Array.isArray(e) ? this.sections(Y(e)) : typeof e == "function" ? (q("sections", () => e(new z())), new _(
|
|
5099
5453
|
this._renderingMode,
|
|
5100
5454
|
this._initialArgs,
|
|
5101
5455
|
this._initialUiState,
|
|
@@ -5103,7 +5457,7 @@
|
|
|
5103
5457
|
this._inputsValid,
|
|
5104
5458
|
{ __renderLambda: true, handle: "sections" },
|
|
5105
5459
|
this._title
|
|
5106
|
-
)) : new
|
|
5460
|
+
)) : new _(
|
|
5107
5461
|
this._renderingMode,
|
|
5108
5462
|
this._initialArgs,
|
|
5109
5463
|
this._initialUiState,
|
|
@@ -5115,7 +5469,7 @@
|
|
|
5115
5469
|
}
|
|
5116
5470
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5117
5471
|
title(e) {
|
|
5118
|
-
return
|
|
5472
|
+
return q("title", () => e(new z())), new _(
|
|
5119
5473
|
this._renderingMode,
|
|
5120
5474
|
this._initialArgs,
|
|
5121
5475
|
this._initialUiState,
|
|
@@ -5130,7 +5484,7 @@
|
|
|
5130
5484
|
* @deprecated use {@link withArgs}
|
|
5131
5485
|
* */
|
|
5132
5486
|
initialArgs(e) {
|
|
5133
|
-
return new
|
|
5487
|
+
return new _(
|
|
5134
5488
|
this._renderingMode,
|
|
5135
5489
|
e,
|
|
5136
5490
|
this._initialUiState,
|
|
@@ -5142,7 +5496,7 @@
|
|
|
5142
5496
|
}
|
|
5143
5497
|
/** Sets initial args for the block, this value must be specified. */
|
|
5144
5498
|
withArgs(e) {
|
|
5145
|
-
return new
|
|
5499
|
+
return new _(
|
|
5146
5500
|
this._renderingMode,
|
|
5147
5501
|
e,
|
|
5148
5502
|
this._initialUiState,
|
|
@@ -5154,7 +5508,7 @@
|
|
|
5154
5508
|
}
|
|
5155
5509
|
/** Defines type and sets initial value for block UiState. */
|
|
5156
5510
|
withUiState(e) {
|
|
5157
|
-
return new
|
|
5511
|
+
return new _(
|
|
5158
5512
|
this._renderingMode,
|
|
5159
5513
|
this._initialArgs,
|
|
5160
5514
|
e,
|
|
@@ -5171,7 +5525,7 @@
|
|
|
5171
5525
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
5172
5526
|
const e = {
|
|
5173
5527
|
v3: {
|
|
5174
|
-
sdkVersion:
|
|
5528
|
+
sdkVersion: U,
|
|
5175
5529
|
renderingMode: this._renderingMode,
|
|
5176
5530
|
initialArgs: this._initialArgs,
|
|
5177
5531
|
initialUiState: this._initialUiState,
|
|
@@ -5181,72 +5535,72 @@
|
|
|
5181
5535
|
outputs: this._outputs
|
|
5182
5536
|
},
|
|
5183
5537
|
// fields below are added to allow previous desktop versions read generated configs
|
|
5184
|
-
sdkVersion:
|
|
5538
|
+
sdkVersion: U,
|
|
5185
5539
|
renderingMode: this._renderingMode,
|
|
5186
5540
|
initialArgs: this._initialArgs,
|
|
5187
|
-
inputsValid:
|
|
5188
|
-
sections:
|
|
5541
|
+
inputsValid: se(this._inputsValid),
|
|
5542
|
+
sections: se(this._sections),
|
|
5189
5543
|
outputs: Object.fromEntries(
|
|
5190
|
-
Object.entries(this._outputs).map(([n,
|
|
5544
|
+
Object.entries(this._outputs).map(([n, r]) => [n, se(r)])
|
|
5191
5545
|
)
|
|
5192
5546
|
};
|
|
5193
|
-
return
|
|
5547
|
+
return Ke() ? be({ sdkVersion: U }) : { config: e };
|
|
5194
5548
|
}
|
|
5195
5549
|
}
|
|
5196
|
-
function
|
|
5197
|
-
var
|
|
5198
|
-
Array.isArray(
|
|
5199
|
-
const i = t.resultPool.getData().entries.map((
|
|
5200
|
-
let
|
|
5201
|
-
if (
|
|
5202
|
-
for (const d in
|
|
5203
|
-
|
|
5204
|
-
return
|
|
5550
|
+
function Gt(t, e, n, r) {
|
|
5551
|
+
var l2, m$1;
|
|
5552
|
+
Array.isArray(r) && (r = { filters: r });
|
|
5553
|
+
const i = t.resultPool.getData().entries.map((u) => u.obj).filter(q$1).filter((u) => u.spec.name === "pl7.app/label" && u.spec.axesSpec.length === 1), s = (u, f2) => {
|
|
5554
|
+
let p2 = u.toString();
|
|
5555
|
+
if (f2)
|
|
5556
|
+
for (const d in f2)
|
|
5557
|
+
p2 += d, p2 += f2[d];
|
|
5558
|
+
return p2;
|
|
5205
5559
|
}, o = /* @__PURE__ */ new Map();
|
|
5206
|
-
for (const
|
|
5207
|
-
for (const
|
|
5208
|
-
const
|
|
5560
|
+
for (const u of e)
|
|
5561
|
+
for (const f2 of u.spec.axesSpec) {
|
|
5562
|
+
const p2 = m(f2);
|
|
5209
5563
|
for (const d of i) {
|
|
5210
|
-
const y = d.spec.axesSpec[0],
|
|
5211
|
-
if (
|
|
5212
|
-
const
|
|
5213
|
-
if (
|
|
5214
|
-
const
|
|
5215
|
-
o.set(
|
|
5216
|
-
id:
|
|
5564
|
+
const y = d.spec.axesSpec[0], g2 = m(d.spec.axesSpec[0]);
|
|
5565
|
+
if (G(p2, g2)) {
|
|
5566
|
+
const v = Object.keys(p2.domain ?? {}).length, w2 = Object.keys(g2.domain ?? {}).length;
|
|
5567
|
+
if (v > w2) {
|
|
5568
|
+
const x2 = s(d.id, p2.domain);
|
|
5569
|
+
o.set(x2, {
|
|
5570
|
+
id: x2,
|
|
5217
5571
|
spec: {
|
|
5218
5572
|
...d.spec,
|
|
5219
|
-
axesSpec: [{ ...
|
|
5573
|
+
axesSpec: [{ ...p2, annotations: y.annotations }]
|
|
5220
5574
|
},
|
|
5221
5575
|
data: d.data
|
|
5222
5576
|
});
|
|
5223
5577
|
} else
|
|
5224
|
-
o.set(
|
|
5578
|
+
o.set(s(d.id), d);
|
|
5225
5579
|
}
|
|
5226
5580
|
}
|
|
5227
5581
|
}
|
|
5228
5582
|
if ([...e, ...o.values()].some(
|
|
5229
|
-
(
|
|
5583
|
+
(u) => u.data instanceof I && !u.data.getIsReadyOrError()
|
|
5230
5584
|
))
|
|
5231
5585
|
return;
|
|
5232
|
-
let
|
|
5233
|
-
const
|
|
5234
|
-
if (
|
|
5235
|
-
|
|
5236
|
-
for (const
|
|
5237
|
-
|
|
5238
|
-
}
|
|
5239
|
-
return
|
|
5586
|
+
let a = e;
|
|
5587
|
+
const c = [];
|
|
5588
|
+
if (r != null && r.coreColumnPredicate) {
|
|
5589
|
+
a = [];
|
|
5590
|
+
for (const u of e)
|
|
5591
|
+
r.coreColumnPredicate(u.spec) ? a.push(u) : c.push(u);
|
|
5592
|
+
}
|
|
5593
|
+
return c.push(...o.values()), t.createPTable({
|
|
5240
5594
|
src: {
|
|
5241
5595
|
type: "outer",
|
|
5242
5596
|
primary: {
|
|
5243
|
-
type: (
|
|
5244
|
-
entries:
|
|
5597
|
+
type: (r == null ? void 0 : r.coreJoinType) ?? "full",
|
|
5598
|
+
entries: a.map((u) => ({ type: "column", column: u }))
|
|
5245
5599
|
},
|
|
5246
|
-
secondary:
|
|
5600
|
+
secondary: c.map((u) => ({ type: "column", column: u }))
|
|
5247
5601
|
},
|
|
5248
|
-
filters: [...(
|
|
5249
|
-
sorting: ((
|
|
5602
|
+
filters: [...(r == null ? void 0 : r.filters) ?? [], ...((l2 = n == null ? void 0 : n.pTableParams) == null ? void 0 : l2.filters) ?? []],
|
|
5603
|
+
sorting: ((m$1 = n == null ? void 0 : n.pTableParams) == null ? void 0 : m$1.sorting) ?? []
|
|
5250
5604
|
});
|
|
5251
5605
|
}
|
|
5252
5606
|
function* range(from, to, step = 1) {
|
|
@@ -5264,11 +5618,11 @@
|
|
|
5264
5618
|
function times(n, cb) {
|
|
5265
5619
|
return toList(range(0, n)).map(cb);
|
|
5266
5620
|
}
|
|
5267
|
-
const $BlockArgs = z.object({
|
|
5268
|
-
tableNumRows: z.number().default(100),
|
|
5269
|
-
numbers: z.array(z.coerce.number())
|
|
5621
|
+
const $BlockArgs = z$2.object({
|
|
5622
|
+
tableNumRows: z$2.number().default(100),
|
|
5623
|
+
numbers: z$2.array(z$2.coerce.number())
|
|
5270
5624
|
});
|
|
5271
|
-
const platforma =
|
|
5625
|
+
const platforma = _.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100 }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
|
|
5272
5626
|
if (ctx.args.numbers.length === 5) {
|
|
5273
5627
|
throw new Error("argsValid: test error");
|
|
5274
5628
|
}
|
|
@@ -5280,13 +5634,13 @@
|
|
|
5280
5634
|
var _a, _b, _c, _d, _e2;
|
|
5281
5635
|
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;
|
|
5282
5636
|
const data = times(ctx.args.tableNumRows ?? 0, (i) => {
|
|
5283
|
-
const
|
|
5637
|
+
const v = i + 1;
|
|
5284
5638
|
return {
|
|
5285
|
-
key: [
|
|
5286
|
-
val:
|
|
5639
|
+
key: [v, v + 0.1],
|
|
5640
|
+
val: v.toString()
|
|
5287
5641
|
};
|
|
5288
5642
|
});
|
|
5289
|
-
return
|
|
5643
|
+
return Gt(
|
|
5290
5644
|
ctx,
|
|
5291
5645
|
[
|
|
5292
5646
|
{
|