@milaboratories/graph-maker 1.1.166 → 1.1.167

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 (91) hide show
  1. package/dist/GraphMaker/constantsCommon.d.ts +0 -9
  2. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  3. package/dist/GraphMaker/constantsCommon.js +74 -81
  4. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  5. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +8 -2
  6. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
  7. package/dist/GraphMaker/forms/DataMappingForm/DiscreteForm.vue.js +26 -20
  8. package/dist/GraphMaker/forms/DataMappingForm/DiscreteForm.vue.js.map +1 -1
  9. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.d.ts.map +1 -1
  10. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.js +37 -31
  11. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot/Scatter.vue.js.map +1 -1
  12. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js +30 -24
  13. package/dist/GraphMaker/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js.map +1 -1
  14. package/dist/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue.js +33 -27
  15. package/dist/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue.js.map +1 -1
  16. package/dist/GraphMaker/index.vue.js +8 -2
  17. package/dist/GraphMaker/index.vue.js.map +1 -1
  18. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js +22 -16
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
  20. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js +17 -11
  21. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.js.map +1 -1
  22. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +26 -20
  23. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
  24. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.js +29 -23
  25. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.js.map +1 -1
  26. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  27. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +83 -68
  28. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
  29. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +25 -19
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
  31. package/dist/GraphMaker/utils/getUsedAesInMapping.js +37 -31
  32. package/dist/GraphMaker/utils/getUsedAesInMapping.js.map +1 -1
  33. package/dist/GraphMaker/utils/loadDefaultSources.d.ts.map +1 -1
  34. package/dist/GraphMaker/utils/loadDefaultSources.js +36 -31
  35. package/dist/GraphMaker/utils/loadDefaultSources.js.map +1 -1
  36. package/dist/_virtual/stringify.js +5 -0
  37. package/dist/_virtual/stringify.js.map +1 -0
  38. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +106 -107
  39. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js.map +1 -1
  40. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js +120 -121
  41. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js.map +1 -1
  42. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +83 -84
  43. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
  44. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js +4 -4
  45. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js +11 -11
  46. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +123 -124
  47. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js +8 -8
  49. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +88 -89
  50. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
  51. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +103 -105
  52. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
  53. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +148 -119
  54. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -1
  55. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/components/PlDataTable.js +4 -4
  56. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +5 -5
  57. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +8 -0
  58. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -0
  59. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +182 -0
  60. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -0
  61. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/errors.js +18 -0
  62. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/errors.js.map +1 -0
  63. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/json.js +12 -0
  64. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/json.js.map +1 -0
  65. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/plid.js +7 -0
  66. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/plid.js.map +1 -0
  67. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/ref.js +8 -0
  68. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/node_modules/@milaboratories/pl-model-common/dist/ref.js.map +1 -0
  69. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +105 -111
  70. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
  71. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +158 -163
  72. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
  73. package/dist/node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js +36 -0
  74. package/dist/node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js.map +1 -0
  75. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +8 -0
  76. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -0
  77. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +52 -0
  78. package/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -0
  79. package/dist/node_modules/@milaboratories/pl-model-common/dist/plid.js +7 -0
  80. package/dist/node_modules/@milaboratories/pl-model-common/dist/plid.js.map +1 -0
  81. package/dist/node_modules/@milaboratories/pl-model-common/dist/ref.js +8 -0
  82. package/dist/node_modules/@milaboratories/pl-model-common/dist/ref.js.map +1 -0
  83. package/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +16 -0
  84. package/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js.map +1 -0
  85. package/dist/node_modules/json-stringify-safe/stringify.js +20 -0
  86. package/dist/node_modules/json-stringify-safe/stringify.js.map +1 -0
  87. package/dist/node_modules/zod/lib/index.js +2978 -0
  88. package/dist/node_modules/zod/lib/index.js.map +1 -0
  89. package/package.json +3 -3
  90. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +0 -18
  91. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +0 -1
@@ -1,9 +1,15 @@
1
- import { defineComponent as g, computed as u, watch as x, createElementBlock as y, openBlock as E, Fragment as k, createElementVNode as t, createVNode as n, unref as o, isRef as s } from "vue";
1
+ import { defineComponent as g, computed as u, watch as x, createElementBlock as y, openBlock as E, Fragment as k, createElementVNode as t, createVNode as a, unref as o, isRef as s } from "vue";
2
2
  import { useStore as N } from "../../store.js";
3
3
  import { PlDropdown as i, PlBtnGroup as h, PlCheckbox as b } from "@platforma-sdk/ui-vue";
4
4
  import { STAT_TEST_METHOD as w, STAT_CORRECTION_METHOD as C, FORMAT_P_VALUE_OPTIONS as T } from "../../constantsCommon.js";
5
5
  import "../../constantsAesthetic.js";
6
6
  import "../../../node_modules/@milaboratories/pf-plots/dist/index.js";
7
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
8
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
9
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
10
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
11
+ import "../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
12
+ import "../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
7
13
  import { getReferenceGroupOptions as R, getOverallTestMethodOptions as D, checkStatisticsInputsValidity as O } from "../../utils/getStatisticsOptions.js";
8
14
  const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "input-item" }, F = { class: "input-item" }, H = {
9
15
  class: "input-item",
@@ -11,52 +17,52 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
11
17
  }, I = { class: "checkbox-item" }, _ = { class: "input-item" }, z = { class: "input-item" }, L = {
12
18
  class: "input-item",
13
19
  style: { "z-index": "0" }
14
- }, j = { class: "checkbox-item" }, $ = /* @__PURE__ */ g({
20
+ }, j = { class: "checkbox-item" }, ae = /* @__PURE__ */ g({
15
21
  __name: "DiscreteStatisticsForm",
16
22
  setup(q) {
17
- const d = N(), a = u(() => d.value.reactive.statisticsSettings), M = u(() => d.value.commonHelpersData.primaryGroups.value), U = u(() => R(M.value)), S = u(() => D(M.value)), r = (G, e) => u({
23
+ const d = N(), r = u(() => d.value.reactive.statisticsSettings), M = u(() => d.value.commonHelpersData.primaryGroups.value), U = u(() => R(M.value)), S = u(() => D(M.value)), n = (G, e) => u({
18
24
  get() {
19
25
  return G[e] ?? void 0;
20
26
  },
21
27
  set(l) {
22
28
  G[e] = l ?? null;
23
29
  }
24
- }), p = r(a.value.overall.data, "testMethod"), m = r(a.value.referenceGroup.data, "testMethod"), v = r(a.value.referenceGroup.data, "referenceGroup"), c = r(a.value.referenceGroup.data, "correctionMethod"), f = r(a.value.pairwise.data, "testMethod"), V = r(a.value.pairwise.data, "correctionMethod");
30
+ }), p = n(r.value.overall.data, "testMethod"), m = n(r.value.referenceGroup.data, "testMethod"), v = n(r.value.referenceGroup.data, "referenceGroup"), c = n(r.value.referenceGroup.data, "correctionMethod"), f = n(r.value.pairwise.data, "testMethod"), V = n(r.value.pairwise.data, "correctionMethod");
25
31
  return O(d)(), x([
26
- () => a.value.overall.data.testMethod,
27
- () => a.value.referenceGroup.data.referenceGroup
32
+ () => r.value.overall.data.testMethod,
33
+ () => r.value.referenceGroup.data.referenceGroup
28
34
  ], O(d)), (G, e) => (E(), y(k, null, [
29
35
  e[12] || (e[12] = t("h3", null, " Statistics ", -1)),
30
36
  e[13] || (e[13] = t("div", { class: "section-title" }, [
31
37
  t("span", null, "overall p-value")
32
38
  ], -1)),
33
39
  t("div", P, [
34
- n(o(i), {
40
+ a(o(i), {
35
41
  label: "Method",
36
42
  clearable: "",
37
43
  placeholder: "Choose",
38
44
  modelValue: o(p),
39
45
  "onUpdate:modelValue": e[0] || (e[0] = (l) => s(p) ? p.value = l : null),
40
46
  options: S.value,
41
- error: a.value.overall.validity.testMethod ? "" : " "
47
+ error: r.value.overall.validity.testMethod ? "" : " "
42
48
  }, null, 8, ["modelValue", "options", "error"])
43
49
  ]),
44
50
  e[14] || (e[14] = t("div", { class: "section-title" }, [
45
51
  t("span", null, "reference group")
46
52
  ], -1)),
47
53
  t("div", A, [
48
- n(o(i), {
54
+ a(o(i), {
49
55
  label: "Reference from...",
50
56
  clearable: "",
51
57
  placeholder: "Choose",
52
58
  modelValue: o(v),
53
59
  "onUpdate:modelValue": e[1] || (e[1] = (l) => s(v) ? v.value = l : null),
54
60
  options: U.value,
55
- error: a.value.referenceGroup.validity.referenceGroup ? "" : " "
61
+ error: r.value.referenceGroup.validity.referenceGroup ? "" : " "
56
62
  }, null, 8, ["modelValue", "options", "error"])
57
63
  ]),
58
64
  t("div", B, [
59
- n(o(i), {
65
+ a(o(i), {
60
66
  label: "Method",
61
67
  clearable: "",
62
68
  placeholder: "Choose",
@@ -66,7 +72,7 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
66
72
  }, null, 8, ["modelValue", "options"])
67
73
  ]),
68
74
  t("div", F, [
69
- n(o(i), {
75
+ a(o(i), {
70
76
  label: "Correction method",
71
77
  placeholder: "Choose",
72
78
  modelValue: o(c),
@@ -75,17 +81,17 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
75
81
  }, null, 8, ["modelValue", "options"])
76
82
  ]),
77
83
  t("div", H, [
78
- n(o(h), {
84
+ a(o(h), {
79
85
  label: "Show",
80
- modelValue: a.value.referenceGroup.data.format,
81
- "onUpdate:modelValue": e[4] || (e[4] = (l) => a.value.referenceGroup.data.format = l),
86
+ modelValue: r.value.referenceGroup.data.format,
87
+ "onUpdate:modelValue": e[4] || (e[4] = (l) => r.value.referenceGroup.data.format = l),
82
88
  options: o(T)
83
89
  }, null, 8, ["modelValue", "options"])
84
90
  ]),
85
91
  t("div", I, [
86
- n(o(b), {
87
- modelValue: a.value.referenceGroup.data.ns,
88
- "onUpdate:modelValue": e[5] || (e[5] = (l) => a.value.referenceGroup.data.ns = l)
92
+ a(o(b), {
93
+ modelValue: r.value.referenceGroup.data.ns,
94
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => r.value.referenceGroup.data.ns = l)
89
95
  }, null, 8, ["modelValue"]),
90
96
  e[10] || (e[10] = t("span", null, "Non-significant", -1))
91
97
  ]),
@@ -93,7 +99,7 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
93
99
  t("span", null, "pairwise p-value")
94
100
  ], -1)),
95
101
  t("div", _, [
96
- n(o(i), {
102
+ a(o(i), {
97
103
  label: "Method",
98
104
  clearable: "",
99
105
  placeholder: "Choose",
@@ -103,7 +109,7 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
103
109
  }, null, 8, ["modelValue", "options"])
104
110
  ]),
105
111
  t("div", z, [
106
- n(o(i), {
112
+ a(o(i), {
107
113
  label: "Correction method",
108
114
  placeholder: "Choose",
109
115
  modelValue: o(V),
@@ -112,17 +118,17 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
112
118
  }, null, 8, ["modelValue", "options"])
113
119
  ]),
114
120
  t("div", L, [
115
- n(o(h), {
121
+ a(o(h), {
116
122
  label: "Show",
117
- modelValue: a.value.pairwise.data.format,
118
- "onUpdate:modelValue": e[8] || (e[8] = (l) => a.value.pairwise.data.format = l),
123
+ modelValue: r.value.pairwise.data.format,
124
+ "onUpdate:modelValue": e[8] || (e[8] = (l) => r.value.pairwise.data.format = l),
119
125
  options: o(T)
120
126
  }, null, 8, ["modelValue", "options"])
121
127
  ]),
122
128
  t("div", j, [
123
- n(o(b), {
124
- modelValue: a.value.pairwise.data.ns,
125
- "onUpdate:modelValue": e[9] || (e[9] = (l) => a.value.pairwise.data.ns = l)
129
+ a(o(b), {
130
+ modelValue: r.value.pairwise.data.ns,
131
+ "onUpdate:modelValue": e[9] || (e[9] = (l) => r.value.pairwise.data.ns = l)
126
132
  }, null, 8, ["modelValue"]),
127
133
  e[11] || (e[11] = t("span", null, "Non-significant", -1))
128
134
  ])
@@ -130,6 +136,6 @@ const P = { class: "input-item" }, A = { class: "input-item" }, B = { class: "in
130
136
  }
131
137
  });
132
138
  export {
133
- $ as default
139
+ ae as default
134
140
  };
135
141
  //# sourceMappingURL=DiscreteStatisticsForm.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DiscreteStatisticsForm.vue.js","sources":["../../../../src/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {useStore} from '../../store';\nimport {PlDropdown, PlBtnGroup, PlCheckbox} from \"@platforma-sdk/ui-vue\";\nimport { computed, watch } from 'vue';\nimport {\n DiscreteStatisticsState,\n FORMAT_P_VALUE_OPTIONS,\n STAT_CORRECTION_METHOD,\n STAT_TEST_METHOD\n} from '../../constantsCommon';\nimport {checkStatisticsInputsValidity, getOverallTestMethodOptions, getReferenceGroupOptions} from '../../utils';\n\nconst store = useStore();\nconst settings = computed(() => store.value.reactive.statisticsSettings as DiscreteStatisticsState);\n\nconst primaryGroups = computed(() => store.value.commonHelpersData.primaryGroups.value)\n\nconst referenceGroupOptions = computed(() => getReferenceGroupOptions(primaryGroups.value));\n\nconst overallTestMethodOptions = computed(() => getOverallTestMethodOptions(primaryGroups.value));\n\n\nconst withUndefined = (data:Record<string, string|null|boolean>, field:string) => {\n return computed({\n get() {\n return data[field] ?? undefined;\n },\n set(newValue:string | undefined) {\n data[field] = newValue ?? null;\n },\n })\n}\nconst overallTestMethod = withUndefined(settings.value.overall.data, 'testMethod');\n\nconst referenceGroupMethod = withUndefined(settings.value.referenceGroup.data, 'testMethod');\nconst referenceGroup = withUndefined(settings.value.referenceGroup.data, 'referenceGroup');\nconst referenceGroupCorrection = withUndefined(settings.value.referenceGroup.data, 'correctionMethod');\n\nconst pairwise = withUndefined(settings.value.pairwise.data, 'testMethod');\nconst pairwiseCorrection = withUndefined(settings.value.pairwise.data, 'correctionMethod');\n\ncheckStatisticsInputsValidity(store)();\nwatch([\n () => settings.value.overall.data.testMethod,\n () => settings.value.referenceGroup.data.referenceGroup\n], checkStatisticsInputsValidity(store));\n</script>\n<template>\n <h3>\n Statistics\n </h3>\n <!--Overall p-value settings-->\n <div class=\"section-title\"><span>overall p-value</span></div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Method\"\n clearable\n placeholder=\"Choose\"\n v-model=\"overallTestMethod\"\n :options=\"overallTestMethodOptions\"\n :error=\"settings.overall.validity.testMethod ? '' : ' '\"\n />\n </div>\n <!--Reference group p-value settings-->\n <div class=\"section-title\"><span>reference group</span></div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Reference from...\"\n clearable\n placeholder=\"Choose\"\n v-model=\"referenceGroup\"\n :options=\"referenceGroupOptions\"\n :error=\"settings.referenceGroup.validity.referenceGroup ? '' : ' '\"\n />\n </div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Method\"\n clearable\n placeholder=\"Choose\"\n v-model=\"referenceGroupMethod\"\n :options=\"STAT_TEST_METHOD\"\n />\n </div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Correction method\"\n placeholder=\"Choose\"\n v-model=\"referenceGroupCorrection\"\n :options=\"STAT_CORRECTION_METHOD\"\n />\n </div>\n <div class=\"input-item\" style=\"z-index: 0\">\n <pl-btn-group\n label=\"Show\"\n v-model=\"settings.referenceGroup.data.format\"\n :options=\"FORMAT_P_VALUE_OPTIONS\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.referenceGroup.data.ns\"/>\n <span>Non-significant</span>\n </div>\n <!--pairwise.data p-value settings-->\n <div class=\"section-title\"><span>pairwise p-value</span></div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Method\"\n clearable\n placeholder=\"Choose\"\n v-model=\"pairwise\"\n :options=\"STAT_TEST_METHOD\"\n />\n </div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Correction method\"\n placeholder=\"Choose\"\n v-model=\"pairwiseCorrection\"\n :options=\"STAT_CORRECTION_METHOD\"\n />\n </div>\n <div class=\"input-item\" style=\"z-index: 0\">\n <pl-btn-group\n label=\"Show\"\n v-model=\"settings.pairwise.data.format\"\n :options=\"FORMAT_P_VALUE_OPTIONS\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.pairwise.data.ns\"/>\n <span>Non-significant</span>\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","primaryGroups","referenceGroupOptions","getReferenceGroupOptions","overallTestMethodOptions","getOverallTestMethodOptions","withUndefined","data","field","newValue","overallTestMethod","referenceGroupMethod","referenceGroup","referenceGroupCorrection","pairwise","pairwiseCorrection","checkStatisticsInputsValidity","watch"],"mappings":";;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,EAAA,GACRC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,kBAA6C,GAE5FI,IAAgBD,EAAS,MAAMH,EAAM,MAAM,kBAAkB,cAAc,KAAK,GAEhFK,IAAwBF,EAAS,MAAMG,EAAyBF,EAAc,KAAK,CAAC,GAEpFG,IAA2BJ,EAAS,MAAMK,EAA4BJ,EAAc,KAAK,CAAC,GAG1FK,IAAgB,CAACC,GAA0CC,MACxDR,EAAS;AAAA,MACd,MAAM;AACJ,eAAOO,EAAKC,CAAK,KAAK;AAAA,MACxB;AAAA,MACA,IAAIC,GAA6B;AAC/B,QAAAF,EAAKC,CAAK,IAAIC,KAAY;AAAA,MAC5B;AAAA,IAAA,CACD,GAEGC,IAAoBJ,EAAcP,EAAS,MAAM,QAAQ,MAAM,YAAY,GAE3EY,IAAuBL,EAAcP,EAAS,MAAM,eAAe,MAAM,YAAY,GACrFa,IAAiBN,EAAcP,EAAS,MAAM,eAAe,MAAM,gBAAgB,GACnFc,IAA2BP,EAAcP,EAAS,MAAM,eAAe,MAAM,kBAAkB,GAE/Fe,IAAWR,EAAcP,EAAS,MAAM,SAAS,MAAM,YAAY,GACnEgB,IAAqBT,EAAcP,EAAS,MAAM,SAAS,MAAM,kBAAkB;AAEzF,WAAAiB,EAA8BnB,CAAK,EAAA,GACnCoB,EAAM;AAAA,MACJ,MAAMlB,EAAS,MAAM,QAAQ,KAAK;AAAA,MAClC,MAAMA,EAAS,MAAM,eAAe,KAAK;AAAA,IAAA,GACxCiB,EAA8BnB,CAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DiscreteStatisticsForm.vue.js","sources":["../../../../src/GraphMaker/forms/StatisticsForm/DiscreteStatisticsForm.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {useStore} from '../../store';\nimport {PlDropdown, PlBtnGroup, PlCheckbox} from \"@platforma-sdk/ui-vue\";\nimport { computed, watch } from 'vue';\nimport {\n DiscreteStatisticsState,\n FORMAT_P_VALUE_OPTIONS,\n STAT_CORRECTION_METHOD,\n STAT_TEST_METHOD\n} from '../../constantsCommon';\nimport {checkStatisticsInputsValidity, getOverallTestMethodOptions, getReferenceGroupOptions} from '../../utils';\n\nconst store = useStore();\nconst settings = computed(() => store.value.reactive.statisticsSettings as DiscreteStatisticsState);\n\nconst primaryGroups = computed(() => store.value.commonHelpersData.primaryGroups.value)\n\nconst referenceGroupOptions = computed(() => getReferenceGroupOptions(primaryGroups.value));\n\nconst overallTestMethodOptions = computed(() => getOverallTestMethodOptions(primaryGroups.value));\n\n\nconst withUndefined = (data:Record<string, string|null|boolean>, field:string) => {\n return computed({\n get() {\n return data[field] ?? undefined;\n },\n set(newValue:string | undefined) {\n data[field] = newValue ?? null;\n },\n })\n}\nconst overallTestMethod = withUndefined(settings.value.overall.data, 'testMethod');\n\nconst referenceGroupMethod = withUndefined(settings.value.referenceGroup.data, 'testMethod');\nconst referenceGroup = withUndefined(settings.value.referenceGroup.data, 'referenceGroup');\nconst referenceGroupCorrection = withUndefined(settings.value.referenceGroup.data, 'correctionMethod');\n\nconst pairwise = withUndefined(settings.value.pairwise.data, 'testMethod');\nconst pairwiseCorrection = withUndefined(settings.value.pairwise.data, 'correctionMethod');\n\ncheckStatisticsInputsValidity(store)();\nwatch([\n () => settings.value.overall.data.testMethod,\n () => settings.value.referenceGroup.data.referenceGroup\n], checkStatisticsInputsValidity(store));\n</script>\n<template>\n <h3>\n Statistics\n </h3>\n <!--Overall p-value settings-->\n <div class=\"section-title\"><span>overall p-value</span></div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Method\"\n clearable\n placeholder=\"Choose\"\n v-model=\"overallTestMethod\"\n :options=\"overallTestMethodOptions\"\n :error=\"settings.overall.validity.testMethod ? '' : ' '\"\n />\n </div>\n <!--Reference group p-value settings-->\n <div class=\"section-title\"><span>reference group</span></div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Reference from...\"\n clearable\n placeholder=\"Choose\"\n v-model=\"referenceGroup\"\n :options=\"referenceGroupOptions\"\n :error=\"settings.referenceGroup.validity.referenceGroup ? '' : ' '\"\n />\n </div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Method\"\n clearable\n placeholder=\"Choose\"\n v-model=\"referenceGroupMethod\"\n :options=\"STAT_TEST_METHOD\"\n />\n </div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Correction method\"\n placeholder=\"Choose\"\n v-model=\"referenceGroupCorrection\"\n :options=\"STAT_CORRECTION_METHOD\"\n />\n </div>\n <div class=\"input-item\" style=\"z-index: 0\">\n <pl-btn-group\n label=\"Show\"\n v-model=\"settings.referenceGroup.data.format\"\n :options=\"FORMAT_P_VALUE_OPTIONS\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.referenceGroup.data.ns\"/>\n <span>Non-significant</span>\n </div>\n <!--pairwise.data p-value settings-->\n <div class=\"section-title\"><span>pairwise p-value</span></div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Method\"\n clearable\n placeholder=\"Choose\"\n v-model=\"pairwise\"\n :options=\"STAT_TEST_METHOD\"\n />\n </div>\n <div class=\"input-item\">\n <pl-dropdown\n label=\"Correction method\"\n placeholder=\"Choose\"\n v-model=\"pairwiseCorrection\"\n :options=\"STAT_CORRECTION_METHOD\"\n />\n </div>\n <div class=\"input-item\" style=\"z-index: 0\">\n <pl-btn-group\n label=\"Show\"\n v-model=\"settings.pairwise.data.format\"\n :options=\"FORMAT_P_VALUE_OPTIONS\"\n />\n </div>\n <div class=\"checkbox-item\">\n <pl-checkbox v-model=\"settings.pairwise.data.ns\"/>\n <span>Non-significant</span>\n </div>\n</template>\n"],"names":["store","useStore","settings","computed","primaryGroups","referenceGroupOptions","getReferenceGroupOptions","overallTestMethodOptions","getOverallTestMethodOptions","withUndefined","data","field","newValue","overallTestMethod","referenceGroupMethod","referenceGroup","referenceGroupCorrection","pairwise","pairwiseCorrection","checkStatisticsInputsValidity","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,EAAA,GACRC,IAAWC,EAAS,MAAMH,EAAM,MAAM,SAAS,kBAA6C,GAE5FI,IAAgBD,EAAS,MAAMH,EAAM,MAAM,kBAAkB,cAAc,KAAK,GAEhFK,IAAwBF,EAAS,MAAMG,EAAyBF,EAAc,KAAK,CAAC,GAEpFG,IAA2BJ,EAAS,MAAMK,EAA4BJ,EAAc,KAAK,CAAC,GAG1FK,IAAgB,CAACC,GAA0CC,MACxDR,EAAS;AAAA,MACd,MAAM;AACJ,eAAOO,EAAKC,CAAK,KAAK;AAAA,MACxB;AAAA,MACA,IAAIC,GAA6B;AAC/B,QAAAF,EAAKC,CAAK,IAAIC,KAAY;AAAA,MAC5B;AAAA,IAAA,CACD,GAEGC,IAAoBJ,EAAcP,EAAS,MAAM,QAAQ,MAAM,YAAY,GAE3EY,IAAuBL,EAAcP,EAAS,MAAM,eAAe,MAAM,YAAY,GACrFa,IAAiBN,EAAcP,EAAS,MAAM,eAAe,MAAM,gBAAgB,GACnFc,IAA2BP,EAAcP,EAAS,MAAM,eAAe,MAAM,kBAAkB,GAE/Fe,IAAWR,EAAcP,EAAS,MAAM,SAAS,MAAM,YAAY,GACnEgB,IAAqBT,EAAcP,EAAS,MAAM,SAAS,MAAM,kBAAkB;AAEzF,WAAAiB,EAA8BnB,CAAK,EAAA,GACnCoB,EAAM;AAAA,MACJ,MAAMlB,EAAS,MAAM,QAAQ,KAAK;AAAA,MAClC,MAAMA,EAAS,MAAM,eAAe,KAAK;AAAA,IAAA,GACxCiB,EAA8BnB,CAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,9 +17,15 @@ import "./constantsAesthetic.js";
17
17
  import { composeChartSettings as A } from "./utils/createChartSettingsForRender/composeChartSettings.js";
18
18
  import { saveToFile as be } from "./utils/saveToFile.js";
19
19
  import { copyJSON as d } from "./utils/copyJSON.js";
20
+ import "../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
21
+ import "../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
22
+ import "../node_modules/@milaboratories/pl-model-common/dist/plid.js";
23
+ import "../node_modules/@milaboratories/pl-model-common/dist/ref.js";
24
+ import "../node_modules/@platforma-sdk/model/dist/render/util/label.js";
25
+ import "../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
20
26
  import { DemoDataStore as De } from "../node_modules/@milaboratories/pf-plots/dist/demoStore.js";
21
27
  import { debouncedWatch as v } from "../node_modules/@vueuse/shared/index.js";
22
- const Te = { class: "graph-maker" }, Ce = { class: "graph-maker__main-pane" }, Ae = /* @__PURE__ */ le({
28
+ const Te = { class: "graph-maker" }, Ce = { class: "graph-maker__main-pane" }, Qe = /* @__PURE__ */ le({
23
29
  __name: "index",
24
30
  props: /* @__PURE__ */ _({
25
31
  pFrame: {},
@@ -350,6 +356,6 @@ const Te = { class: "graph-maker" }, Ce = { class: "graph-maker__main-pane" }, A
350
356
  }
351
357
  });
352
358
  export {
353
- Ae as default
359
+ Qe as default
354
360
  };
355
361
  //# sourceMappingURL=index.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.vue.js","sources":["../../src/GraphMaker/index.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ChartInterface,\n DataByColumns,\n LassoControlsState,\n MiPlots,\n Settings\n} from '@milaboratories/miplots4';\nimport {\n ChartType,\n DemoDataStore, getInitialStateByType,\n PlotDataAndSettings\n} from '@milaboratories/pf-plots';\nimport type { AxisSpec, PFrameDriver, PlSelectionModel, PTableKey } from '@platforma-sdk/model';\nimport { watchDebounced } from '@vueuse/core';\nimport canonicalize from 'canonicalize';\nimport { computed, onMounted, onUnmounted, ref, shallowRef, toRaw, useSlots, watch } from 'vue';\nimport './assets/ui.scss';\nimport Chart from './components/Chart.vue';\nimport Loading from './components/Loading.vue';\nimport PanelModal from './components/PanelModal.vue';\nimport VTabs from './components/SettingsTabs/index.vue';\nimport TransitionSlidePanel from './components/TransitionSlidePanel.vue';\nimport { useSettingsForm } from './forms';\nimport { createReactiveState, provideStore } from './store';\nimport type { GraphMakerState, GraphStatus } from './types';\nimport { DendroNodeInfo, GraphMakerProps } from './types';\nimport { composeChartSettings, saveToFile } from './utils';\nimport { copyJSON } from './utils/copyJSON';\n\nconst emit = defineEmits(['delete-this-graph', 'tooltip-btn-click']);\n\nconst graphMakerState = defineModel<GraphMakerState>({ required: true });\nconst selectionState = defineModel<PlSelectionModel>('selection');\n\nconst props = defineProps<GraphMakerProps>();\n\ndefineExpose({\n /**\n reset() will update data-mapping, axis-settings, layers-settings with the state that is in v-model at the moment.\n In other cases editing of v-model fields doesn't make any impact to graphs and interface.\n Besides, after reset default-options will be applied again. You can use reset to apply new default-options.\n */\n reset,\n /**\n Apply new defaults without resetting all the state\n */\n resetDefaults\n});\n\nconst dataStore = ref<DemoDataStore | null>(null);\n\nwatch(() => props.pFrame, (pframeValue) => {\n if (!pframeValue) {\n return;\n }\n const driver = ('platforma' in window) ? window.platforma?.pFrameDriver as PFrameDriver : props.driver;\n if (!driver) {\n throw new Error('PFrame driver is missing');\n }\n dataStore.value = new DemoDataStore(\n pframeValue,\n driver,\n props.labelsModifier\n );\n}, { immediate: true });\n\n\n//fixed options can be updated outside, other settings only inside from chart settings interface, so we don't watching other settings\nconst fixedOptions = ref<typeof props.fixedOptions>(props.fixedOptions ?? []);\nwatch(() => props.fixedOptions, (value, oldValue) => {\n if (\n value && oldValue && JSON.stringify(value) !== JSON.stringify(oldValue) ||\n value && !oldValue ||\n oldValue && !value\n ) {\n fixedOptions.value = value;\n }\n}, { deep: true });\nconst defaultOptions = ref<typeof props.defaultOptions>(props.defaultOptions);\n\nconst state = provideStore(\n toRaw(graphMakerState.value),\n dataStore,\n props.chartType,\n defaultOptions,\n fixedOptions,\n props.dataColumnPredicate,\n props.readonlyInputs\n);\n\nfunction reset() {\n const nextReactiveState = createReactiveState(\n toRaw(graphMakerState.value),\n props.chartType\n );\n Object.assign(state.value.reactive, nextReactiveState);\n Object.assign(state.value.loading, {\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n });\n defaultOptions.value = props.defaultOptions;\n}\n\nfunction resetDefaults() {\n Object.assign(state.value.loading, {\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n });\n defaultOptions.value = props.defaultOptions ? [...props.defaultOptions] as typeof props.defaultOptions : [];\n}\n\nconst prevDataKey = computed(() => state.value.reactive.dataStateKey);\nwatch(() => canonicalize(props.dataStateKey), (keyValue) => {\n if ((keyValue !== undefined || prevDataKey.value !== undefined) && prevDataKey.value !== keyValue) {\n graphMakerState.value.optionsState = copyJSON(getInitialStateByType(props.chartType));\n const nextReactiveState = createReactiveState(toRaw(graphMakerState.value), props.chartType);\n Object.assign(state.value.reactive, nextReactiveState);\n Object.assign(state.value.loading, {\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n });\n defaultOptions.value = props.defaultOptions ? [...props.defaultOptions] as typeof props.defaultOptions : []; // to trigger watch on defaults\n }\n state.value.reactive.dataStateKey = keyValue;\n}, { deep: true, immediate: true });\n\nconst currentForm = computed(() => useSettingsForm(state.value.reactive.currentTab));\n\nconst chartRef = shallowRef<ChartInterface | null>(null);\nconst chartCalculatedDataRef = ref<Record<string, unknown> | null>(null);\nconst chartError = ref(false);\n\nconst graphStatus = computed<GraphStatus>(() => {\n const inputGuide = state.value.inputGuide.value;\n const chartData = state.value.chartData.value;\n if (!inputGuide.consistent) {\n return 'inconsistent';\n }\n if (!inputGuide.ready) {\n return 'notReady';\n }\n if (chartData && Object.values(chartData.data.byColumns.values)[0]?.length === 0) {\n return 'empty';\n }\n if (chartError.value) {\n return 'error';\n }\n return 'ready';\n});\nfunction onTreeNodeClick(d: DendroNodeInfo) {\n state.value.reactive.dendroSelectedNodeId = d?.info[0]?.id as number;\n state.value.reactive.dendroInfoByClick = d;\n}\n\nfunction onTooltipHintSwitch(v: boolean) {\n state.value.reactive.showTooltipHint = v;\n}\n\nfunction onLassoPolygonUpdate(dotIndexes: number[], polygons: { points: [number, number][], closed: boolean }[]) {\n graphMakerState.value = {\n ...graphMakerState.value,\n selectedPolygons: polygons\n };\n\n const axesData = state.value.chartData.value?.data?.axesData;\n if (dotIndexes.length === 0 || !axesData) {\n selectionState.value = { axesSpec: [], selectedKeys: [] };\n return;\n }\n\n const axisKeys = Object.keys(axesData);\n const inputGuide = state.value.inputGuide.value;\n selectionState.value = {\n axesSpec: axisKeys.map(axisKey => inputGuide.getSourceInfo(axisKey).spec as AxisSpec),\n selectedKeys: dotIndexes.map((idx) => axisKeys.map((axisKey) => axesData[axisKey][idx]) as PTableKey)\n };\n}\n\nfunction onLassoStateChange(v: LassoControlsState) {\n state.value.reactive.lassoControlsState = v;\n}\nconst graphEventHandlers: Record<ChartType, unknown> = {\n dendro: [onTreeNodeClick],\n 'scatterplot-umap': {\n onPolygonUpdate: onLassoPolygonUpdate,\n onTooltipHintSwitch,\n onLassoControlsStateUpdate: onLassoStateChange\n },\n discrete: [onTooltipHintSwitch],\n scatterplot: {\n onPolygonUpdate: onLassoPolygonUpdate,\n onTooltipHintSwitch,\n onLassoControlsStateUpdate: onLassoStateChange\n },\n histogram: [onTooltipHintSwitch],\n heatmap: [onTooltipHintSwitch],\n bubble: [onTooltipHintSwitch]\n}\nfunction updateChart(value: { data: PlotDataAndSettings['data']['byColumns'], settings: PlotDataAndSettings['settings'] } | null) {\n // if dataByColumns exists but columns has no data - show empty chart\n if (value && Object.values(value.data.values)[0]?.length > 0) {\n // console.log('value.dataByColumns', toRaw(value.data));\n // console.log('value.settings', toRaw(value.settings));\n if (chartRef.value) {\n chartRef.value.updateSettingsAndData(toRaw(value.data), toRaw(value.settings) as Settings);\n } else {\n const htmlNode = document.getElementById('chartSvgContainer');\n if (htmlNode) {\n chartRef.value = MiPlots.newPlot(toRaw(value.data), toRaw(value.settings) as Settings, graphEventHandlers[value.settings.type as ChartType]);\n if (value.settings.type === 'scatterplot-umap') {\n // set default polygons (from props)\n chartRef.value.updateChartState('polygon', graphMakerState.value.selectedPolygons ?? []);\n }\n chartRef.value.mount(htmlNode);\n }\n }\n // calculated by chart renderer data, tree hierarchy for example\n chartCalculatedDataRef.value = chartRef.value?.calculatedData ? { ...chartRef.value.calculatedData } : null;\n chartError.value = chartRef.value?.hasError ?? false;\n } else {\n chartRef.value?.unmount();\n chartRef.value = null;\n }\n}\n\nwatch(() => graphStatus.value, (v) => {\n if (v === 'notReady') {\n chartRef.value?.unmount();\n chartRef.value = null;\n }\n});\n\nconst chartDataForRender = shallowRef<{ settings: Settings, data: DataByColumns } | null>(null);\nwatch([\n () => state.value.chartData.value\n], ([chartData]) => {\n chartDataForRender.value = composeChartSettings(\n toRaw(chartData),\n toRaw(state.value.inputGuide.value),\n toRaw(state.value.uniqueValuesData.value),\n toRaw(state.value.filterLabelsInfo.value),\n toRaw(state.value.reactive)\n );\n});\nwatch([\n () => state.value.reactive.template,\n () => state.value.reactive.layersSettings,\n () => state.value.reactive.axesSettings,\n () => state.value.reactive.statisticsSettings,\n () => state.value.reactive.dataBindAes,\n () => state.value.reactive.chartScale,\n], () => {\n chartDataForRender.value = composeChartSettings(\n toRaw(state.value.chartData.value),\n toRaw(state.value.inputGuide.value),\n toRaw(state.value.uniqueValuesData.value),\n toRaw(state.value.filterLabelsInfo.value),\n toRaw(state.value.reactive),\n );\n}, { deep: true });\n\nwatch(() => chartDataForRender.value, (chartData) => {\n updateChart(chartData);\n});\nonMounted(() => {\n updateChart(null);\n});\nonUnmounted(() => {\n chartRef.value?.unmount();\n});\n\nwatchDebounced(() => state.value.reactive.optionsState, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n optionsState: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.statisticsSettings, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n statisticsSettings: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.axesSettings, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n axesSettings: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.layersSettings, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n layersSettings: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.dataBindAes, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n dataBindAes: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\n\nwatchDebounced([\n () => state.value.reactive.chartScale,\n () => state.value.reactive.template,\n () => state.value.reactive.currentTab\n], ([zoomState, template, currentTab]) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n zoomState,\n template,\n currentTab\n }\n}, { debounce: 1000 });\n\nwatch(() => state.value.reactive.dataStateKey, (dataStateKey) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n dataStateKey\n }\n}, { immediate: true });\n\nwatch(() => graphMakerState.value.currentTab, (v) => {\n state.value.reactive.currentTab = v === undefined ? 'dataMapping' : v;\n});\n\nwatch(() => graphMakerState.value?.layersSettings?.dendro?.showTable, (v) => {\n state.value.reactive.layersSettings.dendro.showTable = v ?? false;\n});\n\nfunction onExport() {\n saveToFile(\n new Blob([\n chartRef.value?.export() ?? ''\n ]),\n 'chart.svg'\n );\n}\n\nfunction updateGraphTitle(nextTitle: string) {\n graphMakerState.value = {\n ...graphMakerState.value,\n title: nextTitle\n };\n}\n\nfunction selectTreeNode(id: number | null) {\n state.value.reactive.dendroSelectedNodeId = id;\n chartRef.value?.updateChartState('selectedNode', id);\n}\n\nconst slots = useSlots();\n\nconst hasSettingsSlot = computed(() => Boolean(slots.settingsSlot));\nconst hasLogSlot = computed(() => Boolean(slots.logSlot));\n\n</script>\n\n<template>\n <div class=\"graph-maker\">\n <div class=\"graph-maker__main-pane\">\n <chart :graph-status=\"graphStatus\" :graphTitle=\"graphMakerState.title\" :chartData=\"chartCalculatedDataRef\"\n :chart-ref=\"chartRef\" :dendroTooltipButton=\"tooltipButton\" @graph-title-update=\"updateGraphTitle\"\n @dendro-node-select=\"selectTreeNode\" @dendro-tooltip-btn-click=\"(id: string) => $emit('tooltip-btn-click', id)\">\n <slot name=\"titleLineSlot\"></slot>\n </chart>\n <loading v-if=\"state.loading.initialInputGuide\" :top=\"67\" :left=\"12\" :right=\"12\" :bottom=\"12\" />\n <TransitionSlidePanel id=\"graph-settings-modal\" v-if=\"!state.loading.initialInputGuide\">\n <panel-modal v-if=\"state.reactive.currentTab\" @close=\"state.reactive.currentTab = null\">\n <component :is=\"currentForm.value\">\n <slot v-if=\"state.reactive.currentTab === 'settings'\" name=\"settingsSlot\"></slot>\n <slot v-if=\"state.reactive.currentTab === 'log'\" name=\"logSlot\"></slot>\n </component>\n </panel-modal>\n </TransitionSlidePanel>\n </div>\n <v-tabs :chart-type=\"state.reactive.chartType\" :graph-status=\"graphStatus\" :allowDeleting=\"allowChartDeleting\"\n :hasSettingsSlot=\"hasSettingsSlot\" :hasLogSlot=\"hasLogSlot\" :initialLoading=\"state.loading.initialInputGuide\"\n v-model=\"state.reactive.currentTab\" @export=\"onExport\" @delete=\"$emit('delete-this-graph')\" />\n </div>\n</template>\n"],"names":["graphMakerState","_useModel","selectionState","__props","props","__expose","reset","resetDefaults","dataStore","ref","watch","pframeValue","driver","_a","DemoDataStore","fixedOptions","value","oldValue","defaultOptions","state","provideStore","toRaw","nextReactiveState","createReactiveState","prevDataKey","computed","canonicalize","keyValue","copyJSON","getInitialStateByType","currentForm","useSettingsForm","chartRef","shallowRef","chartCalculatedDataRef","chartError","graphStatus","inputGuide","chartData","onTreeNodeClick","d","onTooltipHintSwitch","v","onLassoPolygonUpdate","dotIndexes","polygons","axesData","_b","axisKeys","axisKey","idx","onLassoStateChange","graphEventHandlers","updateChart","htmlNode","MiPlots","_c","_d","chartDataForRender","composeChartSettings","onMounted","onUnmounted","watchDebounced","zoomState","template","currentTab","dataStateKey","onExport","saveToFile","updateGraphTitle","nextTitle","selectTreeNode","id","slots","useSlots","hasSettingsSlot","hasLogSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAMA,IAAkBC,iBAA+C,GACjEC,IAAiBD,EAA6BE,GAAC,WAAW,GAE1DC,IAAQD;AAEd,IAAAE,EAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMX,OAAAC;AAAA;AAAA;AAAA;AAAA,MAIA,eAAAC;AAAA,IAAA,CACD;AAED,UAAMC,IAAYC,EAA0B,IAAI;AAEhD,IAAAC,EAAM,MAAMN,EAAM,QAAQ,CAACO,MAAgB;;AACzC,UAAI,CAACA;AACH;AAEF,YAAMC,IAAU,eAAe,UAAUC,IAAA,OAAO,cAAP,gBAAAA,EAAkB,eAA+BT,EAAM;AAChG,UAAI,CAACQ;AACH,cAAM,IAAI,MAAM,0BAA0B;AAE5C,MAAAJ,EAAU,QAAQ,IAAIM;AAAAA,QACpBH;AAAA,QACAC;AAAA,QACAR,EAAM;AAAA,MAAA;AAAA,IAEV,GAAG,EAAE,WAAW,IAAM;AAItB,UAAMW,IAAeN,EAA+BL,EAAM,gBAAgB,CAAA,CAAE;AAC5E,IAAAM,EAAM,MAAMN,EAAM,cAAc,CAACY,GAAOC,MAAa;AACnD,OACED,KAASC,KAAY,KAAK,UAAUD,CAAK,MAAM,KAAK,UAAUC,CAAQ,KACtED,KAAS,CAACC,KACVA,KAAY,CAACD,OAEbD,EAAa,QAAQC;AAAA,IAEzB,GAAG,EAAE,MAAM,IAAM;AACjB,UAAME,IAAiBT,EAAiCL,EAAM,cAAc,GAEtEe,IAAQC;AAAA,MACZC,EAAMrB,EAAgB,KAAK;AAAA,MAC3BQ;AAAA,MACAJ,EAAM;AAAA,MACNc;AAAA,MACAH;AAAA,MACAX,EAAM;AAAA,MACNA,EAAM;AAAA,IAAA;AAGR,aAASE,IAAQ;AACf,YA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,IAAAmB,EAAS,UAAT,gBAAAnB,EAAgB,aAAY;AAAA,QAAA,CAC7B;AAAA,QACD;AAAA,MAAA;AAAA,IAEJ;AAEA,aAASwD,EAAiBC,GAAmB;AAC3C,MAAAtE,EAAgB,QAAQ;AAAA,QACtB,GAAGA,EAAgB;AAAA,QACnB,OAAOsE;AAAA,MAAA;AAAA,IAEX;AAEA,aAASC,EAAeC,GAAmB;;AACzC,MAAArD,EAAM,MAAM,SAAS,uBAAuBqD,IAC5C3D,IAAAmB,EAAS,UAAT,QAAAnB,EAAgB,iBAAiB,gBAAgB2D;AAAA,IACnD;AAEA,UAAMC,IAAQC,GAAA,GAERC,KAAkBlD,EAAS,MAAM,EAAQgD,EAAM,YAAa,GAC5DG,KAAanD,EAAS,MAAM,EAAQgD,EAAM,OAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.vue.js","sources":["../../src/GraphMaker/index.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ChartInterface,\n DataByColumns,\n LassoControlsState,\n MiPlots,\n Settings\n} from '@milaboratories/miplots4';\nimport {\n ChartType,\n DemoDataStore, getInitialStateByType,\n PlotDataAndSettings\n} from '@milaboratories/pf-plots';\nimport type { AxisSpec, PFrameDriver, PlSelectionModel, PTableKey } from '@platforma-sdk/model';\nimport { watchDebounced } from '@vueuse/core';\nimport canonicalize from 'canonicalize';\nimport { computed, onMounted, onUnmounted, ref, shallowRef, toRaw, useSlots, watch } from 'vue';\nimport './assets/ui.scss';\nimport Chart from './components/Chart.vue';\nimport Loading from './components/Loading.vue';\nimport PanelModal from './components/PanelModal.vue';\nimport VTabs from './components/SettingsTabs/index.vue';\nimport TransitionSlidePanel from './components/TransitionSlidePanel.vue';\nimport { useSettingsForm } from './forms';\nimport { createReactiveState, provideStore } from './store';\nimport type { GraphMakerState, GraphStatus } from './types';\nimport { DendroNodeInfo, GraphMakerProps } from './types';\nimport { composeChartSettings, saveToFile } from './utils';\nimport { copyJSON } from './utils/copyJSON';\n\nconst emit = defineEmits(['delete-this-graph', 'tooltip-btn-click']);\n\nconst graphMakerState = defineModel<GraphMakerState>({ required: true });\nconst selectionState = defineModel<PlSelectionModel>('selection');\n\nconst props = defineProps<GraphMakerProps>();\n\ndefineExpose({\n /**\n reset() will update data-mapping, axis-settings, layers-settings with the state that is in v-model at the moment.\n In other cases editing of v-model fields doesn't make any impact to graphs and interface.\n Besides, after reset default-options will be applied again. You can use reset to apply new default-options.\n */\n reset,\n /**\n Apply new defaults without resetting all the state\n */\n resetDefaults\n});\n\nconst dataStore = ref<DemoDataStore | null>(null);\n\nwatch(() => props.pFrame, (pframeValue) => {\n if (!pframeValue) {\n return;\n }\n const driver = ('platforma' in window) ? window.platforma?.pFrameDriver as PFrameDriver : props.driver;\n if (!driver) {\n throw new Error('PFrame driver is missing');\n }\n dataStore.value = new DemoDataStore(\n pframeValue,\n driver,\n props.labelsModifier\n );\n}, { immediate: true });\n\n\n//fixed options can be updated outside, other settings only inside from chart settings interface, so we don't watching other settings\nconst fixedOptions = ref<typeof props.fixedOptions>(props.fixedOptions ?? []);\nwatch(() => props.fixedOptions, (value, oldValue) => {\n if (\n value && oldValue && JSON.stringify(value) !== JSON.stringify(oldValue) ||\n value && !oldValue ||\n oldValue && !value\n ) {\n fixedOptions.value = value;\n }\n}, { deep: true });\nconst defaultOptions = ref<typeof props.defaultOptions>(props.defaultOptions);\n\nconst state = provideStore(\n toRaw(graphMakerState.value),\n dataStore,\n props.chartType,\n defaultOptions,\n fixedOptions,\n props.dataColumnPredicate,\n props.readonlyInputs\n);\n\nfunction reset() {\n const nextReactiveState = createReactiveState(\n toRaw(graphMakerState.value),\n props.chartType\n );\n Object.assign(state.value.reactive, nextReactiveState);\n Object.assign(state.value.loading, {\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n });\n defaultOptions.value = props.defaultOptions;\n}\n\nfunction resetDefaults() {\n Object.assign(state.value.loading, {\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n });\n defaultOptions.value = props.defaultOptions ? [...props.defaultOptions] as typeof props.defaultOptions : [];\n}\n\nconst prevDataKey = computed(() => state.value.reactive.dataStateKey);\nwatch(() => canonicalize(props.dataStateKey), (keyValue) => {\n if ((keyValue !== undefined || prevDataKey.value !== undefined) && prevDataKey.value !== keyValue) {\n graphMakerState.value.optionsState = copyJSON(getInitialStateByType(props.chartType));\n const nextReactiveState = createReactiveState(toRaw(graphMakerState.value), props.chartType);\n Object.assign(state.value.reactive, nextReactiveState);\n Object.assign(state.value.loading, {\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n });\n defaultOptions.value = props.defaultOptions ? [...props.defaultOptions] as typeof props.defaultOptions : []; // to trigger watch on defaults\n }\n state.value.reactive.dataStateKey = keyValue;\n}, { deep: true, immediate: true });\n\nconst currentForm = computed(() => useSettingsForm(state.value.reactive.currentTab));\n\nconst chartRef = shallowRef<ChartInterface | null>(null);\nconst chartCalculatedDataRef = ref<Record<string, unknown> | null>(null);\nconst chartError = ref(false);\n\nconst graphStatus = computed<GraphStatus>(() => {\n const inputGuide = state.value.inputGuide.value;\n const chartData = state.value.chartData.value;\n if (!inputGuide.consistent) {\n return 'inconsistent';\n }\n if (!inputGuide.ready) {\n return 'notReady';\n }\n if (chartData && Object.values(chartData.data.byColumns.values)[0]?.length === 0) {\n return 'empty';\n }\n if (chartError.value) {\n return 'error';\n }\n return 'ready';\n});\nfunction onTreeNodeClick(d: DendroNodeInfo) {\n state.value.reactive.dendroSelectedNodeId = d?.info[0]?.id as number;\n state.value.reactive.dendroInfoByClick = d;\n}\n\nfunction onTooltipHintSwitch(v: boolean) {\n state.value.reactive.showTooltipHint = v;\n}\n\nfunction onLassoPolygonUpdate(dotIndexes: number[], polygons: { points: [number, number][], closed: boolean }[]) {\n graphMakerState.value = {\n ...graphMakerState.value,\n selectedPolygons: polygons\n };\n\n const axesData = state.value.chartData.value?.data?.axesData;\n if (dotIndexes.length === 0 || !axesData) {\n selectionState.value = { axesSpec: [], selectedKeys: [] };\n return;\n }\n\n const axisKeys = Object.keys(axesData);\n const inputGuide = state.value.inputGuide.value;\n selectionState.value = {\n axesSpec: axisKeys.map(axisKey => inputGuide.getSourceInfo(axisKey).spec as AxisSpec),\n selectedKeys: dotIndexes.map((idx) => axisKeys.map((axisKey) => axesData[axisKey][idx]) as PTableKey)\n };\n}\n\nfunction onLassoStateChange(v: LassoControlsState) {\n state.value.reactive.lassoControlsState = v;\n}\nconst graphEventHandlers: Record<ChartType, unknown> = {\n dendro: [onTreeNodeClick],\n 'scatterplot-umap': {\n onPolygonUpdate: onLassoPolygonUpdate,\n onTooltipHintSwitch,\n onLassoControlsStateUpdate: onLassoStateChange\n },\n discrete: [onTooltipHintSwitch],\n scatterplot: {\n onPolygonUpdate: onLassoPolygonUpdate,\n onTooltipHintSwitch,\n onLassoControlsStateUpdate: onLassoStateChange\n },\n histogram: [onTooltipHintSwitch],\n heatmap: [onTooltipHintSwitch],\n bubble: [onTooltipHintSwitch]\n}\nfunction updateChart(value: { data: PlotDataAndSettings['data']['byColumns'], settings: PlotDataAndSettings['settings'] } | null) {\n // if dataByColumns exists but columns has no data - show empty chart\n if (value && Object.values(value.data.values)[0]?.length > 0) {\n // console.log('value.dataByColumns', toRaw(value.data));\n // console.log('value.settings', toRaw(value.settings));\n if (chartRef.value) {\n chartRef.value.updateSettingsAndData(toRaw(value.data), toRaw(value.settings) as Settings);\n } else {\n const htmlNode = document.getElementById('chartSvgContainer');\n if (htmlNode) {\n chartRef.value = MiPlots.newPlot(toRaw(value.data), toRaw(value.settings) as Settings, graphEventHandlers[value.settings.type as ChartType]);\n if (value.settings.type === 'scatterplot-umap') {\n // set default polygons (from props)\n chartRef.value.updateChartState('polygon', graphMakerState.value.selectedPolygons ?? []);\n }\n chartRef.value.mount(htmlNode);\n }\n }\n // calculated by chart renderer data, tree hierarchy for example\n chartCalculatedDataRef.value = chartRef.value?.calculatedData ? { ...chartRef.value.calculatedData } : null;\n chartError.value = chartRef.value?.hasError ?? false;\n } else {\n chartRef.value?.unmount();\n chartRef.value = null;\n }\n}\n\nwatch(() => graphStatus.value, (v) => {\n if (v === 'notReady') {\n chartRef.value?.unmount();\n chartRef.value = null;\n }\n});\n\nconst chartDataForRender = shallowRef<{ settings: Settings, data: DataByColumns } | null>(null);\nwatch([\n () => state.value.chartData.value\n], ([chartData]) => {\n chartDataForRender.value = composeChartSettings(\n toRaw(chartData),\n toRaw(state.value.inputGuide.value),\n toRaw(state.value.uniqueValuesData.value),\n toRaw(state.value.filterLabelsInfo.value),\n toRaw(state.value.reactive)\n );\n});\nwatch([\n () => state.value.reactive.template,\n () => state.value.reactive.layersSettings,\n () => state.value.reactive.axesSettings,\n () => state.value.reactive.statisticsSettings,\n () => state.value.reactive.dataBindAes,\n () => state.value.reactive.chartScale,\n], () => {\n chartDataForRender.value = composeChartSettings(\n toRaw(state.value.chartData.value),\n toRaw(state.value.inputGuide.value),\n toRaw(state.value.uniqueValuesData.value),\n toRaw(state.value.filterLabelsInfo.value),\n toRaw(state.value.reactive),\n );\n}, { deep: true });\n\nwatch(() => chartDataForRender.value, (chartData) => {\n updateChart(chartData);\n});\nonMounted(() => {\n updateChart(null);\n});\nonUnmounted(() => {\n chartRef.value?.unmount();\n});\n\nwatchDebounced(() => state.value.reactive.optionsState, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n optionsState: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.statisticsSettings, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n statisticsSettings: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.axesSettings, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n axesSettings: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.layersSettings, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n layersSettings: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\nwatchDebounced(() => state.value.reactive.dataBindAes, (v) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n dataBindAes: copyJSON(v)\n }\n}, { deep: true, debounce: 1000 });\n\nwatchDebounced([\n () => state.value.reactive.chartScale,\n () => state.value.reactive.template,\n () => state.value.reactive.currentTab\n], ([zoomState, template, currentTab]) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n zoomState,\n template,\n currentTab\n }\n}, { debounce: 1000 });\n\nwatch(() => state.value.reactive.dataStateKey, (dataStateKey) => {\n graphMakerState.value = {\n ...graphMakerState.value,\n dataStateKey\n }\n}, { immediate: true });\n\nwatch(() => graphMakerState.value.currentTab, (v) => {\n state.value.reactive.currentTab = v === undefined ? 'dataMapping' : v;\n});\n\nwatch(() => graphMakerState.value?.layersSettings?.dendro?.showTable, (v) => {\n state.value.reactive.layersSettings.dendro.showTable = v ?? false;\n});\n\nfunction onExport() {\n saveToFile(\n new Blob([\n chartRef.value?.export() ?? ''\n ]),\n 'chart.svg'\n );\n}\n\nfunction updateGraphTitle(nextTitle: string) {\n graphMakerState.value = {\n ...graphMakerState.value,\n title: nextTitle\n };\n}\n\nfunction selectTreeNode(id: number | null) {\n state.value.reactive.dendroSelectedNodeId = id;\n chartRef.value?.updateChartState('selectedNode', id);\n}\n\nconst slots = useSlots();\n\nconst hasSettingsSlot = computed(() => Boolean(slots.settingsSlot));\nconst hasLogSlot = computed(() => Boolean(slots.logSlot));\n\n</script>\n\n<template>\n <div class=\"graph-maker\">\n <div class=\"graph-maker__main-pane\">\n <chart :graph-status=\"graphStatus\" :graphTitle=\"graphMakerState.title\" :chartData=\"chartCalculatedDataRef\"\n :chart-ref=\"chartRef\" :dendroTooltipButton=\"tooltipButton\" @graph-title-update=\"updateGraphTitle\"\n @dendro-node-select=\"selectTreeNode\" @dendro-tooltip-btn-click=\"(id: string) => $emit('tooltip-btn-click', id)\">\n <slot name=\"titleLineSlot\"></slot>\n </chart>\n <loading v-if=\"state.loading.initialInputGuide\" :top=\"67\" :left=\"12\" :right=\"12\" :bottom=\"12\" />\n <TransitionSlidePanel id=\"graph-settings-modal\" v-if=\"!state.loading.initialInputGuide\">\n <panel-modal v-if=\"state.reactive.currentTab\" @close=\"state.reactive.currentTab = null\">\n <component :is=\"currentForm.value\">\n <slot v-if=\"state.reactive.currentTab === 'settings'\" name=\"settingsSlot\"></slot>\n <slot v-if=\"state.reactive.currentTab === 'log'\" name=\"logSlot\"></slot>\n </component>\n </panel-modal>\n </TransitionSlidePanel>\n </div>\n <v-tabs :chart-type=\"state.reactive.chartType\" :graph-status=\"graphStatus\" :allowDeleting=\"allowChartDeleting\"\n :hasSettingsSlot=\"hasSettingsSlot\" :hasLogSlot=\"hasLogSlot\" :initialLoading=\"state.loading.initialInputGuide\"\n v-model=\"state.reactive.currentTab\" @export=\"onExport\" @delete=\"$emit('delete-this-graph')\" />\n </div>\n</template>\n"],"names":["graphMakerState","_useModel","selectionState","__props","props","__expose","reset","resetDefaults","dataStore","ref","watch","pframeValue","driver","_a","DemoDataStore","fixedOptions","value","oldValue","defaultOptions","state","provideStore","toRaw","nextReactiveState","createReactiveState","prevDataKey","computed","canonicalize","keyValue","copyJSON","getInitialStateByType","currentForm","useSettingsForm","chartRef","shallowRef","chartCalculatedDataRef","chartError","graphStatus","inputGuide","chartData","onTreeNodeClick","d","onTooltipHintSwitch","v","onLassoPolygonUpdate","dotIndexes","polygons","axesData","_b","axisKeys","axisKey","idx","onLassoStateChange","graphEventHandlers","updateChart","htmlNode","MiPlots","_c","_d","chartDataForRender","composeChartSettings","onMounted","onUnmounted","watchDebounced","zoomState","template","currentTab","dataStateKey","onExport","saveToFile","updateGraphTitle","nextTitle","selectTreeNode","id","slots","useSlots","hasSettingsSlot","hasLogSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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AC3C,MAAAtE,EAAgB,QAAQ;AAAA,QACtB,GAAGA,EAAgB;AAAA,QACnB,OAAOsE;AAAA,MAAA;AAAA,IAEX;AAEA,aAASC,EAAeC,GAAmB;;AACzC,MAAArD,EAAM,MAAM,SAAS,uBAAuBqD,IAC5C3D,IAAAmB,EAAS,UAAT,QAAAnB,EAAgB,iBAAiB,gBAAgB2D;AAAA,IACnD;AAEA,UAAMC,IAAQC,GAAA,GAERC,KAAkBlD,EAAS,MAAM,EAAQgD,EAAM,YAAa,GAC5DG,KAAanD,EAAS,MAAM,EAAQgD,EAAM,OAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,25 +1,31 @@
1
- import { PALETTE_MAP as m, DEFAULT_BLACK as t, DEFAULT_CONTINUOUS_PALETTE as s } from "../../constantsAesthetic.js";
1
+ import { PALETTE_MAP as n, DEFAULT_BLACK as e, DEFAULT_CONTINUOUS_PALETTE as p } from "../../constantsAesthetic.js";
2
2
  import "vue";
3
- import { getAxesDataFromForms as A } from "./getAxesDataFromForms.js";
3
+ import { getAxesDataFromForms as s } from "./getAxesDataFromForms.js";
4
4
  import "../../../node_modules/@milaboratories/pf-plots/dist/index.js";
5
- const n = 40, c = n / 2 - 2, p = 3;
6
- function u(o, l) {
7
- var a;
8
- const i = l.template, r = l.layersSettings[i], e = (a = l.dataBindAes[o.valueColor.value]) == null ? void 0 : a.palette;
5
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
6
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
7
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
8
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
9
+ import "../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
10
+ import "../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
11
+ const m = 40, A = m / 2 - 2, c = 3;
12
+ function C(o, r) {
13
+ var l;
14
+ const t = r.template, i = r.layersSettings[t], a = (l = r.dataBindAes[o.valueColor.value]) == null ? void 0 : l.palette;
9
15
  return o.aes = {
10
- cellStrokeColor: r.strokeColor ?? t,
11
- colorsList: m[e ?? s].colors,
12
- maxRadius: c * (l.chartScale / 100),
13
- minRadius: p
14
- }, o.size = { cellSize: n * (l.chartScale / 100) }, Object.assign(
16
+ cellStrokeColor: i.strokeColor ?? e,
17
+ colorsList: n[a ?? p].colors,
18
+ maxRadius: A * (r.chartScale / 100),
19
+ minRadius: c
20
+ }, o.size = { cellSize: m * (r.chartScale / 100) }, Object.assign(
15
21
  o,
16
- A(l.axesSettings, l.chartType)
17
- ), o.NAValueAs = r.NAValueAs, r.normalizationDirection && (o.normalization = {
18
- method: r.normalizationMethod,
19
- direction: r.normalizationDirection
22
+ s(r.axesSettings, r.chartType)
23
+ ), o.NAValueAs = i.NAValueAs, i.normalizationDirection && (o.normalization = {
24
+ method: i.normalizationMethod,
25
+ direction: i.normalizationDirection
20
26
  }), o;
21
27
  }
22
28
  export {
23
- u as composeBubbleSettings
29
+ C as composeBubbleSettings
24
30
  };
25
31
  //# sourceMappingURL=composeBubbleSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"composeBubbleSettings.js","sources":["../../../../src/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.ts"],"sourcesContent":["import { BubbleSettings } from '@milaboratories/miplots4';\nimport {\n DEFAULT_BLACK,\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../constantsAesthetic';\nimport { BubbleLayer, ReactiveState } from '../../types';\nimport { getAxesDataFromForms } from '../index';\n\nconst DEFAULT_CELL_SIZE = 40;\nconst DEFAULT_MAX_R = DEFAULT_CELL_SIZE / 2 - 2;\nconst DEFAULT_MIN_R = 3;\nexport function composeBubbleSettings(\n settings: BubbleSettings,\n reactiveState: ReactiveState\n) {\n const template = reactiveState.template as BubbleLayer;\n const layerSettings = reactiveState.layersSettings[template];\n const palette = reactiveState.dataBindAes[settings.valueColor.value]?.palette;\n settings.aes = {\n cellStrokeColor: layerSettings.strokeColor ?? DEFAULT_BLACK,\n colorsList: PALETTE_MAP[palette ?? DEFAULT_CONTINUOUS_PALETTE].colors,\n maxRadius: DEFAULT_MAX_R * (reactiveState.chartScale / 100),\n minRadius: DEFAULT_MIN_R\n }\n\n settings.size = {cellSize: DEFAULT_CELL_SIZE * (reactiveState.chartScale / 100)}\n\n Object.assign(\n settings,\n getAxesDataFromForms(reactiveState.axesSettings, reactiveState.chartType)\n );\n\n\n settings.NAValueAs = layerSettings.NAValueAs;\n if (layerSettings.normalizationDirection) {\n settings.normalization = {\n method: layerSettings.normalizationMethod,\n direction: layerSettings.normalizationDirection\n }\n }\n return settings;\n}"],"names":["DEFAULT_CELL_SIZE","DEFAULT_MAX_R","DEFAULT_MIN_R","composeBubbleSettings","settings","reactiveState","template","layerSettings","palette","_a","DEFAULT_BLACK","PALETTE_MAP","DEFAULT_CONTINUOUS_PALETTE","getAxesDataFromForms"],"mappings":";;;;AASA,MAAMA,IAAoB,IACpBC,IAAgBD,IAAoB,IAAI,GACxCE,IAAgB;AACf,SAASC,EACdC,GACAC,GACA;;AACA,QAAMC,IAAWD,EAAc,UACzBE,IAAgBF,EAAc,eAAeC,CAAQ,GACrDE,KAAUC,IAAAJ,EAAc,YAAYD,EAAS,WAAW,KAAK,MAAnD,gBAAAK,EAAsD;AACtE,SAAAL,EAAS,MAAM;AAAA,IACb,iBAAiBG,EAAc,eAAeG;AAAA,IAC9C,YAAYC,EAAYH,KAAWI,CAA0B,EAAE;AAAA,IAC/D,WAAWX,KAAiBI,EAAc,aAAa;AAAA,IACvD,WAAWH;AAAA,EAAA,GAGbE,EAAS,OAAO,EAAC,UAAUJ,KAAqBK,EAAc,aAAa,KAAA,GAE3E,OAAO;AAAA,IACLD;AAAA,IACAS,EAAqBR,EAAc,cAAcA,EAAc,SAAS;AAAA,EAAA,GAI1ED,EAAS,YAAYG,EAAc,WAC/BA,EAAc,2BAChBH,EAAS,gBAAgB;AAAA,IACvB,QAAQG,EAAc;AAAA,IACtB,WAAWA,EAAc;AAAA,EAAA,IAGtBH;AACT;"}
1
+ {"version":3,"file":"composeBubbleSettings.js","sources":["../../../../src/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.ts"],"sourcesContent":["import { BubbleSettings } from '@milaboratories/miplots4';\nimport {\n DEFAULT_BLACK,\n DEFAULT_CONTINUOUS_PALETTE,\n PALETTE_MAP\n} from '../../constantsAesthetic';\nimport { BubbleLayer, ReactiveState } from '../../types';\nimport { getAxesDataFromForms } from '../index';\n\nconst DEFAULT_CELL_SIZE = 40;\nconst DEFAULT_MAX_R = DEFAULT_CELL_SIZE / 2 - 2;\nconst DEFAULT_MIN_R = 3;\nexport function composeBubbleSettings(\n settings: BubbleSettings,\n reactiveState: ReactiveState\n) {\n const template = reactiveState.template as BubbleLayer;\n const layerSettings = reactiveState.layersSettings[template];\n const palette = reactiveState.dataBindAes[settings.valueColor.value]?.palette;\n settings.aes = {\n cellStrokeColor: layerSettings.strokeColor ?? DEFAULT_BLACK,\n colorsList: PALETTE_MAP[palette ?? DEFAULT_CONTINUOUS_PALETTE].colors,\n maxRadius: DEFAULT_MAX_R * (reactiveState.chartScale / 100),\n minRadius: DEFAULT_MIN_R\n }\n\n settings.size = {cellSize: DEFAULT_CELL_SIZE * (reactiveState.chartScale / 100)}\n\n Object.assign(\n settings,\n getAxesDataFromForms(reactiveState.axesSettings, reactiveState.chartType)\n );\n\n\n settings.NAValueAs = layerSettings.NAValueAs;\n if (layerSettings.normalizationDirection) {\n settings.normalization = {\n method: layerSettings.normalizationMethod,\n direction: layerSettings.normalizationDirection\n }\n }\n return settings;\n}"],"names":["DEFAULT_CELL_SIZE","DEFAULT_MAX_R","DEFAULT_MIN_R","composeBubbleSettings","settings","reactiveState","template","layerSettings","palette","_a","DEFAULT_BLACK","PALETTE_MAP","DEFAULT_CONTINUOUS_PALETTE","getAxesDataFromForms"],"mappings":";;;;;;;;;;AASA,MAAMA,IAAoB,IACpBC,IAAgBD,IAAoB,IAAI,GACxCE,IAAgB;AACf,SAASC,EACdC,GACAC,GACA;;AACA,QAAMC,IAAWD,EAAc,UACzBE,IAAgBF,EAAc,eAAeC,CAAQ,GACrDE,KAAUC,IAAAJ,EAAc,YAAYD,EAAS,WAAW,KAAK,MAAnD,gBAAAK,EAAsD;AACtE,SAAAL,EAAS,MAAM;AAAA,IACb,iBAAiBG,EAAc,eAAeG;AAAA,IAC9C,YAAYC,EAAYH,KAAWI,CAA0B,EAAE;AAAA,IAC/D,WAAWX,KAAiBI,EAAc,aAAa;AAAA,IACvD,WAAWH;AAAA,EAAA,GAGbE,EAAS,OAAO,EAAC,UAAUJ,KAAqBK,EAAc,aAAa,KAAA,GAE3E,OAAO;AAAA,IACLD;AAAA,IACAS,EAAqBR,EAAc,cAAcA,EAAc,SAAS;AAAA,EAAA,GAI1ED,EAAS,YAAYG,EAAc,WAC/BA,EAAc,2BAChBH,EAAS,gBAAgB;AAAA,IACvB,QAAQG,EAAc;AAAA,IACtB,WAAWA,EAAc;AAAA,EAAA,IAGtBH;AACT;"}
@@ -5,50 +5,56 @@ import { getUsedAesInMapping as c } from "../getUsedAesInMapping.js";
5
5
  import { getDiscreteLayersSettings as g } from "./getLayersDataFromForms.js";
6
6
  import { getAxesDataFromForms as f } from "./getAxesDataFromForms.js";
7
7
  import "../../../node_modules/@milaboratories/pf-plots/dist/index.js";
8
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
9
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
10
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
11
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
12
+ import "../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
13
+ import "../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
8
14
  import "vue";
9
- function P(r, o, i, l) {
15
+ function O(r, o, i, u) {
10
16
  var s;
11
17
  const d = g(
12
18
  e[o.template],
13
19
  o.layersSettings,
14
20
  o.statisticsSettings,
15
21
  o.optionsState,
16
- l
17
- ), m = c(
22
+ u
23
+ ), l = c(
18
24
  o.chartType,
19
25
  o.template,
20
26
  o.layersSettings,
21
27
  o.statisticsSettings,
22
28
  o.optionsState,
23
- l
29
+ u
24
30
  );
25
31
  r.layers = d;
26
32
  const n = o.optionsState.components;
27
33
  if (n.primaryGrouping.selectorStates.length && r.primaryGrouping) {
28
34
  r.primaryGrouping = { ...r.primaryGrouping }, r.primaryGrouping.order && (r.primaryGrouping.order = [...r.primaryGrouping.order]);
29
- const p = n.primaryGrouping.selectorStates[0].selectedSource, a = m[p];
35
+ const p = n.primaryGrouping.selectorStates[0].selectedSource, m = l[p];
30
36
  Object.assign(
31
37
  r.primaryGrouping,
32
38
  y(
33
39
  i,
34
40
  o.dataBindAes[p],
35
41
  p,
36
- a
42
+ m
37
43
  )
38
- ), r.primaryGrouping.allowNullGroup = o.axesSettings.axisX.allowNullPrimaryGroups, !o.axesSettings.axisX.allowNullPrimaryGroups && r.primaryGrouping.order && (r.primaryGrouping.order = r.primaryGrouping.order.filter((u) => u !== "null"));
44
+ ), r.primaryGrouping.allowNullGroup = o.axesSettings.axisX.allowNullPrimaryGroups, !o.axesSettings.axisX.allowNullPrimaryGroups && r.primaryGrouping.order && (r.primaryGrouping.order = r.primaryGrouping.order.filter((a) => a !== "null"));
39
45
  }
40
46
  if (n.secondaryGrouping.selectorStates && r.secondaryGrouping) {
41
47
  r.secondaryGrouping = { ...r.secondaryGrouping }, r.secondaryGrouping.order && (r.secondaryGrouping.order = [...r.secondaryGrouping.order]);
42
- const p = n.secondaryGrouping.selectorStates[0].selectedSource, a = m[p];
48
+ const p = n.secondaryGrouping.selectorStates[0].selectedSource, m = l[p];
43
49
  Object.assign(
44
50
  r.secondaryGrouping,
45
51
  y(
46
52
  i,
47
53
  o.dataBindAes[p],
48
54
  p,
49
- a
55
+ m
50
56
  )
51
- ), r.secondaryGrouping.allowNullGroup = o.axesSettings.axisX.allowNullSecondaryGroups, !o.axesSettings.axisX.allowNullPrimaryGroups && r.secondaryGrouping.order && (r.secondaryGrouping.order = r.secondaryGrouping.order.filter((u) => u !== "null"));
57
+ ), r.secondaryGrouping.allowNullGroup = o.axesSettings.axisX.allowNullSecondaryGroups, !o.axesSettings.axisX.allowNullPrimaryGroups && r.secondaryGrouping.order && (r.secondaryGrouping.order = r.secondaryGrouping.order.filter((a) => a !== "null"));
52
58
  }
53
59
  const G = r.primaryGrouping ? (s = i[r.primaryGrouping.columnName.value]) == null ? void 0 : s.options : [];
54
60
  return Object.assign(
@@ -57,6 +63,6 @@ function P(r, o, i, l) {
57
63
  ), r;
58
64
  }
59
65
  export {
60
- P as composeDiscreteSettings
66
+ O as composeDiscreteSettings
61
67
  };
62
68
  //# sourceMappingURL=composeDiscreteSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"composeDiscreteSettings.js","sources":["../../../../src/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.ts"],"sourcesContent":["import { DiscreteSettings } from '@milaboratories/miplots4';\nimport { DiscreteUIState, InputGuide, InputState } from '@milaboratories/pf-plots';\nimport { DEFAULT_BLACK, DEFAULT_WHITE } from '../../constantsAesthetic';\nimport { DISCRETE_TEMPLATES_MAP, DiscreteStatisticsState } from '../../constantsCommon';\nimport {\n DEFAULT_DOT_SHAPE,\n DEFAULT_DOT_SIZE,\n DEFAULT_LINE_WIDTH,\n getChartSettingsInheritedAes\n} from '../../dataBindAes';\nimport {\n DiscreteLayersTemplate,\n ReactiveState,\n UniqueValuesBySourceMap\n} from '../../types';\nimport { getUsedAesInMapping } from '../getUsedAesInMapping';\nimport { getAxesDataFromForms, getDiscreteLayersSettings } from '../index';\n\nconst NULL_DISCRETE_AES = {\n fillColor: DEFAULT_WHITE,\n lineColor: DEFAULT_BLACK,\n dotFill: DEFAULT_WHITE,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineWidth: DEFAULT_LINE_WIDTH,\n}\nexport function composeDiscreteSettings(\n settings: DiscreteSettings,\n reactiveState: ReactiveState,\n uniqueValuesData: UniqueValuesBySourceMap,\n inputGuide: InputGuide<InputState>,\n) {\n const layers = getDiscreteLayersSettings(\n DISCRETE_TEMPLATES_MAP[reactiveState.template as DiscreteLayersTemplate],\n reactiveState.layersSettings,\n reactiveState.statisticsSettings as DiscreteStatisticsState,\n reactiveState.optionsState as DiscreteUIState,\n inputGuide\n ) as DiscreteSettings['layers'];\n const usedAesInMappingsMap = getUsedAesInMapping(\n reactiveState.chartType,\n reactiveState.template,\n reactiveState.layersSettings,\n reactiveState.statisticsSettings,\n reactiveState.optionsState,\n inputGuide\n );\n settings.layers = layers;\n\n const inputStateMap = reactiveState.optionsState.components;\n\n if (inputStateMap.primaryGrouping.selectorStates.length && settings.primaryGrouping) {\n settings.primaryGrouping = {...settings.primaryGrouping}\n if (settings.primaryGrouping.order) {\n settings.primaryGrouping.order = [...settings.primaryGrouping.order]\n }\n const columnName = inputStateMap.primaryGrouping.selectorStates[0].selectedSource;\n const usedAesInMapping = usedAesInMappingsMap[columnName];\n Object.assign(\n settings.primaryGrouping,\n getChartSettingsInheritedAes(\n uniqueValuesData,\n reactiveState.dataBindAes[columnName],\n columnName,\n usedAesInMapping\n )\n );\n settings.primaryGrouping.allowNullGroup = reactiveState.axesSettings.axisX.allowNullPrimaryGroups;\n if (!reactiveState.axesSettings.axisX.allowNullPrimaryGroups && settings.primaryGrouping.order) {\n settings.primaryGrouping.order = settings.primaryGrouping.order.filter(v => v !== 'null');\n }\n }\n if (inputStateMap.secondaryGrouping.selectorStates && settings.secondaryGrouping) {\n settings.secondaryGrouping = {...settings.secondaryGrouping}\n if (settings.secondaryGrouping.order) {\n settings.secondaryGrouping.order = [...settings.secondaryGrouping.order]\n }\n const columnName = inputStateMap.secondaryGrouping.selectorStates[0].selectedSource;\n const usedAesInMapping = usedAesInMappingsMap[columnName];\n Object.assign(\n settings.secondaryGrouping,\n getChartSettingsInheritedAes(\n uniqueValuesData,\n reactiveState.dataBindAes[columnName],\n columnName,\n usedAesInMapping\n )\n );\n settings.secondaryGrouping.allowNullGroup = reactiveState.axesSettings.axisX.allowNullSecondaryGroups;\n if (!reactiveState.axesSettings.axisX.allowNullPrimaryGroups && settings.secondaryGrouping.order) {\n settings.secondaryGrouping.order = settings.secondaryGrouping.order.filter(v => v !== 'null');\n }\n }\n\n const primaryGroups = settings.primaryGrouping ? uniqueValuesData[settings.primaryGrouping.columnName.value]?.options : [];\n\n Object.assign(\n settings,\n getAxesDataFromForms(reactiveState.axesSettings, reactiveState.chartType, primaryGroups)\n );\n\n return settings;\n}"],"names":["composeDiscreteSettings","settings","reactiveState","uniqueValuesData","inputGuide","layers","getDiscreteLayersSettings","DISCRETE_TEMPLATES_MAP","usedAesInMappingsMap","getUsedAesInMapping","inputStateMap","columnName","usedAesInMapping","getChartSettingsInheritedAes","v","primaryGroups","_a","getAxesDataFromForms"],"mappings":";;;;;;;;AA0BO,SAASA,EACdC,GACAC,GACAC,GACAC,GACA;;AACA,QAAMC,IAASC;AAAA,IACbC,EAAuBL,EAAc,QAAkC;AAAA,IACvEA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdE;AAAA,EAAA,GAEII,IAAuBC;AAAA,IAC3BP,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdE;AAAA,EAAA;AAEF,EAAAH,EAAS,SAASI;AAElB,QAAMK,IAAgBR,EAAc,aAAa;AAEjD,MAAIQ,EAAc,gBAAgB,eAAe,UAAUT,EAAS,iBAAiB;AACnF,IAAAA,EAAS,kBAAkB,EAAC,GAAGA,EAAS,gBAAA,GACpCA,EAAS,gBAAgB,UAC3BA,EAAS,gBAAgB,QAAQ,CAAC,GAAGA,EAAS,gBAAgB,KAAK;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EAAA,GAGlFd;AACT;"}
1
+ {"version":3,"file":"composeDiscreteSettings.js","sources":["../../../../src/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.ts"],"sourcesContent":["import { DiscreteSettings } from '@milaboratories/miplots4';\nimport { DiscreteUIState, InputGuide, InputState } from '@milaboratories/pf-plots';\nimport { DEFAULT_BLACK, DEFAULT_WHITE } from '../../constantsAesthetic';\nimport { DISCRETE_TEMPLATES_MAP, DiscreteStatisticsState } from '../../constantsCommon';\nimport {\n DEFAULT_DOT_SHAPE,\n DEFAULT_DOT_SIZE,\n DEFAULT_LINE_WIDTH,\n getChartSettingsInheritedAes\n} from '../../dataBindAes';\nimport {\n DiscreteLayersTemplate,\n ReactiveState,\n UniqueValuesBySourceMap\n} from '../../types';\nimport { getUsedAesInMapping } from '../getUsedAesInMapping';\nimport { getAxesDataFromForms, getDiscreteLayersSettings } from '../index';\n\nconst NULL_DISCRETE_AES = {\n fillColor: DEFAULT_WHITE,\n lineColor: DEFAULT_BLACK,\n dotFill: DEFAULT_WHITE,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineWidth: DEFAULT_LINE_WIDTH,\n}\nexport function composeDiscreteSettings(\n settings: DiscreteSettings,\n reactiveState: ReactiveState,\n uniqueValuesData: UniqueValuesBySourceMap,\n inputGuide: InputGuide<InputState>,\n) {\n const layers = getDiscreteLayersSettings(\n DISCRETE_TEMPLATES_MAP[reactiveState.template as DiscreteLayersTemplate],\n reactiveState.layersSettings,\n reactiveState.statisticsSettings as DiscreteStatisticsState,\n reactiveState.optionsState as DiscreteUIState,\n inputGuide\n ) as DiscreteSettings['layers'];\n const usedAesInMappingsMap = getUsedAesInMapping(\n reactiveState.chartType,\n reactiveState.template,\n reactiveState.layersSettings,\n reactiveState.statisticsSettings,\n reactiveState.optionsState,\n inputGuide\n );\n settings.layers = layers;\n\n const inputStateMap = reactiveState.optionsState.components;\n\n if (inputStateMap.primaryGrouping.selectorStates.length && settings.primaryGrouping) {\n settings.primaryGrouping = {...settings.primaryGrouping}\n if (settings.primaryGrouping.order) {\n settings.primaryGrouping.order = [...settings.primaryGrouping.order]\n }\n const columnName = inputStateMap.primaryGrouping.selectorStates[0].selectedSource;\n const usedAesInMapping = usedAesInMappingsMap[columnName];\n Object.assign(\n settings.primaryGrouping,\n getChartSettingsInheritedAes(\n uniqueValuesData,\n reactiveState.dataBindAes[columnName],\n columnName,\n usedAesInMapping\n )\n );\n settings.primaryGrouping.allowNullGroup = reactiveState.axesSettings.axisX.allowNullPrimaryGroups;\n if (!reactiveState.axesSettings.axisX.allowNullPrimaryGroups && settings.primaryGrouping.order) {\n settings.primaryGrouping.order = settings.primaryGrouping.order.filter(v => v !== 'null');\n }\n }\n if (inputStateMap.secondaryGrouping.selectorStates && settings.secondaryGrouping) {\n settings.secondaryGrouping = {...settings.secondaryGrouping}\n if (settings.secondaryGrouping.order) {\n settings.secondaryGrouping.order = [...settings.secondaryGrouping.order]\n }\n const columnName = inputStateMap.secondaryGrouping.selectorStates[0].selectedSource;\n const usedAesInMapping = usedAesInMappingsMap[columnName];\n Object.assign(\n settings.secondaryGrouping,\n getChartSettingsInheritedAes(\n uniqueValuesData,\n reactiveState.dataBindAes[columnName],\n columnName,\n usedAesInMapping\n )\n );\n settings.secondaryGrouping.allowNullGroup = reactiveState.axesSettings.axisX.allowNullSecondaryGroups;\n if (!reactiveState.axesSettings.axisX.allowNullPrimaryGroups && settings.secondaryGrouping.order) {\n settings.secondaryGrouping.order = settings.secondaryGrouping.order.filter(v => v !== 'null');\n }\n }\n\n const primaryGroups = settings.primaryGrouping ? uniqueValuesData[settings.primaryGrouping.columnName.value]?.options : [];\n\n Object.assign(\n settings,\n getAxesDataFromForms(reactiveState.axesSettings, reactiveState.chartType, primaryGroups)\n );\n\n return settings;\n}"],"names":["composeDiscreteSettings","settings","reactiveState","uniqueValuesData","inputGuide","layers","getDiscreteLayersSettings","DISCRETE_TEMPLATES_MAP","usedAesInMappingsMap","getUsedAesInMapping","inputStateMap","columnName","usedAesInMapping","getChartSettingsInheritedAes","v","primaryGroups","_a","getAxesDataFromForms"],"mappings":";;;;;;;;;;;;;;AA0BO,SAASA,EACdC,GACAC,GACAC,GACAC,GACA;;AACA,QAAMC,IAASC;AAAA,IACbC,EAAuBL,EAAc,QAAkC;AAAA,IACvEA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdE;AAAA,EAAA,GAEII,IAAuBC;AAAA,IAC3BP,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdA,EAAc;AAAA,IACdE;AAAA,EAAA;AAEF,EAAAH,EAAS,SAASI;AAElB,QAAMK,IAAgBR,EAAc,aAAa;AAEjD,MAAIQ,EAAc,gBAAgB,eAAe,UAAUT,EAAS,iBAAiB;AACnF,IAAAA,EAAS,kBAAkB,EAAC,GAAGA,EAAS,gBAAA,GACpCA,EAAS,gBAAgB,UAC3BA,EAAS,gBAAgB,QAAQ,CAAC,GAAGA,EAAS,gBAAgB,KAAK;AAErE,UAAMU,IAAaD,EAAc,gBAAgB,eAAe,CAAC,EAAE,gBAC7DE,IAAmBJ,EAAqBG,CAAU;AACxD,WAAO;AAAA,MACLV,EAAS;AAAA,MACTY;AAAA,QACEV;AAAA,QACAD,EAAc,YAAYS,CAAU;AAAA,QACpCA;AAAA,QACAC;AAAA,MAAA;AAAA,IACF,GAEFX,EAAS,gBAAgB,iBAAiBC,EAAc,aAAa,MAAM,wBACvE,CAACA,EAAc,aAAa,MAAM,0BAA0BD,EAAS,gBAAgB,UACvFA,EAAS,gBAAgB,QAAQA,EAAS,gBAAgB,MAAM,OAAO,CAAAa,MAAKA,MAAM,MAAM;AAAA,EAE5F;AACA,MAAIJ,EAAc,kBAAkB,kBAAkBT,EAAS,mBAAmB;AAChF,IAAAA,EAAS,oBAAoB,EAAC,GAAGA,EAAS,kBAAA,GACtCA,EAAS,kBAAkB,UAC7BA,EAAS,kBAAkB,QAAQ,CAAC,GAAGA,EAAS,kBAAkB,KAAK;AAEzE,UAAMU,IAAaD,EAAc,kBAAkB,eAAe,CAAC,EAAE,gBAC/DE,IAAmBJ,EAAqBG,CAAU;AACxD,WAAO;AAAA,MACLV,EAAS;AAAA,MACTY;AAAA,QACEV;AAAA,QACAD,EAAc,YAAYS,CAAU;AAAA,QACpCA;AAAA,QACAC;AAAA,MAAA;AAAA,IACF,GAEFX,EAAS,kBAAkB,iBAAiBC,EAAc,aAAa,MAAM,0BACzE,CAACA,EAAc,aAAa,MAAM,0BAA0BD,EAAS,kBAAkB,UACzFA,EAAS,kBAAkB,QAAQA,EAAS,kBAAkB,MAAM,OAAO,CAAAa,MAAKA,MAAM,MAAM;AAAA,EAEhG;AAEA,QAAMC,IAAgBd,EAAS,mBAAkBe,IAAAb,EAAiBF,EAAS,gBAAgB,WAAW,KAAK,MAA1D,gBAAAe,EAA6D,UAAU,CAAA;AAExH,gBAAO;AAAA,IACLf;AAAA,IACAgB,EAAqBf,EAAc,cAAcA,EAAc,WAAWa,CAAa;AAAA,EAAA,GAGlFd;AACT;"}
@@ -2,12 +2,18 @@ import { PALETTE_MAP as d, DEFAULT_PALETTE as y, DEFAULT_CATEGORICAL_PALETTE as
2
2
  import "vue";
3
3
  import { getAxesDataFromForms as T } from "./getAxesDataFromForms.js";
4
4
  import "../../../node_modules/@milaboratories/pf-plots/dist/index.js";
5
- function B(e, l) {
6
- var n, u;
7
- const r = {}, i = (n = l.dataBindAes[e.valueColumn.value]) == null ? void 0 : n.palette;
5
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js";
6
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js";
7
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/plid.js";
8
+ import "../../../node_modules/@milaboratories/pl-model-common/dist/ref.js";
9
+ import "../../../node_modules/@platforma-sdk/model/dist/render/util/label.js";
10
+ import "../../../node_modules/@milaboratories/pl-error-like/dist/error_like_shape.js";
11
+ function Y(e, o) {
12
+ var p, m;
13
+ const r = {}, i = (p = o.dataBindAes[e.valueColumn.value]) == null ? void 0 : p.palette;
8
14
  if ((e == null ? void 0 : e.valueType) !== "discrete") {
9
- if (l.template === "heatmapClustered") {
10
- const a = l.layersSettings.heatmapClustered;
15
+ if (o.template === "heatmapClustered") {
16
+ const a = o.layersSettings.heatmapClustered;
11
17
  a.disableClusteringX || (e.dendrogramX = {
12
18
  fillNA: 0,
13
19
  showNodes: !1,
@@ -22,25 +28,25 @@ function B(e, l) {
22
28
  r.colorsList = d[i ?? y].colors;
23
29
  } else
24
30
  r.colorsList = d[i ?? "bright"].colors;
25
- e.aes = r, (u = e.annotations) == null || u.forEach((a) => {
26
- var p;
27
- const m = a.valueColumn.value, f = (p = l.dataBindAes[m]) == null ? void 0 : p.palette, s = a.type === "discrete" ? h : A;
31
+ e.aes = r, (m = e.annotations) == null || m.forEach((a) => {
32
+ var n;
33
+ const c = a.valueColumn.value, f = (n = o.dataBindAes[c]) == null ? void 0 : n.palette, s = a.type === "discrete" ? h : A;
28
34
  a.colors = d[f ?? s].colors;
29
35
  }), Object.assign(
30
36
  e,
31
- T(l.axesSettings, l.chartType)
32
- ), l.axesSettings.axisX.cellSize !== null && e.size && (e.size.cellWidth = l.axesSettings.axisX.cellSize), l.axesSettings.axisY.cellSize !== null && e.size && (e.size.cellHeight = l.axesSettings.axisY.cellSize), l.template === "heatmapClustered" && (e == null ? void 0 : e.valueType) !== "discrete" && (e.facetSettings.sharedX = !1, e.facetSettings.sharedY = !1);
33
- const c = l.template, o = l.layersSettings[c];
34
- return e.NAValueAs = o.NAValueAs, e.valueType === "continuous" && o.normalizationDirection && (e.normalization = {
35
- method: o.normalizationMethod,
36
- direction: o.normalizationDirection
37
- }), e.valueType === "continuous" && (o.aggregateByX || o.aggregateByY) && (e.aggregation = {
38
- x: o.aggregateByX && e.xGroupBy && e.xGroupBy.length > 0,
39
- y: o.aggregateByY && e.yGroupBy && e.yGroupBy.length > 0,
40
- method: o.aggregationMethod
41
- }), l.axesSettings.other.canvasRenderMode && (e.cellsRenderingMode = "canvas"), console.log("settings.cellsRenderingMode", e.cellsRenderingMode), e;
37
+ T(o.axesSettings, o.chartType)
38
+ ), o.axesSettings.axisX.cellSize !== null && e.size && (e.size.cellWidth = o.axesSettings.axisX.cellSize), o.axesSettings.axisY.cellSize !== null && e.size && (e.size.cellHeight = o.axesSettings.axisY.cellSize), o.template === "heatmapClustered" && (e == null ? void 0 : e.valueType) !== "discrete" && (e.facetSettings.sharedX = !1, e.facetSettings.sharedY = !1);
39
+ const u = o.template, l = o.layersSettings[u];
40
+ return e.NAValueAs = l.NAValueAs, e.valueType === "continuous" && l.normalizationDirection && (e.normalization = {
41
+ method: l.normalizationMethod,
42
+ direction: l.normalizationDirection
43
+ }), e.valueType === "continuous" && (l.aggregateByX || l.aggregateByY) && (e.aggregation = {
44
+ x: l.aggregateByX && e.xGroupBy && e.xGroupBy.length > 0,
45
+ y: l.aggregateByY && e.yGroupBy && e.yGroupBy.length > 0,
46
+ method: l.aggregationMethod
47
+ }), o.axesSettings.other.canvasRenderMode && (e.cellsRenderingMode = "canvas"), console.log("settings.cellsRenderingMode", e.cellsRenderingMode), e;
42
48
  }
43
49
  export {
44
- B as composeHeatmapSettings
50
+ Y as composeHeatmapSettings
45
51
  };
46
52
  //# sourceMappingURL=composeHeatmapSettings.js.map