@milaboratories/milaboratories.ui-examples.model 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +12 -0
- package/dist/bundle.js +127 -129
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @milaboratories/milaboratories.ui-examples.model@1.0.
|
|
2
|
+
> @milaboratories/milaboratories.ui-examples.model@1.0.47 build /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model
|
|
3
3
|
> tsup && vite build && block-tools build-model
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.3.5
|
|
8
|
-
[34mCLI[39m Using tsup config: /home/runner/work/platforma/platforma/etc/
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model/package.json
|
|
9
9
|
[34mCLI[39m Target: es2022
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m2.81 KB[39m
|
|
14
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m6.97 KB[39m
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in 82ms
|
|
16
13
|
[32mESM[39m [1mdist/index.js [22m[32m2.76 KB[39m
|
|
17
14
|
[32mESM[39m [1mdist/index.js.map [22m[32m6.91 KB[39m
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 78ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m2.81 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m6.97 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 80ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 851ms
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m1.70 KB[39m
|
|
22
22
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.70 KB[39m
|
|
23
23
|
[36mvite v5.4.11 [32mbuilding for production...[36m[39m
|
|
@@ -25,6 +25,6 @@ transforming...
|
|
|
25
25
|
[32m✓[39m 4 modules transformed.
|
|
26
26
|
rendering chunks...
|
|
27
27
|
computing gzip size...
|
|
28
|
-
[2mdist/[22m[36mbundle.js [39m[1m[2m140.
|
|
29
|
-
[2mdist/[22m[36mbundle.js [39m[1m[2m150.
|
|
28
|
+
[2mdist/[22m[36mbundle.js [39m[1m[2m140.55 kB[22m[1m[22m[2m │ gzip: 25.31 kB[22m[2m │ map: 305.86 kB[22m
|
|
29
|
+
[2mdist/[22m[36mbundle.js [39m[1m[2m150.48 kB[22m[1m[22m[2m │ gzip: 25.77 kB[22m[2m │ map: 306.94 kB[22m
|
|
30
30
|
[32m✓ built in 380ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @milaboratories/milaboratories.ui-examples.model
|
|
2
2
|
|
|
3
|
+
## 1.0.47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @platforma-sdk/model@1.15.4
|
|
8
|
+
|
|
9
|
+
## 1.0.46
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 8644e62: move from block-components -> blocks for nicer structure
|
|
14
|
+
|
|
3
15
|
## 1.0.45
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/bundle.js
CHANGED
|
@@ -194,10 +194,10 @@
|
|
|
194
194
|
fieldErrors._errors.push(mapper(issue));
|
|
195
195
|
} else {
|
|
196
196
|
let curr = fieldErrors;
|
|
197
|
-
let
|
|
198
|
-
while (
|
|
199
|
-
const el = issue.path[
|
|
200
|
-
const terminal =
|
|
197
|
+
let i = 0;
|
|
198
|
+
while (i < issue.path.length) {
|
|
199
|
+
const el = issue.path[i];
|
|
200
|
+
const terminal = i === issue.path.length - 1;
|
|
201
201
|
if (!terminal) {
|
|
202
202
|
curr[el] = curr[el] || { _errors: [] };
|
|
203
203
|
} else {
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
curr[el]._errors.push(mapper(issue));
|
|
206
206
|
}
|
|
207
207
|
curr = curr[el];
|
|
208
|
-
|
|
208
|
+
i++;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
|
@@ -409,12 +409,12 @@
|
|
|
409
409
|
}
|
|
410
410
|
static mergeArray(status, results) {
|
|
411
411
|
const arrayValue = [];
|
|
412
|
-
for (const
|
|
413
|
-
if (
|
|
412
|
+
for (const s2 of results) {
|
|
413
|
+
if (s2.status === "aborted")
|
|
414
414
|
return INVALID;
|
|
415
|
-
if (
|
|
415
|
+
if (s2.status === "dirty")
|
|
416
416
|
status.dirty();
|
|
417
|
-
arrayValue.push(
|
|
417
|
+
arrayValue.push(s2.value);
|
|
418
418
|
}
|
|
419
419
|
return { status: status.value, value: arrayValue };
|
|
420
420
|
}
|
|
@@ -2051,14 +2051,14 @@
|
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
if (ctx.common.async) {
|
|
2054
|
-
return Promise.all([...ctx.data].map((item,
|
|
2055
|
-
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path,
|
|
2054
|
+
return Promise.all([...ctx.data].map((item, i) => {
|
|
2055
|
+
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
2056
2056
|
})).then((result2) => {
|
|
2057
2057
|
return ParseStatus.mergeArray(status, result2);
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
|
-
const result = [...ctx.data].map((item,
|
|
2061
|
-
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path,
|
|
2060
|
+
const result = [...ctx.data].map((item, i) => {
|
|
2061
|
+
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
2062
2062
|
});
|
|
2063
2063
|
return ParseStatus.mergeArray(status, result);
|
|
2064
2064
|
}
|
|
@@ -2986,7 +2986,7 @@
|
|
|
2986
2986
|
}
|
|
2987
2987
|
return { status: status.value, value: parsedSet };
|
|
2988
2988
|
}
|
|
2989
|
-
const elements = [...ctx.data.values()].map((item,
|
|
2989
|
+
const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
|
|
2990
2990
|
if (ctx.common.async) {
|
|
2991
2991
|
return Promise.all(elements).then((elements2) => finalizeSet(elements2));
|
|
2992
2992
|
} else {
|
|
@@ -3914,33 +3914,33 @@
|
|
|
3914
3914
|
quotelessJson,
|
|
3915
3915
|
ZodError
|
|
3916
3916
|
});
|
|
3917
|
-
function c(
|
|
3918
|
-
throw new Error("Unexpected object: " +
|
|
3917
|
+
function c(t) {
|
|
3918
|
+
throw new Error("Unexpected object: " + t);
|
|
3919
3919
|
}
|
|
3920
|
-
function
|
|
3921
|
-
return { ...
|
|
3920
|
+
function J(t, n) {
|
|
3921
|
+
return { ...t, src: s(t.src, n) };
|
|
3922
3922
|
}
|
|
3923
|
-
function
|
|
3924
|
-
switch (
|
|
3923
|
+
function s(t, n) {
|
|
3924
|
+
switch (t.type) {
|
|
3925
3925
|
case "column":
|
|
3926
3926
|
return {
|
|
3927
3927
|
type: "column",
|
|
3928
|
-
column: t
|
|
3928
|
+
column: n(t.column)
|
|
3929
3929
|
};
|
|
3930
3930
|
case "inner":
|
|
3931
3931
|
case "full":
|
|
3932
3932
|
return {
|
|
3933
|
-
type:
|
|
3934
|
-
entries:
|
|
3933
|
+
type: t.type,
|
|
3934
|
+
entries: t.entries.map((r) => s(r, n))
|
|
3935
3935
|
};
|
|
3936
3936
|
case "outer":
|
|
3937
3937
|
return {
|
|
3938
3938
|
type: "outer",
|
|
3939
|
-
primary:
|
|
3940
|
-
secondary:
|
|
3939
|
+
primary: s(t.primary, n),
|
|
3940
|
+
secondary: t.secondary.map((r) => s(r, n))
|
|
3941
3941
|
};
|
|
3942
3942
|
default:
|
|
3943
|
-
c(
|
|
3943
|
+
c(t);
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
3946
|
z.object({
|
|
@@ -3950,24 +3950,24 @@
|
|
|
3950
3950
|
}).describe(
|
|
3951
3951
|
"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."
|
|
3952
3952
|
).strict().readonly();
|
|
3953
|
-
function
|
|
3954
|
-
return
|
|
3953
|
+
function o(t) {
|
|
3954
|
+
return t.kind === "PColumn";
|
|
3955
3955
|
}
|
|
3956
|
-
function
|
|
3957
|
-
return
|
|
3956
|
+
function S$1(t) {
|
|
3957
|
+
return o(t.spec);
|
|
3958
3958
|
}
|
|
3959
|
-
function
|
|
3960
|
-
if (!
|
|
3961
|
-
return
|
|
3959
|
+
function K$1(t) {
|
|
3960
|
+
if (!S$1(t)) throw new Error(`not a PColumn (kind = ${t.spec.kind})`);
|
|
3961
|
+
return t;
|
|
3962
3962
|
}
|
|
3963
|
-
function
|
|
3964
|
-
return
|
|
3965
|
-
...
|
|
3966
|
-
data: t
|
|
3963
|
+
function Q$1(t, n) {
|
|
3964
|
+
return t === void 0 ? void 0 : {
|
|
3965
|
+
...t,
|
|
3966
|
+
data: n(t.data)
|
|
3967
3967
|
};
|
|
3968
3968
|
}
|
|
3969
|
-
function
|
|
3970
|
-
return
|
|
3969
|
+
function X$1(t, n) {
|
|
3970
|
+
return t.ok ? { ok: true, value: n(t.value) } : t;
|
|
3971
3971
|
}
|
|
3972
3972
|
var ce = Object.defineProperty;
|
|
3973
3973
|
var de = (t, e, n) => e in t ? ce(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
|
|
@@ -4000,16 +4000,16 @@
|
|
|
4000
4000
|
const N = /* @__PURE__ */ new Map();
|
|
4001
4001
|
function we(t, e) {
|
|
4002
4002
|
t in u().callbackRegistry || (u().callbackRegistry[t] = (n) => {
|
|
4003
|
-
for (const
|
|
4004
|
-
|
|
4003
|
+
for (const r of N.get(t))
|
|
4004
|
+
r(n);
|
|
4005
4005
|
}, N.set(t, [])), N.get(t).push(e);
|
|
4006
4006
|
}
|
|
4007
4007
|
class g {
|
|
4008
|
-
constructor(e, n = (
|
|
4008
|
+
constructor(e, n = (r) => r) {
|
|
4009
4009
|
v(this, "isResolved", false);
|
|
4010
4010
|
v(this, "resolvedValue");
|
|
4011
|
-
this.handle = e, this.postProcess = n, we(e, (
|
|
4012
|
-
this.resolvedValue = n(
|
|
4011
|
+
this.handle = e, this.postProcess = n, we(e, (r) => {
|
|
4012
|
+
this.resolvedValue = n(r), this.isResolved = true;
|
|
4013
4013
|
});
|
|
4014
4014
|
}
|
|
4015
4015
|
map(e) {
|
|
@@ -4017,8 +4017,8 @@
|
|
|
4017
4017
|
}
|
|
4018
4018
|
mapDefined(e) {
|
|
4019
4019
|
return new g(this.handle, (n) => {
|
|
4020
|
-
const
|
|
4021
|
-
return
|
|
4020
|
+
const r = this.postProcess(n);
|
|
4021
|
+
return r ? e(r) : void 0;
|
|
4022
4022
|
});
|
|
4023
4023
|
}
|
|
4024
4024
|
toJSON() {
|
|
@@ -4034,27 +4034,27 @@
|
|
|
4034
4034
|
}
|
|
4035
4035
|
resolve(...e) {
|
|
4036
4036
|
const n = e.map(
|
|
4037
|
-
(
|
|
4037
|
+
(r) => ({
|
|
4038
4038
|
assertFieldType: "Input",
|
|
4039
|
-
...typeof
|
|
4039
|
+
...typeof r == "string" ? { field: r } : r
|
|
4040
4040
|
})
|
|
4041
4041
|
);
|
|
4042
4042
|
return this.resolveWithCommon({}, ...n);
|
|
4043
4043
|
}
|
|
4044
4044
|
resolveOutput(...e) {
|
|
4045
4045
|
const n = e.map(
|
|
4046
|
-
(
|
|
4046
|
+
(r) => ({
|
|
4047
4047
|
assertFieldType: "Output",
|
|
4048
|
-
...typeof
|
|
4048
|
+
...typeof r == "string" ? { field: r } : r
|
|
4049
4049
|
})
|
|
4050
4050
|
);
|
|
4051
4051
|
return this.resolveWithCommon({}, ...n);
|
|
4052
4052
|
}
|
|
4053
4053
|
resolveInput(...e) {
|
|
4054
4054
|
const n = e.map(
|
|
4055
|
-
(
|
|
4055
|
+
(r) => ({
|
|
4056
4056
|
assertFieldType: "Input",
|
|
4057
|
-
...typeof
|
|
4057
|
+
...typeof r == "string" ? { field: r } : r
|
|
4058
4058
|
})
|
|
4059
4059
|
);
|
|
4060
4060
|
return this.resolveWithCommon({}, ...n);
|
|
@@ -4118,26 +4118,26 @@
|
|
|
4118
4118
|
*
|
|
4119
4119
|
*/
|
|
4120
4120
|
getPColumns(e = false, n = "") {
|
|
4121
|
-
const
|
|
4122
|
-
return
|
|
4123
|
-
if (!
|
|
4124
|
-
return
|
|
4121
|
+
const r = this.parsePObjectCollection(e, n);
|
|
4122
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
|
|
4123
|
+
if (!S$1(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
4124
|
+
return i;
|
|
4125
4125
|
});
|
|
4126
4126
|
}
|
|
4127
4127
|
/**
|
|
4128
4128
|
*
|
|
4129
4129
|
*/
|
|
4130
4130
|
parsePObjectCollection(e = false, n = "") {
|
|
4131
|
-
const
|
|
4131
|
+
const r = u().parsePObjectCollection(
|
|
4132
4132
|
this.handle,
|
|
4133
4133
|
e,
|
|
4134
4134
|
n
|
|
4135
4135
|
);
|
|
4136
|
-
if (
|
|
4137
|
-
const
|
|
4138
|
-
for (const [
|
|
4139
|
-
|
|
4140
|
-
return
|
|
4136
|
+
if (r === void 0) return;
|
|
4137
|
+
const s2 = {};
|
|
4138
|
+
for (const [i, o2] of Object.entries(r))
|
|
4139
|
+
s2[i] = Q$1(o2, (a) => new S(a));
|
|
4140
|
+
return s2;
|
|
4141
4141
|
}
|
|
4142
4142
|
getFileContentAsBase64() {
|
|
4143
4143
|
return new g(u().getBlobContentAsBase64(this.handle));
|
|
@@ -4211,18 +4211,18 @@
|
|
|
4211
4211
|
}
|
|
4212
4212
|
}
|
|
4213
4213
|
mapFields(e, n) {
|
|
4214
|
-
const { fieldType:
|
|
4214
|
+
const { fieldType: r, requireLocked: s2, skipUnresolved: i } = {
|
|
4215
4215
|
fieldType: "Input",
|
|
4216
4216
|
requireLocked: true,
|
|
4217
4217
|
skipUnresolved: false,
|
|
4218
4218
|
...n
|
|
4219
|
-
},
|
|
4220
|
-
if (
|
|
4219
|
+
}, o2 = e;
|
|
4220
|
+
if (s2 && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
4221
4221
|
return;
|
|
4222
|
-
let l = (
|
|
4223
|
-
(c2) => [c2, this.resolve({ field: c2, assertFieldType:
|
|
4222
|
+
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4223
|
+
(c2) => [c2, this.resolve({ field: c2, assertFieldType: r })]
|
|
4224
4224
|
);
|
|
4225
|
-
return
|
|
4225
|
+
return i && (l = l.filter((c2) => c2[1] !== void 0)), l.map(([c2, f]) => o2(c2, f));
|
|
4226
4226
|
}
|
|
4227
4227
|
}
|
|
4228
4228
|
const se = "staging", ie = "main";
|
|
@@ -4233,7 +4233,7 @@
|
|
|
4233
4233
|
label: z.string()
|
|
4234
4234
|
}), Ce = z.array(Ie), Re = 1e-3, Te = "__LABEL__", Q = "__LABEL__@1";
|
|
4235
4235
|
function Fe(t, e, n = {}) {
|
|
4236
|
-
const
|
|
4236
|
+
const r = /* @__PURE__ */ new Map(), s2 = /* @__PURE__ */ new Map(), i = t.map((d) => {
|
|
4237
4237
|
var z2, Y;
|
|
4238
4238
|
const m = e(d), y = (z2 = m.annotations) == null ? void 0 : z2[Ae], F = (Y = m.annotations) == null ? void 0 : Y[Pe], b = (F ? Ce.safeParse(JSON.parse(F)).data : void 0) ?? [];
|
|
4239
4239
|
if (y) {
|
|
@@ -4245,10 +4245,10 @@
|
|
|
4245
4245
|
const { type: V } = b[_], ue = b[_].importance ?? 0, j = (q.get(V) ?? 0) + 1;
|
|
4246
4246
|
q.set(V, j);
|
|
4247
4247
|
const I = `${V}@${j}`;
|
|
4248
|
-
|
|
4248
|
+
s2.set(I, (s2.get(I) ?? 0) + 1), r.set(
|
|
4249
4249
|
I,
|
|
4250
4250
|
Math.max(
|
|
4251
|
-
|
|
4251
|
+
r.get(I) ?? Number.NEGATIVE_INFINITY,
|
|
4252
4252
|
ue - (b.length - _) * Re
|
|
4253
4253
|
)
|
|
4254
4254
|
), E.push({ ...b[_], fullType: I, occurenceIndex: j });
|
|
@@ -4259,39 +4259,39 @@
|
|
|
4259
4259
|
label: y,
|
|
4260
4260
|
fullTrace: E
|
|
4261
4261
|
};
|
|
4262
|
-
}),
|
|
4262
|
+
}), o2 = [], a = [], l = [...r];
|
|
4263
4263
|
l.sort(([, d], [, m]) => m - d);
|
|
4264
4264
|
for (const [d] of l)
|
|
4265
|
-
d.endsWith("@1") ||
|
|
4266
|
-
const c2 = (d) =>
|
|
4265
|
+
d.endsWith("@1") || s2.get(d) === t.length ? o2.push(d) : a.push(d);
|
|
4266
|
+
const c2 = (d) => i.map((m) => {
|
|
4267
4267
|
const y = m.fullTrace.filter((b) => d.has(b.fullType)).map((b) => b.label), F = n.separator ?? " / ";
|
|
4268
4268
|
return {
|
|
4269
4269
|
label: y.join(F),
|
|
4270
4270
|
value: m.value
|
|
4271
4271
|
};
|
|
4272
4272
|
});
|
|
4273
|
-
if (
|
|
4273
|
+
if (o2.length === 0) {
|
|
4274
4274
|
if (a.length !== 0) throw new Error("Assertion error.");
|
|
4275
4275
|
return c2(new Set(Q));
|
|
4276
4276
|
}
|
|
4277
|
-
let f = 0,
|
|
4278
|
-
for (; f <
|
|
4277
|
+
let f = 0, w = 0;
|
|
4278
|
+
for (; f < o2.length; ) {
|
|
4279
4279
|
const d = /* @__PURE__ */ new Set();
|
|
4280
4280
|
n.includeNativeLabel && d.add(Q);
|
|
4281
|
-
for (let y = 0; y < f; ++y) d.add(
|
|
4282
|
-
d.add(
|
|
4281
|
+
for (let y = 0; y < f; ++y) d.add(o2[y]);
|
|
4282
|
+
d.add(o2[w]);
|
|
4283
4283
|
const m = c2(d);
|
|
4284
4284
|
if (new Set(m.map((y) => y.label)).size === t.length) return m;
|
|
4285
|
-
|
|
4285
|
+
w++, w == o2.length && (f++, w = f);
|
|
4286
4286
|
}
|
|
4287
|
-
return c2(/* @__PURE__ */ new Set([...
|
|
4287
|
+
return c2(/* @__PURE__ */ new Set([...o2, ...a]));
|
|
4288
4288
|
}
|
|
4289
4289
|
class Oe {
|
|
4290
4290
|
constructor() {
|
|
4291
4291
|
v(this, "ctx", u());
|
|
4292
4292
|
v(this, "defaultLabelFn", (e, n) => {
|
|
4293
|
-
var
|
|
4294
|
-
return ((
|
|
4293
|
+
var r;
|
|
4294
|
+
return ((r = e.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
|
|
4295
4295
|
});
|
|
4296
4296
|
}
|
|
4297
4297
|
/**
|
|
@@ -4301,15 +4301,13 @@
|
|
|
4301
4301
|
return this.ctx.calculateOptions(e);
|
|
4302
4302
|
}
|
|
4303
4303
|
getOptions(e, n) {
|
|
4304
|
-
const
|
|
4305
|
-
return typeof n == "object" || typeof n > "u" ? Fe(
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
ref: s.ref,
|
|
4312
|
-
label: n(s.obj, s.ref)
|
|
4304
|
+
const r = this.getSpecs().entries.filter((s2) => e(s2.obj));
|
|
4305
|
+
return typeof n == "object" || typeof n > "u" ? Fe(r, (s2) => s2.obj, n ?? {}).map(({ value: { ref: s2 }, label: i }) => ({
|
|
4306
|
+
ref: s2,
|
|
4307
|
+
label: i
|
|
4308
|
+
})) : r.map((s2) => ({
|
|
4309
|
+
ref: s2.ref,
|
|
4310
|
+
label: n(s2.obj, s2.ref)
|
|
4313
4311
|
}));
|
|
4314
4312
|
}
|
|
4315
4313
|
/**
|
|
@@ -4345,7 +4343,7 @@
|
|
|
4345
4343
|
ref: n.ref,
|
|
4346
4344
|
obj: {
|
|
4347
4345
|
...n.obj,
|
|
4348
|
-
data:
|
|
4346
|
+
data: X$1(n.obj.data, (r) => new S(r))
|
|
4349
4347
|
}
|
|
4350
4348
|
}))
|
|
4351
4349
|
};
|
|
@@ -4366,10 +4364,10 @@
|
|
|
4366
4364
|
getDataByRef(e) {
|
|
4367
4365
|
var n;
|
|
4368
4366
|
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
|
|
4369
|
-
(
|
|
4370
|
-
)) == null ? void 0 : n.obj :
|
|
4367
|
+
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
4368
|
+
)) == null ? void 0 : n.obj : Q$1(
|
|
4371
4369
|
this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
|
|
4372
|
-
(
|
|
4370
|
+
(r) => new S(r)
|
|
4373
4371
|
);
|
|
4374
4372
|
}
|
|
4375
4373
|
/**
|
|
@@ -4380,7 +4378,7 @@
|
|
|
4380
4378
|
getPColumnByRef(e) {
|
|
4381
4379
|
const n = this.getDataByRef(e);
|
|
4382
4380
|
if (n)
|
|
4383
|
-
return
|
|
4381
|
+
return K$1(n);
|
|
4384
4382
|
}
|
|
4385
4383
|
/**
|
|
4386
4384
|
* @param ref a Ref
|
|
@@ -4389,7 +4387,7 @@
|
|
|
4389
4387
|
getSpecByRef(e) {
|
|
4390
4388
|
var n;
|
|
4391
4389
|
return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
|
|
4392
|
-
(
|
|
4390
|
+
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
4393
4391
|
)) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
|
|
4394
4392
|
}
|
|
4395
4393
|
/**
|
|
@@ -4399,17 +4397,17 @@
|
|
|
4399
4397
|
*/
|
|
4400
4398
|
findDataWithCompatibleSpec(e) {
|
|
4401
4399
|
const n = [];
|
|
4402
|
-
e: for (const r
|
|
4403
|
-
if (!
|
|
4400
|
+
e: for (const r of this.getData().entries) {
|
|
4401
|
+
if (!o(r.obj.spec))
|
|
4404
4402
|
continue;
|
|
4405
|
-
const
|
|
4406
|
-
if (e.name ===
|
|
4407
|
-
for (let
|
|
4408
|
-
const
|
|
4409
|
-
if (
|
|
4403
|
+
const s2 = r.obj.spec;
|
|
4404
|
+
if (e.name === s2.name && e.valueType === s2.valueType && e.axesSpec.length === s2.axesSpec.length && K(e.domain, s2.domain)) {
|
|
4405
|
+
for (let i = 0; i < e.axesSpec.length; ++i) {
|
|
4406
|
+
const o2 = e.axesSpec[i], a = s2.axesSpec[i];
|
|
4407
|
+
if (o2.name !== a.name || o2.type !== a.type || !K(o2.domain, a.domain))
|
|
4410
4408
|
continue e;
|
|
4411
4409
|
}
|
|
4412
|
-
n.push(r
|
|
4410
|
+
n.push(r.obj);
|
|
4413
4411
|
}
|
|
4414
4412
|
}
|
|
4415
4413
|
return n;
|
|
@@ -4464,33 +4462,33 @@
|
|
|
4464
4462
|
*/
|
|
4465
4463
|
findLabels(e) {
|
|
4466
4464
|
const n = this.resultPool.getData();
|
|
4467
|
-
for (const
|
|
4468
|
-
if (!
|
|
4469
|
-
const
|
|
4470
|
-
if (
|
|
4471
|
-
if (
|
|
4472
|
-
throw Error(`Expected JSON column for labels, got: ${
|
|
4465
|
+
for (const r of n.entries) {
|
|
4466
|
+
if (!S$1(r.obj)) continue;
|
|
4467
|
+
const s2 = r.obj.spec;
|
|
4468
|
+
if (s2.name === "pl7.app/label" && s2.axesSpec.length === 1 && s2.axesSpec[0].name === e.name && s2.axesSpec[0].type === e.type && K(e.domain, s2.axesSpec[0].domain)) {
|
|
4469
|
+
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
4470
|
+
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
4473
4471
|
return new Map(
|
|
4474
4472
|
Object.entries(
|
|
4475
|
-
|
|
4476
|
-
).map((
|
|
4473
|
+
r.obj.data.getDataAsJson().data
|
|
4474
|
+
).map((o2) => [JSON.parse(o2[0])[0], o2[1]])
|
|
4477
4475
|
);
|
|
4478
4476
|
}
|
|
4479
4477
|
}
|
|
4480
4478
|
}
|
|
4481
4479
|
createPFrame(e) {
|
|
4482
|
-
return this.ctx.createPFrame(e.map((n) =>
|
|
4480
|
+
return this.ctx.createPFrame(e.map((n) => Q$1(n, (r) => r.handle)));
|
|
4483
4481
|
}
|
|
4484
4482
|
createPTable(e) {
|
|
4485
4483
|
var n;
|
|
4486
4484
|
return "columns" in e ? n = {
|
|
4487
4485
|
src: {
|
|
4488
4486
|
type: "full",
|
|
4489
|
-
entries: e.columns.map((
|
|
4487
|
+
entries: e.columns.map((r) => ({ type: "column", column: r }))
|
|
4490
4488
|
},
|
|
4491
4489
|
filters: e.filters ?? [],
|
|
4492
4490
|
sorting: e.sorting ?? []
|
|
4493
|
-
} : n = e, this.ctx.createPTable(
|
|
4491
|
+
} : n = e, this.ctx.createPTable(J(n, (r) => Q$1(r, (s2) => s2.handle)));
|
|
4494
4492
|
}
|
|
4495
4493
|
/** @deprecated scheduled for removal from SDK */
|
|
4496
4494
|
getBlockLabel(e) {
|
|
@@ -4501,7 +4499,7 @@
|
|
|
4501
4499
|
return this.ctx.getCurrentUnstableMarker();
|
|
4502
4500
|
}
|
|
4503
4501
|
}
|
|
4504
|
-
const C = "1.
|
|
4502
|
+
const C = "1.15.4";
|
|
4505
4503
|
function ke(t) {
|
|
4506
4504
|
return t.__renderLambda === true;
|
|
4507
4505
|
}
|
|
@@ -4510,8 +4508,8 @@
|
|
|
4510
4508
|
return ke(t) ? t.handle : t;
|
|
4511
4509
|
}
|
|
4512
4510
|
class h {
|
|
4513
|
-
constructor(e, n,
|
|
4514
|
-
this._renderingMode = e, this._initialArgs = n, this._initialUiState =
|
|
4511
|
+
constructor(e, n, r, s2, i, o2, a) {
|
|
4512
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = s2, this._inputsValid = i, this._sections = o2, this._title = a;
|
|
4515
4513
|
}
|
|
4516
4514
|
static create(e = "Heavy") {
|
|
4517
4515
|
return new h(
|
|
@@ -4524,10 +4522,10 @@
|
|
|
4524
4522
|
void 0
|
|
4525
4523
|
);
|
|
4526
4524
|
}
|
|
4527
|
-
output(e, n,
|
|
4525
|
+
output(e, n, r = {}) {
|
|
4528
4526
|
if (typeof n == "function") {
|
|
4529
|
-
const
|
|
4530
|
-
return O(
|
|
4527
|
+
const s2 = `output#${e}`;
|
|
4528
|
+
return O(s2, () => n(new D())), new h(
|
|
4531
4529
|
this._renderingMode,
|
|
4532
4530
|
this._initialArgs,
|
|
4533
4531
|
this._initialUiState,
|
|
@@ -4535,8 +4533,8 @@
|
|
|
4535
4533
|
...this._outputs,
|
|
4536
4534
|
[e]: {
|
|
4537
4535
|
__renderLambda: true,
|
|
4538
|
-
handle:
|
|
4539
|
-
...
|
|
4536
|
+
handle: s2,
|
|
4537
|
+
...r
|
|
4540
4538
|
}
|
|
4541
4539
|
},
|
|
4542
4540
|
this._inputsValid,
|
|
@@ -4682,7 +4680,7 @@
|
|
|
4682
4680
|
inputsValid: U(this._inputsValid),
|
|
4683
4681
|
sections: U(this._sections),
|
|
4684
4682
|
outputs: Object.fromEntries(
|
|
4685
|
-
Object.entries(this._outputs).map(([n,
|
|
4683
|
+
Object.entries(this._outputs).map(([n, r]) => [n, U(r)])
|
|
4686
4684
|
)
|
|
4687
4685
|
};
|
|
4688
4686
|
return _e() ? re({ sdkVersion: C }) : { config: e };
|
|
@@ -4698,7 +4696,7 @@
|
|
|
4698
4696
|
const collection = ctx.resultPool.getData();
|
|
4699
4697
|
if (collection === void 0 || !collection.isComplete) return void 0;
|
|
4700
4698
|
const valueTypes = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
4701
|
-
const columns = collection.entries.map(({ obj }) => obj).filter(
|
|
4699
|
+
const columns = collection.entries.map(({ obj }) => obj).filter(S$1).filter((column) => valueTypes.find((valueType) => valueType === column.spec.valueType));
|
|
4702
4700
|
try {
|
|
4703
4701
|
return ctx.createPFrame(columns);
|
|
4704
4702
|
} catch (err) {
|
|
@@ -4710,10 +4708,10 @@
|
|
|
4710
4708
|
if (!join) return void 0;
|
|
4711
4709
|
const collection = ctx.resultPool.getData();
|
|
4712
4710
|
if (!collection || !collection.isComplete) return void 0;
|
|
4713
|
-
const columns = collection.entries.map(({ obj }) => obj).filter(
|
|
4711
|
+
const columns = collection.entries.map(({ obj }) => obj).filter(S$1);
|
|
4714
4712
|
if (columns.length === 0) return void 0;
|
|
4715
4713
|
let columnMissing = false;
|
|
4716
|
-
const src =
|
|
4714
|
+
const src = s(join, (idAndSpec) => {
|
|
4717
4715
|
const column = columns.find((it) => it.id === idAndSpec.columnId);
|
|
4718
4716
|
if (!column) columnMissing = true;
|
|
4719
4717
|
return column;
|