@milaboratories/graph-maker 1.1.181 → 1.1.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue.d.ts +1 -3
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue.js +7 -323
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue.js.map +1 -1
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue2.js +215 -2
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue2.js.map +1 -1
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue3.js +11 -0
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue3.js.map +1 -0
- package/dist/components/AesSettings/DiscreteRow.vue.d.ts +27 -0
- package/dist/components/AesSettings/DiscreteRow.vue.js +10 -0
- package/dist/components/AesSettings/DiscreteRow.vue.js.map +1 -0
- package/dist/components/AesSettings/DiscreteRow.vue2.js +159 -0
- package/dist/components/AesSettings/DiscreteRow.vue2.js.map +1 -0
- package/dist/components/AesSettings/DiscreteRow.vue3.js +19 -0
- package/dist/components/AesSettings/DiscreteRow.vue3.js.map +1 -0
- package/dist/components/Chart.vue.js +165 -148
- package/dist/components/Chart.vue.js.map +1 -1
- package/dist/components/ReorderForm.vue.d.ts +1 -3
- package/dist/components/ReorderForm.vue.js +7 -43
- package/dist/components/ReorderForm.vue.js.map +1 -1
- package/dist/components/ReorderForm.vue2.js +50 -2
- package/dist/components/ReorderForm.vue2.js.map +1 -1
- package/dist/components/ReorderForm.vue3.js +11 -0
- package/dist/components/ReorderForm.vue3.js.map +1 -0
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +20 -20
- package/dist/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js +53 -53
- package/dist/forms/LayersForm/AesSelector.vue.js +29 -29
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js +35 -35
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/getLayersDataFromForms.js +49 -52
- package/dist/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/package.json +2 -2
- package/dist/icons/Reorder.vue.d.ts +0 -2
- package/dist/icons/Reorder.vue.js +0 -19
- package/dist/icons/Reorder.vue.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Z, computed as
|
|
1
|
+
import { defineComponent as Z, computed as g, ref as F, watch as q, createElementBlock as _, openBlock as y, Fragment as ee, createElementVNode as O, createBlock as S, createCommentVNode as T, createVNode as R, withModifiers as te, unref as A, withCtx as L, normalizeClass as le } from "vue";
|
|
2
2
|
import { PlDropdown as ae } from "@platforma-sdk/ui-vue";
|
|
3
3
|
import { createDefaultMapping as oe, createContinuousMappingFromPalette as ue } from "../../dataBindAes.js";
|
|
4
|
-
import { FIXED_COLORS as
|
|
4
|
+
import { FIXED_COLORS as w, DEFAULT_LINE_TYPE as ie, DEFAULT_DOT_SHAPE as ne, FIXED_LINE_TYPES as se, FIXES_DOT_SHAPES as re, DEFAULT_CONTINUOUS_PALETTE as pe } from "../../constantsAesthetic.js";
|
|
5
5
|
import de from "../../components/AesButton.vue.js";
|
|
6
6
|
import { useStore as ve } from "../../store.js";
|
|
7
7
|
import { isMappedAes as M } from "../../constantsCommon.js";
|
|
8
8
|
import ce from "../../components/Popup.vue.js";
|
|
9
9
|
import fe from "../../components/AesSettings/FixedColorsList.vue.js";
|
|
10
10
|
import me from "../../components/AesSettings/FixedDotShapeList.vue.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import ge from "../../components/AesSettings/FixedLineTypeList.vue.js";
|
|
12
|
+
import ye from "../../components/AesSettings/FormWrapper.vue.js";
|
|
13
13
|
import Se from "../../components/AesSettings/AesDataMappingDiscrete.vue.js";
|
|
14
14
|
import Te from "../../components/AesSettings/AesDataMappingContinuous.vue.js";
|
|
15
15
|
const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
@@ -27,7 +27,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
27
27
|
emits: ["aes-update", "aes-selector-close"],
|
|
28
28
|
setup(i, { emit: W }) {
|
|
29
29
|
var P, h;
|
|
30
|
-
const r = i, p = ve(), o =
|
|
30
|
+
const r = i, p = ve(), o = g(() => p.value.reactive.chartType), $ = W, X = {
|
|
31
31
|
discrete: ["primaryGrouping", "secondaryGrouping"],
|
|
32
32
|
scatterplot: ["grouping"],
|
|
33
33
|
"scatterplot-umap": ["grouping"],
|
|
@@ -35,7 +35,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
35
35
|
heatmap: [],
|
|
36
36
|
histogram: ["grouping"],
|
|
37
37
|
bubble: []
|
|
38
|
-
}, G = r.possibleAesSourceInputs ?? X[o.value], Y =
|
|
38
|
+
}, G = r.possibleAesSourceInputs ?? X[o.value], Y = g(
|
|
39
39
|
() => p.value.commonHelpersData.usedAesInMapping.value
|
|
40
40
|
);
|
|
41
41
|
function V(l) {
|
|
@@ -44,25 +44,25 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
44
44
|
const s = F(
|
|
45
45
|
M(r.selected) ? V(r.selected) : "fix"
|
|
46
46
|
), z = {
|
|
47
|
-
fill:
|
|
48
|
-
stroke:
|
|
47
|
+
fill: w[0].color,
|
|
48
|
+
stroke: w[0].color,
|
|
49
49
|
dotShape: ne,
|
|
50
50
|
lineType: ie,
|
|
51
51
|
size: ""
|
|
52
52
|
// temporary
|
|
53
|
-
}, K =
|
|
53
|
+
}, K = g(() => p.value.inputGuide.value), j = g(() => p.value.uniqueValuesData.value), H = /* @__PURE__ */ new Set([
|
|
54
54
|
"scatterplot",
|
|
55
55
|
"scatterplot-umap",
|
|
56
56
|
"heatmap"
|
|
57
|
-
]), d =
|
|
57
|
+
]), d = g(() => {
|
|
58
58
|
const l = {}, e = p.value.reactive.optionsState.components;
|
|
59
59
|
function v(a, t) {
|
|
60
|
-
const u = K.value.getSourceInfo(t), c = j.value[t], b = (c == null ? void 0 : c.list) ?? [], f = (c == null ? void 0 : c.labels) ?? {},
|
|
60
|
+
const u = K.value.getSourceInfo(t), c = j.value[t], b = (c == null ? void 0 : c.list) ?? [], f = (c == null ? void 0 : c.labels) ?? {}, D = V({ type: a, value: t });
|
|
61
61
|
if (H.has(o.value) && u.type === "String" || !H.has(o.value)) {
|
|
62
62
|
const C = p.value.reactive.dataBindAes[t] ?? oe(b);
|
|
63
|
-
l[
|
|
63
|
+
l[D] = {
|
|
64
64
|
type: "dataCategorical",
|
|
65
|
-
value:
|
|
65
|
+
value: D,
|
|
66
66
|
initialData: C,
|
|
67
67
|
inputName: a,
|
|
68
68
|
selectedSource: t,
|
|
@@ -75,9 +75,9 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
75
75
|
};
|
|
76
76
|
} else {
|
|
77
77
|
const C = p.value.reactive.dataBindAes[t] ?? ue(pe);
|
|
78
|
-
l[
|
|
78
|
+
l[D] = {
|
|
79
79
|
type: "dataContinuous",
|
|
80
|
-
value:
|
|
80
|
+
value: D,
|
|
81
81
|
initialData: C,
|
|
82
82
|
inputName: a,
|
|
83
83
|
selectedSource: t,
|
|
@@ -96,14 +96,14 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
96
96
|
value: "fix",
|
|
97
97
|
initialData: M(r.selected) ? z[r.type] : r.selected
|
|
98
98
|
}), l;
|
|
99
|
-
}), n =
|
|
99
|
+
}), n = g(
|
|
100
100
|
() => d.value[s.value] ?? null
|
|
101
101
|
);
|
|
102
102
|
function J(l, e) {
|
|
103
103
|
var v, a, t, u;
|
|
104
104
|
return l.type === "fix" ? "Fixed" : e === l.value ? `${(v = l.selectedSourceInfo) == null ? void 0 : v.label}` : o.value === "discrete" ? `${l.value === "primaryGrouping" ? "Primary" : "Secondary"} grouping: ${(a = l.selectedSourceInfo) == null ? void 0 : a.label}` : o.value === "scatterplot" || o.value === "dendro" ? `Grouping: ${(t = l.selectedSourceInfo) == null ? void 0 : t.label}` : ((u = l.selectedSourceInfo) == null ? void 0 : u.label) ?? "";
|
|
105
105
|
}
|
|
106
|
-
const N =
|
|
106
|
+
const N = g(() => {
|
|
107
107
|
const l = [], e = p.value.reactive.optionsState.components;
|
|
108
108
|
function v(a, t) {
|
|
109
109
|
const u = V({
|
|
@@ -136,20 +136,20 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
136
136
|
() => s.value,
|
|
137
137
|
(l) => {
|
|
138
138
|
const e = d.value[l];
|
|
139
|
-
e.type === "fix" ?
|
|
139
|
+
e.type === "fix" ? $("aes-update", m.value, e) : e.type === "dataCategorical" ? (x.value = e.initialData, $("aes-update", e.initialData, e)) : e.type === "dataContinuous" && (I.value = e.initialData, $("aes-update", e.initialData, e));
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
|
-
const U = F(), Q =
|
|
142
|
+
const U = F(), Q = g(() => r.type === "lineType" ? se.length * 32 + 32 : r.type === "dotShape" ? Math.ceil(re.length / 6) * 36 + 40 : r.type === "fill" || r.type === "stroke" ? Math.ceil(w.length / 6) * 36 + 40 : 0);
|
|
143
143
|
return (l, e) => {
|
|
144
144
|
var v, a;
|
|
145
|
-
return
|
|
145
|
+
return y(), _(ee, null, [
|
|
146
146
|
O("div", Ee, [
|
|
147
147
|
O("div", {
|
|
148
148
|
class: "aes-input-select",
|
|
149
149
|
onClick: e[1] || (e[1] = te(() => {
|
|
150
150
|
}, ["stop"]))
|
|
151
151
|
}, [
|
|
152
|
-
R(
|
|
152
|
+
R(A(ae), {
|
|
153
153
|
modelValue: s.value,
|
|
154
154
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => s.value = t),
|
|
155
155
|
disabled: i.disabled || N.value.length < 2,
|
|
@@ -165,7 +165,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
165
165
|
onClick: e[2] || (e[2] = (t) => E.value = !E.value),
|
|
166
166
|
onRef: e[3] || (e[3] = (t) => U.value = t)
|
|
167
167
|
}, null, 8, ["data"]),
|
|
168
|
-
s.value === "fix" && E.value && m.value ? (
|
|
168
|
+
s.value === "fix" && E.value && m.value ? (y(), S(ce, {
|
|
169
169
|
key: 0,
|
|
170
170
|
height: Q.value,
|
|
171
171
|
targetRef: U.value,
|
|
@@ -175,7 +175,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
175
175
|
O("div", {
|
|
176
176
|
class: le(["fixed-aes-list", { "fixed-aes-list__rows": i.type === "lineType" }])
|
|
177
177
|
}, [
|
|
178
|
-
i.type === "fill" || i.type === "stroke" ? (
|
|
178
|
+
i.type === "fill" || i.type === "stroke" ? (y(), S(fe, {
|
|
179
179
|
key: 0,
|
|
180
180
|
modelValue: m.value,
|
|
181
181
|
"onUpdate:modelValue": [
|
|
@@ -184,7 +184,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
184
184
|
],
|
|
185
185
|
"color-using": i.type
|
|
186
186
|
}, null, 8, ["modelValue", "color-using"])) : T("", !0),
|
|
187
|
-
i.type === "dotShape" ? (
|
|
187
|
+
i.type === "dotShape" ? (y(), S(me, {
|
|
188
188
|
key: 1,
|
|
189
189
|
modelValue: m.value,
|
|
190
190
|
"onUpdate:modelValue": [
|
|
@@ -192,7 +192,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
192
192
|
e[7] || (e[7] = (t) => l.$emit("aes-update", t, d.value.fix))
|
|
193
193
|
]
|
|
194
194
|
}, null, 8, ["modelValue"])) : T("", !0),
|
|
195
|
-
i.type === "lineType" ? (
|
|
195
|
+
i.type === "lineType" ? (y(), S(ge, {
|
|
196
196
|
key: 2,
|
|
197
197
|
modelValue: m.value,
|
|
198
198
|
"onUpdate:modelValue": [
|
|
@@ -205,7 +205,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
205
205
|
_: 1
|
|
206
206
|
}, 8, ["height", "targetRef"])) : T("", !0)
|
|
207
207
|
]),
|
|
208
|
-
(((v = n.value) == null ? void 0 : v.type) === "dataCategorical" && x.value || ((a = n.value) == null ? void 0 : a.type) === "dataContinuous" && I.value) && E.value ? (
|
|
208
|
+
(((v = n.value) == null ? void 0 : v.type) === "dataCategorical" && x.value || ((a = n.value) == null ? void 0 : a.type) === "dataContinuous" && I.value) && E.value ? (y(), S(ye, {
|
|
209
209
|
key: 0,
|
|
210
210
|
title: i.formTitle,
|
|
211
211
|
"back-title": i.formBackTitle,
|
|
@@ -214,7 +214,7 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
214
214
|
default: L(() => {
|
|
215
215
|
var t, u, c, b;
|
|
216
216
|
return [
|
|
217
|
-
((t = n.value) == null ? void 0 : t.type) === "dataCategorical" && x.value ? (
|
|
217
|
+
((t = n.value) == null ? void 0 : t.type) === "dataCategorical" && x.value ? (y(), S(Se, {
|
|
218
218
|
key: 0,
|
|
219
219
|
modelValue: x.value,
|
|
220
220
|
"onUpdate:modelValue": [
|
|
@@ -226,9 +226,9 @@ const Ee = { class: "aes-input-row" }, Ne = /* @__PURE__ */ Z({
|
|
|
226
226
|
"used-aes-in-mapping": Y.value[n.value.selectedSource],
|
|
227
227
|
"allow-hiding": o.value === "discrete",
|
|
228
228
|
"allow-reordering": o.value === "discrete" || o.value === "histogram" || o.value === "scatterplot" || o.value === "scatterplot-umap",
|
|
229
|
-
"allow-null-option": o.value === "discrete" && (s.value === "primaryGrouping" &&
|
|
229
|
+
"allow-null-option": o.value === "discrete" && (s.value === "primaryGrouping" && A(p).reactive.axesSettings.axisX.allowNullPrimaryGroups || s.value === "secondaryGrouping" && A(p).reactive.axesSettings.axisX.allowNullSecondaryGroups) || o.value === "scatterplot" || o.value === "scatterplot-umap"
|
|
230
230
|
}, null, 8, ["modelValue", "column-value-labels", "data-column-label", "used-aes-in-mapping", "allow-hiding", "allow-reordering", "allow-null-option"])) : T("", !0),
|
|
231
|
-
((c = n.value) == null ? void 0 : c.type) === "dataContinuous" && I.value ? (
|
|
231
|
+
((c = n.value) == null ? void 0 : c.type) === "dataContinuous" && I.value ? (y(), S(Te, {
|
|
232
232
|
key: 1,
|
|
233
233
|
modelValue: I.value,
|
|
234
234
|
"onUpdate:modelValue": [
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { getControllerByType as
|
|
1
|
+
import { getControllerByType as a } from "@milaboratories/pf-plots";
|
|
2
2
|
import { addFixedOptionsToState as T } from "../addFixedOptionsToState.js";
|
|
3
|
-
import { DEFAULT_HEIGHT_SMALL as
|
|
4
|
-
import { composeDiscreteSettings as
|
|
5
|
-
import { composeScatterplotSettings as
|
|
6
|
-
import { composeScatterplotUmapSettings as
|
|
7
|
-
import { composeHeatmapSettings as
|
|
8
|
-
import { composeDendroSettings as
|
|
9
|
-
import { composeHistogramSettings as
|
|
10
|
-
import { composeBubbleSettings as
|
|
11
|
-
function
|
|
3
|
+
import { DEFAULT_HEIGHT_SMALL as g, DEFAULT_HEIGHT as y, DEFAULT_WIDTH_SMALL as b, DEFAULT_WIDTH as w } from "../../constantsCommon.js";
|
|
4
|
+
import { composeDiscreteSettings as C } from "./composeDiscreteSettings.js";
|
|
5
|
+
import { composeScatterplotSettings as H } from "./composeScatterplotSettings.js";
|
|
6
|
+
import { composeScatterplotUmapSettings as D } from "./composeScatterplotUmapSettings.js";
|
|
7
|
+
import { composeHeatmapSettings as E } from "./composeHeatmapSettings.js";
|
|
8
|
+
import { composeDendroSettings as F } from "./composeDendroSettings.js";
|
|
9
|
+
import { composeHistogramSettings as A } from "./composeHistogramSettings.js";
|
|
10
|
+
import { composeBubbleSettings as L } from "./composeBubbleSettings.js";
|
|
11
|
+
function _(s, n = 0) {
|
|
12
12
|
return {
|
|
13
|
-
width: (
|
|
14
|
-
height: (
|
|
13
|
+
width: (n > 0 ? b : w) * (s / 100),
|
|
14
|
+
height: (n > 0 ? g : y) * (s / 100)
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function B(s, n, r, m) {
|
|
18
18
|
var o, t;
|
|
19
|
-
if (
|
|
19
|
+
if (s !== "scatterplot" && s !== "scatterplot-umap" && s !== "discrete" && s !== "heatmap" && s !== "histogram" && s !== "bubble")
|
|
20
20
|
return { name: "", show: !1 };
|
|
21
21
|
if (m.title.mode === "hidden")
|
|
22
22
|
return { name: "", show: !1 };
|
|
23
23
|
if (m.title.mode === "custom")
|
|
24
24
|
return { name: m.title.value, show: !0, position: m.title.position };
|
|
25
25
|
if (m.title.mode === "auto") {
|
|
26
|
-
const i = [];
|
|
26
|
+
const e = [], i = ((o = n.components) == null ? void 0 : o.tabBy.selectorStates) ?? [], f = (((t = n.components) == null ? void 0 : t.filters.selectorStates) ?? []).filter((l) => !i.some((p) => p.selectedSource === l.selectedSource));
|
|
27
27
|
return [
|
|
28
|
-
...
|
|
29
|
-
...
|
|
30
|
-
].forEach(({ type: l, selectedSource:
|
|
31
|
-
if ((!l || l === "equals") && u && r[
|
|
32
|
-
const { value:
|
|
33
|
-
|
|
28
|
+
...i,
|
|
29
|
+
...f
|
|
30
|
+
].forEach(({ type: l, selectedSource: p, selectedFilterValues: u }) => {
|
|
31
|
+
if ((!l || l === "equals") && u && r[p]) {
|
|
32
|
+
const { value: h, label: d } = r[p];
|
|
33
|
+
e.push(...u.map((c) => h === c ? d : String(c)));
|
|
34
34
|
}
|
|
35
|
-
}), { name:
|
|
35
|
+
}), { name: e.join(", "), show: !0, position: m.title.position };
|
|
36
36
|
}
|
|
37
37
|
return { name: "", show: !1 };
|
|
38
38
|
}
|
|
39
|
-
async function
|
|
40
|
-
if (!
|
|
39
|
+
async function K(s, n, r, m) {
|
|
40
|
+
if (!s.ready || r === null)
|
|
41
41
|
return null;
|
|
42
42
|
try {
|
|
43
|
-
const o =
|
|
44
|
-
|
|
43
|
+
const o = a(n.chartType), t = await T(
|
|
44
|
+
n.optionsState,
|
|
45
45
|
r,
|
|
46
46
|
m
|
|
47
47
|
);
|
|
@@ -53,19 +53,19 @@ async function J(n, s, r, m) {
|
|
|
53
53
|
return console.warn("Cant build chart data"), console.warn(o.message), null;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
var
|
|
58
|
-
if (!
|
|
56
|
+
function N(s, n, r, m, o) {
|
|
57
|
+
var i;
|
|
58
|
+
if (!n.ready || s === null)
|
|
59
59
|
return null;
|
|
60
|
-
let t = { ...
|
|
61
|
-
const
|
|
62
|
-
return t.title =
|
|
60
|
+
let t = { ...s.settings };
|
|
61
|
+
const e = s.data.byColumns;
|
|
62
|
+
return t.title = B(o.chartType, o.optionsState, m, o.axesSettings), t.size = _(o.chartScale, ((i = o.optionsState.components) == null ? void 0 : i.facetBy.selectorStates.length) || 0), o.chartType === "discrete" && (t = C(t, o, r, n)), o.chartType === "scatterplot" && (t = H(t, e, o, n, r)), o.chartType === "scatterplot-umap" && (t = D(t, e, o, n, r)), o.chartType === "heatmap" && (t = E(t, o)), o.chartType === "dendro" && (t = F(t, e, o, n, r)), o.chartType === "histogram" && (t = A(t, o, r)), o.chartType === "bubble" && (t = L(t, o)), {
|
|
63
63
|
settings: t,
|
|
64
|
-
data:
|
|
64
|
+
data: s.data.byColumns
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
N as composeChartSettings,
|
|
69
|
+
K as loadDataForPlot
|
|
70
70
|
};
|
|
71
71
|
//# sourceMappingURL=composeChartSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composeChartSettings.js","sources":["../../../src/utils/createChartSettingsForRender/composeChartSettings.ts"],"sourcesContent":["import type {\n ChartType,\n DemoDataStore,\n InputGuide,\n InputState,\n PlotDataAndSettings,\n SelectorStateFilter,\n} from '@milaboratories/pf-plots';\nimport {\n getControllerByType,\n} from '@milaboratories/pf-plots';\nimport type {\n GraphMakerProps,\n ReactiveState,\n TitlePosition,\n UniqueValuesBySourceMap,\n} from '../../types';\nimport { addFixedOptionsToState } from '../addFixedOptionsToState';\nimport type {\n AxesState } from '../../constantsCommon';\nimport { DEFAULT_HEIGHT, DEFAULT_HEIGHT_SMALL, DEFAULT_WIDTH, DEFAULT_WIDTH_SMALL,\n} from '../../constantsCommon';\nimport type {\n BubbleSettings,\n DataByColumns,\n DendroSettings,\n DiscreteSettings,\n HeatmapSettings,\n HistogramSettings,\n ScatterplotSettings,\n ScatterplotUmapSettings,\n Settings,\n} from '@milaboratories/miplots4';\nimport { composeDiscreteSettings } from './composeDiscreteSettings';\nimport { composeScatterplotSettings } from './composeScatterplotSettings';\nimport { composeScatterplotUmapSettings } from './composeScatterplotUmapSettings';\nimport { composeHeatmapSettings } from './composeHeatmapSettings';\nimport { composeDendroSettings } from './composeDendroSettings';\nimport { composeHistogramSettings } from './composeHistogramSettings';\nimport { composeBubbleSettings } from './composeBubbleSettings';\nimport type { ListOption } from '@platforma-sdk/ui-vue';\n\nfunction getChartSizes(chartScale: number, facetByLength = 0) {\n return {\n width: (facetByLength > 0 ? DEFAULT_WIDTH_SMALL : DEFAULT_WIDTH) * (chartScale / 100),\n height: (facetByLength > 0 ? DEFAULT_HEIGHT_SMALL : DEFAULT_HEIGHT) * (chartScale / 100),\n };\n}\n\nfunction getChartTitle(\n chartType: ChartType,\n optionsState: InputState,\n filterLabelsInfo: Record<string, ListOption>,\n axesSettings: AxesState,\n): {\n name: string;\n show: boolean;\n position?: TitlePosition;\n } {\n if (\n chartType !== 'scatterplot'\n && chartType !== 'scatterplot-umap'\n && chartType !== 'discrete'\n && chartType !== 'heatmap'\n && chartType !== 'histogram'\n && chartType !== 'bubble'\n ) {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'hidden') {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'custom') {\n return { name: axesSettings.title.value, show: true, position: axesSettings.title.position };\n }\n if (axesSettings.title.mode === 'auto') {\n const selectedFilters: string[] = [];\n const
|
|
1
|
+
{"version":3,"file":"composeChartSettings.js","sources":["../../../src/utils/createChartSettingsForRender/composeChartSettings.ts"],"sourcesContent":["import type {\n ChartType,\n DemoDataStore,\n InputGuide,\n InputState,\n PlotDataAndSettings,\n SelectorStateFilter,\n} from '@milaboratories/pf-plots';\nimport {\n getControllerByType,\n} from '@milaboratories/pf-plots';\nimport type {\n GraphMakerProps,\n ReactiveState,\n TitlePosition,\n UniqueValuesBySourceMap,\n} from '../../types';\nimport { addFixedOptionsToState } from '../addFixedOptionsToState';\nimport type {\n AxesState } from '../../constantsCommon';\nimport { DEFAULT_HEIGHT, DEFAULT_HEIGHT_SMALL, DEFAULT_WIDTH, DEFAULT_WIDTH_SMALL,\n} from '../../constantsCommon';\nimport type {\n BubbleSettings,\n DataByColumns,\n DendroSettings,\n DiscreteSettings,\n HeatmapSettings,\n HistogramSettings,\n ScatterplotSettings,\n ScatterplotUmapSettings,\n Settings,\n} from '@milaboratories/miplots4';\nimport { composeDiscreteSettings } from './composeDiscreteSettings';\nimport { composeScatterplotSettings } from './composeScatterplotSettings';\nimport { composeScatterplotUmapSettings } from './composeScatterplotUmapSettings';\nimport { composeHeatmapSettings } from './composeHeatmapSettings';\nimport { composeDendroSettings } from './composeDendroSettings';\nimport { composeHistogramSettings } from './composeHistogramSettings';\nimport { composeBubbleSettings } from './composeBubbleSettings';\nimport type { ListOption } from '@platforma-sdk/ui-vue';\n\nfunction getChartSizes(chartScale: number, facetByLength = 0) {\n return {\n width: (facetByLength > 0 ? DEFAULT_WIDTH_SMALL : DEFAULT_WIDTH) * (chartScale / 100),\n height: (facetByLength > 0 ? DEFAULT_HEIGHT_SMALL : DEFAULT_HEIGHT) * (chartScale / 100),\n };\n}\n\nfunction getChartTitle(\n chartType: ChartType,\n optionsState: InputState,\n filterLabelsInfo: Record<string, ListOption>,\n axesSettings: AxesState,\n): {\n name: string;\n show: boolean;\n position?: TitlePosition;\n } {\n if (\n chartType !== 'scatterplot'\n && chartType !== 'scatterplot-umap'\n && chartType !== 'discrete'\n && chartType !== 'heatmap'\n && chartType !== 'histogram'\n && chartType !== 'bubble'\n ) {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'hidden') {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'custom') {\n return { name: axesSettings.title.value, show: true, position: axesSettings.title.position };\n }\n if (axesSettings.title.mode === 'auto') {\n const selectedFilters: string[] = [];\n const tabByStates = (optionsState.components?.tabBy.selectorStates ?? []);\n const filterStates = (optionsState.components?.filters.selectorStates ?? []).filter((state) => !tabByStates.some((tabByState) => tabByState.selectedSource === state.selectedSource));\n\n const usedInTitleStates = [\n ...tabByStates,\n ...filterStates,\n ] as SelectorStateFilter[];\n usedInTitleStates.forEach(({ type, selectedSource, selectedFilterValues }) => {\n if ((!type || type === 'equals') && selectedFilterValues && filterLabelsInfo[selectedSource]) {\n const { value, label } = filterLabelsInfo[selectedSource] as { value: unknown; label: string };\n selectedFilters.push(...selectedFilterValues.map((selectedFilterValue) => value === selectedFilterValue ? label : String(selectedFilterValue)));\n }\n });\n const title = selectedFilters.join(', ');\n return { name: title, show: true, position: axesSettings.title.position };\n }\n return { name: '', show: false };\n}\n\nexport async function loadDataForPlot(\n inputGuide: InputGuide<InputState>,\n reactiveState: ReactiveState,\n dataStore: DemoDataStore | null,\n fixedOptions?: GraphMakerProps['fixedOptions'],\n) {\n if (!inputGuide.ready || dataStore === null) {\n return null;\n }\n try {\n const controller = getControllerByType(reactiveState.chartType);\n const optionsStateWithFixed = await addFixedOptionsToState(\n reactiveState.optionsState,\n dataStore,\n fixedOptions,\n );\n return controller.createDataForPlot(\n dataStore,\n optionsStateWithFixed,\n );\n } catch (err) {\n console.warn('Cant build chart data');\n console.warn((err as Error).message);\n return null;\n }\n}\nexport function composeChartSettings(\n chartData: PlotDataAndSettings | null,\n inputGuide: InputGuide<InputState>,\n labelsInfo: UniqueValuesBySourceMap,\n filterLabelsInfo: Record<string, ListOption>,\n reactiveState: ReactiveState,\n): null | { settings: Settings; data: DataByColumns } {\n if (!inputGuide.ready || chartData === null) {\n return null;\n }\n\n let settings = { ...chartData.settings };\n const dataByColumns = chartData.data.byColumns;\n settings.title = getChartTitle(reactiveState.chartType, reactiveState.optionsState, filterLabelsInfo, reactiveState.axesSettings);\n settings.size = getChartSizes(reactiveState.chartScale, reactiveState.optionsState.components?.facetBy.selectorStates.length || 0);\n if (reactiveState.chartType === 'discrete') {\n settings = composeDiscreteSettings(settings as DiscreteSettings, reactiveState, labelsInfo, inputGuide);\n }\n if (reactiveState.chartType === 'scatterplot') {\n settings = composeScatterplotSettings(settings as ScatterplotSettings, dataByColumns, reactiveState, inputGuide, labelsInfo);\n }\n if (reactiveState.chartType === 'scatterplot-umap') {\n settings = composeScatterplotUmapSettings(settings as ScatterplotUmapSettings, dataByColumns, reactiveState, inputGuide, labelsInfo);\n }\n if (reactiveState.chartType === 'heatmap') {\n settings = composeHeatmapSettings(settings as HeatmapSettings, reactiveState);\n }\n if (reactiveState.chartType === 'dendro') {\n settings = composeDendroSettings(settings as DendroSettings, dataByColumns, reactiveState, inputGuide, labelsInfo);\n }\n if (reactiveState.chartType === 'histogram') {\n settings = composeHistogramSettings(settings as HistogramSettings, reactiveState, labelsInfo);\n }\n if (reactiveState.chartType === 'bubble') {\n settings = composeBubbleSettings(settings as BubbleSettings, reactiveState);\n }\n return {\n settings: settings as Settings,\n data: chartData.data.byColumns,\n };\n}\n"],"names":["getChartSizes","chartScale","facetByLength","DEFAULT_WIDTH_SMALL","DEFAULT_WIDTH","DEFAULT_HEIGHT_SMALL","DEFAULT_HEIGHT","getChartTitle","chartType","optionsState","filterLabelsInfo","axesSettings","selectedFilters","tabByStates","_a","filterStates","_b","state","tabByState","type","selectedSource","selectedFilterValues","value","label","selectedFilterValue","loadDataForPlot","inputGuide","reactiveState","dataStore","fixedOptions","controller","getControllerByType","optionsStateWithFixed","addFixedOptionsToState","err","composeChartSettings","chartData","labelsInfo","settings","dataByColumns","composeDiscreteSettings","composeScatterplotSettings","composeScatterplotUmapSettings","composeHeatmapSettings","composeDendroSettings","composeHistogramSettings","composeBubbleSettings"],"mappings":";;;;;;;;;;AA0CA,SAASA,EAAcC,GAAoBC,IAAgB,GAAG;AAC5D,SAAO;AAAA,IACL,QAAQA,IAAgB,IAAIC,IAAsBC,MAAkBH,IAAa;AAAA,IACjF,SAASC,IAAgB,IAAIG,IAAuBC,MAAmBL,IAAa;AAAA,EAAA;AAExF;AAEA,SAASM,EACPC,GACAC,GACAC,GACAC,GAKE;;AACF,MACEH,MAAc,iBACXA,MAAc,sBACdA,MAAc,cACdA,MAAc,aACdA,MAAc,eACdA,MAAc;AAEjB,WAAO,EAAE,MAAM,IAAI,MAAM,GAAA;AAE3B,MAAIG,EAAa,MAAM,SAAS;AAC9B,WAAO,EAAE,MAAM,IAAI,MAAM,GAAA;AAE3B,MAAIA,EAAa,MAAM,SAAS;AAC9B,WAAO,EAAE,MAAMA,EAAa,MAAM,OAAO,MAAM,IAAM,UAAUA,EAAa,MAAM,SAAA;AAEpF,MAAIA,EAAa,MAAM,SAAS,QAAQ;AACtC,UAAMC,IAA4B,CAAA,GAC5BC,MAAeC,IAAAL,EAAa,eAAb,gBAAAK,EAAyB,MAAM,mBAAkB,CAAA,GAChEC,OAAgBC,IAAAP,EAAa,eAAb,gBAAAO,EAAyB,QAAQ,mBAAkB,CAAA,GAAI,OAAO,CAACC,MAAU,CAACJ,EAAY,KAAK,CAACK,MAAeA,EAAW,mBAAmBD,EAAM,cAAc,CAAC;AAMpL,WAJ0B;AAAA,MACxB,GAAGJ;AAAA,MACH,GAAGE;AAAA,IAAA,EAEa,QAAQ,CAAC,EAAE,MAAAI,GAAM,gBAAAC,GAAgB,sBAAAC,QAA2B;AAC5E,WAAK,CAACF,KAAQA,MAAS,aAAaE,KAAwBX,EAAiBU,CAAc,GAAG;AAC5F,cAAM,EAAE,OAAAE,GAAO,OAAAC,MAAUb,EAAiBU,CAAc;AACxD,QAAAR,EAAgB,KAAK,GAAGS,EAAqB,IAAI,CAACG,MAAwBF,MAAUE,IAAsBD,IAAQ,OAAOC,CAAmB,CAAC,CAAC;AAAA,MAChJ;AAAA,IACF,CAAC,GAEM,EAAE,MADKZ,EAAgB,KAAK,IAAI,GACjB,MAAM,IAAM,UAAUD,EAAa,MAAM,SAAA;AAAA,EACjE;AACA,SAAO,EAAE,MAAM,IAAI,MAAM,GAAA;AAC3B;AAEA,eAAsBc,EACpBC,GACAC,GACAC,GACAC,GACA;AACA,MAAI,CAACH,EAAW,SAASE,MAAc;AACrC,WAAO;AAET,MAAI;AACF,UAAME,IAAaC,EAAoBJ,EAAc,SAAS,GACxDK,IAAwB,MAAMC;AAAA,MAClCN,EAAc;AAAA,MACdC;AAAA,MACAC;AAAA,IAAA;AAEF,WAAOC,EAAW;AAAA,MAChBF;AAAA,MACAI;AAAA,IAAA;AAAA,EAEJ,SAASE,GAAK;AACZ,mBAAQ,KAAK,uBAAuB,GACpC,QAAQ,KAAMA,EAAc,OAAO,GAC5B;AAAA,EACT;AACF;AACO,SAASC,EACdC,GACAV,GACAW,GACA3B,GACAiB,GACoD;;AACpD,MAAI,CAACD,EAAW,SAASU,MAAc;AACrC,WAAO;AAGT,MAAIE,IAAW,EAAE,GAAGF,EAAU,SAAA;AAC9B,QAAMG,IAAgBH,EAAU,KAAK;AACrC,SAAAE,EAAS,QAAQ/B,EAAcoB,EAAc,WAAWA,EAAc,cAAcjB,GAAkBiB,EAAc,YAAY,GAChIW,EAAS,OAAOtC,EAAc2B,EAAc,cAAYb,IAAAa,EAAc,aAAa,eAA3B,gBAAAb,EAAuC,QAAQ,eAAe,WAAU,CAAC,GAC7Ha,EAAc,cAAc,eAC9BW,IAAWE,EAAwBF,GAA8BX,GAAeU,GAAYX,CAAU,IAEpGC,EAAc,cAAc,kBAC9BW,IAAWG,EAA2BH,GAAiCC,GAAeZ,GAAeD,GAAYW,CAAU,IAEzHV,EAAc,cAAc,uBAC9BW,IAAWI,EAA+BJ,GAAqCC,GAAeZ,GAAeD,GAAYW,CAAU,IAEjIV,EAAc,cAAc,cAC9BW,IAAWK,EAAuBL,GAA6BX,CAAa,IAE1EA,EAAc,cAAc,aAC9BW,IAAWM,EAAsBN,GAA4BC,GAAeZ,GAAeD,GAAYW,CAAU,IAE/GV,EAAc,cAAc,gBAC9BW,IAAWO,EAAyBP,GAA+BX,GAAeU,CAAU,IAE1FV,EAAc,cAAc,aAC9BW,IAAWQ,EAAsBR,GAA4BX,CAAa,IAErE;AAAA,IACL,UAAAW;AAAA,IACA,MAAMF,EAAU,KAAK;AAAA,EAAA;AAEzB;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isContinuousDataMapping as w } from "../../constantsCommon.js";
|
|
2
|
-
import { AMINOACID_COLOR_MAPPING as L, NUCLEOTIDE_COLOR_MAPPING as
|
|
3
|
-
import { DEFAULT_DOT_SIZE as
|
|
2
|
+
import { AMINOACID_COLOR_MAPPING as L, NUCLEOTIDE_COLOR_MAPPING as A, PALETTE_MAP as b, DEFAULT_BLACK as v, DEFAULT_CONTINUOUS_PALETTE as F, DEFAULT_DOT_SHAPE as I } from "../../constantsAesthetic.js";
|
|
3
|
+
import { DEFAULT_DOT_SIZE as _, DEFAULT_DOT_RANGE as P, isAestheticMappingContinuous as N, createContinuousMappingFromPalette as V } from "../../dataBindAes.js";
|
|
4
4
|
function x(t) {
|
|
5
5
|
const r = [];
|
|
6
6
|
if (t.overall.data.testMethod && t.overall.validity.testMethod && r.push({
|
|
@@ -8,7 +8,7 @@ function x(t) {
|
|
|
8
8
|
statType: "overall",
|
|
9
9
|
testMethod: t.overall.data.testMethod
|
|
10
10
|
}), t.referenceGroup.data.testMethod && t.referenceGroup.validity.testMethod && t.referenceGroup.validity.referenceGroup) {
|
|
11
|
-
const
|
|
11
|
+
const u = {
|
|
12
12
|
type: "stat",
|
|
13
13
|
statType: "referenceGroup",
|
|
14
14
|
testMethod: t.referenceGroup.data.testMethod,
|
|
@@ -16,24 +16,24 @@ function x(t) {
|
|
|
16
16
|
format: t.referenceGroup.data.format,
|
|
17
17
|
ns: t.referenceGroup.data.ns
|
|
18
18
|
};
|
|
19
|
-
t.referenceGroup.data.correctionMethod !== "none" && (
|
|
19
|
+
t.referenceGroup.data.correctionMethod !== "none" && (u.correctionMethod = t.referenceGroup.data.correctionMethod), r.push(u);
|
|
20
20
|
}
|
|
21
21
|
if (t.pairwise.data.testMethod && t.pairwise.validity.testMethod) {
|
|
22
|
-
const
|
|
22
|
+
const u = {
|
|
23
23
|
type: "stat",
|
|
24
24
|
statType: "pairwise",
|
|
25
25
|
testMethod: t.pairwise.data.testMethod,
|
|
26
26
|
format: t.pairwise.data.format,
|
|
27
27
|
ns: t.pairwise.data.ns
|
|
28
28
|
};
|
|
29
|
-
t.referenceGroup.data.correctionMethod !== "none" && (
|
|
29
|
+
t.referenceGroup.data.correctionMethod !== "none" && (u.correctionMethod = t.referenceGroup.data.correctionMethod), r.push(u);
|
|
30
30
|
}
|
|
31
31
|
return r;
|
|
32
32
|
}
|
|
33
|
-
function B(t, r,
|
|
34
|
-
const n = [], h =
|
|
33
|
+
function B(t, r, u, f, d) {
|
|
34
|
+
const n = [], h = f.components.primaryGrouping.selectorStates.length > 0, s = f.components.secondaryGrouping.selectorStates.length > 0;
|
|
35
35
|
function i(o, l = !1) {
|
|
36
|
-
return o === null ?
|
|
36
|
+
return o === null ? s ? { type: "secondaryGrouping" } : h && !l ? { type: "primaryGrouping" } : { type: "secondaryGrouping" } : o;
|
|
37
37
|
}
|
|
38
38
|
return t.forEach((o) => {
|
|
39
39
|
var l;
|
|
@@ -174,88 +174,85 @@ function B(t, r, c, d, f) {
|
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
if (o === "logo" &&
|
|
178
|
-
const e = r[o], y = ((l =
|
|
177
|
+
if (o === "logo" && s) {
|
|
178
|
+
const e = r[o], y = ((l = d.getSourceInfo(f.components.secondaryGrouping.selectorStates[0].selectedSource).spec.domain) == null ? void 0 : l["pl7.app/alphabet"]) === "aminoacid";
|
|
179
179
|
n.push({
|
|
180
180
|
type: "logo",
|
|
181
181
|
normalize: e.normalize,
|
|
182
182
|
aes: {
|
|
183
183
|
opacity: e.opacity,
|
|
184
|
-
dotFill: y ? L :
|
|
184
|
+
dotFill: y ? L : A
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
}), h && !
|
|
188
|
+
}), h && !s && n.push(...x(u)), n;
|
|
189
189
|
}
|
|
190
|
-
function z(t, r,
|
|
190
|
+
function z(t, r, u, f) {
|
|
191
191
|
if (t) {
|
|
192
|
-
const
|
|
193
|
-
return
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
}), { columnName: t, domain: n, range: [
|
|
192
|
+
const d = w(r) ? r : { column: t.value, range: P }, n = [1 / 0, -1 / 0];
|
|
193
|
+
return u.values[t.value].forEach((h) => {
|
|
194
|
+
const s = Number(h);
|
|
195
|
+
s < n[0] && (n[0] = s), s > n[1] && (n[1] = s);
|
|
196
|
+
}), { columnName: t, domain: n, range: [d.range.min, d.range.max] };
|
|
197
197
|
}
|
|
198
|
-
return w(r) ?
|
|
198
|
+
return w(r) ? f : r ?? f;
|
|
199
199
|
}
|
|
200
|
-
function D(t, r,
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
const { range: n, palette: h, midPoint: p, log: i } = r;
|
|
200
|
+
function D(t, r, u, f) {
|
|
201
|
+
const d = u.find((n) => n.value === t);
|
|
202
|
+
if (d) {
|
|
203
|
+
const { range: n, palette: h, midPoint: s, log: i } = r;
|
|
205
204
|
let { minValue: o, maxValue: l } = n ?? {}, e = !1;
|
|
206
|
-
const m = o == null, y = l == null;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
g < u[0] && (u[0] = g), g > u[1] && (u[1] = g);
|
|
212
|
-
}), console.log("bounds", u)), m && y ? (o = u[0], l = u[1]) : m ? o = l > u[0] ? u[0] : u[1] : y && (l = o < u[1] ? u[1] : u[0]), console.log("minValue", o, "maxValue", l), o != null && l !== null && l !== void 0 && o > l && (e = !0, [o, l] = [l, o]);
|
|
205
|
+
const m = o == null, y = l == null, c = [1 / 0, -1 / 0];
|
|
206
|
+
(m || y) && f.values[d.value].forEach((p) => {
|
|
207
|
+
const g = Number(p);
|
|
208
|
+
g < c[0] && (c[0] = g), g > c[1] && (c[1] = g);
|
|
209
|
+
}), m && y ? (o = c[0], l = c[1]) : m ? o = l > c[0] ? c[0] : c[1] : y && (l = o < c[1] ? c[1] : c[0]), o != null && l !== null && l !== void 0 && o > l && (e = !0, [o, l] = [l, o]);
|
|
213
210
|
const C = [o, l];
|
|
214
|
-
if (
|
|
215
|
-
const
|
|
216
|
-
C[0] =
|
|
211
|
+
if (s != null) {
|
|
212
|
+
const p = Math.max(Math.abs(s - o), Math.abs(s - l));
|
|
213
|
+
C[0] = s - p, C[1] = s + p;
|
|
217
214
|
}
|
|
218
|
-
const a = [...
|
|
215
|
+
const a = [...b[h].colors];
|
|
219
216
|
return e && a.reverse(), {
|
|
220
|
-
columnName:
|
|
217
|
+
columnName: d,
|
|
221
218
|
domain: C,
|
|
222
219
|
range: a,
|
|
223
220
|
type: i ? "log" : "linear"
|
|
224
221
|
};
|
|
225
222
|
}
|
|
226
|
-
return
|
|
223
|
+
return v;
|
|
227
224
|
}
|
|
228
|
-
function R(t, r,
|
|
229
|
-
var
|
|
225
|
+
function R(t, r, u, f, d, n, h = [], s = _) {
|
|
226
|
+
var c, C;
|
|
230
227
|
const i = [];
|
|
231
|
-
function o(a,
|
|
228
|
+
function o(a, p, g, M = !1) {
|
|
232
229
|
var G;
|
|
233
|
-
if (
|
|
234
|
-
const O =
|
|
235
|
-
return a === null || O === "String" || !
|
|
230
|
+
if (p.length) {
|
|
231
|
+
const O = p.length ? (G = n.getSourceInfo(p[0])) == null ? void 0 : G.type : void 0, E = O === "String" || !M ? { type: "grouping", value: p[0] } : D(p[0], V(F), h, u), T = d[p[0]];
|
|
232
|
+
return a === null || O === "String" || !M || !N(T) ? E : D(p[0], T, h, u);
|
|
236
233
|
}
|
|
237
234
|
return typeof a == "object" ? g : a;
|
|
238
235
|
}
|
|
239
|
-
const l =
|
|
236
|
+
const l = f.components.grouping.selectorStates.map((a) => a.selectedSource), e = ((c = f.components.shape) == null ? void 0 : c.selectorStates.map((a) => a.selectedSource)) ?? [], m = (C = f.components.size) == null ? void 0 : C.selectorStates.map((a) => a.selectedSource)[0], y = m ? h.find((a) => a.value === m) : void 0;
|
|
240
237
|
return t.forEach((a) => {
|
|
241
238
|
if (a === "dots") {
|
|
242
|
-
const
|
|
239
|
+
const p = r[a];
|
|
243
240
|
i.push({
|
|
244
241
|
type: "dots",
|
|
245
242
|
aes: {
|
|
246
|
-
dotFill: o(
|
|
247
|
-
dotShape: o(
|
|
248
|
-
dotSize: z(y,
|
|
243
|
+
dotFill: o(p.dotFill, l, v, !0),
|
|
244
|
+
dotShape: o(p.dotShape, e, I),
|
|
245
|
+
dotSize: z(y, p.dotSize, u, s)
|
|
249
246
|
}
|
|
250
247
|
});
|
|
251
248
|
}
|
|
252
249
|
if (a === "curve") {
|
|
253
|
-
const
|
|
250
|
+
const p = r[a];
|
|
254
251
|
i.push({
|
|
255
252
|
type: "curve",
|
|
256
|
-
smoothing:
|
|
253
|
+
smoothing: p.smoothing,
|
|
257
254
|
aes: {
|
|
258
|
-
lineColor: o(
|
|
255
|
+
lineColor: o(p.lineColor, l, v, !0)
|
|
259
256
|
}
|
|
260
257
|
});
|
|
261
258
|
}
|