@milaboratories/graph-maker 1.1.139 → 1.1.140
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/components/Chart.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/Chart.vue.js +1 -0
- package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
- package/dist/GraphMaker/dataBindAes.d.ts +5 -5
- package/dist/GraphMaker/dataBindAes.d.ts.map +1 -1
- package/dist/GraphMaker/dataBindAes.js +52 -49
- package/dist/GraphMaker/dataBindAes.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js +14 -14
- package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.d.ts.map +1 -1
- package/dist/GraphMaker/index.vue.js +125 -124
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/types.d.ts +1 -1
- package/dist/GraphMaker/types.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +3 -3
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -8
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +2 -2
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +5 -5
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +7 -7
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +9 -9
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +20 -16
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +56 -62
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +20 -16
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +20 -19
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +57 -54
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +8 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +22 -22
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js +4 -22
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +53 -53
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +6 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +45 -45
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +71 -70
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +117 -112
- 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 +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +6 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +36 -36
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +24 -24
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +23 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +13 -10
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +67 -73
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +44 -39
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js +18 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +68 -64
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +23 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +23 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js +7 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +690 -684
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import z from "../../../canonicalize/lib/canonicalize.js";
|
|
2
|
-
import { deriveLabels as
|
|
2
|
+
import { deriveLabels as Fe, isLabelColumn as Le } from "../../../@platforma-sdk/model/dist/index.js";
|
|
3
3
|
import { canonicalizeJson as j, pTableValue as Te } from "../../pl-model-common/dist/index.js";
|
|
4
|
-
import
|
|
5
|
-
var ke = "pl7.app/axisNature", we = "pl7.app/label", Ee = "pl7.app/columnAsAxis/name", Ne = "pl7.app/columnAsAxis/domain", $ = "pl7.app/isSubset",
|
|
4
|
+
import pe from "../../../lodash/lodash.js";
|
|
5
|
+
var ke = "pl7.app/axisNature", we = "pl7.app/label", Ee = "pl7.app/columnAsAxis/name", Ne = "pl7.app/columnAsAxis/domain", $ = "pl7.app/isSubset", te = "pl7.app/isDiscreteFilter", Ge = "pl7.app/discreteValues", Me = "pl7.app/graph/axis/highCardinality", qe = "pl7.app/graph/isVirtual", ve = "pl7.app/isLinkerColumn", ne = "pl7.app/format", F = class ae {
|
|
6
6
|
constructor({ type: e, name: o, domain: n }) {
|
|
7
7
|
this.kind = "axis", this.type = e, this.name = o, this.domain = { ...n };
|
|
8
8
|
}
|
|
@@ -10,13 +10,13 @@ var ke = "pl7.app/axisNature", we = "pl7.app/label", Ee = "pl7.app/columnAsAxis/
|
|
|
10
10
|
return z(this);
|
|
11
11
|
}
|
|
12
12
|
static fromAxisSpec(e) {
|
|
13
|
-
return new
|
|
13
|
+
return new ae({ name: e.name, type: e.type, domain: e.domain });
|
|
14
14
|
}
|
|
15
15
|
static fromAxesSpec(e) {
|
|
16
|
-
return e.map((o) =>
|
|
16
|
+
return e.map((o) => ae.fromAxisSpec(o));
|
|
17
17
|
}
|
|
18
18
|
copy() {
|
|
19
|
-
return new
|
|
19
|
+
return new ae({ type: this.type, name: this.name, domain: this.domain });
|
|
20
20
|
}
|
|
21
21
|
toPFrameId() {
|
|
22
22
|
return {
|
|
@@ -26,9 +26,9 @@ var ke = "pl7.app/axisNature", we = "pl7.app/label", Ee = "pl7.app/columnAsAxis/
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
static fromPojo(e) {
|
|
29
|
-
return new
|
|
29
|
+
return new ae(e);
|
|
30
30
|
}
|
|
31
|
-
}, W = class
|
|
31
|
+
}, W = class Ce {
|
|
32
32
|
constructor({ name: e, type: o }) {
|
|
33
33
|
this.kind = "column", this.name = e, this.type = o;
|
|
34
34
|
}
|
|
@@ -36,21 +36,21 @@ var ke = "pl7.app/axisNature", we = "pl7.app/label", Ee = "pl7.app/columnAsAxis/
|
|
|
36
36
|
return z(this);
|
|
37
37
|
}
|
|
38
38
|
static fromPojo(e) {
|
|
39
|
-
return new
|
|
39
|
+
return new Ce(e);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function O(t) {
|
|
43
43
|
return t !== null && t.kind === "column";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function re(t) {
|
|
46
46
|
return t !== null && t.kind === "axis";
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function b(t) {
|
|
49
49
|
const e = JSON.parse(t);
|
|
50
50
|
if (e.kind === "column")
|
|
51
51
|
return W.fromPojo(e);
|
|
52
52
|
if (e.kind === "axis")
|
|
53
|
-
return
|
|
53
|
+
return F.fromPojo(e);
|
|
54
54
|
throw Error("wrong column or axis object");
|
|
55
55
|
}
|
|
56
56
|
var fe = "pl7.app/parents";
|
|
@@ -111,7 +111,7 @@ function Ue(t) {
|
|
|
111
111
|
}
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function oe(t) {
|
|
115
115
|
if (!t.length)
|
|
116
116
|
return [];
|
|
117
117
|
let e = t;
|
|
@@ -132,7 +132,7 @@ function We(t) {
|
|
|
132
132
|
var e, o;
|
|
133
133
|
const n = /* @__PURE__ */ new Map();
|
|
134
134
|
for (const l of t) {
|
|
135
|
-
const s = new W({ name: l.columnId, type: l.spec.valueType }), c =
|
|
135
|
+
const s = new W({ name: l.columnId, type: l.spec.valueType }), c = oe(l.spec.axesSpec);
|
|
136
136
|
if (!c || c.length !== 2)
|
|
137
137
|
continue;
|
|
138
138
|
const [r, a] = c, u = j(r), p = j(a);
|
|
@@ -141,59 +141,59 @@ function We(t) {
|
|
|
141
141
|
return n;
|
|
142
142
|
}
|
|
143
143
|
async function He(t, e, o, n, l, s, c, r = !0, a) {
|
|
144
|
-
var u, p, m,
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
if (!
|
|
144
|
+
var u, p, m, S;
|
|
145
|
+
const h = b(e);
|
|
146
|
+
if (O(h)) {
|
|
147
|
+
const x = await t.pFrameProvider.getColumnSpecById(h);
|
|
148
|
+
if (!x)
|
|
149
149
|
return;
|
|
150
150
|
const w = De(
|
|
151
|
-
|
|
151
|
+
x,
|
|
152
152
|
l,
|
|
153
153
|
s,
|
|
154
154
|
c,
|
|
155
155
|
a
|
|
156
|
-
).map((d) =>
|
|
156
|
+
).map((d) => F.fromAxisSpec(d).toCanonicalString()), v = new Set(w), D = x.axesSpec.map((d) => F.fromAxisSpec(d).toCanonicalString()), B = {};
|
|
157
157
|
r && D.forEach((d, i) => {
|
|
158
|
-
|
|
158
|
+
v.has(d) && (B[d] = i);
|
|
159
159
|
});
|
|
160
|
-
const
|
|
160
|
+
const C = {
|
|
161
161
|
kind: "column",
|
|
162
|
-
name:
|
|
162
|
+
name: x.name,
|
|
163
163
|
label: o ?? await T(t, e, []),
|
|
164
|
-
type:
|
|
165
|
-
spec:
|
|
166
|
-
annotations:
|
|
167
|
-
isSubsetFilter: ((u =
|
|
168
|
-
isDiscreteFilter:
|
|
164
|
+
type: x.valueType,
|
|
165
|
+
spec: x,
|
|
166
|
+
annotations: x.annotations,
|
|
167
|
+
isSubsetFilter: ((u = x.annotations) == null ? void 0 : u[$]) === "true",
|
|
168
|
+
isDiscreteFilter: x.valueType === "String" || ((p = x.annotations) == null ? void 0 : p[te]) === "true",
|
|
169
169
|
axesToBeFixed: w,
|
|
170
170
|
axesToBeFixedIndexes: B
|
|
171
171
|
};
|
|
172
|
-
n.set(
|
|
173
|
-
for (const d of
|
|
174
|
-
const
|
|
175
|
-
if (n.has(
|
|
172
|
+
n.set(h.toCanonicalString(), C);
|
|
173
|
+
for (const d of x.axesSpec) {
|
|
174
|
+
const y = F.fromAxisSpec(d).toCanonicalString();
|
|
175
|
+
if (n.has(y))
|
|
176
176
|
continue;
|
|
177
|
-
const f = Ie(d),
|
|
177
|
+
const f = Ie(d), g = {
|
|
178
178
|
kind: "axis",
|
|
179
179
|
name: d.name,
|
|
180
|
-
label: await T(t,
|
|
180
|
+
label: await T(t, y, [e]),
|
|
181
181
|
type: d.type,
|
|
182
182
|
mustBeConsumed: f,
|
|
183
183
|
dividable: !1,
|
|
184
184
|
spec: d,
|
|
185
185
|
annotations: d.annotations,
|
|
186
186
|
isSubsetFilter: ((m = d.annotations) == null ? void 0 : m[$]) === "true",
|
|
187
|
-
isDiscreteFilter: d.type === "String" || ((
|
|
187
|
+
isDiscreteFilter: d.type === "String" || ((S = d.annotations) == null ? void 0 : S[te]) === "true",
|
|
188
188
|
parentSources: [e]
|
|
189
189
|
};
|
|
190
|
-
n.set(
|
|
190
|
+
n.set(y, g);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
function ge(t) {
|
|
195
|
-
const e =
|
|
196
|
-
return
|
|
195
|
+
const e = b(t), { name: o, type: n } = e;
|
|
196
|
+
return O(e) ? {
|
|
197
197
|
kind: "column",
|
|
198
198
|
name: "",
|
|
199
199
|
label: " ",
|
|
@@ -226,21 +226,21 @@ function me(t) {
|
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
228
|
function Ye(t) {
|
|
229
|
-
const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s =
|
|
229
|
+
const { selectedSource: e, type: o, selectedFilterRange: n, selectedFilterValue: l } = t, s = b(e);
|
|
230
230
|
if (!s)
|
|
231
231
|
throw Error("Empty source selected");
|
|
232
232
|
if (o === "range") {
|
|
233
233
|
const c = [];
|
|
234
234
|
return (n == null ? void 0 : n.max) !== void 0 && c.push({
|
|
235
235
|
type: "bySingleColumnV2",
|
|
236
|
-
column:
|
|
236
|
+
column: re(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
|
|
237
237
|
predicate: {
|
|
238
238
|
operator: "LessOrEqual",
|
|
239
239
|
reference: n.max
|
|
240
240
|
}
|
|
241
241
|
}), (n == null ? void 0 : n.min) !== void 0 && c.push({
|
|
242
242
|
type: "bySingleColumnV2",
|
|
243
|
-
column:
|
|
243
|
+
column: re(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
|
|
244
244
|
predicate: {
|
|
245
245
|
operator: "GreaterOrEqual",
|
|
246
246
|
reference: n == null ? void 0 : n.min
|
|
@@ -250,7 +250,7 @@ function Ye(t) {
|
|
|
250
250
|
return [
|
|
251
251
|
{
|
|
252
252
|
type: "bySingleColumnV2",
|
|
253
|
-
column:
|
|
253
|
+
column: re(s) ? { type: "axis", id: s.toPFrameId() } : { type: "column", id: s.name },
|
|
254
254
|
predicate: {
|
|
255
255
|
operator: "Not",
|
|
256
256
|
operand: { operator: "IsNA" }
|
|
@@ -260,7 +260,7 @@ function Ye(t) {
|
|
|
260
260
|
return typeof l > "u" ? [] : [
|
|
261
261
|
{
|
|
262
262
|
type: "bySingleColumnV2",
|
|
263
|
-
column:
|
|
263
|
+
column: re(s) ? { type: "axis", id: s.toPFrameId() } : {
|
|
264
264
|
type: "column",
|
|
265
265
|
id: s.name
|
|
266
266
|
},
|
|
@@ -289,10 +289,10 @@ function xe(t) {
|
|
|
289
289
|
async function be(t, e, o) {
|
|
290
290
|
var n;
|
|
291
291
|
for (const l of o) {
|
|
292
|
-
const s =
|
|
293
|
-
if (
|
|
292
|
+
const s = b(l);
|
|
293
|
+
if (O(s)) {
|
|
294
294
|
const c = await t.pFrameProvider.getColumnSpecById(s), r = ((n = c == null ? void 0 : c.axesSpec) != null ? n : []).find(
|
|
295
|
-
(a) =>
|
|
295
|
+
(a) => F.fromAxisSpec(a).toCanonicalString() === e.toCanonicalString()
|
|
296
296
|
);
|
|
297
297
|
if (r)
|
|
298
298
|
return r;
|
|
@@ -302,8 +302,8 @@ async function be(t, e, o) {
|
|
|
302
302
|
}
|
|
303
303
|
var Re = "pl7.app/label";
|
|
304
304
|
async function k(t, e, o) {
|
|
305
|
-
const n =
|
|
306
|
-
if (
|
|
305
|
+
const n = b(e);
|
|
306
|
+
if (O(n))
|
|
307
307
|
return;
|
|
308
308
|
async function l(a) {
|
|
309
309
|
const u = await be(t, a, o);
|
|
@@ -312,14 +312,14 @@ async function k(t, e, o) {
|
|
|
312
312
|
const s = await t.pFrameProvider.getColumnsFull([], !1, void 0, [Re]), c = await l(n), r = s.find(({ spec: a }) => a && a.axesSpec.length === 1 && xe(a.axesSpec[0]) === c);
|
|
313
313
|
return r ? new W({ name: r.columnId, type: r.spec.valueType }) : void 0;
|
|
314
314
|
}
|
|
315
|
-
async function
|
|
316
|
-
const n =
|
|
315
|
+
async function J(t, e, o) {
|
|
316
|
+
const n = b(e), l = await k(t, e, o);
|
|
317
317
|
let s;
|
|
318
|
-
return
|
|
318
|
+
return O(n) ? s = await t.pFrameProvider.getColumnSpecById(l ?? n) : s = l ? await t.pFrameProvider.getColumnSpecById(l) : await be(t, n, o), s;
|
|
319
319
|
}
|
|
320
320
|
async function T(t, e, o) {
|
|
321
321
|
var n, l;
|
|
322
|
-
const s = await
|
|
322
|
+
const s = await J(t, e, o);
|
|
323
323
|
if (!s)
|
|
324
324
|
return "";
|
|
325
325
|
const c = (l = (n = s.annotations) == null ? void 0 : n[we]) != null ? l : s.name;
|
|
@@ -332,7 +332,7 @@ function Ie(t) {
|
|
|
332
332
|
}
|
|
333
333
|
function R(t) {
|
|
334
334
|
var e, o;
|
|
335
|
-
return ((e = t.annotations) == null ? void 0 : e[$]) === "true" || ((o = t.annotations) == null ? void 0 : o[
|
|
335
|
+
return ((e = t.annotations) == null ? void 0 : e[$]) === "true" || ((o = t.annotations) == null ? void 0 : o[te]) === "true", !0;
|
|
336
336
|
}
|
|
337
337
|
function Xe(t) {
|
|
338
338
|
var e, o;
|
|
@@ -344,22 +344,22 @@ function $e(t) {
|
|
|
344
344
|
for (const n of t.filter((l) => l.spec.axesSpec.length === 2)) {
|
|
345
345
|
const l = new W({ name: n.columnId, type: n.spec.valueType }), s = (e = n.spec.axesSpec) != null ? e : [];
|
|
346
346
|
if (s.length) {
|
|
347
|
-
const [c, r] = s, a =
|
|
347
|
+
const [c, r] = s, a = F.fromAxisSpec(c).toCanonicalString(), u = F.fromAxisSpec(r).toCanonicalString();
|
|
348
348
|
o[a] || (o[a] = {}), o[u] || (o[u] = {}), o[a][u] = { id: l, spec: n.spec }, o[u][a] = { id: l, spec: n.spec };
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
return o;
|
|
352
352
|
}
|
|
353
|
-
async function
|
|
353
|
+
async function Q(t, e) {
|
|
354
354
|
const o = /* @__PURE__ */ new Set(), n = [];
|
|
355
355
|
for (const l of e) {
|
|
356
|
-
const s =
|
|
357
|
-
if (
|
|
356
|
+
const s = b(l);
|
|
357
|
+
if (O(s)) {
|
|
358
358
|
const c = await t.pFrameProvider.getColumnSpecById(s);
|
|
359
359
|
if (!c)
|
|
360
360
|
continue;
|
|
361
361
|
c.axesSpec.forEach((r) => {
|
|
362
|
-
const a =
|
|
362
|
+
const a = F.fromAxisSpec(r).toCanonicalString();
|
|
363
363
|
o.has(a) || (o.add(a), n.push(r));
|
|
364
364
|
});
|
|
365
365
|
}
|
|
@@ -380,7 +380,7 @@ function Je(t, e, o) {
|
|
|
380
380
|
let m = o;
|
|
381
381
|
for (; n[m] !== e; )
|
|
382
382
|
p.push(m), m = n[m];
|
|
383
|
-
return p.push(m), p.map((
|
|
383
|
+
return p.push(m), p.map((S) => t[S][n[S]].id);
|
|
384
384
|
} else l.has(u) || (c.add(u), l.add(u));
|
|
385
385
|
}
|
|
386
386
|
s = [...c];
|
|
@@ -402,84 +402,84 @@ async function X(t) {
|
|
|
402
402
|
!1,
|
|
403
403
|
void 0,
|
|
404
404
|
void 0,
|
|
405
|
-
{ [
|
|
405
|
+
{ [ve]: "true" }
|
|
406
406
|
), o = $e(e.filter((l) => l.spec.axesSpec.length === 2)), n = We(e.filter((l) => l.spec.axesSpec.length > 2));
|
|
407
407
|
return { linkerColumnsMap: o, compositeLinkerMap: n };
|
|
408
408
|
}
|
|
409
409
|
async function V(t, e, o, n, l, s) {
|
|
410
|
-
const c =
|
|
411
|
-
if (!
|
|
410
|
+
const c = b(l);
|
|
411
|
+
if (!O(c))
|
|
412
412
|
return [];
|
|
413
413
|
const r = await t.pFrameProvider.getColumnSpecById(c);
|
|
414
414
|
if (!r)
|
|
415
415
|
return [];
|
|
416
416
|
const a = r.axesSpec.filter(
|
|
417
417
|
(w) => {
|
|
418
|
-
const
|
|
419
|
-
return !(s != null && s.some((D) => D.axisSource ===
|
|
418
|
+
const v = F.fromAxisSpec(w).toCanonicalString();
|
|
419
|
+
return !(s != null && s.some((D) => D.axisSource === v));
|
|
420
420
|
}
|
|
421
|
-
), u = new Set(n.map((w) =>
|
|
422
|
-
const
|
|
423
|
-
return !u.has(
|
|
421
|
+
), u = new Set(n.map((w) => F.fromAxisSpec(w).toCanonicalString())), p = a.filter((w) => {
|
|
422
|
+
const v = F.fromAxisSpec(w).toCanonicalString();
|
|
423
|
+
return !u.has(v);
|
|
424
424
|
});
|
|
425
425
|
if (!p.length)
|
|
426
426
|
return [];
|
|
427
|
-
const m =
|
|
428
|
-
if (!m || !
|
|
427
|
+
const m = oe(n), S = oe(p);
|
|
428
|
+
if (!m || !S)
|
|
429
429
|
throw Error(`Can't create axes tree for ${r.name}`);
|
|
430
|
-
const
|
|
431
|
-
return
|
|
432
|
-
var
|
|
430
|
+
const h = new Set(m.map(j)), x = /* @__PURE__ */ new Set();
|
|
431
|
+
return S.forEach((w) => {
|
|
432
|
+
var v;
|
|
433
433
|
const D = j(w);
|
|
434
434
|
if (o.has(D)) {
|
|
435
|
-
const B = o.get(D), d = (B ? [...B.keys()] : []).find((
|
|
435
|
+
const B = o.get(D), d = (B ? [...B.keys()] : []).find((y) => h.has(y));
|
|
436
436
|
if (!d)
|
|
437
437
|
throw Error(`Can't find composite linker column for ${r.name}, ${D}`);
|
|
438
|
-
const i = (
|
|
439
|
-
|
|
438
|
+
const i = (v = o.get(D)) == null ? void 0 : v.get(d);
|
|
439
|
+
x.add(i.toCanonicalString());
|
|
440
440
|
} else if (w.length === 1) {
|
|
441
|
-
const B =
|
|
441
|
+
const B = F.fromAxisSpec(w[0]).toCanonicalString();
|
|
442
442
|
Qe(e, u, B).forEach((d) => {
|
|
443
|
-
|
|
443
|
+
x.add(d.toCanonicalString());
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
}), [...
|
|
446
|
+
}), [...x].map((w) => b(w));
|
|
447
447
|
}
|
|
448
448
|
function De(t, e, o, n, l) {
|
|
449
449
|
const c = t.axesSpec.filter(
|
|
450
|
-
(p) => !o.has(
|
|
450
|
+
(p) => !o.has(F.fromAxisSpec(p).toCanonicalString())
|
|
451
451
|
);
|
|
452
452
|
if (!c.length)
|
|
453
453
|
return [];
|
|
454
|
-
const r =
|
|
455
|
-
let a =
|
|
454
|
+
const r = oe(e);
|
|
455
|
+
let a = oe(c);
|
|
456
456
|
if (!r || !a)
|
|
457
457
|
return c;
|
|
458
458
|
const u = new Set(r.map(j));
|
|
459
459
|
return a = a.filter(
|
|
460
460
|
(p) => {
|
|
461
|
-
const m = j(p),
|
|
462
|
-
return !(
|
|
461
|
+
const m = j(p), S = l.get(m);
|
|
462
|
+
return !(S ? [...S.keys()] : []).some((x) => u.has(x));
|
|
463
463
|
}
|
|
464
|
-
), a.some((p) => p.length > 1) ? a.flatMap((p) => p) : (a = a.filter(([p]) => !n.has(
|
|
464
|
+
), a.some((p) => p.length > 1) ? a.flatMap((p) => p) : (a = a.filter(([p]) => !n.has(F.fromAxisSpec(p).toCanonicalString())), a.flatMap((p) => p));
|
|
465
465
|
}
|
|
466
466
|
function Be(t, e) {
|
|
467
467
|
const o = e.columnsData[Object.keys(e.columnsData)[0]].length, n = new Int32Array(o).fill(0);
|
|
468
468
|
for (let l = 0; l < o; l++) {
|
|
469
469
|
let s = !1;
|
|
470
470
|
for (let c = 0; c < t.length; c++) {
|
|
471
|
-
const { selectedSource: r, selectedFilterValue: a, selectedFilterRange: u, type: p } = t[c], m =
|
|
472
|
-
if (a !== void 0 && (s = s ||
|
|
473
|
-
let
|
|
474
|
-
u.min !== void 0 && (
|
|
471
|
+
const { selectedSource: r, selectedFilterValue: a, selectedFilterRange: u, type: p } = t[c], m = b(r), S = (O(m) ? e.columnsData[r] : e.axesData[r])[l];
|
|
472
|
+
if (a !== void 0 && (s = s || S === a), u !== void 0 && (u.min !== void 0 || u.max !== void 0) && typeof S == "number") {
|
|
473
|
+
let h = !0;
|
|
474
|
+
u.min !== void 0 && (h = h && S >= u.min), u.max !== void 0 && (h = h && S <= u.max), s = s || h;
|
|
475
475
|
}
|
|
476
|
-
p === "subset" && (s = s ||
|
|
476
|
+
p === "subset" && (s = s || S != null);
|
|
477
477
|
}
|
|
478
478
|
s && (n[l] = 1);
|
|
479
479
|
}
|
|
480
480
|
return n;
|
|
481
481
|
}
|
|
482
|
-
var
|
|
482
|
+
var Z = class {
|
|
483
483
|
constructor(t, e) {
|
|
484
484
|
this.simpleComponentControllers = t, this.filterComponentControllers = e, this.ignoredOptionIdNames = [], this.dataInputs = [], this.dontAllowUnfilteredHighCardinality = !1;
|
|
485
485
|
}
|
|
@@ -550,13 +550,13 @@ var Q = class {
|
|
|
550
550
|
var s;
|
|
551
551
|
const c = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), a = [];
|
|
552
552
|
for (const m of this.dataInputs)
|
|
553
|
-
for (const
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
r.has(
|
|
553
|
+
for (const S of e.components[m].selectorStates) {
|
|
554
|
+
const h = b(S.selectedSource);
|
|
555
|
+
if (O(h)) {
|
|
556
|
+
const x = await t.pFrameProvider.getColumnSpecById(h);
|
|
557
|
+
x && x.axesSpec.forEach((w) => {
|
|
558
|
+
const v = F.fromAxisSpec(w).toCanonicalString();
|
|
559
|
+
r.has(v) || (r.add(v), a.push(w));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
562
|
}
|
|
@@ -564,17 +564,17 @@ var Q = class {
|
|
|
564
564
|
let p = [...r];
|
|
565
565
|
for (; p.length; ) {
|
|
566
566
|
const m = [];
|
|
567
|
-
for (const
|
|
568
|
-
if (n[
|
|
569
|
-
const
|
|
570
|
-
for (const
|
|
571
|
-
!u.has(
|
|
567
|
+
for (const S of p)
|
|
568
|
+
if (n[S]) {
|
|
569
|
+
const h = Object.keys(n[S]);
|
|
570
|
+
for (const x of h)
|
|
571
|
+
!u.has(x) && !r.has(x) && (m.push(x), u.add(x));
|
|
572
572
|
}
|
|
573
573
|
p = m;
|
|
574
574
|
}
|
|
575
|
-
for (const [m, { selectorStates:
|
|
576
|
-
const
|
|
577
|
-
for (const { selectedSource: w } of
|
|
575
|
+
for (const [m, { selectorStates: S }] of Object.entries(e.components)) {
|
|
576
|
+
const x = ((s = this.simpleComponentControllers[m]) != null ? s : this.filterComponentControllers[m]).settings.columnsWithExtraAxesAllowed;
|
|
577
|
+
for (const { selectedSource: w } of S)
|
|
578
578
|
await He(
|
|
579
579
|
t,
|
|
580
580
|
w,
|
|
@@ -583,7 +583,7 @@ var Q = class {
|
|
|
583
583
|
a,
|
|
584
584
|
r,
|
|
585
585
|
u,
|
|
586
|
-
|
|
586
|
+
x,
|
|
587
587
|
l
|
|
588
588
|
);
|
|
589
589
|
}
|
|
@@ -610,24 +610,24 @@ var Q = class {
|
|
|
610
610
|
async getLabelsMap(t, e) {
|
|
611
611
|
const o = await t.pFrameProvider.getColumnsFull(
|
|
612
612
|
this.dataInputs.reduce((n, l) => {
|
|
613
|
-
const c = e.components[l].selectorStates.map((r) =>
|
|
613
|
+
const c = e.components[l].selectorStates.map((r) => b(r.selectedSource));
|
|
614
614
|
return n.concat(c);
|
|
615
615
|
}, []),
|
|
616
616
|
!1
|
|
617
617
|
);
|
|
618
|
-
return
|
|
618
|
+
return Fe(o, (n) => n.spec).reduce((n, l) => {
|
|
619
619
|
const s = new W({ name: l.value.columnId, type: l.value.spec.valueType }).toCanonicalString();
|
|
620
620
|
return n[s] = l.label, n;
|
|
621
621
|
}, {});
|
|
622
622
|
}
|
|
623
623
|
async calculateOptions(t, e, o = [], n = Xe) {
|
|
624
624
|
var l, s;
|
|
625
|
-
const c = this.createEmptyComponentsGuide(e), r = this.getConsumedOptionsSet(e), a = new Set(this.ignoredOptionIdNames), u = new Set(o), { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t),
|
|
626
|
-
for (const [
|
|
627
|
-
const
|
|
625
|
+
const c = this.createEmptyComponentsGuide(e), r = this.getConsumedOptionsSet(e), a = new Set(this.ignoredOptionIdNames), u = new Set(o), { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), S = await this.getLabelsMap(t, e), h = await this.getSelectedSourcesInfo(t, e, S, p, m), x = /* @__PURE__ */ new Map(), w = { ...this.simpleComponentControllers, ...this.filterComponentControllers }, v = /* @__PURE__ */ new Set();
|
|
626
|
+
for (const [y, f] of Object.entries(w)) {
|
|
627
|
+
const g = await f.getOptions(
|
|
628
628
|
t,
|
|
629
629
|
e,
|
|
630
|
-
|
|
630
|
+
S,
|
|
631
631
|
r,
|
|
632
632
|
p,
|
|
633
633
|
m,
|
|
@@ -635,92 +635,92 @@ var Q = class {
|
|
|
635
635
|
a,
|
|
636
636
|
u
|
|
637
637
|
);
|
|
638
|
-
this.dataInputs.includes(
|
|
639
|
-
|
|
638
|
+
this.dataInputs.includes(y) || g.options.forEach((A) => {
|
|
639
|
+
v.add(A.value);
|
|
640
640
|
});
|
|
641
|
-
for (const [
|
|
642
|
-
|
|
643
|
-
c[
|
|
641
|
+
for (const [A, P] of g.optionsInfo)
|
|
642
|
+
x.set(A, P);
|
|
643
|
+
c[y] = g;
|
|
644
644
|
}
|
|
645
|
-
const D = (
|
|
646
|
-
const f =
|
|
645
|
+
const D = (y) => {
|
|
646
|
+
const f = x.get(y);
|
|
647
647
|
f && f.kind === "axis" && (f.mustBeConsumed = !0);
|
|
648
|
-
const
|
|
649
|
-
|
|
648
|
+
const g = h.get(y);
|
|
649
|
+
g && g.kind === "axis" && (g.mustBeConsumed = !0);
|
|
650
650
|
}, B = await this.getMustBeConsumedAxes(t, e);
|
|
651
|
-
for (const
|
|
652
|
-
D(
|
|
651
|
+
for (const y of B)
|
|
652
|
+
D(y);
|
|
653
653
|
if (this.dontAllowUnfilteredHighCardinality) {
|
|
654
|
-
const
|
|
655
|
-
var
|
|
656
|
-
return ((
|
|
657
|
-
}, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((
|
|
658
|
-
const
|
|
659
|
-
return (
|
|
654
|
+
const y = (g) => {
|
|
655
|
+
var A;
|
|
656
|
+
return ((A = g == null ? void 0 : g.annotations) == null ? void 0 : A[Me]) === "true";
|
|
657
|
+
}, f = (s = (l = e.components.filters) == null ? void 0 : l.selectorStates.reduce((g, A) => {
|
|
658
|
+
const P = h.get(A.selectedSource);
|
|
659
|
+
return (P == null ? void 0 : P.kind) === "column" && P.spec.axesSpec.filter(y).forEach((L) => g.add(F.fromAxisSpec(L).toCanonicalString())), (P == null ? void 0 : P.kind) === "axis" && y(P.spec) && g.add(F.fromAxisSpec(P.spec).toCanonicalString()), g;
|
|
660
660
|
}, /* @__PURE__ */ new Set())) != null ? s : /* @__PURE__ */ new Set();
|
|
661
|
-
this.dataInputs.forEach((
|
|
662
|
-
for (const { selectedSource:
|
|
663
|
-
const
|
|
664
|
-
if ((
|
|
665
|
-
const N =
|
|
666
|
-
!
|
|
667
|
-
}), (
|
|
668
|
-
const E =
|
|
669
|
-
|
|
661
|
+
this.dataInputs.forEach((g) => {
|
|
662
|
+
for (const { selectedSource: A } of e.components[g].selectorStates) {
|
|
663
|
+
const P = h.get(A);
|
|
664
|
+
if ((P == null ? void 0 : P.kind) === "column" && P.spec.axesSpec.filter(y).forEach((L) => {
|
|
665
|
+
const N = F.fromAxisSpec(L).toCanonicalString();
|
|
666
|
+
!v.has(N) && !f.has(N) && v.add(N), f.has(N) || D(N);
|
|
667
|
+
}), (P == null ? void 0 : P.kind) === "axis" && y(P.spec)) {
|
|
668
|
+
const E = F.fromAxisSpec(P.spec).toCanonicalString();
|
|
669
|
+
v.has(E) || v.add(E), f.has(E) || D(E);
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
|
-
const
|
|
675
|
-
for (const { selectorStates:
|
|
676
|
-
for (const { selectedSource: f } of
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
674
|
+
const C = /* @__PURE__ */ new Set();
|
|
675
|
+
for (const { selectorStates: y } of Object.values(e.components))
|
|
676
|
+
for (const { selectedSource: f } of y) {
|
|
677
|
+
const g = h.get(f);
|
|
678
|
+
g && g.kind === "column" && g.axesToBeFixed.forEach((A) => {
|
|
679
|
+
C.add(A);
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
const d = await this.isConsistent(t, e, p, m), i = (
|
|
683
|
-
var f,
|
|
684
|
-
const
|
|
685
|
-
return (
|
|
682
|
+
const d = await this.isConsistent(t, e, p, m), i = (y) => {
|
|
683
|
+
var f, g, A;
|
|
684
|
+
const P = (f = b(y).toCanonicalString()) != null ? f : y;
|
|
685
|
+
return (A = (g = x.get(P)) != null ? g : h.get(P)) != null ? A : ge(y);
|
|
686
686
|
};
|
|
687
687
|
return {
|
|
688
688
|
components: c,
|
|
689
689
|
getSourceInfo: i,
|
|
690
|
-
freeOptionsSet:
|
|
691
|
-
axesToBeFixedSet:
|
|
690
|
+
freeOptionsSet: v,
|
|
691
|
+
axesToBeFixedSet: C,
|
|
692
692
|
readyData: this.readyDataInputs(e),
|
|
693
|
-
ready: this.readyForPlotBuilding(t, e, d,
|
|
693
|
+
ready: this.readyForPlotBuilding(t, e, d, v, i),
|
|
694
694
|
consistent: d
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
697
|
async getUniqueSourceValuesWithLabels(t, e, o, n, l, s) {
|
|
698
698
|
var c;
|
|
699
|
-
const r = (p) => p.sort((m,
|
|
699
|
+
const r = (p) => p.sort((m, S) => m.label.localeCompare(S.label, "en", { numeric: !0 })), a = e.getSourceInfo(o), u = (c = a.annotations) == null ? void 0 : c[Ge];
|
|
700
700
|
try {
|
|
701
701
|
const p = u ? JSON.parse(u).map((m) => String(m)) : null;
|
|
702
702
|
if (p) {
|
|
703
|
-
const m = p.map((
|
|
703
|
+
const m = p.map((S) => ({ value: S, label: S }));
|
|
704
704
|
return r(m), { values: m, overflow: !1 };
|
|
705
705
|
}
|
|
706
706
|
} catch {
|
|
707
707
|
console.error(`Parsing error: discrete values annotation ${u} in ${o}`);
|
|
708
708
|
}
|
|
709
709
|
if (a.kind === "axis") {
|
|
710
|
-
const p =
|
|
711
|
-
let
|
|
712
|
-
if (
|
|
713
|
-
l && (
|
|
710
|
+
const p = b(o), m = a.parentSources.map(b), S = await k(t, o, a.parentSources);
|
|
711
|
+
let h = [];
|
|
712
|
+
if (S) {
|
|
713
|
+
l && (h = [{
|
|
714
714
|
type: "bySingleColumnV2",
|
|
715
715
|
column: {
|
|
716
716
|
type: "column",
|
|
717
|
-
id:
|
|
717
|
+
id: S.name
|
|
718
718
|
},
|
|
719
719
|
predicate: {
|
|
720
720
|
operator: "StringIContains",
|
|
721
721
|
substring: l
|
|
722
722
|
}
|
|
723
|
-
}]), s && (
|
|
723
|
+
}]), s && (h = [{
|
|
724
724
|
type: "bySingleColumnV2",
|
|
725
725
|
column: {
|
|
726
726
|
type: "axis",
|
|
@@ -731,13 +731,13 @@ var Q = class {
|
|
|
731
731
|
substring: s
|
|
732
732
|
}
|
|
733
733
|
}]);
|
|
734
|
-
const { data: D, axesData: B } = await t.pFrameProvider.getSingleColumnData(
|
|
735
|
-
for (let i = 0; i < Math.min(
|
|
736
|
-
d.push({ value: String(
|
|
737
|
-
return r(d), { values: d, overflow: !(n === void 0 ||
|
|
734
|
+
const { data: D, axesData: B } = await t.pFrameProvider.getSingleColumnData(S, h), C = B[p.toCanonicalString()], d = [];
|
|
735
|
+
for (let i = 0; i < Math.min(C.length, n ?? C.length); i++)
|
|
736
|
+
d.push({ value: String(C[i]), label: String(D[i]) });
|
|
737
|
+
return r(d), { values: d, overflow: !(n === void 0 || C.length < n) };
|
|
738
738
|
}
|
|
739
|
-
const
|
|
740
|
-
|
|
739
|
+
const x = l ?? s;
|
|
740
|
+
x && (h = [{
|
|
741
741
|
type: "bySingleColumnV2",
|
|
742
742
|
column: {
|
|
743
743
|
type: "axis",
|
|
@@ -745,14 +745,14 @@ var Q = class {
|
|
|
745
745
|
},
|
|
746
746
|
predicate: {
|
|
747
747
|
operator: "StringIContains",
|
|
748
|
-
substring:
|
|
748
|
+
substring: x
|
|
749
749
|
}
|
|
750
750
|
}]);
|
|
751
|
-
const w = await t.pFrameProvider.getAxisUniqueValues(p, [m[0]], n,
|
|
752
|
-
return r(
|
|
751
|
+
const w = await t.pFrameProvider.getAxisUniqueValues(p, [m[0]], n, h), v = w.values.map((D) => ({ value: String(D), label: String(D) }));
|
|
752
|
+
return r(v), { values: v, overflow: w.overflow };
|
|
753
753
|
}
|
|
754
754
|
if (a.kind === "column") {
|
|
755
|
-
const p = l ?? s, m =
|
|
755
|
+
const p = l ?? s, m = b(o), S = p ? [{
|
|
756
756
|
type: "bySingleColumnV2",
|
|
757
757
|
column: {
|
|
758
758
|
type: "column",
|
|
@@ -762,8 +762,8 @@ var Q = class {
|
|
|
762
762
|
operator: "StringIContains",
|
|
763
763
|
substring: p
|
|
764
764
|
}
|
|
765
|
-
}] : [],
|
|
766
|
-
return r(
|
|
765
|
+
}] : [], h = await t.pFrameProvider.getColumnUniqueValues(m, n, S), x = h.values.map((w) => ({ value: String(w), label: String(w) }));
|
|
766
|
+
return r(x), { values: x, overflow: h.overflow };
|
|
767
767
|
}
|
|
768
768
|
return { values: [], overflow: !1 };
|
|
769
769
|
}
|
|
@@ -808,8 +808,8 @@ var Q = class {
|
|
|
808
808
|
const p = l(a);
|
|
809
809
|
if (p && p.kind === "column" && p.axesToBeFixed.some(
|
|
810
810
|
(m) => {
|
|
811
|
-
var
|
|
812
|
-
return ((
|
|
811
|
+
var S;
|
|
812
|
+
return ((S = (u ?? []).find((h) => h.axisSource === m)) == null ? void 0 : S.axisValue) === void 0;
|
|
813
813
|
}
|
|
814
814
|
)) {
|
|
815
815
|
c = !0;
|
|
@@ -829,7 +829,7 @@ var Q = class {
|
|
|
829
829
|
}
|
|
830
830
|
}, Ze = (t) => {
|
|
831
831
|
var e;
|
|
832
|
-
return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[
|
|
832
|
+
return ((e = t == null ? void 0 : t.annotations) == null ? void 0 : e[ve]) === "true";
|
|
833
833
|
}, Pe = class Oe {
|
|
834
834
|
constructor({
|
|
835
835
|
componentName: e,
|
|
@@ -860,50 +860,50 @@ var Q = class {
|
|
|
860
860
|
async checkStateConsistency(e, o, n, l) {
|
|
861
861
|
const s = o.components[this.componentName], { parentAxes: c, linkerAxes: r } = await this.getAllowedAxes(e, o, n);
|
|
862
862
|
function a(p) {
|
|
863
|
-
const m =
|
|
863
|
+
const m = F.fromAxisSpec(p).toCanonicalString();
|
|
864
864
|
return c.has(m) || r.has(m);
|
|
865
865
|
}
|
|
866
866
|
const u = await Promise.all(
|
|
867
867
|
s.selectorStates.map(async ({ selectedSource: p }) => {
|
|
868
|
-
const m =
|
|
869
|
-
if (
|
|
870
|
-
const
|
|
871
|
-
if (!
|
|
868
|
+
const m = b(p);
|
|
869
|
+
if (O(m)) {
|
|
870
|
+
const S = await e.pFrameProvider.getColumnSpecById(m);
|
|
871
|
+
if (!S)
|
|
872
872
|
return !1;
|
|
873
873
|
if (this.parentComponents.length === 0)
|
|
874
874
|
return !0;
|
|
875
875
|
if (this.strictlyDependsOnParents && !this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent)
|
|
876
|
-
return
|
|
876
|
+
return S.axesSpec.every((x) => a(x));
|
|
877
877
|
if (this.settings.columnsWithExtraAxesAllowed && !this.settings.isDataComponent) {
|
|
878
|
-
if (
|
|
878
|
+
if (S.axesSpec.some((w) => a(w)))
|
|
879
879
|
return !0;
|
|
880
|
-
const
|
|
881
|
-
return
|
|
880
|
+
const x = oe(S.axesSpec);
|
|
881
|
+
return x ? x.some((w) => l.has(j(w))) : !1;
|
|
882
882
|
} else
|
|
883
|
-
return c.size === 0 ||
|
|
883
|
+
return c.size === 0 || S.axesSpec.some((x) => a(x));
|
|
884
884
|
}
|
|
885
885
|
return c.has(p);
|
|
886
886
|
})
|
|
887
887
|
);
|
|
888
888
|
return s.selectorStates.reduce(
|
|
889
|
-
(p, m,
|
|
889
|
+
(p, m, S) => (p[m.selectedSource] = u[S], p),
|
|
890
890
|
{}
|
|
891
891
|
);
|
|
892
892
|
}
|
|
893
893
|
async getProducingAxes(e, o) {
|
|
894
|
-
const s = o.components[this.componentName].selectorStates.map((a) =>
|
|
894
|
+
const s = o.components[this.componentName].selectorStates.map((a) => b(a.selectedSource)).filter((a) => O(a)), c = /* @__PURE__ */ new Set();
|
|
895
895
|
return (await Promise.all(
|
|
896
896
|
s.map((a) => e.pFrameProvider.getColumnSpecById(a))
|
|
897
897
|
)).forEach((a) => {
|
|
898
898
|
a && a.axesSpec.forEach((u) => {
|
|
899
|
-
c.add(
|
|
899
|
+
c.add(F.fromAxisSpec(u).toCanonicalString());
|
|
900
900
|
});
|
|
901
901
|
}), c;
|
|
902
902
|
}
|
|
903
903
|
getParentSelectedSources(e, o) {
|
|
904
904
|
return this.parentComponents.reduce((l, s) => {
|
|
905
905
|
const c = o.components[s].selectorStates.map(
|
|
906
|
-
(r) =>
|
|
906
|
+
(r) => b(r.selectedSource)
|
|
907
907
|
);
|
|
908
908
|
return l.push(...c), l;
|
|
909
909
|
}, []);
|
|
@@ -912,10 +912,10 @@ var Q = class {
|
|
|
912
912
|
var n;
|
|
913
913
|
const l = this.getParentSelectedSources(e, o), s = /* @__PURE__ */ new Set();
|
|
914
914
|
for (const c of l)
|
|
915
|
-
if (
|
|
915
|
+
if (O(c)) {
|
|
916
916
|
const r = await e.pFrameProvider.getColumnSpecById(c);
|
|
917
917
|
(n = r == null ? void 0 : r.axesSpec) == null || n.forEach((a) => {
|
|
918
|
-
const u =
|
|
918
|
+
const u = F.fromAxisSpec(a);
|
|
919
919
|
s.add(u.toCanonicalString());
|
|
920
920
|
});
|
|
921
921
|
}
|
|
@@ -923,46 +923,46 @@ var Q = class {
|
|
|
923
923
|
}
|
|
924
924
|
async getAllowedAxes(e, o, n) {
|
|
925
925
|
var l, s, c, r, a, u, p;
|
|
926
|
-
const m = this.getParentSelectedSources(e, o),
|
|
926
|
+
const m = this.getParentSelectedSources(e, o), S = /* @__PURE__ */ new Set(), h = [], x = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map();
|
|
927
927
|
for (const D of m)
|
|
928
|
-
if (
|
|
928
|
+
if (O(D)) {
|
|
929
929
|
const B = await e.pFrameProvider.getColumnSpecById(D);
|
|
930
|
-
for (const
|
|
931
|
-
const i =
|
|
932
|
-
if (
|
|
930
|
+
for (const C of (l = B == null ? void 0 : B.axesSpec) != null ? l : []) {
|
|
931
|
+
const i = F.fromAxisSpec(C).toCanonicalString();
|
|
932
|
+
if (S.has(i))
|
|
933
933
|
continue;
|
|
934
|
-
|
|
935
|
-
const
|
|
934
|
+
S.add(i), h.push(C);
|
|
935
|
+
const y = Ie(C);
|
|
936
936
|
w.set(i, {
|
|
937
937
|
kind: "axis",
|
|
938
|
-
name:
|
|
938
|
+
name: C.name,
|
|
939
939
|
label: await T(e, i, [
|
|
940
940
|
D.toCanonicalString()
|
|
941
941
|
]),
|
|
942
|
-
type:
|
|
943
|
-
mustBeConsumed:
|
|
942
|
+
type: C.type,
|
|
943
|
+
mustBeConsumed: y,
|
|
944
944
|
dividable: !1,
|
|
945
|
-
spec:
|
|
946
|
-
annotations:
|
|
947
|
-
isSubsetFilter: ((s =
|
|
948
|
-
isDiscreteFilter:
|
|
945
|
+
spec: C,
|
|
946
|
+
annotations: C.annotations,
|
|
947
|
+
isSubsetFilter: ((s = C.annotations) == null ? void 0 : s[$]) === "true",
|
|
948
|
+
isDiscreteFilter: C.type === "String" || ((c = C.annotations) == null ? void 0 : c[te]) === "true",
|
|
949
949
|
parentSources: [D.toCanonicalString()]
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
let
|
|
954
|
-
for (;
|
|
953
|
+
let v = [...S];
|
|
954
|
+
for (; v.length; ) {
|
|
955
955
|
const D = [];
|
|
956
|
-
for (const B of
|
|
956
|
+
for (const B of v)
|
|
957
957
|
if (n[B]) {
|
|
958
|
-
const
|
|
959
|
-
for (const d of
|
|
960
|
-
if (!
|
|
961
|
-
D.push(d),
|
|
962
|
-
const { spec: i, id:
|
|
958
|
+
const C = Object.keys(n[B]);
|
|
959
|
+
for (const d of C)
|
|
960
|
+
if (!x.has(d)) {
|
|
961
|
+
D.push(d), x.add(d);
|
|
962
|
+
const { spec: i, id: y } = n[B][d];
|
|
963
963
|
for (const f of i.axesSpec) {
|
|
964
|
-
const
|
|
965
|
-
w.has(
|
|
964
|
+
const g = F.fromAxisSpec(f).toCanonicalString();
|
|
965
|
+
w.has(g) || w.set(g, {
|
|
966
966
|
kind: "axis",
|
|
967
967
|
name: f.name,
|
|
968
968
|
label: (a = (r = f.annotations) == null ? void 0 : r[we]) != null ? a : "",
|
|
@@ -972,80 +972,80 @@ var Q = class {
|
|
|
972
972
|
spec: f,
|
|
973
973
|
annotations: f.annotations,
|
|
974
974
|
isSubsetFilter: ((u = f.annotations) == null ? void 0 : u[$]) === "true",
|
|
975
|
-
isDiscreteFilter: f.type === "String" || ((p = f.annotations) == null ? void 0 : p[
|
|
976
|
-
parentSources: [
|
|
975
|
+
isDiscreteFilter: f.type === "String" || ((p = f.annotations) == null ? void 0 : p[te]) === "true",
|
|
976
|
+
parentSources: [y.toCanonicalString()]
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
|
-
|
|
981
|
+
v = D;
|
|
982
982
|
}
|
|
983
|
-
return { parentAxes:
|
|
983
|
+
return { parentAxes: S, parentAxesList: h, linkerAxes: x, optionsInfo: w };
|
|
984
984
|
}
|
|
985
985
|
async getOptions(e, o, n, l, s, c, r, a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set()) {
|
|
986
|
-
var p, m,
|
|
987
|
-
const w = this.settings.multipleSelectors,
|
|
988
|
-
if (this.dependsOn.length && this.dependsOn.some((
|
|
989
|
-
return { multipleSelectors: w, required:
|
|
990
|
-
if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((
|
|
991
|
-
return { multipleSelectors: w, required:
|
|
992
|
-
const B = this.getParentSelectedSources(e, o),
|
|
986
|
+
var p, m, S, h, x;
|
|
987
|
+
const w = this.settings.multipleSelectors, v = this.settings.required, D = await this.checkStateConsistency(e, o, s, c);
|
|
988
|
+
if (this.dependsOn.length && this.dependsOn.some((P) => o.components[P].selectorStates.length === 0))
|
|
989
|
+
return { multipleSelectors: w, required: v, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
|
|
990
|
+
if (this.strictlyDependsOnParents && !this.settings.isDataComponent && this.parentComponents.some((P) => o.components[P].selectorStates.length === 0))
|
|
991
|
+
return { multipleSelectors: w, required: v, stateConsistency: D, options: [], optionsInfo: /* @__PURE__ */ new Map() };
|
|
992
|
+
const B = this.getParentSelectedSources(e, o), C = (await e.pFrameProvider.getColumns([], !1, this.allowedTypes, void 0, this.annotations)).filter((P) => !l.has(P.toCanonicalString())), { parentAxes: d, linkerAxes: i, parentAxesList: y, optionsInfo: f } = await this.getAllowedAxes(e, o, s), g = o.components[this.componentName], A = [];
|
|
993
993
|
if (this.settings.axesAllowed)
|
|
994
|
-
for (const
|
|
995
|
-
const E =
|
|
996
|
-
([
|
|
994
|
+
for (const P of d) {
|
|
995
|
+
const E = b(P), L = f.get(E.toCanonicalString()), N = this.allowedTypes.includes(L.spec.type), _ = Object.entries(this.annotations).every(
|
|
996
|
+
([le, q]) => {
|
|
997
997
|
var U;
|
|
998
|
-
return ((U = L.spec.annotations) == null ? void 0 : U[
|
|
998
|
+
return ((U = L.spec.annotations) == null ? void 0 : U[le]) === q;
|
|
999
999
|
}
|
|
1000
|
-
), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(
|
|
1001
|
-
N &&
|
|
1000
|
+
), G = this.checkSourceBySpec ? this.checkSourceBySpec(L.spec, o) : !0, M = !this.settings.homogeneous || !(L != null && L.mustBeConsumed), K = !l.has(P), ee = a.has(E.name) || u.has(E.toCanonicalString()), se = g.selectorStates.some((le) => le.selectedSource === P);
|
|
1001
|
+
N && _ && G && M && K && !ee && !se && A.push({ value: P });
|
|
1002
1002
|
}
|
|
1003
1003
|
if (this.settings.columnsAllowed) {
|
|
1004
|
-
const
|
|
1005
|
-
for (const E of
|
|
1006
|
-
const L = E.toCanonicalString(), N =
|
|
1007
|
-
if (!
|
|
1004
|
+
const P = !this.settings.columnsWithExtraAxesAllowed && this.strictlyDependsOnParents;
|
|
1005
|
+
for (const E of C) {
|
|
1006
|
+
const L = E.toCanonicalString(), N = b(L), _ = await e.pFrameProvider.getColumnSpecById(N);
|
|
1007
|
+
if (!_)
|
|
1008
1008
|
continue;
|
|
1009
1009
|
const G = De(
|
|
1010
|
-
|
|
1011
|
-
|
|
1010
|
+
_,
|
|
1011
|
+
y,
|
|
1012
1012
|
d,
|
|
1013
1013
|
i,
|
|
1014
1014
|
c
|
|
1015
|
-
).map((q) =>
|
|
1015
|
+
).map((q) => F.fromAxisSpec(q).toCanonicalString()), M = new Set(G);
|
|
1016
1016
|
if (
|
|
1017
1017
|
// do not add to available options label columns, or columns that are not fit by custom spec condition, or columns that are not fit by condition for data inputs
|
|
1018
|
-
Le(
|
|
1019
|
-
const U =
|
|
1018
|
+
Le(_) || Ze(_) || this.checkSourceBySpec && !this.checkSourceBySpec(_, o) || this.settings.isDataComponent && !r(_) || P && G.length > 0 || B.length && G.length > 0 && !_.axesSpec.some((q) => {
|
|
1019
|
+
const U = F.fromAxisSpec(q).toCanonicalString();
|
|
1020
1020
|
return d.has(U) || i.has(U);
|
|
1021
1021
|
})
|
|
1022
1022
|
)
|
|
1023
1023
|
continue;
|
|
1024
|
-
const K = (m = (p =
|
|
1024
|
+
const K = (m = (p = _ == null ? void 0 : _.axesSpec) == null ? void 0 : p.map((q) => F.fromAxisSpec(q).toCanonicalString())) != null ? m : [], ee = {};
|
|
1025
1025
|
if (this.settings.columnsWithExtraAxesAllowed && K.forEach((q, U) => {
|
|
1026
|
-
M.has(q) && (
|
|
1027
|
-
}),
|
|
1028
|
-
const q = (
|
|
1026
|
+
M.has(q) && (ee[q] = U);
|
|
1027
|
+
}), _) {
|
|
1028
|
+
const q = (S = n[L]) != null ? S : await T(e, E.toCanonicalString(), []), U = {
|
|
1029
1029
|
kind: "column",
|
|
1030
|
-
name:
|
|
1030
|
+
name: _.name,
|
|
1031
1031
|
label: q,
|
|
1032
|
-
type:
|
|
1033
|
-
spec:
|
|
1034
|
-
annotations:
|
|
1035
|
-
isSubsetFilter: ((
|
|
1036
|
-
isDiscreteFilter:
|
|
1032
|
+
type: _.valueType,
|
|
1033
|
+
spec: _,
|
|
1034
|
+
annotations: _.annotations,
|
|
1035
|
+
isSubsetFilter: ((h = _.annotations) == null ? void 0 : h[$]) === "true",
|
|
1036
|
+
isDiscreteFilter: _.valueType === "String" || ((x = _.annotations) == null ? void 0 : x[te]) === "true",
|
|
1037
1037
|
axesToBeFixed: G,
|
|
1038
|
-
axesToBeFixedIndexes:
|
|
1038
|
+
axesToBeFixedIndexes: ee
|
|
1039
1039
|
};
|
|
1040
1040
|
f.set(N.toCanonicalString(), U);
|
|
1041
1041
|
}
|
|
1042
|
-
const
|
|
1042
|
+
const se = a.has(N.name) || u.has(N.toCanonicalString()), le = o.components[this.componentName].selectorStates.some(
|
|
1043
1043
|
(q) => q.selectedSource === L
|
|
1044
1044
|
);
|
|
1045
|
-
!
|
|
1045
|
+
!se && !le && A.push({ value: L });
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
return { multipleSelectors: w, required:
|
|
1048
|
+
return { multipleSelectors: w, required: v, stateConsistency: D, options: A, optionsInfo: f };
|
|
1049
1049
|
}
|
|
1050
1050
|
};
|
|
1051
1051
|
Pe.DefaultSettings = {
|
|
@@ -1072,20 +1072,20 @@ var I = Pe, et = {
|
|
|
1072
1072
|
},
|
|
1073
1073
|
dividedAxes: {}
|
|
1074
1074
|
};
|
|
1075
|
-
function
|
|
1075
|
+
function ce(t, e) {
|
|
1076
1076
|
if (!e.length)
|
|
1077
1077
|
return [];
|
|
1078
|
-
const o = e.map((s) =>
|
|
1078
|
+
const o = e.map((s) => b(s)), n = Object.values(t.columnsData)[0].length, l = [];
|
|
1079
1079
|
for (let s = 0; s < n; s++) {
|
|
1080
1080
|
const c = o.map((r) => {
|
|
1081
1081
|
const a = r.toCanonicalString();
|
|
1082
|
-
return
|
|
1082
|
+
return O(r) ? t.columnsData[a][s] : t.axesData[a][s];
|
|
1083
1083
|
}).join(", ");
|
|
1084
1084
|
l.push(c);
|
|
1085
1085
|
}
|
|
1086
1086
|
return l;
|
|
1087
1087
|
}
|
|
1088
|
-
var tt = class extends
|
|
1088
|
+
var tt = class extends Z {
|
|
1089
1089
|
constructor() {
|
|
1090
1090
|
super({
|
|
1091
1091
|
valueSize: new I({
|
|
@@ -1190,46 +1190,46 @@ var tt = class extends Q {
|
|
|
1190
1190
|
async getMustBeConsumedAxes(t, e) {
|
|
1191
1191
|
if (!e.components.valueColor.selectorStates.length)
|
|
1192
1192
|
return /* @__PURE__ */ new Set();
|
|
1193
|
-
const o = e.components.valueColor.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(
|
|
1194
|
-
return n ? new Set(n.axesSpec.map((l) =>
|
|
1193
|
+
const o = e.components.valueColor.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(b(o));
|
|
1194
|
+
return n ? new Set(n.axesSpec.map((l) => F.fromAxisSpec(l).toCanonicalString())) : /* @__PURE__ */ new Set();
|
|
1195
1195
|
}
|
|
1196
1196
|
async createDataByColumns(t, e) {
|
|
1197
1197
|
var o, n, l;
|
|
1198
1198
|
const s = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
1199
1199
|
if (!s || !c)
|
|
1200
1200
|
throw Error("Value column is not valid");
|
|
1201
|
-
const r =
|
|
1202
|
-
if (!r || !a || !
|
|
1201
|
+
const r = b(s), a = b(c);
|
|
1202
|
+
if (!r || !a || !O(r) && !O(a))
|
|
1203
1203
|
throw Error("Value column is not valid");
|
|
1204
1204
|
const u = {
|
|
1205
1205
|
type: "columns",
|
|
1206
1206
|
id: (l = z(e.components)) != null ? l : "",
|
|
1207
1207
|
values: {}
|
|
1208
|
-
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t),
|
|
1208
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), S = [
|
|
1209
1209
|
...e.components.filters.selectorStates,
|
|
1210
1210
|
...e.components.tabBy.selectorStates
|
|
1211
|
-
],
|
|
1211
|
+
], h = Y(S), x = S.map((_) => b(_.selectedSource)).filter(O), w = [r, a].filter(O), v = w.map((_) => _.toCanonicalString()), D = await Q(t, v), B = [
|
|
1212
1212
|
e.components.facetBy,
|
|
1213
1213
|
e.components.x,
|
|
1214
1214
|
e.components.y,
|
|
1215
1215
|
e.components.tooltipContent
|
|
1216
|
-
],
|
|
1217
|
-
for (const { selectedSource:
|
|
1218
|
-
|
|
1216
|
+
], C = [], d = w.map(() => []), i = [], y = [];
|
|
1217
|
+
for (const { selectedSource: _, fixedAxes: G } of S)
|
|
1218
|
+
y.push(...await V(
|
|
1219
1219
|
t,
|
|
1220
1220
|
p,
|
|
1221
1221
|
m,
|
|
1222
1222
|
D,
|
|
1223
|
-
|
|
1223
|
+
_,
|
|
1224
1224
|
G
|
|
1225
1225
|
)), d.push(
|
|
1226
1226
|
(G ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
|
|
1227
1227
|
);
|
|
1228
|
-
for (const
|
|
1229
|
-
for (const { selectedSource: G, fixedAxes: M } of
|
|
1230
|
-
|
|
1231
|
-
(M ?? []).map(({ axisIdx:
|
|
1232
|
-
),
|
|
1228
|
+
for (const _ of B)
|
|
1229
|
+
for (const { selectedSource: G, fixedAxes: M } of _.selectorStates) {
|
|
1230
|
+
C.push(b(G)), i.push(
|
|
1231
|
+
(M ?? []).map(({ axisIdx: ee, axisValue: se }) => ({ idx: ee, value: se }))
|
|
1232
|
+
), y.push(...await V(
|
|
1233
1233
|
t,
|
|
1234
1234
|
p,
|
|
1235
1235
|
m,
|
|
@@ -1237,45 +1237,45 @@ var tt = class extends Q {
|
|
|
1237
1237
|
G,
|
|
1238
1238
|
M
|
|
1239
1239
|
));
|
|
1240
|
-
const K = await k(t, G,
|
|
1241
|
-
K &&
|
|
1240
|
+
const K = await k(t, G, v);
|
|
1241
|
+
K && C.push(K);
|
|
1242
1242
|
}
|
|
1243
1243
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
1244
|
-
[...w, ...
|
|
1245
|
-
|
|
1246
|
-
|
|
1244
|
+
[...w, ...y, ...x],
|
|
1245
|
+
C,
|
|
1246
|
+
h,
|
|
1247
1247
|
!0,
|
|
1248
1248
|
d,
|
|
1249
1249
|
i
|
|
1250
1250
|
);
|
|
1251
|
-
|
|
1252
|
-
const G =
|
|
1253
|
-
u.values[G] =
|
|
1254
|
-
}), u.values[s] =
|
|
1255
|
-
const
|
|
1256
|
-
async (
|
|
1251
|
+
C.forEach((_) => {
|
|
1252
|
+
const G = _.toCanonicalString();
|
|
1253
|
+
u.values[G] = O(_) ? f.columnsData[G] : f.axesData[G];
|
|
1254
|
+
}), u.values[s] = O(r) ? f.columnsData[s] : f.axesData[s], u.values[c] = O(a) ? f.columnsData[c] : f.axesData[c];
|
|
1255
|
+
const g = e.components.x.selectorStates.map((_) => _.selectedSource), A = g.join(", "), P = await Promise.all(g.map(
|
|
1256
|
+
async (_) => {
|
|
1257
1257
|
var G, M;
|
|
1258
|
-
return (M = (G = await k(t,
|
|
1258
|
+
return (M = (G = await k(t, _, v)) == null ? void 0 : G.toCanonicalString()) != null ? M : _;
|
|
1259
1259
|
}
|
|
1260
1260
|
));
|
|
1261
|
-
u.values[
|
|
1262
|
-
const E = e.components.y.selectorStates.map((
|
|
1263
|
-
async (
|
|
1261
|
+
u.values[A] = ce(f, g), u.values.xLabels = ce(f, P);
|
|
1262
|
+
const E = e.components.y.selectorStates.map((_) => _.selectedSource), L = E.join(", "), N = await Promise.all(E.map(
|
|
1263
|
+
async (_) => {
|
|
1264
1264
|
var G, M;
|
|
1265
|
-
return (M = (G = await k(t,
|
|
1265
|
+
return (M = (G = await k(t, _, v)) == null ? void 0 : G.toCanonicalString()) != null ? M : _;
|
|
1266
1266
|
}
|
|
1267
1267
|
));
|
|
1268
|
-
return u.values[L] =
|
|
1268
|
+
return u.values[L] = ce(f, E), u.values.yLabels = ce(f, N), { byColumns: u };
|
|
1269
1269
|
}
|
|
1270
1270
|
async createChartSettings(t, e) {
|
|
1271
1271
|
var o, n;
|
|
1272
1272
|
const l = (o = e.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource, s = (n = e.components.valueSize.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
1273
1273
|
if (!l || !s)
|
|
1274
1274
|
throw Error("Value column is not valid");
|
|
1275
|
-
const c =
|
|
1276
|
-
if (!
|
|
1275
|
+
const c = b(l), r = b(s);
|
|
1276
|
+
if (!O(c) && !O(r))
|
|
1277
1277
|
throw Error("Value column is not valid");
|
|
1278
|
-
const a = [c, r].filter(
|
|
1278
|
+
const a = [c, r].filter(O).map((C) => C.toCanonicalString()), u = {
|
|
1279
1279
|
type: "column",
|
|
1280
1280
|
value: l,
|
|
1281
1281
|
label: await T(t, l, [])
|
|
@@ -1283,21 +1283,22 @@ var tt = class extends Q {
|
|
|
1283
1283
|
type: "column",
|
|
1284
1284
|
value: s,
|
|
1285
1285
|
label: await T(t, s, [])
|
|
1286
|
-
},
|
|
1286
|
+
}, S = e.components.x.selectorStates.map(({ selectedSource: C }) => C).join(", "), x = e.components.y.selectorStates.map(({ selectedSource: C }) => C).join(", "), w = await Promise.all(e.components.facetBy.selectorStates.map(async (C) => {
|
|
1287
1287
|
var d, i;
|
|
1288
1288
|
return {
|
|
1289
1289
|
type: "column",
|
|
1290
|
-
value: (i = (d = await k(t,
|
|
1290
|
+
value: (i = (d = await k(t, C.selectedSource, a)) == null ? void 0 : d.toCanonicalString()) != null ? i : C.selectedSource
|
|
1291
1291
|
};
|
|
1292
|
-
})),
|
|
1293
|
-
e.components.tooltipContent.selectorStates.map(async (
|
|
1294
|
-
var d, i;
|
|
1295
|
-
const
|
|
1292
|
+
})), v = (await Promise.all(e.components.x.selectorStates.map((C) => T(t, C.selectedSource, a)))).join(", "), D = (await Promise.all(e.components.y.selectorStates.map((C) => T(t, C.selectedSource, a)))).join(", "), B = await Promise.all(
|
|
1293
|
+
e.components.tooltipContent.selectorStates.map(async (C) => {
|
|
1294
|
+
var d, i, y, f;
|
|
1295
|
+
const g = C.selectedSource, A = await J(t, g, a);
|
|
1296
1296
|
return {
|
|
1297
1297
|
type: "column",
|
|
1298
|
-
label: await T(t,
|
|
1299
|
-
value:
|
|
1300
|
-
valueLabels: (i = (d = await k(t,
|
|
1298
|
+
label: await T(t, g, a) || g,
|
|
1299
|
+
value: g,
|
|
1300
|
+
valueLabels: (i = (d = await k(t, g, a)) == null ? void 0 : d.toCanonicalString()) != null ? i : g,
|
|
1301
|
+
format: (f = (y = A == null ? void 0 : A.annotations) == null ? void 0 : y[ne]) != null ? f : ".0%"
|
|
1301
1302
|
};
|
|
1302
1303
|
})
|
|
1303
1304
|
);
|
|
@@ -1307,13 +1308,13 @@ var tt = class extends Q {
|
|
|
1307
1308
|
valueSize: p,
|
|
1308
1309
|
xColumn: {
|
|
1309
1310
|
type: "column",
|
|
1310
|
-
value:
|
|
1311
|
-
label:
|
|
1311
|
+
value: S,
|
|
1312
|
+
label: v,
|
|
1312
1313
|
valueLabels: "xLabels"
|
|
1313
1314
|
},
|
|
1314
1315
|
yColumn: {
|
|
1315
1316
|
type: "column",
|
|
1316
|
-
value:
|
|
1317
|
+
value: x,
|
|
1317
1318
|
label: D,
|
|
1318
1319
|
valueLabels: "yLabels"
|
|
1319
1320
|
},
|
|
@@ -1334,7 +1335,7 @@ var tt = class extends Q {
|
|
|
1334
1335
|
facetBy: { type: "simple", selectorStates: [] }
|
|
1335
1336
|
},
|
|
1336
1337
|
dividedAxes: {}
|
|
1337
|
-
}, ot = class extends
|
|
1338
|
+
}, ot = class extends Z {
|
|
1338
1339
|
constructor() {
|
|
1339
1340
|
super(
|
|
1340
1341
|
{
|
|
@@ -1403,8 +1404,8 @@ var tt = class extends Q {
|
|
|
1403
1404
|
const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1404
1405
|
if (!l)
|
|
1405
1406
|
throw Error("Value column is not valid");
|
|
1406
|
-
const s =
|
|
1407
|
-
if (!
|
|
1407
|
+
const s = b(l);
|
|
1408
|
+
if (!O(s))
|
|
1408
1409
|
throw Error("Value column is not valid");
|
|
1409
1410
|
const c = {
|
|
1410
1411
|
type: "columns",
|
|
@@ -1413,43 +1414,43 @@ var tt = class extends Q {
|
|
|
1413
1414
|
}, { linkerColumnsMap: r, compositeLinkerMap: a } = await X(t), u = [
|
|
1414
1415
|
...e.components.filters.selectorStates,
|
|
1415
1416
|
...e.components.tabBy.selectorStates
|
|
1416
|
-
], p = Y(u), m = u.map((d) =>
|
|
1417
|
+
], p = Y(u), m = u.map((d) => b(d.selectedSource)).filter(O), S = [l], h = await Q(t, S), x = [e.components.facetBy, e.components.grouping], w = [], v = [[]], D = [], B = [];
|
|
1417
1418
|
for (const { selectedSource: d, fixedAxes: i } of u)
|
|
1418
1419
|
B.push(
|
|
1419
|
-
...await V(t, r, a,
|
|
1420
|
-
),
|
|
1421
|
-
(i ?? []).map(({ axisIdx:
|
|
1420
|
+
...await V(t, r, a, h, d, i)
|
|
1421
|
+
), v.push(
|
|
1422
|
+
(i ?? []).map(({ axisIdx: y, axisValue: f }) => ({ idx: y, value: f }))
|
|
1422
1423
|
);
|
|
1423
|
-
for (const d of
|
|
1424
|
-
for (const { selectedSource: i, fixedAxes:
|
|
1425
|
-
w.push(
|
|
1426
|
-
(
|
|
1424
|
+
for (const d of x)
|
|
1425
|
+
for (const { selectedSource: i, fixedAxes: y } of d.selectorStates) {
|
|
1426
|
+
w.push(b(i)), D.push(
|
|
1427
|
+
(y ?? []).map(({ axisIdx: g, axisValue: A }) => ({ idx: g, value: A }))
|
|
1427
1428
|
), B.push(
|
|
1428
|
-
...await V(t, r, a,
|
|
1429
|
+
...await V(t, r, a, h, i, y)
|
|
1429
1430
|
);
|
|
1430
|
-
const f = await k(t, i,
|
|
1431
|
+
const f = await k(t, i, S);
|
|
1431
1432
|
f && w.push(f);
|
|
1432
1433
|
}
|
|
1433
|
-
const
|
|
1434
|
+
const C = await t.pFrameProvider.getTableOuterJoin(
|
|
1434
1435
|
[s, ...B, ...m],
|
|
1435
1436
|
w,
|
|
1436
1437
|
p,
|
|
1437
1438
|
!0,
|
|
1438
|
-
|
|
1439
|
+
v,
|
|
1439
1440
|
D
|
|
1440
1441
|
);
|
|
1441
1442
|
return w.forEach((d) => {
|
|
1442
1443
|
const i = d.toCanonicalString();
|
|
1443
|
-
c.values[i] =
|
|
1444
|
-
}), c.values[s.toCanonicalString()] =
|
|
1444
|
+
c.values[i] = O(d) ? C.columnsData[i] : C.axesData[i];
|
|
1445
|
+
}), c.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()], { byColumns: c };
|
|
1445
1446
|
}
|
|
1446
1447
|
async createChartSettings(t, e) {
|
|
1447
1448
|
var o, n;
|
|
1448
1449
|
const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1449
1450
|
if (!l)
|
|
1450
1451
|
throw Error("Value column is not valid");
|
|
1451
|
-
const s =
|
|
1452
|
-
if (!
|
|
1452
|
+
const s = b(l);
|
|
1453
|
+
if (!O(s))
|
|
1453
1454
|
throw Error("Value column is not valid");
|
|
1454
1455
|
const c = [l], r = {
|
|
1455
1456
|
type: "column",
|
|
@@ -1457,10 +1458,10 @@ var tt = class extends Q {
|
|
|
1457
1458
|
label: await T(t, l, [])
|
|
1458
1459
|
}, a = await Promise.all(
|
|
1459
1460
|
e.components.facetBy.selectorStates.map(async (p) => {
|
|
1460
|
-
var m,
|
|
1461
|
+
var m, S;
|
|
1461
1462
|
return {
|
|
1462
1463
|
type: "column",
|
|
1463
|
-
value: (
|
|
1464
|
+
value: (S = (m = await k(t, p.selectedSource, c)) == null ? void 0 : m.toCanonicalString()) != null ? S : p.selectedSource
|
|
1464
1465
|
};
|
|
1465
1466
|
})
|
|
1466
1467
|
);
|
|
@@ -1492,7 +1493,7 @@ var tt = class extends Q {
|
|
|
1492
1493
|
secondaryGrouping: { type: "simple", selectorStates: [] }
|
|
1493
1494
|
},
|
|
1494
1495
|
dividedAxes: {}
|
|
1495
|
-
}, lt = class extends
|
|
1496
|
+
}, lt = class extends Z {
|
|
1496
1497
|
constructor() {
|
|
1497
1498
|
super(
|
|
1498
1499
|
{
|
|
@@ -1566,8 +1567,8 @@ var tt = class extends Q {
|
|
|
1566
1567
|
}
|
|
1567
1568
|
async createDataByColumns(t, e) {
|
|
1568
1569
|
var o;
|
|
1569
|
-
const n = e.components.y.selectorStates[0].selectedSource, l =
|
|
1570
|
-
if (!n || !
|
|
1570
|
+
const n = e.components.y.selectorStates[0].selectedSource, l = b(n);
|
|
1571
|
+
if (!n || !O(l))
|
|
1571
1572
|
throw Error("Y column is not valid");
|
|
1572
1573
|
const s = {
|
|
1573
1574
|
type: "columns",
|
|
@@ -1576,50 +1577,50 @@ var tt = class extends Q {
|
|
|
1576
1577
|
}, { linkerColumnsMap: c, compositeLinkerMap: r } = await X(t), a = [
|
|
1577
1578
|
...e.components.filters.selectorStates,
|
|
1578
1579
|
...e.components.tabBy.selectorStates
|
|
1579
|
-
], u = Y(a), p = a.map((
|
|
1580
|
-
for (const { selectedSource:
|
|
1580
|
+
], u = Y(a), p = a.map((C) => b(C.selectedSource)).filter(O), m = [n], S = await Q(t, m), h = [e.components.primaryGrouping, e.components.secondaryGrouping, e.components.facetBy], x = [], w = [[]], v = [], D = [];
|
|
1581
|
+
for (const { selectedSource: C, fixedAxes: d } of a)
|
|
1581
1582
|
D.push(...await V(
|
|
1582
1583
|
t,
|
|
1583
1584
|
c,
|
|
1584
1585
|
r,
|
|
1585
|
-
|
|
1586
|
-
|
|
1586
|
+
S,
|
|
1587
|
+
C,
|
|
1587
1588
|
d
|
|
1588
1589
|
)), w.push(
|
|
1589
|
-
(d ?? []).map(({ axisIdx: i, axisValue:
|
|
1590
|
+
(d ?? []).map(({ axisIdx: i, axisValue: y }) => ({ idx: i, value: y }))
|
|
1590
1591
|
);
|
|
1591
|
-
for (const
|
|
1592
|
-
for (const { selectedSource: d, fixedAxes: i } of
|
|
1593
|
-
|
|
1594
|
-
(i ?? []).map(({ axisIdx: f, axisValue:
|
|
1592
|
+
for (const C of h)
|
|
1593
|
+
for (const { selectedSource: d, fixedAxes: i } of C.selectorStates) {
|
|
1594
|
+
x.push(b(d)), v.push(
|
|
1595
|
+
(i ?? []).map(({ axisIdx: f, axisValue: g }) => ({ idx: f, value: g }))
|
|
1595
1596
|
), D.push(...await V(
|
|
1596
1597
|
t,
|
|
1597
1598
|
c,
|
|
1598
1599
|
r,
|
|
1599
|
-
|
|
1600
|
+
S,
|
|
1600
1601
|
d,
|
|
1601
1602
|
i
|
|
1602
1603
|
));
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1604
|
+
const y = await k(t, d, m);
|
|
1605
|
+
y && x.push(y);
|
|
1605
1606
|
}
|
|
1606
1607
|
const B = await t.pFrameProvider.getTableOuterJoin(
|
|
1607
1608
|
[l, ...D, ...p],
|
|
1608
|
-
|
|
1609
|
+
x,
|
|
1609
1610
|
u,
|
|
1610
1611
|
!0,
|
|
1611
1612
|
w,
|
|
1612
|
-
|
|
1613
|
+
v
|
|
1613
1614
|
);
|
|
1614
|
-
return
|
|
1615
|
-
const d =
|
|
1616
|
-
s.values[d] =
|
|
1615
|
+
return x.forEach((C) => {
|
|
1616
|
+
const d = C.toCanonicalString();
|
|
1617
|
+
s.values[d] = O(C) ? B.columnsData[d] : B.axesData[d];
|
|
1617
1618
|
}), s.values[l.toCanonicalString()] = B.columnsData[l.toCanonicalString()], { byColumns: s };
|
|
1618
1619
|
}
|
|
1619
1620
|
async createChartSettings(t, e) {
|
|
1620
1621
|
var o, n;
|
|
1621
|
-
const l = e.components.y.selectorStates[0].selectedSource, s =
|
|
1622
|
-
if (!l || !
|
|
1622
|
+
const l = e.components.y.selectorStates[0].selectedSource, s = b(l);
|
|
1623
|
+
if (!l || !O(s))
|
|
1623
1624
|
throw Error("Y column is not valid");
|
|
1624
1625
|
const c = {
|
|
1625
1626
|
type: "column",
|
|
@@ -1659,10 +1660,10 @@ var tt = class extends Q {
|
|
|
1659
1660
|
};
|
|
1660
1661
|
}
|
|
1661
1662
|
const p = await Promise.all(e.components.facetBy.selectorStates.map(async (m) => {
|
|
1662
|
-
var
|
|
1663
|
+
var S, h;
|
|
1663
1664
|
return {
|
|
1664
1665
|
type: "column",
|
|
1665
|
-
value: (
|
|
1666
|
+
value: (h = (S = await k(t, m.selectedSource, r)) == null ? void 0 : S.toCanonicalString()) != null ? h : m.selectedSource,
|
|
1666
1667
|
label: await T(t, m.selectedSource, r)
|
|
1667
1668
|
};
|
|
1668
1669
|
}));
|
|
@@ -1694,20 +1695,20 @@ var tt = class extends Q {
|
|
|
1694
1695
|
function de(t) {
|
|
1695
1696
|
return t ? "kind" in t && t.kind === "PColumn" ? t.valueType === "String" : t.type === "String" : !0;
|
|
1696
1697
|
}
|
|
1697
|
-
function
|
|
1698
|
+
function ie(t, e) {
|
|
1698
1699
|
if (!e.length)
|
|
1699
1700
|
return [];
|
|
1700
|
-
const o = e.map((s) =>
|
|
1701
|
+
const o = e.map((s) => b(s)), n = Object.values(t.columnsData)[0].length, l = [];
|
|
1701
1702
|
for (let s = 0; s < n; s++) {
|
|
1702
1703
|
const c = o.map((r) => {
|
|
1703
1704
|
const a = r.toCanonicalString();
|
|
1704
|
-
return
|
|
1705
|
+
return O(r) ? t.columnsData[a][s] : t.axesData[a][s];
|
|
1705
1706
|
}).join(", ");
|
|
1706
1707
|
l.push(c);
|
|
1707
1708
|
}
|
|
1708
1709
|
return l;
|
|
1709
1710
|
}
|
|
1710
|
-
var rt = class extends
|
|
1711
|
+
var rt = class extends Z {
|
|
1711
1712
|
constructor() {
|
|
1712
1713
|
super(
|
|
1713
1714
|
{
|
|
@@ -1751,7 +1752,7 @@ var rt = class extends Q {
|
|
|
1751
1752
|
...e.components.x.selectorStates.map((n) => n.selectedSource),
|
|
1752
1753
|
...e.components.xGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1753
1754
|
]);
|
|
1754
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1755
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1755
1756
|
(n) => o.has(n.toCanonicalString())
|
|
1756
1757
|
) : !0;
|
|
1757
1758
|
}
|
|
@@ -1786,7 +1787,7 @@ var rt = class extends Q {
|
|
|
1786
1787
|
...e.components.y.selectorStates.map((n) => n.selectedSource),
|
|
1787
1788
|
...e.components.yGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1788
1789
|
]);
|
|
1789
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1790
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1790
1791
|
(n) => o.has(n.toCanonicalString())
|
|
1791
1792
|
) : !0;
|
|
1792
1793
|
}
|
|
@@ -1829,9 +1830,9 @@ var rt = class extends Q {
|
|
|
1829
1830
|
...e.components.x.selectorStates.map((n) => n.selectedSource),
|
|
1830
1831
|
...e.components.xGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1831
1832
|
]);
|
|
1832
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1833
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1833
1834
|
(n) => o.has(n.toCanonicalString())
|
|
1834
|
-
) : o.has(
|
|
1835
|
+
) : o.has(F.fromAxisSpec(t).toCanonicalString());
|
|
1835
1836
|
}
|
|
1836
1837
|
}),
|
|
1837
1838
|
annotationsY: new I({
|
|
@@ -1848,9 +1849,9 @@ var rt = class extends Q {
|
|
|
1848
1849
|
...e.components.y.selectorStates.map((n) => n.selectedSource),
|
|
1849
1850
|
...e.components.yGroupBy.selectorStates.map((n) => n.selectedSource)
|
|
1850
1851
|
]);
|
|
1851
|
-
return "kind" in t && t.kind === "PColumn" ?
|
|
1852
|
+
return "kind" in t && t.kind === "PColumn" ? F.fromAxesSpec(t.axesSpec).every(
|
|
1852
1853
|
(n) => o.has(n.toCanonicalString())
|
|
1853
|
-
) : o.has(
|
|
1854
|
+
) : o.has(F.fromAxisSpec(t).toCanonicalString());
|
|
1854
1855
|
}
|
|
1855
1856
|
})
|
|
1856
1857
|
},
|
|
@@ -1887,16 +1888,16 @@ var rt = class extends Q {
|
|
|
1887
1888
|
async getMustBeConsumedAxes(t, e) {
|
|
1888
1889
|
if (!e.components.value.selectorStates.length)
|
|
1889
1890
|
return /* @__PURE__ */ new Set();
|
|
1890
|
-
const o = e.components.value.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(
|
|
1891
|
-
return n ? new Set(n.axesSpec.map((l) =>
|
|
1891
|
+
const o = e.components.value.selectorStates[0].selectedSource, n = await t.pFrameProvider.getColumnSpecById(b(o));
|
|
1892
|
+
return n ? new Set(n.axesSpec.map((l) => F.fromAxisSpec(l).toCanonicalString())) : /* @__PURE__ */ new Set();
|
|
1892
1893
|
}
|
|
1893
1894
|
async createDataByColumns(t, e) {
|
|
1894
1895
|
var o, n;
|
|
1895
1896
|
const l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1896
1897
|
if (!l)
|
|
1897
1898
|
throw Error("Value column is not valid");
|
|
1898
|
-
const s =
|
|
1899
|
-
if (!
|
|
1899
|
+
const s = b(l);
|
|
1900
|
+
if (!O(s))
|
|
1900
1901
|
throw Error("Value column is not valid");
|
|
1901
1902
|
const c = {
|
|
1902
1903
|
type: "columns",
|
|
@@ -1905,7 +1906,7 @@ var rt = class extends Q {
|
|
|
1905
1906
|
}, { linkerColumnsMap: r, compositeLinkerMap: a } = await X(t), u = [
|
|
1906
1907
|
...e.components.filters.selectorStates,
|
|
1907
1908
|
...e.components.tabBy.selectorStates
|
|
1908
|
-
], p = Y(u), m = u.map((L) =>
|
|
1909
|
+
], p = Y(u), m = u.map((L) => b(L.selectedSource)).filter(O), S = [l], h = await Q(t, S), x = [
|
|
1909
1910
|
e.components.facetBy,
|
|
1910
1911
|
e.components.annotationsX,
|
|
1911
1912
|
e.components.annotationsY,
|
|
@@ -1914,114 +1915,114 @@ var rt = class extends Q {
|
|
|
1914
1915
|
e.components.xGroupBy,
|
|
1915
1916
|
e.components.yGroupBy,
|
|
1916
1917
|
e.components.tooltipContent
|
|
1917
|
-
], w = [],
|
|
1918
|
+
], w = [], v = [[]], D = [], B = [];
|
|
1918
1919
|
for (const { selectedSource: L, fixedAxes: N } of u)
|
|
1919
1920
|
B.push(...await V(
|
|
1920
1921
|
t,
|
|
1921
1922
|
r,
|
|
1922
1923
|
a,
|
|
1923
|
-
|
|
1924
|
+
h,
|
|
1924
1925
|
L,
|
|
1925
1926
|
N
|
|
1926
|
-
)),
|
|
1927
|
-
(N ?? []).map(({ axisIdx:
|
|
1927
|
+
)), v.push(
|
|
1928
|
+
(N ?? []).map(({ axisIdx: _, axisValue: G }) => ({ idx: _, value: G }))
|
|
1928
1929
|
);
|
|
1929
|
-
for (const L of
|
|
1930
|
-
for (const { selectedSource: N, fixedAxes:
|
|
1931
|
-
w.push(
|
|
1932
|
-
(
|
|
1930
|
+
for (const L of x)
|
|
1931
|
+
for (const { selectedSource: N, fixedAxes: _ } of L.selectorStates) {
|
|
1932
|
+
w.push(b(N)), D.push(
|
|
1933
|
+
(_ ?? []).map(({ axisIdx: M, axisValue: K }) => ({ idx: M, value: K }))
|
|
1933
1934
|
), B.push(...await V(
|
|
1934
1935
|
t,
|
|
1935
1936
|
r,
|
|
1936
1937
|
a,
|
|
1937
|
-
|
|
1938
|
+
h,
|
|
1938
1939
|
N,
|
|
1939
|
-
|
|
1940
|
+
_
|
|
1940
1941
|
));
|
|
1941
|
-
const G = await k(t, N,
|
|
1942
|
+
const G = await k(t, N, S);
|
|
1942
1943
|
G && w.push(G);
|
|
1943
1944
|
}
|
|
1944
|
-
const
|
|
1945
|
+
const C = await t.pFrameProvider.getTableOuterJoin(
|
|
1945
1946
|
[s, ...B, ...m],
|
|
1946
1947
|
w,
|
|
1947
1948
|
p,
|
|
1948
1949
|
!0,
|
|
1949
|
-
|
|
1950
|
+
v,
|
|
1950
1951
|
D
|
|
1951
1952
|
);
|
|
1952
1953
|
w.forEach((L) => {
|
|
1953
1954
|
const N = L.toCanonicalString();
|
|
1954
|
-
c.values[N] =
|
|
1955
|
-
}), c.values[s.toCanonicalString()] =
|
|
1955
|
+
c.values[N] = O(L) ? C.columnsData[N] : C.axesData[N];
|
|
1956
|
+
}), c.values[s.toCanonicalString()] = C.columnsData[s.toCanonicalString()];
|
|
1956
1957
|
const d = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map((L) => L.selectedSource), i = d.join(", ");
|
|
1957
|
-
c.values[i] =
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1958
|
+
c.values[i] = ie(C, d);
|
|
1959
|
+
const y = e.components.x.selectorStates.map((L) => L.selectedSource), f = await Promise.all(
|
|
1960
|
+
y.map(
|
|
1960
1961
|
async (L) => {
|
|
1961
|
-
var N,
|
|
1962
|
-
return (
|
|
1962
|
+
var N, _;
|
|
1963
|
+
return (_ = (N = await k(t, L, S)) == null ? void 0 : N.toCanonicalString()) != null ? _ : L;
|
|
1963
1964
|
}
|
|
1964
1965
|
)
|
|
1965
1966
|
);
|
|
1966
|
-
c.values.xLabelsKey =
|
|
1967
|
-
const
|
|
1968
|
-
c.values[
|
|
1969
|
-
const
|
|
1970
|
-
|
|
1967
|
+
c.values.xLabelsKey = ie(C, f);
|
|
1968
|
+
const g = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map((L) => L.selectedSource), A = g.join(", ");
|
|
1969
|
+
c.values[A] = ie(C, g);
|
|
1970
|
+
const P = e.components.y.selectorStates.map((L) => L.selectedSource), E = await Promise.all(
|
|
1971
|
+
P.map(
|
|
1971
1972
|
async (L) => {
|
|
1972
|
-
var N,
|
|
1973
|
-
return (
|
|
1973
|
+
var N, _;
|
|
1974
|
+
return (_ = (N = await k(t, L, S)) == null ? void 0 : N.toCanonicalString()) != null ? _ : L;
|
|
1974
1975
|
}
|
|
1975
1976
|
)
|
|
1976
1977
|
);
|
|
1977
|
-
return c.values.yLabelsKey =
|
|
1978
|
+
return c.values.yLabelsKey = ie(C, E), { byColumns: c };
|
|
1978
1979
|
}
|
|
1979
1980
|
async createChartSettings(t, e) {
|
|
1980
1981
|
var o;
|
|
1981
1982
|
const n = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource;
|
|
1982
1983
|
if (!n)
|
|
1983
1984
|
throw Error("Value column is not valid");
|
|
1984
|
-
const l =
|
|
1985
|
-
if (!
|
|
1985
|
+
const l = b(n);
|
|
1986
|
+
if (!O(l))
|
|
1986
1987
|
throw Error("Value column is not valid");
|
|
1987
1988
|
const s = [n], c = {
|
|
1988
1989
|
type: "column",
|
|
1989
1990
|
value: n,
|
|
1990
1991
|
label: await T(t, n, [])
|
|
1991
|
-
}, a = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map(({ selectedSource: d }) =>
|
|
1992
|
+
}, a = e.components.x.selectorStates.concat(e.components.xGroupBy.selectorStates).map(({ selectedSource: d }) => b(d)).map((d) => d.toCanonicalString()).join(", "), p = e.components.y.selectorStates.concat(e.components.yGroupBy.selectorStates).map(({ selectedSource: d }) => b(d)).map((d) => d.toCanonicalString()).join(", "), m = await Promise.all(
|
|
1992
1993
|
e.components.facetBy.selectorStates.map(async (d) => {
|
|
1993
|
-
var i,
|
|
1994
|
+
var i, y;
|
|
1994
1995
|
return {
|
|
1995
1996
|
type: "column",
|
|
1996
|
-
value: (
|
|
1997
|
+
value: (y = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : d.selectedSource
|
|
1997
1998
|
};
|
|
1998
1999
|
})
|
|
1999
|
-
),
|
|
2000
|
+
), S = await Promise.all(
|
|
2000
2001
|
e.components.xGroupBy.selectorStates.map(async (d) => {
|
|
2001
|
-
var i,
|
|
2002
|
+
var i, y;
|
|
2002
2003
|
return {
|
|
2003
2004
|
type: "column",
|
|
2004
2005
|
label: await T(t, d.selectedSource, s),
|
|
2005
2006
|
value: d.selectedSource,
|
|
2006
|
-
valueLabels: (
|
|
2007
|
+
valueLabels: (y = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : d.selectedSource
|
|
2007
2008
|
};
|
|
2008
2009
|
})
|
|
2009
|
-
),
|
|
2010
|
+
), h = await Promise.all(
|
|
2010
2011
|
e.components.yGroupBy.selectorStates.map(async (d) => {
|
|
2011
|
-
var i,
|
|
2012
|
+
var i, y;
|
|
2012
2013
|
return {
|
|
2013
2014
|
type: "column",
|
|
2014
2015
|
label: await T(t, d.selectedSource, s),
|
|
2015
2016
|
value: d.selectedSource,
|
|
2016
|
-
valueLabels: (
|
|
2017
|
+
valueLabels: (y = (i = await k(t, d.selectedSource, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : d.selectedSource
|
|
2017
2018
|
};
|
|
2018
2019
|
})
|
|
2019
|
-
),
|
|
2020
|
+
), x = await t.pFrameProvider.getColumnSpecById(l), w = await Promise.all(
|
|
2020
2021
|
e.components.annotationsX.selectorStates.map(async (d) => {
|
|
2021
|
-
var i,
|
|
2022
|
-
const f = d.selectedSource,
|
|
2023
|
-
(
|
|
2024
|
-
)) != null ?
|
|
2022
|
+
var i, y;
|
|
2023
|
+
const f = d.selectedSource, g = b(f), A = O(g) ? await t.pFrameProvider.getColumnSpecById(g) : (y = (i = x == null ? void 0 : x.axesSpec) == null ? void 0 : i.find(
|
|
2024
|
+
(P) => F.fromAxisSpec(P).toCanonicalString() === f
|
|
2025
|
+
)) != null ? y : null;
|
|
2025
2026
|
return {
|
|
2026
2027
|
axis: "x",
|
|
2027
2028
|
valueColumn: {
|
|
@@ -2029,15 +2030,15 @@ var rt = class extends Q {
|
|
|
2029
2030
|
value: f,
|
|
2030
2031
|
label: await T(t, f, s)
|
|
2031
2032
|
},
|
|
2032
|
-
type: de(
|
|
2033
|
+
type: de(A) ? "discrete" : "continuous"
|
|
2033
2034
|
};
|
|
2034
2035
|
})
|
|
2035
|
-
),
|
|
2036
|
+
), v = await Promise.all(
|
|
2036
2037
|
e.components.annotationsY.selectorStates.map(async (d) => {
|
|
2037
|
-
var i,
|
|
2038
|
-
const f = d.selectedSource,
|
|
2039
|
-
(
|
|
2040
|
-
)) != null ?
|
|
2038
|
+
var i, y;
|
|
2039
|
+
const f = d.selectedSource, g = b(f), A = O(g) ? await t.pFrameProvider.getColumnSpecById(g) : (y = (i = x == null ? void 0 : x.axesSpec) == null ? void 0 : i.find(
|
|
2040
|
+
(P) => F.fromAxisSpec(P).toCanonicalString() === f
|
|
2041
|
+
)) != null ? y : null;
|
|
2041
2042
|
return {
|
|
2042
2043
|
axis: "y",
|
|
2043
2044
|
valueColumn: {
|
|
@@ -2045,7 +2046,7 @@ var rt = class extends Q {
|
|
|
2045
2046
|
value: f,
|
|
2046
2047
|
label: await T(t, f, s)
|
|
2047
2048
|
},
|
|
2048
|
-
type: de(
|
|
2049
|
+
type: de(A) ? "discrete" : "continuous"
|
|
2049
2050
|
};
|
|
2050
2051
|
})
|
|
2051
2052
|
), D = (await Promise.all(
|
|
@@ -2056,22 +2057,23 @@ var rt = class extends Q {
|
|
|
2056
2057
|
e.components.y.selectorStates.map(
|
|
2057
2058
|
(d) => T(t, d.selectedSource, s)
|
|
2058
2059
|
)
|
|
2059
|
-
)).join(", "),
|
|
2060
|
+
)).join(", "), C = await Promise.all(
|
|
2060
2061
|
e.components.tooltipContent.selectorStates.map(async (d) => {
|
|
2061
|
-
var i,
|
|
2062
|
-
const
|
|
2062
|
+
var i, y, f, g;
|
|
2063
|
+
const A = d.selectedSource, P = await J(t, A, s);
|
|
2063
2064
|
return {
|
|
2064
2065
|
type: "column",
|
|
2065
|
-
label: await T(t,
|
|
2066
|
-
value:
|
|
2067
|
-
valueLabels: (
|
|
2066
|
+
label: await T(t, A, s) || A,
|
|
2067
|
+
value: A,
|
|
2068
|
+
valueLabels: (y = (i = await k(t, A, s)) == null ? void 0 : i.toCanonicalString()) != null ? y : A,
|
|
2069
|
+
format: (g = (f = P == null ? void 0 : P.annotations) == null ? void 0 : f[ne]) != null ? g : ".0%"
|
|
2068
2070
|
};
|
|
2069
2071
|
})
|
|
2070
2072
|
);
|
|
2071
2073
|
return {
|
|
2072
2074
|
type: "heatmap",
|
|
2073
2075
|
valueColumn: c,
|
|
2074
|
-
valueType: de(
|
|
2076
|
+
valueType: de(x) ? "discrete" : "continuous",
|
|
2075
2077
|
xColumn: {
|
|
2076
2078
|
type: "column",
|
|
2077
2079
|
value: a,
|
|
@@ -2085,12 +2087,12 @@ var rt = class extends Q {
|
|
|
2085
2087
|
valueLabels: "yLabelsKey"
|
|
2086
2088
|
},
|
|
2087
2089
|
facetBy: m,
|
|
2088
|
-
xGroupBy:
|
|
2089
|
-
yGroupBy:
|
|
2090
|
-
annotations: [...w, ...
|
|
2090
|
+
xGroupBy: S,
|
|
2091
|
+
yGroupBy: h,
|
|
2092
|
+
annotations: [...w, ...v],
|
|
2091
2093
|
tooltips: {
|
|
2092
2094
|
show: !0,
|
|
2093
|
-
content:
|
|
2095
|
+
content: C
|
|
2094
2096
|
}
|
|
2095
2097
|
};
|
|
2096
2098
|
}
|
|
@@ -2110,7 +2112,7 @@ var rt = class extends Q {
|
|
|
2110
2112
|
tooltipContent: { type: "simple", selectorStates: [] }
|
|
2111
2113
|
},
|
|
2112
2114
|
dividedAxes: {}
|
|
2113
|
-
}, it = class extends
|
|
2115
|
+
}, it = class extends Z {
|
|
2114
2116
|
constructor() {
|
|
2115
2117
|
super(
|
|
2116
2118
|
{
|
|
@@ -2251,10 +2253,10 @@ var rt = class extends Q {
|
|
|
2251
2253
|
async getMustBeConsumedAxes(t, e) {
|
|
2252
2254
|
if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
|
|
2253
2255
|
return /* @__PURE__ */ new Set();
|
|
2254
|
-
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(
|
|
2256
|
+
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(b(o)), s = await t.pFrameProvider.getColumnSpecById(b(n));
|
|
2255
2257
|
if (!l || !s)
|
|
2256
2258
|
return /* @__PURE__ */ new Set();
|
|
2257
|
-
const c = l.axesSpec.map((p) =>
|
|
2259
|
+
const c = l.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), r = s.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), a = c.filter((p) => !r.some((m) => m === p)), u = r.filter((p) => !c.some((m) => m === p));
|
|
2258
2260
|
return /* @__PURE__ */ new Set([...a, ...u]);
|
|
2259
2261
|
}
|
|
2260
2262
|
async createDataByColumns(t, e) {
|
|
@@ -2262,29 +2264,29 @@ var rt = class extends Q {
|
|
|
2262
2264
|
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
2263
2265
|
if (!s || !c)
|
|
2264
2266
|
throw Error("X or Y column is not valid");
|
|
2265
|
-
const r =
|
|
2267
|
+
const r = b(s), a = b(c), u = {
|
|
2266
2268
|
type: "columns",
|
|
2267
2269
|
id: (l = z(e.components)) != null ? l : "",
|
|
2268
2270
|
values: {}
|
|
2269
|
-
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t),
|
|
2271
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), S = [
|
|
2270
2272
|
...e.components.filters.selectorStates,
|
|
2271
2273
|
...e.components.tabBy.selectorStates
|
|
2272
|
-
],
|
|
2274
|
+
], h = Y(S), x = S.map((g) => b(g.selectedSource)).filter(O), w = [r, a].filter(O).map((g) => g.toCanonicalString());
|
|
2273
2275
|
if (w.length === 0)
|
|
2274
2276
|
throw Error("One of X and Y should be a column");
|
|
2275
|
-
const
|
|
2276
|
-
for (const { selectedSource:
|
|
2277
|
+
const v = await Q(t, w), D = [r, a, ...x], B = [], C = [[], []], d = [], i = [];
|
|
2278
|
+
for (const { selectedSource: g, fixedAxes: A } of S)
|
|
2277
2279
|
i.push(...await V(
|
|
2278
2280
|
t,
|
|
2279
2281
|
p,
|
|
2280
2282
|
m,
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
)),
|
|
2285
|
-
(
|
|
2283
|
+
v,
|
|
2284
|
+
g,
|
|
2285
|
+
A
|
|
2286
|
+
)), C.push(
|
|
2287
|
+
(A ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
2286
2288
|
);
|
|
2287
|
-
const
|
|
2289
|
+
const y = [
|
|
2288
2290
|
e.components.grouping,
|
|
2289
2291
|
e.components.size,
|
|
2290
2292
|
e.components.shape,
|
|
@@ -2293,94 +2295,96 @@ var rt = class extends Q {
|
|
|
2293
2295
|
e.components.label,
|
|
2294
2296
|
e.components.highlight
|
|
2295
2297
|
];
|
|
2296
|
-
for (const
|
|
2297
|
-
for (const { selectedSource:
|
|
2298
|
-
B.push(A
|
|
2299
|
-
(
|
|
2298
|
+
for (const g of y)
|
|
2299
|
+
for (const { selectedSource: A, fixedAxes: P } of g.selectorStates) {
|
|
2300
|
+
B.push(b(A)), d.push(
|
|
2301
|
+
(P ?? []).map(({ axisIdx: L, axisValue: N }) => ({ idx: L, value: N }))
|
|
2300
2302
|
), i.push(...await V(
|
|
2301
2303
|
t,
|
|
2302
2304
|
p,
|
|
2303
2305
|
m,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2306
|
+
v,
|
|
2307
|
+
A,
|
|
2308
|
+
P
|
|
2307
2309
|
));
|
|
2308
|
-
const E = await k(t,
|
|
2310
|
+
const E = await k(t, A, w);
|
|
2309
2311
|
E && B.push(E);
|
|
2310
2312
|
}
|
|
2311
2313
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
2312
|
-
[r, a, ...i, ...
|
|
2314
|
+
[r, a, ...i, ...x],
|
|
2313
2315
|
B,
|
|
2314
|
-
|
|
2316
|
+
h,
|
|
2315
2317
|
!1,
|
|
2316
|
-
|
|
2318
|
+
C,
|
|
2317
2319
|
d
|
|
2318
2320
|
);
|
|
2319
|
-
return [...D, ...B].forEach((
|
|
2320
|
-
const
|
|
2321
|
-
u.values[
|
|
2322
|
-
}), u.values.key = new Array(u.values[Object.keys(u.values)[0]].length).fill(0).map((
|
|
2321
|
+
return [...D, ...B].forEach((g) => {
|
|
2322
|
+
const A = g.toCanonicalString();
|
|
2323
|
+
u.values[A] = O(g) ? f.columnsData[A] : f.axesData[A];
|
|
2324
|
+
}), u.values.key = new Array(u.values[Object.keys(u.values)[0]].length).fill(0).map((g, A) => A), e.components.highlight.selectorStates.length && (u.values.highlight = Be(e.components.highlight.selectorStates, f)), { byColumns: u };
|
|
2323
2325
|
}
|
|
2324
2326
|
async createChartSettings(t, e) {
|
|
2325
2327
|
var o, n, l, s, c;
|
|
2326
|
-
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, u = r ?
|
|
2327
|
-
if (!r || !a || !u || !p || !
|
|
2328
|
+
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, u = r ? b(r) : null, p = a ? b(a) : null;
|
|
2329
|
+
if (!r || !a || !u || !p || !O(u) && !O(p))
|
|
2328
2330
|
throw Error("Empty or invalid required data");
|
|
2329
|
-
const m = [u, p].filter(
|
|
2331
|
+
const m = [u, p].filter(O).map((i) => i.toCanonicalString()), S = {
|
|
2330
2332
|
type: "column",
|
|
2331
2333
|
value: r,
|
|
2332
2334
|
label: await T(t, r, m)
|
|
2333
|
-
},
|
|
2335
|
+
}, h = {
|
|
2334
2336
|
type: "column",
|
|
2335
2337
|
value: a,
|
|
2336
2338
|
label: await T(t, a, m)
|
|
2337
|
-
},
|
|
2339
|
+
}, x = {
|
|
2338
2340
|
type: "column",
|
|
2339
2341
|
value: "key"
|
|
2340
2342
|
}, w = await Promise.all(
|
|
2341
2343
|
e.components.facetBy.selectorStates.map(async (i) => {
|
|
2342
|
-
var
|
|
2344
|
+
var y, f;
|
|
2343
2345
|
return {
|
|
2344
2346
|
type: "column",
|
|
2345
|
-
value: (f = (
|
|
2347
|
+
value: (f = (y = await k(t, i.selectedSource, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i.selectedSource
|
|
2346
2348
|
};
|
|
2347
2349
|
})
|
|
2348
|
-
),
|
|
2350
|
+
), v = pe.uniq([
|
|
2349
2351
|
...e.components.grouping.selectorStates.map((i) => i.selectedSource),
|
|
2350
2352
|
...e.components.size.selectorStates.map((i) => i.selectedSource),
|
|
2351
2353
|
...e.components.shape.selectorStates.map((i) => i.selectedSource)
|
|
2352
2354
|
]), D = await Promise.all(
|
|
2353
|
-
|
|
2354
|
-
var
|
|
2355
|
+
v.map(async (i) => {
|
|
2356
|
+
var y, f;
|
|
2355
2357
|
return {
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2358
|
+
columnName: {
|
|
2359
|
+
type: "column",
|
|
2360
|
+
label: await T(t, i, m) || i,
|
|
2361
|
+
value: i,
|
|
2362
|
+
valueLabels: (f = (y = await k(t, i, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i
|
|
2363
|
+
}
|
|
2360
2364
|
};
|
|
2361
2365
|
})
|
|
2362
2366
|
), B = await Promise.all(
|
|
2363
2367
|
e.components.tooltipContent.selectorStates.map(async (i) => {
|
|
2364
|
-
var
|
|
2365
|
-
const
|
|
2368
|
+
var y, f;
|
|
2369
|
+
const g = i.selectedSource, A = b(g), P = (y = await k(t, g, m)) != null ? y : A, E = await J(t, g, m);
|
|
2366
2370
|
return {
|
|
2367
2371
|
type: "column",
|
|
2368
|
-
label: await T(t,
|
|
2369
|
-
value:
|
|
2370
|
-
valueLabels:
|
|
2371
|
-
format: (f = E == null ? void 0 : E.annotations) == null ? void 0 : f[
|
|
2372
|
+
label: await T(t, g, m) || g,
|
|
2373
|
+
value: g,
|
|
2374
|
+
valueLabels: P.toCanonicalString(),
|
|
2375
|
+
format: (f = E == null ? void 0 : E.annotations) == null ? void 0 : f[ne]
|
|
2372
2376
|
};
|
|
2373
2377
|
})
|
|
2374
2378
|
);
|
|
2375
|
-
let
|
|
2379
|
+
let C;
|
|
2376
2380
|
if (e.components.label.selectorStates.length) {
|
|
2377
|
-
const i = e.components.label.selectorStates[0].selectedSource,
|
|
2378
|
-
|
|
2381
|
+
const i = e.components.label.selectorStates[0].selectedSource, y = await J(t, i, m);
|
|
2382
|
+
C = {
|
|
2379
2383
|
type: "column",
|
|
2380
2384
|
value: i,
|
|
2381
2385
|
label: await T(t, i, m),
|
|
2382
2386
|
valueLabels: (s = (l = await k(t, i, m)) == null ? void 0 : l.toCanonicalString()) != null ? s : i,
|
|
2383
|
-
format: (c =
|
|
2387
|
+
format: (c = y == null ? void 0 : y.annotations) == null ? void 0 : c[ne]
|
|
2384
2388
|
};
|
|
2385
2389
|
}
|
|
2386
2390
|
let d;
|
|
@@ -2389,12 +2393,12 @@ var rt = class extends Q {
|
|
|
2389
2393
|
value: "highlight"
|
|
2390
2394
|
}), {
|
|
2391
2395
|
type: "scatterplot",
|
|
2392
|
-
x:
|
|
2393
|
-
y:
|
|
2394
|
-
keyColumn:
|
|
2396
|
+
x: S,
|
|
2397
|
+
y: h,
|
|
2398
|
+
keyColumn: x,
|
|
2395
2399
|
facetBy: w,
|
|
2396
2400
|
grouping: D,
|
|
2397
|
-
label:
|
|
2401
|
+
label: C,
|
|
2398
2402
|
highlight: d,
|
|
2399
2403
|
tooltips: {
|
|
2400
2404
|
show: !0,
|
|
@@ -2417,7 +2421,7 @@ var rt = class extends Q {
|
|
|
2417
2421
|
size: { type: "simple", selectorStates: [] }
|
|
2418
2422
|
},
|
|
2419
2423
|
dividedAxes: {}
|
|
2420
|
-
}, pt = class extends
|
|
2424
|
+
}, pt = class extends Z {
|
|
2421
2425
|
constructor() {
|
|
2422
2426
|
super(
|
|
2423
2427
|
{
|
|
@@ -2547,10 +2551,10 @@ var rt = class extends Q {
|
|
|
2547
2551
|
async getMustBeConsumedAxes(t, e) {
|
|
2548
2552
|
if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
|
|
2549
2553
|
return /* @__PURE__ */ new Set();
|
|
2550
|
-
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(
|
|
2554
|
+
const o = e.components.x.selectorStates[0].selectedSource, n = e.components.y.selectorStates[0].selectedSource, l = await t.pFrameProvider.getColumnSpecById(b(o)), s = await t.pFrameProvider.getColumnSpecById(b(n));
|
|
2551
2555
|
if (!l || !s)
|
|
2552
2556
|
return /* @__PURE__ */ new Set();
|
|
2553
|
-
const c = l.axesSpec.map((p) =>
|
|
2557
|
+
const c = l.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), r = s.axesSpec.map((p) => F.fromAxisSpec(p).toCanonicalString()), a = c.filter((p) => !r.some((m) => m === p)), u = r.filter((p) => !c.some((m) => m === p));
|
|
2554
2558
|
return /* @__PURE__ */ new Set([...a, ...u]);
|
|
2555
2559
|
}
|
|
2556
2560
|
async createDataByColumns(t, e) {
|
|
@@ -2558,32 +2562,32 @@ var rt = class extends Q {
|
|
|
2558
2562
|
const s = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
2559
2563
|
if (!s || !c)
|
|
2560
2564
|
throw Error("X or Y column is not valid");
|
|
2561
|
-
const r =
|
|
2565
|
+
const r = b(s), a = b(c);
|
|
2562
2566
|
if (!r || !a)
|
|
2563
2567
|
throw Error("X or Y column is not valid");
|
|
2564
2568
|
const u = {
|
|
2565
2569
|
type: "columns",
|
|
2566
2570
|
id: (l = z(e.components)) != null ? l : "",
|
|
2567
2571
|
values: {}
|
|
2568
|
-
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t),
|
|
2572
|
+
}, { linkerColumnsMap: p, compositeLinkerMap: m } = await X(t), S = [
|
|
2569
2573
|
...e.components.filters.selectorStates,
|
|
2570
2574
|
...e.components.tabBy.selectorStates
|
|
2571
|
-
],
|
|
2575
|
+
], h = Y(S), x = S.map((g) => b(g.selectedSource)).filter(O), w = [r, a].filter(O).map((g) => g.toCanonicalString());
|
|
2572
2576
|
if (w.length === 0)
|
|
2573
2577
|
throw Error("One of X and Y should be a column");
|
|
2574
|
-
const
|
|
2575
|
-
for (const { selectedSource:
|
|
2578
|
+
const v = await Q(t, w), D = [r, a, ...x], B = [], C = [[], []], d = [], i = [];
|
|
2579
|
+
for (const { selectedSource: g, fixedAxes: A } of S)
|
|
2576
2580
|
i.push(...await V(
|
|
2577
2581
|
t,
|
|
2578
2582
|
p,
|
|
2579
2583
|
m,
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
)),
|
|
2584
|
-
(
|
|
2584
|
+
v,
|
|
2585
|
+
g,
|
|
2586
|
+
A
|
|
2587
|
+
)), C.push(
|
|
2588
|
+
(A ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
2585
2589
|
);
|
|
2586
|
-
const
|
|
2590
|
+
const y = [
|
|
2587
2591
|
e.components.grouping,
|
|
2588
2592
|
e.components.facetBy,
|
|
2589
2593
|
e.components.tooltipContent,
|
|
@@ -2591,32 +2595,32 @@ var rt = class extends Q {
|
|
|
2591
2595
|
e.components.highlight,
|
|
2592
2596
|
e.components.size
|
|
2593
2597
|
];
|
|
2594
|
-
for (const
|
|
2595
|
-
for (const { selectedSource:
|
|
2596
|
-
B.push(A
|
|
2597
|
-
(
|
|
2598
|
+
for (const g of y)
|
|
2599
|
+
for (const { selectedSource: A, fixedAxes: P } of g.selectorStates) {
|
|
2600
|
+
B.push(b(A)), d.push(
|
|
2601
|
+
(P ?? []).map(({ axisIdx: L, axisValue: N }) => ({ idx: L, value: N }))
|
|
2598
2602
|
), i.push(...await V(
|
|
2599
2603
|
t,
|
|
2600
2604
|
p,
|
|
2601
2605
|
m,
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2606
|
+
v,
|
|
2607
|
+
A,
|
|
2608
|
+
P
|
|
2605
2609
|
));
|
|
2606
|
-
const E = await k(t,
|
|
2610
|
+
const E = await k(t, A, w);
|
|
2607
2611
|
E && B.push(E);
|
|
2608
2612
|
}
|
|
2609
2613
|
const f = await t.pFrameProvider.getTableOuterJoin(
|
|
2610
|
-
[r, a, ...i, ...
|
|
2614
|
+
[r, a, ...i, ...x],
|
|
2611
2615
|
B,
|
|
2612
|
-
|
|
2616
|
+
h,
|
|
2613
2617
|
!1,
|
|
2614
|
-
|
|
2618
|
+
C,
|
|
2615
2619
|
d
|
|
2616
2620
|
);
|
|
2617
|
-
return [...D, ...B].forEach((
|
|
2618
|
-
const
|
|
2619
|
-
u.values[
|
|
2621
|
+
return [...D, ...B].forEach((g) => {
|
|
2622
|
+
const A = g.toCanonicalString();
|
|
2623
|
+
u.values[A] = O(g) ? f.columnsData[A] : f.axesData[A];
|
|
2620
2624
|
}), e.components.highlight.selectorStates.length && (u.values.highlight = Be(e.components.highlight.selectorStates, f)), {
|
|
2621
2625
|
byColumns: u,
|
|
2622
2626
|
axesData: f.axesData
|
|
@@ -2624,63 +2628,65 @@ var rt = class extends Q {
|
|
|
2624
2628
|
}
|
|
2625
2629
|
async createChartSettings(t, e) {
|
|
2626
2630
|
var o, n, l, s, c;
|
|
2627
|
-
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, u = r ?
|
|
2628
|
-
if (!r || !a || !u || !p || !
|
|
2631
|
+
const r = (o = e.components.x.selectorStates[0]) == null ? void 0 : o.selectedSource, a = (n = e.components.y.selectorStates[0]) == null ? void 0 : n.selectedSource, u = r ? b(r) : null, p = a ? b(a) : null;
|
|
2632
|
+
if (!r || !a || !u || !p || !O(u) && !O(p))
|
|
2629
2633
|
throw Error("Empty or invalid required data");
|
|
2630
|
-
const m = [u, p].filter(
|
|
2634
|
+
const m = [u, p].filter(O).map((i) => i.toCanonicalString()), S = {
|
|
2631
2635
|
type: "column",
|
|
2632
2636
|
value: r,
|
|
2633
2637
|
label: await T(t, r, m)
|
|
2634
|
-
},
|
|
2638
|
+
}, h = {
|
|
2635
2639
|
type: "column",
|
|
2636
2640
|
value: a,
|
|
2637
2641
|
label: await T(t, a, m)
|
|
2638
|
-
},
|
|
2642
|
+
}, x = {
|
|
2639
2643
|
type: "column",
|
|
2640
2644
|
value: "key"
|
|
2641
2645
|
}, w = await Promise.all(
|
|
2642
2646
|
e.components.facetBy.selectorStates.map(async (i) => {
|
|
2643
|
-
var
|
|
2647
|
+
var y, f;
|
|
2644
2648
|
return {
|
|
2645
2649
|
type: "column",
|
|
2646
|
-
value: (f = (
|
|
2650
|
+
value: (f = (y = await k(t, i.selectedSource, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i.selectedSource
|
|
2647
2651
|
};
|
|
2648
2652
|
})
|
|
2649
|
-
),
|
|
2653
|
+
), v = pe.uniq([
|
|
2650
2654
|
...e.components.grouping.selectorStates.map((i) => i.selectedSource),
|
|
2651
2655
|
...e.components.size.selectorStates.map((i) => i.selectedSource)
|
|
2652
2656
|
]), D = await Promise.all(
|
|
2653
|
-
|
|
2654
|
-
var
|
|
2657
|
+
v.map(async (i) => {
|
|
2658
|
+
var y, f;
|
|
2655
2659
|
return {
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
+
columnName: {
|
|
2661
|
+
type: "column",
|
|
2662
|
+
label: await T(t, i, m) || i,
|
|
2663
|
+
value: i,
|
|
2664
|
+
valueLabels: (f = (y = await k(t, i, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : i
|
|
2665
|
+
}
|
|
2660
2666
|
};
|
|
2661
2667
|
})
|
|
2662
2668
|
), B = await Promise.all(
|
|
2663
2669
|
e.components.tooltipContent.selectorStates.map(async (i) => {
|
|
2664
|
-
var
|
|
2665
|
-
const
|
|
2670
|
+
var y, f, g;
|
|
2671
|
+
const A = i.selectedSource, P = await J(t, A, m);
|
|
2666
2672
|
return {
|
|
2667
2673
|
type: "column",
|
|
2668
|
-
label: await T(t,
|
|
2669
|
-
value:
|
|
2670
|
-
valueLabels: (f = (
|
|
2671
|
-
format: (
|
|
2674
|
+
label: await T(t, A, m) || A,
|
|
2675
|
+
value: A,
|
|
2676
|
+
valueLabels: (f = (y = await k(t, A, m)) == null ? void 0 : y.toCanonicalString()) != null ? f : A,
|
|
2677
|
+
format: (g = P == null ? void 0 : P.annotations) == null ? void 0 : g[ne]
|
|
2672
2678
|
};
|
|
2673
2679
|
})
|
|
2674
2680
|
);
|
|
2675
|
-
let
|
|
2681
|
+
let C;
|
|
2676
2682
|
if (e.components.label.selectorStates.length) {
|
|
2677
|
-
const i = e.components.label.selectorStates[0].selectedSource,
|
|
2678
|
-
|
|
2683
|
+
const i = e.components.label.selectorStates[0].selectedSource, y = await J(t, i, m);
|
|
2684
|
+
C = {
|
|
2679
2685
|
type: "column",
|
|
2680
2686
|
value: i,
|
|
2681
2687
|
label: await T(t, i, m),
|
|
2682
2688
|
valueLabels: (s = (l = await k(t, i, m)) == null ? void 0 : l.toCanonicalString()) != null ? s : i,
|
|
2683
|
-
format: (c =
|
|
2689
|
+
format: (c = y == null ? void 0 : y.annotations) == null ? void 0 : c[ne]
|
|
2684
2690
|
};
|
|
2685
2691
|
}
|
|
2686
2692
|
let d;
|
|
@@ -2689,12 +2695,12 @@ var rt = class extends Q {
|
|
|
2689
2695
|
value: "highlight"
|
|
2690
2696
|
}), {
|
|
2691
2697
|
type: "scatterplot-umap",
|
|
2692
|
-
x:
|
|
2693
|
-
y:
|
|
2694
|
-
keyColumn:
|
|
2698
|
+
x: S,
|
|
2699
|
+
y: h,
|
|
2700
|
+
keyColumn: x,
|
|
2695
2701
|
facetBy: w,
|
|
2696
2702
|
grouping: D,
|
|
2697
|
-
label:
|
|
2703
|
+
label: C,
|
|
2698
2704
|
highlight: d,
|
|
2699
2705
|
tooltips: {
|
|
2700
2706
|
show: !0,
|
|
@@ -2722,7 +2728,7 @@ var rt = class extends Q {
|
|
|
2722
2728
|
heatmapGroup: { type: "simple", selectorStates: [] }
|
|
2723
2729
|
},
|
|
2724
2730
|
dividedAxes: {}
|
|
2725
|
-
}, dt = class extends
|
|
2731
|
+
}, dt = class extends Z {
|
|
2726
2732
|
constructor() {
|
|
2727
2733
|
super(
|
|
2728
2734
|
{
|
|
@@ -2913,16 +2919,16 @@ var rt = class extends Q {
|
|
|
2913
2919
|
}
|
|
2914
2920
|
async createTableData(t, e) {
|
|
2915
2921
|
var o;
|
|
2916
|
-
const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s =
|
|
2917
|
-
if (!l || !
|
|
2922
|
+
const n = {}, l = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, s = b(l);
|
|
2923
|
+
if (!l || !O(s))
|
|
2918
2924
|
throw Error("Value column is not valid");
|
|
2919
2925
|
const { linkerColumnsMap: c, compositeLinkerMap: r } = await X(t), a = Y([
|
|
2920
2926
|
...e.components.filters.selectorStates,
|
|
2921
2927
|
...e.components.tabBy.selectorStates
|
|
2922
2928
|
]), u = [
|
|
2923
|
-
...e.components.filters.selectorStates.map((d) =>
|
|
2924
|
-
...e.components.tabBy.selectorStates.map((d) =>
|
|
2925
|
-
].filter(
|
|
2929
|
+
...e.components.filters.selectorStates.map((d) => b(d.selectedSource)),
|
|
2930
|
+
...e.components.tabBy.selectorStates.map((d) => b(d.selectedSource))
|
|
2931
|
+
].filter(O), p = [l], m = await Q(t, p), S = [], h = [], x = [], w = [e.components.value], v = [
|
|
2926
2932
|
e.components.tableContent,
|
|
2927
2933
|
// next components can content data mapped on tree
|
|
2928
2934
|
e.components.labels,
|
|
@@ -2932,61 +2938,61 @@ var rt = class extends Q {
|
|
|
2932
2938
|
e.components.lineColor
|
|
2933
2939
|
], D = {};
|
|
2934
2940
|
for (const d of w)
|
|
2935
|
-
for (const { selectedSource: i, fixedAxes:
|
|
2936
|
-
|
|
2941
|
+
for (const { selectedSource: i, fixedAxes: y } of d.selectorStates) {
|
|
2942
|
+
x.push(...await V(
|
|
2937
2943
|
t,
|
|
2938
2944
|
c,
|
|
2939
2945
|
r,
|
|
2940
2946
|
m,
|
|
2941
2947
|
i,
|
|
2942
|
-
|
|
2948
|
+
y
|
|
2943
2949
|
));
|
|
2944
|
-
const f = await k(t, i, p),
|
|
2945
|
-
D[
|
|
2950
|
+
const f = await k(t, i, p), g = f ?? b(i);
|
|
2951
|
+
D[g.toCanonicalString()] = i, S.push(g);
|
|
2946
2952
|
}
|
|
2947
|
-
for (const d of
|
|
2948
|
-
for (const { selectedSource: i, fixedAxes:
|
|
2949
|
-
|
|
2953
|
+
for (const d of v)
|
|
2954
|
+
for (const { selectedSource: i, fixedAxes: y } of d.selectorStates) {
|
|
2955
|
+
x.push(...await V(
|
|
2950
2956
|
t,
|
|
2951
2957
|
c,
|
|
2952
2958
|
r,
|
|
2953
2959
|
m,
|
|
2954
2960
|
i,
|
|
2955
|
-
|
|
2961
|
+
y
|
|
2956
2962
|
));
|
|
2957
|
-
const f = await k(t, i, p),
|
|
2958
|
-
D[i] =
|
|
2963
|
+
const f = await k(t, i, p), g = f ?? b(i);
|
|
2964
|
+
D[i] = g.toCanonicalString(), h.push(g);
|
|
2959
2965
|
}
|
|
2960
2966
|
const B = await t.pFrameProvider.getTableOuterJoin(
|
|
2961
|
-
[...
|
|
2962
|
-
|
|
2967
|
+
[...S, ...u, ...x],
|
|
2968
|
+
h,
|
|
2963
2969
|
a,
|
|
2964
2970
|
!1
|
|
2965
2971
|
);
|
|
2966
|
-
for (const d of [...
|
|
2967
|
-
const i = d.toCanonicalString(),
|
|
2968
|
-
n[
|
|
2969
|
-
data:
|
|
2970
|
-
spec:
|
|
2971
|
-
label: await T(t,
|
|
2972
|
+
for (const d of [...S, ...h]) {
|
|
2973
|
+
const i = d.toCanonicalString(), y = D[d.toCanonicalString()];
|
|
2974
|
+
n[y] = {
|
|
2975
|
+
data: O(d) ? B.columnsData[i] : B.axesData[i],
|
|
2976
|
+
spec: O(d) ? B.columnSpecs[i] : B.axesSpecs[i],
|
|
2977
|
+
label: await T(t, y, p)
|
|
2972
2978
|
};
|
|
2973
2979
|
}
|
|
2974
|
-
const
|
|
2980
|
+
const C = Object.keys(B.axesData).find(
|
|
2975
2981
|
(d) => {
|
|
2976
2982
|
var i;
|
|
2977
|
-
return ((i =
|
|
2983
|
+
return ((i = b(d)) == null ? void 0 : i.name) === Se;
|
|
2978
2984
|
}
|
|
2979
2985
|
);
|
|
2980
|
-
return
|
|
2981
|
-
data: B.axesData[
|
|
2986
|
+
return C ? n[ye] = {
|
|
2987
|
+
data: B.axesData[C],
|
|
2982
2988
|
spec: { kind: "PColumn", valueType: "Int", name: "Node id" },
|
|
2983
2989
|
label: "Node id"
|
|
2984
2990
|
} : console.warn("Missed node id axis in data column"), n;
|
|
2985
2991
|
}
|
|
2986
2992
|
async createDataByColumns(t, e) {
|
|
2987
2993
|
var o, n, l;
|
|
2988
|
-
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.heatmapAnnotation.selectorStates[0]) == null ? void 0 : n.selectedSource, r =
|
|
2989
|
-
if (!s || !
|
|
2994
|
+
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = (n = e.components.heatmapAnnotation.selectorStates[0]) == null ? void 0 : n.selectedSource, r = b(s), a = c ? b(c) : null;
|
|
2995
|
+
if (!s || !O(r))
|
|
2990
2996
|
throw Error("Value column is not valid");
|
|
2991
2997
|
const u = {
|
|
2992
2998
|
type: "columns",
|
|
@@ -2995,7 +3001,7 @@ var rt = class extends Q {
|
|
|
2995
3001
|
}, p = [
|
|
2996
3002
|
...e.components.filters.selectorStates,
|
|
2997
3003
|
...e.components.tabBy.selectorStates
|
|
2998
|
-
], m = Y(p),
|
|
3004
|
+
], m = Y(p), S = p.map((y) => b(y.selectedSource)).filter(O), h = [r, a].filter(O).map((y) => y.toCanonicalString()), x = [], w = [], v = [], D = [], B = [
|
|
2999
3005
|
e.components.value,
|
|
3000
3006
|
e.components.height,
|
|
3001
3007
|
e.components.labels,
|
|
@@ -3005,131 +3011,131 @@ var rt = class extends Q {
|
|
|
3005
3011
|
e.components.lineColor,
|
|
3006
3012
|
e.components.heatmapAnnotation,
|
|
3007
3013
|
e.components.heatmapForSequence
|
|
3008
|
-
],
|
|
3014
|
+
], C = [
|
|
3009
3015
|
e.components.facetBy,
|
|
3010
3016
|
e.components.heatmapAxis,
|
|
3011
3017
|
e.components.heatmapGroup,
|
|
3012
3018
|
e.components.tableContent
|
|
3013
3019
|
];
|
|
3014
|
-
for (const
|
|
3015
|
-
for (const { selectedSource: f, fixedAxes:
|
|
3016
|
-
|
|
3017
|
-
(
|
|
3020
|
+
for (const y of B)
|
|
3021
|
+
for (const { selectedSource: f, fixedAxes: g } of y.selectorStates) {
|
|
3022
|
+
x.push(b(f)), v.push(
|
|
3023
|
+
(g ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
3018
3024
|
);
|
|
3019
|
-
const
|
|
3020
|
-
|
|
3025
|
+
const A = await k(t, f, h);
|
|
3026
|
+
A && x.push(A);
|
|
3021
3027
|
}
|
|
3022
|
-
p.forEach(({ fixedAxes:
|
|
3023
|
-
|
|
3024
|
-
(
|
|
3028
|
+
p.forEach(({ fixedAxes: y }) => {
|
|
3029
|
+
v.push(
|
|
3030
|
+
(y ?? []).map(({ axisIdx: f, axisValue: g }) => ({ idx: f, value: g }))
|
|
3025
3031
|
);
|
|
3026
3032
|
});
|
|
3027
|
-
for (const
|
|
3028
|
-
for (const { selectedSource: f, fixedAxes:
|
|
3029
|
-
w.push(
|
|
3030
|
-
(
|
|
3033
|
+
for (const y of C)
|
|
3034
|
+
for (const { selectedSource: f, fixedAxes: g } of y.selectorStates) {
|
|
3035
|
+
w.push(b(f)), D.push(
|
|
3036
|
+
(g ?? []).map(({ axisIdx: P, axisValue: E }) => ({ idx: P, value: E }))
|
|
3031
3037
|
);
|
|
3032
|
-
const
|
|
3033
|
-
|
|
3038
|
+
const A = await k(t, f, h);
|
|
3039
|
+
A && w.push(A);
|
|
3034
3040
|
}
|
|
3035
3041
|
const d = await t.pFrameProvider.getTableOuterJoin(
|
|
3036
|
-
[...
|
|
3042
|
+
[...x, ...S],
|
|
3037
3043
|
w,
|
|
3038
3044
|
m,
|
|
3039
3045
|
!1,
|
|
3040
|
-
|
|
3046
|
+
v,
|
|
3041
3047
|
D
|
|
3042
3048
|
);
|
|
3043
|
-
[...
|
|
3044
|
-
const f =
|
|
3045
|
-
u.values[f] = [], u.values[f] =
|
|
3049
|
+
[...x, ...w].forEach((y) => {
|
|
3050
|
+
const f = y.toCanonicalString(), g = O(y) ? d.columnsData[f] : d.axesData[f];
|
|
3051
|
+
u.values[f] = [], u.values[f] = g;
|
|
3046
3052
|
});
|
|
3047
3053
|
const i = Object.keys(d.axesData).find(
|
|
3048
|
-
(
|
|
3054
|
+
(y) => {
|
|
3049
3055
|
var f;
|
|
3050
|
-
return ((f =
|
|
3056
|
+
return ((f = b(y)) == null ? void 0 : f.name) === Se;
|
|
3051
3057
|
}
|
|
3052
3058
|
);
|
|
3053
3059
|
return i ? u.values[ye] = d.axesData[i] : console.warn("Missed node id axis in data column"), { byColumns: u };
|
|
3054
3060
|
}
|
|
3055
3061
|
async createChartSettings(t, e) {
|
|
3056
3062
|
var o, n, l;
|
|
3057
|
-
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c =
|
|
3058
|
-
if (!s || !
|
|
3063
|
+
const s = (o = e.components.value.selectorStates[0]) == null ? void 0 : o.selectedSource, c = b(s);
|
|
3064
|
+
if (!s || !O(c))
|
|
3059
3065
|
throw Error("Data column is not valid");
|
|
3060
|
-
const r = [s], a = { type: "column", value: ye }, u = { type: "column", value: s }, p = e.components.height.selectorStates.length ? { type: "column", value: e.components.height.selectorStates[0].selectedSource } : void 0, m = e.components.labels.selectorStates.length ? { type: "column", value: e.components.labels.selectorStates[0].selectedSource } : void 0,
|
|
3066
|
+
const r = [s], a = { type: "column", value: ye }, u = { type: "column", value: s }, p = e.components.height.selectorStates.length ? { type: "column", value: e.components.height.selectorStates[0].selectedSource } : void 0, m = e.components.labels.selectorStates.length ? { type: "column", value: e.components.labels.selectorStates[0].selectedSource } : void 0, S = {};
|
|
3061
3067
|
if (e.components.nodeColor.selectorStates.length) {
|
|
3062
|
-
const
|
|
3063
|
-
|
|
3068
|
+
const v = e.components.nodeColor.selectorStates[0].selectedSource;
|
|
3069
|
+
S.nodeColor = {
|
|
3064
3070
|
columnName: {
|
|
3065
3071
|
type: "column",
|
|
3066
|
-
value:
|
|
3067
|
-
label: await T(t,
|
|
3072
|
+
value: v,
|
|
3073
|
+
label: await T(t, v, r)
|
|
3068
3074
|
}
|
|
3069
3075
|
};
|
|
3070
3076
|
}
|
|
3071
3077
|
if (e.components.nodeShape.selectorStates.length) {
|
|
3072
|
-
const
|
|
3073
|
-
|
|
3078
|
+
const v = e.components.nodeShape.selectorStates[0].selectedSource;
|
|
3079
|
+
S.nodeShape = {
|
|
3074
3080
|
columnName: {
|
|
3075
3081
|
type: "column",
|
|
3076
|
-
value:
|
|
3077
|
-
label: await T(t,
|
|
3082
|
+
value: v,
|
|
3083
|
+
label: await T(t, v, r)
|
|
3078
3084
|
}
|
|
3079
3085
|
};
|
|
3080
3086
|
}
|
|
3081
3087
|
if (e.components.nodeSize.selectorStates.length) {
|
|
3082
|
-
const
|
|
3083
|
-
|
|
3088
|
+
const v = e.components.nodeSize.selectorStates[0].selectedSource;
|
|
3089
|
+
S.nodeSize = {
|
|
3084
3090
|
columnName: {
|
|
3085
3091
|
type: "column",
|
|
3086
|
-
value:
|
|
3087
|
-
label: await T(t,
|
|
3092
|
+
value: v,
|
|
3093
|
+
label: await T(t, v, r)
|
|
3088
3094
|
}
|
|
3089
3095
|
};
|
|
3090
3096
|
}
|
|
3091
3097
|
if (e.components.lineColor.selectorStates.length) {
|
|
3092
|
-
const
|
|
3093
|
-
|
|
3098
|
+
const v = e.components.lineColor.selectorStates[0].selectedSource;
|
|
3099
|
+
S.lineColor = {
|
|
3094
3100
|
columnName: {
|
|
3095
3101
|
type: "column",
|
|
3096
|
-
value:
|
|
3097
|
-
label: await T(t,
|
|
3102
|
+
value: v,
|
|
3103
|
+
label: await T(t, v, r)
|
|
3098
3104
|
}
|
|
3099
3105
|
};
|
|
3100
3106
|
}
|
|
3101
|
-
let
|
|
3107
|
+
let h, x, w;
|
|
3102
3108
|
if (e.components.heatmapAnnotation.selectorStates.length && e.components.heatmapAxis.selectorStates.length) {
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3109
|
+
const v = e.components.heatmapAnnotation.selectorStates[0].selectedSource;
|
|
3110
|
+
h = {
|
|
3105
3111
|
type: "column",
|
|
3106
|
-
value:
|
|
3107
|
-
label: await T(t,
|
|
3108
|
-
valueLabels: (n = await k(t,
|
|
3112
|
+
value: v,
|
|
3113
|
+
label: await T(t, v, []),
|
|
3114
|
+
valueLabels: (n = await k(t, v, [])) == null ? void 0 : n.toCanonicalString()
|
|
3109
3115
|
};
|
|
3110
3116
|
const D = e.components.heatmapAxis.selectorStates[0].selectedSource;
|
|
3111
|
-
|
|
3117
|
+
x = {
|
|
3112
3118
|
type: "column",
|
|
3113
3119
|
value: D,
|
|
3114
|
-
label: await T(t, D, [
|
|
3115
|
-
valueLabels: (l = await k(t, D, [
|
|
3120
|
+
label: await T(t, D, [v]),
|
|
3121
|
+
valueLabels: (l = await k(t, D, [v])) == null ? void 0 : l.toCanonicalString()
|
|
3116
3122
|
}, w = await Promise.all(
|
|
3117
3123
|
e.components.heatmapGroup.selectorStates.map(async (B) => {
|
|
3118
|
-
var
|
|
3124
|
+
var C;
|
|
3119
3125
|
return {
|
|
3120
3126
|
type: "column",
|
|
3121
3127
|
value: B.selectedSource,
|
|
3122
|
-
label: await T(t, B.selectedSource, [
|
|
3123
|
-
valueLabels: (
|
|
3128
|
+
label: await T(t, B.selectedSource, [v]),
|
|
3129
|
+
valueLabels: (C = await k(t, B.selectedSource, [v])) == null ? void 0 : C.toCanonicalString()
|
|
3124
3130
|
};
|
|
3125
3131
|
})
|
|
3126
3132
|
);
|
|
3127
3133
|
} else if (e.components.heatmapForSequence.selectorStates.length) {
|
|
3128
|
-
const
|
|
3129
|
-
|
|
3134
|
+
const v = e.components.heatmapForSequence.selectorStates[0].selectedSource;
|
|
3135
|
+
h = {
|
|
3130
3136
|
type: "column",
|
|
3131
|
-
value:
|
|
3132
|
-
label: await T(t,
|
|
3137
|
+
value: v,
|
|
3138
|
+
label: await T(t, v, [])
|
|
3133
3139
|
};
|
|
3134
3140
|
}
|
|
3135
3141
|
return {
|
|
@@ -3138,14 +3144,14 @@ var rt = class extends Q {
|
|
|
3138
3144
|
parentId: u,
|
|
3139
3145
|
height: p,
|
|
3140
3146
|
labels: m,
|
|
3141
|
-
aes:
|
|
3142
|
-
heatmapAnnotation:
|
|
3143
|
-
heatmapAxis:
|
|
3147
|
+
aes: S,
|
|
3148
|
+
heatmapAnnotation: h,
|
|
3149
|
+
heatmapAxis: x,
|
|
3144
3150
|
heatmapGroup: w
|
|
3145
3151
|
};
|
|
3146
3152
|
}
|
|
3147
3153
|
}, he = 1e6;
|
|
3148
|
-
function
|
|
3154
|
+
function ue(t, e) {
|
|
3149
3155
|
if (t === "String")
|
|
3150
3156
|
return e.data;
|
|
3151
3157
|
const o = new Array(e.data.length);
|
|
@@ -3178,10 +3184,10 @@ var St = class {
|
|
|
3178
3184
|
}), l = n.filter((c) => c.spec.type === "axis"), s = n.filter((c) => c.spec.type === "column");
|
|
3179
3185
|
return {
|
|
3180
3186
|
axesData: l.reduce((c, r) => {
|
|
3181
|
-
const a =
|
|
3182
|
-
return c[a.toCanonicalString()] =
|
|
3187
|
+
const a = F.fromAxisSpec(r.spec.spec);
|
|
3188
|
+
return c[a.toCanonicalString()] = ue(a.type, r.data), c;
|
|
3183
3189
|
}, {}),
|
|
3184
|
-
data: s.length ?
|
|
3190
|
+
data: s.length ? ue(t.type, s[0].data) : []
|
|
3185
3191
|
};
|
|
3186
3192
|
} catch (o) {
|
|
3187
3193
|
throw console.error("PFrame: calculateTableData error"), o;
|
|
@@ -3207,9 +3213,9 @@ var St = class {
|
|
|
3207
3213
|
}
|
|
3208
3214
|
}
|
|
3209
3215
|
async getAxisUniqueValues(t, e, o = he, n = []) {
|
|
3210
|
-
const l = e.filter(
|
|
3216
|
+
const l = e.filter(O), s = await Promise.all(l.map((a) => this.getColumnSpecById(a))), c = t.toCanonicalString(), r = l.filter((a, u) => {
|
|
3211
3217
|
const p = s[u];
|
|
3212
|
-
return p !== null && p.axesSpec.some((m) =>
|
|
3218
|
+
return p !== null && p.axesSpec.some((m) => F.fromAxisSpec(m).toCanonicalString() === c);
|
|
3213
3219
|
});
|
|
3214
3220
|
if (r.length === 0)
|
|
3215
3221
|
return { values: [], overflow: !1 };
|
|
@@ -3225,11 +3231,11 @@ var St = class {
|
|
|
3225
3231
|
)
|
|
3226
3232
|
);
|
|
3227
3233
|
let p = !1;
|
|
3228
|
-
return u.forEach((m,
|
|
3229
|
-
m.overflow && (p = !0, console.warn(`More than ${o} values for ${r[
|
|
3234
|
+
return u.forEach((m, S) => {
|
|
3235
|
+
m.overflow && (p = !0, console.warn(`More than ${o} values for ${r[S].name} column`));
|
|
3230
3236
|
}), {
|
|
3231
|
-
values:
|
|
3232
|
-
|
|
3237
|
+
values: pe.uniq(
|
|
3238
|
+
pe.flatten(u.map((m) => Array.from(m.values.data).map(String)))
|
|
3233
3239
|
),
|
|
3234
3240
|
overflow: p
|
|
3235
3241
|
};
|
|
@@ -3238,23 +3244,23 @@ var St = class {
|
|
|
3238
3244
|
}
|
|
3239
3245
|
}
|
|
3240
3246
|
async getTableOuterJoin(t, e, o = [], n = !0, l = [], s = []) {
|
|
3241
|
-
const c = t.filter(
|
|
3247
|
+
const c = t.filter(O), r = e.filter(O), a = {
|
|
3242
3248
|
src: {
|
|
3243
3249
|
type: "outer",
|
|
3244
3250
|
primary: {
|
|
3245
3251
|
type: n ? "inner" : "full",
|
|
3246
3252
|
entries: c.map((u, p) => {
|
|
3247
3253
|
var m;
|
|
3248
|
-
const
|
|
3254
|
+
const S = (m = l[p]) == null ? void 0 : m.map((h) => ({
|
|
3249
3255
|
type: "constant",
|
|
3250
|
-
axisIndex:
|
|
3251
|
-
constant:
|
|
3252
|
-
})).filter((
|
|
3253
|
-
return
|
|
3256
|
+
axisIndex: h.idx,
|
|
3257
|
+
constant: h.value
|
|
3258
|
+
})).filter((h) => h.constant !== void 0);
|
|
3259
|
+
return S != null && S.length ? {
|
|
3254
3260
|
type: "slicedColumn",
|
|
3255
3261
|
newId: u.name,
|
|
3256
3262
|
column: u.name,
|
|
3257
|
-
axisFilters:
|
|
3263
|
+
axisFilters: S
|
|
3258
3264
|
} : {
|
|
3259
3265
|
type: "column",
|
|
3260
3266
|
column: u.name
|
|
@@ -3263,16 +3269,16 @@ var St = class {
|
|
|
3263
3269
|
},
|
|
3264
3270
|
secondary: r.map((u, p) => {
|
|
3265
3271
|
var m;
|
|
3266
|
-
const
|
|
3272
|
+
const S = (m = s[p]) == null ? void 0 : m.map((h) => ({
|
|
3267
3273
|
type: "constant",
|
|
3268
|
-
axisIndex:
|
|
3269
|
-
constant:
|
|
3270
|
-
})).filter((
|
|
3271
|
-
return
|
|
3274
|
+
axisIndex: h.idx,
|
|
3275
|
+
constant: h.value
|
|
3276
|
+
})).filter((h) => h.constant !== void 0);
|
|
3277
|
+
return S != null && S.length ? {
|
|
3272
3278
|
type: "slicedColumn",
|
|
3273
3279
|
newId: u.name,
|
|
3274
3280
|
column: u.name,
|
|
3275
|
-
axisFilters:
|
|
3281
|
+
axisFilters: S
|
|
3276
3282
|
} : {
|
|
3277
3283
|
type: "column",
|
|
3278
3284
|
column: u.name
|
|
@@ -3283,29 +3289,29 @@ var St = class {
|
|
|
3283
3289
|
sorting: []
|
|
3284
3290
|
};
|
|
3285
3291
|
try {
|
|
3286
|
-
const u = Date.now(), p = await this.pframeDriver.calculateTableData(this.pframeHandle, a), m = p.filter((
|
|
3292
|
+
const u = Date.now(), p = await this.pframeDriver.calculateTableData(this.pframeHandle, a), m = p.filter((h) => h.spec.type === "axis"), S = p.filter((h) => h.spec.type === "column");
|
|
3287
3293
|
return {
|
|
3288
|
-
axesData: m.reduce((
|
|
3289
|
-
const w =
|
|
3290
|
-
return
|
|
3294
|
+
axesData: m.reduce((h, x) => {
|
|
3295
|
+
const w = F.fromAxisSpec(x.spec.spec);
|
|
3296
|
+
return h[w.toCanonicalString()] = ue(w.type, x.data), h;
|
|
3291
3297
|
}, {}),
|
|
3292
|
-
columnsData:
|
|
3293
|
-
const w =
|
|
3294
|
-
name:
|
|
3298
|
+
columnsData: S.reduce((h, x) => {
|
|
3299
|
+
const w = x.spec.spec, v = new W({
|
|
3300
|
+
name: x.spec.id,
|
|
3295
3301
|
type: w.valueType
|
|
3296
3302
|
});
|
|
3297
|
-
return
|
|
3303
|
+
return h[v.toCanonicalString()] = ue(v.type, x.data), h;
|
|
3298
3304
|
}, {}),
|
|
3299
|
-
columnSpecs:
|
|
3300
|
-
const w =
|
|
3301
|
-
name:
|
|
3305
|
+
columnSpecs: S.reduce((h, x) => {
|
|
3306
|
+
const w = x.spec.spec, v = new W({
|
|
3307
|
+
name: x.spec.id,
|
|
3302
3308
|
type: w.valueType
|
|
3303
3309
|
});
|
|
3304
|
-
return
|
|
3310
|
+
return h[v.toCanonicalString()] = w, h;
|
|
3305
3311
|
}, {}),
|
|
3306
|
-
axesSpecs: m.reduce((
|
|
3307
|
-
const w =
|
|
3308
|
-
return
|
|
3312
|
+
axesSpecs: m.reduce((h, x) => {
|
|
3313
|
+
const w = x.spec.spec, v = F.fromAxisSpec(w);
|
|
3314
|
+
return h[v.toCanonicalString()] = w, h;
|
|
3309
3315
|
}, {})
|
|
3310
3316
|
};
|
|
3311
3317
|
} catch (u) {
|
|
@@ -3322,15 +3328,15 @@ var St = class {
|
|
|
3322
3328
|
}
|
|
3323
3329
|
async getColumnAxesIds(t) {
|
|
3324
3330
|
var e, o;
|
|
3325
|
-
return (o = (e = await this.getColumnSpecById(t)) == null ? void 0 : e.axesSpec.map((n) =>
|
|
3331
|
+
return (o = (e = await this.getColumnSpecById(t)) == null ? void 0 : e.axesSpec.map((n) => F.fromAxisSpec(n))) != null ? o : [];
|
|
3326
3332
|
}
|
|
3327
3333
|
async getRequestColumnsFromSelectedSources(t) {
|
|
3328
3334
|
var e, o;
|
|
3329
3335
|
const n = [];
|
|
3330
3336
|
for (const l of t)
|
|
3331
|
-
if (
|
|
3337
|
+
if (O(l)) {
|
|
3332
3338
|
const s = (o = (e = await this.getColumnSpecById(l)) == null ? void 0 : e.axesSpec) != null ? o : [];
|
|
3333
|
-
n.push(...s.map((c) =>
|
|
3339
|
+
n.push(...s.map((c) => F.fromAxisSpec(c).toPFrameId()));
|
|
3334
3340
|
}
|
|
3335
3341
|
return n;
|
|
3336
3342
|
}
|
|
@@ -3387,7 +3393,7 @@ var St = class {
|
|
|
3387
3393
|
constructor(t, e, o = (n, l) => l ?? n) {
|
|
3388
3394
|
this.labelsModifier = o, this.pFrameProvider = new St(t, e);
|
|
3389
3395
|
}
|
|
3390
|
-
},
|
|
3396
|
+
}, _e = {
|
|
3391
3397
|
controllers: {
|
|
3392
3398
|
discrete: new lt(),
|
|
3393
3399
|
scatterplot: new it(),
|
|
@@ -3408,13 +3414,13 @@ var St = class {
|
|
|
3408
3414
|
}
|
|
3409
3415
|
};
|
|
3410
3416
|
function wt(t) {
|
|
3411
|
-
return
|
|
3417
|
+
return _e.controllers[t];
|
|
3412
3418
|
}
|
|
3413
|
-
function
|
|
3414
|
-
return
|
|
3419
|
+
function vt(t) {
|
|
3420
|
+
return _e.initialStates[t];
|
|
3415
3421
|
}
|
|
3416
3422
|
export {
|
|
3417
|
-
|
|
3423
|
+
F as AxisId,
|
|
3418
3424
|
tt as BubbleStateController,
|
|
3419
3425
|
W as ColumnId,
|
|
3420
3426
|
ht as DemoDataStore,
|
|
@@ -3422,9 +3428,9 @@ export {
|
|
|
3422
3428
|
lt as DiscreteStateController,
|
|
3423
3429
|
rt as HeatmapStateController,
|
|
3424
3430
|
it as ScatterplotStateController,
|
|
3425
|
-
|
|
3431
|
+
b as columnOrAxisIdFromString,
|
|
3426
3432
|
wt as getControllerByType,
|
|
3427
|
-
|
|
3428
|
-
|
|
3433
|
+
vt as getInitialStateByType,
|
|
3434
|
+
O as isColumnId
|
|
3429
3435
|
};
|
|
3430
3436
|
//# sourceMappingURL=index.js.map
|