@milaboratories/graph-maker 1.1.167 → 1.1.169

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.
Files changed (90) hide show
  1. package/dist/GraphMaker/constantsCommon.d.ts +5 -0
  2. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  3. package/dist/GraphMaker/constantsCommon.js +13 -8
  4. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  5. package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.d.ts.map +1 -1
  6. package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.js +60 -56
  7. package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.js.map +1 -1
  8. package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.d.ts.map +1 -1
  9. package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.js +86 -58
  10. package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.js.map +1 -1
  11. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -1
  12. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +56 -38
  13. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
  14. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.d.ts.map +1 -1
  15. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js +48 -30
  16. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
  17. package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +109 -112
  18. package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +20 -0
  20. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
  21. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js +19 -15
  22. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
  23. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +3 -1
  24. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  25. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +8 -8
  26. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  27. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +23 -23
  28. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
  29. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +7 -5
  31. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
  32. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/BubbleSettingsImpl.js +19 -14
  33. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/BubbleSettingsImpl.js.map +1 -1
  34. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +132 -132
  35. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
  36. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +53 -53
  37. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
  38. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
  39. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +7 -7
  40. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -1
  41. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +49 -83
  42. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -1
  43. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +51 -34
  44. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
  45. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
  46. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +8 -8
  47. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +8 -8
  49. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +54 -29
  50. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
  51. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +2 -2
  52. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  53. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  54. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js.map +1 -1
  55. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js.map +1 -1
  56. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
  57. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js +31 -31
  58. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js.map +1 -1
  59. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +20 -20
  60. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  61. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +12 -12
  62. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  63. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js +14 -14
  64. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js.map +1 -1
  65. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js +14 -14
  66. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js.map +1 -1
  67. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/fillCellsData.js +244 -0
  68. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/fillCellsData.js.map +1 -0
  69. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +28 -214
  70. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  71. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js +26 -26
  72. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js.map +1 -1
  73. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +8 -8
  74. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  75. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +12 -6
  77. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
  78. package/dist/node_modules/@milaboratories/miplots4/dist/types/bubble.js +23 -12
  79. package/dist/node_modules/@milaboratories/miplots4/dist/types/bubble.js.map +1 -1
  80. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +2 -0
  81. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
  82. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetOrGroupKey.js +7 -0
  83. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetOrGroupKey.js.map +1 -0
  84. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +165 -95
  85. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
  86. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +64 -64
  87. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
  88. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +30 -30
  89. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
  90. package/package.json +3 -3
@@ -1,121 +1,149 @@
1
- import { defineComponent as k, computed as u, ref as v, createElementBlock as T, openBlock as b, Fragment as O, createVNode as a, createBlock as E, createCommentVNode as P, createElementVNode as d, unref as s, withCtx as B } from "vue";
2
- import { useStore as I } from "../../../store.js";
3
- import { DEFAULT_CONTINUOUS_PALETTE as L, DEFAULT_BLACK as U, PALETTE_MAP as y } from "../../../constantsAesthetic.js";
4
- import { createContinuousMappingFromPalette as x } from "../../../dataBindAes.js";
5
- import z from "../../../components/MultiselectButton.vue.js";
6
- import M from "../../../components/AesSettings/PalettesForm.vue.js";
7
- import D from "../../../components/AesSettings/FormWrapper.vue.js";
8
- import { PlBtnGroup as f, PlNumberField as F } from "@platforma-sdk/ui-vue";
9
- import $ from "../AesSelector.vue.js";
10
- const w = { class: "input-item" }, R = { class: "button-group-item" }, G = { class: "button-group-item" }, Z = {
1
+ import { defineComponent as B, computed as s, ref as v, createElementBlock as O, openBlock as A, Fragment as x, createVNode as a, createBlock as y, createCommentVNode as E, createElementVNode as u, unref as n, withCtx as U } from "vue";
2
+ import { useStore as P } from "../../../store.js";
3
+ import { DEFAULT_CONTINUOUS_PALETTE as _, DEFAULT_BLACK as I, PALETTE_MAP as L } from "../../../constantsAesthetic.js";
4
+ import { createContinuousMappingFromPalette as z } from "../../../dataBindAes.js";
5
+ import D from "../../../components/MultiselectButton.vue.js";
6
+ import F from "../../../components/AesSettings/PalettesForm.vue.js";
7
+ import $ from "../../../components/AesSettings/FormWrapper.vue.js";
8
+ import { PlBtnGroup as p, PlCheckbox as V, PlNumberField as G } from "@platforma-sdk/ui-vue";
9
+ import R from "../AesSelector.vue.js";
10
+ const w = { class: "input-item" }, X = { class: "button-group-item" }, Y = { class: "button-group-item" }, H = { class: "checkbox-item" }, Z = { class: "checkbox-item" }, K = { class: "button-group-item" }, j = {
11
11
  class: "button-group-item",
12
12
  style: { display: "flex", alignItems: "end" }
13
- }, ee = /* @__PURE__ */ k({
13
+ }, ue = /* @__PURE__ */ B({
14
14
  __name: "Bubble",
15
- setup(H) {
16
- const n = I(), t = u(() => n.value.reactive.layersSettings.bubble), N = u(() => n.value.reactive.optionsState);
17
- u(() => n.value.inputGuide.value);
18
- const i = u(() => {
15
+ setup(q) {
16
+ const i = P(), t = s(() => i.value.reactive.layersSettings.bubble), f = s(() => i.value.reactive.optionsState);
17
+ s(() => i.value.inputGuide.value);
18
+ const r = s(() => {
19
19
  var o;
20
- return (o = N.value.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource;
21
- }), V = u(() => {
20
+ return (o = f.value.components.valueColor.selectorStates[0]) == null ? void 0 : o.selectedSource;
21
+ }), N = s(() => {
22
22
  var o;
23
- return i.value ? (o = n.value.reactive.dataBindAes[i.value]) == null ? void 0 : o.palette : void 0;
24
- }), r = v(!1), m = v(V.value ?? L);
23
+ return r.value ? (o = i.value.reactive.dataBindAes[r.value]) == null ? void 0 : o.palette : void 0;
24
+ }), m = v(!1), d = v(N.value ?? _);
25
25
  function C(o) {
26
- m.value = o, r.value = !1, i.value && (n.value.reactive.dataBindAes[i.value] = x(o));
26
+ d.value = o, m.value = !1, r.value && (i.value.reactive.dataBindAes[r.value] = z(o));
27
27
  }
28
- const g = [
28
+ const k = [
29
29
  { label: "None", value: null },
30
30
  { label: "Columns", value: "column" },
31
31
  { label: "Rows", value: "row" }
32
- ], S = [
32
+ ], M = [
33
33
  { label: "z-score", value: "standardScaling" },
34
34
  { label: "Min-max", value: "meanNormalization" }
35
- ], A = u({
36
- get: () => t.value.strokeColor ?? U,
35
+ ], S = [
36
+ { label: "Mean", value: "mean" },
37
+ { label: "Min", value: "min" },
38
+ { label: "Max", value: "max" },
39
+ { label: "Median", value: "median" }
40
+ ], b = s({
41
+ get: () => t.value.strokeColor ?? I,
37
42
  set: (o) => {
38
43
  t.value.strokeColor = o;
39
44
  }
40
- }), _ = [
45
+ }), T = [
41
46
  { label: "empty", value: null },
42
47
  { label: "Special value", value: "custom" }
43
- ], p = v(t.value.NAValueAs !== null ? "custom" : t.value.NAValueAs), c = v(t.value.NAValueAs ?? 0);
44
- return (o, e) => (b(), T(O, null, [
45
- a(z, {
48
+ ], g = v(t.value.NAValueAs !== null ? "custom" : t.value.NAValueAs), c = v(t.value.NAValueAs ?? 0);
49
+ return (o, e) => (A(), O(x, null, [
50
+ a(D, {
46
51
  label: "Color Palette ",
47
- title: s(y)[m.value].title,
48
- palette: m.value,
52
+ title: n(L)[d.value].title,
53
+ palette: d.value,
49
54
  onButtonClick: e[0] || (e[0] = (l) => {
50
- r.value = !0;
55
+ m.value = !0;
51
56
  })
52
57
  }, null, 8, ["title", "palette"]),
53
- r.value ? (b(), E(D, {
58
+ m.value ? (A(), y($, {
54
59
  key: 0,
55
60
  title: "Color Palette",
56
61
  "back-title": "Color mapping",
57
- "onForm:close": e[1] || (e[1] = (l) => r.value = !1)
62
+ "onForm:close": e[1] || (e[1] = (l) => m.value = !1)
58
63
  }, {
59
- default: B(() => [
60
- a(M, {
61
- selected: m.value,
64
+ default: U(() => [
65
+ a(F, {
66
+ selected: d.value,
62
67
  categorical: !1,
63
68
  onSelect: C
64
69
  }, null, 8, ["selected"])
65
70
  ]),
66
71
  _: 1
67
- })) : P("", !0),
68
- d("div", w, [
69
- a($, {
72
+ })) : E("", !0),
73
+ u("div", w, [
74
+ a(R, {
70
75
  label: "Stroke color",
71
76
  "form-title": "Stroke Color Settings",
72
77
  "form-back-title": "Layers",
73
78
  type: "stroke",
74
79
  "possible-aes-source-inputs": [],
75
- selected: A.value,
76
- onAesUpdate: e[2] || (e[2] = (l) => A.value = l)
80
+ selected: b.value,
81
+ onAesUpdate: e[2] || (e[2] = (l) => b.value = l)
77
82
  }, null, 8, ["selected"])
78
83
  ]),
79
- d("div", R, [
80
- a(s(f), {
84
+ u("div", X, [
85
+ a(n(p), {
81
86
  label: "Normalize by",
82
- options: g,
87
+ options: k,
83
88
  compact: !0,
84
89
  modelValue: t.value.normalizationDirection,
85
90
  "onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.normalizationDirection = l)
86
91
  }, null, 8, ["modelValue"])
87
92
  ]),
88
- d("div", G, [
89
- a(s(f), {
93
+ u("div", Y, [
94
+ a(n(p), {
90
95
  label: "Normalization method",
91
- options: S,
96
+ options: M,
92
97
  compact: !0,
93
98
  modelValue: t.value.normalizationMethod,
94
99
  "onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.normalizationMethod = l)
95
100
  }, null, 8, ["modelValue"])
96
101
  ]),
97
- d("div", Z, [
98
- a(s(f), {
102
+ u("div", H, [
103
+ a(n(V), {
104
+ modelValue: t.value.aggregateByX,
105
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.aggregateByX = l)
106
+ }, null, 8, ["modelValue"]),
107
+ e[12] || (e[12] = u("span", null, "Aggregate X groups", -1))
108
+ ]),
109
+ u("div", Z, [
110
+ a(n(V), {
111
+ modelValue: t.value.aggregateByY,
112
+ "onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.aggregateByY = l)
113
+ }, null, 8, ["modelValue"]),
114
+ e[13] || (e[13] = u("span", null, "Aggregate Y groups", -1))
115
+ ]),
116
+ u("div", K, [
117
+ a(n(p), {
118
+ label: "Aggregation method",
119
+ options: S,
120
+ compact: !0,
121
+ modelValue: t.value.aggregationMethod,
122
+ "onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.aggregationMethod = l)
123
+ }, null, 8, ["modelValue"])
124
+ ]),
125
+ u("div", j, [
126
+ a(n(p), {
99
127
  label: "Treat NA value as:",
100
- options: _,
128
+ options: T,
101
129
  compact: !0,
102
- modelValue: p.value,
130
+ modelValue: g.value,
103
131
  "onUpdate:modelValue": [
104
- e[5] || (e[5] = (l) => p.value = l),
105
- e[6] || (e[6] = (l) => {
132
+ e[8] || (e[8] = (l) => g.value = l),
133
+ e[9] || (e[9] = (l) => {
106
134
  l === "custom" ? t.value.NAValueAs = c.value : t.value.NAValueAs = l;
107
135
  })
108
136
  ]
109
137
  }, null, 8, ["modelValue"]),
110
- a(s(F), {
138
+ a(n(G), {
111
139
  style: { height: "33px", marginLeft: "16px", width: "75px" },
112
- disabled: p.value !== "custom",
140
+ disabled: g.value !== "custom",
113
141
  label: "NA value",
114
142
  useIncrementButtons: !1,
115
143
  modelValue: c.value,
116
144
  "onUpdate:modelValue": [
117
- e[7] || (e[7] = (l) => c.value = l),
118
- e[8] || (e[8] = (l) => {
145
+ e[10] || (e[10] = (l) => c.value = l),
146
+ e[11] || (e[11] = (l) => {
119
147
  l !== void 0 && (t.value.NAValueAs = l);
120
148
  })
121
149
  ]
@@ -125,6 +153,6 @@ const w = { class: "input-item" }, R = { class: "button-group-item" }, G = { cla
125
153
  }
126
154
  });
127
155
  export {
128
- ee as default
156
+ ue as default
129
157
  };
130
158
  //# sourceMappingURL=Bubble.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bubble.vue.js","sources":["../../../../../src/GraphMaker/forms/LayersForm/Layer/Bubble.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../store';\nimport { BubbleLayer } from '../../../types';\nimport { computed, ref } from 'vue';\nimport {\n DEFAULT_BLACK,\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../../constantsAesthetic';\nimport { ContinuousPalette } from '../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../dataBindAes';\nimport MultiselectButton from '../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../components/AesSettings/FormWrapper.vue';\nimport { BubbleUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { PlBtnGroup, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\nimport AesSelector from '../AesSelector.vue';\n\nconst store = useStore();\nconst layer: BubbleLayer = 'bubble';\nconst settings = computed(() => store.value.reactive.layersSettings.bubble);\nconst optionsState = computed(() => store.value.reactive.optionsState as BubbleUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<BubbleUIState>);\n\nconst valueColor = computed(() => optionsState.value.components.valueColor.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => valueColor.value ? store.value.reactive.dataBindAes[valueColor.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (valueColor.value) {\n store.value.reactive.dataBindAes[valueColor.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]\n\nconst stroke = computed({\n get: () => {\n return settings.value.strokeColor ?? DEFAULT_BLACK\n },\n set: (v:string) => {\n settings.value.strokeColor = v;\n }\n});\n\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs !== null ? 'custom' : settings.value.NAValueAs);\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\" :categorical=\"false\" @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"input-item\">\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :possible-aes-source-inputs=\"[]\"\n :selected=\"stroke\"\n @aes-update=\"(v:string) => stroke = v\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","valueColor","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingF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AC/B;AAAA,IAAA,CACD,GAEKC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,GAGtCC,IAAgBZ,EAAIP,EAAS,MAAM,cAAc,OAAO,WAAWA,EAAS,MAAM,SAAS,GAC3FoB,IAAWb,EAAIP,EAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Bubble.vue.js","sources":["../../../../../src/GraphMaker/forms/LayersForm/Layer/Bubble.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useStore } from '../../../store';\nimport { BubbleLayer } from '../../../types';\nimport { computed, ref } from 'vue';\nimport {\n DEFAULT_BLACK,\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../../constantsAesthetic';\nimport { ContinuousPalette } from '../../../components/AesSettings/types';\nimport { createContinuousMappingFromPalette } from '../../../dataBindAes';\nimport MultiselectButton from '../../../components/MultiselectButton.vue';\nimport PalettesForm from '../../../components/AesSettings/PalettesForm.vue';\nimport FormWrapper from '../../../components/AesSettings/FormWrapper.vue';\nimport { BubbleUIState, InputGuide } from '@milaboratories/pf-plots';\nimport { PlBtnGroup, PlCheckbox, PlNumberField, SimpleOption } from '@platforma-sdk/ui-vue';\nimport AesSelector from '../AesSelector.vue';\n\nconst store = useStore();\nconst layer: BubbleLayer = 'bubble';\nconst settings = computed(() => store.value.reactive.layersSettings.bubble);\nconst optionsState = computed(() => store.value.reactive.optionsState as BubbleUIState);\nconst inputGuide = computed(() => store.value.inputGuide.value as InputGuide<BubbleUIState>);\n\nconst valueColor = computed(() => optionsState.value.components.valueColor.selectorStates[0]?.selectedSource);\nconst savedDataValuePalette = computed(() => valueColor.value ? store.value.reactive.dataBindAes[valueColor.value]?.palette : undefined);\n\nconst palettesOpen = ref(false);\nconst palette = ref<ContinuousPalette>(savedDataValuePalette.value as ContinuousPalette ?? DEFAULT_CONTINUOUS_PALETTE);\n\nfunction onPaletteSelect(value: ContinuousPalette) {\n palette.value = value;\n palettesOpen.value = false;\n if (valueColor.value) {\n store.value.reactive.dataBindAes[valueColor.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 AGGREGATION_METHOD: SimpleOption[] = [\n {label: 'Mean', value: 'mean'},\n {label: 'Min', value: 'min'},\n {label: 'Max', value: 'max'},\n {label: 'Median', value: 'median'},\n];\n\nconst stroke = computed({\n get: () => {\n return settings.value.strokeColor ?? DEFAULT_BLACK\n },\n set: (v:string) => {\n settings.value.strokeColor = v;\n }\n});\n\nconst NA_VALUE_OPTIONS: SimpleOption[] = [\n { label: 'empty', value: null },\n { label: 'Special value', value: 'custom' }\n];\n\nconst NAValueOption = ref(settings.value.NAValueAs !== null ? 'custom' : settings.value.NAValueAs);\nconst customNA = ref(settings.value.NAValueAs ?? 0);\n\n</script>\n\n<template>\n <multiselect-button\n label=\"Color Palette \"\n :title=\"PALETTE_MAP[palette].title\"\n :palette=\"palette\"\n @button-click=\"palettesOpen = true;\"\n />\n <form-wrapper\n v-if=\"palettesOpen\"\n title=\"Color Palette\"\n back-title=\"Color mapping\"\n @form:close=\"palettesOpen = false\"\n >\n <palettes-form :selected=\"palette\" :categorical=\"false\" @select=\"onPaletteSelect\" />\n </form-wrapper>\n <div class=\"input-item\">\n <aes-selector\n label=\"Stroke color\"\n form-title=\"Stroke Color Settings\"\n form-back-title=\"Layers\"\n type=\"stroke\"\n :possible-aes-source-inputs=\"[]\"\n :selected=\"stroke\"\n @aes-update=\"(v:string) => stroke = v\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalize by\"\n :options=\"NORMALIZATION_DIRECTION\"\n :compact=\"true\"\n v-model=\"settings.normalizationDirection\"\n />\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Normalization method\"\n :options=\"NORMALIZATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.normalizationMethod\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByX\"/>\n <span>Aggregate X groups</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.aggregateByY\"/>\n <span>Aggregate Y groups</span>\n </div>\n <div class=\"button-group-item\">\n <pl-btn-group\n label=\"Aggregation method\"\n :options=\"AGGREGATION_METHOD\"\n :compact=\"true\"\n v-model=\"settings.aggregationMethod\"\n />\n </div>\n <div class=\"button-group-item\" :style=\"{display: 'flex', alignItems: 'end'}\">\n <pl-btn-group\n label=\"Treat NA value as:\"\n :options=\"NA_VALUE_OPTIONS\"\n :compact=\"true\"\n v-model=\"NAValueOption\"\n @update:modelValue=\"(value:unknown) => {\n if (value === 'custom') {\n settings.NAValueAs = customNA;\n } else {\n settings.NAValueAs = value as number|null;\n }\n }\"\n />\n <pl-number-field\n :style=\"{height: '33px', marginLeft: '16px', width: '75px'}\"\n :disabled=\"NAValueOption !== 'custom'\"\n label=\"NA value\"\n :useIncrementButtons=\"false\"\n v-model=\"customNA\"\n @update:modelValue=\"(value:unknown) => {\n if (value !== undefined) {\n settings.NAValueAs = value as number;\n }\n }\"\n />\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","optionsState","valueColor","_a","savedDataValuePalette","palettesOpen","ref","palette","DEFAULT_CONTINUOUS_PALETTE","onPaletteSelect","value","createContinuousMappingFromPalette","NORMALIZATION_DIRECTION","NORMALIZATION_METHOD","AGGREGATION_METHOD","stroke","DEFAULT_BLACK","v","NA_VALUE_OPTIONS","NAValueOption","customNA"],"mappings":";;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ID,EAAS,MAAM,eAAeiB;AAAA,MAEvC,KAAK,CAACC,MAAa;AACjB,QAAAlB,EAAS,MAAM,cAAckB;AAAA,MAC/B;AAAA,IAAA,CACD,GAEKC,IAAmC;AAAA,MACvC,EAAE,OAAO,SAAS,OAAO,KAAA;AAAA,MACzB,EAAE,OAAO,iBAAiB,OAAO,SAAA;AAAA,IAAS,GAGtCC,IAAgBb,EAAIP,EAAS,MAAM,cAAc,OAAO,WAAWA,EAAS,MAAM,SAAS,GAC3FqB,IAAWd,EAAIP,EAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";AAoUA,wBAKG"}
1
+ {"version":3,"file":"StackedArea.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue"],"names":[],"mappings":";AA8WA,wBAKG"}
@@ -1,53 +1,71 @@
1
- import { defineComponent as C, computed as o, createElementBlock as g, openBlock as A, Fragment as U, createVNode as r, createElementVNode as i, unref as n } from "vue";
2
- import { useStore as x } from "../../../../store.js";
3
- import { useDefaultAes as c } from "./utils.js";
4
- import { DEFAULT_WHITE as B, DEFAULT_BLACK as E } from "../../../../constantsAesthetic.js";
5
- import y from "../../AesSelector.vue.js";
6
- import { Slider as b, PlCheckbox as k } from "@platforma-sdk/ui-vue";
7
- const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stackedArea", I = /* @__PURE__ */ C({
1
+ import { defineComponent as x, computed as s, createElementBlock as C, openBlock as U, Fragment as A, createVNode as o, createElementVNode as i, withModifiers as O, unref as n } from "vue";
2
+ import { useStore as B } from "../../../../store.js";
3
+ import { useDefaultAes as y } from "./utils.js";
4
+ import { DEFAULT_WHITE as E, DEFAULT_BLACK as w } from "../../../../constantsAesthetic.js";
5
+ import b from "../../AesSelector.vue.js";
6
+ import { PlDropdown as F, Slider as c, PlCheckbox as V } from "@platforma-sdk/ui-vue";
7
+ const L = { class: "checkbox-item" }, M = { class: "checkbox-item" }, m = "stackedArea", G = /* @__PURE__ */ x({
8
8
  __name: "StackedArea",
9
- setup(O) {
10
- const s = x(), t = o(() => s.value.reactive.layersSettings[m]), p = o(
11
- () => s.value.reactive.optionsState
12
- ), S = o(
13
- () => c(t.value.fillColor, p.value, B)
14
- ), V = o(
15
- () => c(t.value.lineColor, p.value, E)
9
+ setup(N) {
10
+ const r = B(), t = s(() => r.value.reactive.layersSettings[m]), d = s(
11
+ () => r.value.reactive.optionsState
12
+ ), S = s(
13
+ () => y(t.value.fillColor, d.value, E)
14
+ ), g = s(
15
+ () => y(t.value.lineColor, d.value, w)
16
16
  );
17
- function d(a, e, l) {
18
- e.type === "dataCategorical" ? s.value.reactive.layersSettings[m][l] = {
17
+ function p(a, e, l) {
18
+ e.type === "dataCategorical" ? r.value.reactive.layersSettings[m][l] = {
19
19
  type: e.inputName
20
- } : s.value.reactive.layersSettings[m][l] = a, e.type === "dataCategorical" && typeof a != "string" && (s.value.reactive.dataBindAes[e.selectedSource] = a);
20
+ } : r.value.reactive.layersSettings[m][l] = a, e.type === "dataCategorical" && typeof a != "string" && (r.value.reactive.dataBindAes[e.selectedSource] = a);
21
21
  }
22
- const v = o({
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
29
  get: () => t.value.barsOpacity * 100,
24
30
  set: (a) => {
25
31
  t.value.barsOpacity = a / 100;
26
32
  }
27
- }), f = o({
33
+ }), f = s({
28
34
  get: () => t.value.areaOpacity * 100,
29
35
  set: (a) => {
30
36
  t.value.areaOpacity = a / 100;
31
37
  }
32
38
  });
33
- return (a, e) => (A(), g(U, null, [
34
- r(y, {
39
+ return (a, e) => (U(), C(A, null, [
40
+ o(b, {
35
41
  label: "Fill color",
36
42
  "form-title": "Fill Color Settings",
37
43
  "form-back-title": "Layers",
38
44
  type: "fill",
39
45
  selected: S.value,
40
- onAesUpdate: e[0] || (e[0] = (l, u) => d(l, u, "fillColor"))
46
+ onAesUpdate: e[0] || (e[0] = (l, u) => p(l, u, "fillColor"))
41
47
  }, null, 8, ["selected"]),
42
- r(y, {
48
+ o(b, {
43
49
  label: "Stroke color",
44
50
  "form-title": "Stroke Color Settings",
45
51
  "form-back-title": "Layers",
46
52
  type: "stroke",
47
- selected: V.value,
48
- onAesUpdate: e[1] || (e[1] = (l, u) => d(l, u, "lineColor"))
53
+ selected: g.value,
54
+ onAesUpdate: e[1] || (e[1] = (l, u) => p(l, u, "lineColor"))
49
55
  }, null, 8, ["selected"]),
50
- r(n(b), {
56
+ i("div", {
57
+ class: "input-item",
58
+ onClick: e[3] || (e[3] = O(() => {
59
+ }, ["stop"]))
60
+ }, [
61
+ o(n(F), {
62
+ label: "Height",
63
+ options: k,
64
+ modelValue: t.value.height,
65
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.height = l)
66
+ }, null, 8, ["modelValue"])
67
+ ]),
68
+ o(n(c), {
51
69
  label: "Opacity of bars",
52
70
  min: 0,
53
71
  max: 100,
@@ -55,9 +73,9 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
55
73
  breakpoints: !1,
56
74
  measure: "%",
57
75
  modelValue: v.value,
58
- "onUpdate:modelValue": e[2] || (e[2] = (l) => v.value = l)
76
+ "onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l)
59
77
  }, null, 8, ["modelValue"]),
60
- r(n(b), {
78
+ o(n(c), {
61
79
  label: "Opacity of areas",
62
80
  min: 0,
63
81
  max: 100,
@@ -65,26 +83,26 @@ const F = { class: "checkbox-item" }, L = { class: "checkbox-item" }, m = "stack
65
83
  breakpoints: !1,
66
84
  measure: "%",
67
85
  modelValue: f.value,
68
- "onUpdate:modelValue": e[3] || (e[3] = (l) => f.value = l)
86
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => f.value = l)
69
87
  }, null, 8, ["modelValue"]),
70
- i("div", F, [
71
- r(n(k), {
88
+ i("div", L, [
89
+ o(n(V), {
72
90
  modelValue: t.value.normalize,
73
- "onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.normalize = l)
91
+ "onUpdate:modelValue": e[6] || (e[6] = (l) => t.value.normalize = l)
74
92
  }, null, 8, ["modelValue"]),
75
- e[6] || (e[6] = i("span", null, "Normalize", -1))
93
+ e[8] || (e[8] = i("span", null, "Normalize", -1))
76
94
  ]),
77
- i("div", L, [
78
- r(n(k), {
95
+ i("div", M, [
96
+ o(n(V), {
79
97
  modelValue: t.value.showBars,
80
- "onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.showBars = l)
98
+ "onUpdate:modelValue": e[7] || (e[7] = (l) => t.value.showBars = l)
81
99
  }, null, 8, ["modelValue"]),
82
- e[7] || (e[7] = i("span", null, "Show bars", -1))
100
+ e[9] || (e[9] = i("span", null, "Show bars", -1))
83
101
  ])
84
102
  ], 64));
85
103
  }
86
104
  });
87
105
  export {
88
- I as default
106
+ G as default
89
107
  };
90
108
  //# sourceMappingURL=StackedArea.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/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 { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } 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 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 <aes-selector\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 <aes-selector\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 <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox 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","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,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,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAaX,EAAS;AAAA,MAC1B,KAAK,MAAMD,EAAS,MAAM,cAAc;AAAA,MACxC,KAAK,CAACa,MAAqB;AACzB,QAAAb,EAAS,MAAM,cAAca,IAAW;AAAA,MAC1C;AAAA,IAAA,CACD,GACKC,IAAcb,EAAS;AAAA,MAC3B,KAAK,MAAMD,EAAS,MAAM,cAAc;AAAA,MACxC,KAAK,CAACa,MAAqB;AACzB,QAAAb,EAAS,MAAM,cAAca,IAAW;AAAA,MAC1C;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"StackedArea.vue.js","sources":["../../../../../../src/GraphMaker/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 { 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: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\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 <aes-selector\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 <aes-selector\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 <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity of bars\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"barOpacity\"\n />\n <Slider\n label=\"Opacity of areas\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"areaOpacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.normalize\" />\n <span>Normalize</span>\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox 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","barOpacity","newValue","areaOpacity"],"mappings":";;;;;;sEAeMA,IAAQ;;;AADd,UAAMC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";AAuQA,wBAKG"}
1
+ {"version":3,"file":"StackedBar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue"],"names":[],"mappings":";AAiTA,wBAKG"}
@@ -1,68 +1,86 @@
1
- import { defineComponent as S, computed as r, createElementBlock as k, openBlock as g, Fragment as b, createVNode as s, createElementVNode as d, unref as c } from "vue";
2
- import { useStore as V } from "../../../../store.js";
1
+ import { defineComponent as C, computed as i, createElementBlock as k, openBlock as x, Fragment as V, createVNode as n, createElementVNode as s, withModifiers as b, unref as u } from "vue";
2
+ import { useStore as U } from "../../../../store.js";
3
3
  import { useDefaultAes as f } from "./utils.js";
4
- import { DEFAULT_WHITE as A, DEFAULT_BLACK as U } from "../../../../constantsAesthetic.js";
5
- import v from "../../AesSelector.vue.js";
6
- import { Slider as B, PlCheckbox as x } from "@platforma-sdk/ui-vue";
7
- const E = { class: "checkbox-item" }, n = "stackedBar", H = /* @__PURE__ */ S({
4
+ import { DEFAULT_WHITE as A, DEFAULT_BLACK as B } from "../../../../constantsAesthetic.js";
5
+ import c from "../../AesSelector.vue.js";
6
+ import { PlDropdown as E, Slider as F, PlCheckbox as L } from "@platforma-sdk/ui-vue";
7
+ const M = { class: "checkbox-item" }, m = "stackedBar", w = /* @__PURE__ */ C({
8
8
  __name: "StackedBar",
9
- setup(F) {
10
- const a = V(), l = r(() => a.value.reactive.layersSettings[n]), u = r(
9
+ setup(N) {
10
+ const a = U(), l = i(() => a.value.reactive.layersSettings[m]), d = i(
11
11
  () => a.value.reactive.optionsState
12
- ), y = r(
13
- () => f(l.value.fillColor, u.value, A)
14
- ), C = r(
15
- () => f(l.value.lineColor, u.value, U)
12
+ ), y = i(
13
+ () => f(l.value.fillColor, d.value, A)
14
+ ), S = i(
15
+ () => f(l.value.lineColor, d.value, B)
16
16
  );
17
- function m(o, e, t) {
18
- e.type === "dataCategorical" ? a.value.reactive.layersSettings[n][t] = {
17
+ function p(o, e, t) {
18
+ e.type === "dataCategorical" ? a.value.reactive.layersSettings[m][t] = {
19
19
  type: e.inputName
20
- } : a.value.reactive.layersSettings[n][t] = o, e.type === "dataCategorical" && typeof o != "string" && (a.value.reactive.dataBindAes[e.selectedSource] = o);
20
+ } : a.value.reactive.layersSettings[m][t] = o, e.type === "dataCategorical" && typeof o != "string" && (a.value.reactive.dataBindAes[e.selectedSource] = o);
21
21
  }
22
- const p = r({
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
29
  get: () => l.value.opacity * 100,
24
30
  set: (o) => {
25
31
  l.value.opacity = o / 100;
26
32
  }
27
33
  });
28
- return (o, e) => (g(), k(b, null, [
29
- s(v, {
34
+ return (o, e) => (x(), k(V, null, [
35
+ n(c, {
30
36
  label: "Fill color",
31
37
  "form-title": "Fill Color Settings",
32
38
  "form-back-title": "Layers",
33
39
  type: "fill",
34
40
  selected: y.value,
35
- onAesUpdate: e[0] || (e[0] = (t, i) => m(t, i, "fillColor"))
41
+ onAesUpdate: e[0] || (e[0] = (t, r) => p(t, r, "fillColor"))
36
42
  }, null, 8, ["selected"]),
37
- s(v, {
43
+ n(c, {
38
44
  label: "Stroke color",
39
45
  "form-title": "Stroke Color Settings",
40
46
  "form-back-title": "Layers",
41
47
  type: "stroke",
42
- selected: C.value,
43
- onAesUpdate: e[1] || (e[1] = (t, i) => m(t, i, "lineColor"))
48
+ selected: S.value,
49
+ onAesUpdate: e[1] || (e[1] = (t, r) => p(t, r, "lineColor"))
44
50
  }, null, 8, ["selected"]),
45
- s(c(B), {
51
+ s("div", {
52
+ class: "input-item",
53
+ onClick: e[3] || (e[3] = b(() => {
54
+ }, ["stop"]))
55
+ }, [
56
+ n(u(E), {
57
+ label: "Height",
58
+ options: g,
59
+ modelValue: l.value.height,
60
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => l.value.height = t)
61
+ }, null, 8, ["modelValue"])
62
+ ]),
63
+ n(u(F), {
46
64
  label: "Opacity",
47
65
  min: 0,
48
66
  max: 100,
49
67
  step: 1,
50
68
  breakpoints: !1,
51
69
  measure: "%",
52
- modelValue: p.value,
53
- "onUpdate:modelValue": e[2] || (e[2] = (t) => p.value = t)
70
+ modelValue: v.value,
71
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => v.value = t)
54
72
  }, null, 8, ["modelValue"]),
55
- d("div", E, [
56
- s(c(x), {
73
+ s("div", M, [
74
+ n(u(L), {
57
75
  modelValue: l.value.normalize,
58
- "onUpdate:modelValue": e[3] || (e[3] = (t) => l.value.normalize = t)
76
+ "onUpdate:modelValue": e[5] || (e[5] = (t) => l.value.normalize = t)
59
77
  }, null, 8, ["modelValue"]),
60
- e[4] || (e[4] = d("span", null, "Normalize", -1))
78
+ e[6] || (e[6] = s("span", null, "Normalize", -1))
61
79
  ])
62
80
  ], 64));
63
81
  }
64
82
  });
65
83
  export {
66
- H as default
84
+ w as default
67
85
  };
68
86
  //# sourceMappingURL=StackedBar.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/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 { DiscreteUIState } from \"@milaboratories/pf-plots\";\nimport {\n DEFAULT_BLACK,\n DEFAULT_WHITE,\n} from '../../../../constantsAesthetic';\nimport AesSelector from '../../AesSelector.vue';\nimport { PlCheckbox, Slider } 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 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 <aes-selector\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 <aes-selector\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 <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox 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","opacity","newValue"],"mappings":";;;;;;sCAeMA,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,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAUX,EAAS;AAAA,MACvB,KAAK,MAAMD,EAAS,MAAM,UAAU;AAAA,MACpC,KAAK,CAACa,MAAqB;AACzB,QAAAb,EAAS,MAAM,UAAUa,IAAW;AAAA,MACtC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"StackedBar.vue.js","sources":["../../../../../../src/GraphMaker/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 { 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: { text:string, value:string }[] = [\n { text: \"Sum\", value: \"sum\" },\n { text: \"Min\", value: \"min\" },\n { text: \"Max\", value: \"max\" },\n { text: \"Mean\", value: \"mean\" },\n { text: \"Median\", value: \"median\" },\n];\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 <aes-selector\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 <aes-selector\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 <pl-dropdown\n label=\"Height\"\n :options=\"HEIGHT_OPTIONS\"\n v-model=\"settings.height\"\n />\n </div>\n <Slider\n label=\"Opacity\"\n :min=\"0\"\n :max=\"100\"\n :step=\"1\"\n :breakpoints=\"false\"\n measure=\"%\"\n v-model=\"opacity\"\n />\n <div class=\"checkbox-item\">\n <pl-checkbox 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","opacity","newValue"],"mappings":";;;;;;sCAeMA,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,oBACvBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAI;AAAA,QAClD,MAAMD,EAAY;AAAA,MAAA,IAGpBZ,EAAM,MAAM,SAAS,eAAeD,CAAK,EAAEc,CAAK,IAAIF,GAElDC,EAAY,SAAS,qBAAqB,OAAOD,KAAU,aAC7DX,EAAM,MAAM,SAAS,YAAYY,EAAY,cAAc,IAAID;AAAA,IAEnE;AAEA,UAAMG,IAAkD;AAAA,MACtD,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,MACtB,EAAE,MAAM,OAAO,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