@milaboratories/milaboratories.ui-examples.model 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +154 -127
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +2 -2
package/dist/bundle.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
return obj;
|
|
21
21
|
};
|
|
22
22
|
util2.getValidEnumValues = (obj) => {
|
|
23
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
23
|
+
const validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
24
24
|
const filtered = {};
|
|
25
|
-
for (const
|
|
26
|
-
filtered[
|
|
25
|
+
for (const k of validKeys) {
|
|
26
|
+
filtered[k] = obj[k];
|
|
27
27
|
}
|
|
28
28
|
return util2.objectValues(filtered);
|
|
29
29
|
};
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
54
54
|
}
|
|
55
55
|
util2.joinValues = joinValues;
|
|
56
|
-
util2.jsonStringifyReplacer = (
|
|
56
|
+
util2.jsonStringifyReplacer = (_2, value) => {
|
|
57
57
|
if (typeof value === "bigint") {
|
|
58
58
|
return value.toString();
|
|
59
59
|
}
|
|
@@ -409,12 +409,12 @@
|
|
|
409
409
|
}
|
|
410
410
|
static mergeArray(status, results) {
|
|
411
411
|
const arrayValue = [];
|
|
412
|
-
for (const
|
|
413
|
-
if (
|
|
412
|
+
for (const s of results) {
|
|
413
|
+
if (s.status === "aborted")
|
|
414
414
|
return INVALID;
|
|
415
|
-
if (
|
|
415
|
+
if (s.status === "dirty")
|
|
416
416
|
status.dirty();
|
|
417
|
-
arrayValue.push(
|
|
417
|
+
arrayValue.push(s.value);
|
|
418
418
|
}
|
|
419
419
|
return { status: status.value, value: arrayValue };
|
|
420
420
|
}
|
|
@@ -458,12 +458,12 @@
|
|
|
458
458
|
const isDirty = (x2) => x2.status === "dirty";
|
|
459
459
|
const isValid = (x2) => x2.status === "valid";
|
|
460
460
|
const isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
|
|
461
|
-
function __classPrivateFieldGet(receiver, state, kind,
|
|
462
|
-
if (typeof state === "function" ? receiver !== state || !
|
|
461
|
+
function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
462
|
+
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");
|
|
463
463
|
return state.get(receiver);
|
|
464
464
|
}
|
|
465
|
-
function __classPrivateFieldSet(receiver, state, value, kind,
|
|
466
|
-
if (typeof state === "function" ? receiver !== state || !
|
|
465
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f2) {
|
|
466
|
+
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");
|
|
467
467
|
return state.set(receiver, value), value;
|
|
468
468
|
}
|
|
469
469
|
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
@@ -2659,17 +2659,17 @@
|
|
|
2659
2659
|
});
|
|
2660
2660
|
}
|
|
2661
2661
|
}
|
|
2662
|
-
function mergeValues(a,
|
|
2662
|
+
function mergeValues(a, b2) {
|
|
2663
2663
|
const aType = getParsedType(a);
|
|
2664
|
-
const bType = getParsedType(
|
|
2665
|
-
if (a ===
|
|
2664
|
+
const bType = getParsedType(b2);
|
|
2665
|
+
if (a === b2) {
|
|
2666
2666
|
return { valid: true, data: a };
|
|
2667
2667
|
} else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
|
|
2668
|
-
const bKeys = util.objectKeys(
|
|
2668
|
+
const bKeys = util.objectKeys(b2);
|
|
2669
2669
|
const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
2670
|
-
const newObj = { ...a, ...
|
|
2670
|
+
const newObj = { ...a, ...b2 };
|
|
2671
2671
|
for (const key of sharedKeys) {
|
|
2672
|
-
const sharedValue = mergeValues(a[key],
|
|
2672
|
+
const sharedValue = mergeValues(a[key], b2[key]);
|
|
2673
2673
|
if (!sharedValue.valid) {
|
|
2674
2674
|
return { valid: false };
|
|
2675
2675
|
}
|
|
@@ -2677,13 +2677,13 @@
|
|
|
2677
2677
|
}
|
|
2678
2678
|
return { valid: true, data: newObj };
|
|
2679
2679
|
} else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
|
|
2680
|
-
if (a.length !==
|
|
2680
|
+
if (a.length !== b2.length) {
|
|
2681
2681
|
return { valid: false };
|
|
2682
2682
|
}
|
|
2683
2683
|
const newArray = [];
|
|
2684
2684
|
for (let index = 0; index < a.length; index++) {
|
|
2685
2685
|
const itemA = a[index];
|
|
2686
|
-
const itemB =
|
|
2686
|
+
const itemB = b2[index];
|
|
2687
2687
|
const sharedValue = mergeValues(itemA, itemB);
|
|
2688
2688
|
if (!sharedValue.valid) {
|
|
2689
2689
|
return { valid: false };
|
|
@@ -2691,7 +2691,7 @@
|
|
|
2691
2691
|
newArray.push(sharedValue.data);
|
|
2692
2692
|
}
|
|
2693
2693
|
return { valid: true, data: newArray };
|
|
2694
|
-
} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +
|
|
2694
|
+
} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b2) {
|
|
2695
2695
|
return { valid: true, data: a };
|
|
2696
2696
|
} else {
|
|
2697
2697
|
return { valid: false };
|
|
@@ -3662,10 +3662,10 @@
|
|
|
3662
3662
|
}
|
|
3663
3663
|
}
|
|
3664
3664
|
}
|
|
3665
|
-
static create(a,
|
|
3665
|
+
static create(a, b2) {
|
|
3666
3666
|
return new ZodPipeline({
|
|
3667
3667
|
in: a,
|
|
3668
|
-
out:
|
|
3668
|
+
out: b2,
|
|
3669
3669
|
typeName: ZodFirstPartyTypeKind.ZodPipeline
|
|
3670
3670
|
});
|
|
3671
3671
|
}
|
|
@@ -3697,10 +3697,10 @@
|
|
|
3697
3697
|
return ZodAny.create().superRefine((data, ctx) => {
|
|
3698
3698
|
var _a, _b;
|
|
3699
3699
|
if (!check(data)) {
|
|
3700
|
-
const
|
|
3701
|
-
const _fatal = (_b = (_a =
|
|
3702
|
-
const
|
|
3703
|
-
ctx.addIssue({ code: "custom", ...
|
|
3700
|
+
const p2 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
|
|
3701
|
+
const _fatal = (_b = (_a = p2.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
|
|
3702
|
+
const p22 = typeof p2 === "string" ? { message: p2 } : p2;
|
|
3703
|
+
ctx.addIssue({ code: "custom", ...p22, fatal: _fatal });
|
|
3704
3704
|
}
|
|
3705
3705
|
});
|
|
3706
3706
|
return ZodAny.create();
|
|
@@ -3798,7 +3798,7 @@
|
|
|
3798
3798
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
3799
3799
|
};
|
|
3800
3800
|
const NEVER = INVALID;
|
|
3801
|
-
var z
|
|
3801
|
+
var z = /* @__PURE__ */ Object.freeze({
|
|
3802
3802
|
__proto__: null,
|
|
3803
3803
|
defaultErrorMap: errorMap,
|
|
3804
3804
|
setErrorMap,
|
|
@@ -3943,10 +3943,10 @@
|
|
|
3943
3943
|
c(n);
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
|
-
z
|
|
3947
|
-
__isRef: z
|
|
3948
|
-
blockId: z
|
|
3949
|
-
name: z
|
|
3946
|
+
z.object({
|
|
3947
|
+
__isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
3948
|
+
blockId: z.string().describe("Upstream block id"),
|
|
3949
|
+
name: z.string().describe(
|
|
3950
3950
|
"Name of the output provided to the upstream block's output context"
|
|
3951
3951
|
)
|
|
3952
3952
|
}).describe(
|
|
@@ -3964,49 +3964,49 @@
|
|
|
3964
3964
|
data: t(n.data)
|
|
3965
3965
|
};
|
|
3966
3966
|
}
|
|
3967
|
-
function O
|
|
3967
|
+
function O(n, t) {
|
|
3968
3968
|
return n.ok ? { ok: true, value: t(n.value) } : n;
|
|
3969
3969
|
}
|
|
3970
|
-
var
|
|
3971
|
-
var
|
|
3972
|
-
var
|
|
3973
|
-
function
|
|
3970
|
+
var M = Object.defineProperty;
|
|
3971
|
+
var U = (e, t, n) => t in e ? M(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
|
|
3972
|
+
var f = (e, t, n) => U(e, typeof t != "symbol" ? t + "" : t, n);
|
|
3973
|
+
function C(e) {
|
|
3974
3974
|
return { type: "Immediate", value: e };
|
|
3975
3975
|
}
|
|
3976
|
-
function
|
|
3976
|
+
function K() {
|
|
3977
3977
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
3978
3978
|
}
|
|
3979
|
-
function
|
|
3979
|
+
function x(e) {
|
|
3980
3980
|
if (e && typeof globalThis.getPlatforma == "function")
|
|
3981
3981
|
return globalThis.getPlatforma(e);
|
|
3982
3982
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
3983
3983
|
throw new Error("Can't get platforma instance.");
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function W() {
|
|
3986
3986
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
3987
3987
|
}
|
|
3988
|
-
function
|
|
3988
|
+
function o() {
|
|
3989
3989
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
3990
3990
|
throw new Error("Not in config rendering context");
|
|
3991
3991
|
}
|
|
3992
|
-
function
|
|
3993
|
-
const n =
|
|
3992
|
+
function _(e, t) {
|
|
3993
|
+
const n = W();
|
|
3994
3994
|
if (n === void 0) return false;
|
|
3995
3995
|
if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
|
|
3996
3996
|
return n.callbackRegistry[e] = t, true;
|
|
3997
3997
|
}
|
|
3998
3998
|
const F = /* @__PURE__ */ new Map();
|
|
3999
|
-
function
|
|
4000
|
-
e in
|
|
3999
|
+
function q(e, t) {
|
|
4000
|
+
e in o().callbackRegistry || (o().callbackRegistry[e] = (n) => {
|
|
4001
4001
|
for (const i2 of F.get(e))
|
|
4002
4002
|
i2(n);
|
|
4003
4003
|
}, F.set(e, [])), F.get(e).push(t);
|
|
4004
4004
|
}
|
|
4005
4005
|
class h {
|
|
4006
4006
|
constructor(t, n = (i2) => i2) {
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
this.handle = t, this.postProcess = n,
|
|
4007
|
+
f(this, "isResolved", false);
|
|
4008
|
+
f(this, "resolvedValue");
|
|
4009
|
+
this.handle = t, this.postProcess = n, q(t, (i2) => {
|
|
4010
4010
|
this.resolvedValue = n(i2), this.isResolved = true;
|
|
4011
4011
|
});
|
|
4012
4012
|
}
|
|
@@ -4023,7 +4023,7 @@
|
|
|
4023
4023
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4024
4024
|
}
|
|
4025
4025
|
}
|
|
4026
|
-
function
|
|
4026
|
+
function V(e) {
|
|
4027
4027
|
return e === void 0 ? void 0 : new m(e);
|
|
4028
4028
|
}
|
|
4029
4029
|
class m {
|
|
@@ -4031,43 +4031,70 @@
|
|
|
4031
4031
|
this.handle = t;
|
|
4032
4032
|
}
|
|
4033
4033
|
resolve(...t) {
|
|
4034
|
+
const n = t.map(
|
|
4035
|
+
(i2) => ({
|
|
4036
|
+
assertFieldType: "Input",
|
|
4037
|
+
...typeof i2 == "string" ? { field: i2 } : i2
|
|
4038
|
+
})
|
|
4039
|
+
);
|
|
4040
|
+
return this.resolveWithCommon({}, ...n);
|
|
4041
|
+
}
|
|
4042
|
+
resolveOutput(...t) {
|
|
4043
|
+
const n = t.map(
|
|
4044
|
+
(i2) => ({
|
|
4045
|
+
assertFieldType: "Output",
|
|
4046
|
+
...typeof i2 == "string" ? { field: i2 } : i2
|
|
4047
|
+
})
|
|
4048
|
+
);
|
|
4049
|
+
return this.resolveWithCommon({}, ...n);
|
|
4050
|
+
}
|
|
4051
|
+
resolveInput(...t) {
|
|
4052
|
+
const n = t.map(
|
|
4053
|
+
(i2) => ({
|
|
4054
|
+
assertFieldType: "Input",
|
|
4055
|
+
...typeof i2 == "string" ? { field: i2 } : i2
|
|
4056
|
+
})
|
|
4057
|
+
);
|
|
4058
|
+
return this.resolveWithCommon({}, ...n);
|
|
4059
|
+
}
|
|
4060
|
+
resolveAny(...t) {
|
|
4034
4061
|
return this.resolveWithCommon({}, ...t);
|
|
4035
4062
|
}
|
|
4036
4063
|
resolveWithCommon(t, ...n) {
|
|
4037
|
-
return
|
|
4064
|
+
return V(o().resolveWithCommon(this.handle, t, ...n));
|
|
4038
4065
|
}
|
|
4039
4066
|
get resourceType() {
|
|
4040
|
-
return
|
|
4067
|
+
return o().getResourceType(this.handle);
|
|
4041
4068
|
}
|
|
4042
4069
|
getInputsLocked() {
|
|
4043
|
-
return
|
|
4070
|
+
return o().getInputsLocked(this.handle);
|
|
4044
4071
|
}
|
|
4045
4072
|
getOutputsLocked() {
|
|
4046
|
-
return
|
|
4073
|
+
return o().getOutputsLocked(this.handle);
|
|
4047
4074
|
}
|
|
4048
4075
|
getIsReadyOrError() {
|
|
4049
|
-
return
|
|
4076
|
+
return o().getIsReadyOrError(this.handle);
|
|
4050
4077
|
}
|
|
4051
4078
|
getIsFinal() {
|
|
4052
|
-
return
|
|
4079
|
+
return o().getIsFinal(this.handle);
|
|
4053
4080
|
}
|
|
4054
4081
|
getError() {
|
|
4055
|
-
return
|
|
4082
|
+
return V(o().getError(this.handle));
|
|
4056
4083
|
}
|
|
4057
4084
|
listInputFields() {
|
|
4058
|
-
return
|
|
4085
|
+
return o().listInputFields(this.handle);
|
|
4059
4086
|
}
|
|
4060
4087
|
listOutputFields() {
|
|
4061
|
-
return
|
|
4088
|
+
return o().listOutputFields(this.handle);
|
|
4062
4089
|
}
|
|
4063
4090
|
listDynamicFields() {
|
|
4064
|
-
return
|
|
4091
|
+
return o().listDynamicFields(this.handle);
|
|
4065
4092
|
}
|
|
4066
4093
|
getKeyValueBase64(t) {
|
|
4067
|
-
return
|
|
4094
|
+
return o().getKeyValueBase64(this.handle, t);
|
|
4068
4095
|
}
|
|
4069
4096
|
getKeyValueAsString(t) {
|
|
4070
|
-
return
|
|
4097
|
+
return o().getKeyValueAsString(this.handle, t);
|
|
4071
4098
|
}
|
|
4072
4099
|
getKeyValueAsJson(t) {
|
|
4073
4100
|
const n = this.getKeyValueAsString(t);
|
|
@@ -4075,10 +4102,10 @@
|
|
|
4075
4102
|
return JSON.parse(n);
|
|
4076
4103
|
}
|
|
4077
4104
|
getDataBase64() {
|
|
4078
|
-
return
|
|
4105
|
+
return o().getDataBase64(this.handle);
|
|
4079
4106
|
}
|
|
4080
4107
|
getDataAsString() {
|
|
4081
|
-
return
|
|
4108
|
+
return o().getDataAsString(this.handle);
|
|
4082
4109
|
}
|
|
4083
4110
|
getDataAsJson() {
|
|
4084
4111
|
const t = this.getDataAsString();
|
|
@@ -4090,35 +4117,35 @@
|
|
|
4090
4117
|
*/
|
|
4091
4118
|
getPColumns(t = false, n = "") {
|
|
4092
4119
|
const i2 = this.parsePObjectCollection(t, n);
|
|
4093
|
-
return i2 === void 0 ? void 0 : Object.entries(i2).map(([,
|
|
4094
|
-
if (!x$1(
|
|
4095
|
-
return
|
|
4120
|
+
return i2 === void 0 ? void 0 : Object.entries(i2).map(([, s]) => {
|
|
4121
|
+
if (!x$1(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
4122
|
+
return s;
|
|
4096
4123
|
});
|
|
4097
4124
|
}
|
|
4098
4125
|
/**
|
|
4099
4126
|
*
|
|
4100
4127
|
*/
|
|
4101
4128
|
parsePObjectCollection(t = false, n = "") {
|
|
4102
|
-
const i2 =
|
|
4129
|
+
const i2 = o().parsePObjectCollection(
|
|
4103
4130
|
this.handle,
|
|
4104
4131
|
t,
|
|
4105
4132
|
n
|
|
4106
4133
|
);
|
|
4107
4134
|
if (i2 === void 0) return;
|
|
4108
4135
|
const r2 = {};
|
|
4109
|
-
for (const [
|
|
4110
|
-
r2[
|
|
4136
|
+
for (const [s, u] of Object.entries(i2))
|
|
4137
|
+
r2[s] = L$1(u, (a) => new m(a));
|
|
4111
4138
|
return r2;
|
|
4112
4139
|
}
|
|
4113
4140
|
getFileContentAsBase64() {
|
|
4114
|
-
return new h(
|
|
4141
|
+
return new h(o().getBlobContentAsBase64(this.handle));
|
|
4115
4142
|
}
|
|
4116
4143
|
getFileContentAsString() {
|
|
4117
|
-
return new h(
|
|
4144
|
+
return new h(o().getBlobContentAsString(this.handle));
|
|
4118
4145
|
}
|
|
4119
4146
|
getFileContentAsJson() {
|
|
4120
4147
|
return new h(
|
|
4121
|
-
|
|
4148
|
+
o().getBlobContentAsString(this.handle)
|
|
4122
4149
|
).mapDefined((t) => JSON.parse(t));
|
|
4123
4150
|
}
|
|
4124
4151
|
/**
|
|
@@ -4137,7 +4164,7 @@
|
|
|
4137
4164
|
* @returns downloaded file handle
|
|
4138
4165
|
*/
|
|
4139
4166
|
getFileHandle() {
|
|
4140
|
-
return new h(
|
|
4167
|
+
return new h(o().getDownloadedBlobContentHandle(this.handle));
|
|
4141
4168
|
}
|
|
4142
4169
|
/**
|
|
4143
4170
|
* @deprecated use getFileHandle
|
|
@@ -4149,7 +4176,7 @@
|
|
|
4149
4176
|
* @returns downloaded file handle
|
|
4150
4177
|
*/
|
|
4151
4178
|
getRemoteFileHandle() {
|
|
4152
|
-
return new h(
|
|
4179
|
+
return new h(o().getOnDemandBlobContentHandle(this.handle));
|
|
4153
4180
|
}
|
|
4154
4181
|
/**
|
|
4155
4182
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4158,16 +4185,16 @@
|
|
|
4158
4185
|
return this.getRemoteFileHandle();
|
|
4159
4186
|
}
|
|
4160
4187
|
getImportProgress() {
|
|
4161
|
-
return new h(
|
|
4188
|
+
return new h(o().getImportProgress(this.handle));
|
|
4162
4189
|
}
|
|
4163
4190
|
getLastLogs(t) {
|
|
4164
|
-
return new h(
|
|
4191
|
+
return new h(o().getLastLogs(this.handle, t));
|
|
4165
4192
|
}
|
|
4166
4193
|
getProgressLog(t) {
|
|
4167
|
-
return new h(
|
|
4194
|
+
return new h(o().getProgressLog(this.handle, t));
|
|
4168
4195
|
}
|
|
4169
4196
|
getLogHandle() {
|
|
4170
|
-
return new h(
|
|
4197
|
+
return new h(o().getLogHandle(this.handle));
|
|
4171
4198
|
}
|
|
4172
4199
|
allFieldsResolved(t = "Input") {
|
|
4173
4200
|
switch (t) {
|
|
@@ -4182,7 +4209,7 @@
|
|
|
4182
4209
|
}
|
|
4183
4210
|
}
|
|
4184
4211
|
mapFields(t, n) {
|
|
4185
|
-
const { fieldType: i2, requireLocked: r2, skipUnresolved:
|
|
4212
|
+
const { fieldType: i2, requireLocked: r2, skipUnresolved: s } = {
|
|
4186
4213
|
fieldType: "Input",
|
|
4187
4214
|
requireLocked: true,
|
|
4188
4215
|
skipUnresolved: false,
|
|
@@ -4190,17 +4217,17 @@
|
|
|
4190
4217
|
}, u = t;
|
|
4191
4218
|
if (r2 && (i2 === "Input" && !this.getInputsLocked() || i2 === "Output" && !this.getOutputsLocked()))
|
|
4192
4219
|
return;
|
|
4193
|
-
let
|
|
4194
|
-
(
|
|
4220
|
+
let d = (i2 === "Input" ? this.listInputFields() : i2 === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4221
|
+
(l) => [l, this.resolve({ field: l, assertFieldType: i2 })]
|
|
4195
4222
|
);
|
|
4196
|
-
return
|
|
4223
|
+
return s && (d = d.filter((l) => l[1] !== void 0)), d.map(([l, g]) => u(l, g));
|
|
4197
4224
|
}
|
|
4198
4225
|
}
|
|
4199
|
-
const L = "staging",
|
|
4200
|
-
class
|
|
4226
|
+
const L = "staging", T = "main";
|
|
4227
|
+
class Q {
|
|
4201
4228
|
constructor() {
|
|
4202
|
-
|
|
4203
|
-
|
|
4229
|
+
f(this, "ctx", o());
|
|
4230
|
+
f(this, "defaultLabelFn", (t, n) => {
|
|
4204
4231
|
var i2;
|
|
4205
4232
|
return ((i2 = t.annotations) == null ? void 0 : i2["pl7.app/label"]) ?? "Unlabelled";
|
|
4206
4233
|
});
|
|
@@ -4250,7 +4277,7 @@
|
|
|
4250
4277
|
ref: n.ref,
|
|
4251
4278
|
obj: {
|
|
4252
4279
|
...n.obj,
|
|
4253
|
-
data: O
|
|
4280
|
+
data: O(n.obj.data, (i2) => new m(i2))
|
|
4254
4281
|
}
|
|
4255
4282
|
}))
|
|
4256
4283
|
};
|
|
@@ -4297,10 +4324,10 @@
|
|
|
4297
4324
|
if (!r(i2.obj.spec))
|
|
4298
4325
|
continue;
|
|
4299
4326
|
const r$1 = i2.obj.spec;
|
|
4300
|
-
if (t.name === r$1.name && t.valueType === r$1.valueType && t.axesSpec.length === r$1.axesSpec.length &&
|
|
4301
|
-
for (let
|
|
4302
|
-
const u = t.axesSpec[
|
|
4303
|
-
if (u.name !== a.name || u.type !== a.type || !
|
|
4327
|
+
if (t.name === r$1.name && t.valueType === r$1.valueType && t.axesSpec.length === r$1.axesSpec.length && P(t.domain, r$1.domain)) {
|
|
4328
|
+
for (let s = 0; s < t.axesSpec.length; ++s) {
|
|
4329
|
+
const u = t.axesSpec[s], a = r$1.axesSpec[s];
|
|
4330
|
+
if (u.name !== a.name || u.type !== a.type || !P(u.domain, a.domain))
|
|
4304
4331
|
continue t;
|
|
4305
4332
|
}
|
|
4306
4333
|
n.push(i2.obj);
|
|
@@ -4309,7 +4336,7 @@
|
|
|
4309
4336
|
return n;
|
|
4310
4337
|
}
|
|
4311
4338
|
}
|
|
4312
|
-
function
|
|
4339
|
+
function P(e, t) {
|
|
4313
4340
|
if (e === void 0) return t === void 0;
|
|
4314
4341
|
if (t === void 0) return true;
|
|
4315
4342
|
for (const n in t)
|
|
@@ -4318,11 +4345,11 @@
|
|
|
4318
4345
|
}
|
|
4319
4346
|
class w {
|
|
4320
4347
|
constructor() {
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
this.ctx =
|
|
4348
|
+
f(this, "ctx");
|
|
4349
|
+
f(this, "args");
|
|
4350
|
+
f(this, "uiState");
|
|
4351
|
+
f(this, "resultPool", new Q());
|
|
4352
|
+
this.ctx = o(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
|
|
4326
4353
|
}
|
|
4327
4354
|
getNamedAccessor(t) {
|
|
4328
4355
|
const n = this.ctx.getAccessorHandleByName(t);
|
|
@@ -4344,7 +4371,7 @@
|
|
|
4344
4371
|
return this.precalc;
|
|
4345
4372
|
}
|
|
4346
4373
|
get outputs() {
|
|
4347
|
-
return this.getNamedAccessor(
|
|
4374
|
+
return this.getNamedAccessor(T);
|
|
4348
4375
|
}
|
|
4349
4376
|
/**
|
|
4350
4377
|
* @deprecated use outputs
|
|
@@ -4375,33 +4402,33 @@
|
|
|
4375
4402
|
return this.ctx.getCurrentUnstableMarker();
|
|
4376
4403
|
}
|
|
4377
4404
|
}
|
|
4378
|
-
const
|
|
4379
|
-
function
|
|
4405
|
+
const b = "1.10.2";
|
|
4406
|
+
function Z(e) {
|
|
4380
4407
|
return e.__renderLambda === true;
|
|
4381
4408
|
}
|
|
4382
|
-
function
|
|
4409
|
+
function I(e) {
|
|
4383
4410
|
if (e !== void 0)
|
|
4384
|
-
return
|
|
4411
|
+
return Z(e) ? e.handle : e;
|
|
4385
4412
|
}
|
|
4386
|
-
class
|
|
4387
|
-
constructor(t, n, i2, r2,
|
|
4388
|
-
this._renderingMode = t, this._initialArgs = n, this._initialUiState = i2, this._outputs = r2, this._inputsValid =
|
|
4413
|
+
class p {
|
|
4414
|
+
constructor(t, n, i2, r2, s, u, a) {
|
|
4415
|
+
this._renderingMode = t, this._initialArgs = n, this._initialUiState = i2, this._outputs = r2, this._inputsValid = s, this._sections = u, this._title = a;
|
|
4389
4416
|
}
|
|
4390
4417
|
static create(t = "Heavy") {
|
|
4391
|
-
return new
|
|
4418
|
+
return new p(
|
|
4392
4419
|
t,
|
|
4393
4420
|
void 0,
|
|
4394
4421
|
{},
|
|
4395
4422
|
{},
|
|
4396
|
-
|
|
4397
|
-
|
|
4423
|
+
C(true),
|
|
4424
|
+
C([]),
|
|
4398
4425
|
void 0
|
|
4399
4426
|
);
|
|
4400
4427
|
}
|
|
4401
4428
|
output(t, n, i2 = {}) {
|
|
4402
4429
|
if (typeof n == "function") {
|
|
4403
4430
|
const r2 = `output#${t}`;
|
|
4404
|
-
return
|
|
4431
|
+
return _(r2, () => n(new w())), new p(
|
|
4405
4432
|
this._renderingMode,
|
|
4406
4433
|
this._initialArgs,
|
|
4407
4434
|
this._initialUiState,
|
|
@@ -4418,7 +4445,7 @@
|
|
|
4418
4445
|
this._title
|
|
4419
4446
|
);
|
|
4420
4447
|
} else
|
|
4421
|
-
return new
|
|
4448
|
+
return new p(
|
|
4422
4449
|
this._renderingMode,
|
|
4423
4450
|
this._initialArgs,
|
|
4424
4451
|
this._initialUiState,
|
|
@@ -4440,7 +4467,7 @@
|
|
|
4440
4467
|
return this.inputsValid(t);
|
|
4441
4468
|
}
|
|
4442
4469
|
argsValid(t) {
|
|
4443
|
-
return typeof t == "function" ? (
|
|
4470
|
+
return typeof t == "function" ? (_("inputsValid", () => t(new w())), new p(
|
|
4444
4471
|
this._renderingMode,
|
|
4445
4472
|
this._initialArgs,
|
|
4446
4473
|
this._initialUiState,
|
|
@@ -4451,7 +4478,7 @@
|
|
|
4451
4478
|
},
|
|
4452
4479
|
this._sections,
|
|
4453
4480
|
this._title
|
|
4454
|
-
)) : new
|
|
4481
|
+
)) : new p(
|
|
4455
4482
|
this._renderingMode,
|
|
4456
4483
|
this._initialArgs,
|
|
4457
4484
|
this._initialUiState,
|
|
@@ -4465,7 +4492,7 @@
|
|
|
4465
4492
|
return this.argsValid(t);
|
|
4466
4493
|
}
|
|
4467
4494
|
sections(t) {
|
|
4468
|
-
return Array.isArray(t) ? this.sections(
|
|
4495
|
+
return Array.isArray(t) ? this.sections(C(t)) : typeof t == "function" ? (_("sections", () => t(new w())), new p(
|
|
4469
4496
|
this._renderingMode,
|
|
4470
4497
|
this._initialArgs,
|
|
4471
4498
|
this._initialUiState,
|
|
@@ -4473,7 +4500,7 @@
|
|
|
4473
4500
|
this._inputsValid,
|
|
4474
4501
|
{ __renderLambda: true, handle: "sections" },
|
|
4475
4502
|
this._title
|
|
4476
|
-
)) : new
|
|
4503
|
+
)) : new p(
|
|
4477
4504
|
this._renderingMode,
|
|
4478
4505
|
this._initialArgs,
|
|
4479
4506
|
this._initialUiState,
|
|
@@ -4484,7 +4511,7 @@
|
|
|
4484
4511
|
);
|
|
4485
4512
|
}
|
|
4486
4513
|
title(t) {
|
|
4487
|
-
return
|
|
4514
|
+
return _("title", () => t(new w())), new p(
|
|
4488
4515
|
this._renderingMode,
|
|
4489
4516
|
this._initialArgs,
|
|
4490
4517
|
this._initialUiState,
|
|
@@ -4499,7 +4526,7 @@
|
|
|
4499
4526
|
* @deprecated use {@link withArgs}
|
|
4500
4527
|
* */
|
|
4501
4528
|
initialArgs(t) {
|
|
4502
|
-
return new
|
|
4529
|
+
return new p(
|
|
4503
4530
|
this._renderingMode,
|
|
4504
4531
|
t,
|
|
4505
4532
|
this._initialUiState,
|
|
@@ -4511,7 +4538,7 @@
|
|
|
4511
4538
|
}
|
|
4512
4539
|
/** Sets initial args for the block, this value must be specified. */
|
|
4513
4540
|
withArgs(t) {
|
|
4514
|
-
return new
|
|
4541
|
+
return new p(
|
|
4515
4542
|
this._renderingMode,
|
|
4516
4543
|
t,
|
|
4517
4544
|
this._initialUiState,
|
|
@@ -4523,7 +4550,7 @@
|
|
|
4523
4550
|
}
|
|
4524
4551
|
/** Defines type and sets initial value for block UiState. */
|
|
4525
4552
|
withUiState(t) {
|
|
4526
|
-
return new
|
|
4553
|
+
return new p(
|
|
4527
4554
|
this._renderingMode,
|
|
4528
4555
|
this._initialArgs,
|
|
4529
4556
|
t,
|
|
@@ -4540,7 +4567,7 @@
|
|
|
4540
4567
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
4541
4568
|
const t = {
|
|
4542
4569
|
v3: {
|
|
4543
|
-
sdkVersion:
|
|
4570
|
+
sdkVersion: b,
|
|
4544
4571
|
renderingMode: this._renderingMode,
|
|
4545
4572
|
initialArgs: this._initialArgs,
|
|
4546
4573
|
initialUiState: this._initialUiState,
|
|
@@ -4550,22 +4577,22 @@
|
|
|
4550
4577
|
outputs: this._outputs
|
|
4551
4578
|
},
|
|
4552
4579
|
// fields below are added to allow previous desktop versions read generated configs
|
|
4553
|
-
sdkVersion:
|
|
4580
|
+
sdkVersion: b,
|
|
4554
4581
|
renderingMode: this._renderingMode,
|
|
4555
4582
|
initialArgs: this._initialArgs,
|
|
4556
|
-
inputsValid:
|
|
4557
|
-
sections:
|
|
4583
|
+
inputsValid: I(this._inputsValid),
|
|
4584
|
+
sections: I(this._sections),
|
|
4558
4585
|
outputs: Object.fromEntries(
|
|
4559
|
-
Object.entries(this._outputs).map(([n, i2]) => [n,
|
|
4586
|
+
Object.entries(this._outputs).map(([n, i2]) => [n, I(i2)])
|
|
4560
4587
|
)
|
|
4561
4588
|
};
|
|
4562
|
-
return
|
|
4589
|
+
return K() ? x({ sdkVersion: b }) : { config: t };
|
|
4563
4590
|
}
|
|
4564
4591
|
}
|
|
4565
|
-
const $BlockArgs = z
|
|
4566
|
-
numbers: z
|
|
4592
|
+
const $BlockArgs = z.object({
|
|
4593
|
+
numbers: z.array(z.coerce.number())
|
|
4567
4594
|
});
|
|
4568
|
-
const platforma =
|
|
4595
|
+
const platforma = p.create("Heavy").withArgs({ numbers: [] }).withUiState({ dataTableState: void 0 }).output("numbers", (ctx) => {
|
|
4569
4596
|
var _a, _b;
|
|
4570
4597
|
return (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("numbers")) == null ? void 0 : _b.getDataAsJson();
|
|
4571
4598
|
}).output("pFrame", (ctx) => {
|