@milaboratories/graph-maker 1.1.195 → 1.1.197
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue2.js +127 -130
- package/dist/components/AesSettings/AesDataMappingDiscrete.vue2.js.map +1 -1
- package/dist/components/AesSettings/DiscreteRow.vue2.js +18 -18
- package/dist/components/AesSettings/DiscreteRow.vue2.js.map +1 -1
- package/dist/components/AesSettings/DiscreteRow.vue3.js +10 -8
- package/dist/components/AesSettings/DiscreteRow.vue3.js.map +1 -1
- package/dist/components/Chart.vue.js +118 -112
- package/dist/components/Chart.vue.js.map +1 -1
- package/dist/components/CollapsableBlock.vue.d.ts +1 -0
- package/dist/components/CollapsableBlock.vue.js +27 -21
- package/dist/components/CollapsableBlock.vue.js.map +1 -1
- package/dist/constantsCommon.d.ts +2 -0
- package/dist/constantsCommon.js +24 -16
- package/dist/constantsCommon.js.map +1 -1
- package/dist/forms/AxesSettingsForm/BubbleAxesSettingsForm.vue.js +156 -117
- package/dist/forms/AxesSettingsForm/BubbleAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +162 -134
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +175 -153
- package/dist/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/HistogramAxesSettingsForm.vue.js +177 -136
- package/dist/forms/AxesSettingsForm/HistogramAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js +243 -203
- package/dist/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/Bubble.vue.js +39 -43
- package/dist/forms/LayersForm/Layer/Bubble.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/Bar.vue.js +30 -34
- package/dist/forms/LayersForm/Layer/discrete/Bar.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/Errorbar.vue.js +24 -26
- package/dist/forms/LayersForm/Layer/discrete/Errorbar.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/Line.vue.js +27 -29
- package/dist/forms/LayersForm/Layer/discrete/Line.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/StackedArea.vue.js +38 -43
- package/dist/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/discrete/StackedBar.vue.js +31 -36
- package/dist/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +53 -57
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js +70 -74
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.vue.js +1 -1
- package/dist/store.d.ts +3 -4
- package/dist/store.js +25 -26
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +1 -1
- package/dist/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -2
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js +22 -22
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +7 -5
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +1 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +2 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js +12 -12
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +11 -11
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/getAxesDataFromForms.js +17 -17
- package/dist/utils/createChartSettingsForRender/getAxesDataFromForms.js.map +1 -1
- package/dist/utils/loadUniqueValuesToSave.d.ts +2 -3
- package/dist/utils/loadUniqueValuesToSave.js +2 -2
- package/dist/utils/loadUniqueValuesToSave.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errorbar.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/Errorbar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { PlDropdown, Slider } from '@platforma-sdk/ui-vue';\nimport { computed } from 'vue';\nimport type { AesOption, DotShape } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport { DEFAULT_BLACK } from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\n\nconst store = useStore();\nconst layer = 'errorbar';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\nconst lineColor = computed(() =>\n useDefaultAes(\n settings.value.lineColor,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n ),\n);\nconst dotFill = computed(() => useDefaultAes(\n settings.value.dotFill,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n),\n);\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'lineColor' | 'dotFill',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\nfunction onUpdateDot(\n value: DotShape | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'dotShape' | 'dotFill',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value === 'object') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst ERROR_OPTIONS: { text: string; value: string }[] = [\n { text: 'Standard deviation', value: 'sd' },\n { text: 'Standard error', value: 'se' },\n { text: 'Confident interval', value: 'ci' },\n];\n\nconst POINT_OPTIONS
|
|
1
|
+
{"version":3,"file":"Errorbar.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/Errorbar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { PlDropdown, Slider } from '@platforma-sdk/ui-vue';\nimport { computed } from 'vue';\nimport type { AesOption, DotShape } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport { DEFAULT_BLACK } from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer = 'errorbar';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\nconst lineColor = computed(() =>\n useDefaultAes(\n settings.value.lineColor,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n ),\n);\nconst dotFill = computed(() => useDefaultAes(\n settings.value.dotFill,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n),\n);\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'lineColor' | 'dotFill',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\nfunction onUpdateDot(\n value: DotShape | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'dotShape' | 'dotFill',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value === 'object') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst ERROR_OPTIONS: { text: string; value: string }[] = [\n { text: 'Standard deviation', value: 'sd' },\n { text: 'Standard error', value: 'se' },\n { text: 'Confident interval', value: 'ci' },\n];\n\nconst POINT_OPTIONS = AGGREGATION_METHOD_OPTIONS;\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n },\n});\n</script>\n\n<template>\n <AesSelector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <AesSelector\n label=\"Dot fill\"\n form-title=\"Dot Fill Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"dotFill\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'dotFill')\"\n />\n <AesSelector\n label=\"Dot shape\"\n form-title=\"Dot Shape Settings\"\n form-back-title=\"Layers\"\n type=\"dotShape\"\n :selected=\"settings.dotShape\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n @aes-update=\"(v, c) => onUpdateDot(v, c, 'dotShape')\"\n />\n <div class=\"input-item\" @click.stop>\n <PlDropdown\n v-model=\"settings.pointsValues\"\n label=\"Point value\"\n :options=\"POINT_OPTIONS\"\n />\n </div>\n <div class=\"input-item\" @click.stop>\n <PlDropdown\n v-model=\"settings.interval\"\n label=\"Interval\"\n :options=\"ERROR_OPTIONS\"\n />\n </div>\n <Slider\n v-model=\"opacity\"\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n />\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","lineColor","useDefaultAes","DEFAULT_BLACK","dotFill","onUpdate","value","colorOption","field","onUpdateDot","ERROR_OPTIONS","POINT_OPTIONS","AGGREGATION_METHOD_OPTIONS","opacity","newValue","_createVNode","AesSelector","_cache","v","c","_createElementVNode","_unref","PlDropdown","$event","Slider"],"mappings":";;;;;;;AAaA,MAAMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAEvBK,IAAYF;AAAA,MAAS,MACzBG;AAAA,QACEJ,EAAS,MAAM;AAAA,QACfE,EAAa;AAAA,QACbG;AAAA,QACA;AAAA,MAAA;AAAA,IACF,GAEIC,IAAUL;AAAA,MAAS,MAAMG;AAAA,QAC7BJ,EAAS,MAAM;AAAA,QACfE,EAAa;AAAA,QACbG;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAEA,aAASE,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvBX,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEa,CAAK,IAAI,EAAE,MAAMD,EAAY,UAAA,IAExEX,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEa,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DV,EAAM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import { useStore as
|
|
3
|
-
import { PlDropdown as
|
|
4
|
-
import { useDefaultAes as
|
|
1
|
+
import { defineComponent as A, computed as r, createElementBlock as U, openBlock as L, Fragment as N, createVNode as i, createElementVNode as v, withModifiers as f, unref as u } from "vue";
|
|
2
|
+
import { useStore as D } from "../../../../store.js";
|
|
3
|
+
import { PlDropdown as G, PlNumberField as F, Slider as B } from "@platforma-sdk/ui-vue";
|
|
4
|
+
import { useDefaultAes as c } from "./utils.js";
|
|
5
5
|
import { DEFAULT_BLACK as g } from "../../../../constantsAesthetic.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import p from "../../AesSelector.vue.js";
|
|
7
|
+
import { AGGREGATION_METHOD_OPTIONS as E } from "../../../../constantsCommon.js";
|
|
8
|
+
const n = "line", R = /* @__PURE__ */ A({
|
|
8
9
|
__name: "Line",
|
|
9
|
-
setup(
|
|
10
|
-
const a =
|
|
10
|
+
setup(P) {
|
|
11
|
+
const a = D(), o = r(() => a.value.reactive.layersSettings[n]), d = r(
|
|
11
12
|
() => a.value.reactive.optionsState
|
|
12
13
|
), S = r(
|
|
13
|
-
() =>
|
|
14
|
+
() => c(
|
|
14
15
|
o.value.lineColor,
|
|
15
16
|
d.value,
|
|
16
17
|
g,
|
|
17
18
|
!0
|
|
18
19
|
)
|
|
19
20
|
), b = r(
|
|
20
|
-
() =>
|
|
21
|
+
() => c(
|
|
21
22
|
o.value.dotFill,
|
|
22
23
|
d.value,
|
|
23
24
|
g,
|
|
@@ -30,20 +31,17 @@ const n = "line", K = /* @__PURE__ */ A({
|
|
|
30
31
|
function C(l, e, t) {
|
|
31
32
|
e.type === "dataCategorical" ? a.value.reactive.layersSettings[n][t] = { type: e.inputName } : a.value.reactive.layersSettings[n][t] = l, e.type === "dataCategorical" && typeof l == "object" && (a.value.reactive.dataBindAes[e.selectedSource] = l);
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function T(l, e, t) {
|
|
34
35
|
e.type === "dataCategorical" ? a.value.reactive.layersSettings[n][t] = { type: e.inputName } : a.value.reactive.layersSettings[n][t] = l, e.type === "dataCategorical" && typeof l == "object" && (a.value.reactive.dataBindAes[e.selectedSource] = l);
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
{ text: "Mean", value: "mean" },
|
|
38
|
-
{ text: "Median", value: "median" }
|
|
39
|
-
], y = r({
|
|
37
|
+
const k = E, y = r({
|
|
40
38
|
get: () => o.value.opacity * 100,
|
|
41
39
|
set: (l) => {
|
|
42
40
|
o.value.opacity = l / 100;
|
|
43
41
|
}
|
|
44
42
|
});
|
|
45
|
-
return (l, e) => (
|
|
46
|
-
i(
|
|
43
|
+
return (l, e) => (L(), U(N, null, [
|
|
44
|
+
i(p, {
|
|
47
45
|
label: "Stroke color",
|
|
48
46
|
"form-title": "Stroke Color Settings",
|
|
49
47
|
"form-back-title": "Layers",
|
|
@@ -52,16 +50,16 @@ const n = "line", K = /* @__PURE__ */ A({
|
|
|
52
50
|
"possible-aes-source-inputs": ["secondaryGrouping"],
|
|
53
51
|
onAesUpdate: e[0] || (e[0] = (t, s) => m(t, s, "lineColor"))
|
|
54
52
|
}, null, 8, ["selected"]),
|
|
55
|
-
i(
|
|
53
|
+
i(p, {
|
|
56
54
|
label: "Line Type",
|
|
57
55
|
"form-title": "Line Type Settings",
|
|
58
56
|
"form-back-title": "Layers",
|
|
59
57
|
type: "lineType",
|
|
60
58
|
"possible-aes-source-inputs": ["secondaryGrouping"],
|
|
61
59
|
selected: V.value,
|
|
62
|
-
onAesUpdate: e[1] || (e[1] = (t, s) =>
|
|
60
|
+
onAesUpdate: e[1] || (e[1] = (t, s) => T(t, s, "lineType"))
|
|
63
61
|
}, null, 8, ["selected"]),
|
|
64
|
-
i(
|
|
62
|
+
i(p, {
|
|
65
63
|
label: "Dot fill",
|
|
66
64
|
"form-title": "Dot Fill Settings",
|
|
67
65
|
"form-back-title": "Layers",
|
|
@@ -70,7 +68,7 @@ const n = "line", K = /* @__PURE__ */ A({
|
|
|
70
68
|
"possible-aes-source-inputs": ["secondaryGrouping"],
|
|
71
69
|
onAesUpdate: e[2] || (e[2] = (t, s) => m(t, s, "dotFill"))
|
|
72
70
|
}, null, 8, ["selected"]),
|
|
73
|
-
i(
|
|
71
|
+
i(p, {
|
|
74
72
|
label: "Dot shape",
|
|
75
73
|
"form-title": "Dot Shape Settings",
|
|
76
74
|
"form-back-title": "Layers",
|
|
@@ -81,28 +79,28 @@ const n = "line", K = /* @__PURE__ */ A({
|
|
|
81
79
|
}, null, 8, ["selected"]),
|
|
82
80
|
v("div", {
|
|
83
81
|
class: "input-item",
|
|
84
|
-
onClick: e[5] || (e[5] =
|
|
82
|
+
onClick: e[5] || (e[5] = f(() => {
|
|
85
83
|
}, ["stop"]))
|
|
86
84
|
}, [
|
|
87
|
-
i(
|
|
85
|
+
i(u(G), {
|
|
88
86
|
modelValue: o.value.pointsValues,
|
|
89
87
|
"onUpdate:modelValue": e[4] || (e[4] = (t) => o.value.pointsValues = t),
|
|
90
88
|
label: "Point value",
|
|
91
|
-
options:
|
|
92
|
-
}, null, 8, ["modelValue"])
|
|
89
|
+
options: u(k)
|
|
90
|
+
}, null, 8, ["modelValue", "options"])
|
|
93
91
|
]),
|
|
94
92
|
v("div", {
|
|
95
93
|
class: "input-item",
|
|
96
|
-
onClick: e[7] || (e[7] =
|
|
94
|
+
onClick: e[7] || (e[7] = f(() => {
|
|
97
95
|
}, ["stop"]))
|
|
98
96
|
}, [
|
|
99
|
-
i(
|
|
97
|
+
i(u(F), {
|
|
100
98
|
modelValue: o.value.emptyGroupValue,
|
|
101
99
|
"onUpdate:modelValue": e[6] || (e[6] = (t) => o.value.emptyGroupValue = t),
|
|
102
100
|
label: "Empty group value"
|
|
103
101
|
}, null, 8, ["modelValue"])
|
|
104
102
|
]),
|
|
105
|
-
i(
|
|
103
|
+
i(u(B), {
|
|
106
104
|
modelValue: y.value,
|
|
107
105
|
"onUpdate:modelValue": e[8] || (e[8] = (t) => y.value = t),
|
|
108
106
|
label: "Opacity",
|
|
@@ -116,6 +114,6 @@ const n = "line", K = /* @__PURE__ */ A({
|
|
|
116
114
|
}
|
|
117
115
|
});
|
|
118
116
|
export {
|
|
119
|
-
|
|
117
|
+
R as default
|
|
120
118
|
};
|
|
121
119
|
//# sourceMappingURL=Line.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Line.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/Line.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { PlDropdown, Slider, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { computed } from 'vue';\nimport type {\n AesOption,\n DotShape,\n} from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\n\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport { DEFAULT_BLACK } from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport type { LineType } from '../../../../components/AesSettings/types';\n\nconst store = useStore();\nconst layer = 'line';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\nconst lineColor = computed(() =>\n useDefaultAes(\n settings.value.lineColor,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n ),\n);\nconst dotFill = computed(() => useDefaultAes(\n settings.value.dotFill,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n),\n);\nconst lineType = computed(() => settings.value.lineType);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'lineColor' | 'dotFill',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateDot(\n value: DotShape | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'dotShape',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value === 'object') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateLineType(\n value: LineType | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'lineType',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value === 'object') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst POINT_OPTIONS
|
|
1
|
+
{"version":3,"file":"Line.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/Line.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { PlDropdown, Slider, PlNumberField } from '@platforma-sdk/ui-vue';\nimport { computed } from 'vue';\nimport type {\n AesOption,\n DotShape,\n} from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\n\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport { DEFAULT_BLACK } from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport type { LineType } from '../../../../components/AesSettings/types';\nimport { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer = 'line';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\nconst lineColor = computed(() =>\n useDefaultAes(\n settings.value.lineColor,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n ),\n);\nconst dotFill = computed(() => useDefaultAes(\n settings.value.dotFill,\n optionsState.value,\n DEFAULT_BLACK,\n true,\n),\n);\nconst lineType = computed(() => settings.value.lineType);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'lineColor' | 'dotFill',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateDot(\n value: DotShape | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'dotShape',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value === 'object') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nfunction onUpdateLineType(\n value: LineType | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'lineType',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = { type: colorOption.inputName };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value === 'object') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst POINT_OPTIONS = AGGREGATION_METHOD_OPTIONS;\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n },\n});\n</script>\n\n<template>\n <AesSelector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <AesSelector\n label=\"Line Type\"\n form-title=\"Line Type Settings\"\n form-back-title=\"Layers\"\n type=\"lineType\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n :selected=\"lineType\"\n @aes-update=\"(v, c) => onUpdateLineType(v, c, 'lineType')\"\n />\n <AesSelector\n label=\"Dot fill\"\n form-title=\"Dot Fill Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"dotFill\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'dotFill')\"\n />\n <AesSelector\n label=\"Dot shape\"\n form-title=\"Dot Shape Settings\"\n form-back-title=\"Layers\"\n type=\"dotShape\"\n :selected=\"settings.dotShape\"\n :possible-aes-source-inputs=\"['secondaryGrouping']\"\n @aes-update=\"(v, c) => onUpdateDot(v, c, 'dotShape')\"\n />\n <div class=\"input-item\" @click.stop>\n <PlDropdown\n v-model=\"settings.pointsValues\"\n label=\"Point value\"\n :options=\"POINT_OPTIONS\"\n />\n </div>\n <div class=\"input-item\" @click.stop>\n <PlNumberField\n v-model=\"settings.emptyGroupValue\"\n label=\"Empty group value\"\n />\n </div>\n <Slider\n v-model=\"opacity\"\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n />\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","lineColor","useDefaultAes","DEFAULT_BLACK","dotFill","lineType","onUpdate","value","colorOption","field","onUpdateDot","onUpdateLineType","POINT_OPTIONS","AGGREGATION_METHOD_OPTIONS","opacity","newValue","_createVNode","AesSelector","_cache","v","c","_createElementVNode","_unref","PlDropdown","$event","PlNumberField","Slider"],"mappings":";;;;;;;AAkBA,MAAMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAEvBK,IAAYF;AAAA,MAAS,MAC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A;AAAA,MAAA;MAEzCC,EAMM,OAAA;AAAA,QAND,OAAM;AAAA,QAAc,2BAAD,MAAA;AAAA,QAAA,GAAW,CAAA,MAAA,CAAA;AAAA,MAAA;QACjCL,EAIEM,EAAAC,CAAA,GAAA;AAAA,UAHS,YAAAzB,EAAA,MAAS;AAAA,UAAT,uBAAAoB,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAM,MAAA1B,EAAA,MAAS,eAAY0B;AAAA,UAC9B,OAAM;AAAA,UACL,SAASF,EAAAV,CAAA;AAAA,QAAA;;MAGdS,EAKM,OAAA;AAAA,QALD,OAAM;AAAA,QAAc,2BAAD,MAAA;AAAA,QAAA,GAAW,CAAA,MAAA,CAAA;AAAA,MAAA;QACjCL,EAGEM,EAAAG,CAAA,GAAA;AAAA,UAFS,YAAA3B,EAAA,MAAS;AAAA,UAAT,uBAAAoB,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAM,MAAA1B,EAAA,MAAS,kBAAe0B;AAAA,UACjC,OAAM;AAAA,QAAA;;MAGVR,EAQEM,EAAAI,CAAA,GAAA;AAAA,oBAPSZ,EAAA;AAAA,sDAAAA,EAAO,QAAAU;AAAA,QAChB,OAAM;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN,aAAa;AAAA,QACd,SAAQ;AAAA,MAAA;;;;"}
|
|
@@ -1,71 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useStore as
|
|
1
|
+
import { defineComponent as C, computed as s, createElementBlock as A, openBlock as O, Fragment as U, createVNode as a, createElementVNode as n, withModifiers as E, unref as r } from "vue";
|
|
2
|
+
import { useStore as T } from "../../../../store.js";
|
|
3
3
|
import { useDefaultAes as y } from "./utils.js";
|
|
4
|
-
import { DEFAULT_WHITE as
|
|
4
|
+
import { DEFAULT_WHITE as x, DEFAULT_BLACK as N } from "../../../../constantsAesthetic.js";
|
|
5
5
|
import b from "../../AesSelector.vue.js";
|
|
6
|
-
import { PlDropdown as
|
|
7
|
-
|
|
6
|
+
import { PlDropdown as B, Slider as c, PlCheckbox as V } from "@platforma-sdk/ui-vue";
|
|
7
|
+
import { AGGREGATION_METHOD_OPTIONS as w } from "../../../../constantsCommon.js";
|
|
8
|
+
const D = { class: "checkbox-item" }, F = { class: "checkbox-item" }, m = "stackedArea", R = /* @__PURE__ */ C({
|
|
8
9
|
__name: "StackedArea",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
10
|
+
setup(H) {
|
|
11
|
+
const i = T(), t = s(() => i.value.reactive.layersSettings[m]), p = s(
|
|
12
|
+
() => i.value.reactive.optionsState
|
|
12
13
|
), S = s(
|
|
13
|
-
() => y(t.value.fillColor,
|
|
14
|
+
() => y(t.value.fillColor, p.value, x)
|
|
14
15
|
), g = s(
|
|
15
|
-
() => y(t.value.lineColor,
|
|
16
|
+
() => y(t.value.lineColor, p.value, N)
|
|
16
17
|
);
|
|
17
|
-
function
|
|
18
|
-
e.type === "dataCategorical" ?
|
|
18
|
+
function d(o, e, l) {
|
|
19
|
+
e.type === "dataCategorical" ? i.value.reactive.layersSettings[m][l] = {
|
|
19
20
|
type: e.inputName
|
|
20
|
-
} :
|
|
21
|
+
} : i.value.reactive.layersSettings[m][l] = o, e.type === "dataCategorical" && typeof o != "string" && (i.value.reactive.dataBindAes[e.selectedSource] = o);
|
|
21
22
|
}
|
|
22
|
-
const k =
|
|
23
|
-
{ text: "Sum", value: "sum" },
|
|
24
|
-
{ text: "Min", value: "min" },
|
|
25
|
-
{ text: "Max", value: "max" },
|
|
26
|
-
{ text: "Mean", value: "mean" },
|
|
27
|
-
{ text: "Median", value: "median" }
|
|
28
|
-
], v = s({
|
|
23
|
+
const k = w, v = s({
|
|
29
24
|
get: () => t.value.barsOpacity * 100,
|
|
30
|
-
set: (
|
|
31
|
-
t.value.barsOpacity =
|
|
25
|
+
set: (o) => {
|
|
26
|
+
t.value.barsOpacity = o / 100;
|
|
32
27
|
}
|
|
33
28
|
}), f = s({
|
|
34
29
|
get: () => t.value.areaOpacity * 100,
|
|
35
|
-
set: (
|
|
36
|
-
t.value.areaOpacity =
|
|
30
|
+
set: (o) => {
|
|
31
|
+
t.value.areaOpacity = o / 100;
|
|
37
32
|
}
|
|
38
33
|
});
|
|
39
|
-
return (
|
|
40
|
-
|
|
34
|
+
return (o, e) => (O(), A(U, null, [
|
|
35
|
+
a(b, {
|
|
41
36
|
label: "Fill color",
|
|
42
37
|
"form-title": "Fill Color Settings",
|
|
43
38
|
"form-back-title": "Layers",
|
|
44
39
|
type: "fill",
|
|
45
40
|
selected: S.value,
|
|
46
|
-
onAesUpdate: e[0] || (e[0] = (l, u) =>
|
|
41
|
+
onAesUpdate: e[0] || (e[0] = (l, u) => d(l, u, "fillColor"))
|
|
47
42
|
}, null, 8, ["selected"]),
|
|
48
|
-
|
|
43
|
+
a(b, {
|
|
49
44
|
label: "Stroke color",
|
|
50
45
|
"form-title": "Stroke Color Settings",
|
|
51
46
|
"form-back-title": "Layers",
|
|
52
47
|
type: "stroke",
|
|
53
48
|
selected: g.value,
|
|
54
|
-
onAesUpdate: e[1] || (e[1] = (l, u) =>
|
|
49
|
+
onAesUpdate: e[1] || (e[1] = (l, u) => d(l, u, "lineColor"))
|
|
55
50
|
}, null, 8, ["selected"]),
|
|
56
|
-
|
|
51
|
+
n("div", {
|
|
57
52
|
class: "input-item",
|
|
58
|
-
onClick: e[3] || (e[3] =
|
|
53
|
+
onClick: e[3] || (e[3] = E(() => {
|
|
59
54
|
}, ["stop"]))
|
|
60
55
|
}, [
|
|
61
|
-
|
|
56
|
+
a(r(B), {
|
|
62
57
|
modelValue: t.value.height,
|
|
63
58
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.height = l),
|
|
64
59
|
label: "Height",
|
|
65
|
-
options: k
|
|
66
|
-
}, null, 8, ["modelValue"])
|
|
60
|
+
options: r(k)
|
|
61
|
+
}, null, 8, ["modelValue", "options"])
|
|
67
62
|
]),
|
|
68
|
-
|
|
63
|
+
a(r(c), {
|
|
69
64
|
modelValue: v.value,
|
|
70
65
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l),
|
|
71
66
|
label: "Opacity of bars",
|
|
@@ -75,7 +70,7 @@ const L = { class: "checkbox-item" }, M = { class: "checkbox-item" }, m = "stack
|
|
|
75
70
|
breakpoints: !1,
|
|
76
71
|
measure: "%"
|
|
77
72
|
}, null, 8, ["modelValue"]),
|
|
78
|
-
|
|
73
|
+
a(r(c), {
|
|
79
74
|
modelValue: f.value,
|
|
80
75
|
"onUpdate:modelValue": e[5] || (e[5] = (l) => f.value = l),
|
|
81
76
|
label: "Opacity of areas",
|
|
@@ -85,24 +80,24 @@ const L = { class: "checkbox-item" }, M = { class: "checkbox-item" }, m = "stack
|
|
|
85
80
|
breakpoints: !1,
|
|
86
81
|
measure: "%"
|
|
87
82
|
}, null, 8, ["modelValue"]),
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
n("div", D, [
|
|
84
|
+
a(r(V), {
|
|
90
85
|
modelValue: t.value.normalize,
|
|
91
86
|
"onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.normalize = l)
|
|
92
87
|
}, null, 8, ["modelValue"]),
|
|
93
|
-
e[8] || (e[8] =
|
|
88
|
+
e[8] || (e[8] = n("span", null, "Normalize", -1))
|
|
94
89
|
]),
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
n("div", F, [
|
|
91
|
+
a(r(V), {
|
|
97
92
|
modelValue: t.value.showBars,
|
|
98
93
|
"onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.showBars = l)
|
|
99
94
|
}, null, 8, ["modelValue"]),
|
|
100
|
-
e[9] || (e[9] =
|
|
95
|
+
e[9] || (e[9] = n("span", null, "Show bars", -1))
|
|
101
96
|
])
|
|
102
97
|
], 64));
|
|
103
98
|
}
|
|
104
99
|
});
|
|
105
100
|
export {
|
|
106
|
-
|
|
101
|
+
R as default
|
|
107
102
|
};
|
|
108
103
|
//# sourceMappingURL=StackedArea.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from 'vue';\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = 'stackedArea';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'fillColor' | 'lineColor',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS
|
|
1
|
+
{"version":3,"file":"StackedArea.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/StackedArea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from 'vue';\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\nimport { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer = 'stackedArea';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'fillColor' | 'lineColor',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS = AGGREGATION_METHOD_OPTIONS;\n\nconst barOpacity = computed({\n get: () => settings.value.barsOpacity * 100,\n set: (newValue: number) => {\n settings.value.barsOpacity = newValue / 100;\n },\n});\nconst areaOpacity = computed({\n get: () => settings.value.areaOpacity * 100,\n set: (newValue: number) => {\n settings.value.areaOpacity = newValue / 100;\n },\n});\n</script>\n\n<template>\n <AesSelector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <AesSelector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <PlDropdown\n v-model=\"settings.height\"\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n />\n </div>\n <Slider\n v-model=\"barOpacity\"\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n />\n <Slider\n v-model=\"areaOpacity\"\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n />\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.showBars\" />\n <span>Show bars</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","AGGREGATION_METHOD_OPTIONS","barOpacity","newValue","areaOpacity","_createVNode","AesSelector","_cache","v","c","_createElementVNode","_unref","PlDropdown","$event","Slider","_hoisted_1","PlCheckbox","_hoisted_2"],"mappings":";;;;;;;sEAgBMA,IAAQ;;;AADd,UAAMC,IAAQC,EAAA,GAERC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,eAAeD,CAAK,CAAC,GACpEK,IAAeD;AAAA,MACnB,MAAMH,EAAM,MAAM,SAAS;AAAA,IAAA,GAGvBK,IAAYF;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOG,CAAa;AAAA,IAAA,GAErEC,IAAYL;AAAA,MAAS,MACzBG,EAAcJ,EAAS,MAAM,WAAWE,EAAa,OAAOK,CAAa;AAAA,IAAA;AAG3E,aAASC,EACPC,GACAC,GACAC,GACA;AACA,MAAID,EAAY,SAAS,oBACvB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useStore as
|
|
3
|
-
import { useDefaultAes as
|
|
4
|
-
import { DEFAULT_WHITE as
|
|
1
|
+
import { defineComponent as C, computed as r, createElementBlock as k, openBlock as V, Fragment as b, createVNode as i, createElementVNode as u, withModifiers as A, unref as s } from "vue";
|
|
2
|
+
import { useStore as E } from "../../../../store.js";
|
|
3
|
+
import { useDefaultAes as v } from "./utils.js";
|
|
4
|
+
import { DEFAULT_WHITE as T, DEFAULT_BLACK as U } from "../../../../constantsAesthetic.js";
|
|
5
5
|
import c from "../../AesSelector.vue.js";
|
|
6
|
-
import { PlDropdown as
|
|
7
|
-
|
|
6
|
+
import { PlDropdown as N, Slider as B, PlCheckbox as x } from "@platforma-sdk/ui-vue";
|
|
7
|
+
import { AGGREGATION_METHOD_OPTIONS as D } from "../../../../constantsCommon.js";
|
|
8
|
+
const F = { class: "checkbox-item" }, m = "stackedBar", w = /* @__PURE__ */ C({
|
|
8
9
|
__name: "StackedBar",
|
|
9
|
-
setup(
|
|
10
|
-
const a =
|
|
10
|
+
setup(H) {
|
|
11
|
+
const a = E(), l = r(() => a.value.reactive.layersSettings[m]), p = r(
|
|
11
12
|
() => a.value.reactive.optionsState
|
|
12
|
-
), y =
|
|
13
|
-
() =>
|
|
14
|
-
), S =
|
|
15
|
-
() =>
|
|
13
|
+
), y = r(
|
|
14
|
+
() => v(l.value.fillColor, p.value, T)
|
|
15
|
+
), S = r(
|
|
16
|
+
() => v(l.value.lineColor, p.value, U)
|
|
16
17
|
);
|
|
17
|
-
function
|
|
18
|
+
function d(o, e, t) {
|
|
18
19
|
e.type === "dataCategorical" ? a.value.reactive.layersSettings[m][t] = {
|
|
19
20
|
type: e.inputName
|
|
20
21
|
} : a.value.reactive.layersSettings[m][t] = o, e.type === "dataCategorical" && typeof o != "string" && (a.value.reactive.dataBindAes[e.selectedSource] = o);
|
|
21
22
|
}
|
|
22
|
-
const g =
|
|
23
|
-
{ text: "Sum", value: "sum" },
|
|
24
|
-
{ text: "Min", value: "min" },
|
|
25
|
-
{ text: "Max", value: "max" },
|
|
26
|
-
{ text: "Mean", value: "mean" },
|
|
27
|
-
{ text: "Median", value: "median" }
|
|
28
|
-
], v = i({
|
|
23
|
+
const g = D, f = r({
|
|
29
24
|
get: () => l.value.opacity * 100,
|
|
30
25
|
set: (o) => {
|
|
31
26
|
l.value.opacity = o / 100;
|
|
32
27
|
}
|
|
33
28
|
});
|
|
34
|
-
return (o, e) => (
|
|
35
|
-
|
|
29
|
+
return (o, e) => (V(), k(b, null, [
|
|
30
|
+
i(c, {
|
|
36
31
|
label: "Fill color",
|
|
37
32
|
"form-title": "Fill Color Settings",
|
|
38
33
|
"form-back-title": "Layers",
|
|
39
34
|
type: "fill",
|
|
40
35
|
selected: y.value,
|
|
41
|
-
onAesUpdate: e[0] || (e[0] = (t,
|
|
36
|
+
onAesUpdate: e[0] || (e[0] = (t, n) => d(t, n, "fillColor"))
|
|
42
37
|
}, null, 8, ["selected"]),
|
|
43
|
-
|
|
38
|
+
i(c, {
|
|
44
39
|
label: "Stroke color",
|
|
45
40
|
"form-title": "Stroke Color Settings",
|
|
46
41
|
"form-back-title": "Layers",
|
|
47
42
|
type: "stroke",
|
|
48
43
|
selected: S.value,
|
|
49
|
-
onAesUpdate: e[1] || (e[1] = (t,
|
|
44
|
+
onAesUpdate: e[1] || (e[1] = (t, n) => d(t, n, "lineColor"))
|
|
50
45
|
}, null, 8, ["selected"]),
|
|
51
|
-
|
|
46
|
+
u("div", {
|
|
52
47
|
class: "input-item",
|
|
53
|
-
onClick: e[3] || (e[3] =
|
|
48
|
+
onClick: e[3] || (e[3] = A(() => {
|
|
54
49
|
}, ["stop"]))
|
|
55
50
|
}, [
|
|
56
|
-
|
|
51
|
+
i(s(N), {
|
|
57
52
|
modelValue: l.value.height,
|
|
58
53
|
"onUpdate:modelValue": e[2] || (e[2] = (t) => l.value.height = t),
|
|
59
54
|
label: "Height",
|
|
60
|
-
options: g
|
|
61
|
-
}, null, 8, ["modelValue"])
|
|
55
|
+
options: s(g)
|
|
56
|
+
}, null, 8, ["modelValue", "options"])
|
|
62
57
|
]),
|
|
63
|
-
|
|
64
|
-
modelValue:
|
|
65
|
-
"onUpdate:modelValue": e[4] || (e[4] = (t) =>
|
|
58
|
+
i(s(B), {
|
|
59
|
+
modelValue: f.value,
|
|
60
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => f.value = t),
|
|
66
61
|
label: "Opacity",
|
|
67
62
|
min: 0,
|
|
68
63
|
max: 100,
|
|
@@ -70,12 +65,12 @@ const M = { class: "checkbox-item" }, m = "stackedBar", w = /* @__PURE__ */ C({
|
|
|
70
65
|
breakpoints: !1,
|
|
71
66
|
measure: "%"
|
|
72
67
|
}, null, 8, ["modelValue"]),
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
u("div", F, [
|
|
69
|
+
i(s(x), {
|
|
75
70
|
modelValue: l.value.normalize,
|
|
76
71
|
"onUpdate:modelValue": e[5] || (e[5] = (t) => l.value.normalize = t)
|
|
77
72
|
}, null, 8, ["modelValue"]),
|
|
78
|
-
e[6] || (e[6] =
|
|
73
|
+
e[6] || (e[6] = u("span", null, "Normalize", -1))
|
|
79
74
|
])
|
|
80
75
|
], 64));
|
|
81
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from 'vue';\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\n\nconst store = useStore();\nconst layer = 'stackedBar';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'fillColor' | 'lineColor',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS
|
|
1
|
+
{"version":3,"file":"StackedBar.vue.js","sources":["../../../../../src/forms/LayersForm/Layer/discrete/StackedBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../../store';\nimport { computed } from 'vue';\nimport type { AesOption } from '../../../../components/AesSettings/types';\nimport type { AestheticMappingCategorical } from '../../../../dataBindAes';\nimport { useDefaultAes } from './utils';\nimport type { DiscreteUIState } from '@milaboratories/pf-plots';\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider, PlDropdown } from '@platforma-sdk/ui-vue';\nimport { AGGREGATION_METHOD_OPTIONS } from '../../../../constantsCommon';\n\nconst store = useStore();\nconst layer = 'stackedBar';\nconst settings = computed(() => store.value.reactive.layersSettings[layer]);\nconst optionsState = computed(\n () => store.value.reactive.optionsState as DiscreteUIState,\n);\n\nconst fillColor = computed(() =>\n useDefaultAes(settings.value.fillColor, optionsState.value, DEFAULT_WHITE),\n);\nconst lineColor = computed(() =>\n useDefaultAes(settings.value.lineColor, optionsState.value, DEFAULT_BLACK),\n);\n\nfunction onUpdate(\n value: string | AestheticMappingCategorical,\n colorOption: AesOption,\n field: 'fillColor' | 'lineColor',\n) {\n if (colorOption.type === 'dataCategorical') {\n store.value.reactive.layersSettings[layer][field] = {\n type: colorOption.inputName,\n };\n } else {\n store.value.reactive.layersSettings[layer][field] = value;\n }\n if (colorOption.type === 'dataCategorical' && typeof value !== 'string') {\n store.value.reactive.dataBindAes[colorOption.selectedSource] = value;\n }\n}\n\nconst HEIGHT_OPTIONS = AGGREGATION_METHOD_OPTIONS;\n\nconst opacity = computed({\n get: () => settings.value.opacity * 100,\n set: (newValue: number) => {\n settings.value.opacity = newValue / 100;\n },\n});\n</script>\n\n<template>\n <AesSelector\n label=\"Fill color\"\n form-title=\"Fill Color Settings\"\n form-back-title=\"Layers\"\n type=\"fill\"\n :selected=\"fillColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'fillColor')\"\n />\n <AesSelector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :selected=\"lineColor\"\n @aes-update=\"(v, c) => onUpdate(v, c, 'lineColor')\"\n />\n <div class=\"input-item\" @click.stop>\n <PlDropdown\n v-model=\"settings.height\"\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n />\n </div>\n <Slider\n v-model=\"opacity\"\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n />\n <div class=\"checkbox-item\">\n <PlCheckbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n</template>\n"],"names":["layer","store","useStore","settings","computed","optionsState","fillColor","useDefaultAes","DEFAULT_WHITE","lineColor","DEFAULT_BLACK","onUpdate","value","colorOption","field","HEIGHT_OPTIONS","AGGREGATION_METHOD_OPTIONS","opacity","newValue","_createVNode","AesSelector","_cache","v","c","_createElementVNode","_unref","PlDropdown","$event","Slider","_hoisted_1","PlCheckbox"],"mappings":";;;;;;;sCAgBMA,IAAQ;;;A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