@platforma-sdk/model 1.22.59 → 1.22.97
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 +3 -1
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +291 -254
- package/dist/index.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/PFrameForGraphs.test.ts +61 -18
- package/src/components/PFrameForGraphs.ts +79 -10
package/dist/index.mjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (t, e, n) =>
|
|
4
|
-
import { isPColumn as
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
|
+
var ge = (t, e, n) => e in t ? he(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var S = (t, e, n) => ge(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { isPColumn as N, mapPObjectData as U, mapValueInVOE as me, ensurePColumn as ye, isPColumnSpec as Z, extractAllColumns as be, mapPTableDef as ve, getAxisId as w, matchAxisId as O } from "@milaboratories/pl-model-common";
|
|
5
5
|
export * from "@milaboratories/pl-model-common";
|
|
6
6
|
import { z as P } from "zod";
|
|
7
|
-
class
|
|
7
|
+
class _e extends Error {
|
|
8
8
|
constructor(e, n) {
|
|
9
9
|
super(`${e.length}${n ? "+" : ""} errors, first error: ` + e[0]), this.errors = e, this.moreErrors = n;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (!t.ok) throw new
|
|
12
|
+
function Se(t) {
|
|
13
|
+
if (!t.ok) throw new _e(t.errors, t.moreErrors);
|
|
14
14
|
return t.value;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function qe(t) {
|
|
17
17
|
return new Proxy(t, {
|
|
18
18
|
get(e, n) {
|
|
19
|
-
return
|
|
19
|
+
return Se(e[n]);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function m(t) {
|
|
24
|
-
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ?
|
|
24
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null ? j(t) : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function k(t) {
|
|
27
27
|
return { type: "GetFromCtx", variable: t };
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ze(t) {
|
|
30
30
|
return {
|
|
31
31
|
type: "Isolate",
|
|
32
32
|
cfg: t
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
35
|
+
const Ye = k("$args"), Xe = k("$it"), Qe = k("$prod"), Ze = k("$staging"), et = k("$ui");
|
|
36
|
+
function j(t) {
|
|
37
37
|
return { type: "Immediate", value: t };
|
|
38
38
|
}
|
|
39
39
|
function ie(t) {
|
|
@@ -44,7 +44,7 @@ function ie(t) {
|
|
|
44
44
|
template: e
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function tt(...t) {
|
|
48
48
|
const e = [];
|
|
49
49
|
for (const n of t) e.push(m(n));
|
|
50
50
|
return {
|
|
@@ -59,7 +59,7 @@ function B(t, e) {
|
|
|
59
59
|
field: m(e)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function nt(t, e, n = "$it") {
|
|
63
63
|
return {
|
|
64
64
|
type: "MapRecordValues",
|
|
65
65
|
source: t,
|
|
@@ -67,7 +67,7 @@ function Xe(t, e, n = "$it") {
|
|
|
67
67
|
itVar: n
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function rt(t, e, n = "$it") {
|
|
71
71
|
return {
|
|
72
72
|
type: "MapArrayValues",
|
|
73
73
|
source: t,
|
|
@@ -75,46 +75,46 @@ function Qe(t, e, n = "$it") {
|
|
|
75
75
|
itVar: n
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function st(t) {
|
|
79
79
|
return {
|
|
80
80
|
type: "Flatten",
|
|
81
81
|
source: t
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function it(t) {
|
|
85
85
|
return {
|
|
86
86
|
type: "IsEmpty",
|
|
87
87
|
arg: t
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ot(t) {
|
|
91
91
|
return {
|
|
92
92
|
type: "Not",
|
|
93
93
|
operand: t
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function at(t, e) {
|
|
97
97
|
return {
|
|
98
98
|
type: "And",
|
|
99
99
|
operand1: t,
|
|
100
100
|
operand2: e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function lt(t, e) {
|
|
104
104
|
return {
|
|
105
105
|
type: "Or",
|
|
106
106
|
operand1: t,
|
|
107
107
|
operand2: e
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function ut(t, e) {
|
|
111
111
|
return {
|
|
112
112
|
type: "GetResourceField",
|
|
113
113
|
source: m(t),
|
|
114
114
|
field: m(e)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ct() {
|
|
118
118
|
return function(t) {
|
|
119
119
|
return {
|
|
120
120
|
type: "GetResourceValueAsJson",
|
|
@@ -122,7 +122,7 @@ function it() {
|
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function dt(t, e, n = "$it") {
|
|
126
126
|
return {
|
|
127
127
|
type: "MapResourceFields",
|
|
128
128
|
source: t,
|
|
@@ -130,19 +130,19 @@ function ot(t, e, n = "$it") {
|
|
|
130
130
|
itVar: n
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function pt(t) {
|
|
134
134
|
return {
|
|
135
135
|
type: "GetBlobContent",
|
|
136
136
|
source: m(t)
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function ft(t) {
|
|
140
140
|
return {
|
|
141
141
|
type: "GetBlobContentAsString",
|
|
142
142
|
source: m(t)
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ht() {
|
|
146
146
|
return function(t) {
|
|
147
147
|
return {
|
|
148
148
|
type: "GetBlobContentAsJson",
|
|
@@ -150,59 +150,59 @@ function ut() {
|
|
|
150
150
|
};
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function gt(t) {
|
|
154
154
|
return {
|
|
155
155
|
type: "GetDownloadedBlobContent",
|
|
156
156
|
source: m(t)
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function mt(t) {
|
|
160
160
|
return {
|
|
161
161
|
type: "GetOnDemandBlobContent",
|
|
162
162
|
source: m(t)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function yt(t, e) {
|
|
166
166
|
return {
|
|
167
167
|
type: "ExtractArchiveAndGetURL",
|
|
168
168
|
format: e,
|
|
169
169
|
source: m(t)
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function bt(t) {
|
|
173
173
|
return {
|
|
174
174
|
type: "GetImportProgress",
|
|
175
175
|
source: m(t)
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function vt(t, e) {
|
|
179
179
|
return {
|
|
180
180
|
type: "GetLastLogs",
|
|
181
181
|
source: m(t),
|
|
182
182
|
lines: e
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function _t(t, e) {
|
|
186
186
|
return {
|
|
187
187
|
type: "GetProgressLog",
|
|
188
188
|
source: m(t),
|
|
189
189
|
patternToSearch: e
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function St(t, e) {
|
|
193
193
|
return {
|
|
194
194
|
type: "GetProgressLogWithInfo",
|
|
195
195
|
source: m(t),
|
|
196
196
|
patternToSearch: e
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function At(t) {
|
|
200
200
|
return {
|
|
201
201
|
type: "GetLogHandle",
|
|
202
202
|
source: m(t)
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Ae() {
|
|
206
206
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
207
207
|
}
|
|
208
208
|
function oe(t) {
|
|
@@ -218,24 +218,24 @@ function c() {
|
|
|
218
218
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
219
219
|
throw new Error("Not in config rendering context");
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function E(t, e) {
|
|
222
222
|
const n = we();
|
|
223
223
|
if (n === void 0) return !1;
|
|
224
224
|
if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
225
225
|
return n.callbackRegistry[t] = e, !0;
|
|
226
226
|
}
|
|
227
|
-
const
|
|
228
|
-
function
|
|
227
|
+
const $ = /* @__PURE__ */ new Map();
|
|
228
|
+
function Ie(t, e) {
|
|
229
229
|
t in c().callbackRegistry || (c().callbackRegistry[t] = (n) => {
|
|
230
|
-
for (const r of
|
|
230
|
+
for (const r of $.get(t))
|
|
231
231
|
r(n);
|
|
232
|
-
},
|
|
232
|
+
}, $.set(t, [])), $.get(t).push(e);
|
|
233
233
|
}
|
|
234
234
|
class b {
|
|
235
235
|
constructor(e, n = (r) => r) {
|
|
236
236
|
S(this, "isResolved", !1);
|
|
237
237
|
S(this, "resolvedValue");
|
|
238
|
-
this.handle = e, this.postProcess = n,
|
|
238
|
+
this.handle = e, this.postProcess = n, Ie(e, (r) => {
|
|
239
239
|
this.resolvedValue = n(r), this.isResolved = !0;
|
|
240
240
|
});
|
|
241
241
|
}
|
|
@@ -252,7 +252,7 @@ class b {
|
|
|
252
252
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function H(t, e) {
|
|
256
256
|
return t === void 0 ? void 0 : e(t);
|
|
257
257
|
}
|
|
258
258
|
class v {
|
|
@@ -294,7 +294,7 @@ class v {
|
|
|
294
294
|
...this.resolvePath,
|
|
295
295
|
...n.map((s) => typeof s == "string" ? s : s.field)
|
|
296
296
|
];
|
|
297
|
-
return
|
|
297
|
+
return H(
|
|
298
298
|
c().resolveWithCommon(this.handle, e, ...n),
|
|
299
299
|
(s) => new v(s, r)
|
|
300
300
|
);
|
|
@@ -316,7 +316,7 @@ class v {
|
|
|
316
316
|
}
|
|
317
317
|
getError() {
|
|
318
318
|
const e = [...this.resolvePath, "error"];
|
|
319
|
-
return
|
|
319
|
+
return H(
|
|
320
320
|
c().getError(this.handle),
|
|
321
321
|
(n) => new v(n, e)
|
|
322
322
|
);
|
|
@@ -358,7 +358,7 @@ class v {
|
|
|
358
358
|
getPColumns(e = !1, n = "") {
|
|
359
359
|
const r = this.parsePObjectCollection(e, n);
|
|
360
360
|
return r === void 0 ? void 0 : Object.entries(r).map(([, i]) => {
|
|
361
|
-
if (!
|
|
361
|
+
if (!N(i)) throw new Error(`not a PColumn (kind = ${i.spec.kind})`);
|
|
362
362
|
return i;
|
|
363
363
|
});
|
|
364
364
|
}
|
|
@@ -375,8 +375,8 @@ class v {
|
|
|
375
375
|
if (r === void 0) return;
|
|
376
376
|
const s = {};
|
|
377
377
|
for (const [i, o] of Object.entries(r)) {
|
|
378
|
-
const
|
|
379
|
-
s[i] =
|
|
378
|
+
const a = [...this.resolvePath, i];
|
|
379
|
+
s[i] = U(o, (l) => new v(l, a));
|
|
380
380
|
}
|
|
381
381
|
return s;
|
|
382
382
|
}
|
|
@@ -469,10 +469,10 @@ class v {
|
|
|
469
469
|
}, o = e;
|
|
470
470
|
if (s && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
|
|
471
471
|
return;
|
|
472
|
-
let
|
|
472
|
+
let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
|
|
473
473
|
(u) => [u, this.resolve({ field: u, assertFieldType: r })]
|
|
474
474
|
);
|
|
475
|
-
return i && (
|
|
475
|
+
return i && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => o(u, h));
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
const ae = "staging", le = "main", Ce = {
|
|
@@ -482,73 +482,73 @@ const ae = "staging", le = "main", Ce = {
|
|
|
482
482
|
function ue(t) {
|
|
483
483
|
return typeof t == "object" && t !== null && "__awaited_futures__" in t;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function q(t, e, n) {
|
|
486
486
|
if (e.has(n)) return;
|
|
487
487
|
if (e.add(n), typeof n === "object")
|
|
488
488
|
if (ue(n)) n.__awaited_futures__.forEach((s) => t.add(s));
|
|
489
489
|
else if (Array.isArray(n))
|
|
490
|
-
for (const s of n)
|
|
490
|
+
for (const s of n) q(t, e, s);
|
|
491
491
|
else
|
|
492
492
|
for (const [, s] of Object.entries(n))
|
|
493
|
-
s !== n &&
|
|
493
|
+
s !== n && q(t, e, s);
|
|
494
494
|
}
|
|
495
495
|
function Pe(t) {
|
|
496
496
|
const e = /* @__PURE__ */ new Set();
|
|
497
|
-
return
|
|
497
|
+
return q(e, /* @__PURE__ */ new Set(), t), e;
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
500
500
|
__proto__: null,
|
|
501
501
|
GlobalCfgRenderCtxFeatureFlags: Ce,
|
|
502
502
|
MainAccessorName: le,
|
|
503
503
|
StagingAccessorName: ae,
|
|
504
504
|
getAllFutureAwaits: Pe,
|
|
505
505
|
isFutureAwait: ue
|
|
506
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
506
|
+
}, Symbol.toStringTag, { value: "Module" })), Fe = "pl7.app/label", Re = "pl7.app/trace", xe = P.object({
|
|
507
507
|
type: P.string(),
|
|
508
508
|
importance: P.number().optional(),
|
|
509
509
|
id: P.string().optional(),
|
|
510
510
|
label: P.string()
|
|
511
|
-
}),
|
|
512
|
-
function
|
|
511
|
+
}), Te = P.array(xe), Oe = 1e-3, ke = "__LABEL__", ee = "__LABEL__@1";
|
|
512
|
+
function Le(t, e, n = {}) {
|
|
513
513
|
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = t.map((p) => {
|
|
514
514
|
var R, Q;
|
|
515
|
-
const g = e(p), f = (R = g.annotations) == null ? void 0 : R[
|
|
515
|
+
const g = e(p), f = (R = g.annotations) == null ? void 0 : R[Fe], I = (Q = g.annotations) == null ? void 0 : Q[Re], y = (I ? Te.safeParse(JSON.parse(I)).data : void 0) ?? [];
|
|
516
516
|
if (f) {
|
|
517
|
-
const
|
|
518
|
-
n.addLabelAsSuffix ? y.push(
|
|
517
|
+
const A = { label: f, type: ke, importance: -2 };
|
|
518
|
+
n.addLabelAsSuffix ? y.push(A) : y.splice(0, 0, A);
|
|
519
519
|
}
|
|
520
|
-
const
|
|
521
|
-
for (let
|
|
522
|
-
const { type:
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
-
s.set(
|
|
526
|
-
|
|
520
|
+
const F = [], D = /* @__PURE__ */ new Map();
|
|
521
|
+
for (let A = y.length - 1; A >= 0; --A) {
|
|
522
|
+
const { type: M } = y[A], fe = y[A].importance ?? 0, J = (D.get(M) ?? 0) + 1;
|
|
523
|
+
D.set(M, J);
|
|
524
|
+
const x = `${M}@${J}`;
|
|
525
|
+
s.set(x, (s.get(x) ?? 0) + 1), r.set(
|
|
526
|
+
x,
|
|
527
527
|
Math.max(
|
|
528
|
-
r.get(
|
|
529
|
-
|
|
528
|
+
r.get(x) ?? Number.NEGATIVE_INFINITY,
|
|
529
|
+
fe - (y.length - A) * Oe
|
|
530
530
|
)
|
|
531
|
-
),
|
|
531
|
+
), F.push({ ...y[A], fullType: x, occurenceIndex: J });
|
|
532
532
|
}
|
|
533
|
-
return
|
|
533
|
+
return F.reverse(), {
|
|
534
534
|
value: p,
|
|
535
535
|
spec: g,
|
|
536
536
|
label: f,
|
|
537
|
-
fullTrace:
|
|
537
|
+
fullTrace: F
|
|
538
538
|
};
|
|
539
|
-
}), o = [],
|
|
540
|
-
|
|
541
|
-
for (const [p] of
|
|
542
|
-
p.endsWith("@1") || s.get(p) === t.length ? o.push(p) :
|
|
539
|
+
}), o = [], a = [], l = [...r];
|
|
540
|
+
l.sort(([, p], [, g]) => g - p);
|
|
541
|
+
for (const [p] of l)
|
|
542
|
+
p.endsWith("@1") || s.get(p) === t.length ? o.push(p) : a.push(p);
|
|
543
543
|
const u = (p) => i.map((g) => {
|
|
544
|
-
const f = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label),
|
|
544
|
+
const f = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), I = n.separator ?? " / ";
|
|
545
545
|
return {
|
|
546
|
-
label: f.join(
|
|
546
|
+
label: f.join(I),
|
|
547
547
|
value: g.value
|
|
548
548
|
};
|
|
549
549
|
});
|
|
550
550
|
if (o.length === 0) {
|
|
551
|
-
if (
|
|
551
|
+
if (a.length !== 0) throw new Error("Assertion error.");
|
|
552
552
|
return u(new Set(ee));
|
|
553
553
|
}
|
|
554
554
|
let h = 0, d = 0;
|
|
@@ -561,9 +561,9 @@ function ke(t, e, n = {}) {
|
|
|
561
561
|
if (new Set(g.map((f) => f.label)).size === t.length) return g;
|
|
562
562
|
d++, d == o.length && (h++, d = h);
|
|
563
563
|
}
|
|
564
|
-
return u(/* @__PURE__ */ new Set([...o, ...
|
|
564
|
+
return u(/* @__PURE__ */ new Set([...o, ...a]));
|
|
565
565
|
}
|
|
566
|
-
class
|
|
566
|
+
class De {
|
|
567
567
|
constructor() {
|
|
568
568
|
S(this, "ctx", c());
|
|
569
569
|
S(this, "defaultLabelFn", (e, n) => {
|
|
@@ -579,7 +579,7 @@ class Le {
|
|
|
579
579
|
}
|
|
580
580
|
getOptions(e, n) {
|
|
581
581
|
const r = this.getSpecs().entries.filter((s) => e(s.obj));
|
|
582
|
-
return typeof n == "object" || typeof n > "u" ?
|
|
582
|
+
return typeof n == "object" || typeof n > "u" ? Le(r, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: i }) => ({
|
|
583
583
|
ref: s,
|
|
584
584
|
label: i
|
|
585
585
|
})) : r.map((s) => ({
|
|
@@ -620,7 +620,7 @@ class Le {
|
|
|
620
620
|
ref: n.ref,
|
|
621
621
|
obj: {
|
|
622
622
|
...n.obj,
|
|
623
|
-
data:
|
|
623
|
+
data: me(
|
|
624
624
|
n.obj.data,
|
|
625
625
|
(r) => new v(r, [n.ref.blockId, n.ref.name])
|
|
626
626
|
)
|
|
@@ -645,7 +645,7 @@ class Le {
|
|
|
645
645
|
var n;
|
|
646
646
|
return typeof this.ctx.getDataFromResultPoolByRef > "u" ? (n = this.getData().entries.find(
|
|
647
647
|
(r) => r.ref.blockId === e.blockId && r.ref.name === e.name
|
|
648
|
-
)) == null ? void 0 : n.obj :
|
|
648
|
+
)) == null ? void 0 : n.obj : U(
|
|
649
649
|
this.ctx.getDataFromResultPoolByRef(e.blockId, e.name),
|
|
650
650
|
(r) => new v(r, [e.blockId, e.name])
|
|
651
651
|
);
|
|
@@ -658,7 +658,7 @@ class Le {
|
|
|
658
658
|
getPColumnByRef(e) {
|
|
659
659
|
const n = this.getDataByRef(e);
|
|
660
660
|
if (n)
|
|
661
|
-
return
|
|
661
|
+
return ye(n);
|
|
662
662
|
}
|
|
663
663
|
/**
|
|
664
664
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -693,10 +693,10 @@ class Le {
|
|
|
693
693
|
if (!Z(r.obj.spec))
|
|
694
694
|
continue;
|
|
695
695
|
const s = r.obj.spec;
|
|
696
|
-
if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length &&
|
|
696
|
+
if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length && z(e.domain, s.domain)) {
|
|
697
697
|
for (let i = 0; i < e.axesSpec.length; ++i) {
|
|
698
|
-
const o = e.axesSpec[i],
|
|
699
|
-
if (o.name !==
|
|
698
|
+
const o = e.axesSpec[i], a = s.axesSpec[i];
|
|
699
|
+
if (o.name !== a.name || o.type !== a.type || !z(o.domain, a.domain))
|
|
700
700
|
continue e;
|
|
701
701
|
}
|
|
702
702
|
n.push(r.obj);
|
|
@@ -705,21 +705,21 @@ class Le {
|
|
|
705
705
|
return n;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function z(t, e) {
|
|
709
709
|
if (t === void 0) return e === void 0;
|
|
710
710
|
if (e === void 0) return !0;
|
|
711
711
|
for (const n in e)
|
|
712
712
|
if (t[n] !== e[n]) return !1;
|
|
713
713
|
return !0;
|
|
714
714
|
}
|
|
715
|
-
class
|
|
715
|
+
class V {
|
|
716
716
|
constructor() {
|
|
717
717
|
S(this, "ctx");
|
|
718
718
|
S(this, "args");
|
|
719
719
|
S(this, "uiState");
|
|
720
720
|
// lazy rendering because this feature is rarely used
|
|
721
721
|
S(this, "_activeArgsCache");
|
|
722
|
-
S(this, "resultPool", new
|
|
722
|
+
S(this, "resultPool", new De());
|
|
723
723
|
this.ctx = c(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
|
|
724
724
|
}
|
|
725
725
|
/**
|
|
@@ -736,7 +736,7 @@ class E {
|
|
|
736
736
|
// return this.ctx.featureFlags;
|
|
737
737
|
// }
|
|
738
738
|
getNamedAccessor(e) {
|
|
739
|
-
return
|
|
739
|
+
return H(
|
|
740
740
|
this.ctx.getAccessorHandleByName(e),
|
|
741
741
|
(n) => new v(n, [e])
|
|
742
742
|
);
|
|
@@ -754,9 +754,9 @@ class E {
|
|
|
754
754
|
findLabels(e) {
|
|
755
755
|
const n = this.resultPool.getData();
|
|
756
756
|
for (const r of n.entries) {
|
|
757
|
-
if (!
|
|
757
|
+
if (!N(r.obj)) continue;
|
|
758
758
|
const s = r.obj.spec;
|
|
759
|
-
if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type &&
|
|
759
|
+
if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type && z(e.domain, s.axesSpec[0].domain)) {
|
|
760
760
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
761
761
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
762
762
|
return Object.fromEntries(
|
|
@@ -774,7 +774,7 @@ class E {
|
|
|
774
774
|
}
|
|
775
775
|
createPFrame(e) {
|
|
776
776
|
return this.verifyInlineColumnsSupport(e), this.ctx.createPFrame(
|
|
777
|
-
e.map((n) =>
|
|
777
|
+
e.map((n) => U(n, (r) => r instanceof v ? r.handle : r))
|
|
778
778
|
);
|
|
779
779
|
}
|
|
780
780
|
createPTable(e) {
|
|
@@ -786,10 +786,10 @@ class E {
|
|
|
786
786
|
},
|
|
787
787
|
filters: e.filters ?? [],
|
|
788
788
|
sorting: e.sorting ?? []
|
|
789
|
-
} : n = e, this.verifyInlineColumnsSupport(
|
|
790
|
-
|
|
789
|
+
} : n = e, this.verifyInlineColumnsSupport(be(n.src)), this.ctx.createPTable(
|
|
790
|
+
ve(
|
|
791
791
|
n,
|
|
792
|
-
(r) =>
|
|
792
|
+
(r) => U(r, (s) => s instanceof v ? s.handle : s)
|
|
793
793
|
)
|
|
794
794
|
);
|
|
795
795
|
}
|
|
@@ -802,29 +802,29 @@ class E {
|
|
|
802
802
|
return this.ctx.getCurrentUnstableMarker();
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
const
|
|
805
|
+
const L = "PColumnData/", Y = L + "ResourceMap", X = L + "Partitioned/ResourceMap", te = L + "JsonPartitioned", G = L + "BinaryPartitioned", ce = L + "Partitioned/", ne = ce + "JsonPartitioned", W = ce + "BinaryPartitioned";
|
|
806
806
|
function de(t, e, n, r = [], s) {
|
|
807
807
|
if (t === void 0) return !1;
|
|
808
808
|
switch (t.resourceType.name) {
|
|
809
|
-
case
|
|
809
|
+
case Y: {
|
|
810
810
|
let i = t.getInputsLocked();
|
|
811
811
|
for (const o of t.listInputFields()) {
|
|
812
|
-
const
|
|
813
|
-
u === void 0 && (i = !1), (u !== void 0 || s) && n.push({ key:
|
|
812
|
+
const a = t.resolve({ field: o, assertFieldType: "Input" }), l = [...r, ...JSON.parse(o)], u = a === void 0 ? void 0 : e(a);
|
|
813
|
+
u === void 0 && (i = !1), (u !== void 0 || s) && n.push({ key: l, value: u });
|
|
814
814
|
}
|
|
815
815
|
return i;
|
|
816
816
|
}
|
|
817
|
-
case
|
|
817
|
+
case X: {
|
|
818
818
|
let i = t.getInputsLocked();
|
|
819
819
|
for (const o of t.listInputFields()) {
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
820
|
+
const a = t.resolve({ field: o, assertFieldType: "Input" });
|
|
821
|
+
if (a === void 0) i = !1;
|
|
822
822
|
else {
|
|
823
|
-
const
|
|
824
|
-
|
|
823
|
+
const l = [...r, ...JSON.parse(o)], u = de(
|
|
824
|
+
a,
|
|
825
825
|
e,
|
|
826
826
|
n,
|
|
827
|
-
|
|
827
|
+
l,
|
|
828
828
|
s
|
|
829
829
|
);
|
|
830
830
|
i = i && u;
|
|
@@ -836,7 +836,7 @@ function de(t, e, n, r = [], s) {
|
|
|
836
836
|
throw new Error(`Unknown resource type: ${t.resourceType.name}`);
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function It(t, e, n = !1) {
|
|
840
840
|
const r = [];
|
|
841
841
|
return { isComplete: de(t, e, r, [], n), data: r };
|
|
842
842
|
}
|
|
@@ -847,53 +847,53 @@ const re = (t) => {
|
|
|
847
847
|
throw Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
848
848
|
}
|
|
849
849
|
};
|
|
850
|
-
function
|
|
850
|
+
function Ee(t) {
|
|
851
851
|
if (!t) return;
|
|
852
852
|
const e = t.resourceType.name, n = t.getDataAsJson(), r = [];
|
|
853
853
|
let s = 0;
|
|
854
854
|
switch (e) {
|
|
855
|
-
case
|
|
855
|
+
case Y:
|
|
856
856
|
s = n.keyLength;
|
|
857
857
|
break;
|
|
858
|
-
case
|
|
858
|
+
case X:
|
|
859
859
|
s = n.partitionKeyLength + n.keyLength;
|
|
860
860
|
break;
|
|
861
861
|
case te:
|
|
862
|
-
case
|
|
862
|
+
case G:
|
|
863
863
|
s = n.partitionKeyLength;
|
|
864
864
|
break;
|
|
865
|
-
case
|
|
865
|
+
case W:
|
|
866
866
|
case ne:
|
|
867
867
|
s = n.superPartitionKeyLength + n.partitionKeyLength;
|
|
868
868
|
break;
|
|
869
869
|
}
|
|
870
870
|
switch (e) {
|
|
871
|
-
case
|
|
871
|
+
case Y:
|
|
872
872
|
case te:
|
|
873
|
-
case
|
|
873
|
+
case G:
|
|
874
874
|
for (let i of t.listInputFields()) {
|
|
875
|
-
if (e ===
|
|
876
|
-
const
|
|
877
|
-
if (
|
|
875
|
+
if (e === G) {
|
|
876
|
+
const a = re(i);
|
|
877
|
+
if (a) i = a;
|
|
878
878
|
else continue;
|
|
879
879
|
}
|
|
880
880
|
const o = [...JSON.parse(i)];
|
|
881
881
|
r.push(o);
|
|
882
882
|
}
|
|
883
883
|
break;
|
|
884
|
-
case
|
|
885
|
-
case
|
|
884
|
+
case X:
|
|
885
|
+
case W:
|
|
886
886
|
case ne:
|
|
887
887
|
for (const i of t.listInputFields()) {
|
|
888
|
-
const o = [...JSON.parse(i)],
|
|
889
|
-
if (
|
|
890
|
-
for (let
|
|
891
|
-
if (e ===
|
|
892
|
-
const h = re(
|
|
893
|
-
if (h)
|
|
888
|
+
const o = [...JSON.parse(i)], a = t.resolve({ field: i, assertFieldType: "Input" });
|
|
889
|
+
if (a !== void 0)
|
|
890
|
+
for (let l of a.listInputFields()) {
|
|
891
|
+
if (e === W) {
|
|
892
|
+
const h = re(l);
|
|
893
|
+
if (h) l = h;
|
|
894
894
|
else continue;
|
|
895
895
|
}
|
|
896
|
-
const u = [...o, ...JSON.parse(
|
|
896
|
+
const u = [...o, ...JSON.parse(l)];
|
|
897
897
|
r.push(u);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
@@ -901,8 +901,8 @@ function De(t) {
|
|
|
901
901
|
}
|
|
902
902
|
return { data: r, keyLength: s };
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
const e =
|
|
904
|
+
function Ct(t) {
|
|
905
|
+
const e = Ee(t);
|
|
906
906
|
if (!e) return;
|
|
907
907
|
const { data: n, keyLength: r } = e, s = [];
|
|
908
908
|
for (let i = 0; i < r; ++i)
|
|
@@ -915,19 +915,19 @@ function _t(t) {
|
|
|
915
915
|
}
|
|
916
916
|
return s.map((i) => Array.from(i.values()));
|
|
917
917
|
}
|
|
918
|
-
const T = "1.22.
|
|
919
|
-
function
|
|
918
|
+
const T = "1.22.97";
|
|
919
|
+
function Ve(t) {
|
|
920
920
|
return t.__renderLambda === !0;
|
|
921
921
|
}
|
|
922
922
|
function K(t) {
|
|
923
923
|
if (t !== void 0)
|
|
924
|
-
return
|
|
924
|
+
return Ve(t) ? t.handle : t;
|
|
925
925
|
}
|
|
926
926
|
function C(t) {
|
|
927
927
|
if (t !== void 0)
|
|
928
928
|
return typeof t == "string" ? { __renderLambda: !0, handle: t, retentive: !1 } : t;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Pt(t) {
|
|
931
931
|
if (t.v3 !== void 0) {
|
|
932
932
|
const {
|
|
933
933
|
initialArgs: e,
|
|
@@ -936,8 +936,8 @@ function St(t) {
|
|
|
936
936
|
outputs: s,
|
|
937
937
|
renderingMode: i,
|
|
938
938
|
sdkVersion: o,
|
|
939
|
-
sections:
|
|
940
|
-
title:
|
|
939
|
+
sections: a,
|
|
940
|
+
title: l
|
|
941
941
|
} = t.v3, { code: u } = t;
|
|
942
942
|
return {
|
|
943
943
|
initialArgs: e,
|
|
@@ -946,15 +946,15 @@ function St(t) {
|
|
|
946
946
|
outputs: s,
|
|
947
947
|
renderingMode: i,
|
|
948
948
|
sdkVersion: o,
|
|
949
|
-
sections:
|
|
950
|
-
title:
|
|
949
|
+
sections: a,
|
|
950
|
+
title: l,
|
|
951
951
|
code: u
|
|
952
952
|
};
|
|
953
953
|
} else if (t.inputsValid !== void 0) {
|
|
954
|
-
const { sdkVersion: e, renderingMode: n, outputs: r, inputsValid: s, sections: i, initialArgs: o, code:
|
|
954
|
+
const { sdkVersion: e, renderingMode: n, outputs: r, inputsValid: s, sections: i, initialArgs: o, code: a } = t, l = Object.keys(t);
|
|
955
955
|
if (e === void 0 || n === void 0 || r === void 0 || s === void 0 || i === void 0 || o === void 0)
|
|
956
956
|
throw new Error(
|
|
957
|
-
`Malformed config v2. SDK version ${e}; Fields = ${
|
|
957
|
+
`Malformed config v2. SDK version ${e}; Fields = ${l.join(", ")}`
|
|
958
958
|
);
|
|
959
959
|
return {
|
|
960
960
|
sdkVersion: e,
|
|
@@ -966,13 +966,13 @@ function St(t) {
|
|
|
966
966
|
inputsValid: C(s),
|
|
967
967
|
sections: C(i),
|
|
968
968
|
initialUiState: void 0,
|
|
969
|
-
code:
|
|
969
|
+
code: a
|
|
970
970
|
};
|
|
971
971
|
} else if (t.renderingMode !== void 0) {
|
|
972
|
-
const { sdkVersion: e, canRun: n, renderingMode: r, outputs: s, sections: i, initialArgs: o, code:
|
|
972
|
+
const { sdkVersion: e, canRun: n, renderingMode: r, outputs: s, sections: i, initialArgs: o, code: a } = t, l = Object.keys(t);
|
|
973
973
|
if (r === void 0 || s === void 0 || n === void 0 || i === void 0 || o === void 0)
|
|
974
974
|
throw new Error(
|
|
975
|
-
`Malformed config v1. SDK version ${e}; Fields = ${
|
|
975
|
+
`Malformed config v1. SDK version ${e}; Fields = ${l.join(", ")}`
|
|
976
976
|
);
|
|
977
977
|
return {
|
|
978
978
|
sdkVersion: e ?? "unknown",
|
|
@@ -984,7 +984,7 @@ function St(t) {
|
|
|
984
984
|
inputsValid: C(n),
|
|
985
985
|
sections: C(i),
|
|
986
986
|
initialUiState: void 0,
|
|
987
|
-
code:
|
|
987
|
+
code: a
|
|
988
988
|
};
|
|
989
989
|
} else {
|
|
990
990
|
const { sdkVersion: e } = t, n = Object.keys(t);
|
|
@@ -994,8 +994,8 @@ function St(t) {
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
class _ {
|
|
997
|
-
constructor(e, n, r, s, i, o,
|
|
998
|
-
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = s, this._inputsValid = i, this._sections = o, this._title =
|
|
997
|
+
constructor(e, n, r, s, i, o, a) {
|
|
998
|
+
this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = s, this._inputsValid = i, this._sections = o, this._title = a;
|
|
999
999
|
}
|
|
1000
1000
|
static create(e = "Heavy") {
|
|
1001
1001
|
return new _(
|
|
@@ -1003,15 +1003,15 @@ class _ {
|
|
|
1003
1003
|
void 0,
|
|
1004
1004
|
{},
|
|
1005
1005
|
{},
|
|
1006
|
-
|
|
1007
|
-
|
|
1006
|
+
j(!0),
|
|
1007
|
+
j([]),
|
|
1008
1008
|
void 0
|
|
1009
1009
|
);
|
|
1010
1010
|
}
|
|
1011
1011
|
output(e, n, r = {}) {
|
|
1012
1012
|
if (typeof n == "function") {
|
|
1013
1013
|
const s = `output#${e}`;
|
|
1014
|
-
return
|
|
1014
|
+
return E(s, () => n(new V())), new _(
|
|
1015
1015
|
this._renderingMode,
|
|
1016
1016
|
this._initialArgs,
|
|
1017
1017
|
this._initialUiState,
|
|
@@ -1046,7 +1046,7 @@ class _ {
|
|
|
1046
1046
|
return this.output(e, n, { retentive: !0 });
|
|
1047
1047
|
}
|
|
1048
1048
|
argsValid(e) {
|
|
1049
|
-
return typeof e == "function" ? (
|
|
1049
|
+
return typeof e == "function" ? (E("inputsValid", () => e(new V())), new _(
|
|
1050
1050
|
this._renderingMode,
|
|
1051
1051
|
this._initialArgs,
|
|
1052
1052
|
this._initialUiState,
|
|
@@ -1068,7 +1068,7 @@ class _ {
|
|
|
1068
1068
|
);
|
|
1069
1069
|
}
|
|
1070
1070
|
sections(e) {
|
|
1071
|
-
return Array.isArray(e) ? this.sections(
|
|
1071
|
+
return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new _(
|
|
1072
1072
|
this._renderingMode,
|
|
1073
1073
|
this._initialArgs,
|
|
1074
1074
|
this._initialUiState,
|
|
@@ -1088,7 +1088,7 @@ class _ {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
1090
1090
|
title(e) {
|
|
1091
|
-
return
|
|
1091
|
+
return E("title", () => e(new V())), new _(
|
|
1092
1092
|
this._renderingMode,
|
|
1093
1093
|
this._initialArgs,
|
|
1094
1094
|
this._initialUiState,
|
|
@@ -1163,13 +1163,13 @@ class _ {
|
|
|
1163
1163
|
Object.entries(this._outputs).map(([n, r]) => [n, K(r)])
|
|
1164
1164
|
)
|
|
1165
1165
|
};
|
|
1166
|
-
return
|
|
1166
|
+
return Ae() ? oe({ sdkVersion: T }) : { config: e };
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function Ft(t, e, n, r) {
|
|
1170
1170
|
var u, h;
|
|
1171
1171
|
Array.isArray(r) && (r = { filters: r });
|
|
1172
|
-
const s = t.resultPool.getData().entries.map((d) => d.obj).filter(
|
|
1172
|
+
const s = t.resultPool.getData().entries.map((d) => d.obj).filter(N).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), i = (d, p) => {
|
|
1173
1173
|
let g = d.toString();
|
|
1174
1174
|
if (p)
|
|
1175
1175
|
for (const f in p)
|
|
@@ -1178,18 +1178,18 @@ function wt(t, e, n, r) {
|
|
|
1178
1178
|
}, o = /* @__PURE__ */ new Map();
|
|
1179
1179
|
for (const d of e)
|
|
1180
1180
|
for (const p of d.spec.axesSpec) {
|
|
1181
|
-
const g =
|
|
1181
|
+
const g = w(p);
|
|
1182
1182
|
for (const f of s) {
|
|
1183
|
-
const
|
|
1184
|
-
if (
|
|
1185
|
-
const
|
|
1186
|
-
if (
|
|
1183
|
+
const I = f.spec.axesSpec[0], y = w(f.spec.axesSpec[0]);
|
|
1184
|
+
if (O(g, y)) {
|
|
1185
|
+
const F = Object.keys(g.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
|
|
1186
|
+
if (F > D) {
|
|
1187
1187
|
const R = i(f.id, g.domain);
|
|
1188
1188
|
o.set(R, {
|
|
1189
1189
|
id: R,
|
|
1190
1190
|
spec: {
|
|
1191
1191
|
...f.spec,
|
|
1192
|
-
axesSpec: [{ ...g, annotations:
|
|
1192
|
+
axesSpec: [{ ...g, annotations: I.annotations }]
|
|
1193
1193
|
},
|
|
1194
1194
|
data: f.data
|
|
1195
1195
|
});
|
|
@@ -1202,27 +1202,27 @@ function wt(t, e, n, r) {
|
|
|
1202
1202
|
(d) => d.data instanceof v && !d.data.getIsReadyOrError()
|
|
1203
1203
|
))
|
|
1204
1204
|
return;
|
|
1205
|
-
let
|
|
1206
|
-
const
|
|
1205
|
+
let a = e;
|
|
1206
|
+
const l = [];
|
|
1207
1207
|
if (r != null && r.coreColumnPredicate) {
|
|
1208
|
-
|
|
1208
|
+
a = [];
|
|
1209
1209
|
for (const d of e)
|
|
1210
|
-
r.coreColumnPredicate(d.spec) ?
|
|
1210
|
+
r.coreColumnPredicate(d.spec) ? a.push(d) : l.push(d);
|
|
1211
1211
|
}
|
|
1212
|
-
return
|
|
1212
|
+
return l.push(...o.values()), t.createPTable({
|
|
1213
1213
|
src: {
|
|
1214
1214
|
type: "outer",
|
|
1215
1215
|
primary: {
|
|
1216
1216
|
type: (r == null ? void 0 : r.coreJoinType) ?? "full",
|
|
1217
|
-
entries:
|
|
1217
|
+
entries: a.map((d) => ({ type: "column", column: d }))
|
|
1218
1218
|
},
|
|
1219
|
-
secondary:
|
|
1219
|
+
secondary: l.map((d) => ({ type: "column", column: d }))
|
|
1220
1220
|
},
|
|
1221
1221
|
filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
|
|
1222
1222
|
sorting: ((h = n == null ? void 0 : n.pTableParams) == null ? void 0 : h.sorting) ?? []
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Rt(t, e, n) {
|
|
1226
1226
|
const r = t.findLabels(e);
|
|
1227
1227
|
return {
|
|
1228
1228
|
axis: e,
|
|
@@ -1233,7 +1233,7 @@ function At(t, e, n) {
|
|
|
1233
1233
|
defaultValue: n[0]
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
|
-
const
|
|
1236
|
+
const je = (t, e) => {
|
|
1237
1237
|
let n = t.toString();
|
|
1238
1238
|
return e == null || e.forEach((r) => {
|
|
1239
1239
|
if (r)
|
|
@@ -1241,7 +1241,7 @@ const Ve = (t, e) => {
|
|
|
1241
1241
|
n += s, n += i;
|
|
1242
1242
|
}), n;
|
|
1243
1243
|
};
|
|
1244
|
-
function
|
|
1244
|
+
function Ue(t) {
|
|
1245
1245
|
if (!t.length)
|
|
1246
1246
|
return [];
|
|
1247
1247
|
let e = [[]];
|
|
@@ -1252,26 +1252,39 @@ function je(t) {
|
|
|
1252
1252
|
}), e = r;
|
|
1253
1253
|
}), e;
|
|
1254
1254
|
}
|
|
1255
|
+
function Be(t, e) {
|
|
1256
|
+
const n = t.spec.axesSpec.map(w);
|
|
1257
|
+
return e.spec.axesSpec.map(w).every((s) => n.some((i) => O(i, s) && O(s, i)));
|
|
1258
|
+
}
|
|
1259
|
+
function pe(t, e) {
|
|
1260
|
+
const n = t.spec.axesSpec.map(w);
|
|
1261
|
+
return e.spec.axesSpec.map(w).every((s) => n.some((i) => O(i, s)));
|
|
1262
|
+
}
|
|
1263
|
+
const Ne = "pl7.app/graph/isVirtual";
|
|
1255
1264
|
function se(t, e) {
|
|
1256
|
-
const n = t.spec.axesSpec.map(
|
|
1257
|
-
if (
|
|
1265
|
+
const n = t.spec.axesSpec.map(w), r = e.spec.axesSpec.map(w);
|
|
1266
|
+
if (Be(t, e))
|
|
1258
1267
|
return [];
|
|
1259
|
-
if (!
|
|
1268
|
+
if (!pe(t, e))
|
|
1260
1269
|
return [];
|
|
1261
|
-
const o = r.map((
|
|
1262
|
-
return
|
|
1263
|
-
id:
|
|
1270
|
+
const o = r.map((l) => n.filter((u) => O(u, l)));
|
|
1271
|
+
return Ue(o).map((l) => ({
|
|
1272
|
+
id: je(e.id, l.map((h) => h.domain)),
|
|
1264
1273
|
spec: {
|
|
1265
1274
|
...e.spec,
|
|
1266
|
-
axesSpec:
|
|
1275
|
+
axesSpec: l.map((h, d) => ({
|
|
1267
1276
|
...h,
|
|
1268
1277
|
annotations: e.spec.axesSpec[d].annotations
|
|
1269
|
-
}))
|
|
1278
|
+
})),
|
|
1279
|
+
annotations: {
|
|
1280
|
+
...e.spec.annotations,
|
|
1281
|
+
[Ne]: "true"
|
|
1282
|
+
}
|
|
1270
1283
|
},
|
|
1271
1284
|
data: e.data
|
|
1272
1285
|
}));
|
|
1273
1286
|
}
|
|
1274
|
-
function
|
|
1287
|
+
function Me(t) {
|
|
1275
1288
|
const e = [];
|
|
1276
1289
|
for (let n = 0; n < t.length; n++)
|
|
1277
1290
|
for (let r = n + 1; r < t.length; r++) {
|
|
@@ -1283,14 +1296,36 @@ function Ue(t) {
|
|
|
1283
1296
|
}
|
|
1284
1297
|
return e;
|
|
1285
1298
|
}
|
|
1286
|
-
function
|
|
1287
|
-
const n = [...
|
|
1288
|
-
|
|
1289
|
-
(
|
|
1299
|
+
function Je(t, e) {
|
|
1300
|
+
const n = [...t];
|
|
1301
|
+
for (const r of e)
|
|
1302
|
+
for (const s of t) {
|
|
1303
|
+
if (s.id === r.id)
|
|
1304
|
+
break;
|
|
1305
|
+
if (pe(s, r)) {
|
|
1306
|
+
n.push(r);
|
|
1307
|
+
break;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
return n;
|
|
1311
|
+
}
|
|
1312
|
+
const $e = [
|
|
1313
|
+
"Int",
|
|
1314
|
+
"Long",
|
|
1315
|
+
"Float",
|
|
1316
|
+
"Double",
|
|
1317
|
+
"String",
|
|
1318
|
+
"Bytes"
|
|
1319
|
+
];
|
|
1320
|
+
function xt(t, e) {
|
|
1321
|
+
if (e === void 0) return;
|
|
1322
|
+
const n = t.resultPool.getData().entries.map((i) => i.obj).filter(N).filter((i) => $e.includes(i.spec.valueType)), r = Je(e, n), s = [...r, ...Me(r)];
|
|
1323
|
+
if (!s.some(
|
|
1324
|
+
(i) => i.data instanceof v && !i.data.getIsReadyOrError()
|
|
1290
1325
|
))
|
|
1291
|
-
return t.createPFrame(
|
|
1326
|
+
return t.createPFrame(s);
|
|
1292
1327
|
}
|
|
1293
|
-
class
|
|
1328
|
+
class Tt {
|
|
1294
1329
|
constructor(e) {
|
|
1295
1330
|
this.handle = e;
|
|
1296
1331
|
}
|
|
@@ -1310,98 +1345,100 @@ class Pt {
|
|
|
1310
1345
|
return await platforma.pFrameDriver.getUniqueValues(this.handle, e);
|
|
1311
1346
|
}
|
|
1312
1347
|
}
|
|
1313
|
-
function
|
|
1348
|
+
function Ge(t) {
|
|
1314
1349
|
return ie({
|
|
1315
1350
|
__isRef: !0,
|
|
1316
1351
|
blockId: B(t, "blockId"),
|
|
1317
1352
|
name: B(t, "name")
|
|
1318
1353
|
});
|
|
1319
1354
|
}
|
|
1320
|
-
function
|
|
1355
|
+
function Ot(t) {
|
|
1321
1356
|
return ie({
|
|
1322
|
-
ref:
|
|
1357
|
+
ref: Ge(B(t, "ref")),
|
|
1323
1358
|
label: B(t, "label")
|
|
1324
1359
|
});
|
|
1325
1360
|
}
|
|
1326
|
-
const
|
|
1361
|
+
const kt = {
|
|
1327
1362
|
sdkVersion: T
|
|
1328
1363
|
};
|
|
1329
|
-
function
|
|
1364
|
+
function Lt() {
|
|
1330
1365
|
return oe({ sdkVersion: T });
|
|
1331
1366
|
}
|
|
1332
|
-
function
|
|
1367
|
+
function Dt(t) {
|
|
1333
1368
|
if (typeof globalThis.getEnvironmentValue == "function")
|
|
1334
1369
|
return globalThis.getEnvironmentValue(t);
|
|
1335
1370
|
}
|
|
1336
1371
|
export {
|
|
1337
|
-
|
|
1372
|
+
Ye as Args,
|
|
1338
1373
|
_ as BlockModel,
|
|
1339
|
-
|
|
1374
|
+
kt as CurrentSdkInfo,
|
|
1340
1375
|
b as FutureRef,
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1376
|
+
Ne as IS_VIRTUAL_COLUMN,
|
|
1377
|
+
Xe as It,
|
|
1378
|
+
wt as JsRenderInternal,
|
|
1379
|
+
Qe as MainOutputs,
|
|
1380
|
+
_e as OutputError,
|
|
1381
|
+
Fe as PAnnotationLabel,
|
|
1346
1382
|
Re as PAnnotationTrace,
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1383
|
+
Tt as PFrameImpl,
|
|
1384
|
+
G as RT_BINARY_PARTITIONED,
|
|
1385
|
+
W as RT_BINARY_SUPER_PARTITIONED,
|
|
1350
1386
|
te as RT_JSON_PARTITIONED,
|
|
1351
1387
|
ne as RT_JSON_SUPER_PARTITIONED,
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1388
|
+
Y as RT_RESOURCE_MAP,
|
|
1389
|
+
X as RT_RESOURCE_MAP_PARTITIONED,
|
|
1390
|
+
V as RenderCtx,
|
|
1391
|
+
De as ResultPool,
|
|
1392
|
+
Ze as StagingOutputs,
|
|
1393
|
+
Te as Trace,
|
|
1394
|
+
xe as TraceEntry,
|
|
1359
1395
|
v as TreeNodeAccessor,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1396
|
+
et as UiState,
|
|
1397
|
+
at as and,
|
|
1398
|
+
xt as createPFrameForGraphs,
|
|
1399
|
+
Ft as createPlDataTable,
|
|
1400
|
+
Rt as createPlDataTableSheet,
|
|
1401
|
+
Le as deriveLabels,
|
|
1366
1402
|
K as downgradeCfgOrLambda,
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1403
|
+
Je as enrichColumnsWithCompatible,
|
|
1404
|
+
yt as extractArchiveAndGetURL,
|
|
1405
|
+
Pt as extractConfig,
|
|
1406
|
+
st as flatten,
|
|
1407
|
+
Ot as fromPlOption,
|
|
1408
|
+
Ge as fromPlRef,
|
|
1409
|
+
Me as getAdditionalColumns,
|
|
1410
|
+
pt as getBlobContent,
|
|
1411
|
+
ht as getBlobContentAsJson,
|
|
1412
|
+
ft as getBlobContentAsString,
|
|
1413
|
+
gt as getDownloadedBlobContent,
|
|
1414
|
+
Dt as getEnvironmentValue,
|
|
1415
|
+
k as getFromCfg,
|
|
1416
|
+
j as getImmediate,
|
|
1417
|
+
bt as getImportProgress,
|
|
1381
1418
|
B as getJsonField,
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1419
|
+
vt as getLastLogs,
|
|
1420
|
+
At as getLogHandle,
|
|
1421
|
+
mt as getOnDemandBlobContent,
|
|
1422
|
+
Ee as getPartitionKeysList,
|
|
1423
|
+
_t as getProgressLog,
|
|
1424
|
+
St as getProgressLogWithInfo,
|
|
1425
|
+
Lt as getRawPlatformaInstance,
|
|
1426
|
+
ut as getResourceField,
|
|
1427
|
+
ct as getResourceValueAsJson,
|
|
1428
|
+
Ct as getUniquePartitionKeys,
|
|
1429
|
+
H as ifDef,
|
|
1430
|
+
Ve as isConfigLambda,
|
|
1431
|
+
it as isEmpty,
|
|
1432
|
+
ze as isolate,
|
|
1433
|
+
tt as makeArray,
|
|
1397
1434
|
ie as makeObject,
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1435
|
+
rt as mapArrayValues,
|
|
1436
|
+
nt as mapRecordValues,
|
|
1437
|
+
dt as mapResourceFields,
|
|
1438
|
+
ot as not,
|
|
1439
|
+
lt as or,
|
|
1440
|
+
It as parseResourceMap,
|
|
1441
|
+
Se as readOutput,
|
|
1442
|
+
qe as wrapOutputs
|
|
1406
1443
|
};
|
|
1407
1444
|
//# sourceMappingURL=index.mjs.map
|