@milaboratories/graph-maker 1.1.157 → 1.1.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GraphMaker/constantsCommon.d.ts +1 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +17 -16
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +104 -93
- package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.js +33 -33
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +1 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +11 -11
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +136 -135
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +2 -2
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +115 -107
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js +99 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js +57 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js +43 -43
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js +85 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/AxisCaptions.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/GroupCaptions.js +16 -16
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +191 -197
- 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 +29 -27
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js +38 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js +44 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/constants.js +16 -15
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/constants.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +63 -66
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +64 -62
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateChartSideElementSizes.js +9 -9
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +5 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +10 -8
- package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +21 -21
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +19 -19
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +8 -8
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +9 -9
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +7 -7
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +2 -2
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +59 -57
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/components/PlDataTable.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +13 -13
- package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +137 -133
- package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +74 -74
- package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import "../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
|
|
2
2
|
import { getNormalizedAxesList as E } from "../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
|
|
3
3
|
import "../_virtual/canonicalize.js";
|
|
4
|
-
import { LinkerMap as
|
|
4
|
+
import { LinkerMap as W } from "../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/linker_columns.js";
|
|
5
5
|
import "../node_modules/@milaboratories/pl-model-common/dist/plid.js";
|
|
6
6
|
import "../node_modules/@milaboratories/pl-model-common/dist/ref.js";
|
|
7
7
|
import "../node_modules/@platforma-sdk/model/dist/render/util/label.js";
|
|
8
|
-
import { isLabelColumn as
|
|
8
|
+
import { isLabelColumn as U } from "../node_modules/@platforma-sdk/model/dist/components/PlDataTable.js";
|
|
9
9
|
import "../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
|
|
10
|
-
import { DISCRETE_FILTER_KEY as F, SUBSET_FILTER_KEY as L, COLUMN_LABEL_KEY as
|
|
11
|
-
import { columnOrAxisIdFromString as B, isColumnId as T, AxisId as N, ColumnId as
|
|
12
|
-
import { getStateCopy as
|
|
10
|
+
import { DISCRETE_FILTER_KEY as F, SUBSET_FILTER_KEY as L, COLUMN_LABEL_KEY as j, IS_LINKER_COLUMN as z } from "../constants.js";
|
|
11
|
+
import { columnOrAxisIdFromString as B, isColumnId as T, AxisId as N, ColumnId as H } from "../spec.js";
|
|
12
|
+
import { getStateCopy as $, getNotAllowedAxes as Y, axisIsNonHomogenous as Z, getColumnOrAxisLabel as V } from "../utils.js";
|
|
13
13
|
var G = Object.defineProperty, J = (d, e, t) => e in d ? G(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t, S = (d, e, t) => J(d, typeof e != "symbol" ? e + "" : e, t);
|
|
14
14
|
const Q = (d) => {
|
|
15
15
|
var e;
|
|
16
|
-
return ((e = d == null ? void 0 : d.annotations) == null ? void 0 : e[
|
|
17
|
-
},
|
|
16
|
+
return ((e = d == null ? void 0 : d.annotations) == null ? void 0 : e[z]) === "true";
|
|
17
|
+
}, q = class M {
|
|
18
18
|
constructor({
|
|
19
19
|
componentName: e,
|
|
20
20
|
allowedTypes: t,
|
|
@@ -25,7 +25,7 @@ const Q = (d) => {
|
|
|
25
25
|
annotations: p = {},
|
|
26
26
|
checkSourceBySpec: o
|
|
27
27
|
}) {
|
|
28
|
-
S(this, "componentName"), S(this, "allowedTypes"), S(this, "settings"), S(this, "dependsOn"), S(this, "parentComponents"), S(this, "strictlyDependsOnParents"), S(this, "annotations"), S(this, "checkSourceBySpec"), this.componentName = e, this.allowedTypes = [...t], this.settings = { ...
|
|
28
|
+
S(this, "componentName"), S(this, "allowedTypes"), S(this, "settings"), S(this, "dependsOn"), S(this, "parentComponents"), S(this, "strictlyDependsOnParents"), S(this, "annotations"), S(this, "checkSourceBySpec"), this.componentName = e, this.allowedTypes = [...t], this.settings = { ...M.DefaultSettings, ...n }, this.dependsOn = [...i], this.parentComponents = [...l], this.strictlyDependsOnParents = s ?? !0, this.annotations = { ...p }, o && (this.checkSourceBySpec = o);
|
|
29
29
|
}
|
|
30
30
|
get isRequired() {
|
|
31
31
|
return this.settings.required;
|
|
@@ -34,11 +34,11 @@ const Q = (d) => {
|
|
|
34
34
|
return this.settings.dimensionConsumer;
|
|
35
35
|
}
|
|
36
36
|
addSelected(e, t) {
|
|
37
|
-
const n =
|
|
37
|
+
const n = $(e);
|
|
38
38
|
return n.components[this.componentName].selectorStates.push(t), n;
|
|
39
39
|
}
|
|
40
40
|
deleteSelected(e, t) {
|
|
41
|
-
const n =
|
|
41
|
+
const n = $(e);
|
|
42
42
|
return n.components[this.componentName].selectorStates = n.components[this.componentName].selectorStates.filter((s) => s.selectedSource !== t), n;
|
|
43
43
|
}
|
|
44
44
|
getParentSelectedSources(e) {
|
|
@@ -72,7 +72,7 @@ const Q = (d) => {
|
|
|
72
72
|
const m = await e.pFrameProvider.getColumnSpecById(u);
|
|
73
73
|
if (!m)
|
|
74
74
|
continue;
|
|
75
|
-
const g =
|
|
75
|
+
const g = Y(m, Array.from(i.values()).map((a) => a.spec), n, s);
|
|
76
76
|
for (const a of g)
|
|
77
77
|
l.set(N.fromAxisSpec(a).toCanonicalString(), { parentSource: o, spec: a });
|
|
78
78
|
}
|
|
@@ -88,9 +88,9 @@ const Q = (d) => {
|
|
|
88
88
|
return s;
|
|
89
89
|
const l = E(Array.from(i.values()).map((o) => o.spec)), p = E(t.getReachableByLinkersAxesFromAxes(l));
|
|
90
90
|
for (const o of p) {
|
|
91
|
-
const u =
|
|
91
|
+
const u = W.getLinkerKeyFromAxisSpec(o), m = t.data.get(u), g = Array.from((m == null ? void 0 : m.linkWith.keys()) ?? []), a = m == null ? void 0 : m.linkWith.get(g[0]);
|
|
92
92
|
if (a) {
|
|
93
|
-
const C = N.fromAxisSpec(o).toCanonicalString(), x = new
|
|
93
|
+
const C = N.fromAxisSpec(o).toCanonicalString(), x = new H({ name: a.columnId, type: a.spec.valueType }).toCanonicalString();
|
|
94
94
|
s.set(C, { parentSource: x, spec: o });
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -130,11 +130,11 @@ const Q = (d) => {
|
|
|
130
130
|
const f = this.getAllowedAxes(i, n, s);
|
|
131
131
|
for (const [y, { spec: c, parentSource: A }] of f.entries()) {
|
|
132
132
|
const w = B(y), r = Z(c), I = this.allowedTypes.includes(c.type), k = Object.entries(this.annotations).every(
|
|
133
|
-
([
|
|
133
|
+
([_, K]) => {
|
|
134
134
|
var P;
|
|
135
|
-
return ((P = c.annotations) == null ? void 0 : P[
|
|
135
|
+
return ((P = c.annotations) == null ? void 0 : P[_]) === K;
|
|
136
136
|
}
|
|
137
|
-
), D = this.checkSourceBySpec ? this.checkSourceBySpec(c, t) : !0, h = !this.settings.homogeneous || !r,
|
|
137
|
+
), D = this.checkSourceBySpec ? this.checkSourceBySpec(c, t) : !0, h = !this.settings.homogeneous || !r, R = p.has(w.name) || o.has(y);
|
|
138
138
|
v.set(y, {
|
|
139
139
|
kind: "axis",
|
|
140
140
|
name: c.name,
|
|
@@ -148,7 +148,7 @@ const Q = (d) => {
|
|
|
148
148
|
isSubsetFilter: ((u = c.annotations) == null ? void 0 : u[L]) === "true",
|
|
149
149
|
isDiscreteFilter: c.type === "String" || ((m = c.annotations) == null ? void 0 : m[F]) === "true",
|
|
150
150
|
parentSources: [A]
|
|
151
|
-
}), I && k && D && h && !
|
|
151
|
+
}), I && k && D && h && !R && O.push({ value: y });
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
if (this.settings.columnsAllowed) {
|
|
@@ -160,13 +160,13 @@ const Q = (d) => {
|
|
|
160
160
|
const I = i[this.componentName].parentsAxes, k = r.axesSpec.map((h) => N.fromAxisSpec(h).toCanonicalString());
|
|
161
161
|
if (
|
|
162
162
|
// 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
|
|
163
|
-
|
|
163
|
+
U(r) || Q(r) || this.checkSourceBySpec && !this.checkSourceBySpec(r, t) || this.settings.isDataComponent && !l(r) || y && c.size && k.some((h) => !c.has(h)) || I.size && !(k.some((h) => I.has(h)) || k.every((h) => c.has(h)))
|
|
164
164
|
)
|
|
165
165
|
continue;
|
|
166
166
|
const D = {
|
|
167
167
|
kind: "column",
|
|
168
168
|
name: r.name,
|
|
169
|
-
label: ((g = r.annotations) == null ? void 0 : g[
|
|
169
|
+
label: ((g = r.annotations) == null ? void 0 : g[j]) ?? r.name,
|
|
170
170
|
type: r.valueType,
|
|
171
171
|
spec: r,
|
|
172
172
|
annotations: r.annotations,
|
|
@@ -185,7 +185,7 @@ const Q = (d) => {
|
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
S(
|
|
188
|
+
S(q, "DefaultSettings", {
|
|
189
189
|
isDataComponent: !1,
|
|
190
190
|
multipleSelectors: !1,
|
|
191
191
|
required: !1,
|
|
@@ -195,7 +195,7 @@ S(M, "DefaultSettings", {
|
|
|
195
195
|
columnsWithExtraAxesAllowed: !0,
|
|
196
196
|
dimensionConsumer: !1
|
|
197
197
|
});
|
|
198
|
-
let me =
|
|
198
|
+
let me = q;
|
|
199
199
|
export {
|
|
200
200
|
me as ComponentController
|
|
201
201
|
};
|
package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js
CHANGED
|
@@ -2,8 +2,8 @@ import E from "../../_virtual/canonicalize.js";
|
|
|
2
2
|
import { FORMAT as k } from "../../constants.js";
|
|
3
3
|
import { ControllerBase as W } from "../ControllerBase.js";
|
|
4
4
|
import { ComponentController as y } from "../ComponentController.js";
|
|
5
|
-
import { AxisId as
|
|
6
|
-
import { createLinkerMap as
|
|
5
|
+
import { AxisId as $, columnOrAxisIdFromString as w, isColumnId as c } from "../../spec.js";
|
|
6
|
+
import { createLinkerMap as H, createMultipliesByMap as J, getFiltersFromStates as K, getAxesSpecsFromSources as R, getLinkerColumnsForSource as F, getColumnOrAxisValueLabelsId as x, getColumnOrAxisLabel as A, getColumnOrAxisSpec as U } from "../../utils.js";
|
|
7
7
|
var G = Object.defineProperty, Q = (m, e, t) => e in m ? G(m, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[e] = t, j = (m, e, t) => Q(m, typeof e != "symbol" ? e + "" : e, t);
|
|
8
8
|
const oe = {
|
|
9
9
|
type: "bubble",
|
|
@@ -137,7 +137,7 @@ class le extends W {
|
|
|
137
137
|
if (!e.components.valueColor.selectorStates.length)
|
|
138
138
|
return /* @__PURE__ */ new Set();
|
|
139
139
|
const v = e.components.valueColor.selectorStates[0].selectedSource, u = t.get(v);
|
|
140
|
-
return !u || u.kind !== "column" ? /* @__PURE__ */ new Set() : new Set(u.spec.axesSpec.map((l) =>
|
|
140
|
+
return !u || u.kind !== "column" ? /* @__PURE__ */ new Set() : new Set(u.spec.axesSpec.map((l) => $.fromAxisSpec(l).toCanonicalString()));
|
|
141
141
|
}
|
|
142
142
|
async createDataByColumns(e, t) {
|
|
143
143
|
var v, u;
|
|
@@ -151,10 +151,10 @@ class le extends W {
|
|
|
151
151
|
type: "columns",
|
|
152
152
|
id: E(t.components) ?? "",
|
|
153
153
|
values: {}
|
|
154
|
-
}, D = await
|
|
154
|
+
}, D = await H(e), h = await J(e), b = [
|
|
155
155
|
...t.components.filters.selectorStates,
|
|
156
156
|
...t.components.tabBy.selectorStates
|
|
157
|
-
],
|
|
157
|
+
], I = K(b), O = b.map((o) => w(o.selectedSource)).filter(c), L = [p, d].filter(c), C = L.map((o) => o.toCanonicalString()), B = await R(e, C), a = [
|
|
158
158
|
t.components.facetBy,
|
|
159
159
|
t.components.x,
|
|
160
160
|
t.components.y,
|
|
@@ -164,7 +164,7 @@ class le extends W {
|
|
|
164
164
|
g.push(...await F(
|
|
165
165
|
e,
|
|
166
166
|
D,
|
|
167
|
-
|
|
167
|
+
h,
|
|
168
168
|
B,
|
|
169
169
|
o
|
|
170
170
|
));
|
|
@@ -173,7 +173,7 @@ class le extends W {
|
|
|
173
173
|
S.push(w(r)), g.push(...await F(
|
|
174
174
|
e,
|
|
175
175
|
D,
|
|
176
|
-
|
|
176
|
+
h,
|
|
177
177
|
B,
|
|
178
178
|
r
|
|
179
179
|
));
|
|
@@ -181,9 +181,9 @@ class le extends W {
|
|
|
181
181
|
T && S.push(T);
|
|
182
182
|
}
|
|
183
183
|
const n = await e.pFrameProvider.getTableOuterJoin(
|
|
184
|
-
[...
|
|
184
|
+
[...L, ...g, ...O],
|
|
185
185
|
S,
|
|
186
|
-
|
|
186
|
+
I,
|
|
187
187
|
!0
|
|
188
188
|
);
|
|
189
189
|
S.forEach((o) => {
|
|
@@ -197,13 +197,13 @@ class le extends W {
|
|
|
197
197
|
}
|
|
198
198
|
));
|
|
199
199
|
s.values[N] = P(n, f), s.values.xLabels = P(n, M);
|
|
200
|
-
const
|
|
200
|
+
const z = t.components.y.selectorStates.map((o) => o.selectedSource), V = z.join(", "), q = await Promise.all(z.map(
|
|
201
201
|
async (o) => {
|
|
202
202
|
var r;
|
|
203
203
|
return ((r = await x(e, o, C)) == null ? void 0 : r.toCanonicalString()) ?? o;
|
|
204
204
|
}
|
|
205
205
|
));
|
|
206
|
-
return s.values[V] = P(n,
|
|
206
|
+
return s.values[V] = P(n, z), s.values.yLabels = P(n, q), { byColumns: s };
|
|
207
207
|
}
|
|
208
208
|
async createChartSettings(e, t) {
|
|
209
209
|
var v, u;
|
|
@@ -217,20 +217,20 @@ class le extends W {
|
|
|
217
217
|
type: "column",
|
|
218
218
|
value: l,
|
|
219
219
|
label: await A(e, l, [])
|
|
220
|
-
},
|
|
220
|
+
}, h = {
|
|
221
221
|
type: "column",
|
|
222
222
|
value: i,
|
|
223
223
|
label: await A(e, i, [])
|
|
224
|
-
}, b = t.components.x.selectorStates.map(({ selectedSource: a }) => a).join(", "),
|
|
224
|
+
}, b = t.components.x.selectorStates.map(({ selectedSource: a }) => a).join(", "), I = t.components.y.selectorStates.map(({ selectedSource: a }) => a).join(", "), O = await Promise.all(t.components.facetBy.selectorStates.map(async (a) => {
|
|
225
225
|
var S;
|
|
226
226
|
return {
|
|
227
227
|
type: "column",
|
|
228
228
|
value: ((S = await x(e, a.selectedSource, s)) == null ? void 0 : S.toCanonicalString()) ?? a.selectedSource
|
|
229
229
|
};
|
|
230
|
-
})),
|
|
230
|
+
})), L = (await Promise.all(t.components.x.selectorStates.map((a) => A(e, a.selectedSource, s)))).join(", "), C = (await Promise.all(t.components.y.selectorStates.map((a) => A(e, a.selectedSource, s)))).join(", "), B = await Promise.all(
|
|
231
231
|
t.components.tooltipContent.selectorStates.map(async (a) => {
|
|
232
232
|
var S, g;
|
|
233
|
-
const n = a.selectedSource, f = await
|
|
233
|
+
const n = a.selectedSource, f = await U(e, n, s);
|
|
234
234
|
return {
|
|
235
235
|
type: "column",
|
|
236
236
|
label: await A(e, n, s) || n,
|
|
@@ -243,20 +243,20 @@ class le extends W {
|
|
|
243
243
|
return {
|
|
244
244
|
type: "bubble",
|
|
245
245
|
valueColor: D,
|
|
246
|
-
valueSize:
|
|
246
|
+
valueSize: h,
|
|
247
247
|
xColumn: {
|
|
248
248
|
type: "column",
|
|
249
249
|
value: b,
|
|
250
|
-
label:
|
|
250
|
+
label: L,
|
|
251
251
|
valueLabels: "xLabels"
|
|
252
252
|
},
|
|
253
253
|
yColumn: {
|
|
254
254
|
type: "column",
|
|
255
|
-
value:
|
|
255
|
+
value: I,
|
|
256
256
|
label: C,
|
|
257
257
|
valueLabels: "yLabels"
|
|
258
258
|
},
|
|
259
|
-
facetBy:
|
|
259
|
+
facetBy: O,
|
|
260
260
|
tooltips: {
|
|
261
261
|
show: !0,
|
|
262
262
|
content: B
|
|
@@ -25,7 +25,7 @@ const te = {
|
|
|
25
25
|
function N(u) {
|
|
26
26
|
return u ? "kind" in u && u.kind === "PColumn" ? u.valueType === "String" : u.type === "String" : !0;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function G(u, e) {
|
|
29
29
|
if (!e.length)
|
|
30
30
|
return [];
|
|
31
31
|
const t = e.map((i) => g(i)), r = Object.values(u.columnsData)[0].length, o = [];
|
|
@@ -275,8 +275,8 @@ class oe extends K {
|
|
|
275
275
|
const p = l.toCanonicalString();
|
|
276
276
|
a.values[p] = b(l) ? y.columnsData[p] : y.axesData[p];
|
|
277
277
|
}), a.values[i.toCanonicalString()] = y.columnsData[i.toCanonicalString()];
|
|
278
|
-
const
|
|
279
|
-
a.values[n] =
|
|
278
|
+
const I = t.components.x.selectorStates.concat(t.components.xGroupBy.selectorStates).map((l) => l.selectedSource), n = I.join(", ");
|
|
279
|
+
a.values[n] = G(y, I);
|
|
280
280
|
const c = t.components.x.selectorStates.map((l) => l.selectedSource), S = await Promise.all(
|
|
281
281
|
c.map(
|
|
282
282
|
async (l) => {
|
|
@@ -285,9 +285,9 @@ class oe extends K {
|
|
|
285
285
|
}
|
|
286
286
|
)
|
|
287
287
|
);
|
|
288
|
-
a.values.xLabelsKey =
|
|
288
|
+
a.values.xLabelsKey = G(y, S);
|
|
289
289
|
const s = t.components.y.selectorStates.concat(t.components.yGroupBy.selectorStates).map((l) => l.selectedSource), d = s.join(", ");
|
|
290
|
-
a.values[d] =
|
|
290
|
+
a.values[d] = G(y, s);
|
|
291
291
|
const O = t.components.y.selectorStates.map((l) => l.selectedSource), D = await Promise.all(
|
|
292
292
|
O.map(
|
|
293
293
|
async (l) => {
|
|
@@ -296,7 +296,7 @@ class oe extends K {
|
|
|
296
296
|
}
|
|
297
297
|
)
|
|
298
298
|
);
|
|
299
|
-
return a.values.yLabelsKey =
|
|
299
|
+
return a.values.yLabelsKey = G(y, D), { byColumns: a };
|
|
300
300
|
}
|
|
301
301
|
async createChartSettings(e, t) {
|
|
302
302
|
var r;
|
|
@@ -380,7 +380,7 @@ class oe extends K {
|
|
|
380
380
|
t.components.y.selectorStates.map(
|
|
381
381
|
(n) => x(e, n.selectedSource, a)
|
|
382
382
|
)
|
|
383
|
-
)).join(", "),
|
|
383
|
+
)).join(", "), I = await Promise.all(
|
|
384
384
|
t.components.tooltipContent.selectorStates.map(async (n) => {
|
|
385
385
|
var c, S;
|
|
386
386
|
const s = n.selectedSource, d = await J(e, s, a);
|
|
@@ -415,7 +415,7 @@ class oe extends K {
|
|
|
415
415
|
annotations: [...F, ...h],
|
|
416
416
|
tooltips: {
|
|
417
417
|
show: !0,
|
|
418
|
-
content:
|
|
418
|
+
content: I
|
|
419
419
|
}
|
|
420
420
|
};
|
|
421
421
|
}
|
|
@@ -172,7 +172,7 @@ class ee extends E {
|
|
|
172
172
|
}, m = await M(t), n = await q(t), d = [
|
|
173
173
|
...e.components.filters.selectorStates,
|
|
174
174
|
...e.components.tabBy.selectorStates
|
|
175
|
-
],
|
|
175
|
+
], L = Y(d), O = d.map((s) => h(s.selectedSource)).filter(C), v = [l, a].filter(C).map((s) => s.toCanonicalString());
|
|
176
176
|
if (v.length === 0)
|
|
177
177
|
throw Error("One of X and Y should be a column");
|
|
178
178
|
const D = await W(t, v), B = [l, a, ...O], x = [], f = [];
|
|
@@ -184,7 +184,7 @@ class ee extends E {
|
|
|
184
184
|
D,
|
|
185
185
|
s
|
|
186
186
|
));
|
|
187
|
-
const
|
|
187
|
+
const I = [
|
|
188
188
|
e.components.grouping,
|
|
189
189
|
e.components.facetBy,
|
|
190
190
|
e.components.tooltipContent,
|
|
@@ -192,7 +192,7 @@ class ee extends E {
|
|
|
192
192
|
e.components.highlight,
|
|
193
193
|
e.components.size
|
|
194
194
|
];
|
|
195
|
-
for (const s of
|
|
195
|
+
for (const s of I)
|
|
196
196
|
for (const { selectedSource: i } of s.selectorStates) {
|
|
197
197
|
x.push(h(i)), f.push(...await $(
|
|
198
198
|
t,
|
|
@@ -207,7 +207,7 @@ class ee extends E {
|
|
|
207
207
|
const o = await t.pFrameProvider.getTableOuterJoin(
|
|
208
208
|
[l, a, ...f, ...O],
|
|
209
209
|
x,
|
|
210
|
-
|
|
210
|
+
L,
|
|
211
211
|
!1
|
|
212
212
|
);
|
|
213
213
|
return [...B, ...x].forEach((s) => {
|
|
@@ -227,7 +227,7 @@ class ee extends E {
|
|
|
227
227
|
type: "column",
|
|
228
228
|
value: l,
|
|
229
229
|
label: await A(t, l, n)
|
|
230
|
-
},
|
|
230
|
+
}, L = {
|
|
231
231
|
type: "column",
|
|
232
232
|
value: a,
|
|
233
233
|
label: await A(t, a, n)
|
|
@@ -281,19 +281,19 @@ class ee extends E {
|
|
|
281
281
|
format: (u = s == null ? void 0 : s.annotations) == null ? void 0 : u[P]
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
let
|
|
285
|
-
return e.components.highlight.selectorStates.length && (
|
|
284
|
+
let I;
|
|
285
|
+
return e.components.highlight.selectorStates.length && (I = {
|
|
286
286
|
type: "column",
|
|
287
287
|
value: "highlight"
|
|
288
288
|
}), {
|
|
289
289
|
type: "scatterplot-umap",
|
|
290
290
|
x: d,
|
|
291
|
-
y:
|
|
291
|
+
y: L,
|
|
292
292
|
keyColumn: O,
|
|
293
293
|
facetBy: v,
|
|
294
294
|
grouping: B,
|
|
295
295
|
label: f,
|
|
296
|
-
highlight:
|
|
296
|
+
highlight: I,
|
|
297
297
|
tooltips: {
|
|
298
298
|
show: !0,
|
|
299
299
|
content: x
|
|
@@ -181,7 +181,7 @@ class te extends q {
|
|
|
181
181
|
}, m = await W(t), s = await Y(t), d = [
|
|
182
182
|
...e.components.filters.selectorStates,
|
|
183
183
|
...e.components.tabBy.selectorStates
|
|
184
|
-
],
|
|
184
|
+
], L = j(d), A = d.map((o) => S(o.selectedSource)).filter(x), C = [r, i].filter(x).map((o) => o.toCanonicalString());
|
|
185
185
|
if (C.length === 0)
|
|
186
186
|
throw Error("One of X and Y should be a column");
|
|
187
187
|
const O = await X(t, C), P = [r, i, ...A], h = [], f = [];
|
|
@@ -211,13 +211,13 @@ class te extends q {
|
|
|
211
211
|
O,
|
|
212
212
|
l
|
|
213
213
|
));
|
|
214
|
-
const
|
|
215
|
-
|
|
214
|
+
const I = await v(t, l, C);
|
|
215
|
+
I && h.push(I);
|
|
216
216
|
}
|
|
217
217
|
const n = await t.pFrameProvider.getTableOuterJoin(
|
|
218
218
|
[r, i, ...f, ...A],
|
|
219
219
|
h,
|
|
220
|
-
|
|
220
|
+
L,
|
|
221
221
|
!1
|
|
222
222
|
);
|
|
223
223
|
return [...P, ...h].forEach((o) => {
|
|
@@ -234,7 +234,7 @@ class te extends q {
|
|
|
234
234
|
type: "column",
|
|
235
235
|
value: r,
|
|
236
236
|
label: await b(t, r, s)
|
|
237
|
-
},
|
|
237
|
+
}, L = {
|
|
238
238
|
type: "column",
|
|
239
239
|
value: i,
|
|
240
240
|
label: await b(t, i, s)
|
|
@@ -268,7 +268,7 @@ class te extends q {
|
|
|
268
268
|
), h = await Promise.all(
|
|
269
269
|
e.components.tooltipContent.selectorStates.map(async (n) => {
|
|
270
270
|
var o;
|
|
271
|
-
const l = n.selectedSource,
|
|
271
|
+
const l = n.selectedSource, I = S(l), E = await v(t, l, s) ?? I, B = await k(t, l, s);
|
|
272
272
|
return {
|
|
273
273
|
type: "column",
|
|
274
274
|
label: await b(t, l, s) || l,
|
|
@@ -296,7 +296,7 @@ class te extends q {
|
|
|
296
296
|
}), {
|
|
297
297
|
type: "scatterplot",
|
|
298
298
|
x: d,
|
|
299
|
-
y:
|
|
299
|
+
y: L,
|
|
300
300
|
keyColumn: A,
|
|
301
301
|
facetBy: C,
|
|
302
302
|
grouping: P,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob.js","sources":["../../../../../../../../../../node_modules/@milaboratories/pf-plots/node_modules/@milaboratories/pl-model-common/src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from '../branding';\nimport { z } from 'zod';\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, 'LocalBlobHandle'>;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, 'RemoteBlobHandle'>;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = | LocalBlobHandle\n | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less
|
|
1
|
+
{"version":3,"file":"blob.js","sources":["../../../../../../../../../../node_modules/@milaboratories/pf-plots/node_modules/@milaboratories/pl-model-common/src/drivers/blob.ts"],"sourcesContent":["import type { Branded } from '../branding';\nimport { z } from 'zod';\n\n/** Handle of locally downloaded blob. This handle is issued only after the\n * blob's content is downloaded locally, and ready for quick access. */\nexport type LocalBlobHandle = Branded<string, 'LocalBlobHandle'>;\n\n/** Handle of remote blob. This handle is issued as soon as the data becomes\n * available on the remote server. */\nexport type RemoteBlobHandle = Branded<string, 'RemoteBlobHandle'>;\n\n/** Being configured inside the output structure provides information about\n * blob's content and means to retrieve it when needed. */\nexport interface BlobHandleAndSize<\n H extends LocalBlobHandle | RemoteBlobHandle = | LocalBlobHandle\n | RemoteBlobHandle,\n> {\n /** Handle to retrieve block content using {@link BlobDriver.getContent()} */\n readonly handle: H;\n\n /** Blob size in bytes. */\n readonly size: number;\n}\n\n/** Range in bytes, from should be less than to. */\nexport const RangeBytes = z.object({\n /** Included left border. */\n from: z.number().min(0),\n /** Excluded right border. */\n to: z.number().min(1),\n});\n\nexport type RangeBytes = z.infer<typeof RangeBytes>;\n\nexport function newRangeBytesOpt(from?: number, to?: number): RangeBytes | undefined {\n if (from == undefined || to == undefined) {\n return undefined;\n }\n\n const range = { from, to };\n validateRangeBytes(range, 'newRangeBytesOpt');\n\n return range;\n}\n\nexport function validateRangeBytes(range: RangeBytes, errMsg: string) {\n if (range.from < 0 || range.from >= range.to) {\n throw new Error(`${errMsg}: invalid bytes range: ${range}`);\n }\n}\n\n/** Being configured inside the output structure provides information about\n * locally downloaded blob and means to retrieve it's content when needed. This\n * structure is created only after the blob's content is downloaded locally, and\n * ready for quick access. */\nexport type LocalBlobHandleAndSize = BlobHandleAndSize<LocalBlobHandle>;\n\n/** Being configured inside the output structure provides information about\n * remote blob and means to retrieve it's content when needed. This structure\n * is created as soon as remote blob becomes available. */\nexport type RemoteBlobHandleAndSize = BlobHandleAndSize<RemoteBlobHandle>;\n\nexport type GetContentOptions = {\n /** Byte range in [from, to) format. */\n range?: RangeBytes;\n /** Signal to abort the operation early. */\n signal?: AbortSignal;\n};\n\nexport type ContentHandler<T> = (content: ReadableStream, size: number) => Promise<T>;\n\n/** Defines API of blob driver as it is seen from the block UI code. */\nexport interface BlobDriver {\n /**\n * Given the blob handle returns its content.\n * Depending on the handle type, content will be served from locally downloaded file,\n * or directly from remote platforma storage.\n */\n getContent(\n handle: LocalBlobHandle | RemoteBlobHandle,\n range?: RangeBytes,\n ): Promise<Uint8Array>;\n}\n"],"names":["z"],"mappings":";AAyB0BA,EAAE,OAAO;AAAA;AAAA,EAEjC,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA;AAAA,EAEtB,IAAIA,EAAE,OAAA,EAAS,IAAI,CAAC;AACrB,CAAA;","x_google_ignoreList":[0]}
|