@milaboratories/graph-maker 1.1.162 → 1.1.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GraphMaker/constantsCommon.d.ts +7 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +26 -19
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/Line.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/Line.vue.js +63 -52
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/Line.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +122 -91
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js +105 -77
- package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.d.ts.map +1 -1
- package/dist/GraphMaker/index.vue.js +50 -46
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +1 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +5 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +28 -24
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +11 -10
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +24 -24
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +13 -13
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +31 -40
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +25 -25
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +13 -8
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js +58 -58
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +204 -110
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +81 -78
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/react/index.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/react-dom/index.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +11 -10
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +14 -9
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,111 +1,142 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { DEFAULT_CONTINUOUS_PALETTE as
|
|
4
|
-
import { createContinuousMappingFromPalette as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { PlBtnGroup as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as m, ref as v, resolveComponent as B, createElementBlock as C, openBlock as A, Fragment as E, createVNode as o, createBlock as I, createCommentVNode as _, createElementVNode as u, unref as s, withCtx as P } from "vue";
|
|
2
|
+
import { useStore as U } from "../../../../store.js";
|
|
3
|
+
import { DEFAULT_CONTINUOUS_PALETTE as k, PALETTE_MAP as z } from "../../../../constantsAesthetic.js";
|
|
4
|
+
import { createContinuousMappingFromPalette as D } from "../../../../dataBindAes.js";
|
|
5
|
+
import L from "../../../../components/MultiselectButton.vue.js";
|
|
6
|
+
import G from "../../../../components/AesSettings/PalettesForm.vue.js";
|
|
7
|
+
import F from "../../../../components/AesSettings/FormWrapper.vue.js";
|
|
8
|
+
import { PlBtnGroup as p, PlNumberField as R } from "@platforma-sdk/ui-vue";
|
|
9
|
+
const $ = { class: "button-group-item" }, w = { class: "button-group-item" }, H = { class: "checkbox-item" }, X = { class: "checkbox-item" }, Y = { class: "button-group-item" }, Z = {
|
|
10
10
|
class: "button-group-item",
|
|
11
11
|
style: { display: "flex", alignItems: "end" }
|
|
12
|
-
},
|
|
12
|
+
}, te = /* @__PURE__ */ y({
|
|
13
13
|
__name: "Heatmap",
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
14
|
+
setup(j) {
|
|
15
|
+
const i = U(), t = m(() => i.value.reactive.layersSettings.heatmap), b = m(() => i.value.reactive.optionsState), f = m(() => i.value.inputGuide.value), n = m(() => {
|
|
16
16
|
var a;
|
|
17
|
-
return (a =
|
|
18
|
-
}),
|
|
17
|
+
return (a = b.value.components.value.selectorStates[0]) == null ? void 0 : a.selectedSource;
|
|
18
|
+
}), N = m(() => {
|
|
19
19
|
var a;
|
|
20
|
-
return
|
|
21
|
-
}), r = v(!1),
|
|
22
|
-
function
|
|
23
|
-
|
|
20
|
+
return n.value ? (a = i.value.reactive.dataBindAes[n.value]) == null ? void 0 : a.palette : void 0;
|
|
21
|
+
}), r = v(!1), d = v(N.value ?? k);
|
|
22
|
+
function M(a) {
|
|
23
|
+
d.value = a, r.value = !1, n.value && (i.value.reactive.dataBindAes[n.value] = D(a));
|
|
24
24
|
}
|
|
25
25
|
const S = [
|
|
26
26
|
{ label: "None", value: null },
|
|
27
27
|
{ label: "Columns", value: "column" },
|
|
28
28
|
{ label: "Rows", value: "row" }
|
|
29
|
-
],
|
|
29
|
+
], x = [
|
|
30
30
|
{ label: "z-score", value: "standardScaling" },
|
|
31
31
|
{ label: "Min-max", value: "meanNormalization" }
|
|
32
|
-
],
|
|
32
|
+
], O = [
|
|
33
33
|
{ label: "empty", value: null },
|
|
34
34
|
{ label: "Special value", value: "custom" }
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
], T = [
|
|
36
|
+
{ label: "Mean", value: "mean" },
|
|
37
|
+
{ label: "Min", value: "min" },
|
|
38
|
+
{ label: "Max", value: "max" },
|
|
39
|
+
{ label: "Median", value: "median" }
|
|
40
|
+
], g = v(t.value.NAValueAs === null ? null : "custom"), c = v(t.value.NAValueAs ?? 0);
|
|
41
|
+
return (a, e) => {
|
|
42
|
+
const V = B("pl-checkbox");
|
|
43
|
+
return A(), C(E, null, [
|
|
44
|
+
o(L, {
|
|
45
|
+
label: "Color Palette ",
|
|
46
|
+
title: s(z)[d.value].title,
|
|
47
|
+
palette: d.value,
|
|
48
|
+
onButtonClick: e[0] || (e[0] = (l) => {
|
|
49
|
+
r.value = !0;
|
|
50
|
+
})
|
|
51
|
+
}, null, 8, ["title", "palette"]),
|
|
52
|
+
r.value ? (A(), I(F, {
|
|
53
|
+
key: 0,
|
|
54
|
+
title: "Color Palette",
|
|
55
|
+
"back-title": "Color mapping",
|
|
56
|
+
"onForm:close": e[1] || (e[1] = (l) => r.value = !1)
|
|
57
|
+
}, {
|
|
58
|
+
default: P(() => [
|
|
59
|
+
o(G, {
|
|
60
|
+
selected: d.value,
|
|
61
|
+
categorical: n.value ? f.value.getSourceInfo(n.value).type === "String" : !1,
|
|
62
|
+
onSelect: M
|
|
63
|
+
}, null, 8, ["selected", "categorical"])
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
})) : _("", !0),
|
|
67
|
+
u("div", $, [
|
|
68
|
+
o(s(p), {
|
|
69
|
+
label: "Normalize by",
|
|
70
|
+
options: S,
|
|
71
|
+
compact: !0,
|
|
72
|
+
modelValue: t.value.normalizationDirection,
|
|
73
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.normalizationDirection = l)
|
|
74
|
+
}, null, 8, ["modelValue"])
|
|
75
|
+
]),
|
|
76
|
+
u("div", w, [
|
|
77
|
+
o(s(p), {
|
|
78
|
+
label: "Normalization method",
|
|
79
|
+
options: x,
|
|
80
|
+
compact: !0,
|
|
81
|
+
modelValue: t.value.normalizationMethod,
|
|
82
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.normalizationMethod = l)
|
|
83
|
+
}, null, 8, ["modelValue"])
|
|
84
|
+
]),
|
|
85
|
+
u("div", H, [
|
|
86
|
+
o(V, {
|
|
87
|
+
modelValue: t.value.aggregateByX,
|
|
88
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.aggregateByX = l)
|
|
89
|
+
}, null, 8, ["modelValue"]),
|
|
90
|
+
e[11] || (e[11] = u("span", null, "Aggregate X groups", -1))
|
|
91
|
+
]),
|
|
92
|
+
u("div", X, [
|
|
93
|
+
o(V, {
|
|
94
|
+
modelValue: t.value.aggregateByY,
|
|
95
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.aggregateByY = l)
|
|
96
|
+
}, null, 8, ["modelValue"]),
|
|
97
|
+
e[12] || (e[12] = u("span", null, "Aggregate Y groups", -1))
|
|
98
|
+
]),
|
|
99
|
+
u("div", Y, [
|
|
100
|
+
o(s(p), {
|
|
101
|
+
label: "Aggregation method",
|
|
102
|
+
options: T,
|
|
103
|
+
compact: !0,
|
|
104
|
+
modelValue: t.value.aggregationMethod,
|
|
105
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.aggregationMethod = l)
|
|
106
|
+
}, null, 8, ["modelValue"])
|
|
57
107
|
]),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
l === "custom" ? t.value.NAValueAs = p.value : t.value.NAValueAs = l;
|
|
88
|
-
})
|
|
89
|
-
]
|
|
90
|
-
}, null, 8, ["modelValue"]),
|
|
91
|
-
u(s(D), {
|
|
92
|
-
style: { height: "33px", marginLeft: "16px", width: "75px" },
|
|
93
|
-
disabled: d.value !== "custom",
|
|
94
|
-
label: "NA value",
|
|
95
|
-
useIncrementButtons: !1,
|
|
96
|
-
modelValue: p.value,
|
|
97
|
-
"onUpdate:modelValue": [
|
|
98
|
-
e[6] || (e[6] = (l) => p.value = l),
|
|
99
|
-
e[7] || (e[7] = (l) => {
|
|
100
|
-
l !== void 0 && (t.value.NAValueAs = l);
|
|
101
|
-
})
|
|
102
|
-
]
|
|
103
|
-
}, null, 8, ["disabled", "modelValue"])
|
|
104
|
-
])
|
|
105
|
-
], 64));
|
|
108
|
+
u("div", Z, [
|
|
109
|
+
o(s(p), {
|
|
110
|
+
label: "Treat NA value as:",
|
|
111
|
+
options: O,
|
|
112
|
+
compact: !0,
|
|
113
|
+
modelValue: g.value,
|
|
114
|
+
"onUpdate:modelValue": [
|
|
115
|
+
e[7] || (e[7] = (l) => g.value = l),
|
|
116
|
+
e[8] || (e[8] = (l) => {
|
|
117
|
+
l === "custom" ? t.value.NAValueAs = c.value : t.value.NAValueAs = l;
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
}, null, 8, ["modelValue"]),
|
|
121
|
+
o(s(R), {
|
|
122
|
+
style: { height: "33px", marginLeft: "16px", width: "75px" },
|
|
123
|
+
disabled: g.value !== "custom",
|
|
124
|
+
label: "NA value",
|
|
125
|
+
useIncrementButtons: !1,
|
|
126
|
+
modelValue: c.value,
|
|
127
|
+
"onUpdate:modelValue": [
|
|
128
|
+
e[9] || (e[9] = (l) => c.value = l),
|
|
129
|
+
e[10] || (e[10] = (l) => {
|
|
130
|
+
l !== void 0 && (t.value.NAValueAs = l);
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}, null, 8, ["disabled", "modelValue"])
|
|
134
|
+
])
|
|
135
|
+
], 64);
|
|
136
|
+
};
|
|
106
137
|
}
|
|
107
138
|
});
|
|
108
139
|
export {
|
|
109
|
-
|
|
140
|
+
te as default
|
|
110
141
|
};
|
|
111
142
|
//# sourceMappingURL=Heatmap.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heatmap.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { HeatmapLayer } from '../../../../types';\nimport { computed, ref } from 'vue';\nimport {\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../../../constantsAesthetic';\nimport { ContinuousPalette } from '../../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../../dataBindAes';\nimport MultiselectButton from '../../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../../components/AesSettings/FormWrapper.vue';\nimport { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { PlBtnGroup, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmap';\nconst settings = computed(() => store.value.reactive.layersSettings.heatmap);\nconst optionsState = computed(() => store.value.reactive.optionsState as HeatmapUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<HeatmapUIState>);\n\nconst dataSource = computed(() => optionsState.value.components.value.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => dataSource.value ? store.value.reactive.dataBindAes[dataSource.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (dataSource.value) {\n store.value.reactive.dataBindAes[dataSource.value] = createContinuousMappingFromPalette(value);\n }\n}\n\nconst NORMALIZATION_DIRECTION: SimpleOption[] = [\n { label: 'None', value: null },\n { label: 'Columns', value: 'column' },\n { label: 'Rows', value: 'row' }\n];\nconst NORMALIZATION_METHOD: SimpleOption[] = [\n { label: 'z-score', value: 'standardScaling' },\n { label: 'Min-max', value: 'meanNormalization' }\n];\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs === null ? null : 'custom');\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\"\n :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\"\n @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","inputGuide","dataSource","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","NA_VALUE_OPTIONS","NAValueOption","customNA"],"mappings":";;;;;;;;;;;;;;AAgBA,UAAMA,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAe,OAAO,GACrEI,IAAeD,EAAS,MAAMH,EAAM,MAAM,SAAS,YAA8B,GACjFK,IAAaF,EAAS,MAAMH,EAAM,MAAM,WAAW,KAAmC,GAEtFM,IAAaH,EAAS,MAAA;;AAAM,cAAAI,IAAAH,EAAa,MAAM,WAAW,MAAM,eAAe,CAAC,MAApD,gBAAAG,EAAuD;AAAA,KAAc,GACjGC,IAAwBL,EAAS,MAAA;;AAAM,aAAAG,EAAW,SAAQC,IAAAP,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,MAAjD,gBAAAC,EAAoD,UAAU;AAAA,KAAS,GAEjIE,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAuBF,EAAsB,SAA8BI,CAA0B;AAErH,aAASC,EAAgBC,GAA0B;AACjD,MAAAH,EAAQ,QAAQG,GAChBL,EAAa,QAAQ,IACjBH,EAAW,UACbN,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,IAAIS,EAAmCD,CAAK;AAAA,IAEjG;AAEA,UAAME,IAA0C;AAAA,MAC9C,EAAE,OAAO,QAAQ,OAAO,KAAA;AAAA,MACxB,EAAE,OAAO,WAAW,OAAO,SAAA;AAAA,MAC3B,EAAE,OAAO,QAAQ,OAAO,MAAA;AAAA,IAAM,GAE1BC,IAAuC;AAAA,MAC3C,EAAE,OAAO,WAAW,OAAO,kBAAA;AAAA,MAC3B,EAAE,OAAO,WAAW,OAAO,oBAAA;AAAA,IAAoB,GAE3CC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,
|
|
1
|
+
{"version":3,"file":"Heatmap.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { HeatmapLayer } from '../../../../types';\nimport { computed, ref } from 'vue';\nimport {\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../../../constantsAesthetic';\nimport { ContinuousPalette } from '../../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../../dataBindAes';\nimport MultiselectButton from '../../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../../components/AesSettings/FormWrapper.vue';\nimport { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { PlBtnGroup, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmap';\nconst settings = computed(() => store.value.reactive.layersSettings.heatmap);\nconst optionsState = computed(() => store.value.reactive.optionsState as HeatmapUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<HeatmapUIState>);\n\nconst dataSource = computed(() => optionsState.value.components.value.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => dataSource.value ? store.value.reactive.dataBindAes[dataSource.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (dataSource.value) {\n store.value.reactive.dataBindAes[dataSource.value] = createContinuousMappingFromPalette(value);\n }\n}\n\nconst NORMALIZATION_DIRECTION: SimpleOption[] = [\n { label: 'None', value: null },\n { label: 'Columns', value: 'column' },\n { label: 'Rows', value: 'row' }\n];\nconst NORMALIZATION_METHOD: SimpleOption[] = [\n { label: 'z-score', value: 'standardScaling' },\n { label: 'Min-max', value: 'meanNormalization' }\n];\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\nconst AGGREGATION_METHOD: SimpleOption[] = [\n {label: 'Mean', value: 'mean'},\n {label: 'Min', value: 'min'},\n {label: 'Max', value: 'max'},\n {label: 'Median', value: 'median'},\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs === null ? null : 'custom');\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\"\n :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\"\n @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.aggregationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","inputGuide","dataSource","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","NA_VALUE_OPTIONS","AGGREGATION_METHOD","NAValueOption","customNA"],"mappings":";;;;;;;;;;;;;;AAgBA,UAAMA,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAe,OAAO,GACrEI,IAAeD,EAAS,MAAMH,EAAM,MAAM,SAAS,YAA8B,GACjFK,IAAaF,EAAS,MAAMH,EAAM,MAAM,WAAW,KAAmC,GAEtFM,IAAaH,EAAS,MAAA;;AAAM,cAAAI,IAAAH,EAAa,MAAM,WAAW,MAAM,eAAe,CAAC,MAApD,gBAAAG,EAAuD;AAAA,KAAc,GACjGC,IAAwBL,EAAS,MAAA;;AAAM,aAAAG,EAAW,SAAQC,IAAAP,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,MAAjD,gBAAAC,EAAoD,UAAU;AAAA,KAAS,GAEjIE,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAuBF,EAAsB,SAA8BI,CAA0B;AAErH,aAASC,EAAgBC,GAA0B;AACjD,MAAAH,EAAQ,QAAQG,GAChBL,EAAa,QAAQ,IACjBH,EAAW,UACbN,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,IAAIS,EAAmCD,CAAK;AAAA,IAEjG;AAEA,UAAME,IAA0C;AAAA,MAC9C,EAAE,OAAO,QAAQ,OAAO,KAAA;AAAA,MACxB,EAAE,OAAO,WAAW,OAAO,SAAA;AAAA,MAC3B,EAAE,OAAO,QAAQ,OAAO,MAAA;AAAA,IAAM,GAE1BC,IAAuC;AAAA,MAC3C,EAAE,OAAO,WAAW,OAAO,kBAAA;AAAA,MAC3B,EAAE,OAAO,WAAW,OAAO,oBAAA;AAAA,IAAoB,GAE3CC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,GAEtCC,IAAqC;AAAA,MACzC,EAAC,OAAO,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAC,OAAO,OAAO,OAAO,MAAA;AAAA,MACtB,EAAC,OAAO,OAAO,OAAO,MAAA;AAAA,MACtB,EAAC,OAAO,UAAU,OAAO,SAAA;AAAA,IAAQ,GAG7BC,IAAgBV,EAAIR,EAAS,MAAM,cAAc,OAAO,OAAO,QAAQ,GACvEmB,IAAWX,EAAIR,EAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapClustered.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"HeatmapClustered.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"names":[],"mappings":";AAghBA,wBAKG"}
|
|
@@ -1,137 +1,165 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { PlCheckbox as
|
|
4
|
-
import { DEFAULT_CONTINUOUS_PALETTE as
|
|
5
|
-
import { createContinuousMappingFromPalette as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as O, computed as r, ref as p, createElementBlock as A, openBlock as g, Fragment as T, createVNode as o, createBlock as B, createCommentVNode as N, createElementVNode as t, unref as u, withCtx as E } from "vue";
|
|
2
|
+
import { useStore as I } from "../../../../store.js";
|
|
3
|
+
import { PlCheckbox as i, PlBtnGroup as V, PlNumberField as P } from "@platforma-sdk/ui-vue";
|
|
4
|
+
import { DEFAULT_CONTINUOUS_PALETTE as X, PALETTE_MAP as Y } from "../../../../constantsAesthetic.js";
|
|
5
|
+
import { createContinuousMappingFromPalette as D } from "../../../../dataBindAes.js";
|
|
6
|
+
import z from "../../../../components/MultiselectButton.vue.js";
|
|
7
|
+
import L from "../../../../components/AesSettings/PalettesForm.vue.js";
|
|
8
|
+
import w from "../../../../components/AesSettings/FormWrapper.vue.js";
|
|
9
|
+
const G = { class: "checkbox-item" }, F = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "checkbox-item"
|
|
12
|
-
},
|
|
12
|
+
}, R = { class: "checkbox-item" }, $ = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "checkbox-item"
|
|
15
|
-
},
|
|
15
|
+
}, H = { class: "button-group-item" }, Z = { class: "button-group-item" }, _ = { class: "checkbox-item" }, j = { class: "checkbox-item" }, q = { class: "button-group-item" }, J = {
|
|
16
16
|
class: "button-group-item",
|
|
17
17
|
style: { display: "flex", alignItems: "end" }
|
|
18
|
-
},
|
|
18
|
+
}, ue = /* @__PURE__ */ O({
|
|
19
19
|
__name: "HeatmapClustered",
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
var
|
|
23
|
-
return (
|
|
24
|
-
}),
|
|
25
|
-
var
|
|
26
|
-
return s.value ? (
|
|
27
|
-
}),
|
|
28
|
-
function S(
|
|
29
|
-
|
|
20
|
+
setup(K) {
|
|
21
|
+
const d = I(), a = r(() => d.value.reactive.layersSettings.heatmapClustered), c = r(() => d.value.reactive.optionsState), x = r(() => d.value.inputGuide.value), s = r(() => {
|
|
22
|
+
var n;
|
|
23
|
+
return (n = c.value.components.value.selectorStates[0]) == null ? void 0 : n.selectedSource;
|
|
24
|
+
}), C = r(() => {
|
|
25
|
+
var n;
|
|
26
|
+
return s.value ? (n = d.value.reactive.dataBindAes[s.value]) == null ? void 0 : n.palette : void 0;
|
|
27
|
+
}), m = p(!1), v = p(C.value ?? X);
|
|
28
|
+
function S(n) {
|
|
29
|
+
v.value = n, m.value = !1, s.value && (d.value.reactive.dataBindAes[s.value] = D(n));
|
|
30
30
|
}
|
|
31
31
|
const k = [
|
|
32
32
|
{ label: "None", value: null },
|
|
33
33
|
{ label: "Columns", value: "column" },
|
|
34
34
|
{ label: "Rows", value: "row" }
|
|
35
|
-
],
|
|
35
|
+
], M = [
|
|
36
36
|
{ label: "z-score", value: "standardScaling" },
|
|
37
37
|
{ label: "Min-max", value: "meanNormalization" }
|
|
38
|
-
],
|
|
38
|
+
], U = [
|
|
39
39
|
{ label: "empty", value: null },
|
|
40
40
|
{ label: "Special value", value: "custom" }
|
|
41
|
-
],
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
], y = [
|
|
42
|
+
{ label: "Mean", value: "mean" },
|
|
43
|
+
{ label: "Min", value: "min" },
|
|
44
|
+
{ label: "Max", value: "max" },
|
|
45
|
+
{ label: "Median", value: "median" }
|
|
46
|
+
], b = p(a.value.NAValueAs !== null ? "custom" : a.value.NAValueAs), f = p(a.value.NAValueAs ?? 0);
|
|
47
|
+
return (n, e) => (g(), A(T, null, [
|
|
48
|
+
o(z, {
|
|
44
49
|
label: "Color Palette ",
|
|
45
|
-
title:
|
|
46
|
-
palette:
|
|
50
|
+
title: u(Y)[v.value].title,
|
|
51
|
+
palette: v.value,
|
|
47
52
|
onButtonClick: e[0] || (e[0] = (l) => {
|
|
48
|
-
|
|
53
|
+
m.value = !0;
|
|
49
54
|
})
|
|
50
55
|
}, null, 8, ["title", "palette"]),
|
|
51
|
-
|
|
56
|
+
m.value ? (g(), B(w, {
|
|
52
57
|
key: 0,
|
|
53
58
|
title: "Color Palette",
|
|
54
59
|
"back-title": "Color mapping",
|
|
55
|
-
"onForm:close": e[1] || (e[1] = (l) =>
|
|
60
|
+
"onForm:close": e[1] || (e[1] = (l) => m.value = !1)
|
|
56
61
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
59
|
-
selected:
|
|
60
|
-
categorical: s.value ?
|
|
62
|
+
default: E(() => [
|
|
63
|
+
o(L, {
|
|
64
|
+
selected: v.value,
|
|
65
|
+
categorical: s.value ? x.value.getSourceInfo(s.value).type === "String" : !1,
|
|
61
66
|
onSelect: S
|
|
62
67
|
}, null, 8, ["selected", "categorical"])
|
|
63
68
|
]),
|
|
64
69
|
_: 1
|
|
65
|
-
})) :
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
modelValue:
|
|
69
|
-
"onUpdate:modelValue": e[2] || (e[2] = (l) =>
|
|
70
|
+
})) : N("", !0),
|
|
71
|
+
t("div", G, [
|
|
72
|
+
o(u(i), {
|
|
73
|
+
modelValue: a.value.disableClusteringX,
|
|
74
|
+
"onUpdate:modelValue": e[2] || (e[2] = (l) => a.value.disableClusteringX = l)
|
|
70
75
|
}, null, 8, ["modelValue"]),
|
|
71
|
-
e[
|
|
76
|
+
e[15] || (e[15] = t("span", null, "Disable clustering for X axis", -1))
|
|
72
77
|
]),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
modelValue:
|
|
76
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) =>
|
|
78
|
+
a.value.disableClusteringX ? N("", !0) : (g(), A("div", F, [
|
|
79
|
+
o(u(i), {
|
|
80
|
+
modelValue: a.value.dendrogramX,
|
|
81
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => a.value.dendrogramX = l)
|
|
77
82
|
}, null, 8, ["modelValue"]),
|
|
78
|
-
e[
|
|
83
|
+
e[16] || (e[16] = t("span", null, "Show dendrogram for X axis", -1))
|
|
79
84
|
])),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
modelValue:
|
|
83
|
-
"onUpdate:modelValue": e[4] || (e[4] = (l) =>
|
|
85
|
+
t("div", R, [
|
|
86
|
+
o(u(i), {
|
|
87
|
+
modelValue: a.value.disableClusteringY,
|
|
88
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => a.value.disableClusteringY = l)
|
|
84
89
|
}, null, 8, ["modelValue"]),
|
|
85
|
-
e[
|
|
90
|
+
e[17] || (e[17] = t("span", null, "Disable clustering for Y axis", -1))
|
|
86
91
|
]),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
modelValue:
|
|
90
|
-
"onUpdate:modelValue": e[5] || (e[5] = (l) =>
|
|
92
|
+
a.value.disableClusteringY ? N("", !0) : (g(), A("div", $, [
|
|
93
|
+
o(u(i), {
|
|
94
|
+
modelValue: a.value.dendrogramY,
|
|
95
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => a.value.dendrogramY = l)
|
|
91
96
|
}, null, 8, ["modelValue"]),
|
|
92
|
-
e[
|
|
97
|
+
e[18] || (e[18] = t("span", null, "Show dendrogram for Y axis", -1))
|
|
93
98
|
])),
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
t("div", H, [
|
|
100
|
+
o(u(V), {
|
|
96
101
|
label: "Normalize by",
|
|
97
102
|
options: k,
|
|
98
103
|
compact: !0,
|
|
99
|
-
modelValue:
|
|
100
|
-
"onUpdate:modelValue": e[6] || (e[6] = (l) =>
|
|
104
|
+
modelValue: a.value.normalizationDirection,
|
|
105
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => a.value.normalizationDirection = l)
|
|
101
106
|
}, null, 8, ["modelValue"])
|
|
102
107
|
]),
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
t("div", Z, [
|
|
109
|
+
o(u(V), {
|
|
105
110
|
label: "Normalization method",
|
|
106
|
-
options:
|
|
111
|
+
options: M,
|
|
107
112
|
compact: !0,
|
|
108
|
-
modelValue:
|
|
109
|
-
"onUpdate:modelValue": e[7] || (e[7] = (l) =>
|
|
113
|
+
modelValue: a.value.normalizationMethod,
|
|
114
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => a.value.normalizationMethod = l)
|
|
110
115
|
}, null, 8, ["modelValue"])
|
|
111
116
|
]),
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
t("div", _, [
|
|
118
|
+
o(u(i), {
|
|
119
|
+
modelValue: a.value.aggregateByX,
|
|
120
|
+
"onUpdate:modelValue": e[8] || (e[8] = (l) => a.value.aggregateByX = l)
|
|
121
|
+
}, null, 8, ["modelValue"]),
|
|
122
|
+
e[19] || (e[19] = t("span", null, "Aggregate X groups", -1))
|
|
123
|
+
]),
|
|
124
|
+
t("div", j, [
|
|
125
|
+
o(u(i), {
|
|
126
|
+
modelValue: a.value.aggregateByY,
|
|
127
|
+
"onUpdate:modelValue": e[9] || (e[9] = (l) => a.value.aggregateByY = l)
|
|
128
|
+
}, null, 8, ["modelValue"]),
|
|
129
|
+
e[20] || (e[20] = t("span", null, "Aggregate Y groups", -1))
|
|
130
|
+
]),
|
|
131
|
+
t("div", q, [
|
|
132
|
+
o(u(V), {
|
|
133
|
+
label: "Aggregation method",
|
|
134
|
+
options: y,
|
|
135
|
+
compact: !0,
|
|
136
|
+
modelValue: a.value.aggregationMethod,
|
|
137
|
+
"onUpdate:modelValue": e[10] || (e[10] = (l) => a.value.aggregationMethod = l)
|
|
138
|
+
}, null, 8, ["modelValue"])
|
|
139
|
+
]),
|
|
140
|
+
t("div", J, [
|
|
141
|
+
o(u(V), {
|
|
114
142
|
label: "Treat NA value as:",
|
|
115
|
-
options:
|
|
143
|
+
options: U,
|
|
116
144
|
compact: !0,
|
|
117
145
|
modelValue: b.value,
|
|
118
146
|
"onUpdate:modelValue": [
|
|
119
|
-
e[
|
|
120
|
-
e[
|
|
121
|
-
l === "custom" ?
|
|
147
|
+
e[11] || (e[11] = (l) => b.value = l),
|
|
148
|
+
e[12] || (e[12] = (l) => {
|
|
149
|
+
l === "custom" ? a.value.NAValueAs = f.value : a.value.NAValueAs = l;
|
|
122
150
|
})
|
|
123
151
|
]
|
|
124
152
|
}, null, 8, ["modelValue"]),
|
|
125
|
-
|
|
153
|
+
o(u(P), {
|
|
126
154
|
style: { height: "33px", marginLeft: "16px", width: "75px" },
|
|
127
155
|
disabled: b.value !== "custom",
|
|
128
156
|
label: "NA value",
|
|
129
157
|
useIncrementButtons: !1,
|
|
130
158
|
modelValue: f.value,
|
|
131
159
|
"onUpdate:modelValue": [
|
|
132
|
-
e[
|
|
133
|
-
e[
|
|
134
|
-
l !== void 0 && (
|
|
160
|
+
e[13] || (e[13] = (l) => f.value = l),
|
|
161
|
+
e[14] || (e[14] = (l) => {
|
|
162
|
+
l !== void 0 && (a.value.NAValueAs = l);
|
|
135
163
|
})
|
|
136
164
|
]
|
|
137
165
|
}, null, 8, ["disabled", "modelValue"])
|
|
@@ -140,6 +168,6 @@ const w = { class: "checkbox-item" }, F = {
|
|
|
140
168
|
}
|
|
141
169
|
});
|
|
142
170
|
export {
|
|
143
|
-
|
|
171
|
+
ue as default
|
|
144
172
|
};
|
|
145
173
|
//# sourceMappingURL=HeatmapClustered.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapClustered.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {useStore} from '../../../../store';\nimport {HeatmapLayer} from '../../../../types';\nimport { PlBtnGroup, PlCheckbox, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\nimport { computed, ref } from 'vue';\nimport { DEFAULT_CONTINUOUS_PALETTE, PALETTE_MAP } from '../../../../constantsAesthetic';\nimport { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { ContinuousPalette } from '../../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../../dataBindAes';\nimport MultiselectButton from '../../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../../components/AesSettings/FormWrapper.vue';\n\nconst store = useStore();\nconst layer:HeatmapLayer = 'heatmapClustered';\nconst settings = computed(() => store.value.reactive.layersSettings.heatmapClustered)\n\nconst optionsState = computed(() => store.value.reactive.optionsState as HeatmapUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<HeatmapUIState>);\n\nconst dataSource = computed(() => optionsState.value.components.value.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => dataSource.value ? store.value.reactive.dataBindAes[dataSource.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (dataSource.value) {\n store.value.reactive.dataBindAes[dataSource.value] = createContinuousMappingFromPalette(value);\n }\n}\nconst NORMALIZATION_DIRECTION:SimpleOption[] = [\n {label: 'None', value: null},\n {label: 'Columns', value: 'column'},\n {label: 'Rows', value: 'row'},\n];\nconst NORMALIZATION_METHOD:SimpleOption[] = [\n {label: 'z-score', value: 'standardScaling'},\n {label: 'Min-max', value: 'meanNormalization'},\n];\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs !== null ? 'custom' : settings.value.NAValueAs);\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\" :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\" @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.disableClusteringX\"/>\n <span>Disable clustering for X axis</span>\n </div>\n <div class=\"checkbox-item\" v-if=\"!settings.disableClusteringX\">\n <pl-checkbox v-model=\"settings.dendrogramX\" />\n <span>Show dendrogram for X axis</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.disableClusteringY\"/>\n <span>Disable clustering for Y axis</span>\n </div>\n <div class=\"checkbox-item\" v-if=\"!settings.disableClusteringY\">\n <pl-checkbox v-model=\"settings.dendrogramY\"/>\n <span>Show dendrogram for Y axis</span>\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","inputGuide","dataSource","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","NA_VALUE_OPTIONS","NAValueOption","customNA"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,UAAMA,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAe,gBAAgB,GAE9EI,IAAeD,EAAS,MAAMH,EAAM,MAAM,SAAS,YAA8B,GACjFK,IAAaF,EAAS,MAAMH,EAAM,MAAM,WAAW,KAAmC,GAEtFM,IAAaH,EAAS,MAAA;;AAAM,cAAAI,IAAAH,EAAa,MAAM,WAAW,MAAM,eAAe,CAAC,MAApD,gBAAAG,EAAuD;AAAA,KAAc,GACjGC,IAAwBL,EAAS,MAAA;;AAAM,aAAAG,EAAW,SAAQC,IAAAP,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,MAAjD,gBAAAC,EAAoD,UAAU;AAAA,KAAS,GAEjIE,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAuBF,EAAsB,SAA8BI,CAA0B;AAErH,aAASC,EAAgBC,GAA0B;AACjD,MAAAH,EAAQ,QAAQG,GAChBL,EAAa,QAAQ,IACjBH,EAAW,UACbN,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,IAAIS,EAAmCD,CAAK;AAAA,IAEjG;AACA,UAAME,IAAyC;AAAA,MAC7C,EAAC,OAAO,QAAQ,OAAO,KAAA;AAAA,MACvB,EAAC,OAAO,WAAW,OAAO,SAAA;AAAA,MAC1B,EAAC,OAAO,QAAQ,OAAO,MAAA;AAAA,IAAK,GAExBC,IAAsC;AAAA,MAC1C,EAAC,OAAO,WAAW,OAAO,kBAAA;AAAA,MAC1B,EAAC,OAAO,WAAW,OAAO,oBAAA;AAAA,IAAmB,GAEzCC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,
|
|
1
|
+
{"version":3,"file":"HeatmapClustered.vue.js","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {useStore} from '../../../../store';\nimport {HeatmapLayer} from '../../../../types';\nimport { PlBtnGroup, PlCheckbox, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\nimport { computed, ref } from 'vue';\nimport { DEFAULT_CONTINUOUS_PALETTE, PALETTE_MAP } from '../../../../constantsAesthetic';\nimport { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { ContinuousPalette } from '../../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../../dataBindAes';\nimport MultiselectButton from '../../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../../components/AesSettings/FormWrapper.vue';\n\nconst store = useStore();\nconst layer:HeatmapLayer = 'heatmapClustered';\nconst settings = computed(() => store.value.reactive.layersSettings.heatmapClustered)\n\nconst optionsState = computed(() => store.value.reactive.optionsState as HeatmapUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<HeatmapUIState>);\n\nconst dataSource = computed(() => optionsState.value.components.value.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => dataSource.value ? store.value.reactive.dataBindAes[dataSource.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (dataSource.value) {\n store.value.reactive.dataBindAes[dataSource.value] = createContinuousMappingFromPalette(value);\n }\n}\nconst NORMALIZATION_DIRECTION:SimpleOption[] = [\n {label: 'None', value: null},\n {label: 'Columns', value: 'column'},\n {label: 'Rows', value: 'row'},\n];\nconst NORMALIZATION_METHOD:SimpleOption[] = [\n {label: 'z-score', value: 'standardScaling'},\n {label: 'Min-max', value: 'meanNormalization'},\n];\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\nconst AGGREGATION_METHOD: SimpleOption[] = [\n {label: 'Mean', value: 'mean'},\n {label: 'Min', value: 'min'},\n {label: 'Max', value: 'max'},\n {label: 'Median', value: 'median'},\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs !== null ? 'custom' : settings.value.NAValueAs);\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\" :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\" @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.disableClusteringX\"/>\n <span>Disable clustering for X axis</span>\n </div>\n <div class=\"checkbox-item\" v-if=\"!settings.disableClusteringX\">\n <pl-checkbox v-model=\"settings.dendrogramX\" />\n <span>Show dendrogram for X axis</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.disableClusteringY\"/>\n <span>Disable clustering for Y axis</span>\n </div>\n <div class=\"checkbox-item\" v-if=\"!settings.disableClusteringY\">\n <pl-checkbox v-model=\"settings.dendrogramY\"/>\n <span>Show dendrogram for Y axis</span>\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.aggregationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","inputGuide","dataSource","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","NA_VALUE_OPTIONS","AGGREGATION_METHOD","NAValueOption","customNA"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,UAAMA,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAe,gBAAgB,GAE9EI,IAAeD,EAAS,MAAMH,EAAM,MAAM,SAAS,YAA8B,GACjFK,IAAaF,EAAS,MAAMH,EAAM,MAAM,WAAW,KAAmC,GAEtFM,IAAaH,EAAS,MAAA;;AAAM,cAAAI,IAAAH,EAAa,MAAM,WAAW,MAAM,eAAe,CAAC,MAApD,gBAAAG,EAAuD;AAAA,KAAc,GACjGC,IAAwBL,EAAS,MAAA;;AAAM,aAAAG,EAAW,SAAQC,IAAAP,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,MAAjD,gBAAAC,EAAoD,UAAU;AAAA,KAAS,GAEjIE,IAAeC,EAAI,EAAK,GACxBC,IAAUD,EAAuBF,EAAsB,SAA8BI,CAA0B;AAErH,aAASC,EAAgBC,GAA0B;AACjD,MAAAH,EAAQ,QAAQG,GAChBL,EAAa,QAAQ,IACjBH,EAAW,UACbN,EAAM,MAAM,SAAS,YAAYM,EAAW,KAAK,IAAIS,EAAmCD,CAAK;AAAA,IAEjG;AACA,UAAME,IAAyC;AAAA,MAC7C,EAAC,OAAO,QAAQ,OAAO,KAAA;AAAA,MACvB,EAAC,OAAO,WAAW,OAAO,SAAA;AAAA,MAC1B,EAAC,OAAO,QAAQ,OAAO,MAAA;AAAA,IAAK,GAExBC,IAAsC;AAAA,MAC1C,EAAC,OAAO,WAAW,OAAO,kBAAA;AAAA,MAC1B,EAAC,OAAO,WAAW,OAAO,oBAAA;AAAA,IAAmB,GAEzCC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,GAEtCC,IAAqC;AAAA,MACzC,EAAC,OAAO,QAAQ,OAAO,OAAA;AAAA,MACvB,EAAC,OAAO,OAAO,OAAO,MAAA;AAAA,MACtB,EAAC,OAAO,OAAO,OAAO,MAAA;AAAA,MACtB,EAAC,OAAO,UAAU,OAAO,SAAA;AAAA,IAAQ,GAG7BC,IAAgBV,EAAIR,EAAS,MAAM,cAAc,OAAO,WAAWA,EAAS,MAAM,SAAS,GAC3FmB,IAAWX,EAAIR,EAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../src/GraphMaker/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../src/GraphMaker/index.vue"],"names":[],"mappings":"AAqZA,OAAO,KAAK,EAA0B,gBAAgB,EAAa,MAAM,sBAAsB,CAAC;AAIhG,OAAO,kBAAkB,CAAC;AAQ1B,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,SAAS,CAAC;AA+E5D,iBAAS,KAAK,SAcb;AAED,iBAAS,aAAa,SASrB;AAuQD,iBAAS,cAAc;WAsKT,OAAO,IAA6B;;+BAZf,GAAG;8BACH,GAAG;yBACR,GAAG;;;;EAehC;AA4BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;gBAhNT,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;IA1V5B;;;;OAIG;;IAEH;;OAEG;;;;;;;;gBAiVO,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;gBADlB,eAAe;gBACb,gBAAgB;;;;;;6FA2N5B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|