@milaboratories/graph-maker 1.1.135 → 1.1.137
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/GraphMaker/constantsCommon.d.ts +2 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +19 -17
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +144 -122
- package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.js +72 -72
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.js +9 -9
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +246 -228
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/GroupCaptions.js +46 -37
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/GroupCaptions.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +63 -61
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Dendrograms.js +57 -51
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Dendrograms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js +33 -33
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +20 -20
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js +89 -54
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateChartSideElementSizes.js +19 -19
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateChartSideElementSizes.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +181 -168
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/Lasso.js +144 -120
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/Lasso.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +35 -35
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +235 -242
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js +218 -163
- package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js.map +1 -1
- package/dist/node_modules/@platforma-sdk/model/dist/index.js +89 -80
- package/package.json +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import u from "../../../zod/lib/index.js";
|
|
2
2
|
import l from "../../../canonicalize/lib/canonicalize.js";
|
|
3
|
-
var
|
|
3
|
+
var A = Object.defineProperty, k = (e, t, r) => t in e ? A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, m = (e, t, r) => k(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
u.object({
|
|
5
5
|
/** Included left border. */
|
|
6
6
|
from: u.number(),
|
|
7
7
|
/** Excluded right border. */
|
|
8
8
|
to: u.number()
|
|
9
9
|
});
|
|
10
|
-
function
|
|
10
|
+
function P(e) {
|
|
11
11
|
throw new Error("Unexpected object: " + e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function F(e) {
|
|
14
14
|
if (!e || typeof e != "object")
|
|
15
15
|
return !1;
|
|
16
16
|
const t = e;
|
|
@@ -27,35 +27,35 @@ function K(e) {
|
|
|
27
27
|
return !1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function z(e, t) {
|
|
31
31
|
if (e !== void 0)
|
|
32
32
|
switch (e.type) {
|
|
33
33
|
case "Json":
|
|
34
34
|
return e;
|
|
35
35
|
case "JsonPartitioned": {
|
|
36
|
-
const
|
|
37
|
-
for (const [
|
|
38
|
-
n
|
|
36
|
+
const r = {};
|
|
37
|
+
for (const [n, o] of Object.entries(e.parts))
|
|
38
|
+
r[n] = t(o);
|
|
39
39
|
return {
|
|
40
40
|
...e,
|
|
41
|
-
parts:
|
|
41
|
+
parts: r
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
case "BinaryPartitioned": {
|
|
45
|
-
const
|
|
46
|
-
for (const [
|
|
47
|
-
n
|
|
45
|
+
const r = {};
|
|
46
|
+
for (const [n, o] of Object.entries(e.parts))
|
|
47
|
+
r[n] = {
|
|
48
48
|
index: t(o.index),
|
|
49
49
|
values: t(o.values)
|
|
50
50
|
};
|
|
51
51
|
return {
|
|
52
52
|
...e,
|
|
53
|
-
parts:
|
|
53
|
+
parts: r
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function S(e) {
|
|
59
59
|
if (!e || typeof e != "object")
|
|
60
60
|
return !1;
|
|
61
61
|
const t = e;
|
|
@@ -72,13 +72,13 @@ function A(e) {
|
|
|
72
72
|
return !1;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
75
|
+
function q(e) {
|
|
76
|
+
return S(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : !1;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function U(e) {
|
|
79
79
|
switch (e.type) {
|
|
80
80
|
case "Json": {
|
|
81
|
-
const t = Object.entries(e.data).map(([
|
|
81
|
+
const t = Object.entries(e.data).map(([r, n]) => ({ key: JSON.parse(r), value: n }));
|
|
82
82
|
return {
|
|
83
83
|
type: "Json",
|
|
84
84
|
keyLength: e.keyLength,
|
|
@@ -86,7 +86,7 @@ function B(e) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
case "JsonPartitioned": {
|
|
89
|
-
const t = Object.entries(e.parts).map(([
|
|
89
|
+
const t = Object.entries(e.parts).map(([r, n]) => ({ key: JSON.parse(r), value: n }));
|
|
90
90
|
return {
|
|
91
91
|
type: "JsonPartitioned",
|
|
92
92
|
partitionKeyLength: e.partitionKeyLength,
|
|
@@ -94,7 +94,7 @@ function B(e) {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
case "BinaryPartitioned": {
|
|
97
|
-
const t = Object.entries(e.parts).map(([
|
|
97
|
+
const t = Object.entries(e.parts).map(([r, n]) => ({ key: JSON.parse(r), value: n }));
|
|
98
98
|
return {
|
|
99
99
|
type: "BinaryPartitioned",
|
|
100
100
|
partitionKeyLength: e.partitionKeyLength,
|
|
@@ -103,12 +103,12 @@ function B(e) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function G(e) {
|
|
107
107
|
switch (e.type) {
|
|
108
108
|
case "Json": {
|
|
109
109
|
const t = {};
|
|
110
|
-
for (const
|
|
111
|
-
t[JSON.stringify(
|
|
110
|
+
for (const r of e.data)
|
|
111
|
+
t[JSON.stringify(r.key)] = r.value;
|
|
112
112
|
return {
|
|
113
113
|
type: "Json",
|
|
114
114
|
keyLength: e.keyLength,
|
|
@@ -117,8 +117,8 @@ function M(e) {
|
|
|
117
117
|
}
|
|
118
118
|
case "JsonPartitioned": {
|
|
119
119
|
const t = {};
|
|
120
|
-
for (const
|
|
121
|
-
t[JSON.stringify(
|
|
120
|
+
for (const r of e.parts)
|
|
121
|
+
t[JSON.stringify(r.key)] = r.value;
|
|
122
122
|
return {
|
|
123
123
|
type: "JsonPartitioned",
|
|
124
124
|
partitionKeyLength: e.partitionKeyLength,
|
|
@@ -127,8 +127,8 @@ function M(e) {
|
|
|
127
127
|
}
|
|
128
128
|
case "BinaryPartitioned": {
|
|
129
129
|
const t = {};
|
|
130
|
-
for (const
|
|
131
|
-
t[JSON.stringify(
|
|
130
|
+
for (const r of e.parts)
|
|
131
|
+
t[JSON.stringify(r.key)] = r.value;
|
|
132
132
|
return {
|
|
133
133
|
type: "BinaryPartitioned",
|
|
134
134
|
partitionKeyLength: e.partitionKeyLength,
|
|
@@ -137,27 +137,73 @@ function M(e) {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
+
const E = -2147483648, b = -9007199254740991n, j = null, N = null;
|
|
141
|
+
function O(e, t) {
|
|
142
|
+
switch (t) {
|
|
143
|
+
case "Int":
|
|
144
|
+
return e === E;
|
|
145
|
+
case "Long":
|
|
146
|
+
return e === Number(b) || e === b;
|
|
147
|
+
case "Float":
|
|
148
|
+
return Number.isNaN(e);
|
|
149
|
+
case "Double":
|
|
150
|
+
return Number.isNaN(e);
|
|
151
|
+
case "String":
|
|
152
|
+
return e === j;
|
|
153
|
+
case "Bytes":
|
|
154
|
+
return e === N;
|
|
155
|
+
default:
|
|
156
|
+
throw Error(`unsupported data type: ${t}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function I(e, t) {
|
|
160
|
+
const r = Math.floor(t / 8), n = 1 << 7 - t % 8;
|
|
161
|
+
return (e[r] & n) > 0;
|
|
162
|
+
}
|
|
163
|
+
const J = { type: "absent" }, L = null;
|
|
164
|
+
function Q(e, t, r = {}) {
|
|
165
|
+
if (I(e.absent, t))
|
|
166
|
+
return r.absent === void 0 ? J : r.absent;
|
|
167
|
+
const n = e.data[t], o = e.type;
|
|
168
|
+
if (O(n, o)) return r.na === void 0 ? L : r.na;
|
|
169
|
+
switch (o) {
|
|
170
|
+
case "Int":
|
|
171
|
+
return n;
|
|
172
|
+
case "Long":
|
|
173
|
+
return Number(n);
|
|
174
|
+
case "Float":
|
|
175
|
+
return n;
|
|
176
|
+
case "Double":
|
|
177
|
+
return n;
|
|
178
|
+
case "String":
|
|
179
|
+
return n;
|
|
180
|
+
case "Bytes":
|
|
181
|
+
throw Error("Bytes not yet supported");
|
|
182
|
+
default:
|
|
183
|
+
throw Error(`unsupported data type: ${o}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
140
186
|
function d(e) {
|
|
141
|
-
const { type: t, name:
|
|
142
|
-
return
|
|
187
|
+
const { type: t, name: r, domain: n } = e, o = { type: t, name: r };
|
|
188
|
+
return n && Object.entries(n).length > 0 && Object.assign(o, { domain: n }), o;
|
|
143
189
|
}
|
|
144
|
-
function
|
|
190
|
+
function $(e) {
|
|
145
191
|
return e.map(d);
|
|
146
192
|
}
|
|
147
|
-
function
|
|
193
|
+
function X(e) {
|
|
148
194
|
return l(d(e));
|
|
149
195
|
}
|
|
150
|
-
function
|
|
196
|
+
function C(e, t) {
|
|
151
197
|
if (e === void 0) return t === void 0;
|
|
152
198
|
if (t === void 0) return !0;
|
|
153
|
-
for (const
|
|
154
|
-
if (e[
|
|
199
|
+
for (const r in t)
|
|
200
|
+
if (e[r] !== t[r]) return !1;
|
|
155
201
|
return !0;
|
|
156
202
|
}
|
|
157
|
-
function
|
|
158
|
-
return e.name === t.name &&
|
|
203
|
+
function T(e, t) {
|
|
204
|
+
return e.name === t.name && C(e.domain, t.domain);
|
|
159
205
|
}
|
|
160
|
-
function
|
|
206
|
+
function Y(e, t) {
|
|
161
207
|
return { ...e, src: h(e.src, t) };
|
|
162
208
|
}
|
|
163
209
|
function h(e, t) {
|
|
@@ -180,47 +226,47 @@ function h(e, t) {
|
|
|
180
226
|
case "full":
|
|
181
227
|
return {
|
|
182
228
|
type: e.type,
|
|
183
|
-
entries: e.entries.map((
|
|
229
|
+
entries: e.entries.map((r) => h(r, t))
|
|
184
230
|
};
|
|
185
231
|
case "outer":
|
|
186
232
|
return {
|
|
187
233
|
type: "outer",
|
|
188
234
|
primary: h(e.primary, t),
|
|
189
|
-
secondary: e.secondary.map((
|
|
235
|
+
secondary: e.secondary.map((r) => h(r, t))
|
|
190
236
|
};
|
|
191
237
|
default:
|
|
192
|
-
|
|
238
|
+
P(e);
|
|
193
239
|
}
|
|
194
240
|
}
|
|
195
|
-
function
|
|
241
|
+
function B(e) {
|
|
196
242
|
return l(e);
|
|
197
243
|
}
|
|
198
244
|
function g(e) {
|
|
199
245
|
return l(d(e));
|
|
200
246
|
}
|
|
201
|
-
function
|
|
247
|
+
function x(e, t) {
|
|
202
248
|
return JSON.stringify([e, t]);
|
|
203
249
|
}
|
|
204
|
-
class
|
|
250
|
+
class Z {
|
|
205
251
|
/**
|
|
206
252
|
* Creates a new anchor context from a set of anchor column specifications
|
|
207
253
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
208
254
|
*/
|
|
209
255
|
constructor(t) {
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
for (const [
|
|
256
|
+
m(this, "domains", /* @__PURE__ */ new Map()), m(this, "axes", /* @__PURE__ */ new Map()), m(this, "domainPacks", []), m(this, "domainPackToAnchor", /* @__PURE__ */ new Map()), this.anchors = t;
|
|
257
|
+
const r = Object.entries(t);
|
|
258
|
+
r.sort((n, o) => n[0].localeCompare(o[0]));
|
|
259
|
+
for (const [n, o] of r) {
|
|
214
260
|
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
215
261
|
const a = o.axesSpec[i], s = g(a);
|
|
216
|
-
this.axes.set(s, { anchor:
|
|
262
|
+
this.axes.set(s, { anchor: n, idx: i });
|
|
217
263
|
}
|
|
218
264
|
if (o.domain !== void 0) {
|
|
219
265
|
const i = Object.entries(o.domain);
|
|
220
|
-
i.sort((a, s) => a[0].localeCompare(s[0])), this.domainPackToAnchor.set(JSON.stringify(i),
|
|
266
|
+
i.sort((a, s) => a[0].localeCompare(s[0])), this.domainPackToAnchor.set(JSON.stringify(i), n), this.domainPacks.push(i.map(([a]) => a));
|
|
221
267
|
for (const [a, s] of i) {
|
|
222
|
-
const c =
|
|
223
|
-
this.domains.set(c,
|
|
268
|
+
const c = x(a, s);
|
|
269
|
+
this.domains.set(c, n);
|
|
224
270
|
}
|
|
225
271
|
}
|
|
226
272
|
}
|
|
@@ -228,8 +274,8 @@ class F {
|
|
|
228
274
|
/**
|
|
229
275
|
* Implementation of derive method
|
|
230
276
|
*/
|
|
231
|
-
derive(t,
|
|
232
|
-
const
|
|
277
|
+
derive(t, r) {
|
|
278
|
+
const n = {
|
|
233
279
|
name: t.name,
|
|
234
280
|
axes: []
|
|
235
281
|
};
|
|
@@ -239,45 +285,45 @@ class F {
|
|
|
239
285
|
for (const a of this.domainPacks) {
|
|
240
286
|
const s = [];
|
|
241
287
|
for (const f of a) {
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
s.push([f,
|
|
288
|
+
const p = t.domain[f];
|
|
289
|
+
if (p !== void 0)
|
|
290
|
+
s.push([f, p]);
|
|
245
291
|
else
|
|
246
292
|
break e;
|
|
247
293
|
}
|
|
248
294
|
const c = this.domainPackToAnchor.get(JSON.stringify(s));
|
|
249
295
|
if (c !== void 0) {
|
|
250
|
-
|
|
296
|
+
n.domainAnchor = c, o = new Set(a);
|
|
251
297
|
break;
|
|
252
298
|
}
|
|
253
299
|
}
|
|
254
300
|
for (const [a, s] of Object.entries(t.domain ?? {})) {
|
|
255
301
|
if (o !== void 0 && o.has(a))
|
|
256
302
|
continue;
|
|
257
|
-
const c =
|
|
258
|
-
|
|
303
|
+
const c = x(a, s), f = this.domains.get(c);
|
|
304
|
+
n.domain ?? (n.domain = {}), n.domain[a] = f ? { anchor: f } : s;
|
|
259
305
|
}
|
|
260
|
-
if (
|
|
306
|
+
if (n.axes = t.axesSpec.map((a) => {
|
|
261
307
|
const s = g(a), c = this.axes.get(s);
|
|
262
308
|
return c === void 0 ? d(a) : c;
|
|
263
|
-
}), !
|
|
264
|
-
return
|
|
309
|
+
}), !r || r.length === 0)
|
|
310
|
+
return n;
|
|
265
311
|
const i = [];
|
|
266
|
-
for (const a of
|
|
312
|
+
for (const a of r) {
|
|
267
313
|
const [s, c] = a;
|
|
268
314
|
if (typeof s == "number") {
|
|
269
315
|
if (s < 0 || s >= t.axesSpec.length)
|
|
270
316
|
throw new Error(`Axis index ${s} is out of bounds (0-${t.axesSpec.length - 1})`);
|
|
271
317
|
i.push([s, c]);
|
|
272
318
|
} else {
|
|
273
|
-
const f = t.axesSpec.findIndex((
|
|
319
|
+
const f = t.axesSpec.findIndex((p) => p.name === s);
|
|
274
320
|
if (f === -1)
|
|
275
321
|
throw new Error(`Axis with name "${s}" not found in the column specification`);
|
|
276
322
|
i.push([f, c]);
|
|
277
323
|
}
|
|
278
324
|
}
|
|
279
325
|
return i.sort((a, s) => a[0] - s[0]), {
|
|
280
|
-
source:
|
|
326
|
+
source: n,
|
|
281
327
|
axisFilters: i
|
|
282
328
|
};
|
|
283
329
|
}
|
|
@@ -287,22 +333,22 @@ class F {
|
|
|
287
333
|
* @param axisFilters Optional axis filters to apply to the column
|
|
288
334
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
289
335
|
*/
|
|
290
|
-
deriveS(t,
|
|
291
|
-
return
|
|
336
|
+
deriveS(t, r) {
|
|
337
|
+
return B(this.derive(t, r));
|
|
292
338
|
}
|
|
293
339
|
}
|
|
294
|
-
function
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
const i = e[
|
|
340
|
+
function H(e, t, r) {
|
|
341
|
+
const n = { ...t }, o = (r == null ? void 0 : r.ignoreMissingDomains) ?? !1;
|
|
342
|
+
if (n.domainAnchor !== void 0) {
|
|
343
|
+
const i = e[n.domainAnchor];
|
|
298
344
|
if (!i)
|
|
299
|
-
throw new Error(`Anchor "${
|
|
345
|
+
throw new Error(`Anchor "${n.domainAnchor}" not found`);
|
|
300
346
|
const a = i.domain || {};
|
|
301
|
-
|
|
347
|
+
n.domain = { ...a, ...n.domain }, delete n.domainAnchor;
|
|
302
348
|
}
|
|
303
|
-
if (
|
|
349
|
+
if (n.domain) {
|
|
304
350
|
const i = {};
|
|
305
|
-
for (const [a, s] of Object.entries(
|
|
351
|
+
for (const [a, s] of Object.entries(n.domain))
|
|
306
352
|
if (typeof s == "string")
|
|
307
353
|
i[a] = s;
|
|
308
354
|
else {
|
|
@@ -316,82 +362,82 @@ function z(e, t, n) {
|
|
|
316
362
|
}
|
|
317
363
|
i[a] = c.domain[a];
|
|
318
364
|
}
|
|
319
|
-
|
|
365
|
+
n.domain = i;
|
|
320
366
|
}
|
|
321
|
-
return
|
|
367
|
+
return n.axes && (n.axes = n.axes.map((i) => D(e, i))), n;
|
|
322
368
|
}
|
|
323
|
-
function
|
|
324
|
-
if (!
|
|
369
|
+
function D(e, t) {
|
|
370
|
+
if (!K(t))
|
|
325
371
|
return t;
|
|
326
|
-
const
|
|
327
|
-
if (!
|
|
328
|
-
throw new Error(`Anchor "${
|
|
372
|
+
const r = t.anchor, n = e[r];
|
|
373
|
+
if (!n)
|
|
374
|
+
throw new Error(`Anchor "${r}" not found for axis reference`);
|
|
329
375
|
if ("idx" in t) {
|
|
330
|
-
if (t.idx < 0 || t.idx >=
|
|
331
|
-
throw new Error(`Axis index ${t.idx} out of bounds for anchor "${
|
|
332
|
-
return
|
|
376
|
+
if (t.idx < 0 || t.idx >= n.axesSpec.length)
|
|
377
|
+
throw new Error(`Axis index ${t.idx} out of bounds for anchor "${r}"`);
|
|
378
|
+
return n.axesSpec[t.idx];
|
|
333
379
|
} else if ("name" in t) {
|
|
334
|
-
const o =
|
|
380
|
+
const o = n.axesSpec.filter((i) => i.name === t.name);
|
|
335
381
|
if (o.length > 1)
|
|
336
|
-
throw new Error(`Multiple axes with name "${t.name}" found in anchor "${
|
|
382
|
+
throw new Error(`Multiple axes with name "${t.name}" found in anchor "${r}"`);
|
|
337
383
|
if (o.length === 0)
|
|
338
|
-
throw new Error(`Axis with name "${t.name}" not found in anchor "${
|
|
384
|
+
throw new Error(`Axis with name "${t.name}" not found in anchor "${r}"`);
|
|
339
385
|
return o[0];
|
|
340
386
|
} else if ("id" in t) {
|
|
341
|
-
const o =
|
|
387
|
+
const o = n.axesSpec.filter((i) => T(t.id, d(i)));
|
|
342
388
|
if (o.length > 1)
|
|
343
|
-
throw new Error(`Multiple matching axes found for matcher in anchor "${
|
|
389
|
+
throw new Error(`Multiple matching axes found for matcher in anchor "${r}"`);
|
|
344
390
|
if (o.length === 0)
|
|
345
|
-
throw new Error(`No matching axis found for matcher in anchor "${
|
|
391
|
+
throw new Error(`No matching axis found for matcher in anchor "${r}"`);
|
|
346
392
|
return o[0];
|
|
347
393
|
}
|
|
348
394
|
throw new Error("Unsupported axis reference type");
|
|
349
395
|
}
|
|
350
|
-
function
|
|
396
|
+
function K(e) {
|
|
351
397
|
return typeof e == "object" && "anchor" in e;
|
|
352
398
|
}
|
|
353
399
|
function y(e) {
|
|
354
400
|
return e.kind === "PColumn";
|
|
355
401
|
}
|
|
356
|
-
function
|
|
402
|
+
function M(e) {
|
|
357
403
|
return y(e.spec);
|
|
358
404
|
}
|
|
359
|
-
function
|
|
360
|
-
if (!
|
|
405
|
+
function W(e) {
|
|
406
|
+
if (!M(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
361
407
|
return e;
|
|
362
408
|
}
|
|
363
|
-
function
|
|
409
|
+
function ee(e, t) {
|
|
364
410
|
return e === void 0 ? void 0 : {
|
|
365
411
|
...e,
|
|
366
412
|
data: t(e.data)
|
|
367
413
|
};
|
|
368
414
|
}
|
|
369
|
-
function
|
|
370
|
-
const t = /* @__PURE__ */ new Map(),
|
|
371
|
-
switch (
|
|
415
|
+
function te(e) {
|
|
416
|
+
const t = /* @__PURE__ */ new Map(), r = (n) => {
|
|
417
|
+
switch (n.type) {
|
|
372
418
|
case "column":
|
|
373
|
-
t.set(
|
|
419
|
+
t.set(n.column.id, n.column);
|
|
374
420
|
return;
|
|
375
421
|
case "slicedColumn":
|
|
376
|
-
t.set(
|
|
422
|
+
t.set(n.column.id, n.column);
|
|
377
423
|
return;
|
|
378
424
|
case "inlineColumn":
|
|
379
425
|
return;
|
|
380
426
|
case "full":
|
|
381
427
|
case "inner":
|
|
382
|
-
for (const o of
|
|
428
|
+
for (const o of n.entries) r(o);
|
|
383
429
|
return;
|
|
384
430
|
case "outer":
|
|
385
|
-
n
|
|
386
|
-
for (const o of
|
|
431
|
+
r(n.primary);
|
|
432
|
+
for (const o of n.secondary) r(o);
|
|
387
433
|
return;
|
|
388
434
|
default:
|
|
389
|
-
|
|
435
|
+
P(n);
|
|
390
436
|
}
|
|
391
437
|
};
|
|
392
|
-
return
|
|
438
|
+
return r(e), [...t.values()];
|
|
393
439
|
}
|
|
394
|
-
function
|
|
440
|
+
function v(e, t) {
|
|
395
441
|
if (e.name !== void 0 && e.name !== t.name)
|
|
396
442
|
return !1;
|
|
397
443
|
if (e.type !== void 0) {
|
|
@@ -402,14 +448,14 @@ function x(e, t) {
|
|
|
402
448
|
return !1;
|
|
403
449
|
}
|
|
404
450
|
if (e.domain !== void 0) {
|
|
405
|
-
const
|
|
406
|
-
for (const [
|
|
407
|
-
if (n
|
|
451
|
+
const r = t.domain || {};
|
|
452
|
+
for (const [n, o] of Object.entries(e.domain))
|
|
453
|
+
if (r[n] !== o)
|
|
408
454
|
return !1;
|
|
409
455
|
}
|
|
410
456
|
return !0;
|
|
411
457
|
}
|
|
412
|
-
function
|
|
458
|
+
function w(e, t) {
|
|
413
459
|
if (t.name !== void 0 && e.name !== t.name || t.namePattern !== void 0 && !new RegExp(t.namePattern).test(e.name))
|
|
414
460
|
return !1;
|
|
415
461
|
if (t.type !== void 0) {
|
|
@@ -420,50 +466,50 @@ function v(e, t) {
|
|
|
420
466
|
return !1;
|
|
421
467
|
}
|
|
422
468
|
if (t.domain !== void 0) {
|
|
423
|
-
const
|
|
424
|
-
for (const [
|
|
425
|
-
if (n
|
|
469
|
+
const r = e.domain || {};
|
|
470
|
+
for (const [n, o] of Object.entries(t.domain))
|
|
471
|
+
if (r[n] !== o)
|
|
426
472
|
return !1;
|
|
427
473
|
}
|
|
428
474
|
if (t.axes !== void 0) {
|
|
429
|
-
const
|
|
475
|
+
const r = e.axesSpec.map(d);
|
|
430
476
|
if (t.partialAxesMatch) {
|
|
431
|
-
for (const
|
|
432
|
-
if (!
|
|
477
|
+
for (const n of t.axes)
|
|
478
|
+
if (!r.some((o) => v(n, o)))
|
|
433
479
|
return !1;
|
|
434
480
|
} else {
|
|
435
|
-
if (
|
|
481
|
+
if (r.length !== t.axes.length)
|
|
436
482
|
return !1;
|
|
437
|
-
for (let
|
|
438
|
-
if (!
|
|
483
|
+
for (let n = 0; n < t.axes.length; n++)
|
|
484
|
+
if (!v(t.axes[n], r[n]))
|
|
439
485
|
return !1;
|
|
440
486
|
}
|
|
441
487
|
}
|
|
442
488
|
if (t.annotations !== void 0) {
|
|
443
|
-
const
|
|
444
|
-
for (const [
|
|
445
|
-
if (n
|
|
489
|
+
const r = e.annotations || {};
|
|
490
|
+
for (const [n, o] of Object.entries(t.annotations))
|
|
491
|
+
if (r[n] !== o)
|
|
446
492
|
return !1;
|
|
447
493
|
}
|
|
448
494
|
if (t.annotationPatterns !== void 0) {
|
|
449
|
-
const
|
|
450
|
-
for (const [
|
|
451
|
-
const i = n
|
|
495
|
+
const r = e.annotations || {};
|
|
496
|
+
for (const [n, o] of Object.entries(t.annotationPatterns)) {
|
|
497
|
+
const i = r[n];
|
|
452
498
|
if (i === void 0 || !new RegExp(o).test(i))
|
|
453
499
|
return !1;
|
|
454
500
|
}
|
|
455
501
|
}
|
|
456
502
|
return !0;
|
|
457
503
|
}
|
|
458
|
-
function
|
|
459
|
-
return Array.isArray(e) ? (t) => e.some((
|
|
504
|
+
function ne(e) {
|
|
505
|
+
return Array.isArray(e) ? (t) => e.some((r) => y(t) && w(t, r)) : (t) => y(t) && w(t, e);
|
|
460
506
|
}
|
|
461
|
-
function
|
|
507
|
+
function re(e) {
|
|
462
508
|
const t = {
|
|
463
509
|
kind: e.kind,
|
|
464
510
|
name: e.name
|
|
465
511
|
};
|
|
466
|
-
return e.domain !== void 0 && (t.domain = e.domain), y(e) && (t.axesSpec =
|
|
512
|
+
return e.domain !== void 0 && (t.domain = e.domain), y(e) && (t.axesSpec = $(e.axesSpec)), l(t);
|
|
467
513
|
}
|
|
468
514
|
u.object({
|
|
469
515
|
__isRef: u.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
@@ -473,57 +519,66 @@ u.object({
|
|
|
473
519
|
}).describe(
|
|
474
520
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
475
521
|
).readonly();
|
|
476
|
-
function
|
|
522
|
+
function oe(e) {
|
|
477
523
|
return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === !0 && "blockId" in e && "name" in e;
|
|
478
524
|
}
|
|
479
|
-
function
|
|
525
|
+
function ie(e, t = !0) {
|
|
480
526
|
if (t)
|
|
481
527
|
return {
|
|
482
528
|
...e,
|
|
483
529
|
requireEnrichments: !0
|
|
484
530
|
};
|
|
485
531
|
{
|
|
486
|
-
const { requireEnrichments:
|
|
487
|
-
return
|
|
532
|
+
const { requireEnrichments: r, ...n } = e;
|
|
533
|
+
return n;
|
|
488
534
|
}
|
|
489
535
|
}
|
|
490
|
-
function
|
|
536
|
+
function ae(e, t) {
|
|
491
537
|
return e.ok ? { ok: !0, value: t(e.value) } : e;
|
|
492
538
|
}
|
|
493
|
-
const
|
|
494
|
-
u.string().length(
|
|
495
|
-
function
|
|
539
|
+
const V = 24;
|
|
540
|
+
u.string().length(V).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
541
|
+
function se(e) {
|
|
496
542
|
return l(e);
|
|
497
543
|
}
|
|
498
544
|
export {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
545
|
+
Z as AnchoredIdDeriver,
|
|
546
|
+
J as PTableAbsent,
|
|
547
|
+
L as PTableNA,
|
|
548
|
+
N as PValueBytesNA,
|
|
549
|
+
E as PValueIntNA,
|
|
550
|
+
b as PValueLongNA,
|
|
551
|
+
j as PValueStringNA,
|
|
552
|
+
V as PlIdLength,
|
|
553
|
+
X as canonicalizeAxisId,
|
|
554
|
+
se as canonicalizeJson,
|
|
555
|
+
U as dataInfoToEntries,
|
|
556
|
+
re as deriveNativeId,
|
|
557
|
+
W as ensurePColumn,
|
|
558
|
+
G as entriesToDataInfo,
|
|
559
|
+
te as extractAllColumns,
|
|
560
|
+
$ as getAxesId,
|
|
509
561
|
d as getAxisId,
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
562
|
+
F as isDataInfo,
|
|
563
|
+
S as isDataInfoEntries,
|
|
564
|
+
M as isPColumn,
|
|
513
565
|
y as isPColumnSpec,
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
566
|
+
q as isPartitionedDataInfoEntries,
|
|
567
|
+
oe as isPlRef,
|
|
568
|
+
I as isValueAbsent,
|
|
569
|
+
O as isValueNA,
|
|
570
|
+
z as mapDataInfo,
|
|
517
571
|
h as mapJoinEntry,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
572
|
+
ee as mapPObjectData,
|
|
573
|
+
Y as mapPTableDef,
|
|
574
|
+
ae as mapValueInVOE,
|
|
575
|
+
v as matchAxis,
|
|
576
|
+
T as matchAxisId,
|
|
577
|
+
w as matchPColumn,
|
|
578
|
+
Q as pTableValue,
|
|
579
|
+
H as resolveAnchors,
|
|
580
|
+
ne as selectorsToPredicate,
|
|
581
|
+
B as stringifyColumnId,
|
|
582
|
+
ie as withEnrichments
|
|
528
583
|
};
|
|
529
584
|
//# sourceMappingURL=index.js.map
|