@milaboratories/graph-maker 1.2.8 → 1.2.9
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/Chart.js.map +1 -1
- package/dist/components/Chart.vue.d.ts.map +1 -1
- package/dist/components/Chart.vue2.js +23 -3
- package/dist/components/Chart.vue2.js.map +1 -1
- package/dist/constantsCommon.d.ts +6 -0
- package/dist/constantsCommon.d.ts.map +1 -1
- package/dist/constantsCommon.js +9 -3
- package/dist/constantsCommon.js.map +1 -1
- package/dist/forms/DataMappingForm/DendroForm.js.map +1 -1
- package/dist/forms/DataMappingForm/DendroForm.vue.d.ts.map +1 -1
- package/dist/forms/DataMappingForm/DendroForm.vue2.js +22 -3
- package/dist/forms/DataMappingForm/DendroForm.vue2.js.map +1 -1
- package/dist/forms/DataMappingForm/useBaskets.d.ts.map +1 -1
- package/dist/forms/DataMappingForm/useBaskets.js +22 -3
- package/dist/forms/DataMappingForm/useBaskets.js.map +1 -1
- package/dist/forms/LayersForm/Layer/Bubble.js.map +1 -1
- package/dist/forms/LayersForm/Layer/Bubble.vue.d.ts.map +1 -1
- package/dist/forms/LayersForm/Layer/Bubble.vue2.js +53 -45
- package/dist/forms/LayersForm/Layer/Bubble.vue2.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.d.ts.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue2.js +49 -41
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue2.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.d.ts.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue2.js +63 -55
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue2.js.map +1 -1
- package/dist/store.js +7 -1
- package/dist/store.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +2 -0
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.js +1 -1
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +2 -0
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.js +1 -1
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/utils/loadUniqueValuesToSave.d.ts.map +1 -1
- package/dist/utils/loadUniqueValuesToSave.js +16 -3
- package/dist/utils/loadUniqueValuesToSave.js.map +1 -1
- package/package.json +3 -3
|
@@ -13,14 +13,14 @@ var S = { class: "button-group-item" }, C = { class: "button-group-item" }, w =
|
|
|
13
13
|
display: "flex",
|
|
14
14
|
alignItems: "end"
|
|
15
15
|
}
|
|
16
|
-
}, O = "
|
|
16
|
+
}, O = { class: "checkbox-item" }, k = { class: "checkbox-item" }, A = "heatmap", j = /* @__PURE__ */ m({
|
|
17
17
|
__name: "Heatmap",
|
|
18
18
|
setup(m) {
|
|
19
|
-
let
|
|
20
|
-
function
|
|
21
|
-
|
|
19
|
+
let j = o(), M = c(() => j.value.reactive.layersSettings[A]), N = c(() => j.value.reactive.optionsState), P = c(() => j.value.inputGuide.value), F = c(() => N.value.components.value.selectorStates[0]?.selectedSource), I = c(() => F.value ? j.value.reactive.dataBindAes[F.value]?.palette : void 0), L = g(!1), R = g(I.value ?? j.value.defaultPalette.continuous);
|
|
20
|
+
function z(e) {
|
|
21
|
+
R.value = e, L.value = !1, F.value && (j.value.reactive.dataBindAes[F.value] = t(e));
|
|
22
22
|
}
|
|
23
|
-
let
|
|
23
|
+
let B = [
|
|
24
24
|
{
|
|
25
25
|
label: "None",
|
|
26
26
|
value: null
|
|
@@ -33,95 +33,103 @@ var S = { class: "button-group-item" }, C = { class: "button-group-item" }, w =
|
|
|
33
33
|
label: "Rows",
|
|
34
34
|
value: "row"
|
|
35
35
|
}
|
|
36
|
-
],
|
|
36
|
+
], V = [{
|
|
37
37
|
label: "z-score",
|
|
38
38
|
value: "standardScaling"
|
|
39
39
|
}, {
|
|
40
40
|
label: "Min-max",
|
|
41
41
|
value: "meanNormalization"
|
|
42
|
-
}],
|
|
42
|
+
}], H = [{
|
|
43
43
|
label: "empty",
|
|
44
44
|
value: null
|
|
45
45
|
}, {
|
|
46
46
|
label: "Special value",
|
|
47
47
|
value: "custom"
|
|
48
|
-
}],
|
|
48
|
+
}], U = n, W = g(M.value.NAValueAs === null ? null : "custom"), G = g(M.value.NAValueAs ?? 0);
|
|
49
49
|
return (t, n) => (h(), d(s, null, [
|
|
50
50
|
p(a, {
|
|
51
51
|
label: "Color Palette ",
|
|
52
|
-
title: _(e)[
|
|
53
|
-
palette:
|
|
52
|
+
title: _(e)[R.value].title,
|
|
53
|
+
palette: R.value,
|
|
54
54
|
onButtonClick: n[0] ||= (e) => {
|
|
55
|
-
|
|
55
|
+
L.value = !0;
|
|
56
56
|
}
|
|
57
57
|
}, null, 8, ["title", "palette"]),
|
|
58
|
-
|
|
58
|
+
L.value ? (h(), l(r, {
|
|
59
59
|
key: 0,
|
|
60
60
|
title: "Color Palette",
|
|
61
61
|
"back-title": "Color mapping",
|
|
62
|
-
"onForm:close": n[1] ||= (e) =>
|
|
62
|
+
"onForm:close": n[1] ||= (e) => L.value = !1
|
|
63
63
|
}, {
|
|
64
64
|
default: v(() => [p(i, {
|
|
65
|
-
selected:
|
|
66
|
-
categorical:
|
|
67
|
-
onSelect:
|
|
65
|
+
selected: R.value,
|
|
66
|
+
categorical: F.value ? P.value.getSourceInfo(F.value).type === "String" : !1,
|
|
67
|
+
onSelect: z
|
|
68
68
|
}, null, 8, ["selected", "categorical"])]),
|
|
69
69
|
_: 1
|
|
70
70
|
})) : u("", !0),
|
|
71
71
|
f("div", S, [p(_(y), {
|
|
72
|
-
modelValue:
|
|
73
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
72
|
+
modelValue: M.value.normalizationDirection,
|
|
73
|
+
"onUpdate:modelValue": n[2] ||= (e) => M.value.normalizationDirection = e,
|
|
74
74
|
label: "Normalize by",
|
|
75
|
-
options:
|
|
75
|
+
options: B,
|
|
76
76
|
compact: !0
|
|
77
77
|
}, null, 8, ["modelValue"])]),
|
|
78
78
|
f("div", C, [p(_(y), {
|
|
79
|
-
modelValue:
|
|
80
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
79
|
+
modelValue: M.value.normalizationMethod,
|
|
80
|
+
"onUpdate:modelValue": n[3] ||= (e) => M.value.normalizationMethod = e,
|
|
81
81
|
label: "Normalization method",
|
|
82
|
-
options:
|
|
82
|
+
options: V,
|
|
83
83
|
compact: !0
|
|
84
84
|
}, null, 8, ["modelValue"])]),
|
|
85
85
|
f("div", w, [p(_(b), {
|
|
86
|
-
modelValue:
|
|
87
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
88
|
-
}, null, 8, ["modelValue"]), n[
|
|
86
|
+
modelValue: M.value.aggregateByX,
|
|
87
|
+
"onUpdate:modelValue": n[4] ||= (e) => M.value.aggregateByX = e
|
|
88
|
+
}, null, 8, ["modelValue"]), n[13] ||= f("span", null, "Aggregate X groups", -1)]),
|
|
89
89
|
f("div", T, [p(_(b), {
|
|
90
|
-
modelValue:
|
|
91
|
-
"onUpdate:modelValue": n[5] ||= (e) =>
|
|
92
|
-
}, null, 8, ["modelValue"]), n[
|
|
90
|
+
modelValue: M.value.aggregateByY,
|
|
91
|
+
"onUpdate:modelValue": n[5] ||= (e) => M.value.aggregateByY = e
|
|
92
|
+
}, null, 8, ["modelValue"]), n[14] ||= f("span", null, "Aggregate Y groups", -1)]),
|
|
93
93
|
f("div", E, [p(_(y), {
|
|
94
|
-
modelValue:
|
|
95
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
94
|
+
modelValue: M.value.aggregationMethod,
|
|
95
|
+
"onUpdate:modelValue": n[6] ||= (e) => M.value.aggregationMethod = e,
|
|
96
96
|
label: "Aggregation method",
|
|
97
|
-
options: _(
|
|
97
|
+
options: _(U),
|
|
98
98
|
compact: !0
|
|
99
99
|
}, null, 8, ["modelValue", "options"])]),
|
|
100
100
|
f("div", D, [p(_(y), {
|
|
101
|
-
modelValue:
|
|
102
|
-
"onUpdate:modelValue": [n[7] ||= (e) =>
|
|
103
|
-
e === "custom" ?
|
|
101
|
+
modelValue: W.value,
|
|
102
|
+
"onUpdate:modelValue": [n[7] ||= (e) => W.value = e, n[8] ||= (e) => {
|
|
103
|
+
e === "custom" ? M.value.NAValueAs = G.value : M.value.NAValueAs = e;
|
|
104
104
|
}],
|
|
105
105
|
label: "Treat NA value as:",
|
|
106
|
-
options:
|
|
106
|
+
options: H,
|
|
107
107
|
compact: !0
|
|
108
108
|
}, null, 8, ["modelValue"]), p(_(x), {
|
|
109
|
-
modelValue:
|
|
110
|
-
"onUpdate:modelValue": [n[9] ||= (e) =>
|
|
111
|
-
e !== void 0 && (
|
|
109
|
+
modelValue: G.value,
|
|
110
|
+
"onUpdate:modelValue": [n[9] ||= (e) => G.value = e, n[10] ||= (e) => {
|
|
111
|
+
e !== void 0 && (M.value.NAValueAs = e);
|
|
112
112
|
}],
|
|
113
113
|
style: {
|
|
114
114
|
height: "33px",
|
|
115
115
|
marginLeft: "16px",
|
|
116
116
|
width: "75px"
|
|
117
117
|
},
|
|
118
|
-
disabled:
|
|
118
|
+
disabled: W.value !== "custom",
|
|
119
119
|
label: "NA value",
|
|
120
120
|
useIncrementButtons: !1
|
|
121
|
-
}, null, 8, ["modelValue", "disabled"])])
|
|
121
|
+
}, null, 8, ["modelValue", "disabled"])]),
|
|
122
|
+
f("div", O, [p(_(b), {
|
|
123
|
+
modelValue: M.value.showEmptyRows,
|
|
124
|
+
"onUpdate:modelValue": n[11] ||= (e) => M.value.showEmptyRows = e
|
|
125
|
+
}, null, 8, ["modelValue"]), n[15] ||= f("span", null, "Show empty rows", -1)]),
|
|
126
|
+
f("div", k, [p(_(b), {
|
|
127
|
+
modelValue: M.value.showEmptyColumns,
|
|
128
|
+
"onUpdate:modelValue": n[12] ||= (e) => M.value.showEmptyColumns = e
|
|
129
|
+
}, null, 8, ["modelValue"]), n[16] ||= f("span", null, "Show empty columns", -1)])
|
|
122
130
|
], 64));
|
|
123
131
|
}
|
|
124
132
|
});
|
|
125
|
-
export {
|
|
133
|
+
export { j as default };
|
|
126
134
|
|
|
127
135
|
//# sourceMappingURL=Heatmap.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heatmap.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../src/forms/LayersForm/Layer/heatmap/Heatmap.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport type { HeatmapLayer } from '../../../../types';\nimport { computed, ref } from 'vue';\nimport {\n PALETTE_MAP,\n} from '../../../../constantsAesthetic';\nimport type { 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 type { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport type { SimpleOption } from '@platforma-sdk/ui-vue';\nimport { PlBtnGroup, PlCheckbox,
|
|
1
|
+
{"version":3,"file":"Heatmap.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../src/forms/LayersForm/Layer/heatmap/Heatmap.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport type { HeatmapLayer } from '../../../../types';\nimport { computed, ref } from 'vue';\nimport {\n PALETTE_MAP,\n} from '../../../../constantsAesthetic';\nimport type { 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 type { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport type { SimpleOption } from '@platforma-sdk/ui-vue';\nimport { PlBtnGroup, PlCheckbox, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmap';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\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 ?? store.value.defaultPalette.continuous);\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 = AGGREGATION_METHOD_OPTIONS;\n\nconst NAValueOption = ref(settings.value.NAValueAs === null ? null : 'custom');\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n</script>\n\n<template>\n <MultiselectButton\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <FormWrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm\n :selected=\"palette\"\n :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\"\n @select=\"onPaletteSelect\"\n />\n </FormWrapper>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationDirection\"\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationMethod\"\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.aggregationMethod\"\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <PlBtnGroup\n v-model=\"NAValueOption\"\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\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 <PlNumberField\n v-model=\"customNA\"\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showEmptyRows\"/>\n <span>Show empty rows</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showEmptyColumns\"/>\n <span>Show empty columns</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;mEAkBM,IAAsB;;;EAD5B,IAAM,IAAQ,GAAU,EAElB,IAAW,QAAe,EAAM,MAAM,SAAS,eAAe,GAAO,EACrE,IAAe,QAAe,EAAM,MAAM,SAAS,aAA+B,EAClF,IAAa,QAAe,EAAM,MAAM,WAAW,MAAoC,EAEvF,IAAa,QAAe,EAAa,MAAM,WAAW,MAAM,eAAe,IAAI,eAAe,EAClG,IAAwB,QAAe,EAAW,QAAQ,EAAM,MAAM,SAAS,YAAY,EAAW,QAAQ,UAAU,KAAA,EAAU,EAElI,IAAe,EAAI,GAAM,EACzB,IAAU,EAAuB,EAAsB,SAA8B,EAAM,MAAM,eAAe,WAAW;EAEjI,SAAS,EAAgB,GAA0B;AAGjD,GAFA,EAAQ,QAAQ,GAChB,EAAa,QAAQ,IACjB,EAAW,UACb,EAAM,MAAM,SAAS,YAAY,EAAW,SAAS,EAAmC,EAAM;;EAIlG,IAAM,IAA0C;GAC9C;IAAE,OAAO;IAAQ,OAAO;IAAM;GAC9B;IAAE,OAAO;IAAW,OAAO;IAAU;GACrC;IAAE,OAAO;IAAQ,OAAO;IAAO;GAChC,EACK,IAAuC,CAC3C;GAAE,OAAO;GAAW,OAAO;GAAmB,EAC9C;GAAE,OAAO;GAAW,OAAO;GAAqB,CACjD,EACK,IAAmC,CACvC;GAAE,OAAO;GAAS,OAAO;GAAM,EAC/B;GAAE,OAAO;GAAiB,OAAO;GAAU,CAC5C,EACK,IAAqB,GAErB,IAAgB,EAAI,EAAS,MAAM,cAAc,OAAO,OAAO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AAa,QAAA,GAAA,AAAA,EAAA,QAID,MAAa;KAAmB,MAAK,WAA2B,EAAA,MAAS,YAAY,EAAA,QAAqC,EAAA,MAAS,YAAY;;IAHpK,OAAM;IACL,SAAS;IACT,SAAS;gCASZ,EAWE,EAAA,EAAA,EAAA;gBAVS,EAAA;8CAAQ,QAAA,GAAA,AAAA,EAAA,SAKI,MAAa;KAAmB,MAAU,KAAA,MAAuB,EAAA,MAAS,YAAY;;IAJ1G,OAAO;KAAA,QAAA;KAAA,YAAA;KAAA,OAAA;KAAmD;IAC1D,UAAU,EAAA,UAAa;IACxB,OAAM;IACL,qBAAqB;;GAQ1B,EAGM,OAHN,GAGM,CAFJ,EAA8C,EAAA,EAAA,EAAA;gBAAzB,EAAA,MAAS;8CAAT,MAAS,gBAAa;0CAC3C,EAA4B,QAAA,MAAtB,mBAAe,GAAA,CAAA,CAAA;GAEvB,EAGM,OAHN,GAGM,CAFJ,EAAiD,EAAA,EAAA,EAAA;gBAA5B,EAAA,MAAS;8CAAT,MAAS,mBAAgB;0CAC9C,EAA+B,QAAA,MAAzB,sBAAkB,GAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapClustered.js","names":[],"sources":["../../../../../src/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport type { HeatmapLayer } from '../../../../types';\nimport type { SimpleOption } from '@platforma-sdk/ui-vue';\nimport { PlBtnGroup, PlCheckbox, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { computed, ref } from 'vue';\nimport { PALETTE_MAP } from '../../../../constantsAesthetic';\nimport type { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport type { 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 { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmapClustered';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\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 ?? store.value.defaultPalette.continuous);\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 = AGGREGATION_METHOD_OPTIONS;\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 <MultiselectButton\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <FormWrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm :selected=\"palette\" :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\" @select=\"onPaletteSelect\" />\n </FormWrapper>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringX\"/>\n <span>Disable clustering for X axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringX\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramX\" />\n <span>Show dendrogram for X axis</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringY\"/>\n <span>Disable clustering for Y axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringY\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramY\"/>\n <span>Show dendrogram for Y axis</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationDirection\"\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationMethod\"\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.aggregationMethod\"\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <PlBtnGroup\n v-model=\"NAValueOption\"\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\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 <PlNumberField\n v-model=\"customNA\"\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"HeatmapClustered.js","names":[],"sources":["../../../../../src/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport type { HeatmapLayer } from '../../../../types';\nimport type { SimpleOption } from '@platforma-sdk/ui-vue';\nimport { PlBtnGroup, PlCheckbox, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { computed, ref } from 'vue';\nimport { PALETTE_MAP } from '../../../../constantsAesthetic';\nimport type { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport type { 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 { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmapClustered';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\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 ?? store.value.defaultPalette.continuous);\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 = AGGREGATION_METHOD_OPTIONS;\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 <MultiselectButton\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <FormWrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm :selected=\"palette\" :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\" @select=\"onPaletteSelect\" />\n </FormWrapper>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringX\"/>\n <span>Disable clustering for X axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringX\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramX\" />\n <span>Show dendrogram for X axis</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringY\"/>\n <span>Disable clustering for Y axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringY\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramY\"/>\n <span>Show dendrogram for Y axis</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationDirection\"\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationMethod\"\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.aggregationMethod\"\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <PlBtnGroup\n v-model=\"NAValueOption\"\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\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 <PlNumberField\n v-model=\"customNA\"\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showEmptyRows\"/>\n <span>Show empty rows</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showEmptyColumns\"/>\n <span>Show empty columns</span>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapClustered.vue.d.ts","sourceRoot":"","sources":["../../../../../src/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"HeatmapClustered.vue.d.ts","sourceRoot":"","sources":["../../../../../src/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"names":[],"mappings":";AA8iBA,wBAKG"}
|
|
@@ -19,14 +19,14 @@ var S = { class: "checkbox-item" }, C = {
|
|
|
19
19
|
display: "flex",
|
|
20
20
|
alignItems: "end"
|
|
21
21
|
}
|
|
22
|
-
}, M = "
|
|
22
|
+
}, M = { class: "checkbox-item" }, N = { class: "checkbox-item" }, P = "heatmapClustered", F = /* @__PURE__ */ m({
|
|
23
23
|
__name: "HeatmapClustered",
|
|
24
24
|
setup(m) {
|
|
25
|
-
let
|
|
26
|
-
function
|
|
27
|
-
|
|
25
|
+
let F = o(), I = c(() => F.value.reactive.layersSettings[P]), L = c(() => F.value.reactive.optionsState), R = c(() => F.value.inputGuide.value), z = c(() => L.value.components.value.selectorStates[0]?.selectedSource), B = c(() => z.value ? F.value.reactive.dataBindAes[z.value]?.palette : void 0), V = g(!1), H = g(B.value ?? F.value.defaultPalette.continuous);
|
|
26
|
+
function U(e) {
|
|
27
|
+
H.value = e, V.value = !1, z.value && (F.value.reactive.dataBindAes[z.value] = t(e));
|
|
28
28
|
}
|
|
29
|
-
let
|
|
29
|
+
let W = [
|
|
30
30
|
{
|
|
31
31
|
label: "None",
|
|
32
32
|
value: null
|
|
@@ -39,111 +39,119 @@ var S = { class: "checkbox-item" }, C = {
|
|
|
39
39
|
label: "Rows",
|
|
40
40
|
value: "row"
|
|
41
41
|
}
|
|
42
|
-
],
|
|
42
|
+
], G = [{
|
|
43
43
|
label: "z-score",
|
|
44
44
|
value: "standardScaling"
|
|
45
45
|
}, {
|
|
46
46
|
label: "Min-max",
|
|
47
47
|
value: "meanNormalization"
|
|
48
|
-
}],
|
|
48
|
+
}], K = [{
|
|
49
49
|
label: "empty",
|
|
50
50
|
value: null
|
|
51
51
|
}, {
|
|
52
52
|
label: "Special value",
|
|
53
53
|
value: "custom"
|
|
54
|
-
}],
|
|
54
|
+
}], q = n, J = g(I.value.NAValueAs === null ? I.value.NAValueAs : "custom"), Y = g(I.value.NAValueAs ?? 0);
|
|
55
55
|
return (t, n) => (h(), d(s, null, [
|
|
56
56
|
p(a, {
|
|
57
57
|
label: "Color Palette ",
|
|
58
|
-
title: _(e)[
|
|
59
|
-
palette:
|
|
58
|
+
title: _(e)[H.value].title,
|
|
59
|
+
palette: H.value,
|
|
60
60
|
onButtonClick: n[0] ||= (e) => {
|
|
61
|
-
|
|
61
|
+
V.value = !0;
|
|
62
62
|
}
|
|
63
63
|
}, null, 8, ["title", "palette"]),
|
|
64
|
-
|
|
64
|
+
V.value ? (h(), l(r, {
|
|
65
65
|
key: 0,
|
|
66
66
|
title: "Color Palette",
|
|
67
67
|
"back-title": "Color mapping",
|
|
68
|
-
"onForm:close": n[1] ||= (e) =>
|
|
68
|
+
"onForm:close": n[1] ||= (e) => V.value = !1
|
|
69
69
|
}, {
|
|
70
70
|
default: v(() => [p(i, {
|
|
71
|
-
selected:
|
|
72
|
-
categorical:
|
|
73
|
-
onSelect:
|
|
71
|
+
selected: H.value,
|
|
72
|
+
categorical: z.value ? R.value.getSourceInfo(z.value).type === "String" : !1,
|
|
73
|
+
onSelect: U
|
|
74
74
|
}, null, 8, ["selected", "categorical"])]),
|
|
75
75
|
_: 1
|
|
76
76
|
})) : u("", !0),
|
|
77
77
|
f("div", S, [p(_(b), {
|
|
78
|
-
modelValue:
|
|
79
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
80
|
-
}, null, 8, ["modelValue"]), n[
|
|
81
|
-
|
|
82
|
-
modelValue:
|
|
83
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
84
|
-
}, null, 8, ["modelValue"]), n[
|
|
78
|
+
modelValue: I.value.disableClusteringX,
|
|
79
|
+
"onUpdate:modelValue": n[2] ||= (e) => I.value.disableClusteringX = e
|
|
80
|
+
}, null, 8, ["modelValue"]), n[17] ||= f("span", null, "Disable clustering for X axis", -1)]),
|
|
81
|
+
I.value.disableClusteringX ? u("", !0) : (h(), d("div", C, [p(_(b), {
|
|
82
|
+
modelValue: I.value.dendrogramX,
|
|
83
|
+
"onUpdate:modelValue": n[3] ||= (e) => I.value.dendrogramX = e
|
|
84
|
+
}, null, 8, ["modelValue"]), n[18] ||= f("span", null, "Show dendrogram for X axis", -1)])),
|
|
85
85
|
f("div", w, [p(_(b), {
|
|
86
|
-
modelValue:
|
|
87
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
88
|
-
}, null, 8, ["modelValue"]), n[
|
|
89
|
-
|
|
90
|
-
modelValue:
|
|
91
|
-
"onUpdate:modelValue": n[5] ||= (e) =>
|
|
92
|
-
}, null, 8, ["modelValue"]), n[
|
|
86
|
+
modelValue: I.value.disableClusteringY,
|
|
87
|
+
"onUpdate:modelValue": n[4] ||= (e) => I.value.disableClusteringY = e
|
|
88
|
+
}, null, 8, ["modelValue"]), n[19] ||= f("span", null, "Disable clustering for Y axis", -1)]),
|
|
89
|
+
I.value.disableClusteringY ? u("", !0) : (h(), d("div", T, [p(_(b), {
|
|
90
|
+
modelValue: I.value.dendrogramY,
|
|
91
|
+
"onUpdate:modelValue": n[5] ||= (e) => I.value.dendrogramY = e
|
|
92
|
+
}, null, 8, ["modelValue"]), n[20] ||= f("span", null, "Show dendrogram for Y axis", -1)])),
|
|
93
93
|
f("div", E, [p(_(y), {
|
|
94
|
-
modelValue:
|
|
95
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
94
|
+
modelValue: I.value.normalizationDirection,
|
|
95
|
+
"onUpdate:modelValue": n[6] ||= (e) => I.value.normalizationDirection = e,
|
|
96
96
|
label: "Normalize by",
|
|
97
|
-
options:
|
|
97
|
+
options: W,
|
|
98
98
|
compact: !0
|
|
99
99
|
}, null, 8, ["modelValue"])]),
|
|
100
100
|
f("div", D, [p(_(y), {
|
|
101
|
-
modelValue:
|
|
102
|
-
"onUpdate:modelValue": n[7] ||= (e) =>
|
|
101
|
+
modelValue: I.value.normalizationMethod,
|
|
102
|
+
"onUpdate:modelValue": n[7] ||= (e) => I.value.normalizationMethod = e,
|
|
103
103
|
label: "Normalization method",
|
|
104
|
-
options:
|
|
104
|
+
options: G,
|
|
105
105
|
compact: !0
|
|
106
106
|
}, null, 8, ["modelValue"])]),
|
|
107
107
|
f("div", O, [p(_(b), {
|
|
108
|
-
modelValue:
|
|
109
|
-
"onUpdate:modelValue": n[8] ||= (e) =>
|
|
110
|
-
}, null, 8, ["modelValue"]), n[
|
|
108
|
+
modelValue: I.value.aggregateByX,
|
|
109
|
+
"onUpdate:modelValue": n[8] ||= (e) => I.value.aggregateByX = e
|
|
110
|
+
}, null, 8, ["modelValue"]), n[21] ||= f("span", null, "Aggregate X groups", -1)]),
|
|
111
111
|
f("div", k, [p(_(b), {
|
|
112
|
-
modelValue:
|
|
113
|
-
"onUpdate:modelValue": n[9] ||= (e) =>
|
|
114
|
-
}, null, 8, ["modelValue"]), n[
|
|
112
|
+
modelValue: I.value.aggregateByY,
|
|
113
|
+
"onUpdate:modelValue": n[9] ||= (e) => I.value.aggregateByY = e
|
|
114
|
+
}, null, 8, ["modelValue"]), n[22] ||= f("span", null, "Aggregate Y groups", -1)]),
|
|
115
115
|
f("div", A, [p(_(y), {
|
|
116
|
-
modelValue:
|
|
117
|
-
"onUpdate:modelValue": n[10] ||= (e) =>
|
|
116
|
+
modelValue: I.value.aggregationMethod,
|
|
117
|
+
"onUpdate:modelValue": n[10] ||= (e) => I.value.aggregationMethod = e,
|
|
118
118
|
label: "Aggregation method",
|
|
119
|
-
options: _(
|
|
119
|
+
options: _(q),
|
|
120
120
|
compact: !0
|
|
121
121
|
}, null, 8, ["modelValue", "options"])]),
|
|
122
122
|
f("div", j, [p(_(y), {
|
|
123
|
-
modelValue:
|
|
124
|
-
"onUpdate:modelValue": [n[11] ||= (e) =>
|
|
125
|
-
e === "custom" ?
|
|
123
|
+
modelValue: J.value,
|
|
124
|
+
"onUpdate:modelValue": [n[11] ||= (e) => J.value = e, n[12] ||= (e) => {
|
|
125
|
+
e === "custom" ? I.value.NAValueAs = Y.value : I.value.NAValueAs = e;
|
|
126
126
|
}],
|
|
127
127
|
label: "Treat NA value as:",
|
|
128
|
-
options:
|
|
128
|
+
options: K,
|
|
129
129
|
compact: !0
|
|
130
130
|
}, null, 8, ["modelValue"]), p(_(x), {
|
|
131
|
-
modelValue:
|
|
132
|
-
"onUpdate:modelValue": [n[13] ||= (e) =>
|
|
133
|
-
e !== void 0 && (
|
|
131
|
+
modelValue: Y.value,
|
|
132
|
+
"onUpdate:modelValue": [n[13] ||= (e) => Y.value = e, n[14] ||= (e) => {
|
|
133
|
+
e !== void 0 && (I.value.NAValueAs = e);
|
|
134
134
|
}],
|
|
135
135
|
style: {
|
|
136
136
|
height: "33px",
|
|
137
137
|
marginLeft: "16px",
|
|
138
138
|
width: "75px"
|
|
139
139
|
},
|
|
140
|
-
disabled:
|
|
140
|
+
disabled: J.value !== "custom",
|
|
141
141
|
label: "NA value",
|
|
142
142
|
useIncrementButtons: !1
|
|
143
|
-
}, null, 8, ["modelValue", "disabled"])])
|
|
143
|
+
}, null, 8, ["modelValue", "disabled"])]),
|
|
144
|
+
f("div", M, [p(_(b), {
|
|
145
|
+
modelValue: I.value.showEmptyRows,
|
|
146
|
+
"onUpdate:modelValue": n[15] ||= (e) => I.value.showEmptyRows = e
|
|
147
|
+
}, null, 8, ["modelValue"]), n[23] ||= f("span", null, "Show empty rows", -1)]),
|
|
148
|
+
f("div", N, [p(_(b), {
|
|
149
|
+
modelValue: I.value.showEmptyColumns,
|
|
150
|
+
"onUpdate:modelValue": n[16] ||= (e) => I.value.showEmptyColumns = e
|
|
151
|
+
}, null, 8, ["modelValue"]), n[24] ||= f("span", null, "Show empty columns", -1)])
|
|
144
152
|
], 64));
|
|
145
153
|
}
|
|
146
154
|
});
|
|
147
|
-
export {
|
|
155
|
+
export { F as default };
|
|
148
156
|
|
|
149
157
|
//# sourceMappingURL=HeatmapClustered.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatmapClustered.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../src/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport type { HeatmapLayer } from '../../../../types';\nimport type { SimpleOption } from '@platforma-sdk/ui-vue';\nimport { PlBtnGroup, PlCheckbox, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { computed, ref } from 'vue';\nimport { PALETTE_MAP } from '../../../../constantsAesthetic';\nimport type { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport type { 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 { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmapClustered';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\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 ?? store.value.defaultPalette.continuous);\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 = AGGREGATION_METHOD_OPTIONS;\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 <MultiselectButton\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <FormWrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm :selected=\"palette\" :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\" @select=\"onPaletteSelect\" />\n </FormWrapper>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringX\"/>\n <span>Disable clustering for X axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringX\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramX\" />\n <span>Show dendrogram for X axis</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringY\"/>\n <span>Disable clustering for Y axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringY\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramY\"/>\n <span>Show dendrogram for Y axis</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationDirection\"\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationMethod\"\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.aggregationMethod\"\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <PlBtnGroup\n v-model=\"NAValueOption\"\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\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 <PlNumberField\n v-model=\"customNA\"\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"HeatmapClustered.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../src/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport type { HeatmapLayer } from '../../../../types';\nimport type { SimpleOption } from '@platforma-sdk/ui-vue';\nimport { PlBtnGroup, PlCheckbox, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { computed, ref } from 'vue';\nimport { PALETTE_MAP } from '../../../../constantsAesthetic';\nimport type { HeatmapUIState, InputGuide } from '@milaboratories/pf-plots';\nimport type { 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 { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer: HeatmapLayer = 'heatmapClustered';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\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 ?? store.value.defaultPalette.continuous);\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 = AGGREGATION_METHOD_OPTIONS;\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 <MultiselectButton\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <FormWrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <PalettesForm :selected=\"palette\" :categorical=\"dataSource ? inputGuide.getSourceInfo(dataSource).type === 'String' : false\" @select=\"onPaletteSelect\" />\n </FormWrapper>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringX\"/>\n <span>Disable clustering for X axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringX\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramX\" />\n <span>Show dendrogram for X axis</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.disableClusteringY\"/>\n <span>Disable clustering for Y axis</span>\n </div>\n <div v-if=\"!settings.disableClusteringY\" class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.dendrogramY\"/>\n <span>Show dendrogram for Y axis</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationDirection\"\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.normalizationMethod\"\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <PlBtnGroup\n v-model=\"settings.aggregationMethod\"\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <PlBtnGroup\n v-model=\"NAValueOption\"\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\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 <PlNumberField\n v-model=\"customNA\"\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showEmptyRows\"/>\n <span>Show empty rows</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showEmptyColumns\"/>\n <span>Show empty columns</span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;mEAgBM,IAAsB;;;EAD5B,IAAM,IAAQ,GAAU,EAElB,IAAW,QAAe,EAAM,MAAM,SAAS,eAAe,GAAO,EAErE,IAAe,QAAe,EAAM,MAAM,SAAS,aAA+B,EAClF,IAAa,QAAe,EAAM,MAAM,WAAW,MAAoC,EAEvF,IAAa,QAAe,EAAa,MAAM,WAAW,MAAM,eAAe,IAAI,eAAe,EAClG,IAAwB,QAAe,EAAW,QAAQ,EAAM,MAAM,SAAS,YAAY,EAAW,QAAQ,UAAU,KAAA,EAAU,EAElI,IAAe,EAAI,GAAM,EACzB,IAAU,EAAuB,EAAsB,SAA8B,EAAM,MAAM,eAAe,WAAW;EAEjI,SAAS,EAAgB,GAA0B;AAGjD,GAFA,EAAQ,QAAQ,GAChB,EAAa,QAAQ,IACjB,EAAW,UACb,EAAM,MAAM,SAAS,YAAY,EAAW,SAAS,EAAmC,EAAM;;EAGlG,IAAM,IAA0C;GAC9C;IAAE,OAAO;IAAQ,OAAO;IAAM;GAC9B;IAAE,OAAO;IAAW,OAAO;IAAU;GACrC;IAAE,OA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AAA,EAAA,SAKI,MAAa;KAAmB,MAAU,KAAA,MAAuB,EAAA,MAAS,YAAY;;IAJ1G,OAAO;KAAA,QAAA;KAAA,YAAA;KAAA,OAAA;KAAmD;IAC1D,UAAU,EAAA,UAAa;IACxB,OAAM;IACL,qBAAqB;;GAQ1B,EAGM,OAHN,GAGM,CAFJ,EAA8C,EAAA,EAAA,EAAA;gBAAzB,EAAA,MAAS;8CAAT,MAAS,gBAAa;0CAC3C,EAA4B,QAAA,MAAtB,mBAAe,GAAA,CAAA,CAAA;GAEvB,EAGM,OAHN,GAGM,CAFJ,EAAiD,EAAA,EAAA,EAAA;gBAA5B,EAAA,MAAS;8CAAT,MAAS,mBAAgB;0CAC9C,EAA+B,QAAA,MAAzB,sBAAkB,GAAA,CAAA,CAAA"}
|
package/dist/store.js
CHANGED
|
@@ -110,7 +110,13 @@ function N(e, t, r, i, a, o, s, l, m) {
|
|
|
110
110
|
R.value++;
|
|
111
111
|
let a = R.value;
|
|
112
112
|
I.value.loading.inputGuide = !0;
|
|
113
|
-
let c = n && r ? Object.values(await f(n, r, null, !1)).flatMap((e) => e.map((e) => e.selectedSource)) : [], l = n ? await b.calculateOptions(
|
|
113
|
+
let c = n && r ? Object.values(await f(n, r, null, !1)).flatMap((e) => e.map((e) => e.selectedSource)) : [], l = n ? await b.calculateOptions({
|
|
114
|
+
store: E(n),
|
|
115
|
+
state: e,
|
|
116
|
+
fixedIds: c,
|
|
117
|
+
dataColumnPredicate: o,
|
|
118
|
+
metaColumnPredicate: s
|
|
119
|
+
}) : b.getEmptyInputGuide(e);
|
|
114
120
|
a === R.value && (S.value = l, I.value.loading.defaults = !1, I.value.loading.inputGuide = !1, I.value.loading.initialInputGuide && (I.value.loading.initialInputGuide = !1));
|
|
115
121
|
}, {
|
|
116
122
|
immediate: !0,
|
package/dist/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","names":[],"sources":["../src/store.ts"],"sourcesContent":["import type {\n ChartType,\n DemoDataStore,\n DendroStateController,\n DendroUIState,\n InputGuide,\n InputNamesByChartType,\n InputState,\n PlotDataAndSettings,\n} from '@milaboratories/pf-plots';\nimport {\n getControllerByType,\n getInitialStateByType,\n} from '@milaboratories/pf-plots';\nimport type { PColumnSpec } from '@platforma-sdk/model';\nimport type { CategoricalPalette, ContinuousPalette, Palette } from './components/AesSettings/types';\nimport type { ComputedRef, Reactive, Ref } from 'vue';\nimport { computed, inject, provide, reactive, ref, toRaw, watch } from 'vue';\nimport type { AesType } from './constantsCommon';\nimport {\n getInitialAxesSettings,\n getInitialLayersSettings,\n getInitialStatisticsState,\n getInitialTemplate,\n} from './constantsCommon';\nimport { updateDataBindAes } from './dataBindAes';\nimport { notEmpty } from './helpers';\nimport { storeKey } from './keys';\nimport type {\n DefaultPalettes,\n DendroNodeInfo,\n FilterLabelsInfoBySourceMap,\n FilterSuggestionsBySourceMap,\n GraphMakerProps,\n GraphMakerState,\n ReactiveState, UniqueValuesBySourceMap,\n} from './types';\nimport type { LoadedDefaultOptionsMap } from './utils';\nimport { createUpdatedWithNewDefaultsOptionsState, isOptionsStateNeedsToBeUpdated, loadDefaultSources } from './utils';\nimport { addFixedOptionsToState } from './utils/addFixedOptionsToState';\nimport { calculateDiscreteGroups } from './utils/calculateDiscreteGroups';\nimport { copyJSON } from './utils/copyJSON';\nimport { loadDataForPlot } from './utils/createChartSettingsForRender/composeChartSettings';\nimport { getUsedAesInMapping } from './utils/getUsedAesInMapping';\nimport {\n getFacetValuesFromReadyChartData,\n getUniqueValuesFromReadyChartData,\n loadFilterLabelsForTitle,\n} from './utils/loadUniqueValuesToSave';\nimport type { FormKey } from './forms';\nimport { tabKeys } from './forms';\nimport { DEFAULT_CATEGORICAL_PALETTE, DEFAULT_CONTINUOUS_PALETTE } from './constantsAesthetic';\n\nfunction getInitialOptionsState(chartType: ChartType, optionsState: InputState | undefined) {\n const defaultState = copyJSON(getInitialStateByType(chartType));\n if (optionsState?.type !== chartType) {\n return defaultState;\n }\n const optionsStateCopy = copyJSON(optionsState);\n\n return {\n ...defaultState,\n ...optionsStateCopy,\n components: {\n ...defaultState.components,\n ...optionsStateCopy.components,\n },\n };\n}\n\nexport function createReactiveState(\n initialData: GraphMakerState,\n chartType: ChartType,\n): Reactive<ReactiveState> {\n return reactive({\n chartType: chartType,\n // from pf-plots\n optionsState: getInitialOptionsState(chartType, initialData.optionsState), // contains user selected inputs\n // previously used default options\n usedDefaultOptions: initialData.usedDefaultOptions ? copyJSON(initialData.usedDefaultOptions ?? {}) as LoadedDefaultOptionsMap<ChartType> : null,\n\n // local form states, updates directly in forms\n template: getInitialTemplate(initialData.template, chartType),\n statisticsSettings: getInitialStatisticsState(chartType, initialData.statisticsSettings),\n layersSettings: getInitialLayersSettings(initialData.layersSettings),\n axesSettings: getInitialAxesSettings(chartType, initialData.axesSettings),\n // common aesthetics data mapped on columns/axes values\n dataBindAes: copyJSON(initialData.dataBindAes ?? {}),\n chartScale: initialData.zoomState ?? 100,\n lassoControlsState: null,\n currentTab: initialData.currentTab === undefined ? 'dataMapping' : initialData.currentTab,\n tabDefaultState: tabKeys().reduce((res, formKey: FormKey) => {\n res[formKey] = {};\n return res;\n }, {} as Record<FormKey, Record<string, boolean>>),\n dendroInfoByClick: null as null | DendroNodeInfo,\n dendroSelectedNodeId: null,\n showTooltipHint: false,\n tooltipHintWasShown: initialData.tooltipHintWasShown ?? false,\n });\n}\n\nexport interface Store {\n reactive: Reactive<ReactiveState>;\n loading: {\n initialInputGuide: boolean;\n initialCharts: boolean;\n initialDefaults: boolean;\n inputGuide: boolean;\n chartData: boolean;\n defaults: boolean;\n chartRendering: boolean;\n dendroTableData: boolean;\n };\n commonHelpersData: {\n primaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n secondaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n usedAesInMapping: ComputedRef<Record<string, Record<AesType, boolean>>>;\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>;\n };\n controller: ReturnType<typeof getControllerByType>;\n columnsDataStore: Ref<DemoDataStore | null>;\n inputGuide: Ref<InputGuide<InputState>>;\n chartData: Ref<PlotDataAndSettings | null>;\n uniqueValuesData: Ref<UniqueValuesBySourceMap>;\n facetValuesData: Ref<UniqueValuesBySourceMap>;\n filterSuggestionsData: Ref<FilterSuggestionsBySourceMap>;\n filterLabelsInfo: Ref<FilterLabelsInfoBySourceMap>;\n readonlyInputs?: InputNamesByChartType[ChartType][];\n defaultPalette: DefaultPalettes;\n}\n\nexport function factoryStore(\n reactiveState: Reactive<ReactiveState>,\n dataStore: Ref<DemoDataStore | null>,\n inputGuide: Ref<InputGuide<InputState>>,\n chartData: Ref<PlotDataAndSettings | null>,\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>,\n uniqueValuesData: Ref<UniqueValuesBySourceMap>,\n facetValuesData: Ref<UniqueValuesBySourceMap>,\n filterSuggestionsData: Ref<FilterSuggestionsBySourceMap>,\n filterLabelsInfo: Ref<FilterLabelsInfoBySourceMap>,\n readonlyInputs?: InputNamesByChartType[ChartType][],\n defaultPalette?: Palette | { categorical?: Palette; continuous?: Palette },\n): Store {\n return {\n reactive: reactiveState,\n loading: reactive({\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n defaults: false,\n chartRendering: false,\n dendroTableData: false,\n }),\n commonHelpersData: {\n primaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'primaryGrouping',\n ),\n ),\n secondaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'secondaryGrouping',\n ),\n ),\n usedAesInMapping: computed<Record<string, Record<AesType, boolean>>>(() =>\n getUsedAesInMapping(\n reactiveState.chartType,\n reactiveState.template,\n reactiveState.layersSettings,\n reactiveState.statisticsSettings,\n reactiveState.optionsState,\n inputGuide.value,\n ),\n ),\n dendroTableData,\n },\n controller: getControllerByType(reactiveState.chartType),\n columnsDataStore: dataStore,\n inputGuide,\n chartData,\n uniqueValuesData,\n facetValuesData,\n filterSuggestionsData,\n filterLabelsInfo,\n readonlyInputs,\n defaultPalette: {\n categorical: typeof defaultPalette === 'object' && defaultPalette.categorical\n ? defaultPalette.categorical as CategoricalPalette\n : typeof defaultPalette === 'string' ? defaultPalette as CategoricalPalette : DEFAULT_CATEGORICAL_PALETTE,\n continuous: typeof defaultPalette === 'object' && defaultPalette.continuous\n ? defaultPalette.continuous as ContinuousPalette\n : typeof defaultPalette === 'string' ? defaultPalette as ContinuousPalette : DEFAULT_CONTINUOUS_PALETTE,\n },\n };\n}\n\nexport type ComputedStore = ComputedRef<Store>;\n\nexport function provideStore(\n initialState: GraphMakerState,\n dataStoreRef: Ref<DemoDataStore | null>,\n chartType: ChartType,\n defaultOptionsRef: Ref<GraphMakerProps['defaultOptions']>,\n fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>,\n dataColumnPredicate?: (spec: PColumnSpec) => boolean,\n metaColumnPredicate?: (spec: PColumnSpec) => boolean,\n readonlyInputs?: InputNamesByChartType[ChartType][],\n defaultPalette?: GraphMakerProps['defaultPalette'],\n) {\n const reactiveState = createReactiveState(initialState, chartType);\n const controller = getControllerByType(reactiveState.chartType);\n\n const inputGuide = ref<InputGuide<InputState>>(getControllerByType(reactiveState.chartType).getEmptyInputGuide(reactiveState.optionsState));\n const chartData = ref<PlotDataAndSettings | null>(null);\n\n const uniqueValuesData = ref<UniqueValuesBySourceMap>({});\n const facetValuesData = ref<UniqueValuesBySourceMap>({});\n const filterSuggestionsData = ref<FilterSuggestionsBySourceMap>({});\n const filterLabelsInfo = ref<FilterLabelsInfoBySourceMap>({}); // for auto titles of chart if something selected in filter/tabby\n\n const dendroTableData = ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>(null);\n\n // toRaw removes Vue proxy from dataStore.pframe (PFrame api)\n const store = computed(() => factoryStore(\n reactiveState,\n dataStoreRef,\n inputGuide,\n chartData,\n dendroTableData,\n uniqueValuesData,\n facetValuesData,\n filterSuggestionsData,\n filterLabelsInfo,\n readonlyInputs,\n defaultPalette,\n ));\n\n watch(() => dataStoreRef.value, () => {\n filterLabelsInfo.value = {};\n uniqueValuesData.value = {};\n facetValuesData.value = {};\n filterSuggestionsData.value = {}; // reset saved data; avoid caching of empty results from old empty pframe\n });\n\n const defaultOptionsCounter = ref(0);\n watch([\n () => dataStoreRef.value,\n () => defaultOptionsRef.value,\n ], async ([ds, defaultOptions]) => {\n if (!defaultOptions || defaultOptions?.length === 0 || !ds) {\n return;\n }\n defaultOptionsCounter.value++;\n const counter = defaultOptionsCounter.value;\n store.value.loading.defaults = true;\n if (reactiveState.usedDefaultOptions === null) {\n store.value.loading.initialInputGuide = true;\n }\n const loadedDefaultOptions = await loadDefaultSources(ds, defaultOptions, reactiveState.usedDefaultOptions);\n if (defaultOptionsCounter.value !== counter) {\n return;\n }\n const { usedDefaultOptions, optionsState } = reactiveState;\n const needsToBeUpdated = isOptionsStateNeedsToBeUpdated(optionsState, usedDefaultOptions, loadedDefaultOptions);\n if (!needsToBeUpdated) {\n store.value.loading.defaults = false;\n return;\n }\n store.value.loading.initialCharts = true; // we want to show loader when default are really changed and new chart data is requested\n reactiveState.optionsState.components = createUpdatedWithNewDefaultsOptionsState(optionsState, usedDefaultOptions, loadedDefaultOptions);\n reactiveState.usedDefaultOptions = loadedDefaultOptions;\n }, { immediate: true });\n\n // recalculate input guide - options for every data input, consistency info etc\n const inputGuideCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState,\n () => dataStoreRef.value,\n () => fixedOptionsRef.value,\n ], async ([optionsState, ds, fixedOptions]) => {\n if (defaultOptionsRef.value === null || dataStoreRef.value === null) { // they are not ready, waiting for them\n return;\n }\n inputGuideCounter.value++;\n const counter = inputGuideCounter.value;\n store.value.loading.inputGuide = true;\n const ignoredIds = ds && fixedOptions ? Object.values(await loadDefaultSources(ds, fixedOptions, null, false)).flatMap((item) => item.map((s) => s.selectedSource)) : [];\n\n // const start = Date.now();\n const nextInputGuide = ds ? await controller.calculateOptions(toRaw(ds), optionsState, ignoredIds, dataColumnPredicate, metaColumnPredicate) : controller.getEmptyInputGuide(optionsState);\n // console.log('input guide', Date.now() - start);\n\n if (counter === inputGuideCounter.value) { // race condition check\n inputGuide.value = nextInputGuide;\n\n store.value.loading.defaults = false;\n store.value.loading.inputGuide = false;\n if (store.value.loading.initialInputGuide) {\n store.value.loading.initialInputGuide = false;\n }\n }\n }, { immediate: true, deep: true });\n\n // recalculate data for chart rendering (miplots4)\n const chartDataCounter = ref(0); // to avoid race condition on async calculations\n watch(() => inputGuide.value, async (ig) => {\n chartDataCounter.value++;\n const counter = chartDataCounter.value;\n\n store.value.loading.chartData = true;\n\n const ds = toRaw(dataStoreRef.value);\n // const start = Date.now();\n const nextChartData = await loadDataForPlot(ig, reactiveState, ds, fixedOptionsRef.value);\n\n if (nextChartData && ds) {\n const { uniqueValues, filterSuggestions } = await getUniqueValuesFromReadyChartData(\n nextChartData, ig, reactiveState.optionsState.components, controller, ds, toRaw(filterSuggestionsData.value),\n );\n uniqueValuesData.value = uniqueValues;\n facetValuesData.value = getFacetValuesFromReadyChartData(\n nextChartData,\n reactiveState.optionsState.components,\n );\n filterSuggestionsData.value = filterSuggestions;\n updateDataBindAes(reactiveState.optionsState, reactiveState.dataBindAes, uniqueValuesData.value);\n } else {\n facetValuesData.value = {};\n }\n filterLabelsInfo.value = ds\n ? await loadFilterLabelsForTitle(reactiveState.optionsState.components, ig, controller, ds)\n : {};\n // console.log('chart data', Date.now() - start);\n\n if (counter === chartDataCounter.value) { // race condition check\n chartData.value = nextChartData;\n if (ig.ready) {\n store.value.loading.initialCharts = false;\n }\n store.value.loading.chartData = false;\n }\n }, { immediate: true, deep: true });\n\n // watch data for table, only dendro chart; data is also using for popup by tree node click\n if (reactiveState.chartType === 'dendro') {\n const dendroDataCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState as DendroUIState,\n () => dataStoreRef.value,\n () => inputGuide.value.readyData,\n () => fixedOptionsRef.value,\n ], async ([optionsState, dataStore, ready, fixed]) => {\n if (ready && dataStore) {\n dendroDataCounter.value++;\n const counter = dendroDataCounter.value;\n store.value.loading.dendroTableData = true;\n const state = (await addFixedOptionsToState(optionsState, dataStore, fixed)) as DendroUIState;\n const nextDendroTableData = await (controller as unknown as DendroStateController).createTableData(dataStore, state);\n\n if (dendroDataCounter.value === counter) {\n dendroTableData.value = nextDendroTableData;\n }\n store.value.loading.dendroTableData = false;\n }\n }, { immediate: true });\n }\n\n provide(storeKey, store);\n return store;\n}\n\nexport function useStore() {\n return notEmpty(inject<ComputedStore>(storeKey), 'Empty store');\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqDA,SAAS,EAAuB,GAAsB,GAAsC;CAC1F,IAAM,IAAe,EAAS,EAAsB,EAAU,CAAC;AAC/D,KAAI,GAAc,SAAS,EACzB,QAAO;CAET,IAAM,IAAmB,EAAS,EAAa;AAE/C,QAAO;EACL,GAAG;EACH,GAAG;EACH,YAAY;GACV,GAAG,EAAa;GAChB,GAAG,EAAiB;GACrB;EACF;;AAGH,SAAgB,EACd,GACA,GACyB;AACzB,QAAO,EAAS;EACH;EAEX,cAAc,EAAuB,GAAW,EAAY,aAAa;EAEzE,oBAAoB,EAAY,qBAAqB,EAAS,EAAY,sBAAsB,EAAE,CAAC,GAAyC;EAG5I,UAAU,EAAmB,EAAY,UAAU,EAAU;EAC7D,oBAAoB,EAA0B,GAAW,EAAY,mBAAmB;EACxF,gBAAgB,EAAyB,EAAY,eAAe;EACpE,cAAc,EAAuB,GAAW,EAAY,aAAa;EAEzE,aAAa,EAAS,EAAY,eAAe,EAAE,CAAC;EACpD,YAAY,EAAY,aAAa;EACrC,oBAAoB;EACpB,YAAY,EAAY,eAAe,KAAA,IAAY,gBAAgB,EAAY;EAC/E,iBAAiB,GAAS,CAAC,QAAQ,GAAK,OACtC,EAAI,KAAW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IAAM,IAAoB,EAAI,EAAE;AAChC,IAAM;SACE,EAAc;SACd,EAAa;SACb,EAAW,MAAM;SACjB,EAAgB;GACvB,EAAE,OAAO,CAAC,GAAc,GAAW,GAAO,OAAW;AACpD,OAAI,KAAS,GAAW;AACtB,MAAkB;IAClB,IAAM,IAAU,EAAkB;AAClC,MAAM,MAAM,QAAQ,kBAAkB;IACtC,IAAM,IAAS,MAAM,EAAuB,GAAc,GAAW,EAAM,EACrE,IAAsB,MAAO,EAAgD,gBAAgB,GAAW,EAAM;AAKpH,IAHI,EAAkB,UAAU,MAC9B,EAAgB,QAAQ,IAE1B,EAAM,MAAM,QAAQ,kBAAkB;;KAEvC,EAAE,WAAW,IAAM,CAAC;;AAIzB,QADA,EAAQ,GAAU,EAAM,EACjB;;AAGT,SAAgB,IAAW;AACzB,QAAO,EAAS,EAAsB,EAAS,EAAE,cAAc"}
|
|
1
|
+
{"version":3,"file":"store.js","names":[],"sources":["../src/store.ts"],"sourcesContent":["import type {\n ChartType,\n DemoDataStore,\n DendroStateController,\n DendroUIState,\n InputGuide,\n InputNamesByChartType,\n InputState,\n PlotDataAndSettings,\n} from '@milaboratories/pf-plots';\nimport {\n getControllerByType,\n getInitialStateByType,\n} from '@milaboratories/pf-plots';\nimport type { PColumnSpec } from '@platforma-sdk/model';\nimport type { CategoricalPalette, ContinuousPalette, Palette } from './components/AesSettings/types';\nimport type { ComputedRef, Reactive, Ref } from 'vue';\nimport { computed, inject, provide, reactive, ref, toRaw, watch } from 'vue';\nimport type { AesType } from './constantsCommon';\nimport {\n getInitialAxesSettings,\n getInitialLayersSettings,\n getInitialStatisticsState,\n getInitialTemplate,\n} from './constantsCommon';\nimport { updateDataBindAes } from './dataBindAes';\nimport { notEmpty } from './helpers';\nimport { storeKey } from './keys';\nimport type {\n DefaultPalettes,\n DendroNodeInfo,\n FilterLabelsInfoBySourceMap,\n FilterSuggestionsBySourceMap,\n GraphMakerProps,\n GraphMakerState,\n ReactiveState, UniqueValuesBySourceMap,\n} from './types';\nimport type { LoadedDefaultOptionsMap } from './utils';\nimport { createUpdatedWithNewDefaultsOptionsState, isOptionsStateNeedsToBeUpdated, loadDefaultSources } from './utils';\nimport { addFixedOptionsToState } from './utils/addFixedOptionsToState';\nimport { calculateDiscreteGroups } from './utils/calculateDiscreteGroups';\nimport { copyJSON } from './utils/copyJSON';\nimport { loadDataForPlot } from './utils/createChartSettingsForRender/composeChartSettings';\nimport { getUsedAesInMapping } from './utils/getUsedAesInMapping';\nimport {\n getFacetValuesFromReadyChartData,\n getUniqueValuesFromReadyChartData,\n loadFilterLabelsForTitle,\n} from './utils/loadUniqueValuesToSave';\nimport type { FormKey } from './forms';\nimport { tabKeys } from './forms';\nimport { DEFAULT_CATEGORICAL_PALETTE, DEFAULT_CONTINUOUS_PALETTE } from './constantsAesthetic';\n\nfunction getInitialOptionsState(chartType: ChartType, optionsState: InputState | undefined) {\n const defaultState = copyJSON(getInitialStateByType(chartType));\n if (optionsState?.type !== chartType) {\n return defaultState;\n }\n const optionsStateCopy = copyJSON(optionsState);\n\n return {\n ...defaultState,\n ...optionsStateCopy,\n components: {\n ...defaultState.components,\n ...optionsStateCopy.components,\n },\n };\n}\n\nexport function createReactiveState(\n initialData: GraphMakerState,\n chartType: ChartType,\n): Reactive<ReactiveState> {\n return reactive({\n chartType: chartType,\n // from pf-plots\n optionsState: getInitialOptionsState(chartType, initialData.optionsState), // contains user selected inputs\n // previously used default options\n usedDefaultOptions: initialData.usedDefaultOptions ? copyJSON(initialData.usedDefaultOptions ?? {}) as LoadedDefaultOptionsMap<ChartType> : null,\n\n // local form states, updates directly in forms\n template: getInitialTemplate(initialData.template, chartType),\n statisticsSettings: getInitialStatisticsState(chartType, initialData.statisticsSettings),\n layersSettings: getInitialLayersSettings(initialData.layersSettings),\n axesSettings: getInitialAxesSettings(chartType, initialData.axesSettings),\n // common aesthetics data mapped on columns/axes values\n dataBindAes: copyJSON(initialData.dataBindAes ?? {}),\n chartScale: initialData.zoomState ?? 100,\n lassoControlsState: null,\n currentTab: initialData.currentTab === undefined ? 'dataMapping' : initialData.currentTab,\n tabDefaultState: tabKeys().reduce((res, formKey: FormKey) => {\n res[formKey] = {};\n return res;\n }, {} as Record<FormKey, Record<string, boolean>>),\n dendroInfoByClick: null as null | DendroNodeInfo,\n dendroSelectedNodeId: null,\n showTooltipHint: false,\n tooltipHintWasShown: initialData.tooltipHintWasShown ?? false,\n });\n}\n\nexport interface Store {\n reactive: Reactive<ReactiveState>;\n loading: {\n initialInputGuide: boolean;\n initialCharts: boolean;\n initialDefaults: boolean;\n inputGuide: boolean;\n chartData: boolean;\n defaults: boolean;\n chartRendering: boolean;\n dendroTableData: boolean;\n };\n commonHelpersData: {\n primaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n secondaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n usedAesInMapping: ComputedRef<Record<string, Record<AesType, boolean>>>;\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>;\n };\n controller: ReturnType<typeof getControllerByType>;\n columnsDataStore: Ref<DemoDataStore | null>;\n inputGuide: Ref<InputGuide<InputState>>;\n chartData: Ref<PlotDataAndSettings | null>;\n uniqueValuesData: Ref<UniqueValuesBySourceMap>;\n facetValuesData: Ref<UniqueValuesBySourceMap>;\n filterSuggestionsData: Ref<FilterSuggestionsBySourceMap>;\n filterLabelsInfo: Ref<FilterLabelsInfoBySourceMap>;\n readonlyInputs?: InputNamesByChartType[ChartType][];\n defaultPalette: DefaultPalettes;\n}\n\nexport function factoryStore(\n reactiveState: Reactive<ReactiveState>,\n dataStore: Ref<DemoDataStore | null>,\n inputGuide: Ref<InputGuide<InputState>>,\n chartData: Ref<PlotDataAndSettings | null>,\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>,\n uniqueValuesData: Ref<UniqueValuesBySourceMap>,\n facetValuesData: Ref<UniqueValuesBySourceMap>,\n filterSuggestionsData: Ref<FilterSuggestionsBySourceMap>,\n filterLabelsInfo: Ref<FilterLabelsInfoBySourceMap>,\n readonlyInputs?: InputNamesByChartType[ChartType][],\n defaultPalette?: Palette | { categorical?: Palette; continuous?: Palette },\n): Store {\n return {\n reactive: reactiveState,\n loading: reactive({\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n defaults: false,\n chartRendering: false,\n dendroTableData: false,\n }),\n commonHelpersData: {\n primaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'primaryGrouping',\n ),\n ),\n secondaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'secondaryGrouping',\n ),\n ),\n usedAesInMapping: computed<Record<string, Record<AesType, boolean>>>(() =>\n getUsedAesInMapping(\n reactiveState.chartType,\n reactiveState.template,\n reactiveState.layersSettings,\n reactiveState.statisticsSettings,\n reactiveState.optionsState,\n inputGuide.value,\n ),\n ),\n dendroTableData,\n },\n controller: getControllerByType(reactiveState.chartType),\n columnsDataStore: dataStore,\n inputGuide,\n chartData,\n uniqueValuesData,\n facetValuesData,\n filterSuggestionsData,\n filterLabelsInfo,\n readonlyInputs,\n defaultPalette: {\n categorical: typeof defaultPalette === 'object' && defaultPalette.categorical\n ? defaultPalette.categorical as CategoricalPalette\n : typeof defaultPalette === 'string' ? defaultPalette as CategoricalPalette : DEFAULT_CATEGORICAL_PALETTE,\n continuous: typeof defaultPalette === 'object' && defaultPalette.continuous\n ? defaultPalette.continuous as ContinuousPalette\n : typeof defaultPalette === 'string' ? defaultPalette as ContinuousPalette : DEFAULT_CONTINUOUS_PALETTE,\n },\n };\n}\n\nexport type ComputedStore = ComputedRef<Store>;\n\nexport function provideStore(\n initialState: GraphMakerState,\n dataStoreRef: Ref<DemoDataStore | null>,\n chartType: ChartType,\n defaultOptionsRef: Ref<GraphMakerProps['defaultOptions']>,\n fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>,\n dataColumnPredicate?: (spec: PColumnSpec) => boolean,\n metaColumnPredicate?: (spec: PColumnSpec) => boolean,\n readonlyInputs?: InputNamesByChartType[ChartType][],\n defaultPalette?: GraphMakerProps['defaultPalette'],\n) {\n const reactiveState = createReactiveState(initialState, chartType);\n const controller = getControllerByType(reactiveState.chartType);\n\n const inputGuide = ref<InputGuide<InputState>>(getControllerByType(reactiveState.chartType).getEmptyInputGuide(reactiveState.optionsState));\n const chartData = ref<PlotDataAndSettings | null>(null);\n\n const uniqueValuesData = ref<UniqueValuesBySourceMap>({});\n const facetValuesData = ref<UniqueValuesBySourceMap>({});\n const filterSuggestionsData = ref<FilterSuggestionsBySourceMap>({});\n const filterLabelsInfo = ref<FilterLabelsInfoBySourceMap>({}); // for auto titles of chart if something selected in filter/tabby\n\n const dendroTableData = ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>(null);\n\n // toRaw removes Vue proxy from dataStore.pframe (PFrame api)\n const store = computed(() => factoryStore(\n reactiveState,\n dataStoreRef,\n inputGuide,\n chartData,\n dendroTableData,\n uniqueValuesData,\n facetValuesData,\n filterSuggestionsData,\n filterLabelsInfo,\n readonlyInputs,\n defaultPalette,\n ));\n\n watch(() => dataStoreRef.value, () => {\n filterLabelsInfo.value = {};\n uniqueValuesData.value = {};\n facetValuesData.value = {};\n filterSuggestionsData.value = {}; // reset saved data; avoid caching of empty results from old empty pframe\n });\n\n const defaultOptionsCounter = ref(0);\n watch([\n () => dataStoreRef.value,\n () => defaultOptionsRef.value,\n ], async ([ds, defaultOptions]) => {\n if (!defaultOptions || defaultOptions?.length === 0 || !ds) {\n return;\n }\n defaultOptionsCounter.value++;\n const counter = defaultOptionsCounter.value;\n store.value.loading.defaults = true;\n if (reactiveState.usedDefaultOptions === null) {\n store.value.loading.initialInputGuide = true;\n }\n const loadedDefaultOptions = await loadDefaultSources(ds, defaultOptions, reactiveState.usedDefaultOptions);\n if (defaultOptionsCounter.value !== counter) {\n return;\n }\n const { usedDefaultOptions, optionsState } = reactiveState;\n const needsToBeUpdated = isOptionsStateNeedsToBeUpdated(optionsState, usedDefaultOptions, loadedDefaultOptions);\n if (!needsToBeUpdated) {\n store.value.loading.defaults = false;\n return;\n }\n store.value.loading.initialCharts = true; // we want to show loader when default are really changed and new chart data is requested\n reactiveState.optionsState.components = createUpdatedWithNewDefaultsOptionsState(optionsState, usedDefaultOptions, loadedDefaultOptions);\n reactiveState.usedDefaultOptions = loadedDefaultOptions;\n }, { immediate: true });\n\n // recalculate input guide - options for every data input, consistency info etc\n const inputGuideCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState,\n () => dataStoreRef.value,\n () => fixedOptionsRef.value,\n ], async ([optionsState, ds, fixedOptions]) => {\n if (defaultOptionsRef.value === null || dataStoreRef.value === null) { // they are not ready, waiting for them\n return;\n }\n inputGuideCounter.value++;\n const counter = inputGuideCounter.value;\n store.value.loading.inputGuide = true;\n const ignoredIds = ds && fixedOptions ? Object.values(await loadDefaultSources(ds, fixedOptions, null, false)).flatMap((item) => item.map((s) => s.selectedSource)) : [];\n\n // const start = Date.now();\n const nextInputGuide = ds ? await controller.calculateOptions({ store: toRaw(ds), state: optionsState, fixedIds: ignoredIds, dataColumnPredicate, metaColumnPredicate }) : controller.getEmptyInputGuide(optionsState);\n // console.log('input guide', Date.now() - start);\n\n if (counter === inputGuideCounter.value) { // race condition check\n inputGuide.value = nextInputGuide;\n\n store.value.loading.defaults = false;\n store.value.loading.inputGuide = false;\n if (store.value.loading.initialInputGuide) {\n store.value.loading.initialInputGuide = false;\n }\n }\n }, { immediate: true, deep: true });\n\n // recalculate data for chart rendering (miplots4)\n const chartDataCounter = ref(0); // to avoid race condition on async calculations\n watch(() => inputGuide.value, async (ig) => {\n chartDataCounter.value++;\n const counter = chartDataCounter.value;\n\n store.value.loading.chartData = true;\n\n const ds = toRaw(dataStoreRef.value);\n // const start = Date.now();\n const nextChartData = await loadDataForPlot(ig, reactiveState, ds, fixedOptionsRef.value);\n\n if (nextChartData && ds) {\n const { uniqueValues, filterSuggestions } = await getUniqueValuesFromReadyChartData(\n nextChartData, ig, reactiveState.optionsState.components, controller, ds, toRaw(filterSuggestionsData.value),\n );\n uniqueValuesData.value = uniqueValues;\n facetValuesData.value = getFacetValuesFromReadyChartData(\n nextChartData,\n reactiveState.optionsState.components,\n );\n filterSuggestionsData.value = filterSuggestions;\n updateDataBindAes(reactiveState.optionsState, reactiveState.dataBindAes, uniqueValuesData.value);\n } else {\n facetValuesData.value = {};\n }\n filterLabelsInfo.value = ds\n ? await loadFilterLabelsForTitle(reactiveState.optionsState.components, ig, controller, ds)\n : {};\n // console.log('chart data', Date.now() - start);\n\n if (counter === chartDataCounter.value) { // race condition check\n chartData.value = nextChartData;\n if (ig.ready) {\n store.value.loading.initialCharts = false;\n }\n store.value.loading.chartData = false;\n }\n }, { immediate: true, deep: true });\n\n // watch data for table, only dendro chart; data is also using for popup by tree node click\n if (reactiveState.chartType === 'dendro') {\n const dendroDataCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState as DendroUIState,\n () => dataStoreRef.value,\n () => inputGuide.value.readyData,\n () => fixedOptionsRef.value,\n ], async ([optionsState, dataStore, ready, fixed]) => {\n if (ready && dataStore) {\n dendroDataCounter.value++;\n const counter = dendroDataCounter.value;\n store.value.loading.dendroTableData = true;\n const state = (await addFixedOptionsToState(optionsState, dataStore, fixed)) as DendroUIState;\n const nextDendroTableData = await (controller as unknown as DendroStateController).createTableData(dataStore, state);\n\n if (dendroDataCounter.value === counter) {\n dendroTableData.value = nextDendroTableData;\n }\n store.value.loading.dendroTableData = false;\n }\n }, { immediate: true });\n }\n\n provide(storeKey, store);\n return store;\n}\n\nexport function useStore() {\n return notEmpty(inject<ComputedStore>(storeKey), 'Empty store');\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqDA,SAAS,EAAuB,GAAsB,GAAsC;CAC1F,IAAM,IAAe,EAAS,EAAsB,EAAU,CAAC;AAC/D,KAAI,GAAc,SAAS,EACz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7 @@ export declare function composeBubbleSettings(settings: BubbleSettings, reactive
|
|
|
129
129
|
method?: "sum" | "mean" | "median" | "min" | "max" | undefined;
|
|
130
130
|
} | undefined;
|
|
131
131
|
NAValueAs?: number | null | undefined;
|
|
132
|
+
showEmptyRows?: boolean | undefined;
|
|
133
|
+
showEmptyColumns?: boolean | undefined;
|
|
132
134
|
};
|
|
133
135
|
//# sourceMappingURL=composeBubbleSettings.d.ts.map
|