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