@milaboratories/graph-maker 1.1.182 → 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/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/getLayersDataFromForms.js +49 -52
- package/dist/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/package.json +1 -1
- 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
|
@@ -13,7 +13,5 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
13
13
|
"update:modelValue": (...args: any[]) => void;
|
|
14
14
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
-
optionsListRef: HTMLDivElement;
|
|
18
|
-
}, HTMLDivElement>;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
17
|
export default _default;
|
|
@@ -1,326 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import pe from "./FixedColorsList.vue.js";
|
|
8
|
-
import me from "./FixedDotShapeList.vue.js";
|
|
9
|
-
import ve from "./FixedLineTypeList.vue.js";
|
|
10
|
-
import fe from "./FormWrapper.vue.js";
|
|
11
|
-
import _e from "./PalettesForm.vue.js";
|
|
12
|
-
import ge from "../MultiselectButton.vue.js";
|
|
13
|
-
import Ve from "../PlColorSlider.vue.js";
|
|
14
|
-
import he from "../Popup.vue.js";
|
|
15
|
-
import ye from "../../icons/Reorder.vue.js";
|
|
16
|
-
const ke = { class: "aes-mapping-block" }, Ce = { style: { margin: "0 24px" } }, Se = { class: "section-title" }, we = { style: { margin: "24px 0" } }, xe = {
|
|
17
|
-
key: 0,
|
|
18
|
-
style: { margin: "24px 0" }
|
|
19
|
-
}, $e = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "aes-settings-hint"
|
|
22
|
-
}, Te = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "column-value__reorder-icon"
|
|
25
|
-
}, Ie = { class: "column-value__title" }, Ae = { class: "column-value__aes-group" }, Le = ["onClick"], Pe = ["onClick"], Re = ["onClick"], Fe = ["onClick"], qe = /* @__PURE__ */ G({
|
|
26
|
-
__name: "AesDataMappingDiscrete",
|
|
27
|
-
props: {
|
|
28
|
-
dataColumnLabel: {},
|
|
29
|
-
columnValueLabels: {},
|
|
30
|
-
usedAesInMapping: {},
|
|
31
|
-
modelValue: {},
|
|
32
|
-
allowReordering: { type: Boolean },
|
|
33
|
-
allowHiding: { type: Boolean },
|
|
34
|
-
allowNullOption: { type: Boolean }
|
|
35
|
-
},
|
|
36
|
-
emits: ["update:modelValue"],
|
|
37
|
-
setup(d, { emit: O }) {
|
|
38
|
-
const t = d, V = O, y = g(!1), c = g(t.modelValue.palette), L = m(() => re(c.value)), i = g(null), U = m(() => i.value === null ? null : t.modelValue.order.indexOf(i.value)), n = g(null), B = m(() => {
|
|
39
|
-
const l = t.modelValue.order.map((a) => {
|
|
40
|
-
var o;
|
|
41
|
-
const e = (o = t.modelValue.mapping[a]) == null ? void 0 : o.aes;
|
|
42
|
-
return {
|
|
43
|
-
text: t.columnValueLabels[a],
|
|
44
|
-
value: a,
|
|
45
|
-
dotShape: e == null ? void 0 : e.dotShape,
|
|
46
|
-
color: e == null ? void 0 : e.color,
|
|
47
|
-
lineType: e == null ? void 0 : e.lineShape
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
return t.allowNullOption ? l : l.filter((a) => a.value !== "null");
|
|
51
|
-
});
|
|
52
|
-
function D(l) {
|
|
53
|
-
c.value = l, y.value = !1, V(
|
|
54
|
-
"update:modelValue",
|
|
55
|
-
de(l, t.modelValue.order)
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
function $(l, a, e) {
|
|
59
|
-
V("update:modelValue", {
|
|
60
|
-
...t.modelValue,
|
|
61
|
-
mapping: {
|
|
62
|
-
...t.modelValue.mapping,
|
|
63
|
-
[l]: {
|
|
64
|
-
...t.modelValue.mapping[l],
|
|
65
|
-
aes: {
|
|
66
|
-
...t.modelValue.mapping[l].aes,
|
|
67
|
-
[a]: e
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const P = J({
|
|
74
|
-
color: {},
|
|
75
|
-
dotShape: {},
|
|
76
|
-
lineType: {}
|
|
77
|
-
});
|
|
78
|
-
function T(l, a, e) {
|
|
79
|
-
e && (P[l][a.value] = e);
|
|
80
|
-
}
|
|
81
|
-
function I(l, a) {
|
|
82
|
-
const e = i.value === l.value && n.value === a;
|
|
83
|
-
i.value = e ? null : l.value, n.value = e ? null : a;
|
|
84
|
-
}
|
|
85
|
-
function R() {
|
|
86
|
-
i.value = null, n.value = null;
|
|
87
|
-
}
|
|
88
|
-
const F = m(
|
|
89
|
-
() => h[c.value].colors.map((l) => ({ color: l, name: l }))
|
|
90
|
-
), H = m(() => n.value ? ce(
|
|
91
|
-
n.value === "lineType" ? ie.length : n.value === "dotShape" ? se.length : F.value.length,
|
|
92
|
-
n.value
|
|
93
|
-
) : 0), E = g();
|
|
94
|
-
t.allowReordering && ae(E, {
|
|
95
|
-
handle: ".column-value__reorder-icon",
|
|
96
|
-
onChange(l) {
|
|
97
|
-
V("update:modelValue", {
|
|
98
|
-
...t.modelValue,
|
|
99
|
-
order: l.map((a) => t.modelValue.order[a])
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
function z(l) {
|
|
104
|
-
var a;
|
|
105
|
-
V("update:modelValue", {
|
|
106
|
-
...t.modelValue,
|
|
107
|
-
hidden: {
|
|
108
|
-
...t.modelValue.hidden,
|
|
109
|
-
[l.value]: !((a = t.modelValue.hidden) != null && a[l.value])
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function b(l, a, e = 0, o = 1) {
|
|
114
|
-
const _ = 1 / (l.length - 1), j = ue().domain(l.map((k, q) => e + q * _ * (o - e))).range(l);
|
|
115
|
-
return (k) => k > o || k < e ? a : j(k);
|
|
116
|
-
}
|
|
117
|
-
const X = m(
|
|
118
|
-
() => b(h[c.value].colors, N)
|
|
119
|
-
), K = m(
|
|
120
|
-
() => b(h[c.value].colors, N, 0, 100)
|
|
121
|
-
), A = g(
|
|
122
|
-
t.modelValue.order.map(
|
|
123
|
-
(l) => t.modelValue.mapping[l].colorIdx * 100
|
|
124
|
-
)
|
|
125
|
-
);
|
|
126
|
-
Q(
|
|
127
|
-
() => t.modelValue,
|
|
128
|
-
(l) => {
|
|
129
|
-
A.value = l.order.map(
|
|
130
|
-
(a) => l.mapping[a].colorIdx * 100
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
function W(l) {
|
|
135
|
-
l.forEach((a, e) => {
|
|
136
|
-
const o = t.modelValue.order[e], _ = a / 100;
|
|
137
|
-
t.modelValue.mapping[o].colorIdx !== _ && V("update:modelValue", {
|
|
138
|
-
...t.modelValue,
|
|
139
|
-
mapping: {
|
|
140
|
-
...t.modelValue.mapping,
|
|
141
|
-
[o]: {
|
|
142
|
-
colorIdx: _,
|
|
143
|
-
aes: {
|
|
144
|
-
...t.modelValue.mapping[o].aes,
|
|
145
|
-
color: X.value(_)
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function Y(l) {
|
|
153
|
-
n.value = "color", i.value = l.status ? t.modelValue.order[l.index] : null;
|
|
154
|
-
}
|
|
155
|
-
return (l, a) => (u(), p("div", ke, [
|
|
156
|
-
r("div", Ce, [
|
|
157
|
-
r("div", Se, [
|
|
158
|
-
r("span", null, M(d.dataColumnLabel), 1)
|
|
159
|
-
]),
|
|
160
|
-
r("div", we, [
|
|
161
|
-
C(ge, {
|
|
162
|
-
label: "Color Palette ",
|
|
163
|
-
icon: "chevron-right",
|
|
164
|
-
title: S(h)[c.value].title,
|
|
165
|
-
palette: c.value,
|
|
166
|
-
onButtonClick: a[0] || (a[0] = (e) => {
|
|
167
|
-
y.value = !0, R();
|
|
168
|
-
})
|
|
169
|
-
}, null, 8, ["title", "palette"])
|
|
170
|
-
]),
|
|
171
|
-
L.value ? s("", !0) : (u(), p("div", xe, [
|
|
172
|
-
C(Ve, {
|
|
173
|
-
modelValue: A.value,
|
|
174
|
-
"onUpdate:modelValue": [
|
|
175
|
-
a[1] || (a[1] = (e) => A.value = e),
|
|
176
|
-
W
|
|
177
|
-
],
|
|
178
|
-
colors: S(h)[c.value].colors,
|
|
179
|
-
"get-color-for-percent": K.value,
|
|
180
|
-
active: U.value,
|
|
181
|
-
onActive: Y
|
|
182
|
-
}, null, 8, ["modelValue", "colors", "get-color-for-percent", "active"])
|
|
183
|
-
])),
|
|
184
|
-
y.value ? (u(), v(fe, {
|
|
185
|
-
key: 1,
|
|
186
|
-
title: "Color Palette",
|
|
187
|
-
"back-title": "Color mapping",
|
|
188
|
-
"onForm:close": a[2] || (a[2] = (e) => y.value = !1)
|
|
189
|
-
}, {
|
|
190
|
-
default: w(() => [
|
|
191
|
-
C(_e, {
|
|
192
|
-
selected: c.value,
|
|
193
|
-
onSelect: D
|
|
194
|
-
}, null, 8, ["selected"])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
})) : s("", !0)
|
|
198
|
-
]),
|
|
199
|
-
d.allowReordering ? (u(), p("div", $e, " Drag the rows to reorder ")) : s("", !0),
|
|
200
|
-
r("div", {
|
|
201
|
-
ref_key: "optionsListRef",
|
|
202
|
-
ref: E,
|
|
203
|
-
class: "column-values-list"
|
|
204
|
-
}, [
|
|
205
|
-
(u(!0), p(Z, null, ee(B.value, (e) => (u(), p("div", {
|
|
206
|
-
key: e.value,
|
|
207
|
-
class: f(["column-value", { "column-value__with-reorder": d.allowReordering }])
|
|
208
|
-
}, [
|
|
209
|
-
d.allowReordering ? (u(), p("div", Te, [
|
|
210
|
-
(u(), v(le(ye)))
|
|
211
|
-
])) : s("", !0),
|
|
212
|
-
r("div", Ie, M(e.text), 1),
|
|
213
|
-
r("div", Ae, [
|
|
214
|
-
d.allowHiding ? (u(), v(S(te), {
|
|
215
|
-
key: 0,
|
|
216
|
-
"open-delay": 100,
|
|
217
|
-
"close-delay": 100
|
|
218
|
-
}, {
|
|
219
|
-
tooltip: w(() => [...a[3] || (a[3] = [
|
|
220
|
-
r("span", null, " Show / hide ", -1)
|
|
221
|
-
])]),
|
|
222
|
-
default: w(() => {
|
|
223
|
-
var o;
|
|
224
|
-
return [
|
|
225
|
-
r("div", {
|
|
226
|
-
style: { cursor: "pointer" },
|
|
227
|
-
class: "column-value__aes",
|
|
228
|
-
onClick: x((_) => z(e), ["stop"])
|
|
229
|
-
}, [
|
|
230
|
-
C(S(ne), {
|
|
231
|
-
name: (o = d.modelValue.hidden) != null && o[e.value] ? "view-hide" : "view-show"
|
|
232
|
-
}, null, 8, ["name"])
|
|
233
|
-
], 8, Le)
|
|
234
|
-
];
|
|
235
|
-
}),
|
|
236
|
-
_: 2
|
|
237
|
-
}, 1024)) : s("", !0),
|
|
238
|
-
d.usedAesInMapping.lineType ? (u(), p("div", {
|
|
239
|
-
key: 1,
|
|
240
|
-
ref_for: !0,
|
|
241
|
-
ref: (o) => T("lineType", e, o),
|
|
242
|
-
class: f(["column-value__aes", {
|
|
243
|
-
aes__selected: i.value === e.value && n.value === "lineType"
|
|
244
|
-
}]),
|
|
245
|
-
onClick: x((o) => I(e, "lineType"), ["stop"])
|
|
246
|
-
}, [
|
|
247
|
-
r("div", {
|
|
248
|
-
class: f(["icon__line line", { [`line__${e.lineType}`]: !0 }])
|
|
249
|
-
}, null, 2)
|
|
250
|
-
], 10, Pe)) : s("", !0),
|
|
251
|
-
d.usedAesInMapping.dotShape ? (u(), p("div", {
|
|
252
|
-
key: 2,
|
|
253
|
-
ref_for: !0,
|
|
254
|
-
ref: (o) => T("dotShape", e, o),
|
|
255
|
-
class: f(["column-value__aes", {
|
|
256
|
-
aes__selected: i.value === e.value && n.value === "dotShape"
|
|
257
|
-
}]),
|
|
258
|
-
onClick: x((o) => I(e, "dotShape"), ["stop"])
|
|
259
|
-
}, [
|
|
260
|
-
r("div", {
|
|
261
|
-
class: f(["dot", { [`dot__${e.dotShape}`]: !0 }])
|
|
262
|
-
}, null, 2)
|
|
263
|
-
], 10, Re)) : s("", !0),
|
|
264
|
-
d.usedAesInMapping.fill || d.usedAesInMapping.stroke ? (u(), p("div", {
|
|
265
|
-
key: 3,
|
|
266
|
-
ref_for: !0,
|
|
267
|
-
ref: (o) => T("color", e, o),
|
|
268
|
-
class: f(["column-value__aes", {
|
|
269
|
-
aes__selected: i.value === e.value && n.value === "color"
|
|
270
|
-
}]),
|
|
271
|
-
onClick: x((o) => I(e, "color"), ["stop"])
|
|
272
|
-
}, [
|
|
273
|
-
r("div", {
|
|
274
|
-
class: "column-value__color",
|
|
275
|
-
style: oe({ background: e.color })
|
|
276
|
-
}, null, 4)
|
|
277
|
-
], 10, Fe)) : s("", !0),
|
|
278
|
-
(n.value !== "color" || L.value) && n.value !== null && i.value === e.value ? (u(), v(he, {
|
|
279
|
-
key: `${n.value}_${i.value}`,
|
|
280
|
-
targetRef: P[n.value][i.value],
|
|
281
|
-
height: H.value,
|
|
282
|
-
"onPopup:close": R
|
|
283
|
-
}, {
|
|
284
|
-
default: w(() => [
|
|
285
|
-
r("div", {
|
|
286
|
-
class: f(["fixed-aes-list", { "fixed-aes-list__rows": !1 }])
|
|
287
|
-
}, [
|
|
288
|
-
n.value === "lineType" ? (u(), v(ve, {
|
|
289
|
-
key: 0,
|
|
290
|
-
modelValue: e.lineType,
|
|
291
|
-
"onUpdate:modelValue": [
|
|
292
|
-
(o) => e.lineType = o,
|
|
293
|
-
(o) => $(e.value, "lineShape", o)
|
|
294
|
-
]
|
|
295
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : s("", !0),
|
|
296
|
-
n.value === "dotShape" ? (u(), v(me, {
|
|
297
|
-
key: 1,
|
|
298
|
-
modelValue: e.dotShape,
|
|
299
|
-
"onUpdate:modelValue": [
|
|
300
|
-
(o) => e.dotShape = o,
|
|
301
|
-
(o) => $(e.value, "dotShape", o)
|
|
302
|
-
]
|
|
303
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : s("", !0),
|
|
304
|
-
n.value === "color" ? (u(), v(pe, {
|
|
305
|
-
key: 2,
|
|
306
|
-
modelValue: e.color,
|
|
307
|
-
"onUpdate:modelValue": [
|
|
308
|
-
(o) => e.color = o,
|
|
309
|
-
(o) => $(e.value, "color", o)
|
|
310
|
-
],
|
|
311
|
-
"colors-list": F.value
|
|
312
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "colors-list"])) : s("", !0)
|
|
313
|
-
])
|
|
314
|
-
]),
|
|
315
|
-
_: 2
|
|
316
|
-
}, 1032, ["targetRef", "height"])) : s("", !0)
|
|
317
|
-
])
|
|
318
|
-
], 2))), 128))
|
|
319
|
-
], 512)
|
|
320
|
-
]));
|
|
321
|
-
}
|
|
322
|
-
});
|
|
1
|
+
import s from "./AesDataMappingDiscrete.vue2.js";
|
|
2
|
+
import o from "./AesDataMappingDiscrete.vue3.js";
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = {
|
|
5
|
+
$style: o
|
|
6
|
+
}, p = /* @__PURE__ */ t(s, [["__cssModules", e]]);
|
|
323
7
|
export {
|
|
324
|
-
|
|
8
|
+
p as default
|
|
325
9
|
};
|
|
326
10
|
//# sourceMappingURL=AesDataMappingDiscrete.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AesDataMappingDiscrete.vue.js","sources":["../../../src/components/AesSettings/AesDataMappingDiscrete.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlIcon24, PlTooltip, useSortable } from '@platforma-sdk/ui-vue';\nimport { scaleLinear } from 'd3-scale';\nimport type { ComponentPublicInstance } from 'vue';\nimport { computed, reactive, ref, watch } from 'vue';\nimport type {\n DotShape,\n LineType,\n Palette,\n} from './types';\nimport {\n FIXED_LINE_TYPES,\n FIXES_DOT_SHAPES,\n isCategorical,\n PALETTE_MAP, UNKNOWN_COLOR,\n} from '../../constantsAesthetic';\nimport type { AesType } from '../../constantsCommon';\nimport type {\n AestheticMappingCategorical } from '../../dataBindAes';\nimport {\n createCategoricalMappingFromPalette,\n} from '../../dataBindAes';\nimport { getPopupHeightForFixedAesList } from '../../utils/getPopupHeightForFixedAesList';\nimport FixedColorsList from './FixedColorsList.vue';\nimport FixedDotShapeList from './FixedDotShapeList.vue';\nimport FixedLineTypeList from './FixedLineTypeList.vue';\nimport FormWrapper from './FormWrapper.vue';\nimport PalettesForm from './PalettesForm.vue';\nimport MultiselectButton from '../MultiselectButton.vue';\nimport PlColorSlider from '../PlColorSlider.vue';\nimport Popup from '../Popup.vue';\nimport Reorder from '../../icons/Reorder.vue';\n\nconst props = defineProps<{\n dataColumnLabel: string;\n columnValueLabels: Record<string, string>;\n usedAesInMapping: Record<AesType, boolean>;\n modelValue: AestheticMappingCategorical;\n allowReordering?: boolean;\n allowHiding?: boolean;\n allowNullOption?: boolean;\n}>();\n\nconst emit = defineEmits(['update:modelValue']);\n\nconst palettesOpen = ref(false);\nconst palette = ref<Palette>(props.modelValue.palette);\nconst categorical = computed(() => isCategorical(palette.value));\n\ntype EditableAesType = 'color' | 'dotShape' | 'lineType';\n\nconst activeValue = ref<string | null>(null);\nconst activeValueIndex = computed(() => {\n if (activeValue.value === null) {\n return null;\n }\n return props.modelValue.order.indexOf(activeValue.value);\n});\nconst activeAesType = ref<EditableAesType | null>(null);\n\nconst optionsList = computed(() => {\n const options = props.modelValue.order.map((value: string) => {\n const aes = props.modelValue.mapping[value]?.aes;\n return {\n text: props.columnValueLabels[value],\n value,\n dotShape: aes?.dotShape,\n color: aes?.color,\n lineType: aes?.lineShape,\n };\n });\n\n return props.allowNullOption ? options : options.filter((op) => op.value !== 'null');\n});\n\nfunction onPaletteSelect(value: Palette) {\n palette.value = value;\n palettesOpen.value = false;\n emit(\n 'update:modelValue',\n createCategoricalMappingFromPalette(value, props.modelValue.order),\n );\n}\n\nfunction onAesValueUpdate(\n value: string | number,\n aesField: string,\n aesValue: string | DotShape | LineType,\n) {\n emit('update:modelValue', {\n ...props.modelValue,\n mapping: {\n ...props.modelValue.mapping,\n [value]: {\n ...props.modelValue.mapping[value],\n aes: {\n ...props.modelValue.mapping[value].aes,\n [aesField]: aesValue,\n },\n },\n },\n });\n}\n\nconst itemRefs = reactive<\n Record<EditableAesType, Record<string, ComponentPublicInstance | Element>>\n>({\n color: {},\n dotShape: {},\n lineType: {},\n});\n\nfunction setRef(\n type: EditableAesType,\n item: (typeof optionsList.value)[0],\n el: ComponentPublicInstance | null | Element,\n) {\n if (el) {\n itemRefs[type][item.value] = el;\n }\n}\n\nfunction toggleForm(\n item: (typeof optionsList.value)[0],\n valueType: EditableAesType,\n) {\n const isThisFormOpen\n = activeValue.value === item.value && activeAesType.value === valueType;\n activeValue.value = isThisFormOpen ? null : item.value;\n activeAesType.value = isThisFormOpen ? null : valueType;\n}\n\nfunction closeForm() {\n activeValue.value = null;\n activeAesType.value = null;\n}\n\nconst selectedColorsList = computed(() =>\n PALETTE_MAP[palette.value].colors.map((color) => ({ color, name: color })),\n);\n\nconst popupHeight = computed(() => {\n if (!activeAesType.value) {\n return 0;\n }\n return getPopupHeightForFixedAesList(\n activeAesType.value === 'lineType' ? FIXED_LINE_TYPES.length : activeAesType.value === 'dotShape' ? FIXES_DOT_SHAPES.length : selectedColorsList.value.length,\n activeAesType.value,\n );\n});\n\nconst optionsListRef = ref();\n\nif (props.allowReordering) {\n useSortable(optionsListRef, {\n handle: '.column-value__reorder-icon',\n onChange(indices) {\n emit('update:modelValue', {\n ...props.modelValue,\n order: indices.map((idx) => props.modelValue.order[idx]),\n });\n },\n });\n}\n\nfunction switchVisibility(option: { value: string }) {\n emit('update:modelValue', {\n ...props.modelValue,\n hidden: {\n ...props.modelValue.hidden,\n [option.value]: props.modelValue.hidden?.[option.value] ? false : true,\n },\n });\n}\n\nfunction getColorScale(colors: string[], unknownColor: string, from = 0, to = 1) {\n const colorStep = 1 / (colors.length - 1);\n const scale = scaleLinear<string, string>()\n .domain(colors.map((_c, idx) => from + idx * colorStep * (to - from)))\n .range(colors);\n return (v: number) => {\n if (v > to || v < from) {\n return unknownColor;\n }\n return scale(v);\n };\n}\n\nconst continuousColorScale = computed(() =>\n getColorScale(PALETTE_MAP[palette.value].colors, UNKNOWN_COLOR),\n);\n\nconst colorForPercent = computed(() =>\n getColorScale(PALETTE_MAP[palette.value].colors, UNKNOWN_COLOR, 0, 100),\n);\nconst continuousMappingItems = ref(\n props.modelValue.order.map(\n (item) => props.modelValue.mapping[item].colorIdx * 100,\n ),\n);\nwatch(\n () => props.modelValue,\n (v) => {\n continuousMappingItems.value = v.order.map(\n (item) => v.mapping[item].colorIdx * 100,\n );\n },\n);\nfunction updateContinuousColors(v: number[]) {\n v.forEach((value, idx) => {\n const item = props.modelValue.order[idx];\n const newColorIdx = value / 100;\n if (props.modelValue.mapping[item].colorIdx !== newColorIdx) {\n emit('update:modelValue', {\n ...props.modelValue,\n mapping: {\n ...props.modelValue.mapping,\n [item]: {\n colorIdx: newColorIdx,\n aes: {\n ...props.modelValue.mapping[item].aes,\n color: continuousColorScale.value(newColorIdx),\n },\n },\n },\n });\n }\n });\n}\n\nfunction setActiveElementFromColorSlider(e: { index: number; status: boolean }) {\n activeAesType.value = 'color';\n activeValue.value = e.status ? props.modelValue.order[e.index] : null;\n}\n</script>\n\n<template>\n <div class=\"aes-mapping-block\">\n <div style=\"margin: 0 24px\">\n <div class=\"section-title\">\n <span>{{ dataColumnLabel }}</span>\n </div>\n <div style=\"margin: 24px 0\">\n <MultiselectButton\n label=\"Color Palette \"\n icon=\"chevron-right\"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"\n palettesOpen = true;\n closeForm();\n \"\n />\n </div>\n <div v-if=\"!categorical\" style=\"margin: 24px 0\">\n <PlColorSlider\n v-model=\"continuousMappingItems\"\n :colors=\"PALETTE_MAP[palette].colors\"\n :get-color-for-percent=\"colorForPercent\"\n :active=\"activeValueIndex\"\n @active=\"setActiveElementFromColorSlider\"\n @update:model-value=\"updateContinuousColors\"\n />\n </div>\n <FormWrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm :selected=\"palette\" @select=\"onPaletteSelect\" />\n </FormWrapper>\n </div>\n <div v-if=\"allowReordering\" class=\"aes-settings-hint\">\n Drag the rows to reorder\n </div>\n <div ref=\"optionsListRef\" class=\"column-values-list\">\n <div\n v-for=\"item of optionsList\"\n :key=\"item.value\"\n class=\"column-value\"\n :class=\"{ 'column-value__with-reorder': allowReordering }\"\n >\n <div v-if=\"allowReordering\" class=\"column-value__reorder-icon\">\n <component :is=\"Reorder\" />\n </div>\n <div class=\"column-value__title\">{{ item.text }}</div>\n <div class=\"column-value__aes-group\">\n <PlTooltip v-if=\"allowHiding\" :open-delay=\"100\" :close-delay=\"100\">\n <div :style=\"{cursor: 'pointer'}\" class=\"column-value__aes\" @click.stop=\"switchVisibility(item)\">\n <PlIcon24 :name=\"modelValue.hidden?.[item.value] ? 'view-hide' : 'view-show'\"/>\n </div>\n <template #tooltip>\n <span> Show / hide </span>\n </template>\n </PlTooltip>\n <div\n v-if=\"usedAesInMapping.lineType\"\n :ref=\"(v) => setRef('lineType', item, v)\"\n class=\"column-value__aes\"\n :class=\"{\n aes__selected:\n activeValue === item.value &&\n activeAesType === 'lineType'\n }\"\n @click.stop=\"toggleForm(item, 'lineType')\"\n >\n <div\n class=\"icon__line line\"\n :class=\"{ [`line__${item.lineType}`]: true }\"\n />\n </div>\n <div\n v-if=\"usedAesInMapping.dotShape\"\n :ref=\"(v) => setRef('dotShape', item, v)\"\n class=\"column-value__aes\"\n :class=\"{\n aes__selected: activeValue === item.value && activeAesType === 'dotShape'\n }\"\n @click.stop=\"toggleForm(item, 'dotShape')\"\n >\n <div class=\"dot\" :class=\"{ [`dot__${item.dotShape}`]: true }\" />\n </div>\n <div\n v-if=\"usedAesInMapping.fill || usedAesInMapping.stroke\"\n :ref=\"(v) => setRef('color', item, v)\"\n class=\"column-value__aes\"\n :class=\"{\n aes__selected: activeValue === item.value && activeAesType === 'color'\n }\"\n @click.stop=\"toggleForm(item, 'color')\"\n >\n <div\n class=\"column-value__color\"\n :style=\"{ background: item.color }\"\n />\n </div>\n <Popup\n v-if=\"\n (activeAesType !== 'color' || categorical) &&\n activeAesType !== null &&\n activeValue === item.value\n \"\n :key=\"`${activeAesType}_${activeValue}`\"\n :targetRef=\"itemRefs[activeAesType][activeValue] as HTMLElement\"\n :height=\"popupHeight\"\n @popup:close=\"closeForm\"\n >\n <div\n class=\"fixed-aes-list\"\n :class=\"{ 'fixed-aes-list__rows': false }\"\n >\n <FixedLineTypeList\n v-if=\"activeAesType === 'lineType'\"\n v-model=\"item.lineType as LineType\"\n @update:modelValue=\"\n (v) => onAesValueUpdate(item.value, 'lineShape', v)\n \"\n />\n <FixedDotShapeList\n v-if=\"activeAesType === 'dotShape'\"\n v-model=\"item.dotShape as DotShape\"\n @update:modelValue=\"\n (v) => onAesValueUpdate(item.value, 'dotShape', v)\n \"\n />\n <FixedColorsList\n v-if=\"activeAesType === 'color'\"\n v-model=\"item.color as string\"\n :colors-list=\"selectedColorsList\"\n @update:modelValue=\"\n (v) => onAesValueUpdate(item.value, 'color', v)\n \"\n />\n </div>\n </Popup>\n </div>\n </div>\n </div>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","palettesOpen","ref","palette","categorical","computed","isCategorical","activeValue","activeValueIndex","activeAesType","optionsList","options","value","aes","_a","op","onPaletteSelect","createCategoricalMappingFromPalette","onAesValueUpdate","aesField","aesValue","itemRefs","reactive","setRef","type","item","el","toggleForm","valueType","isThisFormOpen","closeForm","selectedColorsList","PALETTE_MAP","color","popupHeight","getPopupHeightForFixedAesList","FIXED_LINE_TYPES","FIXES_DOT_SHAPES","optionsListRef","useSortable","indices","idx","switchVisibility","option","getColorScale","colors","unknownColor","from","to","colorStep","scale","scaleLinear","_c","v","continuousColorScale","UNKNOWN_COLOR","colorForPercent","continuousMappingItems","watch","updateContinuousColors","newColorIdx","setActiveElementFromColorSlider","e","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_hoisted_4","_createVNode","MultiselectButton","_unref","_cache","$event","_hoisted_5","PlColorSlider","_createBlock","FormWrapper","PalettesForm","_hoisted_6","_Fragment","_renderList","_normalizeClass","_hoisted_7","_resolveDynamicComponent","Reorder","_hoisted_8","_toDisplayString","_hoisted_9","PlTooltip","_withModifiers","PlIcon24","_normalizeStyle","Popup","FixedLineTypeList","FixedDotShapeList","FixedColorsList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,UAAMA,IAAQC,GAURC,IAAOC,GAEPC,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAaL,EAAM,WAAW,OAAO,GAC/CO,IAAcC,EAAS,MAAMC,GAAcH,EAAQ,KAAK,CAAC,GAIzDI,IAAcL,EAAmB,IAAI,GACrCM,IAAmBH,EAAS,MAC5BE,EAAY,UAAU,OACjB,OAEFV,EAAM,WAAW,MAAM,QAAQU,EAAY,KAAK,CACxD,GACKE,IAAgBP,EAA4B,IAAI,GAEhDQ,IAAcL,EAAS,MAAM;AACjC,YAAMM,IAAUd,EAAM,WAAW,MAAM,IAAI,CAACe,MAAkB;;AAC5D,cAAMC,KAAMC,IAAAjB,EAAM,WAAW,QAAQe,CAAK,MAA9B,gBAAAE,EAAiC;AAC7C,eAAO;AAAA,UACL,MAAMjB,EAAM,kBAAkBe,CAAK;AAAA,UACnC,OAAAA;AAAA,UACA,UAAUC,KAAA,gBAAAA,EAAK;AAAA,UACf,OAAOA,KAAA,gBAAAA,EAAK;AAAA,UACZ,UAAUA,KAAA,gBAAAA,EAAK;AAAA,QAAA;AAAA,MAEnB,CAAC;AAED,aAAOhB,EAA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A;kBAGjC1E,EAAA,UAAa,mBADrBoE,EAMEkB,IAAA;AAAA;oBAJS,YAAAtE,EAAK;AAAA,oBAAL,uBAAA;AAAA,sBAAA,CAAAiD,MAAAjD,EAAK,WAAQiD;AAAA,sBACkB,CAAArB,MAAMnC,EAAiBO,EAAK,oBAAoB4B,CAAC;AAAA,oBAAA;AAAA;kBAKnF5C,EAAA,UAAa,mBADrBoE,EAMEmB,IAAA;AAAA;oBAJS,YAAAvE,EAAK;AAAA,oBAAL,uBAAA;AAAA,sBAAA,CAAAiD,MAAAjD,EAAK,WAAQiD;AAAA,sBACkB,CAAArB,MAAMnC,EAAiBO,EAAK,mBAAmB4B,CAAC;AAAA,oBAAA;AAAA;kBAKlF5C,EAAA,UAAa,gBADrBoE,EAOEoB,IAAA;AAAA;oBALS,YAAAxE,EAAK;AAAA,oBAAL,uBAAA;AAAA,sBAAA,CAAAiD,MAAAjD,EAAK,QAAKiD;AAAA,sBAEqB,CAAArB,MAAMnC,EAAiBO,EAAK,gBAAgB4B,CAAC;AAAA,oBAAA;AAAA,oBADpF,eAAatB,EAAA;AAAA,kBAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"AesDataMappingDiscrete.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,5 +1,218 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as H, ref as r, computed as c, watch as L, createElementBlock as b, openBlock as f, createElementVNode as m, createCommentVNode as x, createBlock as K, toDisplayString as W, createVNode as p, unref as _, withCtx as P } from "vue";
|
|
2
|
+
import { scaleLinear as j } from "d3-scale";
|
|
3
|
+
import { isCategorical as q, PALETTE_MAP as h, UNKNOWN_COLOR as R } from "../../constantsAesthetic.js";
|
|
4
|
+
import { createCategoricalMappingFromPalette as z } from "../../dataBindAes.js";
|
|
5
|
+
import G from "./FormWrapper.vue.js";
|
|
6
|
+
import J from "./PalettesForm.vue.js";
|
|
7
|
+
import Q from "../MultiselectButton.vue.js";
|
|
8
|
+
import X from "../PlColorSlider.vue.js";
|
|
9
|
+
import Y from "./DiscreteRow.vue.js";
|
|
10
|
+
import { PlElementList as Z } from "@platforma-sdk/ui-vue";
|
|
11
|
+
const ee = { class: "aes-mapping-block" }, le = { style: { margin: "0 24px" } }, te = { class: "section-title" }, ae = { style: { margin: "24px 0" } }, oe = {
|
|
12
|
+
key: 0,
|
|
13
|
+
style: { margin: "24px 0" }
|
|
14
|
+
}, ne = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "aes-settings-hint"
|
|
17
|
+
}, ie = { class: "column-values-list" }, fe = /* @__PURE__ */ H({
|
|
18
|
+
__name: "AesDataMappingDiscrete",
|
|
19
|
+
props: {
|
|
20
|
+
dataColumnLabel: {},
|
|
21
|
+
columnValueLabels: {},
|
|
22
|
+
usedAesInMapping: {},
|
|
23
|
+
modelValue: {},
|
|
24
|
+
allowReordering: { type: Boolean },
|
|
25
|
+
allowHiding: { type: Boolean },
|
|
26
|
+
allowNullOption: { type: Boolean }
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue"],
|
|
29
|
+
setup(u, { emit: N }) {
|
|
30
|
+
const a = u, d = N, v = r(!1), i = r(a.modelValue.palette), k = c(() => q(i.value)), s = r(null), $ = c(() => s.value === null ? null : a.modelValue.order.indexOf(s.value)), g = r(null), I = c({
|
|
31
|
+
get: () => {
|
|
32
|
+
const e = a.modelValue.order.map((t) => {
|
|
33
|
+
var o;
|
|
34
|
+
const l = (o = a.modelValue.mapping[t]) == null ? void 0 : o.aes;
|
|
35
|
+
return {
|
|
36
|
+
text: a.columnValueLabels[t],
|
|
37
|
+
value: t,
|
|
38
|
+
dotShape: l == null ? void 0 : l.dotShape,
|
|
39
|
+
color: l == null ? void 0 : l.color,
|
|
40
|
+
lineType: l == null ? void 0 : l.lineShape
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
return a.allowNullOption ? e : e.filter((t) => t.value !== "null");
|
|
44
|
+
},
|
|
45
|
+
set: (e) => {
|
|
46
|
+
d("update:modelValue", {
|
|
47
|
+
...a.modelValue,
|
|
48
|
+
order: e.map((t) => t.value)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
function B(e) {
|
|
53
|
+
i.value = e, v.value = !1, d(
|
|
54
|
+
"update:modelValue",
|
|
55
|
+
z(e, a.modelValue.order)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function D(e, t, l) {
|
|
59
|
+
d("update:modelValue", {
|
|
60
|
+
...a.modelValue,
|
|
61
|
+
mapping: {
|
|
62
|
+
...a.modelValue.mapping,
|
|
63
|
+
[e]: {
|
|
64
|
+
...a.modelValue.mapping[e],
|
|
65
|
+
aes: {
|
|
66
|
+
...a.modelValue.mapping[e].aes,
|
|
67
|
+
[t]: l
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function S() {
|
|
74
|
+
s.value = null, g.value = null;
|
|
75
|
+
}
|
|
76
|
+
function E(e) {
|
|
77
|
+
var t;
|
|
78
|
+
d("update:modelValue", {
|
|
79
|
+
...a.modelValue,
|
|
80
|
+
hidden: {
|
|
81
|
+
...a.modelValue.hidden,
|
|
82
|
+
[e.value]: !((t = a.modelValue.hidden) != null && t[e.value])
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function A(e, t, l = 0, o = 1) {
|
|
87
|
+
const n = 1 / (e.length - 1), C = j().domain(e.map((V, U) => l + U * n * (o - l))).range(e);
|
|
88
|
+
return (V) => V > o || V < l ? t : C(V);
|
|
89
|
+
}
|
|
90
|
+
const O = c(
|
|
91
|
+
() => A(h[i.value].colors, R)
|
|
92
|
+
), M = c(
|
|
93
|
+
() => A(h[i.value].colors, R, 0, 100)
|
|
94
|
+
), y = r(
|
|
95
|
+
a.modelValue.order.map(
|
|
96
|
+
(e) => a.modelValue.mapping[e].colorIdx * 100
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
L(
|
|
100
|
+
() => a.modelValue,
|
|
101
|
+
(e) => {
|
|
102
|
+
y.value = e.order.map(
|
|
103
|
+
(t) => e.mapping[t].colorIdx * 100
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
function T(e) {
|
|
108
|
+
e.forEach((t, l) => {
|
|
109
|
+
const o = a.modelValue.order[l], n = t / 100;
|
|
110
|
+
a.modelValue.mapping[o].colorIdx !== n && d("update:modelValue", {
|
|
111
|
+
...a.modelValue,
|
|
112
|
+
mapping: {
|
|
113
|
+
...a.modelValue.mapping,
|
|
114
|
+
[o]: {
|
|
115
|
+
colorIdx: n,
|
|
116
|
+
aes: {
|
|
117
|
+
...a.modelValue.mapping[o].aes,
|
|
118
|
+
color: O.value(n)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function F(e) {
|
|
126
|
+
g.value = "color", s.value = e.status ? a.modelValue.order[e.index] : null;
|
|
127
|
+
}
|
|
128
|
+
const w = r(I.value);
|
|
129
|
+
return L(() => w.value, (e) => {
|
|
130
|
+
I.value = e;
|
|
131
|
+
}, { deep: !0 }), (e, t) => (f(), b("div", ee, [
|
|
132
|
+
m("div", le, [
|
|
133
|
+
m("div", te, [
|
|
134
|
+
m("span", null, W(u.dataColumnLabel), 1)
|
|
135
|
+
]),
|
|
136
|
+
m("div", ae, [
|
|
137
|
+
p(Q, {
|
|
138
|
+
label: "Color Palette ",
|
|
139
|
+
icon: "chevron-right",
|
|
140
|
+
title: _(h)[i.value].title,
|
|
141
|
+
palette: i.value,
|
|
142
|
+
onButtonClick: t[0] || (t[0] = (l) => {
|
|
143
|
+
v.value = !0, S();
|
|
144
|
+
})
|
|
145
|
+
}, null, 8, ["title", "palette"])
|
|
146
|
+
]),
|
|
147
|
+
k.value ? x("", !0) : (f(), b("div", oe, [
|
|
148
|
+
p(X, {
|
|
149
|
+
modelValue: y.value,
|
|
150
|
+
"onUpdate:modelValue": [
|
|
151
|
+
t[1] || (t[1] = (l) => y.value = l),
|
|
152
|
+
T
|
|
153
|
+
],
|
|
154
|
+
colors: _(h)[i.value].colors,
|
|
155
|
+
"get-color-for-percent": M.value,
|
|
156
|
+
active: $.value,
|
|
157
|
+
onActive: F
|
|
158
|
+
}, null, 8, ["modelValue", "colors", "get-color-for-percent", "active"])
|
|
159
|
+
])),
|
|
160
|
+
v.value ? (f(), K(G, {
|
|
161
|
+
key: 1,
|
|
162
|
+
title: "Color Palette",
|
|
163
|
+
"back-title": "Color mapping",
|
|
164
|
+
"onForm:close": t[2] || (t[2] = (l) => v.value = !1)
|
|
165
|
+
}, {
|
|
166
|
+
default: P(() => [
|
|
167
|
+
p(J, {
|
|
168
|
+
selected: i.value,
|
|
169
|
+
onSelect: B
|
|
170
|
+
}, null, 8, ["selected"])
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
})) : x("", !0)
|
|
174
|
+
]),
|
|
175
|
+
u.allowReordering ? (f(), b("div", ne, " Drag the rows to reorder ")) : x("", !0),
|
|
176
|
+
m("div", ie, [
|
|
177
|
+
p(_(Z), {
|
|
178
|
+
items: w.value,
|
|
179
|
+
"onUpdate:items": t[3] || (t[3] = (l) => w.value = l),
|
|
180
|
+
"get-item-key": (l) => l.value,
|
|
181
|
+
"item-class": e.$style.discreteRow,
|
|
182
|
+
"item-class-title": e.$style.discreteRowTitle,
|
|
183
|
+
disableDragging: !u.allowReordering,
|
|
184
|
+
disableRemoving: !0,
|
|
185
|
+
disableToggling: !0,
|
|
186
|
+
disablePinning: !0
|
|
187
|
+
}, {
|
|
188
|
+
"item-title": P(({ item: l }) => {
|
|
189
|
+
var o;
|
|
190
|
+
return [
|
|
191
|
+
p(Y, {
|
|
192
|
+
item: l,
|
|
193
|
+
"active-value": s.value,
|
|
194
|
+
"active-aes-type": g.value,
|
|
195
|
+
"used-aes-in-mapping": a.usedAesInMapping,
|
|
196
|
+
"allow-hiding": u.allowHiding ?? !1,
|
|
197
|
+
"allow-reordering": u.allowReordering ?? !1,
|
|
198
|
+
hidden: ((o = a.modelValue.hidden) == null ? void 0 : o[l.value]) ?? !1,
|
|
199
|
+
palette: i.value,
|
|
200
|
+
"is-categorical": k.value,
|
|
201
|
+
"on-aes-value-update": (n, C) => D(l.value, n, C),
|
|
202
|
+
"on-switch-visibility": () => E(l),
|
|
203
|
+
"on-active-value-change": (n) => s.value = n,
|
|
204
|
+
"on-active-aes-type-change": (n) => g.value = n,
|
|
205
|
+
"on-close-form": S
|
|
206
|
+
}, null, 8, ["item", "active-value", "active-aes-type", "used-aes-in-mapping", "allow-hiding", "allow-reordering", "hidden", "palette", "is-categorical", "on-aes-value-update", "on-switch-visibility", "on-active-value-change", "on-active-aes-type-change"])
|
|
207
|
+
];
|
|
208
|
+
}),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["items", "get-item-key", "item-class", "item-class-title", "disableDragging"])
|
|
211
|
+
])
|
|
212
|
+
]));
|
|
213
|
+
}
|
|
214
|
+
});
|
|
2
215
|
export {
|
|
3
|
-
|
|
216
|
+
fe as default
|
|
4
217
|
};
|
|
5
218
|
//# sourceMappingURL=AesDataMappingDiscrete.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AesDataMappingDiscrete.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"AesDataMappingDiscrete.vue2.js","sources":["../../../src/components/AesSettings/AesDataMappingDiscrete.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { scaleLinear } from 'd3-scale';\nimport { computed, ref, watch } from 'vue';\nimport type {\n DotShape,\n LineType,\n Palette,\n} from './types';\nimport {\n isCategorical,\n PALETTE_MAP, UNKNOWN_COLOR,\n} from '../../constantsAesthetic';\nimport type { AesType } from '../../constantsCommon';\nimport type {\n AestheticMappingCategorical,\n} from '../../dataBindAes';\nimport {\n createCategoricalMappingFromPalette,\n} from '../../dataBindAes';\nimport FormWrapper from './FormWrapper.vue';\nimport PalettesForm from './PalettesForm.vue';\nimport MultiselectButton from '../MultiselectButton.vue';\nimport PlColorSlider from '../PlColorSlider.vue';\nimport DiscreteRow from './DiscreteRow.vue';\nimport { PlElementList } from '@platforma-sdk/ui-vue';\n\nconst props = defineProps<{\n dataColumnLabel: string;\n columnValueLabels: Record<string, string>;\n usedAesInMapping: Record<AesType, boolean>;\n modelValue: AestheticMappingCategorical;\n allowReordering?: boolean;\n allowHiding?: boolean;\n allowNullOption?: boolean;\n}>();\n\nconst emit = defineEmits(['update:modelValue']);\n\nconst palettesOpen = ref(false);\nconst palette = ref<Palette>(props.modelValue.palette);\nconst categorical = computed(() => isCategorical(palette.value));\n\ntype EditableAesType = 'color' | 'dotShape' | 'lineType';\n\nconst activeValue = ref<string | null>(null);\nconst activeValueIndex = computed(() => {\n if (activeValue.value === null) {\n return null;\n }\n return props.modelValue.order.indexOf(activeValue.value);\n});\nconst activeAesType = ref<EditableAesType | null>(null);\n\nconst optionsList = computed({\n get: () => {\n const options = props.modelValue.order.map((value: string) => {\n const aes = props.modelValue.mapping[value]?.aes;\n return {\n text: props.columnValueLabels[value],\n value,\n dotShape: aes?.dotShape,\n color: aes?.color,\n lineType: aes?.lineShape,\n };\n });\n\n return props.allowNullOption ? options : options.filter((op) => op.value !== 'null');\n },\n set: (value) => {\n emit('update:modelValue', {\n ...props.modelValue,\n order: value.map((item) => item.value),\n });\n },\n});\n\nfunction onPaletteSelect(value: Palette) {\n palette.value = value;\n palettesOpen.value = false;\n emit(\n 'update:modelValue',\n createCategoricalMappingFromPalette(value, props.modelValue.order),\n );\n}\n\nfunction onAesValueUpdate(\n value: string | number,\n aesField: string,\n aesValue: string | DotShape | LineType,\n) {\n emit('update:modelValue', {\n ...props.modelValue,\n mapping: {\n ...props.modelValue.mapping,\n [value]: {\n ...props.modelValue.mapping[value],\n aes: {\n ...props.modelValue.mapping[value].aes,\n [aesField]: aesValue,\n },\n },\n },\n });\n}\n\nfunction closeForm() {\n activeValue.value = null;\n activeAesType.value = null;\n}\n\nfunction switchVisibility(option: { value: string }) {\n emit('update:modelValue', {\n ...props.modelValue,\n hidden: {\n ...props.modelValue.hidden,\n [option.value]: props.modelValue.hidden?.[option.value] ? false : true,\n },\n });\n}\n\nfunction getColorScale(colors: string[], unknownColor: string, from = 0, to = 1) {\n const colorStep = 1 / (colors.length - 1);\n const scale = scaleLinear<string, string>()\n .domain(colors.map((_c, idx) => from + idx * colorStep * (to - from)))\n .range(colors);\n return (v: number) => {\n if (v > to || v < from) {\n return unknownColor;\n }\n return scale(v);\n };\n}\n\nconst continuousColorScale = computed(() =>\n getColorScale(PALETTE_MAP[palette.value].colors, UNKNOWN_COLOR),\n);\n\nconst colorForPercent = computed(() =>\n getColorScale(PALETTE_MAP[palette.value].colors, UNKNOWN_COLOR, 0, 100),\n);\nconst continuousMappingItems = ref(\n props.modelValue.order.map(\n (item) => props.modelValue.mapping[item].colorIdx * 100,\n ),\n);\nwatch(\n () => props.modelValue,\n (v) => {\n continuousMappingItems.value = v.order.map(\n (item) => v.mapping[item].colorIdx * 100,\n );\n },\n);\nfunction updateContinuousColors(v: number[]) {\n v.forEach((value, idx) => {\n const item = props.modelValue.order[idx];\n const newColorIdx = value / 100;\n if (props.modelValue.mapping[item].colorIdx !== newColorIdx) {\n emit('update:modelValue', {\n ...props.modelValue,\n mapping: {\n ...props.modelValue.mapping,\n [item]: {\n colorIdx: newColorIdx,\n aes: {\n ...props.modelValue.mapping[item].aes,\n color: continuousColorScale.value(newColorIdx),\n },\n },\n },\n });\n }\n });\n}\n\nfunction setActiveElementFromColorSlider(e: { index: number; status: boolean }) {\n activeAesType.value = 'color';\n activeValue.value = e.status ? props.modelValue.order[e.index] : null;\n}\n\nconst listItems = ref(optionsList.value);\nwatch(() => listItems.value, (v) => {\n optionsList.value = v;\n}, { deep: true });\n</script>\n\n<template>\n <div class=\"aes-mapping-block\">\n <div style=\"margin: 0 24px\">\n <div class=\"section-title\">\n <span>{{ dataColumnLabel }}</span>\n </div>\n <div style=\"margin: 24px 0\">\n <MultiselectButton\n label=\"Color Palette \" icon=\"chevron-right\" :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\" @button-click=\"\n palettesOpen = true;\n closeForm();\n \"\n />\n </div>\n <div v-if=\"!categorical\" style=\"margin: 24px 0\">\n <PlColorSlider\n v-model=\"continuousMappingItems\" :colors=\"PALETTE_MAP[palette].colors\"\n :get-color-for-percent=\"colorForPercent\" :active=\"activeValueIndex\" @active=\"setActiveElementFromColorSlider\"\n @update:model-value=\"updateContinuousColors\"\n />\n </div>\n <FormWrapper\n v-if=\"palettesOpen\" title=\"Color Palette\" back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm :selected=\"palette\" @select=\"onPaletteSelect\" />\n </FormWrapper>\n </div>\n <div v-if=\"allowReordering\" class=\"aes-settings-hint\">\n Drag the rows to reorder\n </div>\n <div class=\"column-values-list\">\n <PlElementList\n v-model:items=\"listItems\"\n :get-item-key=\"(item) => item.value\"\n :item-class=\"$style.discreteRow\"\n :item-class-title=\"$style.discreteRowTitle\"\n :disableDragging=\"!allowReordering\"\n :disableRemoving=\"true\"\n :disableToggling=\"true\"\n :disablePinning=\"true\"\n >\n <template #item-title=\"{ item }\">\n <DiscreteRow\n :item=\"item\" :active-value=\"activeValue\" :active-aes-type=\"activeAesType\"\n :used-aes-in-mapping=\"props.usedAesInMapping\" :allow-hiding=\"allowHiding ?? false\"\n :allow-reordering=\"allowReordering ?? false\" :hidden=\"props.modelValue.hidden?.[item.value] ?? false\"\n :palette=\"palette\" :is-categorical=\"categorical\"\n :on-aes-value-update=\"(field: string, value: string | DotShape | LineType) => onAesValueUpdate(item.value, field, value)\"\n :on-switch-visibility=\"() => switchVisibility(item)\" :on-active-value-change=\"(v) => activeValue = v\"\n :on-active-aes-type-change=\"(v) => activeAesType = v\" :on-close-form=\"closeForm\"\n />\n </template>\n </PlElementList>\n </div>\n </div>\n</template>\n<style module>\n.discreteRow {\n background-color: var(--color-ic-00);\n border-color: var(--color-div-grey);\n}\n.discreteRow:hover {\n --head-background: var(--color-ic-00);\n}\n.discreteRowTitle {\n padding-top: 0;\n padding-bottom: 0;\n background-color: var(--color-ic-00);\n}\n.discreteRow:hover .discreteRowTitle {\n background-color: var(--color-ic-00);\n}\n</style>\n"],"names":["props","__props","emit","__emit","palettesOpen","ref","palette","categorical","computed","isCategorical","activeValue","activeValueIndex","activeAesType","optionsList","options","value","aes","_a","op","item","onPaletteSelect","createCategoricalMappingFromPalette","onAesValueUpdate","aesField","aesValue","closeForm","switchVisibility","option","getColorScale","colors","unknownColor","from","to","colorStep","scale","scaleLinear","_c","idx","v","continuousColorScale","PALETTE_MAP","UNKNOWN_COLOR","colorForPercent","continuousMappingItems","watch","updateContinuousColors","newColorIdx","setActiveElementFromColorSlider","listItems","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_hoisted_4","_createVNode","MultiselectButton","_unref","_cache","$event","_hoisted_5","PlColorSlider","_createBlock","FormWrapper","PalettesForm","_hoisted_6","_hoisted_7","PlElementList","$style","_withCtx","DiscreteRow","field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,UAAMA,IAAQC,GAURC,IAAOC,GAEPC,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAaL,EAAM,WAAW,OAAO,GAC/CO,IAAcC,EAAS,MAAMC,EAAcH,EAAQ,KAAK,CAAC,GAIzDI,IAAcL,EAAmB,IAAI,GACrCM,IAAmBH,EAAS,MAC5BE,EAAY,UAAU,OACjB,OAEFV,EAAM,WAAW,MAAM,QAAQU,EAAY,KAAK,CACxD,GACKE,IAAgBP,EAA4B,IAAI,GAEhDQ,IAAcL,EAAS;AAAA,MAC3B,KAAK,MAAM;AACT,cAAMM,IAAUd,EAAM,WAAW,MAAM,IAAI,CAACe,MAAkB;;AAC5D,gBAAM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AAU,kBAAgBC,EAAA;AAAA,gBACnC,uBAAmB,CAAGiE,GAAezD,MAAwCO,EAAiBH,EAAK,OAAOqD,GAAOzD,CAAK;AAAA,gBACtH,wBAAoB,MAAQW,EAAiBP,CAAI;AAAA,gBAAI,0BAAsB,CAAGmB,MAAM5B,EAAA,QAAc4B;AAAA,gBAClG,6BAAyB,CAAGA,MAAM1B,EAAA,QAAgB0B;AAAA,gBAAI,iBAAeb;AAAA,cAAA;;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._discreteRow_19vpm_2{background-color:var(--color-ic-00);border-color:var(--color-div-grey)}._discreteRow_19vpm_2:hover{--head-background: var(--color-ic-00)}._discreteRowTitle_19vpm_9{padding-top:0;padding-bottom:0;background-color:var(--color-ic-00)}._discreteRow_19vpm_2:hover ._discreteRowTitle_19vpm_9{background-color:var(--color-ic-00)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
const e = "_discreteRow_19vpm_2", t = "_discreteRowTitle_19vpm_9", s = {
|
|
3
|
+
discreteRow: e,
|
|
4
|
+
discreteRowTitle: t
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
s as default,
|
|
8
|
+
e as discreteRow,
|
|
9
|
+
t as discreteRowTitle
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=AesDataMappingDiscrete.vue3.js.map
|