@milaboratories/milaboratories.ui-examples.model 1.1.9 → 1.1.11
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 +13 -13
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +292 -276
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +20 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/eslint.config.mjs +7 -0
- package/package.json +5 -4
- package/src/index.ts +39 -16
package/dist/bundle.js
CHANGED
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
overrideMap,
|
|
392
392
|
overrideMap === errorMap ? void 0 : errorMap
|
|
393
393
|
// then global default map
|
|
394
|
-
].filter((
|
|
394
|
+
].filter((x) => !!x)
|
|
395
395
|
});
|
|
396
396
|
ctx.common.issues.push(issue);
|
|
397
397
|
}
|
|
@@ -454,10 +454,10 @@
|
|
|
454
454
|
});
|
|
455
455
|
const DIRTY = (value) => ({ status: "dirty", value });
|
|
456
456
|
const OK = (value) => ({ status: "valid", value });
|
|
457
|
-
const isAborted = (
|
|
458
|
-
const isDirty = (
|
|
459
|
-
const isValid = (
|
|
460
|
-
const isAsync = (
|
|
457
|
+
const isAborted = (x) => x.status === "aborted";
|
|
458
|
+
const isDirty = (x) => x.status === "dirty";
|
|
459
|
+
const isValid = (x) => x.status === "valid";
|
|
460
|
+
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
461
461
|
function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
462
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);
|
|
@@ -2787,7 +2787,7 @@
|
|
|
2787
2787
|
if (!schema)
|
|
2788
2788
|
return null;
|
|
2789
2789
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
2790
|
-
}).filter((
|
|
2790
|
+
}).filter((x) => !!x);
|
|
2791
2791
|
if (ctx.common.async) {
|
|
2792
2792
|
return Promise.all(items).then((results) => {
|
|
2793
2793
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
ctx.schemaErrorMap,
|
|
3046
3046
|
getErrorMap(),
|
|
3047
3047
|
errorMap
|
|
3048
|
-
].filter((
|
|
3048
|
+
].filter((x) => !!x),
|
|
3049
3049
|
issueData: {
|
|
3050
3050
|
code: ZodIssueCode.invalid_arguments,
|
|
3051
3051
|
argumentsError: error
|
|
@@ -3061,7 +3061,7 @@
|
|
|
3061
3061
|
ctx.schemaErrorMap,
|
|
3062
3062
|
getErrorMap(),
|
|
3063
3063
|
errorMap
|
|
3064
|
-
].filter((
|
|
3064
|
+
].filter((x) => !!x),
|
|
3065
3065
|
issueData: {
|
|
3066
3066
|
code: ZodIssueCode.invalid_return_type,
|
|
3067
3067
|
returnTypeError: error
|
|
@@ -3917,7 +3917,7 @@
|
|
|
3917
3917
|
function b$1(t) {
|
|
3918
3918
|
throw new Error("Unexpected object: " + t);
|
|
3919
3919
|
}
|
|
3920
|
-
function J(t) {
|
|
3920
|
+
function J$1(t) {
|
|
3921
3921
|
const { type: n, name: e, domain: r } = t;
|
|
3922
3922
|
return { type: n, name: e, ...r && { domain: r } };
|
|
3923
3923
|
}
|
|
@@ -4000,60 +4000,60 @@
|
|
|
4000
4000
|
};
|
|
4001
4001
|
return e(t), [...n.values()];
|
|
4002
4002
|
}
|
|
4003
|
-
function mt
|
|
4003
|
+
function mt(t, n) {
|
|
4004
4004
|
return t.ok ? { ok: true, value: n(t.value) } : t;
|
|
4005
4005
|
}
|
|
4006
4006
|
const Q = 24;
|
|
4007
4007
|
z.string().length(Q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4008
|
-
var
|
|
4009
|
-
var
|
|
4010
|
-
var
|
|
4011
|
-
function
|
|
4012
|
-
return { type: "Immediate", value:
|
|
4008
|
+
var fe = Object.defineProperty;
|
|
4009
|
+
var he = (n, e, t) => e in n ? fe(n, e, { enumerable: true, configurable: true, writable: true, value: t }) : n[e] = t;
|
|
4010
|
+
var w = (n, e, t) => he(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4011
|
+
function V(n) {
|
|
4012
|
+
return { type: "Immediate", value: n };
|
|
4013
4013
|
}
|
|
4014
|
-
function
|
|
4014
|
+
function Se() {
|
|
4015
4015
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4016
4016
|
}
|
|
4017
|
-
function
|
|
4018
|
-
if (
|
|
4019
|
-
return globalThis.getPlatforma(
|
|
4017
|
+
function oe(n) {
|
|
4018
|
+
if (n && typeof globalThis.getPlatforma == "function")
|
|
4019
|
+
return globalThis.getPlatforma(n);
|
|
4020
4020
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4021
4021
|
throw new Error("Can't get platforma instance.");
|
|
4022
4022
|
}
|
|
4023
4023
|
function we() {
|
|
4024
4024
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4025
4025
|
}
|
|
4026
|
-
function
|
|
4026
|
+
function c() {
|
|
4027
4027
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4028
4028
|
throw new Error("Not in config rendering context");
|
|
4029
4029
|
}
|
|
4030
|
-
function
|
|
4031
|
-
const
|
|
4032
|
-
if (
|
|
4033
|
-
if (
|
|
4034
|
-
return
|
|
4030
|
+
function E(n, e) {
|
|
4031
|
+
const t = we();
|
|
4032
|
+
if (t === void 0) return false;
|
|
4033
|
+
if (n in t.callbackRegistry) throw new Error(`Callback with key ${n} already registered.`);
|
|
4034
|
+
return t.callbackRegistry[n] = e, true;
|
|
4035
4035
|
}
|
|
4036
|
-
const
|
|
4037
|
-
function
|
|
4038
|
-
|
|
4039
|
-
for (const r of
|
|
4040
|
-
r(
|
|
4041
|
-
},
|
|
4036
|
+
const J = /* @__PURE__ */ new Map();
|
|
4037
|
+
function Ce(n, e) {
|
|
4038
|
+
n in c().callbackRegistry || (c().callbackRegistry[n] = (t) => {
|
|
4039
|
+
for (const r of J.get(n))
|
|
4040
|
+
r(t);
|
|
4041
|
+
}, J.set(n, [])), J.get(n).push(e);
|
|
4042
4042
|
}
|
|
4043
|
-
class
|
|
4044
|
-
constructor(e,
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
this.handle = e, this.postProcess =
|
|
4048
|
-
this.resolvedValue =
|
|
4043
|
+
class _ {
|
|
4044
|
+
constructor(e, t = (r) => r) {
|
|
4045
|
+
w(this, "isResolved", false);
|
|
4046
|
+
w(this, "resolvedValue");
|
|
4047
|
+
this.handle = e, this.postProcess = t, Ce(e, (r) => {
|
|
4048
|
+
this.resolvedValue = t(r), this.isResolved = true;
|
|
4049
4049
|
});
|
|
4050
4050
|
}
|
|
4051
4051
|
map(e) {
|
|
4052
|
-
return new
|
|
4052
|
+
return new _(this.handle, (t) => e(this.postProcess(t)));
|
|
4053
4053
|
}
|
|
4054
4054
|
mapDefined(e) {
|
|
4055
|
-
return new
|
|
4056
|
-
const r = this.postProcess(
|
|
4055
|
+
return new _(this.handle, (t) => {
|
|
4056
|
+
const r = this.postProcess(t);
|
|
4057
4057
|
return r ? e(r) : void 0;
|
|
4058
4058
|
});
|
|
4059
4059
|
}
|
|
@@ -4061,100 +4061,100 @@
|
|
|
4061
4061
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4062
4062
|
}
|
|
4063
4063
|
}
|
|
4064
|
-
function
|
|
4065
|
-
return
|
|
4064
|
+
function H(n, e) {
|
|
4065
|
+
return n === void 0 ? void 0 : e(n);
|
|
4066
4066
|
}
|
|
4067
|
-
class
|
|
4068
|
-
constructor(e,
|
|
4069
|
-
this.handle = e, this.resolvePath =
|
|
4067
|
+
class b {
|
|
4068
|
+
constructor(e, t) {
|
|
4069
|
+
this.handle = e, this.resolvePath = t;
|
|
4070
4070
|
}
|
|
4071
4071
|
resolve(...e) {
|
|
4072
|
-
const
|
|
4072
|
+
const t = e.map(
|
|
4073
4073
|
(r) => ({
|
|
4074
4074
|
assertFieldType: "Input",
|
|
4075
4075
|
...typeof r == "string" ? { field: r } : r
|
|
4076
4076
|
})
|
|
4077
4077
|
);
|
|
4078
|
-
return this.resolveWithCommon({}, ...
|
|
4078
|
+
return this.resolveWithCommon({}, ...t);
|
|
4079
4079
|
}
|
|
4080
4080
|
resolveOutput(...e) {
|
|
4081
|
-
const
|
|
4081
|
+
const t = e.map(
|
|
4082
4082
|
(r) => ({
|
|
4083
4083
|
assertFieldType: "Output",
|
|
4084
4084
|
...typeof r == "string" ? { field: r } : r
|
|
4085
4085
|
})
|
|
4086
4086
|
);
|
|
4087
|
-
return this.resolveWithCommon({}, ...
|
|
4087
|
+
return this.resolveWithCommon({}, ...t);
|
|
4088
4088
|
}
|
|
4089
4089
|
resolveInput(...e) {
|
|
4090
|
-
const
|
|
4090
|
+
const t = e.map(
|
|
4091
4091
|
(r) => ({
|
|
4092
4092
|
assertFieldType: "Input",
|
|
4093
4093
|
...typeof r == "string" ? { field: r } : r
|
|
4094
4094
|
})
|
|
4095
4095
|
);
|
|
4096
|
-
return this.resolveWithCommon({}, ...
|
|
4096
|
+
return this.resolveWithCommon({}, ...t);
|
|
4097
4097
|
}
|
|
4098
4098
|
resolveAny(...e) {
|
|
4099
4099
|
return this.resolveWithCommon({}, ...e);
|
|
4100
4100
|
}
|
|
4101
|
-
resolveWithCommon(e, ...
|
|
4101
|
+
resolveWithCommon(e, ...t) {
|
|
4102
4102
|
const r = [
|
|
4103
4103
|
...this.resolvePath,
|
|
4104
|
-
...
|
|
4104
|
+
...t.map((s) => typeof s == "string" ? s : s.field)
|
|
4105
4105
|
];
|
|
4106
|
-
return
|
|
4107
|
-
|
|
4108
|
-
(
|
|
4106
|
+
return H(
|
|
4107
|
+
c().resolveWithCommon(this.handle, e, ...t),
|
|
4108
|
+
(s) => new b(s, r)
|
|
4109
4109
|
);
|
|
4110
4110
|
}
|
|
4111
4111
|
get resourceType() {
|
|
4112
|
-
return
|
|
4112
|
+
return c().getResourceType(this.handle);
|
|
4113
4113
|
}
|
|
4114
4114
|
getInputsLocked() {
|
|
4115
|
-
return
|
|
4115
|
+
return c().getInputsLocked(this.handle);
|
|
4116
4116
|
}
|
|
4117
4117
|
getOutputsLocked() {
|
|
4118
|
-
return
|
|
4118
|
+
return c().getOutputsLocked(this.handle);
|
|
4119
4119
|
}
|
|
4120
4120
|
getIsReadyOrError() {
|
|
4121
|
-
return
|
|
4121
|
+
return c().getIsReadyOrError(this.handle);
|
|
4122
4122
|
}
|
|
4123
4123
|
getIsFinal() {
|
|
4124
|
-
return
|
|
4124
|
+
return c().getIsFinal(this.handle);
|
|
4125
4125
|
}
|
|
4126
4126
|
getError() {
|
|
4127
4127
|
const e = [...this.resolvePath, "error"];
|
|
4128
|
-
return
|
|
4129
|
-
|
|
4130
|
-
(
|
|
4128
|
+
return H(
|
|
4129
|
+
c().getError(this.handle),
|
|
4130
|
+
(t) => new b(t, e)
|
|
4131
4131
|
);
|
|
4132
4132
|
}
|
|
4133
4133
|
listInputFields() {
|
|
4134
|
-
return
|
|
4134
|
+
return c().listInputFields(this.handle);
|
|
4135
4135
|
}
|
|
4136
4136
|
listOutputFields() {
|
|
4137
|
-
return
|
|
4137
|
+
return c().listOutputFields(this.handle);
|
|
4138
4138
|
}
|
|
4139
4139
|
listDynamicFields() {
|
|
4140
|
-
return
|
|
4140
|
+
return c().listDynamicFields(this.handle);
|
|
4141
4141
|
}
|
|
4142
4142
|
getKeyValueBase64(e) {
|
|
4143
|
-
return
|
|
4143
|
+
return c().getKeyValueBase64(this.handle, e);
|
|
4144
4144
|
}
|
|
4145
4145
|
getKeyValueAsString(e) {
|
|
4146
|
-
return
|
|
4146
|
+
return c().getKeyValueAsString(this.handle, e);
|
|
4147
4147
|
}
|
|
4148
4148
|
getKeyValueAsJson(e) {
|
|
4149
|
-
const
|
|
4150
|
-
if (
|
|
4151
|
-
return JSON.parse(
|
|
4149
|
+
const t = this.getKeyValueAsString(e);
|
|
4150
|
+
if (t == null) throw new Error("Resource has no content.");
|
|
4151
|
+
return JSON.parse(t);
|
|
4152
4152
|
}
|
|
4153
4153
|
getDataBase64() {
|
|
4154
|
-
return
|
|
4154
|
+
return c().getDataBase64(this.handle);
|
|
4155
4155
|
}
|
|
4156
4156
|
getDataAsString() {
|
|
4157
|
-
return
|
|
4157
|
+
return c().getDataAsString(this.handle);
|
|
4158
4158
|
}
|
|
4159
4159
|
getDataAsJson() {
|
|
4160
4160
|
const e = this.getDataAsString();
|
|
@@ -4164,40 +4164,40 @@
|
|
|
4164
4164
|
/**
|
|
4165
4165
|
*
|
|
4166
4166
|
*/
|
|
4167
|
-
getPColumns(e = false,
|
|
4168
|
-
const r = this.parsePObjectCollection(e,
|
|
4169
|
-
return r === void 0 ? void 0 : Object.entries(r).map(([,
|
|
4170
|
-
if (!W(
|
|
4171
|
-
return
|
|
4167
|
+
getPColumns(e = false, t = "") {
|
|
4168
|
+
const r = this.parsePObjectCollection(e, t);
|
|
4169
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, i2]) => {
|
|
4170
|
+
if (!W(i2)) throw new Error(`not a PColumn (kind = ${i2.spec.kind})`);
|
|
4171
|
+
return i2;
|
|
4172
4172
|
});
|
|
4173
4173
|
}
|
|
4174
4174
|
/**
|
|
4175
4175
|
*
|
|
4176
4176
|
*/
|
|
4177
|
-
parsePObjectCollection(e = false,
|
|
4178
|
-
const r =
|
|
4177
|
+
parsePObjectCollection(e = false, t = "") {
|
|
4178
|
+
const r = c().parsePObjectCollection(
|
|
4179
4179
|
this.handle,
|
|
4180
4180
|
e,
|
|
4181
|
-
|
|
4181
|
+
t,
|
|
4182
4182
|
...this.resolvePath
|
|
4183
4183
|
);
|
|
4184
4184
|
if (r === void 0) return;
|
|
4185
|
-
const
|
|
4186
|
-
for (const [
|
|
4187
|
-
const
|
|
4188
|
-
i2
|
|
4185
|
+
const s = {};
|
|
4186
|
+
for (const [i2, o] of Object.entries(r)) {
|
|
4187
|
+
const l = [...this.resolvePath, i2];
|
|
4188
|
+
s[i2] = lt(o, (a) => new b(a, l));
|
|
4189
4189
|
}
|
|
4190
|
-
return
|
|
4190
|
+
return s;
|
|
4191
4191
|
}
|
|
4192
4192
|
getFileContentAsBase64() {
|
|
4193
|
-
return new
|
|
4193
|
+
return new _(c().getBlobContentAsBase64(this.handle));
|
|
4194
4194
|
}
|
|
4195
4195
|
getFileContentAsString() {
|
|
4196
|
-
return new
|
|
4196
|
+
return new _(c().getBlobContentAsString(this.handle));
|
|
4197
4197
|
}
|
|
4198
4198
|
getFileContentAsJson() {
|
|
4199
|
-
return new
|
|
4200
|
-
|
|
4199
|
+
return new _(
|
|
4200
|
+
c().getBlobContentAsString(this.handle)
|
|
4201
4201
|
).mapDefined((e) => JSON.parse(e));
|
|
4202
4202
|
}
|
|
4203
4203
|
/**
|
|
@@ -4216,7 +4216,7 @@
|
|
|
4216
4216
|
* @returns downloaded file handle
|
|
4217
4217
|
*/
|
|
4218
4218
|
getFileHandle() {
|
|
4219
|
-
return new
|
|
4219
|
+
return new _(c().getDownloadedBlobContentHandle(this.handle));
|
|
4220
4220
|
}
|
|
4221
4221
|
/**
|
|
4222
4222
|
* @deprecated use getFileHandle
|
|
@@ -4228,7 +4228,7 @@
|
|
|
4228
4228
|
* @returns downloaded file handle
|
|
4229
4229
|
*/
|
|
4230
4230
|
getRemoteFileHandle() {
|
|
4231
|
-
return new
|
|
4231
|
+
return new _(c().getOnDemandBlobContentHandle(this.handle));
|
|
4232
4232
|
}
|
|
4233
4233
|
/**
|
|
4234
4234
|
* @deprecated use getRemoteFileHandle
|
|
@@ -4237,109 +4237,109 @@
|
|
|
4237
4237
|
return this.getRemoteFileHandle();
|
|
4238
4238
|
}
|
|
4239
4239
|
getImportProgress() {
|
|
4240
|
-
return new
|
|
4240
|
+
return new _(c().getImportProgress(this.handle));
|
|
4241
4241
|
}
|
|
4242
4242
|
getLastLogs(e) {
|
|
4243
|
-
return new
|
|
4243
|
+
return new _(c().getLastLogs(this.handle, e));
|
|
4244
4244
|
}
|
|
4245
4245
|
getProgressLog(e) {
|
|
4246
|
-
return new
|
|
4246
|
+
return new _(c().getProgressLog(this.handle, e));
|
|
4247
4247
|
}
|
|
4248
4248
|
getLogHandle() {
|
|
4249
|
-
return new
|
|
4249
|
+
return new _(c().getLogHandle(this.handle));
|
|
4250
4250
|
}
|
|
4251
4251
|
allFieldsResolved(e = "Input") {
|
|
4252
4252
|
switch (e) {
|
|
4253
4253
|
case "Input":
|
|
4254
4254
|
return this.getInputsLocked() && this.listInputFields().every(
|
|
4255
|
-
(
|
|
4255
|
+
(t) => this.resolve({ field: t, assertFieldType: "Input" }) !== void 0
|
|
4256
4256
|
);
|
|
4257
4257
|
case "Output":
|
|
4258
4258
|
return this.getOutputsLocked() && this.listOutputFields().every(
|
|
4259
|
-
(
|
|
4259
|
+
(t) => this.resolve({ field: t, assertFieldType: "Output" }) !== void 0
|
|
4260
4260
|
);
|
|
4261
4261
|
}
|
|
4262
4262
|
}
|
|
4263
|
-
mapFields(e,
|
|
4264
|
-
const { fieldType: r, requireLocked:
|
|
4263
|
+
mapFields(e, t) {
|
|
4264
|
+
const { fieldType: r, requireLocked: s, skipUnresolved: i2 } = {
|
|
4265
4265
|
fieldType: "Input",
|
|
4266
4266
|
requireLocked: true,
|
|
4267
4267
|
skipUnresolved: false,
|
|
4268
|
-
...
|
|
4268
|
+
...t
|
|
4269
4269
|
}, o = e;
|
|
4270
|
-
if (
|
|
4270
|
+
if (s && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
4271
4271
|
return;
|
|
4272
|
-
let
|
|
4272
|
+
let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
4273
4273
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
4274
4274
|
);
|
|
4275
|
-
return
|
|
4275
|
+
return i2 && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, h]) => o(u, h));
|
|
4276
4276
|
}
|
|
4277
4277
|
}
|
|
4278
|
-
const
|
|
4279
|
-
const
|
|
4278
|
+
const ae = "staging", le = "main";
|
|
4279
|
+
const Ie = "pl7.app/label", Fe = "pl7.app/trace", Re = z.object({
|
|
4280
4280
|
type: z.string(),
|
|
4281
4281
|
importance: z.number().optional(),
|
|
4282
4282
|
id: z.string().optional(),
|
|
4283
4283
|
label: z.string()
|
|
4284
|
-
}),
|
|
4285
|
-
function
|
|
4286
|
-
const r = /* @__PURE__ */ new Map(),
|
|
4287
|
-
var
|
|
4288
|
-
const
|
|
4284
|
+
}), Oe = z.array(Re), Te = 1e-3, ke = "__LABEL__", ee = "__LABEL__@1";
|
|
4285
|
+
function xe(n, e, t = {}) {
|
|
4286
|
+
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i2 = n.map((p) => {
|
|
4287
|
+
var F, Q2;
|
|
4288
|
+
const g = e(p), f2 = (F = g.annotations) == null ? void 0 : F[Ie], C = (Q2 = g.annotations) == null ? void 0 : Q2[Fe], y = (C ? Oe.safeParse(JSON.parse(C)).data : void 0) ?? [];
|
|
4289
4289
|
if (f2) {
|
|
4290
|
-
const
|
|
4291
|
-
|
|
4290
|
+
const S = { label: f2, type: ke, importance: -2 };
|
|
4291
|
+
t.addLabelAsSuffix ? y.push(S) : y.splice(0, 0, S);
|
|
4292
4292
|
}
|
|
4293
4293
|
const I = [], D = /* @__PURE__ */ new Map();
|
|
4294
|
-
for (let
|
|
4295
|
-
const { type:
|
|
4296
|
-
D.set(
|
|
4297
|
-
const
|
|
4298
|
-
|
|
4299
|
-
|
|
4294
|
+
for (let S = y.length - 1; S >= 0; --S) {
|
|
4295
|
+
const { type: M } = y[S], pe = y[S].importance ?? 0, U = (D.get(M) ?? 0) + 1;
|
|
4296
|
+
D.set(M, U);
|
|
4297
|
+
const R = `${M}@${U}`;
|
|
4298
|
+
s.set(R, (s.get(R) ?? 0) + 1), r.set(
|
|
4299
|
+
R,
|
|
4300
4300
|
Math.max(
|
|
4301
|
-
r.get(
|
|
4302
|
-
|
|
4301
|
+
r.get(R) ?? Number.NEGATIVE_INFINITY,
|
|
4302
|
+
pe - (y.length - S) * Te
|
|
4303
4303
|
)
|
|
4304
|
-
), I.push({ ...y[
|
|
4304
|
+
), I.push({ ...y[S], fullType: R, occurenceIndex: U });
|
|
4305
4305
|
}
|
|
4306
4306
|
return I.reverse(), {
|
|
4307
4307
|
value: p,
|
|
4308
|
-
spec:
|
|
4308
|
+
spec: g,
|
|
4309
4309
|
label: f2,
|
|
4310
4310
|
fullTrace: I
|
|
4311
4311
|
};
|
|
4312
|
-
}), o = [],
|
|
4313
|
-
|
|
4314
|
-
for (const [p] of
|
|
4315
|
-
p.endsWith("@1") ||
|
|
4316
|
-
const u = (p) =>
|
|
4317
|
-
const f2 =
|
|
4312
|
+
}), o = [], l = [], a = [...r];
|
|
4313
|
+
a.sort(([, p], [, g]) => g - p);
|
|
4314
|
+
for (const [p] of a)
|
|
4315
|
+
p.endsWith("@1") || s.get(p) === n.length ? o.push(p) : l.push(p);
|
|
4316
|
+
const u = (p) => i2.map((g) => {
|
|
4317
|
+
const f2 = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), C = t.separator ?? " / ";
|
|
4318
4318
|
return {
|
|
4319
4319
|
label: f2.join(C),
|
|
4320
|
-
value:
|
|
4320
|
+
value: g.value
|
|
4321
4321
|
};
|
|
4322
4322
|
});
|
|
4323
4323
|
if (o.length === 0) {
|
|
4324
|
-
if (
|
|
4325
|
-
return u(new Set(
|
|
4324
|
+
if (l.length !== 0) throw new Error("Assertion error.");
|
|
4325
|
+
return u(new Set(ee));
|
|
4326
4326
|
}
|
|
4327
|
-
let
|
|
4328
|
-
for (;
|
|
4327
|
+
let h = 0, d = 0;
|
|
4328
|
+
for (; h < o.length; ) {
|
|
4329
4329
|
const p = /* @__PURE__ */ new Set();
|
|
4330
|
-
|
|
4331
|
-
for (let f2 = 0; f2 <
|
|
4330
|
+
t.includeNativeLabel && p.add(ee);
|
|
4331
|
+
for (let f2 = 0; f2 < h; ++f2) p.add(o[f2]);
|
|
4332
4332
|
p.add(o[d]);
|
|
4333
|
-
const
|
|
4334
|
-
if (new Set(
|
|
4335
|
-
d++, d == o.length && (
|
|
4333
|
+
const g = u(p);
|
|
4334
|
+
if (new Set(g.map((f2) => f2.label)).size === n.length) return g;
|
|
4335
|
+
d++, d == o.length && (h++, d = h);
|
|
4336
4336
|
}
|
|
4337
|
-
return u(/* @__PURE__ */ new Set([...o, ...
|
|
4337
|
+
return u(/* @__PURE__ */ new Set([...o, ...l]));
|
|
4338
4338
|
}
|
|
4339
4339
|
class De {
|
|
4340
4340
|
constructor() {
|
|
4341
|
-
|
|
4342
|
-
|
|
4341
|
+
w(this, "ctx", c());
|
|
4342
|
+
w(this, "defaultLabelFn", (e, t) => {
|
|
4343
4343
|
var r;
|
|
4344
4344
|
return ((r = e.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
|
|
4345
4345
|
});
|
|
@@ -4350,14 +4350,14 @@
|
|
|
4350
4350
|
calculateOptions(e) {
|
|
4351
4351
|
return this.ctx.calculateOptions(e);
|
|
4352
4352
|
}
|
|
4353
|
-
getOptions(e,
|
|
4354
|
-
const r = this.getSpecs().entries.filter((
|
|
4355
|
-
return typeof
|
|
4356
|
-
ref:
|
|
4357
|
-
label:
|
|
4358
|
-
})) : r.map((
|
|
4359
|
-
ref:
|
|
4360
|
-
label:
|
|
4353
|
+
getOptions(e, t) {
|
|
4354
|
+
const r = this.getSpecs().entries.filter((s) => e(s.obj));
|
|
4355
|
+
return typeof t == "object" || typeof t > "u" ? xe(r, (s) => s.obj, t ?? {}).map(({ value: { ref: s }, label: i2 }) => ({
|
|
4356
|
+
ref: s,
|
|
4357
|
+
label: i2
|
|
4358
|
+
})) : r.map((s) => ({
|
|
4359
|
+
ref: s.ref,
|
|
4360
|
+
label: t(s.obj, s.ref)
|
|
4361
4361
|
}));
|
|
4362
4362
|
}
|
|
4363
4363
|
/**
|
|
@@ -4370,11 +4370,11 @@
|
|
|
4370
4370
|
const e = this.ctx.getDataFromResultPool();
|
|
4371
4371
|
return {
|
|
4372
4372
|
isComplete: e.isComplete,
|
|
4373
|
-
entries: e.entries.map((
|
|
4374
|
-
ref:
|
|
4373
|
+
entries: e.entries.map((t) => ({
|
|
4374
|
+
ref: t.ref,
|
|
4375
4375
|
obj: {
|
|
4376
|
-
...
|
|
4377
|
-
data: new
|
|
4376
|
+
...t.obj,
|
|
4377
|
+
data: new b(t.obj.data, [t.ref.blockId, t.ref.name])
|
|
4378
4378
|
}
|
|
4379
4379
|
}))
|
|
4380
4380
|
};
|
|
@@ -4389,13 +4389,13 @@
|
|
|
4389
4389
|
const e = this.ctx.getDataWithErrorsFromResultPool();
|
|
4390
4390
|
return {
|
|
4391
4391
|
isComplete: e.isComplete,
|
|
4392
|
-
entries: e.entries.map((
|
|
4393
|
-
ref:
|
|
4392
|
+
entries: e.entries.map((t) => ({
|
|
4393
|
+
ref: t.ref,
|
|
4394
4394
|
obj: {
|
|
4395
|
-
...
|
|
4396
|
-
data: mt
|
|
4397
|
-
|
|
4398
|
-
(r) => new
|
|
4395
|
+
...t.obj,
|
|
4396
|
+
data: mt(
|
|
4397
|
+
t.obj.data,
|
|
4398
|
+
(r) => new b(r, [t.ref.blockId, t.ref.name])
|
|
4399
4399
|
)
|
|
4400
4400
|
}
|
|
4401
4401
|
}))
|
|
@@ -4415,12 +4415,12 @@
|
|
|
4415
4415
|
* @returns data associated with the ref
|
|
4416
4416
|
*/
|
|
4417
4417
|
getDataByRef(e) {
|
|
4418
|
-
var
|
|
4419
|
-
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (
|
|
4418
|
+
var t;
|
|
4419
|
+
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (t = this.getData().entries.find(
|
|
4420
4420
|
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
4421
|
-
)) == null ? void 0 :
|
|
4421
|
+
)) == null ? void 0 : t.obj : lt(
|
|
4422
4422
|
this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
|
|
4423
|
-
(r) => new
|
|
4423
|
+
(r) => new b(r, [e.blockId, e.name])
|
|
4424
4424
|
);
|
|
4425
4425
|
}
|
|
4426
4426
|
/**
|
|
@@ -4429,9 +4429,9 @@
|
|
|
4429
4429
|
* @returns p-column associated with the ref
|
|
4430
4430
|
*/
|
|
4431
4431
|
getPColumnByRef(e) {
|
|
4432
|
-
const
|
|
4433
|
-
if (
|
|
4434
|
-
return dt(
|
|
4432
|
+
const t = this.getDataByRef(e);
|
|
4433
|
+
if (t)
|
|
4434
|
+
return dt(t);
|
|
4435
4435
|
}
|
|
4436
4436
|
/**
|
|
4437
4437
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -4439,10 +4439,10 @@
|
|
|
4439
4439
|
* @returns p-column spec associated with the ref
|
|
4440
4440
|
*/
|
|
4441
4441
|
getPColumnSpecByRef(e) {
|
|
4442
|
-
const
|
|
4443
|
-
if (
|
|
4444
|
-
if (!i(
|
|
4445
|
-
return
|
|
4442
|
+
const t = this.getSpecByRef(e);
|
|
4443
|
+
if (t) {
|
|
4444
|
+
if (!i(t)) throw new Error(`not a PColumn spec (kind = ${t.kind})`);
|
|
4445
|
+
return t;
|
|
4446
4446
|
}
|
|
4447
4447
|
}
|
|
4448
4448
|
/**
|
|
@@ -4450,10 +4450,10 @@
|
|
|
4450
4450
|
* @returns object spec associated with the ref
|
|
4451
4451
|
*/
|
|
4452
4452
|
getSpecByRef(e) {
|
|
4453
|
-
var
|
|
4454
|
-
return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (
|
|
4453
|
+
var t;
|
|
4454
|
+
return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (t = this.getSpecs().entries.find(
|
|
4455
4455
|
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
4456
|
-
)) == null ? void 0 :
|
|
4456
|
+
)) == null ? void 0 : t.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
|
|
4457
4457
|
}
|
|
4458
4458
|
/**
|
|
4459
4459
|
* @param spec object specification
|
|
@@ -4461,46 +4461,46 @@
|
|
|
4461
4461
|
* @deprecated delete this method after Jan 1, 2025
|
|
4462
4462
|
*/
|
|
4463
4463
|
findDataWithCompatibleSpec(e) {
|
|
4464
|
-
const
|
|
4464
|
+
const t = [];
|
|
4465
4465
|
e: for (const r of this.getData().entries) {
|
|
4466
4466
|
if (!i(r.obj.spec))
|
|
4467
4467
|
continue;
|
|
4468
|
-
const
|
|
4469
|
-
if (e.name ===
|
|
4470
|
-
for (let
|
|
4471
|
-
const o = e.axesSpec[
|
|
4472
|
-
if (o.name !==
|
|
4468
|
+
const s = r.obj.spec;
|
|
4469
|
+
if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length && q(e.domain, s.domain)) {
|
|
4470
|
+
for (let i2 = 0; i2 < e.axesSpec.length; ++i2) {
|
|
4471
|
+
const o = e.axesSpec[i2], l = s.axesSpec[i2];
|
|
4472
|
+
if (o.name !== l.name || o.type !== l.type || !q(o.domain, l.domain))
|
|
4473
4473
|
continue e;
|
|
4474
4474
|
}
|
|
4475
|
-
|
|
4475
|
+
t.push(r.obj);
|
|
4476
4476
|
}
|
|
4477
4477
|
}
|
|
4478
|
-
return
|
|
4478
|
+
return t;
|
|
4479
4479
|
}
|
|
4480
4480
|
}
|
|
4481
|
-
function
|
|
4482
|
-
if (
|
|
4481
|
+
function q(n, e) {
|
|
4482
|
+
if (n === void 0) return e === void 0;
|
|
4483
4483
|
if (e === void 0) return true;
|
|
4484
|
-
for (const
|
|
4485
|
-
if (t
|
|
4484
|
+
for (const t in e)
|
|
4485
|
+
if (n[t] !== e[t]) return false;
|
|
4486
4486
|
return true;
|
|
4487
4487
|
}
|
|
4488
|
-
class
|
|
4488
|
+
class L {
|
|
4489
4489
|
constructor() {
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
this.ctx =
|
|
4490
|
+
w(this, "ctx");
|
|
4491
|
+
w(this, "args");
|
|
4492
|
+
w(this, "uiState");
|
|
4493
|
+
w(this, "resultPool", new De());
|
|
4494
|
+
this.ctx = c(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
4495
4495
|
}
|
|
4496
4496
|
getNamedAccessor(e) {
|
|
4497
|
-
return
|
|
4497
|
+
return H(
|
|
4498
4498
|
this.ctx.getAccessorHandleByName(e),
|
|
4499
|
-
(
|
|
4499
|
+
(t) => new b(t, [e])
|
|
4500
4500
|
);
|
|
4501
4501
|
}
|
|
4502
4502
|
get prerun() {
|
|
4503
|
-
return this.getNamedAccessor(
|
|
4503
|
+
return this.getNamedAccessor(ae);
|
|
4504
4504
|
}
|
|
4505
4505
|
/**
|
|
4506
4506
|
* @deprecated use prerun
|
|
@@ -4515,7 +4515,7 @@
|
|
|
4515
4515
|
return this.precalc;
|
|
4516
4516
|
}
|
|
4517
4517
|
get outputs() {
|
|
4518
|
-
return this.getNamedAccessor(
|
|
4518
|
+
return this.getNamedAccessor(le);
|
|
4519
4519
|
}
|
|
4520
4520
|
/**
|
|
4521
4521
|
* @deprecated use outputs
|
|
@@ -4528,11 +4528,11 @@
|
|
|
4528
4528
|
* @returns a map of axis value => label
|
|
4529
4529
|
*/
|
|
4530
4530
|
findLabels(e) {
|
|
4531
|
-
const
|
|
4532
|
-
for (const r of
|
|
4531
|
+
const t = this.resultPool.getData();
|
|
4532
|
+
for (const r of t.entries) {
|
|
4533
4533
|
if (!W(r.obj)) continue;
|
|
4534
|
-
const
|
|
4535
|
-
if (
|
|
4534
|
+
const s = r.obj.spec;
|
|
4535
|
+
if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type && q(e.domain, s.axesSpec[0].domain)) {
|
|
4536
4536
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
4537
4537
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
4538
4538
|
return Object.fromEntries(
|
|
@@ -4544,28 +4544,28 @@
|
|
|
4544
4544
|
}
|
|
4545
4545
|
}
|
|
4546
4546
|
verifyInlineColumnsSupport(e) {
|
|
4547
|
-
var
|
|
4548
|
-
const
|
|
4549
|
-
if (
|
|
4547
|
+
var s;
|
|
4548
|
+
const t = e.some((i2) => !(i2.data instanceof b)), r = ((s = this.ctx.featureFlags) == null ? void 0 : s.inlineColumnsSupport) === true;
|
|
4549
|
+
if (t && !r) throw Error("inline columns not supported");
|
|
4550
4550
|
}
|
|
4551
4551
|
createPFrame(e) {
|
|
4552
4552
|
return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
|
|
4553
|
-
e.map((
|
|
4553
|
+
e.map((t) => lt(t, (r) => r instanceof b ? r.handle : r))
|
|
4554
4554
|
);
|
|
4555
4555
|
}
|
|
4556
4556
|
createPTable(e) {
|
|
4557
|
-
var
|
|
4558
|
-
return "columns" in e ?
|
|
4557
|
+
var t;
|
|
4558
|
+
return "columns" in e ? t = {
|
|
4559
4559
|
src: {
|
|
4560
4560
|
type: "full",
|
|
4561
4561
|
entries: e.columns.map((r) => ({ type: "column", column: r }))
|
|
4562
4562
|
},
|
|
4563
4563
|
filters: e.filters ?? [],
|
|
4564
4564
|
sorting: e.sorting ?? []
|
|
4565
|
-
} :
|
|
4565
|
+
} : t = e, this.verifyInlineColumnsSupport(pt(t.src)), this.ctx.createPTable(
|
|
4566
4566
|
it(
|
|
4567
|
-
|
|
4568
|
-
(r) => lt(r, (
|
|
4567
|
+
t,
|
|
4568
|
+
(r) => lt(r, (s) => s instanceof b ? s.handle : s)
|
|
4569
4569
|
)
|
|
4570
4570
|
);
|
|
4571
4571
|
}
|
|
@@ -4578,33 +4578,33 @@
|
|
|
4578
4578
|
return this.ctx.getCurrentUnstableMarker();
|
|
4579
4579
|
}
|
|
4580
4580
|
}
|
|
4581
|
-
const T = "1.21.
|
|
4582
|
-
function
|
|
4583
|
-
return
|
|
4581
|
+
const T = "1.21.20";
|
|
4582
|
+
function Le(n) {
|
|
4583
|
+
return n.__renderLambda === true;
|
|
4584
4584
|
}
|
|
4585
|
-
function
|
|
4586
|
-
if (
|
|
4587
|
-
return
|
|
4585
|
+
function G(n) {
|
|
4586
|
+
if (n !== void 0)
|
|
4587
|
+
return Le(n) ? n.handle : n;
|
|
4588
4588
|
}
|
|
4589
|
-
class
|
|
4590
|
-
constructor(e,
|
|
4591
|
-
this._renderingMode = e, this._initialArgs =
|
|
4589
|
+
class v {
|
|
4590
|
+
constructor(e, t, r, s, i2, o, l) {
|
|
4591
|
+
this._renderingMode = e, this._initialArgs = t, this._initialUiState = r, this._outputs = s, this._inputsValid = i2, this._sections = o, this._title = l;
|
|
4592
4592
|
}
|
|
4593
4593
|
static create(e = "Heavy") {
|
|
4594
|
-
return new
|
|
4594
|
+
return new v(
|
|
4595
4595
|
e,
|
|
4596
4596
|
void 0,
|
|
4597
4597
|
{},
|
|
4598
4598
|
{},
|
|
4599
|
-
|
|
4600
|
-
|
|
4599
|
+
V(true),
|
|
4600
|
+
V([]),
|
|
4601
4601
|
void 0
|
|
4602
4602
|
);
|
|
4603
4603
|
}
|
|
4604
|
-
output(e,
|
|
4605
|
-
if (typeof
|
|
4606
|
-
const
|
|
4607
|
-
return
|
|
4604
|
+
output(e, t, r = {}) {
|
|
4605
|
+
if (typeof t == "function") {
|
|
4606
|
+
const s = `output#${e}`;
|
|
4607
|
+
return E(s, () => t(new L())), new v(
|
|
4608
4608
|
this._renderingMode,
|
|
4609
4609
|
this._initialArgs,
|
|
4610
4610
|
this._initialUiState,
|
|
@@ -4612,7 +4612,7 @@
|
|
|
4612
4612
|
...this._outputs,
|
|
4613
4613
|
[e]: {
|
|
4614
4614
|
__renderLambda: true,
|
|
4615
|
-
handle:
|
|
4615
|
+
handle: s,
|
|
4616
4616
|
...r
|
|
4617
4617
|
}
|
|
4618
4618
|
},
|
|
@@ -4621,13 +4621,13 @@
|
|
|
4621
4621
|
this._title
|
|
4622
4622
|
);
|
|
4623
4623
|
} else
|
|
4624
|
-
return new
|
|
4624
|
+
return new v(
|
|
4625
4625
|
this._renderingMode,
|
|
4626
4626
|
this._initialArgs,
|
|
4627
4627
|
this._initialUiState,
|
|
4628
4628
|
{
|
|
4629
4629
|
...this._outputs,
|
|
4630
|
-
[e]:
|
|
4630
|
+
[e]: t
|
|
4631
4631
|
},
|
|
4632
4632
|
this._inputsValid,
|
|
4633
4633
|
this._sections,
|
|
@@ -4635,15 +4635,15 @@
|
|
|
4635
4635
|
);
|
|
4636
4636
|
}
|
|
4637
4637
|
/** Shortcut for {@link output} with retentive flag set to true. */
|
|
4638
|
-
retentiveOutput(e,
|
|
4639
|
-
return this.output(e,
|
|
4638
|
+
retentiveOutput(e, t) {
|
|
4639
|
+
return this.output(e, t, { retentive: true });
|
|
4640
4640
|
}
|
|
4641
4641
|
/** @deprecated */
|
|
4642
4642
|
canRun(e) {
|
|
4643
4643
|
return this.inputsValid(e);
|
|
4644
4644
|
}
|
|
4645
4645
|
argsValid(e) {
|
|
4646
|
-
return typeof e == "function" ? (
|
|
4646
|
+
return typeof e == "function" ? (E("inputsValid", () => e(new L())), new v(
|
|
4647
4647
|
this._renderingMode,
|
|
4648
4648
|
this._initialArgs,
|
|
4649
4649
|
this._initialUiState,
|
|
@@ -4654,7 +4654,7 @@
|
|
|
4654
4654
|
},
|
|
4655
4655
|
this._sections,
|
|
4656
4656
|
this._title
|
|
4657
|
-
)) : new
|
|
4657
|
+
)) : new v(
|
|
4658
4658
|
this._renderingMode,
|
|
4659
4659
|
this._initialArgs,
|
|
4660
4660
|
this._initialUiState,
|
|
@@ -4668,7 +4668,7 @@
|
|
|
4668
4668
|
return this.argsValid(e);
|
|
4669
4669
|
}
|
|
4670
4670
|
sections(e) {
|
|
4671
|
-
return Array.isArray(e) ? this.sections(
|
|
4671
|
+
return Array.isArray(e) ? this.sections(V(e)) : typeof e == "function" ? (E("sections", () => e(new L())), new v(
|
|
4672
4672
|
this._renderingMode,
|
|
4673
4673
|
this._initialArgs,
|
|
4674
4674
|
this._initialUiState,
|
|
@@ -4676,7 +4676,7 @@
|
|
|
4676
4676
|
this._inputsValid,
|
|
4677
4677
|
{ __renderLambda: true, handle: "sections" },
|
|
4678
4678
|
this._title
|
|
4679
|
-
)) : new
|
|
4679
|
+
)) : new v(
|
|
4680
4680
|
this._renderingMode,
|
|
4681
4681
|
this._initialArgs,
|
|
4682
4682
|
this._initialUiState,
|
|
@@ -4687,7 +4687,7 @@
|
|
|
4687
4687
|
);
|
|
4688
4688
|
}
|
|
4689
4689
|
title(e) {
|
|
4690
|
-
return
|
|
4690
|
+
return E("title", () => e(new L())), new v(
|
|
4691
4691
|
this._renderingMode,
|
|
4692
4692
|
this._initialArgs,
|
|
4693
4693
|
this._initialUiState,
|
|
@@ -4702,7 +4702,7 @@
|
|
|
4702
4702
|
* @deprecated use {@link withArgs}
|
|
4703
4703
|
* */
|
|
4704
4704
|
initialArgs(e) {
|
|
4705
|
-
return new
|
|
4705
|
+
return new v(
|
|
4706
4706
|
this._renderingMode,
|
|
4707
4707
|
e,
|
|
4708
4708
|
this._initialUiState,
|
|
@@ -4714,7 +4714,7 @@
|
|
|
4714
4714
|
}
|
|
4715
4715
|
/** Sets initial args for the block, this value must be specified. */
|
|
4716
4716
|
withArgs(e) {
|
|
4717
|
-
return new
|
|
4717
|
+
return new v(
|
|
4718
4718
|
this._renderingMode,
|
|
4719
4719
|
e,
|
|
4720
4720
|
this._initialUiState,
|
|
@@ -4726,7 +4726,7 @@
|
|
|
4726
4726
|
}
|
|
4727
4727
|
/** Defines type and sets initial value for block UiState. */
|
|
4728
4728
|
withUiState(e) {
|
|
4729
|
-
return new
|
|
4729
|
+
return new v(
|
|
4730
4730
|
this._renderingMode,
|
|
4731
4731
|
this._initialArgs,
|
|
4732
4732
|
e,
|
|
@@ -4756,81 +4756,81 @@
|
|
|
4756
4756
|
sdkVersion: T,
|
|
4757
4757
|
renderingMode: this._renderingMode,
|
|
4758
4758
|
initialArgs: this._initialArgs,
|
|
4759
|
-
inputsValid:
|
|
4760
|
-
sections:
|
|
4759
|
+
inputsValid: G(this._inputsValid),
|
|
4760
|
+
sections: G(this._sections),
|
|
4761
4761
|
outputs: Object.fromEntries(
|
|
4762
|
-
Object.entries(this._outputs).map(([
|
|
4762
|
+
Object.entries(this._outputs).map(([t, r]) => [t, G(r)])
|
|
4763
4763
|
)
|
|
4764
4764
|
};
|
|
4765
|
-
return
|
|
4765
|
+
return Se() ? oe({ sdkVersion: T }) : { config: e };
|
|
4766
4766
|
}
|
|
4767
4767
|
}
|
|
4768
|
-
function
|
|
4769
|
-
var u,
|
|
4768
|
+
function _t(n, e, t, r) {
|
|
4769
|
+
var u, h;
|
|
4770
4770
|
Array.isArray(r) && (r = { filters: r });
|
|
4771
|
-
const
|
|
4772
|
-
let
|
|
4771
|
+
const s = n.resultPool.getData().entries.map((d) => d.obj).filter(W).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), i2 = (d, p) => {
|
|
4772
|
+
let g = d.toString();
|
|
4773
4773
|
if (p)
|
|
4774
4774
|
for (const f2 in p)
|
|
4775
|
-
|
|
4776
|
-
return
|
|
4775
|
+
g += f2, g += p[f2];
|
|
4776
|
+
return g;
|
|
4777
4777
|
}, o = /* @__PURE__ */ new Map();
|
|
4778
4778
|
for (const d of e)
|
|
4779
4779
|
for (const p of d.spec.axesSpec) {
|
|
4780
|
-
const
|
|
4781
|
-
for (const f2 of
|
|
4782
|
-
const C = f2.spec.axesSpec[0], y = J(f2.spec.axesSpec[0]);
|
|
4783
|
-
if (ot(
|
|
4784
|
-
const I = Object.keys(
|
|
4780
|
+
const g = J$1(p);
|
|
4781
|
+
for (const f2 of s) {
|
|
4782
|
+
const C = f2.spec.axesSpec[0], y = J$1(f2.spec.axesSpec[0]);
|
|
4783
|
+
if (ot(g, y)) {
|
|
4784
|
+
const I = Object.keys(g.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
|
|
4785
4785
|
if (I > D) {
|
|
4786
|
-
const
|
|
4787
|
-
o.set(
|
|
4788
|
-
id:
|
|
4786
|
+
const F = i2(f2.id, g.domain);
|
|
4787
|
+
o.set(F, {
|
|
4788
|
+
id: F,
|
|
4789
4789
|
spec: {
|
|
4790
4790
|
...f2.spec,
|
|
4791
|
-
axesSpec: [{ ...
|
|
4791
|
+
axesSpec: [{ ...g, annotations: C.annotations }]
|
|
4792
4792
|
},
|
|
4793
4793
|
data: f2.data
|
|
4794
4794
|
});
|
|
4795
4795
|
} else
|
|
4796
|
-
o.set(
|
|
4796
|
+
o.set(i2(f2.id), f2);
|
|
4797
4797
|
}
|
|
4798
4798
|
}
|
|
4799
4799
|
}
|
|
4800
4800
|
if ([...e, ...o.values()].some(
|
|
4801
|
-
(d) => d.data instanceof
|
|
4801
|
+
(d) => d.data instanceof b && !d.data.getIsReadyOrError()
|
|
4802
4802
|
))
|
|
4803
4803
|
return;
|
|
4804
|
-
let
|
|
4805
|
-
const
|
|
4804
|
+
let l = e;
|
|
4805
|
+
const a = [];
|
|
4806
4806
|
if (r != null && r.coreColumnPredicate) {
|
|
4807
|
-
|
|
4807
|
+
l = [];
|
|
4808
4808
|
for (const d of e)
|
|
4809
|
-
r.coreColumnPredicate(d.spec) ?
|
|
4809
|
+
r.coreColumnPredicate(d.spec) ? l.push(d) : a.push(d);
|
|
4810
4810
|
}
|
|
4811
|
-
return
|
|
4811
|
+
return a.push(...o.values()), n.createPTable({
|
|
4812
4812
|
src: {
|
|
4813
4813
|
type: "outer",
|
|
4814
4814
|
primary: {
|
|
4815
4815
|
type: (r == null ? void 0 : r.coreJoinType) ?? "full",
|
|
4816
|
-
entries:
|
|
4816
|
+
entries: l.map((d) => ({ type: "column", column: d }))
|
|
4817
4817
|
},
|
|
4818
|
-
secondary:
|
|
4818
|
+
secondary: a.map((d) => ({ type: "column", column: d }))
|
|
4819
4819
|
},
|
|
4820
|
-
filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u =
|
|
4821
|
-
sorting: ((
|
|
4820
|
+
filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = t == null ? void 0 : t.pTableParams) == null ? void 0 : u.filters) ?? []],
|
|
4821
|
+
sorting: ((h = t == null ? void 0 : t.pTableParams) == null ? void 0 : h.sorting) ?? []
|
|
4822
4822
|
});
|
|
4823
4823
|
}
|
|
4824
4824
|
const $BlockArgs = z.object({
|
|
4825
4825
|
numbers: z.array(z.coerce.number())
|
|
4826
4826
|
});
|
|
4827
|
-
const platforma =
|
|
4827
|
+
const platforma = v.create("Heavy").withArgs({ numbers: [1, 2, 3, 4] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).output("numbers", (ctx) => {
|
|
4828
4828
|
var _a, _b;
|
|
4829
4829
|
return (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("numbers")) == null ? void 0 : _b.getDataAsJson();
|
|
4830
4830
|
}).output("pt", (ctx) => {
|
|
4831
|
-
var _a, _b, _c, _d,
|
|
4831
|
+
var _a, _b, _c, _d, _e;
|
|
4832
4832
|
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;
|
|
4833
|
-
return
|
|
4833
|
+
return _t(ctx, [
|
|
4834
4834
|
{
|
|
4835
4835
|
id: "example",
|
|
4836
4836
|
spec: {
|
|
@@ -4856,10 +4856,15 @@
|
|
|
4856
4856
|
]
|
|
4857
4857
|
}
|
|
4858
4858
|
], ctx.uiState.dataTableState.tableState, [
|
|
4859
|
-
...(_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters,
|
|
4860
|
-
...((
|
|
4859
|
+
...((_d = ctx.uiState.dataTableState.tableState.pTableParams) == null ? void 0 : _d.filters) ?? [],
|
|
4860
|
+
...((_e = ctx.uiState.dataTableState.filterModel) == null ? void 0 : _e.filters) ?? []
|
|
4861
4861
|
]);
|
|
4862
4862
|
}).sections((ctx) => {
|
|
4863
|
+
const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it2) => ({
|
|
4864
|
+
type: "link",
|
|
4865
|
+
href: `/section?id=${it2.id}`,
|
|
4866
|
+
label: it2.label
|
|
4867
|
+
}));
|
|
4863
4868
|
return [
|
|
4864
4869
|
{ type: "link", href: "/loaders", label: "Loaders" },
|
|
4865
4870
|
{ type: "link", href: "/", label: "Icons/Masks" },
|
|
@@ -4877,10 +4882,21 @@
|
|
|
4877
4882
|
{ type: "link", href: "/errors", label: "Errors" },
|
|
4878
4883
|
{ type: "link", href: "/text-fields", label: "PlTextField" },
|
|
4879
4884
|
{ type: "link", href: "/tabs", label: "PlTabs" },
|
|
4880
|
-
{ type: "link", href: "/drafts", label: "Drafts" },
|
|
4881
4885
|
{ type: "link", href: "/stacked-bar", label: "PlChartStackedBar" },
|
|
4882
4886
|
{ type: "link", href: "/buttons", label: "ButtonsPage" },
|
|
4883
|
-
{ type: "link", href: "/notifications", label: "Notifications" }
|
|
4887
|
+
{ type: "link", href: "/notifications", label: "Notifications" },
|
|
4888
|
+
{ type: "link", href: "/drafts", label: "Drafts" },
|
|
4889
|
+
...dynamicSections.length ? [
|
|
4890
|
+
{ type: "delimiter" },
|
|
4891
|
+
...dynamicSections,
|
|
4892
|
+
{ type: "delimiter" }
|
|
4893
|
+
] : [],
|
|
4894
|
+
{
|
|
4895
|
+
type: "link",
|
|
4896
|
+
href: "/add-section",
|
|
4897
|
+
appearance: "add-section",
|
|
4898
|
+
label: "New Dynamic section"
|
|
4899
|
+
}
|
|
4884
4900
|
];
|
|
4885
4901
|
}).done();
|
|
4886
4902
|
exports2.$BlockArgs = $BlockArgs;
|