@platforma-sdk/model 1.7.53 → 1.8.0
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +194 -162
- package/dist/index.mjs.map +1 -1
- package/dist/render/api.d.ts +6 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/render/api.ts +66 -2
package/dist/index.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var j = (e, t, n) => t in e ? E(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var c = (e, t, n) => j(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { isPColumn as v, mapPObjectData as A, mapValueInVOE as L, isPColumnSpec as k, mapPTableDef as H, getAxisId as P, matchAxisId as J } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
|
-
class
|
|
6
|
+
class G extends Error {
|
|
7
7
|
constructor(t, n) {
|
|
8
8
|
super(`${t.length}${n ? "+" : ""} errors, first error: ` + t[0]), this.errors = t, this.moreErrors = n;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
if (!e.ok) throw new
|
|
11
|
+
function N(e) {
|
|
12
|
+
if (!e.ok) throw new G(e.errors, e.moreErrors);
|
|
13
13
|
return e.value;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function X(e) {
|
|
16
16
|
return new Proxy(e, {
|
|
17
17
|
get(t, n) {
|
|
18
|
-
return
|
|
18
|
+
return N(t[n]);
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
function o(e) {
|
|
23
23
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null ? f(e) : e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function h(e) {
|
|
26
26
|
return { type: "GetFromCtx", variable: e };
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Y(e) {
|
|
29
29
|
return {
|
|
30
30
|
type: "Isolate",
|
|
31
31
|
cfg: e
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const Z = h("$args"), tt = h("$it"), et = h("$prod"), nt = h("$staging"), rt = h("$ui");
|
|
35
35
|
function f(e) {
|
|
36
36
|
return { type: "Immediate", value: e };
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function S(e) {
|
|
39
39
|
const t = {};
|
|
40
40
|
for (const [n, r] of Object.entries(e)) t[n] = o(r);
|
|
41
41
|
return {
|
|
@@ -43,7 +43,7 @@ function v(e) {
|
|
|
43
43
|
template: t
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function st(...e) {
|
|
47
47
|
const t = [];
|
|
48
48
|
for (const n of e) t.push(o(n));
|
|
49
49
|
return {
|
|
@@ -58,7 +58,7 @@ function m(e, t) {
|
|
|
58
58
|
field: o(t)
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function it(e, t, n = "$it") {
|
|
62
62
|
return {
|
|
63
63
|
type: "MapRecordValues",
|
|
64
64
|
source: e,
|
|
@@ -66,7 +66,7 @@ function rt(e, t, n = "$it") {
|
|
|
66
66
|
itVar: n
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function ot(e, t, n = "$it") {
|
|
70
70
|
return {
|
|
71
71
|
type: "MapArrayValues",
|
|
72
72
|
source: e,
|
|
@@ -74,46 +74,46 @@ function st(e, t, n = "$it") {
|
|
|
74
74
|
itVar: n
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function at(e) {
|
|
78
78
|
return {
|
|
79
79
|
type: "Flatten",
|
|
80
80
|
source: e
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function ut(e) {
|
|
84
84
|
return {
|
|
85
85
|
type: "IsEmpty",
|
|
86
86
|
arg: e
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function lt(e) {
|
|
90
90
|
return {
|
|
91
91
|
type: "Not",
|
|
92
92
|
operand: e
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function ct(e, t) {
|
|
96
96
|
return {
|
|
97
97
|
type: "And",
|
|
98
98
|
operand1: e,
|
|
99
99
|
operand2: t
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function gt(e, t) {
|
|
103
103
|
return {
|
|
104
104
|
type: "Or",
|
|
105
105
|
operand1: e,
|
|
106
106
|
operand2: t
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function dt(e, t) {
|
|
110
110
|
return {
|
|
111
111
|
type: "GetResourceField",
|
|
112
112
|
source: o(e),
|
|
113
113
|
field: o(t)
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function pt() {
|
|
117
117
|
return function(e) {
|
|
118
118
|
return {
|
|
119
119
|
type: "GetResourceValueAsJson",
|
|
@@ -121,7 +121,7 @@ function gt() {
|
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function ht(e, t, n = "$it") {
|
|
125
125
|
return {
|
|
126
126
|
type: "MapResourceFields",
|
|
127
127
|
source: e,
|
|
@@ -129,19 +129,19 @@ function dt(e, t, n = "$it") {
|
|
|
129
129
|
itVar: n
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function ft(e) {
|
|
133
133
|
return {
|
|
134
134
|
type: "GetBlobContent",
|
|
135
135
|
source: o(e)
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function mt(e) {
|
|
139
139
|
return {
|
|
140
140
|
type: "GetBlobContentAsString",
|
|
141
141
|
source: o(e)
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function yt() {
|
|
145
145
|
return function(e) {
|
|
146
146
|
return {
|
|
147
147
|
type: "GetBlobContentAsJson",
|
|
@@ -149,54 +149,54 @@ function ft() {
|
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function bt(e) {
|
|
153
153
|
return {
|
|
154
154
|
type: "GetDownloadedBlobContent",
|
|
155
155
|
source: o(e)
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function wt(e) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetOnDemandBlobContent",
|
|
161
161
|
source: o(e)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function At(e) {
|
|
165
165
|
return {
|
|
166
166
|
type: "GetImportProgress",
|
|
167
167
|
source: o(e)
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ct(e, t) {
|
|
171
171
|
return {
|
|
172
172
|
type: "GetLastLogs",
|
|
173
173
|
source: o(e),
|
|
174
174
|
lines: t
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function _t(e, t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetProgressLog",
|
|
180
180
|
source: o(e),
|
|
181
181
|
patternToSearch: t
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Pt(e) {
|
|
185
185
|
return {
|
|
186
186
|
type: "GetLogHandle",
|
|
187
187
|
source: o(e)
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function $() {
|
|
191
191
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function x(e) {
|
|
194
194
|
if (e && typeof globalThis.getPlatforma == "function")
|
|
195
195
|
return globalThis.getPlatforma(e);
|
|
196
196
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
197
197
|
throw new Error("Can't get platforma instance.");
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function M() {
|
|
200
200
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
201
201
|
}
|
|
202
202
|
function s() {
|
|
@@ -204,31 +204,31 @@ function s() {
|
|
|
204
204
|
throw new Error("Not in config rendering context");
|
|
205
205
|
}
|
|
206
206
|
function y(e, t) {
|
|
207
|
-
const n =
|
|
207
|
+
const n = M();
|
|
208
208
|
if (n === void 0) return !1;
|
|
209
209
|
if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
|
|
210
210
|
return n.callbackRegistry[e] = t, !0;
|
|
211
211
|
}
|
|
212
212
|
const b = /* @__PURE__ */ new Map();
|
|
213
|
-
function
|
|
213
|
+
function K(e, t) {
|
|
214
214
|
e in s().callbackRegistry || (s().callbackRegistry[e] = (n) => {
|
|
215
215
|
for (const r of b.get(e))
|
|
216
216
|
r(n);
|
|
217
217
|
}, b.set(e, [])), b.get(e).push(t);
|
|
218
218
|
}
|
|
219
|
-
class
|
|
219
|
+
class l {
|
|
220
220
|
constructor(t, n = (r) => r) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.handle = t, this.postProcess = n,
|
|
221
|
+
c(this, "isResolved", !1);
|
|
222
|
+
c(this, "resolvedValue");
|
|
223
|
+
this.handle = t, this.postProcess = n, K(t, (r) => {
|
|
224
224
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
map(t) {
|
|
228
|
-
return new
|
|
228
|
+
return new l(this.handle, (n) => t(this.postProcess(n)));
|
|
229
229
|
}
|
|
230
230
|
mapDefined(t) {
|
|
231
|
-
return new
|
|
231
|
+
return new l(this.handle, (n) => {
|
|
232
232
|
const r = this.postProcess(n);
|
|
233
233
|
return r ? t(r) : void 0;
|
|
234
234
|
});
|
|
@@ -237,10 +237,10 @@ class a {
|
|
|
237
237
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return e === void 0 ? void 0 : new
|
|
240
|
+
function F(e) {
|
|
241
|
+
return e === void 0 ? void 0 : new p(e);
|
|
242
242
|
}
|
|
243
|
-
class
|
|
243
|
+
class p {
|
|
244
244
|
constructor(t) {
|
|
245
245
|
this.handle = t;
|
|
246
246
|
}
|
|
@@ -248,7 +248,7 @@ class d {
|
|
|
248
248
|
return this.resolveWithCommon({}, ...t);
|
|
249
249
|
}
|
|
250
250
|
resolveWithCommon(t, ...n) {
|
|
251
|
-
return
|
|
251
|
+
return F(s().resolveWithCommon(this.handle, t, ...n));
|
|
252
252
|
}
|
|
253
253
|
get resourceType() {
|
|
254
254
|
return s().getResourceType(this.handle);
|
|
@@ -266,7 +266,7 @@ class d {
|
|
|
266
266
|
return s().getIsFinal(this.handle);
|
|
267
267
|
}
|
|
268
268
|
getError() {
|
|
269
|
-
return
|
|
269
|
+
return F(s().getError(this.handle));
|
|
270
270
|
}
|
|
271
271
|
listInputFields() {
|
|
272
272
|
return s().listInputFields(this.handle);
|
|
@@ -304,9 +304,9 @@ class d {
|
|
|
304
304
|
*/
|
|
305
305
|
getPColumns(t = !1, n = "") {
|
|
306
306
|
const r = this.parsePObjectCollection(t, n);
|
|
307
|
-
return r === void 0 ? void 0 : Object.entries(r).map(([,
|
|
308
|
-
if (!
|
|
309
|
-
return
|
|
307
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, a]) => {
|
|
308
|
+
if (!v(a)) throw new Error(`not a PColumn (kind = ${a.spec.kind})`);
|
|
309
|
+
return a;
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
/**
|
|
@@ -320,18 +320,18 @@ class d {
|
|
|
320
320
|
);
|
|
321
321
|
if (r === void 0) return;
|
|
322
322
|
const i = {};
|
|
323
|
-
for (const [
|
|
324
|
-
i[
|
|
323
|
+
for (const [a, d] of Object.entries(r))
|
|
324
|
+
i[a] = A(d, (u) => new p(u));
|
|
325
325
|
return i;
|
|
326
326
|
}
|
|
327
327
|
getFileContentAsBase64() {
|
|
328
|
-
return new
|
|
328
|
+
return new l(s().getBlobContentAsBase64(this.handle));
|
|
329
329
|
}
|
|
330
330
|
getFileContentAsString() {
|
|
331
|
-
return new
|
|
331
|
+
return new l(s().getBlobContentAsString(this.handle));
|
|
332
332
|
}
|
|
333
333
|
getFileContentAsJson() {
|
|
334
|
-
return new
|
|
334
|
+
return new l(
|
|
335
335
|
s().getBlobContentAsString(this.handle)
|
|
336
336
|
).mapDefined((t) => JSON.parse(t));
|
|
337
337
|
}
|
|
@@ -351,7 +351,7 @@ class d {
|
|
|
351
351
|
* @returns downloaded file handle
|
|
352
352
|
*/
|
|
353
353
|
getFileHandle() {
|
|
354
|
-
return new
|
|
354
|
+
return new l(s().getDownloadedBlobContentHandle(this.handle));
|
|
355
355
|
}
|
|
356
356
|
/**
|
|
357
357
|
* @deprecated use getFileHandle
|
|
@@ -363,7 +363,7 @@ class d {
|
|
|
363
363
|
* @returns downloaded file handle
|
|
364
364
|
*/
|
|
365
365
|
getRemoteFileHandle() {
|
|
366
|
-
return new
|
|
366
|
+
return new l(s().getOnDemandBlobContentHandle(this.handle));
|
|
367
367
|
}
|
|
368
368
|
/**
|
|
369
369
|
* @deprecated use getRemoteFileHandle
|
|
@@ -372,47 +372,47 @@ class d {
|
|
|
372
372
|
return this.getRemoteFileHandle();
|
|
373
373
|
}
|
|
374
374
|
getImportProgress() {
|
|
375
|
-
return new
|
|
375
|
+
return new l(s().getImportProgress(this.handle));
|
|
376
376
|
}
|
|
377
377
|
getLastLogs(t) {
|
|
378
|
-
return new
|
|
378
|
+
return new l(s().getLastLogs(this.handle, t));
|
|
379
379
|
}
|
|
380
380
|
getProgressLog(t) {
|
|
381
|
-
return new
|
|
381
|
+
return new l(s().getProgressLog(this.handle, t));
|
|
382
382
|
}
|
|
383
383
|
getLogHandle() {
|
|
384
|
-
return new
|
|
384
|
+
return new l(s().getLogHandle(this.handle));
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
387
|
+
const R = "staging", V = "main";
|
|
388
|
+
function I(e) {
|
|
389
389
|
return typeof e == "object" && e !== null && "__awaited_futures__" in e;
|
|
390
390
|
}
|
|
391
391
|
function C(e, t, n) {
|
|
392
392
|
if (t.has(n)) return;
|
|
393
393
|
if (t.add(n), typeof n === "object")
|
|
394
|
-
if (
|
|
394
|
+
if (I(n)) n.__awaited_futures__.forEach((i) => e.add(i));
|
|
395
395
|
else if (Array.isArray(n))
|
|
396
396
|
for (const i of n) C(e, t, i);
|
|
397
397
|
else
|
|
398
398
|
for (const [, i] of Object.entries(n))
|
|
399
399
|
i !== n && C(e, t, i);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function W(e) {
|
|
402
402
|
const t = /* @__PURE__ */ new Set();
|
|
403
403
|
return C(t, /* @__PURE__ */ new Set(), e), t;
|
|
404
404
|
}
|
|
405
|
-
const
|
|
405
|
+
const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
406
406
|
__proto__: null,
|
|
407
|
-
MainAccessorName:
|
|
408
|
-
StagingAccessorName:
|
|
409
|
-
getAllFutureAwaits:
|
|
410
|
-
isFutureAwait:
|
|
407
|
+
MainAccessorName: V,
|
|
408
|
+
StagingAccessorName: R,
|
|
409
|
+
getAllFutureAwaits: W,
|
|
410
|
+
isFutureAwait: I
|
|
411
411
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
412
|
-
class
|
|
412
|
+
class U {
|
|
413
413
|
constructor() {
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
c(this, "ctx", s());
|
|
415
|
+
c(this, "defaultLabelFn", (t, n) => {
|
|
416
416
|
var r;
|
|
417
417
|
return ((r = t.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
|
|
418
418
|
});
|
|
@@ -443,7 +443,7 @@ class K {
|
|
|
443
443
|
ref: n.ref,
|
|
444
444
|
obj: {
|
|
445
445
|
...n.obj,
|
|
446
|
-
data: new
|
|
446
|
+
data: new p(n.obj.data)
|
|
447
447
|
}
|
|
448
448
|
}))
|
|
449
449
|
};
|
|
@@ -462,7 +462,7 @@ class K {
|
|
|
462
462
|
ref: n.ref,
|
|
463
463
|
obj: {
|
|
464
464
|
...n.obj,
|
|
465
|
-
data: L(n.obj.data, (r) => new
|
|
465
|
+
data: L(n.obj.data, (r) => new p(r))
|
|
466
466
|
}
|
|
467
467
|
}))
|
|
468
468
|
};
|
|
@@ -482,7 +482,9 @@ class K {
|
|
|
482
482
|
*/
|
|
483
483
|
getDataByRef(t) {
|
|
484
484
|
var n;
|
|
485
|
-
return (n = this.getData().entries.find(
|
|
485
|
+
return (n = this.getData().entries.find(
|
|
486
|
+
(r) => r.ref.blockId === t.blockId && r.ref.name === t.name
|
|
487
|
+
)) == null ? void 0 : n.obj;
|
|
486
488
|
}
|
|
487
489
|
/**
|
|
488
490
|
* @param ref a Ref
|
|
@@ -490,23 +492,53 @@ class K {
|
|
|
490
492
|
*/
|
|
491
493
|
getSpecByRef(t) {
|
|
492
494
|
var n;
|
|
493
|
-
return (n = this.getSpecs().entries.find(
|
|
495
|
+
return (n = this.getSpecs().entries.find(
|
|
496
|
+
(r) => r.ref.blockId === t.blockId && r.ref.name === t.name
|
|
497
|
+
)) == null ? void 0 : n.obj;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* @param spec object specification
|
|
501
|
+
* @returns array of data objects with compatible specs
|
|
502
|
+
*/
|
|
503
|
+
findDataWithCompatibleSpec(t) {
|
|
504
|
+
const n = [];
|
|
505
|
+
t: for (const r of this.getData().entries) {
|
|
506
|
+
if (!k(r.obj.spec))
|
|
507
|
+
continue;
|
|
508
|
+
const i = r.obj.spec;
|
|
509
|
+
if (t.name === i.name && t.valueType === i.valueType && t.axesSpec.length === i.axesSpec.length && D(t.domain, i.domain)) {
|
|
510
|
+
for (let a = 0; a < t.axesSpec.length; ++a) {
|
|
511
|
+
const d = t.axesSpec[a], u = i.axesSpec[a];
|
|
512
|
+
if (d.name !== u.name || d.type !== u.type || !D(d.domain, u.domain))
|
|
513
|
+
continue t;
|
|
514
|
+
}
|
|
515
|
+
n.push(r.obj);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return n;
|
|
494
519
|
}
|
|
495
520
|
}
|
|
521
|
+
function D(e, t) {
|
|
522
|
+
if (e === void 0) return t === void 0;
|
|
523
|
+
if (t === void 0) return !0;
|
|
524
|
+
for (const n in t)
|
|
525
|
+
if (e[n] !== t[n]) return !1;
|
|
526
|
+
return !0;
|
|
527
|
+
}
|
|
496
528
|
class w {
|
|
497
529
|
constructor() {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
530
|
+
c(this, "ctx");
|
|
531
|
+
c(this, "args");
|
|
532
|
+
c(this, "uiState");
|
|
533
|
+
c(this, "resultPool", new U());
|
|
502
534
|
this.ctx = s(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
|
|
503
535
|
}
|
|
504
536
|
getNamedAccessor(t) {
|
|
505
537
|
const n = this.ctx.getAccessorHandleByName(t);
|
|
506
|
-
return n ? new
|
|
538
|
+
return n ? new p(n) : void 0;
|
|
507
539
|
}
|
|
508
540
|
get prerun() {
|
|
509
|
-
return this.getNamedAccessor(
|
|
541
|
+
return this.getNamedAccessor(R);
|
|
510
542
|
}
|
|
511
543
|
/**
|
|
512
544
|
* @deprecated use prerun
|
|
@@ -521,7 +553,7 @@ class w {
|
|
|
521
553
|
return this.precalc;
|
|
522
554
|
}
|
|
523
555
|
get outputs() {
|
|
524
|
-
return this.getNamedAccessor(
|
|
556
|
+
return this.getNamedAccessor(V);
|
|
525
557
|
}
|
|
526
558
|
/**
|
|
527
559
|
* @deprecated use outputs
|
|
@@ -541,17 +573,17 @@ class w {
|
|
|
541
573
|
},
|
|
542
574
|
filters: t.filters ?? [],
|
|
543
575
|
sorting: t.sorting ?? []
|
|
544
|
-
} : n = t, this.ctx.createPTable(
|
|
576
|
+
} : n = t, this.ctx.createPTable(H(n, (r) => A(r, (i) => i.handle)));
|
|
545
577
|
}
|
|
546
578
|
getBlockLabel(t) {
|
|
547
579
|
return this.ctx.getBlockLabel(t);
|
|
548
580
|
}
|
|
549
581
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
582
|
+
const O = "1.8.0";
|
|
583
|
+
function Dt(e) {
|
|
552
584
|
return typeof e == "string";
|
|
553
585
|
}
|
|
554
|
-
function
|
|
586
|
+
function vt(e) {
|
|
555
587
|
if (e.inputsValid !== void 0) return e;
|
|
556
588
|
{
|
|
557
589
|
if (e.canRun === void 0)
|
|
@@ -560,13 +592,13 @@ function Pt(e) {
|
|
|
560
592
|
return delete t.canRun, t;
|
|
561
593
|
}
|
|
562
594
|
}
|
|
563
|
-
class
|
|
564
|
-
constructor(t, n, r, i,
|
|
565
|
-
this._renderingMode = t, this._initialArgs = n, this._outputs = r, this._inputsValid = i, this._sections =
|
|
595
|
+
class g {
|
|
596
|
+
constructor(t, n, r, i, a) {
|
|
597
|
+
this._renderingMode = t, this._initialArgs = n, this._outputs = r, this._inputsValid = i, this._sections = a;
|
|
566
598
|
}
|
|
567
599
|
/** Initiates configuration builder */
|
|
568
600
|
static create(t = "Heavy") {
|
|
569
|
-
return new
|
|
601
|
+
return new g(
|
|
570
602
|
t,
|
|
571
603
|
void 0,
|
|
572
604
|
{},
|
|
@@ -577,7 +609,7 @@ class c {
|
|
|
577
609
|
output(t, n) {
|
|
578
610
|
if (typeof n == "function") {
|
|
579
611
|
const r = `output#${t}`;
|
|
580
|
-
return y(r, () => n(new w())), new
|
|
612
|
+
return y(r, () => n(new w())), new g(
|
|
581
613
|
this._renderingMode,
|
|
582
614
|
this._initialArgs,
|
|
583
615
|
{
|
|
@@ -588,7 +620,7 @@ class c {
|
|
|
588
620
|
this._sections
|
|
589
621
|
);
|
|
590
622
|
} else
|
|
591
|
-
return new
|
|
623
|
+
return new g(
|
|
592
624
|
this._renderingMode,
|
|
593
625
|
this._initialArgs,
|
|
594
626
|
{
|
|
@@ -604,13 +636,13 @@ class c {
|
|
|
604
636
|
return this.inputsValid(t);
|
|
605
637
|
}
|
|
606
638
|
argsValid(t) {
|
|
607
|
-
return typeof t == "function" ? (y("inputsValid", () => t(new w())), new
|
|
639
|
+
return typeof t == "function" ? (y("inputsValid", () => t(new w())), new g(
|
|
608
640
|
this._renderingMode,
|
|
609
641
|
this._initialArgs,
|
|
610
642
|
this._outputs,
|
|
611
643
|
"inputsValid",
|
|
612
644
|
this._sections
|
|
613
|
-
)) : new
|
|
645
|
+
)) : new g(
|
|
614
646
|
this._renderingMode,
|
|
615
647
|
this._initialArgs,
|
|
616
648
|
this._outputs,
|
|
@@ -622,13 +654,13 @@ class c {
|
|
|
622
654
|
return this.argsValid(t);
|
|
623
655
|
}
|
|
624
656
|
sections(t) {
|
|
625
|
-
return Array.isArray(t) ? this.sections(f(t)) : typeof t == "function" ? (y("sections", () => t(new w())), new
|
|
657
|
+
return Array.isArray(t) ? this.sections(f(t)) : typeof t == "function" ? (y("sections", () => t(new w())), new g(
|
|
626
658
|
this._renderingMode,
|
|
627
659
|
this._initialArgs,
|
|
628
660
|
this._outputs,
|
|
629
661
|
this._inputsValid,
|
|
630
662
|
"sections"
|
|
631
|
-
)) : new
|
|
663
|
+
)) : new g(
|
|
632
664
|
this._renderingMode,
|
|
633
665
|
this._initialArgs,
|
|
634
666
|
this._outputs,
|
|
@@ -638,7 +670,7 @@ class c {
|
|
|
638
670
|
}
|
|
639
671
|
/** Sets initial args for the block, this value must be specified. */
|
|
640
672
|
initialArgs(t) {
|
|
641
|
-
return new
|
|
673
|
+
return new g(
|
|
642
674
|
this._renderingMode,
|
|
643
675
|
t,
|
|
644
676
|
this._outputs,
|
|
@@ -652,32 +684,32 @@ class c {
|
|
|
652
684
|
done() {
|
|
653
685
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
654
686
|
const t = {
|
|
655
|
-
sdkVersion:
|
|
687
|
+
sdkVersion: O,
|
|
656
688
|
renderingMode: this._renderingMode,
|
|
657
689
|
initialArgs: this._initialArgs,
|
|
658
690
|
inputsValid: this._inputsValid,
|
|
659
691
|
sections: this._sections,
|
|
660
692
|
outputs: this._outputs
|
|
661
693
|
};
|
|
662
|
-
return
|
|
694
|
+
return $() ? x(t) : { config: t };
|
|
663
695
|
}
|
|
664
696
|
}
|
|
665
|
-
function
|
|
666
|
-
var
|
|
667
|
-
const r = e.resultPool.getData().entries.map((
|
|
668
|
-
for (const
|
|
669
|
-
for (const
|
|
670
|
-
const
|
|
697
|
+
function St(e, t, n) {
|
|
698
|
+
var a, d;
|
|
699
|
+
const r = e.resultPool.getData().entries.map((u) => u.obj).filter(v).filter((u) => u.spec.name === "pl7.app/label" && u.spec.axesSpec.length === 1), i = [];
|
|
700
|
+
for (const u of t)
|
|
701
|
+
for (const T of u.spec.axesSpec) {
|
|
702
|
+
const B = P(T);
|
|
671
703
|
for (const _ of r)
|
|
672
|
-
|
|
704
|
+
J(B, P(_.spec.axesSpec[0])) && i.push(_);
|
|
673
705
|
}
|
|
674
706
|
return e.createPTable({
|
|
675
707
|
columns: [...t, ...i],
|
|
676
|
-
filters: (
|
|
677
|
-
sorting: (
|
|
708
|
+
filters: (a = n == null ? void 0 : n.pTableParams) == null ? void 0 : a.filters,
|
|
709
|
+
sorting: (d = n == null ? void 0 : n.pTableParams) == null ? void 0 : d.sorting
|
|
678
710
|
});
|
|
679
711
|
}
|
|
680
|
-
class
|
|
712
|
+
class xt {
|
|
681
713
|
constructor(t) {
|
|
682
714
|
this.handle = t;
|
|
683
715
|
}
|
|
@@ -697,77 +729,77 @@ class vt {
|
|
|
697
729
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, t);
|
|
698
730
|
}
|
|
699
731
|
}
|
|
700
|
-
function
|
|
701
|
-
return
|
|
732
|
+
function z(e) {
|
|
733
|
+
return S({
|
|
702
734
|
__isRef: !0,
|
|
703
735
|
blockId: m(e, "blockId"),
|
|
704
736
|
name: m(e, "name")
|
|
705
737
|
});
|
|
706
738
|
}
|
|
707
739
|
function Rt(e) {
|
|
708
|
-
return
|
|
709
|
-
ref:
|
|
740
|
+
return S({
|
|
741
|
+
ref: z(m(e, "ref")),
|
|
710
742
|
label: m(e, "label")
|
|
711
743
|
});
|
|
712
744
|
}
|
|
713
745
|
const Vt = {
|
|
714
|
-
sdkVersion:
|
|
746
|
+
sdkVersion: O
|
|
715
747
|
};
|
|
716
748
|
function It() {
|
|
717
|
-
return
|
|
749
|
+
return x();
|
|
718
750
|
}
|
|
719
|
-
function
|
|
751
|
+
function Ot(e) {
|
|
720
752
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
721
753
|
return globalThis.getEnvironmentValue(e);
|
|
722
754
|
}
|
|
723
755
|
export {
|
|
724
|
-
|
|
725
|
-
|
|
756
|
+
Z as Args,
|
|
757
|
+
g as BlockModel,
|
|
726
758
|
Vt as CurrentSdkInfo,
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
759
|
+
l as FutureRef,
|
|
760
|
+
tt as It,
|
|
761
|
+
Ft as JsRenderInternal,
|
|
762
|
+
et as MainOutputs,
|
|
763
|
+
G as OutputError,
|
|
764
|
+
xt as PFrameImpl,
|
|
733
765
|
w as RenderCtx,
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
766
|
+
U as ResultPool,
|
|
767
|
+
nt as StagingOutputs,
|
|
768
|
+
p as TreeNodeAccessor,
|
|
769
|
+
rt as UiState,
|
|
770
|
+
ct as and,
|
|
771
|
+
St as createPlDataTable,
|
|
772
|
+
at as flatten,
|
|
741
773
|
Rt as fromPlOption,
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
774
|
+
z as fromPlRef,
|
|
775
|
+
ft as getBlobContent,
|
|
776
|
+
yt as getBlobContentAsJson,
|
|
777
|
+
mt as getBlobContentAsString,
|
|
778
|
+
bt as getDownloadedBlobContent,
|
|
779
|
+
Ot as getEnvironmentValue,
|
|
780
|
+
h as getFromCfg,
|
|
749
781
|
f as getImmediate,
|
|
750
|
-
|
|
782
|
+
At as getImportProgress,
|
|
751
783
|
m as getJsonField,
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
784
|
+
Ct as getLastLogs,
|
|
785
|
+
Pt as getLogHandle,
|
|
786
|
+
wt as getOnDemandBlobContent,
|
|
787
|
+
_t as getProgressLog,
|
|
756
788
|
It as getRawPlatformaInstance,
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
789
|
+
dt as getResourceField,
|
|
790
|
+
pt as getResourceValueAsJson,
|
|
791
|
+
ut as isEmpty,
|
|
792
|
+
Dt as isFunctionHandle,
|
|
793
|
+
Y as isolate,
|
|
794
|
+
st as makeArray,
|
|
795
|
+
S as makeObject,
|
|
796
|
+
ot as mapArrayValues,
|
|
797
|
+
it as mapRecordValues,
|
|
798
|
+
ht as mapResourceFields,
|
|
799
|
+
vt as normalizeBlockConfig,
|
|
800
|
+
lt as not,
|
|
801
|
+
gt as or,
|
|
802
|
+
N as readOutput,
|
|
803
|
+
X as wrapOutputs
|
|
772
804
|
};
|
|
773
805
|
//# sourceMappingURL=index.mjs.map
|