@platforma-sdk/model 1.2.29 → 1.2.32
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/env_value.d.ts +0 -3
- package/dist/env_value.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +196 -144
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +2 -9
- package/dist/internal.d.ts.map +1 -1
- package/dist/raw_globals.d.ts +3 -0
- package/dist/raw_globals.d.ts.map +1 -0
- package/dist/render/api.d.ts +28 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -2
- package/src/env_value.ts +3 -5
- package/src/global.d.ts +12 -0
- package/src/index.ts +1 -0
- package/src/internal.ts +10 -15
- package/src/raw_globals.ts +7 -0
- package/src/render/api.ts +62 -0
- package/src/version.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var I = (e, t, n) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var u = (e, t, n) => I(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { isPColumn as O, mapPObjectData as b, mapValueInVOE as x, mapPTableDef as B } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
class E extends Error {
|
|
7
7
|
constructor(t, n) {
|
|
@@ -12,7 +12,7 @@ function L(e) {
|
|
|
12
12
|
if (!e.ok) throw new E(e.errors, e.moreErrors);
|
|
13
13
|
return e.value;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function M(e) {
|
|
16
16
|
return new Proxy(e, {
|
|
17
17
|
get(t, n) {
|
|
18
18
|
return L(t[n]);
|
|
@@ -20,22 +20,22 @@ function K(e) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
function i(e) {
|
|
23
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null ?
|
|
23
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null ? h(e) : e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function d(e) {
|
|
26
26
|
return { type: "GetFromCtx", variable: e };
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function K(e) {
|
|
29
29
|
return {
|
|
30
30
|
type: "Isolate",
|
|
31
31
|
cfg: e
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
const
|
|
35
|
-
function
|
|
34
|
+
const W = d("$args"), U = d("$it"), z = d("$prod"), q = d("$staging"), Q = d("$ui");
|
|
35
|
+
function h(e) {
|
|
36
36
|
return { type: "Immediate", value: e };
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function C(e) {
|
|
39
39
|
const t = {};
|
|
40
40
|
for (const [n, r] of Object.entries(e)) t[n] = i(r);
|
|
41
41
|
return {
|
|
@@ -43,7 +43,7 @@ function _(e) {
|
|
|
43
43
|
template: t
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function X(...e) {
|
|
47
47
|
const t = [];
|
|
48
48
|
for (const n of e) t.push(i(n));
|
|
49
49
|
return {
|
|
@@ -51,14 +51,14 @@ function Y(...e) {
|
|
|
51
51
|
template: t
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function p(e, t) {
|
|
55
55
|
return {
|
|
56
56
|
type: "GetJsonField",
|
|
57
57
|
source: i(e),
|
|
58
58
|
field: i(t)
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Y(e, t, n = "$it") {
|
|
62
62
|
return {
|
|
63
63
|
type: "MapRecordValues",
|
|
64
64
|
source: e,
|
|
@@ -66,7 +66,7 @@ function Z(e, t, n = "$it") {
|
|
|
66
66
|
itVar: n
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Z(e, t, n = "$it") {
|
|
70
70
|
return {
|
|
71
71
|
type: "MapArrayValues",
|
|
72
72
|
source: e,
|
|
@@ -74,46 +74,46 @@ function tt(e, t, n = "$it") {
|
|
|
74
74
|
itVar: n
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function tt(e) {
|
|
78
78
|
return {
|
|
79
79
|
type: "Flatten",
|
|
80
80
|
source: e
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function et(e) {
|
|
84
84
|
return {
|
|
85
85
|
type: "IsEmpty",
|
|
86
86
|
arg: e
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function nt(e) {
|
|
90
90
|
return {
|
|
91
91
|
type: "Not",
|
|
92
92
|
operand: e
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function rt(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 st(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 it(e, t) {
|
|
110
110
|
return {
|
|
111
111
|
type: "GetResourceField",
|
|
112
112
|
source: i(e),
|
|
113
113
|
field: i(t)
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ot() {
|
|
117
117
|
return function(e) {
|
|
118
118
|
return {
|
|
119
119
|
type: "GetResourceValueAsJson",
|
|
@@ -121,7 +121,7 @@ function at() {
|
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function at(e, t, n = "$it") {
|
|
125
125
|
return {
|
|
126
126
|
type: "MapResourceFields",
|
|
127
127
|
source: e,
|
|
@@ -129,19 +129,19 @@ function ut(e, t, n = "$it") {
|
|
|
129
129
|
itVar: n
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function ut(e) {
|
|
133
133
|
return {
|
|
134
134
|
type: "GetBlobContent",
|
|
135
135
|
source: i(e)
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function lt(e) {
|
|
139
139
|
return {
|
|
140
140
|
type: "GetBlobContentAsString",
|
|
141
141
|
source: i(e)
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function ct() {
|
|
145
145
|
return function(e) {
|
|
146
146
|
return {
|
|
147
147
|
type: "GetBlobContentAsJson",
|
|
@@ -155,7 +155,7 @@ function gt(e) {
|
|
|
155
155
|
source: i(e)
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function dt(e) {
|
|
159
159
|
return {
|
|
160
160
|
type: "GetOnDemandBlobContent",
|
|
161
161
|
source: i(e)
|
|
@@ -167,49 +167,50 @@ function ht(e) {
|
|
|
167
167
|
source: i(e)
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function pt(e, t) {
|
|
171
171
|
return {
|
|
172
172
|
type: "GetLastLogs",
|
|
173
173
|
source: i(e),
|
|
174
174
|
lines: t
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function ft(e, t) {
|
|
178
178
|
return {
|
|
179
179
|
type: "GetProgressLog",
|
|
180
180
|
source: i(e),
|
|
181
181
|
patternToSearch: t
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function mt(e) {
|
|
185
185
|
return {
|
|
186
186
|
type: "GetLogHandle",
|
|
187
187
|
source: i(e)
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
return typeof getPlatforma < "u" || typeof platforma < "u";
|
|
190
|
+
function T() {
|
|
191
|
+
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
if (typeof getPlatforma == "function")
|
|
195
|
-
|
|
193
|
+
function _(e) {
|
|
194
|
+
if (e && typeof globalThis.getPlatforma == "function")
|
|
195
|
+
return globalThis.getPlatforma(e);
|
|
196
|
+
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
196
197
|
throw new Error("Can't get platforma instance.");
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
-
if (typeof cfgRenderCtx < "u") return cfgRenderCtx;
|
|
199
|
+
function k() {
|
|
200
|
+
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
200
201
|
}
|
|
201
202
|
function s() {
|
|
202
|
-
if (typeof cfgRenderCtx < "u") return cfgRenderCtx;
|
|
203
|
+
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
203
204
|
throw new Error("Not in config rendering context");
|
|
204
205
|
}
|
|
205
206
|
function f(e, t) {
|
|
206
|
-
const n =
|
|
207
|
+
const n = k();
|
|
207
208
|
if (n === void 0) return !1;
|
|
208
209
|
if (e in n.callbackRegistry) throw new Error(`Callback with key ${e} already registered.`);
|
|
209
210
|
return n.callbackRegistry[e] = t, !0;
|
|
210
211
|
}
|
|
211
212
|
const m = /* @__PURE__ */ new Map();
|
|
212
|
-
function
|
|
213
|
+
function j(e, t) {
|
|
213
214
|
e in s().callbackRegistry || (s().callbackRegistry[e] = (n) => {
|
|
214
215
|
for (const r of m.get(e))
|
|
215
216
|
r(n);
|
|
@@ -217,9 +218,9 @@ function J(e, t) {
|
|
|
217
218
|
}
|
|
218
219
|
class a {
|
|
219
220
|
constructor(t, n = (r) => r) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
this.handle = t, this.postProcess = n,
|
|
221
|
+
u(this, "isResolved", !1);
|
|
222
|
+
u(this, "resolvedValue");
|
|
223
|
+
this.handle = t, this.postProcess = n, j(t, (r) => {
|
|
223
224
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
224
225
|
});
|
|
225
226
|
}
|
|
@@ -236,10 +237,10 @@ class a {
|
|
|
236
237
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
|
-
function
|
|
240
|
-
return e === void 0 ? void 0 : new
|
|
240
|
+
function A(e) {
|
|
241
|
+
return e === void 0 ? void 0 : new g(e);
|
|
241
242
|
}
|
|
242
|
-
class
|
|
243
|
+
class g {
|
|
243
244
|
constructor(t) {
|
|
244
245
|
this.handle = t;
|
|
245
246
|
}
|
|
@@ -247,7 +248,7 @@ class d {
|
|
|
247
248
|
return this.resolveWithCommon({}, ...t);
|
|
248
249
|
}
|
|
249
250
|
resolveWithCommon(t, ...n) {
|
|
250
|
-
return
|
|
251
|
+
return A(s().resolveWithCommon(this.handle, t, ...n));
|
|
251
252
|
}
|
|
252
253
|
get resourceType() {
|
|
253
254
|
return s().getResourceType(this.handle);
|
|
@@ -265,7 +266,7 @@ class d {
|
|
|
265
266
|
return s().getIsFinal(this.handle);
|
|
266
267
|
}
|
|
267
268
|
getError() {
|
|
268
|
-
return
|
|
269
|
+
return A(s().getError(this.handle));
|
|
269
270
|
}
|
|
270
271
|
listInputFields() {
|
|
271
272
|
return s().listInputFields(this.handle);
|
|
@@ -304,7 +305,7 @@ class d {
|
|
|
304
305
|
getPColumns(t = !1, n = "") {
|
|
305
306
|
const r = this.parsePObjectCollection(t, n);
|
|
306
307
|
return r === void 0 ? void 0 : Object.entries(r).map(([, c]) => {
|
|
307
|
-
if (!
|
|
308
|
+
if (!O(c)) throw new Error(`not a PColumn (kind = ${c.spec.kind})`);
|
|
308
309
|
return c;
|
|
309
310
|
});
|
|
310
311
|
}
|
|
@@ -319,8 +320,8 @@ class d {
|
|
|
319
320
|
);
|
|
320
321
|
if (r === void 0) return;
|
|
321
322
|
const o = {};
|
|
322
|
-
for (const [c,
|
|
323
|
-
o[c] =
|
|
323
|
+
for (const [c, v] of Object.entries(r))
|
|
324
|
+
o[c] = b(v, (R) => new g(R));
|
|
324
325
|
return o;
|
|
325
326
|
}
|
|
326
327
|
getFileContentAsBase64() {
|
|
@@ -383,39 +384,58 @@ class d {
|
|
|
383
384
|
return new a(s().getLogHandle(this.handle));
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
|
-
const F = "staging",
|
|
387
|
-
function
|
|
387
|
+
const F = "staging", S = "main";
|
|
388
|
+
function P(e) {
|
|
388
389
|
return typeof e == "object" && e !== null && "__awaited_futures__" in e;
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
+
function w(e, t, n) {
|
|
391
392
|
if (t.has(n)) return;
|
|
392
393
|
if (t.add(n), typeof n === "object")
|
|
393
|
-
if (
|
|
394
|
+
if (P(n)) n.__awaited_futures__.forEach((o) => e.add(o));
|
|
394
395
|
else if (Array.isArray(n))
|
|
395
|
-
for (const o of n)
|
|
396
|
+
for (const o of n) w(e, t, o);
|
|
396
397
|
else
|
|
397
398
|
for (const [, o] of Object.entries(n))
|
|
398
|
-
o !== n &&
|
|
399
|
+
o !== n && w(e, t, o);
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
+
function H(e) {
|
|
401
402
|
const t = /* @__PURE__ */ new Set();
|
|
402
|
-
return
|
|
403
|
+
return w(t, /* @__PURE__ */ new Set(), e), t;
|
|
403
404
|
}
|
|
404
|
-
const
|
|
405
|
+
const yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
405
406
|
__proto__: null,
|
|
406
|
-
MainAccessorName:
|
|
407
|
+
MainAccessorName: S,
|
|
407
408
|
StagingAccessorName: F,
|
|
408
|
-
getAllFutureAwaits:
|
|
409
|
-
isFutureAwait:
|
|
409
|
+
getAllFutureAwaits: H,
|
|
410
|
+
isFutureAwait: P
|
|
410
411
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
411
|
-
class
|
|
412
|
+
class J {
|
|
412
413
|
constructor() {
|
|
413
|
-
|
|
414
|
+
u(this, "ctx", s());
|
|
415
|
+
u(this, "defaultLabelFn", (t, n) => {
|
|
416
|
+
var r;
|
|
417
|
+
return ((r = t.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
|
|
418
|
+
});
|
|
414
419
|
}
|
|
420
|
+
/**
|
|
421
|
+
* @deprecated use getOptions()
|
|
422
|
+
*/
|
|
415
423
|
calculateOptions(t) {
|
|
416
424
|
return this.ctx.calculateOptions(t);
|
|
417
425
|
}
|
|
426
|
+
getOptions(t, n = this.defaultLabelFn) {
|
|
427
|
+
return this.getSpecs().entries.filter((r) => t(r.obj)).map((r) => ({
|
|
428
|
+
ref: r.ref,
|
|
429
|
+
label: n(r.obj, r.ref)
|
|
430
|
+
}));
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* @deprecated use getData()
|
|
434
|
+
*/
|
|
418
435
|
getDataFromResultPool() {
|
|
436
|
+
return this.getData();
|
|
437
|
+
}
|
|
438
|
+
getData() {
|
|
419
439
|
const t = this.ctx.getDataFromResultPool();
|
|
420
440
|
return {
|
|
421
441
|
isComplete: t.isComplete,
|
|
@@ -423,12 +443,18 @@ class N {
|
|
|
423
443
|
ref: n.ref,
|
|
424
444
|
obj: {
|
|
425
445
|
...n.obj,
|
|
426
|
-
data: new
|
|
446
|
+
data: new g(n.obj.data)
|
|
427
447
|
}
|
|
428
448
|
}))
|
|
429
449
|
};
|
|
430
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* @deprecated use getDataWithErrors()
|
|
453
|
+
*/
|
|
431
454
|
getDataWithErrorsFromResultPool() {
|
|
455
|
+
return this.getDataWithErrors();
|
|
456
|
+
}
|
|
457
|
+
getDataWithErrors() {
|
|
432
458
|
const t = this.ctx.getDataWithErrorsFromResultPool();
|
|
433
459
|
return {
|
|
434
460
|
isComplete: t.isComplete,
|
|
@@ -436,26 +462,48 @@ class N {
|
|
|
436
462
|
ref: n.ref,
|
|
437
463
|
obj: {
|
|
438
464
|
...n.obj,
|
|
439
|
-
data:
|
|
465
|
+
data: x(n.obj.data, (r) => new g(r))
|
|
440
466
|
}
|
|
441
467
|
}))
|
|
442
468
|
};
|
|
443
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* @deprecated use getSpecs()
|
|
472
|
+
*/
|
|
444
473
|
getSpecsFromResultPool() {
|
|
474
|
+
return this.getSpecs();
|
|
475
|
+
}
|
|
476
|
+
getSpecs() {
|
|
445
477
|
return this.ctx.getSpecsFromResultPool();
|
|
446
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* @param ref a Ref
|
|
481
|
+
* @returns data associated with the ref
|
|
482
|
+
*/
|
|
483
|
+
getDataByRef(t) {
|
|
484
|
+
var n;
|
|
485
|
+
return (n = this.getData().entries.find((r) => r.ref.blockId === t.blockId && r.ref.name === t.name)) == null ? void 0 : n.obj;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* @param ref a Ref
|
|
489
|
+
* @returns object spec associated with the ref
|
|
490
|
+
*/
|
|
491
|
+
getSpecByRef(t) {
|
|
492
|
+
var n;
|
|
493
|
+
return (n = this.getSpecs().entries.find((r) => r.ref.blockId === t.blockId && r.ref.name === t.name)) == null ? void 0 : n.obj;
|
|
494
|
+
}
|
|
447
495
|
}
|
|
448
496
|
class y {
|
|
449
497
|
constructor() {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
498
|
+
u(this, "ctx");
|
|
499
|
+
u(this, "args");
|
|
500
|
+
u(this, "uiState");
|
|
501
|
+
u(this, "resultPool", new J());
|
|
454
502
|
this.ctx = s(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : void 0;
|
|
455
503
|
}
|
|
456
504
|
getNamedAccessor(t) {
|
|
457
505
|
const n = this.ctx.getAccessorHandleByName(t);
|
|
458
|
-
return n ? new
|
|
506
|
+
return n ? new g(n) : void 0;
|
|
459
507
|
}
|
|
460
508
|
get prerun() {
|
|
461
509
|
return this.getNamedAccessor(F);
|
|
@@ -473,7 +521,7 @@ class y {
|
|
|
473
521
|
return this.precalc;
|
|
474
522
|
}
|
|
475
523
|
get outputs() {
|
|
476
|
-
return this.getNamedAccessor(
|
|
524
|
+
return this.getNamedAccessor(S);
|
|
477
525
|
}
|
|
478
526
|
/**
|
|
479
527
|
* @deprecated use outputs
|
|
@@ -482,7 +530,7 @@ class y {
|
|
|
482
530
|
return this.outputs;
|
|
483
531
|
}
|
|
484
532
|
createPFrame(t) {
|
|
485
|
-
return this.ctx.createPFrame(t.map((n) =>
|
|
533
|
+
return this.ctx.createPFrame(t.map((n) => b(n, (r) => r.handle)));
|
|
486
534
|
}
|
|
487
535
|
createPTable(t) {
|
|
488
536
|
var n;
|
|
@@ -493,17 +541,17 @@ class y {
|
|
|
493
541
|
},
|
|
494
542
|
filters: t.filters ?? [],
|
|
495
543
|
sorting: t.sorting ?? []
|
|
496
|
-
} : n = t, this.ctx.createPTable(B(n, (r) =>
|
|
544
|
+
} : n = t, this.ctx.createPTable(B(n, (r) => b(r, (o) => o.handle)));
|
|
497
545
|
}
|
|
498
546
|
getBlockLabel(t) {
|
|
499
547
|
return this.ctx.getBlockLabel(t);
|
|
500
548
|
}
|
|
501
549
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
550
|
+
const D = "1.2.32";
|
|
551
|
+
function bt(e) {
|
|
504
552
|
return typeof e == "string";
|
|
505
553
|
}
|
|
506
|
-
function
|
|
554
|
+
function wt(e) {
|
|
507
555
|
if (e.inputsValid !== void 0) return e;
|
|
508
556
|
{
|
|
509
557
|
if (e.canRun === void 0)
|
|
@@ -512,24 +560,24 @@ function bt(e) {
|
|
|
512
560
|
return delete t.canRun, t;
|
|
513
561
|
}
|
|
514
562
|
}
|
|
515
|
-
class
|
|
563
|
+
class l {
|
|
516
564
|
constructor(t, n, r, o, c) {
|
|
517
565
|
this._renderingMode = t, this._initialArgs = n, this._outputs = r, this._inputsValid = o, this._sections = c;
|
|
518
566
|
}
|
|
519
567
|
/** Initiates configuration builder */
|
|
520
568
|
static create(t = "Heavy") {
|
|
521
|
-
return new
|
|
569
|
+
return new l(
|
|
522
570
|
t,
|
|
523
571
|
void 0,
|
|
524
572
|
{},
|
|
525
|
-
|
|
526
|
-
|
|
573
|
+
h(!0),
|
|
574
|
+
h([])
|
|
527
575
|
);
|
|
528
576
|
}
|
|
529
577
|
output(t, n) {
|
|
530
578
|
if (typeof n == "function") {
|
|
531
579
|
const r = `output#${t}`;
|
|
532
|
-
return f(r, () => n(new y())), new
|
|
580
|
+
return f(r, () => n(new y())), new l(
|
|
533
581
|
this._renderingMode,
|
|
534
582
|
this._initialArgs,
|
|
535
583
|
{
|
|
@@ -540,7 +588,7 @@ class u {
|
|
|
540
588
|
this._sections
|
|
541
589
|
);
|
|
542
590
|
} else
|
|
543
|
-
return new
|
|
591
|
+
return new l(
|
|
544
592
|
this._renderingMode,
|
|
545
593
|
this._initialArgs,
|
|
546
594
|
{
|
|
@@ -556,13 +604,13 @@ class u {
|
|
|
556
604
|
return this.inputsValid(t);
|
|
557
605
|
}
|
|
558
606
|
argsValid(t) {
|
|
559
|
-
return typeof t == "function" ? (f("inputsValid", () => t(new y())), new
|
|
607
|
+
return typeof t == "function" ? (f("inputsValid", () => t(new y())), new l(
|
|
560
608
|
this._renderingMode,
|
|
561
609
|
this._initialArgs,
|
|
562
610
|
this._outputs,
|
|
563
611
|
"inputsValid",
|
|
564
612
|
this._sections
|
|
565
|
-
)) : new
|
|
613
|
+
)) : new l(
|
|
566
614
|
this._renderingMode,
|
|
567
615
|
this._initialArgs,
|
|
568
616
|
this._outputs,
|
|
@@ -574,13 +622,13 @@ class u {
|
|
|
574
622
|
return this.argsValid(t);
|
|
575
623
|
}
|
|
576
624
|
sections(t) {
|
|
577
|
-
return Array.isArray(t) ? this.sections(
|
|
625
|
+
return Array.isArray(t) ? this.sections(h(t)) : typeof t == "function" ? (f("sections", () => t(new y())), new l(
|
|
578
626
|
this._renderingMode,
|
|
579
627
|
this._initialArgs,
|
|
580
628
|
this._outputs,
|
|
581
629
|
this._inputsValid,
|
|
582
630
|
"sections"
|
|
583
|
-
)) : new
|
|
631
|
+
)) : new l(
|
|
584
632
|
this._renderingMode,
|
|
585
633
|
this._initialArgs,
|
|
586
634
|
this._outputs,
|
|
@@ -590,7 +638,7 @@ class u {
|
|
|
590
638
|
}
|
|
591
639
|
/** Sets initial args for the block, this value must be specified. */
|
|
592
640
|
initialArgs(t) {
|
|
593
|
-
return new
|
|
641
|
+
return new l(
|
|
594
642
|
this._renderingMode,
|
|
595
643
|
t,
|
|
596
644
|
this._outputs,
|
|
@@ -604,17 +652,17 @@ class u {
|
|
|
604
652
|
done() {
|
|
605
653
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
606
654
|
const t = {
|
|
607
|
-
sdkVersion:
|
|
655
|
+
sdkVersion: D,
|
|
608
656
|
renderingMode: this._renderingMode,
|
|
609
657
|
initialArgs: this._initialArgs,
|
|
610
658
|
inputsValid: this._inputsValid,
|
|
611
659
|
sections: this._sections,
|
|
612
660
|
outputs: this._outputs
|
|
613
661
|
};
|
|
614
|
-
return
|
|
662
|
+
return T() ? _(t) : { config: t };
|
|
615
663
|
}
|
|
616
664
|
}
|
|
617
|
-
class
|
|
665
|
+
class At {
|
|
618
666
|
constructor(t) {
|
|
619
667
|
this.handle = t;
|
|
620
668
|
}
|
|
@@ -634,72 +682,76 @@ class Ct {
|
|
|
634
682
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, t);
|
|
635
683
|
}
|
|
636
684
|
}
|
|
637
|
-
function
|
|
638
|
-
return
|
|
685
|
+
function G(e) {
|
|
686
|
+
return C({
|
|
639
687
|
__isRef: !0,
|
|
640
|
-
blockId:
|
|
641
|
-
name:
|
|
688
|
+
blockId: p(e, "blockId"),
|
|
689
|
+
name: p(e, "name")
|
|
642
690
|
});
|
|
643
691
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
646
|
-
ref:
|
|
647
|
-
label:
|
|
692
|
+
function Ct(e) {
|
|
693
|
+
return C({
|
|
694
|
+
ref: G(p(e, "ref")),
|
|
695
|
+
label: p(e, "label")
|
|
648
696
|
});
|
|
649
697
|
}
|
|
650
|
-
const
|
|
651
|
-
sdkVersion:
|
|
698
|
+
const _t = {
|
|
699
|
+
sdkVersion: D
|
|
652
700
|
};
|
|
653
|
-
function
|
|
654
|
-
|
|
655
|
-
|
|
701
|
+
function Ft() {
|
|
702
|
+
return _();
|
|
703
|
+
}
|
|
704
|
+
function St(e) {
|
|
705
|
+
if (typeof globalThis.getEnvironmentValue == "function")
|
|
706
|
+
return globalThis.getEnvironmentValue(e);
|
|
656
707
|
}
|
|
657
708
|
export {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
709
|
+
W as Args,
|
|
710
|
+
l as BlockModel,
|
|
711
|
+
_t as CurrentSdkInfo,
|
|
661
712
|
a as FutureRef,
|
|
662
713
|
U as It,
|
|
663
|
-
|
|
664
|
-
|
|
714
|
+
yt as JsRenderInternal,
|
|
715
|
+
z as MainOutputs,
|
|
665
716
|
E as OutputError,
|
|
666
|
-
|
|
717
|
+
At as PFrameImpl,
|
|
667
718
|
y as RenderCtx,
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
719
|
+
J as ResultPool,
|
|
720
|
+
q as StagingOutputs,
|
|
721
|
+
g as TreeNodeAccessor,
|
|
722
|
+
Q as UiState,
|
|
723
|
+
rt as and,
|
|
724
|
+
tt as flatten,
|
|
725
|
+
Ct as fromPlOption,
|
|
726
|
+
G as fromPlRef,
|
|
727
|
+
ut as getBlobContent,
|
|
728
|
+
ct as getBlobContentAsJson,
|
|
729
|
+
lt as getBlobContentAsString,
|
|
679
730
|
gt as getDownloadedBlobContent,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
731
|
+
St as getEnvironmentValue,
|
|
732
|
+
d as getFromCfg,
|
|
733
|
+
h as getImmediate,
|
|
683
734
|
ht as getImportProgress,
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
Z as
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
735
|
+
p as getJsonField,
|
|
736
|
+
pt as getLastLogs,
|
|
737
|
+
mt as getLogHandle,
|
|
738
|
+
dt as getOnDemandBlobContent,
|
|
739
|
+
ft as getProgressLog,
|
|
740
|
+
Ft as getRawPlatformaInstance,
|
|
741
|
+
it as getResourceField,
|
|
742
|
+
ot as getResourceValueAsJson,
|
|
743
|
+
et as isEmpty,
|
|
744
|
+
bt as isFunctionHandle,
|
|
745
|
+
K as isolate,
|
|
746
|
+
X as makeArray,
|
|
747
|
+
C as makeObject,
|
|
748
|
+
Z as mapArrayValues,
|
|
749
|
+
Y as mapRecordValues,
|
|
750
|
+
at as mapResourceFields,
|
|
751
|
+
wt as normalizeBlockConfig,
|
|
752
|
+
nt as not,
|
|
753
|
+
st as or,
|
|
702
754
|
L as readOutput,
|
|
703
|
-
|
|
755
|
+
M as wrapOutputs
|
|
704
756
|
};
|
|
705
757
|
//# sourceMappingURL=index.mjs.map
|