@milaboratories/graph-maker 1.1.194 → 1.1.196
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.vue2.js +127 -130
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue2.js.map +1 -1
- package/dist/components/AesSettings/DiscreteRow.vue2.js +18 -18
- package/dist/components/AesSettings/DiscreteRow.vue2.js.map +1 -1
- package/dist/components/AesSettings/DiscreteRow.vue3.js +10 -8
- package/dist/components/AesSettings/DiscreteRow.vue3.js.map +1 -1
- package/dist/components/Chart.vue.js +118 -112
- package/dist/components/Chart.vue.js.map +1 -1
- package/dist/components/CollapsableBlock.vue.d.ts +1 -0
- package/dist/components/CollapsableBlock.vue.js +27 -21
- package/dist/components/CollapsableBlock.vue.js.map +1 -1
- package/dist/constantsCommon.d.ts +2 -0
- package/dist/constantsCommon.js +24 -16
- package/dist/constantsCommon.js.map +1 -1
- package/dist/forms/AxesSettingsForm/BubbleAxesSettingsForm.vue.js +156 -117
- package/dist/forms/AxesSettingsForm/BubbleAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +167 -138
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +175 -153
- package/dist/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/HistogramAxesSettingsForm.vue.js +177 -136
- package/dist/forms/AxesSettingsForm/HistogramAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js +243 -203
- package/dist/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/Bubble.vue.js +39 -43
- package/dist/forms/LayersForm/Layer/Bubble.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/Bar.vue.js +30 -34
- package/dist/forms/LayersForm/Layer/discrete/Bar.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/Errorbar.vue.js +24 -26
- package/dist/forms/LayersForm/Layer/discrete/Errorbar.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/Line.vue.js +27 -29
- package/dist/forms/LayersForm/Layer/discrete/Line.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/StackedArea.vue.js +38 -43
- package/dist/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/StackedBar.vue.js +31 -36
- package/dist/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +53 -57
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js +70 -74
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.vue.js +1 -1
- package/dist/store.d.ts +3 -4
- package/dist/store.js +25 -26
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +1 -1
- package/dist/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -2
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js +22 -22
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +7 -5
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +1 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +2 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js +12 -12
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +11 -11
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/getAxesDataFromForms.js +17 -17
- package/dist/utils/createChartSettingsForRender/getAxesDataFromForms.js.map +1 -1
- package/dist/utils/loadUniqueValuesToSave.d.ts +2 -3
- package/dist/utils/loadUniqueValuesToSave.js +2 -2
- package/dist/utils/loadUniqueValuesToSave.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { scaleLinear as
|
|
3
|
-
import { isCategorical as
|
|
4
|
-
import { createCategoricalMappingFromPalette as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { PlElementList as
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as j, ref as c, computed as p, watch as x, createElementBlock as _, openBlock as w, createElementVNode as v, createCommentVNode as k, createBlock as q, toDisplayString as z, createVNode as g, unref as I, withCtx as $ } from "vue";
|
|
2
|
+
import { scaleLinear as G } from "d3-scale";
|
|
3
|
+
import { isCategorical as J, PALETTE_MAP as y, UNKNOWN_COLOR as B } from "../../constantsAesthetic.js";
|
|
4
|
+
import { createCategoricalMappingFromPalette as Q } from "../../dataBindAes.js";
|
|
5
|
+
import X from "./FormWrapper.vue.js";
|
|
6
|
+
import Y from "./PalettesForm.vue.js";
|
|
7
|
+
import Z from "../MultiselectButton.vue.js";
|
|
8
|
+
import ee from "../PlColorSlider.vue.js";
|
|
9
|
+
import le from "./DiscreteRow.vue.js";
|
|
10
|
+
import { PlElementList as ae } from "@platforma-sdk/ui-vue";
|
|
11
|
+
const oe = { class: "aes-mapping-block" }, te = { style: { margin: "0 24px" } }, ne = { class: "section-title" }, ie = { style: { margin: "24px 0" } }, ue = {
|
|
12
12
|
key: 0,
|
|
13
13
|
style: { margin: "24px 0" }
|
|
14
|
-
},
|
|
14
|
+
}, se = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "aes-settings-hint"
|
|
17
|
-
},
|
|
17
|
+
}, re = { class: "column-values-list" }, ye = /* @__PURE__ */ j({
|
|
18
18
|
__name: "AesDataMappingDiscrete",
|
|
19
19
|
props: {
|
|
20
20
|
dataColumnLabel: {},
|
|
@@ -26,183 +26,180 @@ const ee = { class: "aes-mapping-block" }, le = { style: { margin: "0 24px" } },
|
|
|
26
26
|
allowNullOption: { type: Boolean }
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
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(
|
|
29
|
+
setup(s, { emit: D }) {
|
|
30
|
+
const l = s, m = D, f = c(!1), i = c(l.modelValue.palette), L = p(() => J(i.value)), r = c(null), E = p(() => r.value === null ? null : l.modelValue.order.indexOf(r.value)), V = c(null);
|
|
31
|
+
function M(e) {
|
|
32
|
+
i.value = e, f.value = !1, m(
|
|
54
33
|
"update:modelValue",
|
|
55
|
-
|
|
34
|
+
Q(e, l.modelValue.order)
|
|
56
35
|
);
|
|
57
36
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
...
|
|
37
|
+
function T(e, a, o) {
|
|
38
|
+
m("update:modelValue", {
|
|
39
|
+
...l.modelValue,
|
|
61
40
|
mapping: {
|
|
62
|
-
...
|
|
41
|
+
...l.modelValue.mapping,
|
|
63
42
|
[e]: {
|
|
64
|
-
...
|
|
43
|
+
...l.modelValue.mapping[e],
|
|
65
44
|
aes: {
|
|
66
|
-
...
|
|
67
|
-
[
|
|
45
|
+
...l.modelValue.mapping[e].aes,
|
|
46
|
+
[a]: o
|
|
68
47
|
}
|
|
69
48
|
}
|
|
70
49
|
}
|
|
71
50
|
});
|
|
72
51
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
52
|
+
function N() {
|
|
53
|
+
r.value = null, V.value = null;
|
|
75
54
|
}
|
|
76
|
-
function
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
...
|
|
55
|
+
function F(e) {
|
|
56
|
+
var a;
|
|
57
|
+
m("update:modelValue", {
|
|
58
|
+
...l.modelValue,
|
|
80
59
|
hidden: {
|
|
81
|
-
...
|
|
82
|
-
[e.value]: !((
|
|
60
|
+
...l.modelValue.hidden,
|
|
61
|
+
[e.value]: !((a = l.modelValue.hidden) != null && a[e.value])
|
|
83
62
|
}
|
|
84
63
|
});
|
|
85
64
|
}
|
|
86
|
-
function
|
|
87
|
-
const n = 1 / (e.length - 1),
|
|
88
|
-
return (
|
|
65
|
+
function O(e, a, o = 0, t = 1) {
|
|
66
|
+
const n = 1 / (e.length - 1), d = G().domain(e.map((u, h) => o + h * n * (t - o))).range(e);
|
|
67
|
+
return (u) => u > t || u < o ? a : d(u);
|
|
89
68
|
}
|
|
90
|
-
const
|
|
91
|
-
() =>
|
|
92
|
-
),
|
|
93
|
-
() =>
|
|
94
|
-
),
|
|
95
|
-
|
|
96
|
-
(e) =>
|
|
69
|
+
const U = p(
|
|
70
|
+
() => O(y[i.value].colors, B)
|
|
71
|
+
), H = p(
|
|
72
|
+
() => O(y[i.value].colors, B, 0, 100)
|
|
73
|
+
), C = c(
|
|
74
|
+
l.modelValue.order.map(
|
|
75
|
+
(e) => l.modelValue.mapping[e].colorIdx * 100
|
|
97
76
|
)
|
|
98
77
|
);
|
|
99
|
-
|
|
100
|
-
() =>
|
|
78
|
+
x(
|
|
79
|
+
() => l.modelValue,
|
|
101
80
|
(e) => {
|
|
102
|
-
|
|
103
|
-
(
|
|
81
|
+
C.value = e.order.map(
|
|
82
|
+
(a) => e.mapping[a].colorIdx * 100
|
|
104
83
|
);
|
|
105
84
|
}
|
|
106
85
|
);
|
|
107
|
-
function
|
|
108
|
-
e.forEach((
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
...
|
|
86
|
+
function K(e) {
|
|
87
|
+
e.forEach((a, o) => {
|
|
88
|
+
const t = l.modelValue.order[o], n = a / 100;
|
|
89
|
+
l.modelValue.mapping[t].colorIdx !== n && m("update:modelValue", {
|
|
90
|
+
...l.modelValue,
|
|
112
91
|
mapping: {
|
|
113
|
-
...
|
|
114
|
-
[
|
|
92
|
+
...l.modelValue.mapping,
|
|
93
|
+
[t]: {
|
|
115
94
|
colorIdx: n,
|
|
116
95
|
aes: {
|
|
117
|
-
...
|
|
118
|
-
color:
|
|
96
|
+
...l.modelValue.mapping[t].aes,
|
|
97
|
+
color: U.value(n)
|
|
119
98
|
}
|
|
120
99
|
}
|
|
121
100
|
}
|
|
122
101
|
});
|
|
123
102
|
});
|
|
124
103
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
104
|
+
function W(e) {
|
|
105
|
+
V.value = "color", r.value = e.status ? l.modelValue.order[e.index] : null;
|
|
106
|
+
}
|
|
107
|
+
function S(e, a) {
|
|
108
|
+
const o = e.order.map((t) => {
|
|
109
|
+
var n, d, u, h, P, R;
|
|
110
|
+
return {
|
|
111
|
+
text: l.columnValueLabels[t],
|
|
112
|
+
value: t,
|
|
113
|
+
dotShape: (d = (n = e.mapping[t]) == null ? void 0 : n.aes) == null ? void 0 : d.dotShape,
|
|
114
|
+
color: (h = (u = e.mapping[t]) == null ? void 0 : u.aes) == null ? void 0 : h.color,
|
|
115
|
+
lineType: (R = (P = e.mapping[t]) == null ? void 0 : P.aes) == null ? void 0 : R.lineShape
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
return a ? o : o.filter((t) => t.value !== "null");
|
|
127
119
|
}
|
|
128
|
-
const
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
}, { deep: !0 }), (
|
|
132
|
-
m("
|
|
133
|
-
|
|
134
|
-
|
|
120
|
+
const A = c(S(l.modelValue, l.allowNullOption)), b = p(() => A.value);
|
|
121
|
+
return x([() => i.value, () => l.allowNullOption], () => {
|
|
122
|
+
A.value = S(l.modelValue, l.allowNullOption);
|
|
123
|
+
}, { deep: !0 }), x(() => b.value, (e) => {
|
|
124
|
+
m("update:modelValue", {
|
|
125
|
+
...l.modelValue,
|
|
126
|
+
order: e.map((a) => a.value)
|
|
127
|
+
});
|
|
128
|
+
}, { deep: !0 }), (e, a) => (w(), _("div", oe, [
|
|
129
|
+
v("div", te, [
|
|
130
|
+
v("div", ne, [
|
|
131
|
+
v("span", null, z(s.dataColumnLabel), 1)
|
|
135
132
|
]),
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
v("div", ie, [
|
|
134
|
+
g(Z, {
|
|
138
135
|
label: "Color Palette ",
|
|
139
136
|
icon: "chevron-right",
|
|
140
|
-
title:
|
|
137
|
+
title: I(y)[i.value].title,
|
|
141
138
|
palette: i.value,
|
|
142
|
-
onButtonClick:
|
|
143
|
-
|
|
139
|
+
onButtonClick: a[0] || (a[0] = (o) => {
|
|
140
|
+
f.value = !0, N();
|
|
144
141
|
})
|
|
145
142
|
}, null, 8, ["title", "palette"])
|
|
146
143
|
]),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
modelValue:
|
|
144
|
+
L.value ? k("", !0) : (w(), _("div", ue, [
|
|
145
|
+
g(ee, {
|
|
146
|
+
modelValue: C.value,
|
|
150
147
|
"onUpdate:modelValue": [
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
a[1] || (a[1] = (o) => C.value = o),
|
|
149
|
+
K
|
|
153
150
|
],
|
|
154
|
-
colors:
|
|
155
|
-
"get-color-for-percent":
|
|
156
|
-
active:
|
|
157
|
-
onActive:
|
|
151
|
+
colors: I(y)[i.value].colors,
|
|
152
|
+
"get-color-for-percent": H.value,
|
|
153
|
+
active: E.value,
|
|
154
|
+
onActive: W
|
|
158
155
|
}, null, 8, ["modelValue", "colors", "get-color-for-percent", "active"])
|
|
159
156
|
])),
|
|
160
|
-
|
|
157
|
+
f.value ? (w(), q(X, {
|
|
161
158
|
key: 1,
|
|
162
159
|
title: "Color Palette",
|
|
163
160
|
"back-title": "Color mapping",
|
|
164
|
-
"onForm:close":
|
|
161
|
+
"onForm:close": a[2] || (a[2] = (o) => f.value = !1)
|
|
165
162
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
|
|
163
|
+
default: $(() => [
|
|
164
|
+
g(Y, {
|
|
168
165
|
selected: i.value,
|
|
169
|
-
onSelect:
|
|
166
|
+
onSelect: M
|
|
170
167
|
}, null, 8, ["selected"])
|
|
171
168
|
]),
|
|
172
169
|
_: 1
|
|
173
|
-
})) :
|
|
170
|
+
})) : k("", !0)
|
|
174
171
|
]),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
items:
|
|
179
|
-
"onUpdate:items":
|
|
180
|
-
"get-item-key": (
|
|
172
|
+
s.allowReordering ? (w(), _("div", se, " Drag the rows to reorder ")) : k("", !0),
|
|
173
|
+
v("div", re, [
|
|
174
|
+
g(I(ae), {
|
|
175
|
+
items: b.value,
|
|
176
|
+
"onUpdate:items": a[3] || (a[3] = (o) => b.value = o),
|
|
177
|
+
"get-item-key": (o) => o.value,
|
|
181
178
|
"item-class": e.$style.discreteRow,
|
|
182
179
|
"item-class-title": e.$style.discreteRowTitle,
|
|
183
|
-
disableDragging: !
|
|
180
|
+
disableDragging: !s.allowReordering,
|
|
184
181
|
disableRemoving: !0,
|
|
185
182
|
disableToggling: !0,
|
|
186
183
|
disablePinning: !0
|
|
187
184
|
}, {
|
|
188
|
-
"item-title":
|
|
189
|
-
var
|
|
185
|
+
"item-title": $(({ item: o }) => {
|
|
186
|
+
var t;
|
|
190
187
|
return [
|
|
191
|
-
|
|
192
|
-
item:
|
|
193
|
-
"active-value":
|
|
194
|
-
"active-aes-type":
|
|
195
|
-
"used-aes-in-mapping":
|
|
196
|
-
"allow-hiding":
|
|
197
|
-
"allow-reordering":
|
|
198
|
-
hidden: ((
|
|
188
|
+
g(le, {
|
|
189
|
+
item: o,
|
|
190
|
+
"active-value": r.value,
|
|
191
|
+
"active-aes-type": V.value,
|
|
192
|
+
"used-aes-in-mapping": l.usedAesInMapping,
|
|
193
|
+
"allow-hiding": s.allowHiding ?? !1,
|
|
194
|
+
"allow-reordering": s.allowReordering ?? !1,
|
|
195
|
+
hidden: ((t = l.modelValue.hidden) == null ? void 0 : t[o.value]) ?? !1,
|
|
199
196
|
palette: i.value,
|
|
200
|
-
"is-categorical":
|
|
201
|
-
"on-aes-value-update": (n,
|
|
202
|
-
"on-switch-visibility": () =>
|
|
203
|
-
"on-active-value-change": (n) =>
|
|
204
|
-
"on-active-aes-type-change": (n) =>
|
|
205
|
-
"on-close-form":
|
|
197
|
+
"is-categorical": L.value,
|
|
198
|
+
"on-aes-value-update": (n, d) => T(o.value, n, d),
|
|
199
|
+
"on-switch-visibility": () => F(o),
|
|
200
|
+
"on-active-value-change": (n) => r.value = n,
|
|
201
|
+
"on-active-aes-type-change": (n) => V.value = n,
|
|
202
|
+
"on-close-form": N
|
|
206
203
|
}, 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
204
|
];
|
|
208
205
|
}),
|
|
@@ -213,6 +210,6 @@ const ee = { class: "aes-mapping-block" }, le = { style: { margin: "0 24px" } },
|
|
|
213
210
|
}
|
|
214
211
|
});
|
|
215
212
|
export {
|
|
216
|
-
|
|
213
|
+
ye as default
|
|
217
214
|
};
|
|
218
215
|
//# sourceMappingURL=AesDataMappingDiscrete.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
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","Palettes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EAAAA,OAAO;AAAA,UACnB,oBAAkBA,EAAAA,OAAO;AAAA,UACzB,kBAAkBpE,EAAA;AAAA,UAClB,iBAAiB;AAAA,UACjB,iBAAiB;AAAA,UACjB,gBAAgB;AAAA,QAAA;UAEN,cAAUqE,EACnB,CAQE,EATqB,MAAAnD,QAAI;;AAAA;AAAA,cAC3BqC,EAQEe,GAAA;AAAA,gBAPC,MAAApD;AAAA,gBAAa,gBAAcT,EAAA;AAAA,gBAAc,mBAAiBE,EAAA;AAAA,gBAC1D,uBAAqBZ,EAAM;AAAA,gBAAmB,gBAAcC,EAAA,eAAW;AAAA,gBACvE,oBAAkBA,EAAA,mBAAe;AAAA,gBAAY,UAAQgB,IAAAjB,EAAM,WAAW,WAAjB,gBAAAiB,EAA0BE,EAAK,WAAK;AAAA,gBACzF,SAASb,EAAA;AAAA,gBAAU,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;;;;;;;;;"}
|
|
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\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\nfunction getOptionsList(data: AestheticMappingCategorical, allowNullOption: boolean) {\n const options = data.order.map((value: string) => {\n return {\n text: props.columnValueLabels[value],\n value,\n dotShape: data.mapping[value]?.aes?.dotShape,\n color: data.mapping[value]?.aes?.color,\n lineType: data.mapping[value]?.aes?.lineShape,\n };\n });\n return allowNullOption ? options : options.filter((op) => op.value !== 'null');\n}\n\nconst optionsList = ref(getOptionsList(props.modelValue, props.allowNullOption));\nconst reordarableItems = computed(() => optionsList.value);\n\nwatch([() => palette.value, () => props.allowNullOption], () => {\n optionsList.value = getOptionsList(props.modelValue, props.allowNullOption);\n}, { deep: true });\nwatch(() => reordarableItems.value, (v) => {\n emit('update:modelValue', {\n ...props.modelValue,\n order: v.map((item) => item.value),\n });\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=\"reordarableItems\"\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\"\n :active-value=\"activeValue\"\n :active-aes-type=\"activeAesType\"\n :used-aes-in-mapping=\"props.usedAesInMapping\"\n :allow-hiding=\"allowHiding ?? false\"\n :allow-reordering=\"allowReordering ?? false\"\n :hidden=\"props.modelValue.hidden?.[item.value] ?? false\"\n :palette=\"palette\"\n :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","onPaletteSelect","value","createCategoricalMappingFromPalette","onAesValueUpdate","aesField","aesValue","closeForm","switchVisibility","option","_a","getColorScale","colors","unknownColor","from","to","colorStep","scale","scaleLinear","_c","idx","v","continuousColorScale","PALETTE_MAP","UNKNOWN_COLOR","colorForPercent","continuousMappingItems","item","watch","updateContinuousColors","newColorIdx","setActiveElementFromColorSlider","getOptionsList","data","allowNullOption","options","_b","_d","_f","_e","op","optionsList","reordarableItems","_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;AAEtD,aAASQ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AaE,EAdqB,MAAArC,QAAI;;AAAA;AAAA,cAC3BuB,EAaEe,IAAA;AAAA,gBAZC,MAAAtC;AAAA,gBACA,gBAAc7B,EAAA;AAAA,gBACd,mBAAiBE,EAAA;AAAA,gBACjB,uBAAqBZ,EAAM;AAAA,gBAC3B,gBAAcC,EAAA,eAAW;AAAA,gBACzB,oBAAkBA,EAAA,mBAAe;AAAA,gBACjC,UAAQqB,IAAAtB,EAAM,WAAW,WAAjB,gBAAAsB,EAA0BiB,EAAK,WAAK;AAAA,gBAC5C,SAASjC,EAAA;AAAA,gBACT,kBAAgBC,EAAA;AAAA,gBAChB,uBAAmB,CAAGuE,GAAehE,MAAwCE,EAAiBuB,EAAK,OAAOuC,GAAOhE,CAAK;AAAA,gBACtH,wBAAoB,MAAQM,EAAiBmB,CAAI;AAAA,gBAAI,0BAAsB,CAAGN,MAAMvB,EAAA,QAAcuB;AAAA,gBAClG,6BAAyB,CAAGA,MAAMrB,EAAA,QAAgBqB;AAAA,gBAAI,iBAAed;AAAA,cAAA;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as $, computed as T, reactive as S, createElementBlock as m, openBlock as o, normalizeClass as a, createElementVNode as s, toDisplayString as k, createBlock as d, createCommentVNode as u, unref as
|
|
2
|
-
import { PALETTE_MAP as
|
|
1
|
+
import { defineComponent as $, computed as T, reactive as S, createElementBlock as m, openBlock as o, normalizeClass as a, createElementVNode as s, toDisplayString as k, createBlock as d, createCommentVNode as u, unref as g, withCtx as r, withModifiers as y, createVNode as C, normalizeStyle as h } from "vue";
|
|
2
|
+
import { PALETTE_MAP as w, FIXED_LINE_TYPES as p, FIXES_DOT_SHAPES as F } from "../../constantsAesthetic.js";
|
|
3
3
|
import { getPopupHeightForFixedAesList as E } from "../../utils/getPopupHeightForFixedAesList.js";
|
|
4
4
|
import { PlTooltip as I, PlIcon24 as P } from "@platforma-sdk/ui-vue";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import R from "../Popup.vue.js";
|
|
6
|
+
import B from "./FixedLineTypeList.vue.js";
|
|
7
|
+
import M from "./FixedDotShapeList.vue.js";
|
|
8
|
+
import U from "./FixedColorsList.vue.js";
|
|
9
9
|
const G = /* @__PURE__ */ $({
|
|
10
10
|
__name: "DiscreteRow",
|
|
11
11
|
props: {
|
|
@@ -31,9 +31,9 @@ const G = /* @__PURE__ */ $({
|
|
|
31
31
|
n.onActiveValueChange(l ? null : i.value), n.onActiveAesTypeChange(l ? null : t);
|
|
32
32
|
}
|
|
33
33
|
const A = T(
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
36
|
-
n.activeAesType === "lineType" ?
|
|
34
|
+
() => w[n.palette].colors.map((i) => ({ color: i, name: i }))
|
|
35
|
+
), V = T(() => n.activeAesType ? E(
|
|
36
|
+
n.activeAesType === "lineType" ? p.length : n.activeAesType === "dotShape" ? F.length : A.value.length,
|
|
37
37
|
n.activeAesType
|
|
38
38
|
) : 0), f = S({
|
|
39
39
|
color: {},
|
|
@@ -44,7 +44,7 @@ const G = /* @__PURE__ */ $({
|
|
|
44
44
|
l && (f[i][t.value] = l);
|
|
45
45
|
}
|
|
46
46
|
return (i, t) => (o(), m("div", {
|
|
47
|
-
class: a(i.$style.columnValue)
|
|
47
|
+
class: a([i.$style.columnValue, { [i.$style.withReorering]: e.allowReordering }])
|
|
48
48
|
}, [
|
|
49
49
|
s("div", {
|
|
50
50
|
class: a(i.$style.title)
|
|
@@ -52,7 +52,7 @@ const G = /* @__PURE__ */ $({
|
|
|
52
52
|
s("div", {
|
|
53
53
|
class: a(i.$style.aesGroup)
|
|
54
54
|
}, [
|
|
55
|
-
e.allowHiding ? (o(), d(
|
|
55
|
+
e.allowHiding ? (o(), d(g(I), {
|
|
56
56
|
key: 0,
|
|
57
57
|
"open-delay": 100,
|
|
58
58
|
"close-delay": 100
|
|
@@ -66,7 +66,7 @@ const G = /* @__PURE__ */ $({
|
|
|
66
66
|
class: a(i.$style.aes),
|
|
67
67
|
onClick: t[0] || (t[0] = y((l) => e.onSwitchVisibility(), ["stop"]))
|
|
68
68
|
}, [
|
|
69
|
-
C(
|
|
69
|
+
C(g(P), {
|
|
70
70
|
name: e.hidden ? "view-hide" : "view-show"
|
|
71
71
|
}, null, 8, ["name"])
|
|
72
72
|
], 2)
|
|
@@ -107,20 +107,20 @@ const G = /* @__PURE__ */ $({
|
|
|
107
107
|
}, [
|
|
108
108
|
s("div", {
|
|
109
109
|
class: a(i.$style.color),
|
|
110
|
-
style:
|
|
110
|
+
style: h({ background: e.item.color })
|
|
111
111
|
}, null, 6)
|
|
112
112
|
], 2)) : u("", !0),
|
|
113
|
-
(e.activeAesType !== "color" || e.isCategorical) && e.activeAesType !== null && e.activeValue === e.item.value ? (o(), d(
|
|
113
|
+
(e.activeAesType !== "color" || e.isCategorical) && e.activeAesType !== null && e.activeValue === e.item.value ? (o(), d(R, {
|
|
114
114
|
key: `${e.activeAesType}_${e.activeValue}`,
|
|
115
115
|
targetRef: f[e.activeAesType][e.activeValue],
|
|
116
|
-
height:
|
|
116
|
+
height: V.value,
|
|
117
117
|
"onPopup:close": e.onCloseForm
|
|
118
118
|
}, {
|
|
119
119
|
default: r(() => [
|
|
120
120
|
s("div", {
|
|
121
121
|
class: a(["fixed-aes-list", { "fixed-aes-list__rows": !1 }])
|
|
122
122
|
}, [
|
|
123
|
-
e.activeAesType === "lineType" ? (o(), d(
|
|
123
|
+
e.activeAesType === "lineType" ? (o(), d(B, {
|
|
124
124
|
key: 0,
|
|
125
125
|
modelValue: e.item.lineType,
|
|
126
126
|
"onUpdate:modelValue": [
|
|
@@ -128,7 +128,7 @@ const G = /* @__PURE__ */ $({
|
|
|
128
128
|
t[5] || (t[5] = (l) => n.onAesValueUpdate("lineShape", l))
|
|
129
129
|
]
|
|
130
130
|
}, null, 8, ["modelValue"])) : u("", !0),
|
|
131
|
-
e.activeAesType === "dotShape" ? (o(), d(
|
|
131
|
+
e.activeAesType === "dotShape" ? (o(), d(M, {
|
|
132
132
|
key: 1,
|
|
133
133
|
modelValue: e.item.dotShape,
|
|
134
134
|
"onUpdate:modelValue": [
|
|
@@ -136,7 +136,7 @@ const G = /* @__PURE__ */ $({
|
|
|
136
136
|
t[7] || (t[7] = (l) => n.onAesValueUpdate("dotShape", l))
|
|
137
137
|
]
|
|
138
138
|
}, null, 8, ["modelValue"])) : u("", !0),
|
|
139
|
-
e.activeAesType === "color" ? (o(), d(
|
|
139
|
+
e.activeAesType === "color" ? (o(), d(U, {
|
|
140
140
|
key: 2,
|
|
141
141
|
modelValue: e.item.color,
|
|
142
142
|
"onUpdate:modelValue": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscreteRow.vue2.js","sources":["../../../src/components/AesSettings/DiscreteRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type ComponentPublicInstance, computed, reactive } from 'vue';\nimport { FIXED_LINE_TYPES, FIXES_DOT_SHAPES, PALETTE_MAP } from '../../constantsAesthetic';\nimport { getPopupHeightForFixedAesList } from '../../utils/getPopupHeightForFixedAesList';\nimport type { Palette, DotShape, LineType } from './types';\nimport type { AesType } from '../../constantsCommon';\nimport { PlIcon24, PlTooltip } from '@platforma-sdk/ui-vue';\nimport Popup from '../Popup.vue';\nimport FixedLineTypeList from './FixedLineTypeList.vue';\nimport FixedDotShapeList from './FixedDotShapeList.vue';\nimport FixedColorsList from './FixedColorsList.vue';\n\ntype EditableAesType = 'color' | 'dotShape' | 'lineType';\n\nconst props = defineProps<{\n item: {\n text: string;\n value: string;\n dotShape?: DotShape;\n color?: string;\n lineType?: LineType;\n };\n activeValue: string | null;\n activeAesType: EditableAesType | null;\n usedAesInMapping: Record<AesType, boolean>;\n palette: Palette;\n allowReordering: boolean;\n allowHiding: boolean;\n hidden: boolean;\n isCategorical: boolean;\n onAesValueUpdate: (field: string, value: string | DotShape | LineType) => void;\n onSwitchVisibility: () => void;\n onActiveValueChange: (value: string | null) => void;\n onActiveAesTypeChange: (value: EditableAesType | null) => void;\n onCloseForm: () => void;\n}>();\n\nfunction toggleForm(\n item: typeof props.item,\n valueType: EditableAesType,\n) {\n const isThisFormOpen = props.activeValue === item.value && props.activeAesType === valueType;\n props.onActiveValueChange(isThisFormOpen ? null : item.value);\n props.onActiveAesTypeChange(isThisFormOpen ? null : valueType);\n}\n\nconst selectedColorsList = computed(() =>\n PALETTE_MAP[props.palette].colors.map((color: string) => ({ color, name: color })),\n);\nconst popupHeight = computed(() => {\n if (!props.activeAesType) {\n return 0;\n }\n return getPopupHeightForFixedAesList(\n props.activeAesType === 'lineType' ? FIXED_LINE_TYPES.length : props.activeAesType === 'dotShape' ? FIXES_DOT_SHAPES.length : selectedColorsList.value.length,\n props.activeAesType,\n );\n});\n\nconst itemRefs = reactive<\n Record<EditableAesType, Record<string, ComponentPublicInstance | Element>>\n>({\n color: {},\n dotShape: {},\n lineType: {},\n});\nfunction setRef(\n type: EditableAesType,\n item: typeof props.item,\n el: ComponentPublicInstance | null | Element,\n) {\n if (el) {\n itemRefs[type][item.value] = el;\n }\n}\n</script>\n<template>\n <div :class=\"$style.columnValue\">\n <div :class=\"$style.title\">{{ item.text }}</div>\n <div :class=\"$style.aesGroup\">\n <PlTooltip v-if=\"allowHiding\" :open-delay=\"100\" :close-delay=\"100\">\n <div :style=\"{ cursor: 'pointer' }\" :class=\"$style.aes\" @click.stop=\"onSwitchVisibility()\">\n <PlIcon24 :name=\"hidden ? '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\" :ref=\"(v) => setRef('lineType', item, v)\" :class=\"[$style.aes, {\n [$style.selected]:\n activeValue === item.value &&\n activeAesType === 'lineType'\n }]\" @click.stop=\"toggleForm(item, 'lineType')\"\n >\n <div class=\"icon__line line\" :class=\"{ [`line__${item.lineType}`]: true }\" />\n </div>\n <div\n v-if=\"usedAesInMapping.dotShape\" :ref=\"(v) => setRef('dotShape', item, v)\" :class=\"[$style.aes, {\n [$style.selected]: activeValue === item.value && activeAesType === 'dotShape'\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\" :ref=\"(v) => setRef('color', item, v)\"\n :class=\"[$style.aes, {\n [$style.selected]: activeValue === item.value && activeAesType === 'color'\n }]\" @click.stop=\"toggleForm(item, 'color')\"\n >\n <div :class=\"$style.color\" :style=\"{ background: item.color }\" />\n </div>\n <Popup\n v-if=\"\n (activeAesType !== 'color' || isCategorical) &&\n activeAesType !== null &&\n activeValue === item.value\n \" :key=\"`${activeAesType}_${activeValue}`\" :targetRef=\"itemRefs[activeAesType][activeValue] as HTMLElement\"\n :height=\"popupHeight\" @popup:close=\"onCloseForm\"\n >\n <div class=\"fixed-aes-list\" :class=\"{ 'fixed-aes-list__rows': false }\">\n <FixedLineTypeList\n v-if=\"activeAesType === 'lineType'\" v-model=\"item.lineType as LineType\" @update:modelValue=\"\n (v: LineType) => props.onAesValueUpdate('lineShape', v)\n \"\n />\n <FixedDotShapeList\n v-if=\"activeAesType === 'dotShape'\" v-model=\"item.dotShape as DotShape\" @update:modelValue=\"\n (v: DotShape) => props.onAesValueUpdate('dotShape', v)\n \"\n />\n <FixedColorsList\n v-if=\"activeAesType === 'color'\" v-model=\"item.color as string\"\n :colors-list=\"selectedColorsList\" @update:modelValue=\"\n (v: string) => props.onAesValueUpdate('color', v)\n \"\n />\n </div>\n </Popup>\n </div>\n </div>\n</template>\n\n<style module>\n.columnValue {\n display: flex;\n align-items: center;\n padding-left: 12px;\n padding-right: 2px;\n margin-bottom: 6px;\n background-color: var(--color-ic-00);\n width: 100%;\n}\n\n.columnValue:last-child {\n margin-bottom: 0;\n}\n\n.title {\n overflow: hidden;\n text-overflow: ellipsis;\n margin-right: 8px;\n line-height: 24px;\n}\n\n.color {\n width: 18px;\n height: 18px;\n border-radius: 3px;\n}\n\n.aesGroup {\n margin-left: auto;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n}\n\n.aes {\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n background: var(--color-ic-00);\n border-radius: var(--border-radius-control);\n}\n\n.aes.selected {\n border: var(--contour-border-width) solid var(--contour-color);\n box-shadow: var(--contour-box-shadow);\n z-index: 1;\n}\n</style>\n"],"names":["props","__props","toggleForm","item","valueType","isThisFormOpen","selectedColorsList","computed","PALETTE_MAP","color","popupHeight","getPopupHeightForFixedAesList","FIXED_LINE_TYPES","FIXES_DOT_SHAPES","itemRefs","reactive","setRef","type","el","_createElementBlock","_normalizeClass","$style","_createElementVNode","_toDisplayString","_createBlock","_unref","PlTooltip","_cache","_createVNode","PlIcon24","v","_withModifiers","$event","_normalizeStyle","Popup","FixedLineTypeList","FixedDotShapeList","FixedColorsList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,UAAMA,IAAQC;AAuBd,aAASC,EACPC,GACAC,GACA;AACA,YAAMC,IAAiBL,EAAM,gBAAgBG,EAAK,SAASH,EAAM,kBAAkBI;AACnF,MAAAJ,EAAM,oBAAoBK,IAAiB,OAAOF,EAAK,KAAK,GAC5DH,EAAM,sBAAsBK,IAAiB,OAAOD,CAAS;AAAA,IAC/D;AAEA,UAAME,IAAqBC;AAAA,MAAS,MAClCC,EAAYR,EAAM,OAAO,EAAE,OAAO,IAAI,CAACS,OAAmB,EAAE,OAAAA,GAAO,MAAMA,IAAQ;AAAA,IAAA,GAE7EC,IAAcH,EAAS,MACtBP,EAAM,gBAGJW;AAAA,MACLX,EAAM,kBAAkB,aAAaY,EAAiB,SAASZ,EAAM,kBAAkB,aAAaa,EAAiB,SAASP,EAAmB,MAAM;AAAA,MACvJN,EAAM;AAAA,IAAA,IAJC,CAMV,GAEKc,IAAWC,EAEf;AAAA,MACA,OAAO,CAAA;AAAA,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B;AAAA,kCACkB,CAAAF,MAAc9B,EAAM,0BAA0B8B,CAAC;AAAA,gBAAA;AAAA,gBAApH,eAAaxB,EAAA;AAAA,cAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DiscreteRow.vue2.js","sources":["../../../src/components/AesSettings/DiscreteRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type ComponentPublicInstance, computed, reactive } from 'vue';\nimport { FIXED_LINE_TYPES, FIXES_DOT_SHAPES, PALETTE_MAP } from '../../constantsAesthetic';\nimport { getPopupHeightForFixedAesList } from '../../utils/getPopupHeightForFixedAesList';\nimport type { Palette, DotShape, LineType } from './types';\nimport type { AesType } from '../../constantsCommon';\nimport { PlIcon24, PlTooltip } from '@platforma-sdk/ui-vue';\nimport Popup from '../Popup.vue';\nimport FixedLineTypeList from './FixedLineTypeList.vue';\nimport FixedDotShapeList from './FixedDotShapeList.vue';\nimport FixedColorsList from './FixedColorsList.vue';\n\ntype EditableAesType = 'color' | 'dotShape' | 'lineType';\n\nconst props = defineProps<{\n item: {\n text: string;\n value: string;\n dotShape?: DotShape;\n color?: string;\n lineType?: LineType;\n };\n activeValue: string | null;\n activeAesType: EditableAesType | null;\n usedAesInMapping: Record<AesType, boolean>;\n palette: Palette;\n allowReordering: boolean;\n allowHiding: boolean;\n hidden: boolean;\n isCategorical: boolean;\n onAesValueUpdate: (field: string, value: string | DotShape | LineType) => void;\n onSwitchVisibility: () => void;\n onActiveValueChange: (value: string | null) => void;\n onActiveAesTypeChange: (value: EditableAesType | null) => void;\n onCloseForm: () => void;\n}>();\n\nfunction toggleForm(\n item: typeof props.item,\n valueType: EditableAesType,\n) {\n const isThisFormOpen = props.activeValue === item.value && props.activeAesType === valueType;\n props.onActiveValueChange(isThisFormOpen ? null : item.value);\n props.onActiveAesTypeChange(isThisFormOpen ? null : valueType);\n}\n\nconst selectedColorsList = computed(() =>\n PALETTE_MAP[props.palette].colors.map((color: string) => ({ color, name: color })),\n);\nconst popupHeight = computed(() => {\n if (!props.activeAesType) {\n return 0;\n }\n return getPopupHeightForFixedAesList(\n props.activeAesType === 'lineType' ? FIXED_LINE_TYPES.length : props.activeAesType === 'dotShape' ? FIXES_DOT_SHAPES.length : selectedColorsList.value.length,\n props.activeAesType,\n );\n});\n\nconst itemRefs = reactive<\n Record<EditableAesType, Record<string, ComponentPublicInstance | Element>>\n>({\n color: {},\n dotShape: {},\n lineType: {},\n});\nfunction setRef(\n type: EditableAesType,\n item: typeof props.item,\n el: ComponentPublicInstance | null | Element,\n) {\n if (el) {\n itemRefs[type][item.value] = el;\n }\n}\n</script>\n<template>\n <div :class=\"[$style.columnValue, { [$style.withReorering]: allowReordering }]\">\n <div :class=\"$style.title\">{{ item.text }}</div>\n <div :class=\"$style.aesGroup\">\n <PlTooltip v-if=\"allowHiding\" :open-delay=\"100\" :close-delay=\"100\">\n <div :style=\"{ cursor: 'pointer' }\" :class=\"$style.aes\" @click.stop=\"onSwitchVisibility()\">\n <PlIcon24 :name=\"hidden ? '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\" :ref=\"(v) => setRef('lineType', item, v)\" :class=\"[$style.aes, {\n [$style.selected]:\n activeValue === item.value &&\n activeAesType === 'lineType'\n }]\" @click.stop=\"toggleForm(item, 'lineType')\"\n >\n <div class=\"icon__line line\" :class=\"{ [`line__${item.lineType}`]: true }\" />\n </div>\n <div\n v-if=\"usedAesInMapping.dotShape\" :ref=\"(v) => setRef('dotShape', item, v)\" :class=\"[$style.aes, {\n [$style.selected]: activeValue === item.value && activeAesType === 'dotShape'\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\" :ref=\"(v) => setRef('color', item, v)\"\n :class=\"[$style.aes, {\n [$style.selected]: activeValue === item.value && activeAesType === 'color'\n }]\" @click.stop=\"toggleForm(item, 'color')\"\n >\n <div :class=\"$style.color\" :style=\"{ background: item.color }\" />\n </div>\n <Popup\n v-if=\"\n (activeAesType !== 'color' || isCategorical) &&\n activeAesType !== null &&\n activeValue === item.value\n \" :key=\"`${activeAesType}_${activeValue}`\" :targetRef=\"itemRefs[activeAesType][activeValue] as HTMLElement\"\n :height=\"popupHeight\" @popup:close=\"onCloseForm\"\n >\n <div class=\"fixed-aes-list\" :class=\"{ 'fixed-aes-list__rows': false }\">\n <FixedLineTypeList\n v-if=\"activeAesType === 'lineType'\" v-model=\"item.lineType as LineType\" @update:modelValue=\"\n (v: LineType) => props.onAesValueUpdate('lineShape', v)\n \"\n />\n <FixedDotShapeList\n v-if=\"activeAesType === 'dotShape'\" v-model=\"item.dotShape as DotShape\" @update:modelValue=\"\n (v: DotShape) => props.onAesValueUpdate('dotShape', v)\n \"\n />\n <FixedColorsList\n v-if=\"activeAesType === 'color'\" v-model=\"item.color as string\"\n :colors-list=\"selectedColorsList\" @update:modelValue=\"\n (v: string) => props.onAesValueUpdate('color', v)\n \"\n />\n </div>\n </Popup>\n </div>\n </div>\n</template>\n\n<style module>\n.columnValue {\n display: flex;\n align-items: center;\n padding-left: 12px;\n padding-right: 2px;\n margin-bottom: 6px;\n background-color: var(--color-ic-00);\n width: 100%;\n}\n\n.columnValue.withReorering {\n padding-left: 4px;\n}\n\n.columnValue:last-child {\n margin-bottom: 0;\n}\n\n.title {\n overflow: hidden;\n text-overflow: ellipsis;\n margin-right: 8px;\n line-height: 24px;\n}\n\n.color {\n width: 18px;\n height: 18px;\n border-radius: 3px;\n}\n\n.aesGroup {\n margin-left: auto;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n}\n\n.aes {\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n background: var(--color-ic-00);\n border-radius: var(--border-radius-control);\n}\n\n.aes.selected {\n border: var(--contour-border-width) solid var(--contour-color);\n box-shadow: var(--contour-box-shadow);\n z-index: 1;\n}\n</style>\n"],"names":["props","__props","toggleForm","item","valueType","isThisFormOpen","selectedColorsList","computed","PALETTE_MAP","color","popupHeight","getPopupHeightForFixedAesList","FIXED_LINE_TYPES","FIXES_DOT_SHAPES","itemRefs","reactive","setRef","type","el","_createElementBlock","_normalizeClass","$style","_createElementVNode","_toDisplayString","_createBlock","_unref","PlTooltip","_cache","_createVNode","PlIcon24","v","_withModifiers","$event","_normalizeStyle","Popup","FixedLineTypeList","FixedDotShapeList","FixedColorsList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,UAAMA,IAAQC;AAuBd,aAASC,EACPC,GACAC,GACA;AACA,YAAMC,IAAiBL,EAAM,gBAAgBG,EAAK,SAASH,EAAM,kBAAkBI;AACnF,MAAAJ,EAAM,oBAAoBK,IAAiB,OAAOF,EAAK,KAAK,GAC5DH,EAAM,sBAAsBK,IAAiB,OAAOD,CAAS;AAAA,IAC/D;AAEA,UAAME,IAAqBC;AAAA,MAAS,MAClCC,EAAYR,EAAM,OAAO,EAAE,OAAO,IAAI,CAACS,OAAmB,EAAE,OAAAA,GAAO,MAAMA,IAAQ;AAAA,IAAA,GAE7EC,IAAcH,EAAS,MACtBP,EAAM,gBAGJW;AAAA,MACLX,EAAM,kBAAkB,aAAaY,EAAiB,SAASZ,EAAM,kBAAkB,aAAaa,EAAiB,SAASP,EAAmB,MAAM;AAAA,MACvJN,EAAM;AAAA,IAAA,IAJC,CAMV,GAEKc,IAAWC,EAEf;AAAA,MACA,OAAO,CAAA;AAAA,MACP,UAAU,CAAA;AAAA,MACV,UAAU,CAAA;AAAA,IAAC,CACZ;AACD,aAASC,EACPC,GACAd,GACAe,GACA;AACA,MAAIA,MACFJ,EAASG,CAAI,EAAEd,EAAK,KAAK,IAAIe;AAAA,IAEjC;2BAGEC,EA+DM,OAAA;AAAA,MA/DA,OAAKC,EAAA,CAAGC,SAAO,gBAAgBA,EAAAA,OAAO,aAAa,GA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.appendChild(document.createTextNode(".
|
|
2
|
-
const e = "
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._columnValue_1cp0f_2{display:flex;align-items:center;padding-left:12px;padding-right:2px;margin-bottom:6px;background-color:var(--color-ic-00);width:100%}._columnValue_1cp0f_2._withReorering_1cp0f_12{padding-left:4px}._columnValue_1cp0f_2:last-child{margin-bottom:0}._title_1cp0f_20{overflow:hidden;text-overflow:ellipsis;margin-right:8px;line-height:24px}._color_1cp0f_27{width:18px;height:18px;border-radius:3px}._aesGroup_1cp0f_33{margin-left:auto;flex-shrink:0;display:flex;align-items:center}._aes_1cp0f_33{width:40px;height:40px;display:flex;justify-content:center;align-items:center;cursor:pointer;background:var(--color-ic-00);border-radius:var(--border-radius-control)}._aes_1cp0f_33._selected_1cp0f_51{border:var(--contour-border-width) solid var(--contour-color);box-shadow:var(--contour-box-shadow);z-index:1}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
const e = "_columnValue_1cp0f_2", c = "_withReorering_1cp0f_12", o = "_title_1cp0f_20", t = "_color_1cp0f_27", _ = "_aesGroup_1cp0f_33", s = "_aes_1cp0f_33", l = "_selected_1cp0f_51", n = {
|
|
3
3
|
columnValue: e,
|
|
4
|
+
withReorering: c,
|
|
4
5
|
title: o,
|
|
5
6
|
color: t,
|
|
6
|
-
aesGroup:
|
|
7
|
-
aes:
|
|
7
|
+
aesGroup: _,
|
|
8
|
+
aes: s,
|
|
8
9
|
selected: l
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
s as aes,
|
|
13
|
+
_ as aesGroup,
|
|
13
14
|
t as color,
|
|
14
15
|
e as columnValue,
|
|
15
|
-
|
|
16
|
+
n as default,
|
|
16
17
|
l as selected,
|
|
17
|
-
o as title
|
|
18
|
+
o as title,
|
|
19
|
+
c as withReorering
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=DiscreteRow.vue3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscreteRow.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DiscreteRow.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|