@platforma-sdk/model 1.22.0 → 1.22.2
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/config/actions.d.ts +3 -1
- package/dist/config/actions.d.ts.map +1 -1
- package/dist/config/actions_kinds.d.ts +5 -1
- package/dist/config/actions_kinds.d.ts.map +1 -1
- package/dist/config/model.d.ts +7 -1
- package/dist/config/model.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +454 -440
- package/dist/index.mjs.map +1 -1
- package/dist/render/accessor.d.ts +5 -1
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/internal.d.ts +2 -1
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/config/actions.ts +18 -1
- package/src/config/actions_kinds.ts +13 -1
- package/src/config/model.ts +13 -0
- package/src/render/accessor.ts +9 -0
- package/src/render/internal.ts +7 -0
package/dist/index.mjs
CHANGED
|
@@ -1,199 +1,206 @@
|
|
|
1
1
|
var fe = Object.defineProperty;
|
|
2
|
-
var he = (
|
|
3
|
-
var S = (
|
|
4
|
-
import { isPColumn as X, mapPObjectData as j, mapValueInVOE as ge, ensurePColumn as me, isPColumnSpec as Z, extractAllColumns as ye, mapPTableDef as be, getAxisId as
|
|
2
|
+
var he = (t, e, n) => e in t ? fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var S = (t, e, n) => he(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as X, mapPObjectData as j, mapValueInVOE as ge, ensurePColumn as me, isPColumnSpec as Z, extractAllColumns as ye, mapPTableDef as be, getAxisId as U, matchAxisId as x } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import { z as P } from "zod";
|
|
7
7
|
class ve extends Error {
|
|
8
|
-
constructor(e,
|
|
9
|
-
super(`${e.length}${
|
|
8
|
+
constructor(e, n) {
|
|
9
|
+
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0]), this.errors = e, this.moreErrors = n;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function _e(
|
|
13
|
-
if (!
|
|
14
|
-
return
|
|
12
|
+
function _e(t) {
|
|
13
|
+
if (!t.ok) throw new ve(t.errors, t.moreErrors);
|
|
14
|
+
return t.value;
|
|
15
15
|
}
|
|
16
|
-
function $e(
|
|
17
|
-
return new Proxy(
|
|
18
|
-
get(e,
|
|
19
|
-
return _e(e[
|
|
16
|
+
function $e(t) {
|
|
17
|
+
return new Proxy(t, {
|
|
18
|
+
get(e, n) {
|
|
19
|
+
return _e(e[n]);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function m(
|
|
24
|
-
return typeof
|
|
23
|
+
function m(t) {
|
|
24
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? V(t) : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return { type: "GetFromCtx", variable:
|
|
26
|
+
function O(t) {
|
|
27
|
+
return { type: "GetFromCtx", variable: t };
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ge(t) {
|
|
30
30
|
return {
|
|
31
31
|
type: "Isolate",
|
|
32
|
-
cfg:
|
|
32
|
+
cfg: t
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
function V(
|
|
37
|
-
return { type: "Immediate", value:
|
|
35
|
+
const Ke = O("$args"), He = O("$it"), We = O("$prod"), qe = O("$staging"), ze = O("$ui");
|
|
36
|
+
function V(t) {
|
|
37
|
+
return { type: "Immediate", value: t };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function se(t) {
|
|
40
40
|
const e = {};
|
|
41
|
-
for (const [
|
|
41
|
+
for (const [n, r] of Object.entries(t)) e[n] = m(r);
|
|
42
42
|
return {
|
|
43
43
|
type: "MakeObject",
|
|
44
44
|
template: e
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function Ye(...
|
|
47
|
+
function Ye(...t) {
|
|
48
48
|
const e = [];
|
|
49
|
-
for (const
|
|
49
|
+
for (const n of t) e.push(m(n));
|
|
50
50
|
return {
|
|
51
51
|
type: "MakeArray",
|
|
52
52
|
template: e
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function B(t, e) {
|
|
56
56
|
return {
|
|
57
57
|
type: "GetJsonField",
|
|
58
|
-
source: m(
|
|
58
|
+
source: m(t),
|
|
59
59
|
field: m(e)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function Xe(
|
|
62
|
+
function Xe(t, e, n = "$it") {
|
|
63
63
|
return {
|
|
64
64
|
type: "MapRecordValues",
|
|
65
|
-
source:
|
|
65
|
+
source: t,
|
|
66
66
|
mapping: e,
|
|
67
|
-
itVar:
|
|
67
|
+
itVar: n
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function Qe(
|
|
70
|
+
function Qe(t, e, n = "$it") {
|
|
71
71
|
return {
|
|
72
72
|
type: "MapArrayValues",
|
|
73
|
-
source:
|
|
73
|
+
source: t,
|
|
74
74
|
mapping: e,
|
|
75
|
-
itVar:
|
|
75
|
+
itVar: n
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function Ze(
|
|
78
|
+
function Ze(t) {
|
|
79
79
|
return {
|
|
80
80
|
type: "Flatten",
|
|
81
|
-
source:
|
|
81
|
+
source: t
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function et(
|
|
84
|
+
function et(t) {
|
|
85
85
|
return {
|
|
86
86
|
type: "IsEmpty",
|
|
87
|
-
arg:
|
|
87
|
+
arg: t
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function tt(
|
|
90
|
+
function tt(t) {
|
|
91
91
|
return {
|
|
92
92
|
type: "Not",
|
|
93
|
-
operand:
|
|
93
|
+
operand: t
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
function nt(
|
|
96
|
+
function nt(t, e) {
|
|
97
97
|
return {
|
|
98
98
|
type: "And",
|
|
99
|
-
operand1:
|
|
99
|
+
operand1: t,
|
|
100
100
|
operand2: e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function rt(
|
|
103
|
+
function rt(t, e) {
|
|
104
104
|
return {
|
|
105
105
|
type: "Or",
|
|
106
|
-
operand1:
|
|
106
|
+
operand1: t,
|
|
107
107
|
operand2: e
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function it(t, e) {
|
|
111
111
|
return {
|
|
112
112
|
type: "GetResourceField",
|
|
113
|
-
source: m(
|
|
113
|
+
source: m(t),
|
|
114
114
|
field: m(e)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return function(
|
|
117
|
+
function st() {
|
|
118
|
+
return function(t) {
|
|
119
119
|
return {
|
|
120
120
|
type: "GetResourceValueAsJson",
|
|
121
|
-
source: m(
|
|
121
|
+
source: m(t)
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function ot(
|
|
125
|
+
function ot(t, e, n = "$it") {
|
|
126
126
|
return {
|
|
127
127
|
type: "MapResourceFields",
|
|
128
|
-
source:
|
|
128
|
+
source: t,
|
|
129
129
|
mapping: e,
|
|
130
|
-
itVar:
|
|
130
|
+
itVar: n
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function at(
|
|
133
|
+
function at(t) {
|
|
134
134
|
return {
|
|
135
135
|
type: "GetBlobContent",
|
|
136
|
-
source: m(
|
|
136
|
+
source: m(t)
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function lt(
|
|
139
|
+
function lt(t) {
|
|
140
140
|
return {
|
|
141
141
|
type: "GetBlobContentAsString",
|
|
142
|
-
source: m(
|
|
142
|
+
source: m(t)
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
function ut() {
|
|
146
|
-
return function(
|
|
146
|
+
return function(t) {
|
|
147
147
|
return {
|
|
148
148
|
type: "GetBlobContentAsJson",
|
|
149
|
-
source: m(
|
|
149
|
+
source: m(t)
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function ct(
|
|
153
|
+
function ct(t) {
|
|
154
154
|
return {
|
|
155
155
|
type: "GetDownloadedBlobContent",
|
|
156
|
-
source: m(
|
|
156
|
+
source: m(t)
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function dt(
|
|
159
|
+
function dt(t) {
|
|
160
160
|
return {
|
|
161
161
|
type: "GetOnDemandBlobContent",
|
|
162
|
-
source: m(
|
|
162
|
+
source: m(t)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function pt(
|
|
165
|
+
function pt(t, e) {
|
|
166
|
+
return {
|
|
167
|
+
type: "ExtractArchiveAndGetURL",
|
|
168
|
+
format: e,
|
|
169
|
+
source: m(t)
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function ft(t) {
|
|
166
173
|
return {
|
|
167
174
|
type: "GetImportProgress",
|
|
168
|
-
source: m(
|
|
175
|
+
source: m(t)
|
|
169
176
|
};
|
|
170
177
|
}
|
|
171
|
-
function
|
|
178
|
+
function ht(t, e) {
|
|
172
179
|
return {
|
|
173
180
|
type: "GetLastLogs",
|
|
174
|
-
source: m(
|
|
181
|
+
source: m(t),
|
|
175
182
|
lines: e
|
|
176
183
|
};
|
|
177
184
|
}
|
|
178
|
-
function
|
|
185
|
+
function gt(t, e) {
|
|
179
186
|
return {
|
|
180
187
|
type: "GetProgressLog",
|
|
181
|
-
source: m(
|
|
188
|
+
source: m(t),
|
|
182
189
|
patternToSearch: e
|
|
183
190
|
};
|
|
184
191
|
}
|
|
185
|
-
function
|
|
192
|
+
function mt(t) {
|
|
186
193
|
return {
|
|
187
194
|
type: "GetLogHandle",
|
|
188
|
-
source: m(
|
|
195
|
+
source: m(t)
|
|
189
196
|
};
|
|
190
197
|
}
|
|
191
198
|
function Se() {
|
|
192
199
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
193
200
|
}
|
|
194
|
-
function oe(
|
|
195
|
-
if (
|
|
196
|
-
return globalThis.getPlatforma(
|
|
201
|
+
function oe(t) {
|
|
202
|
+
if (t && typeof globalThis.getPlatforma == "function")
|
|
203
|
+
return globalThis.getPlatforma(t);
|
|
197
204
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
198
205
|
throw new Error("Can't get platforma instance.");
|
|
199
206
|
}
|
|
@@ -204,33 +211,33 @@ function c() {
|
|
|
204
211
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
205
212
|
throw new Error("Not in config rendering context");
|
|
206
213
|
}
|
|
207
|
-
function
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
if (
|
|
211
|
-
return
|
|
214
|
+
function L(t, e) {
|
|
215
|
+
const n = we();
|
|
216
|
+
if (n === void 0) return !1;
|
|
217
|
+
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
218
|
+
return n.callbackRegistry[t] = e, !0;
|
|
212
219
|
}
|
|
213
|
-
const
|
|
214
|
-
function
|
|
215
|
-
|
|
216
|
-
for (const r of
|
|
217
|
-
r(
|
|
218
|
-
},
|
|
220
|
+
const J = /* @__PURE__ */ new Map();
|
|
221
|
+
function Ae(t, e) {
|
|
222
|
+
t in c().callbackRegistry || (c().callbackRegistry[t] = (n) => {
|
|
223
|
+
for (const r of J.get(t))
|
|
224
|
+
r(n);
|
|
225
|
+
}, J.set(t, [])), J.get(t).push(e);
|
|
219
226
|
}
|
|
220
|
-
class
|
|
221
|
-
constructor(e,
|
|
227
|
+
class b {
|
|
228
|
+
constructor(e, n = (r) => r) {
|
|
222
229
|
S(this, "isResolved", !1);
|
|
223
230
|
S(this, "resolvedValue");
|
|
224
|
-
this.handle = e, this.postProcess =
|
|
225
|
-
this.resolvedValue =
|
|
231
|
+
this.handle = e, this.postProcess = n, Ae(e, (r) => {
|
|
232
|
+
this.resolvedValue = n(r), this.isResolved = !0;
|
|
226
233
|
});
|
|
227
234
|
}
|
|
228
235
|
map(e) {
|
|
229
|
-
return new
|
|
236
|
+
return new b(this.handle, (n) => e(this.postProcess(n)));
|
|
230
237
|
}
|
|
231
238
|
mapDefined(e) {
|
|
232
|
-
return new
|
|
233
|
-
const r = this.postProcess(
|
|
239
|
+
return new b(this.handle, (n) => {
|
|
240
|
+
const r = this.postProcess(n);
|
|
234
241
|
return r ? e(r) : void 0;
|
|
235
242
|
});
|
|
236
243
|
}
|
|
@@ -238,51 +245,51 @@ class _ {
|
|
|
238
245
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
239
246
|
}
|
|
240
247
|
}
|
|
241
|
-
function H(
|
|
242
|
-
return
|
|
248
|
+
function H(t, e) {
|
|
249
|
+
return t === void 0 ? void 0 : e(t);
|
|
243
250
|
}
|
|
244
|
-
class
|
|
245
|
-
constructor(e,
|
|
246
|
-
this.handle = e, this.resolvePath =
|
|
251
|
+
class v {
|
|
252
|
+
constructor(e, n) {
|
|
253
|
+
this.handle = e, this.resolvePath = n;
|
|
247
254
|
}
|
|
248
255
|
resolve(...e) {
|
|
249
|
-
const
|
|
256
|
+
const n = e.map(
|
|
250
257
|
(r) => ({
|
|
251
258
|
assertFieldType: "Input",
|
|
252
259
|
...typeof r == "string" ? { field: r } : r
|
|
253
260
|
})
|
|
254
261
|
);
|
|
255
|
-
return this.resolveWithCommon({}, ...
|
|
262
|
+
return this.resolveWithCommon({}, ...n);
|
|
256
263
|
}
|
|
257
264
|
resolveOutput(...e) {
|
|
258
|
-
const
|
|
265
|
+
const n = e.map(
|
|
259
266
|
(r) => ({
|
|
260
267
|
assertFieldType: "Output",
|
|
261
268
|
...typeof r == "string" ? { field: r } : r
|
|
262
269
|
})
|
|
263
270
|
);
|
|
264
|
-
return this.resolveWithCommon({}, ...
|
|
271
|
+
return this.resolveWithCommon({}, ...n);
|
|
265
272
|
}
|
|
266
273
|
resolveInput(...e) {
|
|
267
|
-
const
|
|
274
|
+
const n = e.map(
|
|
268
275
|
(r) => ({
|
|
269
276
|
assertFieldType: "Input",
|
|
270
277
|
...typeof r == "string" ? { field: r } : r
|
|
271
278
|
})
|
|
272
279
|
);
|
|
273
|
-
return this.resolveWithCommon({}, ...
|
|
280
|
+
return this.resolveWithCommon({}, ...n);
|
|
274
281
|
}
|
|
275
282
|
resolveAny(...e) {
|
|
276
283
|
return this.resolveWithCommon({}, ...e);
|
|
277
284
|
}
|
|
278
|
-
resolveWithCommon(e, ...
|
|
285
|
+
resolveWithCommon(e, ...n) {
|
|
279
286
|
const r = [
|
|
280
287
|
...this.resolvePath,
|
|
281
|
-
...
|
|
288
|
+
...n.map((i) => typeof i == "string" ? i : i.field)
|
|
282
289
|
];
|
|
283
290
|
return H(
|
|
284
|
-
c().resolveWithCommon(this.handle, e, ...
|
|
285
|
-
(
|
|
291
|
+
c().resolveWithCommon(this.handle, e, ...n),
|
|
292
|
+
(i) => new v(i, r)
|
|
286
293
|
);
|
|
287
294
|
}
|
|
288
295
|
get resourceType() {
|
|
@@ -304,7 +311,7 @@ class b {
|
|
|
304
311
|
const e = [...this.resolvePath, "error"];
|
|
305
312
|
return H(
|
|
306
313
|
c().getError(this.handle),
|
|
307
|
-
(
|
|
314
|
+
(n) => new v(n, e)
|
|
308
315
|
);
|
|
309
316
|
}
|
|
310
317
|
listInputFields() {
|
|
@@ -323,9 +330,9 @@ class b {
|
|
|
323
330
|
return c().getKeyValueAsString(this.handle, e);
|
|
324
331
|
}
|
|
325
332
|
getKeyValueAsJson(e) {
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
328
|
-
return JSON.parse(
|
|
333
|
+
const n = this.getKeyValueAsString(e);
|
|
334
|
+
if (n == null) throw new Error("Resource has no content.");
|
|
335
|
+
return JSON.parse(n);
|
|
329
336
|
}
|
|
330
337
|
getDataBase64() {
|
|
331
338
|
return c().getDataBase64(this.handle);
|
|
@@ -341,39 +348,39 @@ class b {
|
|
|
341
348
|
/**
|
|
342
349
|
*
|
|
343
350
|
*/
|
|
344
|
-
getPColumns(e = !1,
|
|
345
|
-
const r = this.parsePObjectCollection(e,
|
|
346
|
-
return r === void 0 ? void 0 : Object.entries(r).map(([,
|
|
347
|
-
if (!X(
|
|
348
|
-
return
|
|
351
|
+
getPColumns(e = !1, n = "") {
|
|
352
|
+
const r = this.parsePObjectCollection(e, n);
|
|
353
|
+
return r === void 0 ? void 0 : Object.entries(r).map(([, s]) => {
|
|
354
|
+
if (!X(s)) throw new Error(`not a PColumn (kind = ${s.spec.kind})`);
|
|
355
|
+
return s;
|
|
349
356
|
});
|
|
350
357
|
}
|
|
351
358
|
/**
|
|
352
359
|
*
|
|
353
360
|
*/
|
|
354
|
-
parsePObjectCollection(e = !1,
|
|
361
|
+
parsePObjectCollection(e = !1, n = "") {
|
|
355
362
|
const r = c().parsePObjectCollection(
|
|
356
363
|
this.handle,
|
|
357
364
|
e,
|
|
358
|
-
|
|
365
|
+
n,
|
|
359
366
|
...this.resolvePath
|
|
360
367
|
);
|
|
361
368
|
if (r === void 0) return;
|
|
362
|
-
const
|
|
363
|
-
for (const [
|
|
364
|
-
const l = [...this.resolvePath,
|
|
365
|
-
s
|
|
369
|
+
const i = {};
|
|
370
|
+
for (const [s, o] of Object.entries(r)) {
|
|
371
|
+
const l = [...this.resolvePath, s];
|
|
372
|
+
i[s] = j(o, (a) => new v(a, l));
|
|
366
373
|
}
|
|
367
|
-
return
|
|
374
|
+
return i;
|
|
368
375
|
}
|
|
369
376
|
getFileContentAsBase64() {
|
|
370
|
-
return new
|
|
377
|
+
return new b(c().getBlobContentAsBase64(this.handle));
|
|
371
378
|
}
|
|
372
379
|
getFileContentAsString() {
|
|
373
|
-
return new
|
|
380
|
+
return new b(c().getBlobContentAsString(this.handle));
|
|
374
381
|
}
|
|
375
382
|
getFileContentAsJson() {
|
|
376
|
-
return new
|
|
383
|
+
return new b(
|
|
377
384
|
c().getBlobContentAsString(this.handle)
|
|
378
385
|
).mapDefined((e) => JSON.parse(e));
|
|
379
386
|
}
|
|
@@ -393,7 +400,7 @@ class b {
|
|
|
393
400
|
* @returns downloaded file handle
|
|
394
401
|
*/
|
|
395
402
|
getFileHandle() {
|
|
396
|
-
return new
|
|
403
|
+
return new b(c().getDownloadedBlobContentHandle(this.handle));
|
|
397
404
|
}
|
|
398
405
|
/**
|
|
399
406
|
* @deprecated use getFileHandle
|
|
@@ -405,7 +412,7 @@ class b {
|
|
|
405
412
|
* @returns downloaded file handle
|
|
406
413
|
*/
|
|
407
414
|
getRemoteFileHandle() {
|
|
408
|
-
return new
|
|
415
|
+
return new b(c().getOnDemandBlobContentHandle(this.handle));
|
|
409
416
|
}
|
|
410
417
|
/**
|
|
411
418
|
* @deprecated use getRemoteFileHandle
|
|
@@ -413,99 +420,105 @@ class b {
|
|
|
413
420
|
getOnDemandBlobHandle() {
|
|
414
421
|
return this.getRemoteFileHandle();
|
|
415
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* @returns the url to the extracted folder
|
|
425
|
+
*/
|
|
426
|
+
extractArchiveAndGetURL(e) {
|
|
427
|
+
return new b(c().extractArchiveAndGetURL(this.handle, e));
|
|
428
|
+
}
|
|
416
429
|
getImportProgress() {
|
|
417
|
-
return new
|
|
430
|
+
return new b(c().getImportProgress(this.handle));
|
|
418
431
|
}
|
|
419
432
|
getLastLogs(e) {
|
|
420
|
-
return new
|
|
433
|
+
return new b(c().getLastLogs(this.handle, e));
|
|
421
434
|
}
|
|
422
435
|
getProgressLog(e) {
|
|
423
|
-
return new
|
|
436
|
+
return new b(c().getProgressLog(this.handle, e));
|
|
424
437
|
}
|
|
425
438
|
getLogHandle() {
|
|
426
|
-
return new
|
|
439
|
+
return new b(c().getLogHandle(this.handle));
|
|
427
440
|
}
|
|
428
441
|
allFieldsResolved(e = "Input") {
|
|
429
442
|
switch (e) {
|
|
430
443
|
case "Input":
|
|
431
444
|
return this.getInputsLocked() && this.listInputFields().every(
|
|
432
|
-
(
|
|
445
|
+
(n) => this.resolve({ field: n, assertFieldType: "Input" }) !== void 0
|
|
433
446
|
);
|
|
434
447
|
case "Output":
|
|
435
448
|
return this.getOutputsLocked() && this.listOutputFields().every(
|
|
436
|
-
(
|
|
449
|
+
(n) => this.resolve({ field: n, assertFieldType: "Output" }) !== void 0
|
|
437
450
|
);
|
|
438
451
|
}
|
|
439
452
|
}
|
|
440
|
-
mapFields(e,
|
|
441
|
-
const { fieldType: r, requireLocked:
|
|
453
|
+
mapFields(e, n) {
|
|
454
|
+
const { fieldType: r, requireLocked: i, skipUnresolved: s } = {
|
|
442
455
|
fieldType: "Input",
|
|
443
456
|
requireLocked: !0,
|
|
444
457
|
skipUnresolved: !1,
|
|
445
|
-
...
|
|
458
|
+
...n
|
|
446
459
|
}, o = e;
|
|
447
|
-
if (
|
|
460
|
+
if (i && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
448
461
|
return;
|
|
449
462
|
let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
450
463
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
451
464
|
);
|
|
452
|
-
return
|
|
465
|
+
return s && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, h]) => o(u, h));
|
|
453
466
|
}
|
|
454
467
|
}
|
|
455
|
-
const ae = "staging", le = "main",
|
|
468
|
+
const ae = "staging", le = "main", Ce = {
|
|
456
469
|
inlineColumnsSupport: !0,
|
|
457
470
|
activeArgs: !0
|
|
458
471
|
};
|
|
459
|
-
function ue(
|
|
460
|
-
return typeof
|
|
461
|
-
}
|
|
462
|
-
function W(
|
|
463
|
-
if (e.has(
|
|
464
|
-
if (e.add(
|
|
465
|
-
if (ue(
|
|
466
|
-
else if (Array.isArray(
|
|
467
|
-
for (const
|
|
472
|
+
function ue(t) {
|
|
473
|
+
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
474
|
+
}
|
|
475
|
+
function W(t, e, n) {
|
|
476
|
+
if (e.has(n)) return;
|
|
477
|
+
if (e.add(n), typeof n === "object")
|
|
478
|
+
if (ue(n)) n.__awaited_futures__.forEach((i) => t.add(i));
|
|
479
|
+
else if (Array.isArray(n))
|
|
480
|
+
for (const i of n) W(t, e, i);
|
|
468
481
|
else
|
|
469
|
-
for (const [,
|
|
470
|
-
|
|
482
|
+
for (const [, i] of Object.entries(n))
|
|
483
|
+
i !== n && W(t, e, i);
|
|
471
484
|
}
|
|
472
|
-
function Pe(
|
|
485
|
+
function Pe(t) {
|
|
473
486
|
const e = /* @__PURE__ */ new Set();
|
|
474
|
-
return W(e, /* @__PURE__ */ new Set(),
|
|
487
|
+
return W(e, /* @__PURE__ */ new Set(), t), e;
|
|
475
488
|
}
|
|
476
|
-
const
|
|
489
|
+
const yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
477
490
|
__proto__: null,
|
|
478
|
-
GlobalCfgRenderCtxFeatureFlags:
|
|
491
|
+
GlobalCfgRenderCtxFeatureFlags: Ce,
|
|
479
492
|
MainAccessorName: le,
|
|
480
493
|
StagingAccessorName: ae,
|
|
481
494
|
getAllFutureAwaits: Pe,
|
|
482
495
|
isFutureAwait: ue
|
|
483
|
-
}, Symbol.toStringTag, { value: "Module" })), Ie = "pl7.app/label",
|
|
496
|
+
}, Symbol.toStringTag, { value: "Module" })), Ie = "pl7.app/label", Re = "pl7.app/trace", Fe = P.object({
|
|
484
497
|
type: P.string(),
|
|
485
498
|
importance: P.number().optional(),
|
|
486
499
|
id: P.string().optional(),
|
|
487
500
|
label: P.string()
|
|
488
|
-
}),
|
|
489
|
-
function ke(
|
|
490
|
-
const r = /* @__PURE__ */ new Map(),
|
|
491
|
-
var
|
|
492
|
-
const g = e(p), f = (
|
|
501
|
+
}), xe = P.array(Fe), Te = 1e-3, Oe = "__LABEL__", ee = "__LABEL__@1";
|
|
502
|
+
function ke(t, e, n = {}) {
|
|
503
|
+
const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = t.map((p) => {
|
|
504
|
+
var R, Q;
|
|
505
|
+
const g = e(p), f = (R = g.annotations) == null ? void 0 : R[Ie], A = (Q = g.annotations) == null ? void 0 : Q[Re], y = (A ? xe.safeParse(JSON.parse(A)).data : void 0) ?? [];
|
|
493
506
|
if (f) {
|
|
494
|
-
const w = { label: f, type:
|
|
495
|
-
|
|
507
|
+
const w = { label: f, type: Oe, importance: -2 };
|
|
508
|
+
n.addLabelAsSuffix ? y.push(w) : y.splice(0, 0, w);
|
|
496
509
|
}
|
|
497
510
|
const I = [], D = /* @__PURE__ */ new Map();
|
|
498
511
|
for (let w = y.length - 1; w >= 0; --w) {
|
|
499
|
-
const { type:
|
|
500
|
-
D.set(
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
512
|
+
const { type: N } = y[w], pe = y[w].importance ?? 0, M = (D.get(N) ?? 0) + 1;
|
|
513
|
+
D.set(N, M);
|
|
514
|
+
const F = `${N}@${M}`;
|
|
515
|
+
i.set(F, (i.get(F) ?? 0) + 1), r.set(
|
|
516
|
+
F,
|
|
504
517
|
Math.max(
|
|
505
|
-
r.get(
|
|
506
|
-
pe - (y.length - w) *
|
|
518
|
+
r.get(F) ?? Number.NEGATIVE_INFINITY,
|
|
519
|
+
pe - (y.length - w) * Te
|
|
507
520
|
)
|
|
508
|
-
), I.push({ ...y[w], fullType:
|
|
521
|
+
), I.push({ ...y[w], fullType: F, occurenceIndex: M });
|
|
509
522
|
}
|
|
510
523
|
return I.reverse(), {
|
|
511
524
|
value: p,
|
|
@@ -516,11 +529,11 @@ function ke(n, e, t = {}) {
|
|
|
516
529
|
}), o = [], l = [], a = [...r];
|
|
517
530
|
a.sort(([, p], [, g]) => g - p);
|
|
518
531
|
for (const [p] of a)
|
|
519
|
-
p.endsWith("@1") ||
|
|
520
|
-
const u = (p) =>
|
|
521
|
-
const f = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label),
|
|
532
|
+
p.endsWith("@1") || i.get(p) === t.length ? o.push(p) : l.push(p);
|
|
533
|
+
const u = (p) => s.map((g) => {
|
|
534
|
+
const f = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), A = n.separator ?? " / ";
|
|
522
535
|
return {
|
|
523
|
-
label: f.join(
|
|
536
|
+
label: f.join(A),
|
|
524
537
|
value: g.value
|
|
525
538
|
};
|
|
526
539
|
});
|
|
@@ -531,11 +544,11 @@ function ke(n, e, t = {}) {
|
|
|
531
544
|
let h = 0, d = 0;
|
|
532
545
|
for (; h < o.length; ) {
|
|
533
546
|
const p = /* @__PURE__ */ new Set();
|
|
534
|
-
|
|
547
|
+
n.includeNativeLabel && p.add(ee);
|
|
535
548
|
for (let f = 0; f < h; ++f) p.add(o[f]);
|
|
536
549
|
p.add(o[d]);
|
|
537
550
|
const g = u(p);
|
|
538
|
-
if (new Set(g.map((f) => f.label)).size ===
|
|
551
|
+
if (new Set(g.map((f) => f.label)).size === t.length) return g;
|
|
539
552
|
d++, d == o.length && (h++, d = h);
|
|
540
553
|
}
|
|
541
554
|
return u(/* @__PURE__ */ new Set([...o, ...l]));
|
|
@@ -543,7 +556,7 @@ function ke(n, e, t = {}) {
|
|
|
543
556
|
class De {
|
|
544
557
|
constructor() {
|
|
545
558
|
S(this, "ctx", c());
|
|
546
|
-
S(this, "defaultLabelFn", (e,
|
|
559
|
+
S(this, "defaultLabelFn", (e, n) => {
|
|
547
560
|
var r;
|
|
548
561
|
return ((r = e.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
|
|
549
562
|
});
|
|
@@ -554,14 +567,14 @@ class De {
|
|
|
554
567
|
calculateOptions(e) {
|
|
555
568
|
return this.ctx.calculateOptions(e);
|
|
556
569
|
}
|
|
557
|
-
getOptions(e,
|
|
558
|
-
const r = this.getSpecs().entries.filter((
|
|
559
|
-
return typeof
|
|
560
|
-
ref:
|
|
561
|
-
label:
|
|
562
|
-
})) : r.map((
|
|
563
|
-
ref:
|
|
564
|
-
label:
|
|
570
|
+
getOptions(e, n) {
|
|
571
|
+
const r = this.getSpecs().entries.filter((i) => e(i.obj));
|
|
572
|
+
return typeof n == "object" || typeof n > "u" ? ke(r, (i) => i.obj, n ?? {}).map(({ value: { ref: i }, label: s }) => ({
|
|
573
|
+
ref: i,
|
|
574
|
+
label: s
|
|
575
|
+
})) : r.map((i) => ({
|
|
576
|
+
ref: i.ref,
|
|
577
|
+
label: n(i.obj, i.ref)
|
|
565
578
|
}));
|
|
566
579
|
}
|
|
567
580
|
/**
|
|
@@ -574,11 +587,11 @@ class De {
|
|
|
574
587
|
const e = this.ctx.getDataFromResultPool();
|
|
575
588
|
return {
|
|
576
589
|
isComplete: e.isComplete,
|
|
577
|
-
entries: e.entries.map((
|
|
578
|
-
ref:
|
|
590
|
+
entries: e.entries.map((n) => ({
|
|
591
|
+
ref: n.ref,
|
|
579
592
|
obj: {
|
|
580
|
-
...
|
|
581
|
-
data: new
|
|
593
|
+
...n.obj,
|
|
594
|
+
data: new v(n.obj.data, [n.ref.blockId, n.ref.name])
|
|
582
595
|
}
|
|
583
596
|
}))
|
|
584
597
|
};
|
|
@@ -593,13 +606,13 @@ class De {
|
|
|
593
606
|
const e = this.ctx.getDataWithErrorsFromResultPool();
|
|
594
607
|
return {
|
|
595
608
|
isComplete: e.isComplete,
|
|
596
|
-
entries: e.entries.map((
|
|
597
|
-
ref:
|
|
609
|
+
entries: e.entries.map((n) => ({
|
|
610
|
+
ref: n.ref,
|
|
598
611
|
obj: {
|
|
599
|
-
...
|
|
612
|
+
...n.obj,
|
|
600
613
|
data: ge(
|
|
601
|
-
|
|
602
|
-
(r) => new
|
|
614
|
+
n.obj.data,
|
|
615
|
+
(r) => new v(r, [n.ref.blockId, n.ref.name])
|
|
603
616
|
)
|
|
604
617
|
}
|
|
605
618
|
}))
|
|
@@ -619,12 +632,12 @@ class De {
|
|
|
619
632
|
* @returns data associated with the ref
|
|
620
633
|
*/
|
|
621
634
|
getDataByRef(e) {
|
|
622
|
-
var
|
|
623
|
-
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (
|
|
635
|
+
var n;
|
|
636
|
+
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
|
|
624
637
|
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
625
|
-
)) == null ? void 0 :
|
|
638
|
+
)) == null ? void 0 : n.obj : j(
|
|
626
639
|
this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
|
|
627
|
-
(r) => new
|
|
640
|
+
(r) => new v(r, [e.blockId, e.name])
|
|
628
641
|
);
|
|
629
642
|
}
|
|
630
643
|
/**
|
|
@@ -633,9 +646,9 @@ class De {
|
|
|
633
646
|
* @returns p-column associated with the ref
|
|
634
647
|
*/
|
|
635
648
|
getPColumnByRef(e) {
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
return me(
|
|
649
|
+
const n = this.getDataByRef(e);
|
|
650
|
+
if (n)
|
|
651
|
+
return me(n);
|
|
639
652
|
}
|
|
640
653
|
/**
|
|
641
654
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -643,10 +656,10 @@ class De {
|
|
|
643
656
|
* @returns p-column spec associated with the ref
|
|
644
657
|
*/
|
|
645
658
|
getPColumnSpecByRef(e) {
|
|
646
|
-
const
|
|
647
|
-
if (
|
|
648
|
-
if (!Z(
|
|
649
|
-
return
|
|
659
|
+
const n = this.getSpecByRef(e);
|
|
660
|
+
if (n) {
|
|
661
|
+
if (!Z(n)) throw new Error(`not a PColumn spec (kind = ${n.kind})`);
|
|
662
|
+
return n;
|
|
650
663
|
}
|
|
651
664
|
}
|
|
652
665
|
/**
|
|
@@ -654,10 +667,10 @@ class De {
|
|
|
654
667
|
* @returns object spec associated with the ref
|
|
655
668
|
*/
|
|
656
669
|
getSpecByRef(e) {
|
|
657
|
-
var
|
|
658
|
-
return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (
|
|
670
|
+
var n;
|
|
671
|
+
return typeof this.ctx.getSpecFromResultPoolByRef > "u" ? (n = this.getSpecs().entries.find(
|
|
659
672
|
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
660
|
-
)) == null ? void 0 :
|
|
673
|
+
)) == null ? void 0 : n.obj : this.ctx.getSpecFromResultPoolByRef(e.blockId, e.name);
|
|
661
674
|
}
|
|
662
675
|
/**
|
|
663
676
|
* @param spec object specification
|
|
@@ -665,31 +678,31 @@ class De {
|
|
|
665
678
|
* @deprecated delete this method after Jan 1, 2025
|
|
666
679
|
*/
|
|
667
680
|
findDataWithCompatibleSpec(e) {
|
|
668
|
-
const
|
|
681
|
+
const n = [];
|
|
669
682
|
e: for (const r of this.getData().entries) {
|
|
670
683
|
if (!Z(r.obj.spec))
|
|
671
684
|
continue;
|
|
672
|
-
const
|
|
673
|
-
if (e.name ===
|
|
674
|
-
for (let
|
|
675
|
-
const o = e.axesSpec[
|
|
685
|
+
const i = r.obj.spec;
|
|
686
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && q(e.domain, i.domain)) {
|
|
687
|
+
for (let s = 0; s < e.axesSpec.length; ++s) {
|
|
688
|
+
const o = e.axesSpec[s], l = i.axesSpec[s];
|
|
676
689
|
if (o.name !== l.name || o.type !== l.type || !q(o.domain, l.domain))
|
|
677
690
|
continue e;
|
|
678
691
|
}
|
|
679
|
-
|
|
692
|
+
n.push(r.obj);
|
|
680
693
|
}
|
|
681
694
|
}
|
|
682
|
-
return
|
|
695
|
+
return n;
|
|
683
696
|
}
|
|
684
697
|
}
|
|
685
|
-
function q(
|
|
686
|
-
if (
|
|
698
|
+
function q(t, e) {
|
|
699
|
+
if (t === void 0) return e === void 0;
|
|
687
700
|
if (e === void 0) return !0;
|
|
688
|
-
for (const
|
|
689
|
-
if (n
|
|
701
|
+
for (const n in e)
|
|
702
|
+
if (t[n] !== e[n]) return !1;
|
|
690
703
|
return !0;
|
|
691
704
|
}
|
|
692
|
-
class
|
|
705
|
+
class E {
|
|
693
706
|
constructor() {
|
|
694
707
|
S(this, "ctx");
|
|
695
708
|
S(this, "args");
|
|
@@ -715,7 +728,7 @@ class L {
|
|
|
715
728
|
getNamedAccessor(e) {
|
|
716
729
|
return H(
|
|
717
730
|
this.ctx.getAccessorHandleByName(e),
|
|
718
|
-
(
|
|
731
|
+
(n) => new v(n, [e])
|
|
719
732
|
);
|
|
720
733
|
}
|
|
721
734
|
get prerun() {
|
|
@@ -729,11 +742,11 @@ class L {
|
|
|
729
742
|
* @returns a map of axis value => label
|
|
730
743
|
*/
|
|
731
744
|
findLabels(e) {
|
|
732
|
-
const
|
|
733
|
-
for (const r of
|
|
745
|
+
const n = this.resultPool.getData();
|
|
746
|
+
for (const r of n.entries) {
|
|
734
747
|
if (!X(r.obj)) continue;
|
|
735
|
-
const
|
|
736
|
-
if (
|
|
748
|
+
const i = r.obj.spec;
|
|
749
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && q(e.domain, i.axesSpec[0].domain)) {
|
|
737
750
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
738
751
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
739
752
|
return Object.fromEntries(
|
|
@@ -745,28 +758,28 @@ class L {
|
|
|
745
758
|
}
|
|
746
759
|
}
|
|
747
760
|
verifyInlineColumnsSupport(e) {
|
|
748
|
-
var
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
761
|
+
var i;
|
|
762
|
+
const n = e.some((s) => !(s.data instanceof v)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === !0;
|
|
763
|
+
if (n && !r) throw Error("inline columns not supported");
|
|
751
764
|
}
|
|
752
765
|
createPFrame(e) {
|
|
753
766
|
return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
|
|
754
|
-
e.map((
|
|
767
|
+
e.map((n) => j(n, (r) => r instanceof v ? r.handle : r))
|
|
755
768
|
);
|
|
756
769
|
}
|
|
757
770
|
createPTable(e) {
|
|
758
|
-
var
|
|
759
|
-
return "columns" in e ?
|
|
771
|
+
var n;
|
|
772
|
+
return "columns" in e ? n = {
|
|
760
773
|
src: {
|
|
761
774
|
type: "full",
|
|
762
775
|
entries: e.columns.map((r) => ({ type: "column", column: r }))
|
|
763
776
|
},
|
|
764
777
|
filters: e.filters ?? [],
|
|
765
778
|
sorting: e.sorting ?? []
|
|
766
|
-
} :
|
|
779
|
+
} : n = e, this.verifyInlineColumnsSupport(ye(n.src)), this.ctx.createPTable(
|
|
767
780
|
be(
|
|
768
|
-
|
|
769
|
-
(r) => j(r, (
|
|
781
|
+
n,
|
|
782
|
+
(r) => j(r, (i) => i instanceof v ? i.handle : i)
|
|
770
783
|
)
|
|
771
784
|
);
|
|
772
785
|
}
|
|
@@ -779,93 +792,93 @@ class L {
|
|
|
779
792
|
return this.ctx.getCurrentUnstableMarker();
|
|
780
793
|
}
|
|
781
794
|
}
|
|
782
|
-
const k = "PColumnData/", z = k + "ResourceMap", Y = k + "Partitioned/ResourceMap", te = k + "JsonPartitioned", $ = k + "BinaryPartitioned", ce = k + "Partitioned/", ne = ce + "JsonPartitioned",
|
|
783
|
-
function de(
|
|
784
|
-
if (
|
|
785
|
-
switch (
|
|
795
|
+
const k = "PColumnData/", z = k + "ResourceMap", Y = k + "Partitioned/ResourceMap", te = k + "JsonPartitioned", $ = k + "BinaryPartitioned", ce = k + "Partitioned/", ne = ce + "JsonPartitioned", G = ce + "BinaryPartitioned";
|
|
796
|
+
function de(t, e, n, r = [], i) {
|
|
797
|
+
if (t === void 0) return !1;
|
|
798
|
+
switch (t.resourceType.name) {
|
|
786
799
|
case z: {
|
|
787
|
-
let
|
|
788
|
-
for (const o of
|
|
789
|
-
const l =
|
|
790
|
-
u === void 0 && (
|
|
800
|
+
let s = t.getInputsLocked();
|
|
801
|
+
for (const o of t.listInputFields()) {
|
|
802
|
+
const l = t.resolve({ field: o, assertFieldType: "Input" }), a = [...r, ...JSON.parse(o)], u = l === void 0 ? void 0 : e(l);
|
|
803
|
+
u === void 0 && (s = !1), (u !== void 0 || i) && n.push({ key: a, value: u });
|
|
791
804
|
}
|
|
792
|
-
return
|
|
805
|
+
return s;
|
|
793
806
|
}
|
|
794
807
|
case Y: {
|
|
795
|
-
let
|
|
796
|
-
for (const o of
|
|
797
|
-
const l =
|
|
798
|
-
if (l === void 0)
|
|
808
|
+
let s = t.getInputsLocked();
|
|
809
|
+
for (const o of t.listInputFields()) {
|
|
810
|
+
const l = t.resolve({ field: o, assertFieldType: "Input" });
|
|
811
|
+
if (l === void 0) s = !1;
|
|
799
812
|
else {
|
|
800
813
|
const a = [...r, ...JSON.parse(o)], u = de(
|
|
801
814
|
l,
|
|
802
815
|
e,
|
|
803
|
-
|
|
816
|
+
n,
|
|
804
817
|
a,
|
|
805
|
-
|
|
818
|
+
i
|
|
806
819
|
);
|
|
807
|
-
|
|
820
|
+
s = s && u;
|
|
808
821
|
}
|
|
809
822
|
}
|
|
810
|
-
return
|
|
823
|
+
return s;
|
|
811
824
|
}
|
|
812
825
|
default:
|
|
813
|
-
throw new Error(`Unknown resource type: ${
|
|
826
|
+
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
814
827
|
}
|
|
815
828
|
}
|
|
816
|
-
function
|
|
829
|
+
function bt(t, e, n = !1) {
|
|
817
830
|
const r = [];
|
|
818
|
-
return { isComplete: de(
|
|
831
|
+
return { isComplete: de(t, e, r, [], n), data: r };
|
|
819
832
|
}
|
|
820
|
-
const re = (
|
|
821
|
-
if (!
|
|
822
|
-
if (
|
|
823
|
-
return
|
|
824
|
-
throw Error(`key must ends on .index/.values for binary p-column, got: ${
|
|
833
|
+
const re = (t) => {
|
|
834
|
+
if (!t.endsWith(".index")) {
|
|
835
|
+
if (t.endsWith(".values"))
|
|
836
|
+
return t.substring(0, t.length - 7);
|
|
837
|
+
throw Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
825
838
|
}
|
|
826
839
|
};
|
|
827
|
-
function
|
|
828
|
-
if (!
|
|
829
|
-
const e =
|
|
830
|
-
let
|
|
840
|
+
function Le(t) {
|
|
841
|
+
if (!t) return;
|
|
842
|
+
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
843
|
+
let i = 0;
|
|
831
844
|
switch (e) {
|
|
832
845
|
case z:
|
|
833
|
-
|
|
846
|
+
i = n.keyLength;
|
|
834
847
|
break;
|
|
835
848
|
case Y:
|
|
836
|
-
|
|
849
|
+
i = n.partitionKeyLength + n.keyLength;
|
|
837
850
|
break;
|
|
838
851
|
case te:
|
|
839
852
|
case $:
|
|
840
|
-
|
|
853
|
+
i = n.partitionKeyLength;
|
|
841
854
|
break;
|
|
842
|
-
case
|
|
855
|
+
case G:
|
|
843
856
|
case ne:
|
|
844
|
-
|
|
857
|
+
i = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
845
858
|
break;
|
|
846
859
|
}
|
|
847
860
|
switch (e) {
|
|
848
861
|
case z:
|
|
849
862
|
case te:
|
|
850
863
|
case $:
|
|
851
|
-
for (let
|
|
864
|
+
for (let s of t.listInputFields()) {
|
|
852
865
|
if (e === $) {
|
|
853
|
-
const l = re(
|
|
854
|
-
if (l)
|
|
866
|
+
const l = re(s);
|
|
867
|
+
if (l) s = l;
|
|
855
868
|
else continue;
|
|
856
869
|
}
|
|
857
|
-
const o = [...JSON.parse(
|
|
870
|
+
const o = [...JSON.parse(s)];
|
|
858
871
|
r.push(o);
|
|
859
872
|
}
|
|
860
873
|
break;
|
|
861
874
|
case Y:
|
|
862
|
-
case
|
|
875
|
+
case G:
|
|
863
876
|
case ne:
|
|
864
|
-
for (const
|
|
865
|
-
const o = [...JSON.parse(
|
|
877
|
+
for (const s of t.listInputFields()) {
|
|
878
|
+
const o = [...JSON.parse(s)], l = t.resolve({ field: s, assertFieldType: "Input" });
|
|
866
879
|
if (l !== void 0)
|
|
867
880
|
for (let a of l.listInputFields()) {
|
|
868
|
-
if (e ===
|
|
881
|
+
if (e === G) {
|
|
869
882
|
const h = re(a);
|
|
870
883
|
if (h) a = h;
|
|
871
884
|
else continue;
|
|
@@ -876,78 +889,78 @@ function Ee(n) {
|
|
|
876
889
|
}
|
|
877
890
|
break;
|
|
878
891
|
}
|
|
879
|
-
return { data: r, keyLength:
|
|
892
|
+
return { data: r, keyLength: i };
|
|
880
893
|
}
|
|
881
|
-
function
|
|
882
|
-
const e =
|
|
894
|
+
function vt(t) {
|
|
895
|
+
const e = Le(t);
|
|
883
896
|
if (!e) return;
|
|
884
|
-
const { data:
|
|
885
|
-
for (let
|
|
886
|
-
|
|
887
|
-
for (const
|
|
888
|
-
if (
|
|
897
|
+
const { data: n, keyLength: r } = e, i = [];
|
|
898
|
+
for (let s = 0; s < r; ++s)
|
|
899
|
+
i.push(/* @__PURE__ */ new Set());
|
|
900
|
+
for (const s of n) {
|
|
901
|
+
if (s.length !== r)
|
|
889
902
|
throw new Error("key length does not match partition length");
|
|
890
903
|
for (let o = 0; o < r; ++o)
|
|
891
|
-
|
|
904
|
+
i[o].add(s[o]);
|
|
892
905
|
}
|
|
893
|
-
return
|
|
906
|
+
return i.map((s) => Array.from(s.values()));
|
|
894
907
|
}
|
|
895
|
-
const
|
|
896
|
-
function
|
|
897
|
-
return
|
|
908
|
+
const T = "1.22.2";
|
|
909
|
+
function Ee(t) {
|
|
910
|
+
return t.__renderLambda === !0;
|
|
898
911
|
}
|
|
899
|
-
function
|
|
900
|
-
if (
|
|
901
|
-
return
|
|
912
|
+
function K(t) {
|
|
913
|
+
if (t !== void 0)
|
|
914
|
+
return Ee(t) ? t.handle : t;
|
|
902
915
|
}
|
|
903
|
-
function
|
|
904
|
-
if (
|
|
905
|
-
return typeof
|
|
916
|
+
function C(t) {
|
|
917
|
+
if (t !== void 0)
|
|
918
|
+
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
906
919
|
}
|
|
907
|
-
function
|
|
908
|
-
if (
|
|
920
|
+
function _t(t) {
|
|
921
|
+
if (t.v3 !== void 0) {
|
|
909
922
|
const {
|
|
910
923
|
initialArgs: e,
|
|
911
|
-
initialUiState:
|
|
924
|
+
initialUiState: n,
|
|
912
925
|
inputsValid: r,
|
|
913
|
-
outputs:
|
|
914
|
-
renderingMode:
|
|
926
|
+
outputs: i,
|
|
927
|
+
renderingMode: s,
|
|
915
928
|
sdkVersion: o,
|
|
916
929
|
sections: l,
|
|
917
930
|
title: a
|
|
918
|
-
} =
|
|
931
|
+
} = t.v3, { code: u } = t;
|
|
919
932
|
return {
|
|
920
933
|
initialArgs: e,
|
|
921
|
-
initialUiState:
|
|
934
|
+
initialUiState: n,
|
|
922
935
|
inputsValid: r,
|
|
923
|
-
outputs:
|
|
924
|
-
renderingMode:
|
|
936
|
+
outputs: i,
|
|
937
|
+
renderingMode: s,
|
|
925
938
|
sdkVersion: o,
|
|
926
939
|
sections: l,
|
|
927
940
|
title: a,
|
|
928
941
|
code: u
|
|
929
942
|
};
|
|
930
|
-
} else if (
|
|
931
|
-
const { sdkVersion: e, renderingMode:
|
|
932
|
-
if (e === void 0 ||
|
|
943
|
+
} else if (t.inputsValid !== void 0) {
|
|
944
|
+
const { sdkVersion: e, renderingMode: n, outputs: r, inputsValid: i, sections: s, initialArgs: o, code: l } = t, a = Object.keys(t);
|
|
945
|
+
if (e === void 0 || n === void 0 || r === void 0 || i === void 0 || s === void 0 || o === void 0)
|
|
933
946
|
throw new Error(
|
|
934
947
|
`Malformed config v2. SDK version ${e}; Fields = ${a.join(", ")}`
|
|
935
948
|
);
|
|
936
949
|
return {
|
|
937
950
|
sdkVersion: e,
|
|
938
|
-
renderingMode:
|
|
951
|
+
renderingMode: n,
|
|
939
952
|
initialArgs: o,
|
|
940
953
|
outputs: Object.fromEntries(
|
|
941
|
-
Object.entries(r).map(([u, h]) => [u,
|
|
954
|
+
Object.entries(r).map(([u, h]) => [u, C(h)])
|
|
942
955
|
),
|
|
943
|
-
inputsValid:
|
|
944
|
-
sections:
|
|
956
|
+
inputsValid: C(i),
|
|
957
|
+
sections: C(s),
|
|
945
958
|
initialUiState: void 0,
|
|
946
959
|
code: l
|
|
947
960
|
};
|
|
948
|
-
} else if (
|
|
949
|
-
const { sdkVersion: e, canRun:
|
|
950
|
-
if (r === void 0 ||
|
|
961
|
+
} else if (t.renderingMode !== void 0) {
|
|
962
|
+
const { sdkVersion: e, canRun: n, renderingMode: r, outputs: i, sections: s, initialArgs: o, code: l } = t, a = Object.keys(t);
|
|
963
|
+
if (r === void 0 || i === void 0 || n === void 0 || s === void 0 || o === void 0)
|
|
951
964
|
throw new Error(
|
|
952
965
|
`Malformed config v1. SDK version ${e}; Fields = ${a.join(", ")}`
|
|
953
966
|
);
|
|
@@ -956,26 +969,26 @@ function vt(n) {
|
|
|
956
969
|
renderingMode: r,
|
|
957
970
|
initialArgs: o,
|
|
958
971
|
outputs: Object.fromEntries(
|
|
959
|
-
Object.entries(
|
|
972
|
+
Object.entries(i).map(([u, h]) => [u, C(h)])
|
|
960
973
|
),
|
|
961
|
-
inputsValid:
|
|
962
|
-
sections:
|
|
974
|
+
inputsValid: C(n),
|
|
975
|
+
sections: C(s),
|
|
963
976
|
initialUiState: void 0,
|
|
964
977
|
code: l
|
|
965
978
|
};
|
|
966
979
|
} else {
|
|
967
|
-
const { sdkVersion: e } =
|
|
980
|
+
const { sdkVersion: e } = t, n = Object.keys(t);
|
|
968
981
|
throw new Error(
|
|
969
|
-
`Config format not supported: SDK = ${e}; Fields = ${
|
|
982
|
+
`Config format not supported: SDK = ${e}; Fields = ${n.join(", ")}`
|
|
970
983
|
);
|
|
971
984
|
}
|
|
972
985
|
}
|
|
973
|
-
class
|
|
974
|
-
constructor(e,
|
|
975
|
-
this._renderingMode = e, this._initialArgs =
|
|
986
|
+
class _ {
|
|
987
|
+
constructor(e, n, r, i, s, o, l) {
|
|
988
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = i, this._inputsValid = s, this._sections = o, this._title = l;
|
|
976
989
|
}
|
|
977
990
|
static create(e = "Heavy") {
|
|
978
|
-
return new
|
|
991
|
+
return new _(
|
|
979
992
|
e,
|
|
980
993
|
void 0,
|
|
981
994
|
{},
|
|
@@ -985,10 +998,10 @@ class v {
|
|
|
985
998
|
void 0
|
|
986
999
|
);
|
|
987
1000
|
}
|
|
988
|
-
output(e,
|
|
989
|
-
if (typeof
|
|
990
|
-
const
|
|
991
|
-
return
|
|
1001
|
+
output(e, n, r = {}) {
|
|
1002
|
+
if (typeof n == "function") {
|
|
1003
|
+
const i = `output#${e}`;
|
|
1004
|
+
return L(i, () => n(new E())), new _(
|
|
992
1005
|
this._renderingMode,
|
|
993
1006
|
this._initialArgs,
|
|
994
1007
|
this._initialUiState,
|
|
@@ -996,7 +1009,7 @@ class v {
|
|
|
996
1009
|
...this._outputs,
|
|
997
1010
|
[e]: {
|
|
998
1011
|
__renderLambda: !0,
|
|
999
|
-
handle:
|
|
1012
|
+
handle: i,
|
|
1000
1013
|
...r
|
|
1001
1014
|
}
|
|
1002
1015
|
},
|
|
@@ -1005,13 +1018,13 @@ class v {
|
|
|
1005
1018
|
this._title
|
|
1006
1019
|
);
|
|
1007
1020
|
} else
|
|
1008
|
-
return new
|
|
1021
|
+
return new _(
|
|
1009
1022
|
this._renderingMode,
|
|
1010
1023
|
this._initialArgs,
|
|
1011
1024
|
this._initialUiState,
|
|
1012
1025
|
{
|
|
1013
1026
|
...this._outputs,
|
|
1014
|
-
[e]:
|
|
1027
|
+
[e]: n
|
|
1015
1028
|
},
|
|
1016
1029
|
this._inputsValid,
|
|
1017
1030
|
this._sections,
|
|
@@ -1019,11 +1032,11 @@ class v {
|
|
|
1019
1032
|
);
|
|
1020
1033
|
}
|
|
1021
1034
|
/** Shortcut for {@link output} with retentive flag set to true. */
|
|
1022
|
-
retentiveOutput(e,
|
|
1023
|
-
return this.output(e,
|
|
1035
|
+
retentiveOutput(e, n) {
|
|
1036
|
+
return this.output(e, n, { retentive: !0 });
|
|
1024
1037
|
}
|
|
1025
1038
|
argsValid(e) {
|
|
1026
|
-
return typeof e == "function" ? (
|
|
1039
|
+
return typeof e == "function" ? (L("inputsValid", () => e(new E())), new _(
|
|
1027
1040
|
this._renderingMode,
|
|
1028
1041
|
this._initialArgs,
|
|
1029
1042
|
this._initialUiState,
|
|
@@ -1034,7 +1047,7 @@ class v {
|
|
|
1034
1047
|
},
|
|
1035
1048
|
this._sections,
|
|
1036
1049
|
this._title
|
|
1037
|
-
)) : new
|
|
1050
|
+
)) : new _(
|
|
1038
1051
|
this._renderingMode,
|
|
1039
1052
|
this._initialArgs,
|
|
1040
1053
|
this._initialUiState,
|
|
@@ -1045,7 +1058,7 @@ class v {
|
|
|
1045
1058
|
);
|
|
1046
1059
|
}
|
|
1047
1060
|
sections(e) {
|
|
1048
|
-
return Array.isArray(e) ? this.sections(V(e)) : typeof e == "function" ? (
|
|
1061
|
+
return Array.isArray(e) ? this.sections(V(e)) : typeof e == "function" ? (L("sections", () => e(new E())), new _(
|
|
1049
1062
|
this._renderingMode,
|
|
1050
1063
|
this._initialArgs,
|
|
1051
1064
|
this._initialUiState,
|
|
@@ -1053,7 +1066,7 @@ class v {
|
|
|
1053
1066
|
this._inputsValid,
|
|
1054
1067
|
{ __renderLambda: !0, handle: "sections" },
|
|
1055
1068
|
this._title
|
|
1056
|
-
)) : new
|
|
1069
|
+
)) : new _(
|
|
1057
1070
|
this._renderingMode,
|
|
1058
1071
|
this._initialArgs,
|
|
1059
1072
|
this._initialUiState,
|
|
@@ -1065,7 +1078,7 @@ class v {
|
|
|
1065
1078
|
}
|
|
1066
1079
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1067
1080
|
title(e) {
|
|
1068
|
-
return
|
|
1081
|
+
return L("title", () => e(new E())), new _(
|
|
1069
1082
|
this._renderingMode,
|
|
1070
1083
|
this._initialArgs,
|
|
1071
1084
|
this._initialUiState,
|
|
@@ -1080,7 +1093,7 @@ class v {
|
|
|
1080
1093
|
* @deprecated use {@link withArgs}
|
|
1081
1094
|
* */
|
|
1082
1095
|
initialArgs(e) {
|
|
1083
|
-
return new
|
|
1096
|
+
return new _(
|
|
1084
1097
|
this._renderingMode,
|
|
1085
1098
|
e,
|
|
1086
1099
|
this._initialUiState,
|
|
@@ -1092,7 +1105,7 @@ class v {
|
|
|
1092
1105
|
}
|
|
1093
1106
|
/** Sets initial args for the block, this value must be specified. */
|
|
1094
1107
|
withArgs(e) {
|
|
1095
|
-
return new
|
|
1108
|
+
return new _(
|
|
1096
1109
|
this._renderingMode,
|
|
1097
1110
|
e,
|
|
1098
1111
|
this._initialUiState,
|
|
@@ -1104,7 +1117,7 @@ class v {
|
|
|
1104
1117
|
}
|
|
1105
1118
|
/** Defines type and sets initial value for block UiState. */
|
|
1106
1119
|
withUiState(e) {
|
|
1107
|
-
return new
|
|
1120
|
+
return new _(
|
|
1108
1121
|
this._renderingMode,
|
|
1109
1122
|
this._initialArgs,
|
|
1110
1123
|
e,
|
|
@@ -1121,7 +1134,7 @@ class v {
|
|
|
1121
1134
|
if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
|
|
1122
1135
|
const e = {
|
|
1123
1136
|
v3: {
|
|
1124
|
-
sdkVersion:
|
|
1137
|
+
sdkVersion: T,
|
|
1125
1138
|
renderingMode: this._renderingMode,
|
|
1126
1139
|
initialArgs: this._initialArgs,
|
|
1127
1140
|
initialUiState: this._initialUiState,
|
|
@@ -1131,22 +1144,22 @@ class v {
|
|
|
1131
1144
|
outputs: this._outputs
|
|
1132
1145
|
},
|
|
1133
1146
|
// fields below are added to allow previous desktop versions read generated configs
|
|
1134
|
-
sdkVersion:
|
|
1147
|
+
sdkVersion: T,
|
|
1135
1148
|
renderingMode: this._renderingMode,
|
|
1136
1149
|
initialArgs: this._initialArgs,
|
|
1137
|
-
inputsValid:
|
|
1138
|
-
sections:
|
|
1150
|
+
inputsValid: K(this._inputsValid),
|
|
1151
|
+
sections: K(this._sections),
|
|
1139
1152
|
outputs: Object.fromEntries(
|
|
1140
|
-
Object.entries(this._outputs).map(([
|
|
1153
|
+
Object.entries(this._outputs).map(([n, r]) => [n, K(r)])
|
|
1141
1154
|
)
|
|
1142
1155
|
};
|
|
1143
|
-
return Se() ? oe({ sdkVersion:
|
|
1156
|
+
return Se() ? oe({ sdkVersion: T }) : { config: e };
|
|
1144
1157
|
}
|
|
1145
1158
|
}
|
|
1146
|
-
function
|
|
1159
|
+
function St(t, e, n, r) {
|
|
1147
1160
|
var u, h;
|
|
1148
1161
|
Array.isArray(r) && (r = { filters: r });
|
|
1149
|
-
const
|
|
1162
|
+
const i = t.resultPool.getData().entries.map((d) => d.obj).filter(X).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), s = (d, p) => {
|
|
1150
1163
|
let g = d.toString();
|
|
1151
1164
|
if (p)
|
|
1152
1165
|
for (const f in p)
|
|
@@ -1155,28 +1168,28 @@ function _t(n, e, t, r) {
|
|
|
1155
1168
|
}, o = /* @__PURE__ */ new Map();
|
|
1156
1169
|
for (const d of e)
|
|
1157
1170
|
for (const p of d.spec.axesSpec) {
|
|
1158
|
-
const g =
|
|
1159
|
-
for (const f of
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1171
|
+
const g = U(p);
|
|
1172
|
+
for (const f of i) {
|
|
1173
|
+
const A = f.spec.axesSpec[0], y = U(f.spec.axesSpec[0]);
|
|
1174
|
+
if (x(g, y)) {
|
|
1162
1175
|
const I = Object.keys(g.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
|
|
1163
1176
|
if (I > D) {
|
|
1164
|
-
const
|
|
1165
|
-
o.set(
|
|
1166
|
-
id:
|
|
1177
|
+
const R = s(f.id, g.domain);
|
|
1178
|
+
o.set(R, {
|
|
1179
|
+
id: R,
|
|
1167
1180
|
spec: {
|
|
1168
1181
|
...f.spec,
|
|
1169
|
-
axesSpec: [{ ...g, annotations:
|
|
1182
|
+
axesSpec: [{ ...g, annotations: A.annotations }]
|
|
1170
1183
|
},
|
|
1171
1184
|
data: f.data
|
|
1172
1185
|
});
|
|
1173
1186
|
} else
|
|
1174
|
-
o.set(
|
|
1187
|
+
o.set(s(f.id), f);
|
|
1175
1188
|
}
|
|
1176
1189
|
}
|
|
1177
1190
|
}
|
|
1178
1191
|
if ([...e, ...o.values()].some(
|
|
1179
|
-
(d) => d.data instanceof
|
|
1192
|
+
(d) => d.data instanceof v && !d.data.getIsReadyOrError()
|
|
1180
1193
|
))
|
|
1181
1194
|
return;
|
|
1182
1195
|
let l = e;
|
|
@@ -1186,7 +1199,7 @@ function _t(n, e, t, r) {
|
|
|
1186
1199
|
for (const d of e)
|
|
1187
1200
|
r.coreColumnPredicate(d.spec) ? l.push(d) : a.push(d);
|
|
1188
1201
|
}
|
|
1189
|
-
return a.push(...o.values()),
|
|
1202
|
+
return a.push(...o.values()), t.createPTable({
|
|
1190
1203
|
src: {
|
|
1191
1204
|
type: "outer",
|
|
1192
1205
|
primary: {
|
|
@@ -1195,47 +1208,47 @@ function _t(n, e, t, r) {
|
|
|
1195
1208
|
},
|
|
1196
1209
|
secondary: a.map((d) => ({ type: "column", column: d }))
|
|
1197
1210
|
},
|
|
1198
|
-
filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u =
|
|
1199
|
-
sorting: ((h =
|
|
1211
|
+
filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
|
|
1212
|
+
sorting: ((h = n == null ? void 0 : n.pTableParams) == null ? void 0 : h.sorting) ?? []
|
|
1200
1213
|
});
|
|
1201
1214
|
}
|
|
1202
|
-
function
|
|
1203
|
-
const r =
|
|
1215
|
+
function wt(t, e, n) {
|
|
1216
|
+
const r = t.findLabels(e);
|
|
1204
1217
|
return {
|
|
1205
1218
|
axis: e,
|
|
1206
|
-
options:
|
|
1207
|
-
value:
|
|
1208
|
-
label: (r == null ? void 0 : r[
|
|
1219
|
+
options: n.map((i) => ({
|
|
1220
|
+
value: i,
|
|
1221
|
+
label: (r == null ? void 0 : r[i]) ?? i.toString()
|
|
1209
1222
|
})),
|
|
1210
|
-
defaultValue:
|
|
1223
|
+
defaultValue: n[0]
|
|
1211
1224
|
};
|
|
1212
1225
|
}
|
|
1213
|
-
const Ve = (
|
|
1214
|
-
let
|
|
1226
|
+
const Ve = (t, e) => {
|
|
1227
|
+
let n = t.toString();
|
|
1215
1228
|
return e == null || e.forEach((r) => {
|
|
1216
1229
|
if (r)
|
|
1217
|
-
for (const [
|
|
1218
|
-
|
|
1219
|
-
}),
|
|
1230
|
+
for (const [i, s] of Object.entries(r))
|
|
1231
|
+
n += i, n += s;
|
|
1232
|
+
}), n;
|
|
1220
1233
|
};
|
|
1221
|
-
function je(
|
|
1222
|
-
if (!
|
|
1234
|
+
function je(t) {
|
|
1235
|
+
if (!t.length)
|
|
1223
1236
|
return [];
|
|
1224
1237
|
let e = [[]];
|
|
1225
|
-
return
|
|
1238
|
+
return t.forEach((n) => {
|
|
1226
1239
|
const r = [];
|
|
1227
|
-
|
|
1228
|
-
r.push(...e.map((
|
|
1240
|
+
n.forEach((i) => {
|
|
1241
|
+
r.push(...e.map((s) => [...s, i]));
|
|
1229
1242
|
}), e = r;
|
|
1230
1243
|
}), e;
|
|
1231
1244
|
}
|
|
1232
|
-
function
|
|
1233
|
-
const
|
|
1234
|
-
if (r.every((a) =>
|
|
1245
|
+
function ie(t, e) {
|
|
1246
|
+
const n = t.spec.axesSpec.map(U), r = e.spec.axesSpec.map(U);
|
|
1247
|
+
if (r.every((a) => n.some((u) => x(u, a) && x(a, u))))
|
|
1235
1248
|
return [];
|
|
1236
|
-
if (!r.every((a) =>
|
|
1249
|
+
if (!r.every((a) => n.some((u) => x(u, a))))
|
|
1237
1250
|
return [];
|
|
1238
|
-
const o = r.map((a) =>
|
|
1251
|
+
const o = r.map((a) => n.filter((u) => x(u, a)));
|
|
1239
1252
|
return je(o).map((a) => ({
|
|
1240
1253
|
id: Ve(e.id, a.map((h) => h.domain)),
|
|
1241
1254
|
spec: {
|
|
@@ -1248,24 +1261,24 @@ function se(n, e) {
|
|
|
1248
1261
|
data: e.data
|
|
1249
1262
|
}));
|
|
1250
1263
|
}
|
|
1251
|
-
function
|
|
1264
|
+
function Ue(t) {
|
|
1252
1265
|
const e = [];
|
|
1253
|
-
for (let
|
|
1254
|
-
for (let r =
|
|
1255
|
-
const
|
|
1266
|
+
for (let n = 0; n < t.length; n++)
|
|
1267
|
+
for (let r = n + 1; r < t.length; r++) {
|
|
1268
|
+
const i = t[n], s = t[r];
|
|
1256
1269
|
e.push(
|
|
1257
|
-
...
|
|
1258
|
-
...
|
|
1270
|
+
...ie(i, s),
|
|
1271
|
+
...ie(s, i)
|
|
1259
1272
|
);
|
|
1260
1273
|
}
|
|
1261
1274
|
return e;
|
|
1262
1275
|
}
|
|
1263
|
-
function
|
|
1264
|
-
const
|
|
1265
|
-
if (!
|
|
1266
|
-
(r) => r.data instanceof
|
|
1276
|
+
function At(t, e) {
|
|
1277
|
+
const n = [...e, ...Ue(e)];
|
|
1278
|
+
if (!n.some(
|
|
1279
|
+
(r) => r.data instanceof v && !r.data.getIsReadyOrError()
|
|
1267
1280
|
))
|
|
1268
|
-
return
|
|
1281
|
+
return t.createPFrame(n);
|
|
1269
1282
|
}
|
|
1270
1283
|
class Ct {
|
|
1271
1284
|
constructor(e) {
|
|
@@ -1287,95 +1300,96 @@ class Ct {
|
|
|
1287
1300
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1288
1301
|
}
|
|
1289
1302
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1303
|
+
function Be(t) {
|
|
1304
|
+
return se({
|
|
1292
1305
|
__isRef: !0,
|
|
1293
|
-
blockId:
|
|
1294
|
-
name:
|
|
1306
|
+
blockId: B(t, "blockId"),
|
|
1307
|
+
name: B(t, "name")
|
|
1295
1308
|
});
|
|
1296
1309
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return
|
|
1299
|
-
ref:
|
|
1300
|
-
label:
|
|
1310
|
+
function Pt(t) {
|
|
1311
|
+
return se({
|
|
1312
|
+
ref: Be(B(t, "ref")),
|
|
1313
|
+
label: B(t, "label")
|
|
1301
1314
|
});
|
|
1302
1315
|
}
|
|
1303
|
-
const
|
|
1304
|
-
sdkVersion:
|
|
1316
|
+
const It = {
|
|
1317
|
+
sdkVersion: T
|
|
1305
1318
|
};
|
|
1306
|
-
function
|
|
1307
|
-
return oe({ sdkVersion:
|
|
1319
|
+
function Rt() {
|
|
1320
|
+
return oe({ sdkVersion: T });
|
|
1308
1321
|
}
|
|
1309
|
-
function Ft(
|
|
1322
|
+
function Ft(t) {
|
|
1310
1323
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
1311
|
-
return globalThis.getEnvironmentValue(
|
|
1324
|
+
return globalThis.getEnvironmentValue(t);
|
|
1312
1325
|
}
|
|
1313
1326
|
export {
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1327
|
+
Ke as Args,
|
|
1328
|
+
_ as BlockModel,
|
|
1329
|
+
It as CurrentSdkInfo,
|
|
1330
|
+
b as FutureRef,
|
|
1318
1331
|
He as It,
|
|
1319
|
-
|
|
1332
|
+
yt as JsRenderInternal,
|
|
1320
1333
|
We as MainOutputs,
|
|
1321
1334
|
ve as OutputError,
|
|
1322
1335
|
Ie as PAnnotationLabel,
|
|
1323
|
-
|
|
1336
|
+
Re as PAnnotationTrace,
|
|
1324
1337
|
Ct as PFrameImpl,
|
|
1325
1338
|
$ as RT_BINARY_PARTITIONED,
|
|
1326
|
-
|
|
1339
|
+
G as RT_BINARY_SUPER_PARTITIONED,
|
|
1327
1340
|
te as RT_JSON_PARTITIONED,
|
|
1328
1341
|
ne as RT_JSON_SUPER_PARTITIONED,
|
|
1329
1342
|
z as RT_RESOURCE_MAP,
|
|
1330
1343
|
Y as RT_RESOURCE_MAP_PARTITIONED,
|
|
1331
|
-
|
|
1344
|
+
E as RenderCtx,
|
|
1332
1345
|
De as ResultPool,
|
|
1333
1346
|
qe as StagingOutputs,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1347
|
+
xe as Trace,
|
|
1348
|
+
Fe as TraceEntry,
|
|
1349
|
+
v as TreeNodeAccessor,
|
|
1337
1350
|
ze as UiState,
|
|
1338
1351
|
nt as and,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1352
|
+
At as createPFrameForGraphs,
|
|
1353
|
+
St as createPlDataTable,
|
|
1354
|
+
wt as createPlDataTableSheet,
|
|
1342
1355
|
ke as deriveLabels,
|
|
1343
|
-
|
|
1344
|
-
|
|
1356
|
+
K as downgradeCfgOrLambda,
|
|
1357
|
+
pt as extractArchiveAndGetURL,
|
|
1358
|
+
_t as extractConfig,
|
|
1345
1359
|
Ze as flatten,
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1360
|
+
Pt as fromPlOption,
|
|
1361
|
+
Be as fromPlRef,
|
|
1362
|
+
Ue as getAdditionalColumns,
|
|
1349
1363
|
at as getBlobContent,
|
|
1350
1364
|
ut as getBlobContentAsJson,
|
|
1351
1365
|
lt as getBlobContentAsString,
|
|
1352
1366
|
ct as getDownloadedBlobContent,
|
|
1353
1367
|
Ft as getEnvironmentValue,
|
|
1354
|
-
|
|
1368
|
+
O as getFromCfg,
|
|
1355
1369
|
V as getImmediate,
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1370
|
+
ft as getImportProgress,
|
|
1371
|
+
B as getJsonField,
|
|
1372
|
+
ht as getLastLogs,
|
|
1373
|
+
mt as getLogHandle,
|
|
1360
1374
|
dt as getOnDemandBlobContent,
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1375
|
+
Le as getPartitionKeysList,
|
|
1376
|
+
gt as getProgressLog,
|
|
1377
|
+
Rt as getRawPlatformaInstance,
|
|
1378
|
+
it as getResourceField,
|
|
1379
|
+
st as getResourceValueAsJson,
|
|
1380
|
+
vt as getUniquePartitionKeys,
|
|
1367
1381
|
H as ifDef,
|
|
1368
|
-
|
|
1382
|
+
Ee as isConfigLambda,
|
|
1369
1383
|
et as isEmpty,
|
|
1370
|
-
|
|
1384
|
+
Ge as isolate,
|
|
1371
1385
|
Ye as makeArray,
|
|
1372
|
-
|
|
1386
|
+
se as makeObject,
|
|
1373
1387
|
Qe as mapArrayValues,
|
|
1374
1388
|
Xe as mapRecordValues,
|
|
1375
1389
|
ot as mapResourceFields,
|
|
1376
1390
|
tt as not,
|
|
1377
1391
|
rt as or,
|
|
1378
|
-
|
|
1392
|
+
bt as parseResourceMap,
|
|
1379
1393
|
_e as readOutput,
|
|
1380
1394
|
$e as wrapOutputs
|
|
1381
1395
|
};
|