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