@milaboratories/graph-maker 1.1.150 → 1.1.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.js +2 -1
- package/dist/GraphMaker/components/AesSettings/AesDataMappingDiscrete.vue.js.map +1 -1
- package/dist/GraphMaker/components/Chart.vue.js +3 -3
- package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.d.ts +3 -12
- package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.js +42 -85
- package/dist/GraphMaker/components/DragAndDrop/DnDBasketChip.vue.js.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.d.ts +1 -9
- package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.js +44 -89
- package/dist/GraphMaker/components/DragAndDrop/DnDRangeChip.vue.js.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.d.ts +1 -3
- package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.js +68 -86
- package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.js.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.d.ts +7 -11
- package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.js +48 -91
- package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.js.map +1 -1
- package/dist/GraphMaker/components/DragAndDrop/types.d.ts +1 -21
- package/dist/GraphMaker/components/DragAndDrop/types.d.ts.map +1 -1
- package/dist/GraphMaker/components/PlColorSliderThumb.vue.js +18 -18
- package/dist/GraphMaker/components/PlColorSliderThumb.vue.js.map +1 -1
- package/dist/GraphMaker/constantsCommon.d.ts +0 -1
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +95 -95
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/DendroForm.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/DendroForm.vue.js +128 -166
- package/dist/GraphMaker/forms/DataMappingForm/DendroForm.vue.js.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/useBaskets.d.ts.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/useBaskets.js +93 -131
- package/dist/GraphMaker/forms/DataMappingForm/useBaskets.js.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/utils.d.ts +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/utils.d.ts.map +1 -1
- package/dist/GraphMaker/forms/DataMappingForm/utils.js +79 -155
- package/dist/GraphMaker/forms/DataMappingForm/utils.js.map +1 -1
- package/dist/GraphMaker/forms/index.js +2 -2
- package/dist/GraphMaker/forms/index.js.map +1 -1
- package/dist/GraphMaker/icons/StackedAreaIcon.vue.d.ts +3 -0
- package/dist/GraphMaker/icons/StackedAreaIcon.vue.d.ts.map +1 -0
- package/dist/GraphMaker/icons/StackedAreaIcon.vue.js +19 -0
- package/dist/GraphMaker/icons/StackedAreaIcon.vue.js.map +1 -0
- package/dist/GraphMaker/index.vue.js +1 -1
- package/dist/GraphMaker/store.d.ts.map +1 -1
- package/dist/GraphMaker/store.js +43 -45
- package/dist/GraphMaker/store.js.map +1 -1
- package/dist/GraphMaker/types.d.ts +1 -1
- package/dist/GraphMaker/types.d.ts.map +1 -1
- package/dist/GraphMaker/utils/addFixedOptionsToState.js +2 -2
- package/dist/GraphMaker/utils/addFixedOptionsToState.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js +25 -25
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/GraphMaker/utils/loadDefaultSources.d.ts +2 -3
- package/dist/GraphMaker/utils/loadDefaultSources.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadDefaultSources.js +47 -51
- package/dist/GraphMaker/utils/loadDefaultSources.js.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +39 -41
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/node_modules/@milaboratories/helpers/dist/objects.js +33 -0
- package/dist/node_modules/@milaboratories/helpers/dist/objects.js.map +1 -0
- package/dist/node_modules/@milaboratories/helpers/dist/utils.js +12 -0
- package/dist/node_modules/@milaboratories/helpers/dist/utils.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +6 -5
- package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +146 -149
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js +168 -221
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +95 -102
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js +145 -156
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js +68 -75
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +154 -159
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js +48 -55
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +114 -122
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +111 -119
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +4 -4
- package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +70 -69
- package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/spec.js +2 -2
- package/dist/node_modules/@milaboratories/pf-plots/dist/spec.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +184 -183
- package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
- package/dist/node_modules/@vueuse/shared/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/node_modules/@milaboratories/helpers/dist/index.js +0 -372
- package/dist/node_modules/@milaboratories/helpers/dist/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/GraphMaker/store.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,aAAa,EACb,qBAAqB,EAErB,mBAAmB,EA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AAC,CAAC,EACjD,cAAc,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,EAAE,GAClD,KAAK,CA4CP;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;AAE/C,wBAAgB,YAAY,CAC1B,YAAY,EAAE,eAAe,EAC7B,YAAY,EAAE,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,EACvC,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,GAAG,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC,EACzD,eAAe,EAAE,GAAG,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,EACrD,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAC,WAAW,KAAK,OAAO,EACnD,cAAc,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,EAAE,sBAuJpD;AAED,wBAAgB,QAAQ,kBAEvB"}
|
package/dist/GraphMaker/store.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { deepClone as
|
|
2
|
-
import { getControllerByType as A, getInitialStateByType as
|
|
3
|
-
import { ref as p, computed as D, toRaw as w, watch as T, provide as
|
|
4
|
-
import { getInitialAxesSettings as
|
|
5
|
-
import { updateDataBindAes as
|
|
6
|
-
import { notEmpty as
|
|
1
|
+
import { deepClone as H } from "../node_modules/@milaboratories/helpers/dist/objects.js";
|
|
2
|
+
import { getControllerByType as A, getInitialStateByType as j } from "../node_modules/@milaboratories/pf-plots/dist/index.js";
|
|
3
|
+
import { ref as p, computed as D, toRaw as w, watch as T, provide as k, reactive as M, inject as z } from "vue";
|
|
4
|
+
import { getInitialAxesSettings as J, getInitialLayersSettings as O, getInitialStatisticsState as P, getInitialTemplate as V } from "./constantsCommon.js";
|
|
5
|
+
import { updateDataBindAes as W } from "./dataBindAes.js";
|
|
6
|
+
import { notEmpty as q } from "./helpers.js";
|
|
7
7
|
import { storeKey as K } from "./keys.js";
|
|
8
8
|
import "./constantsAesthetic.js";
|
|
9
|
-
import { loadDataForPlot as
|
|
10
|
-
import { calculateDiscreteGroups as
|
|
11
|
-
import { addFixedOptionsToState as
|
|
9
|
+
import { loadDataForPlot as Q } from "./utils/createChartSettingsForRender/composeChartSettings.js";
|
|
10
|
+
import { calculateDiscreteGroups as x } from "./utils/calculateDiscreteGroups.js";
|
|
11
|
+
import { addFixedOptionsToState as X } from "./utils/addFixedOptionsToState.js";
|
|
12
12
|
import { loadDefaultSources as E } from "./utils/loadDefaultSources.js";
|
|
13
13
|
import { copyJSON as G } from "./utils/copyJSON.js";
|
|
14
|
-
import { getUsedAesInMapping as
|
|
15
|
-
import { getUniqueValuesFromReadyChartData as
|
|
16
|
-
function
|
|
17
|
-
const c = G(
|
|
14
|
+
import { getUsedAesInMapping as Y } from "./utils/getUsedAesInMapping.js";
|
|
15
|
+
import { getUniqueValuesFromReadyChartData as Z, loadFilterLabelsForTitle as _ } from "./utils/loadUniqueValuesToSave.js";
|
|
16
|
+
function $(t, e) {
|
|
17
|
+
const c = G(j(t));
|
|
18
18
|
if ((e == null ? void 0 : e.type) !== t)
|
|
19
19
|
return c;
|
|
20
20
|
const d = G(e);
|
|
@@ -27,18 +27,18 @@ function R(t, e) {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function R(t, e) {
|
|
31
31
|
return M({
|
|
32
32
|
chartType: e,
|
|
33
33
|
// from pf-plots
|
|
34
|
-
optionsState:
|
|
34
|
+
optionsState: $(e, t.optionsState),
|
|
35
35
|
// contains user selected inputs
|
|
36
|
-
dataStateKey:
|
|
36
|
+
dataStateKey: H(t.dataStateKey),
|
|
37
37
|
//local form states, updates directly in forms
|
|
38
|
-
template:
|
|
39
|
-
statisticsSettings:
|
|
40
|
-
layersSettings:
|
|
41
|
-
axesSettings:
|
|
38
|
+
template: V(t.template, e),
|
|
39
|
+
statisticsSettings: P(e, t.statisticsSettings),
|
|
40
|
+
layersSettings: O(t.layersSettings),
|
|
41
|
+
axesSettings: J(e, t.axesSettings),
|
|
42
42
|
//common aesthetics data mapped on columns/axes values
|
|
43
43
|
dataBindAes: G(t.dataBindAes ?? {}),
|
|
44
44
|
chartScale: t.zoomState ?? 100,
|
|
@@ -49,7 +49,7 @@ function tt(t, e) {
|
|
|
49
49
|
showTooltipHint: !1
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function tt(t, e, c, d, f, v, m, a) {
|
|
53
53
|
return {
|
|
54
54
|
reactive: t,
|
|
55
55
|
loading: M({
|
|
@@ -62,21 +62,21 @@ function et(t, e, c, d, f, v, m, a) {
|
|
|
62
62
|
}),
|
|
63
63
|
commonHelpersData: {
|
|
64
64
|
primaryGroups: D(
|
|
65
|
-
() =>
|
|
65
|
+
() => x(
|
|
66
66
|
t.optionsState,
|
|
67
67
|
v.value,
|
|
68
68
|
"primaryGrouping"
|
|
69
69
|
)
|
|
70
70
|
),
|
|
71
71
|
secondaryGroups: D(
|
|
72
|
-
() =>
|
|
72
|
+
() => x(
|
|
73
73
|
t.optionsState,
|
|
74
74
|
v.value,
|
|
75
75
|
"secondaryGrouping"
|
|
76
76
|
)
|
|
77
77
|
),
|
|
78
78
|
usedAesInMapping: D(
|
|
79
|
-
() =>
|
|
79
|
+
() => Y(
|
|
80
80
|
t.chartType,
|
|
81
81
|
t.template,
|
|
82
82
|
t.layersSettings,
|
|
@@ -96,8 +96,8 @@ function et(t, e, c, d, f, v, m, a) {
|
|
|
96
96
|
readonlyInputs: a
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
const a =
|
|
99
|
+
function gt(t, e, c, d, f, v, m) {
|
|
100
|
+
const a = R(t, c), g = A(a.chartType), y = p(A(a.chartType).getEmptyInputGuide(a.optionsState)), B = p(null), h = p({}), F = p({}), N = p(null), o = D(() => tt(a, w(e.value), y, B, N, h, F, m));
|
|
101
101
|
T([
|
|
102
102
|
() => e.value,
|
|
103
103
|
() => d.value
|
|
@@ -119,16 +119,14 @@ function St(t, e, c, d, f, v, m) {
|
|
|
119
119
|
inputName: u,
|
|
120
120
|
selectedSource: s,
|
|
121
121
|
filterType: C,
|
|
122
|
-
|
|
123
|
-
selectedFilterRange: U
|
|
124
|
-
fixedAxes: H
|
|
122
|
+
selectedFilterValues: L,
|
|
123
|
+
selectedFilterRange: U
|
|
125
124
|
} of S)
|
|
126
125
|
n[u].selectorStates.push({
|
|
127
126
|
selectedSource: s,
|
|
128
127
|
type: C,
|
|
129
|
-
|
|
130
|
-
selectedFilterRange: U
|
|
131
|
-
fixedAxes: H
|
|
128
|
+
selectedFilterValues: L,
|
|
129
|
+
selectedFilterRange: U
|
|
132
130
|
});
|
|
133
131
|
a.optionsState.components = {
|
|
134
132
|
...a.optionsState.components,
|
|
@@ -156,19 +154,19 @@ function St(t, e, c, d, f, v, m) {
|
|
|
156
154
|
I.value++;
|
|
157
155
|
const i = I.value;
|
|
158
156
|
o.value.loading.chartData = !0;
|
|
159
|
-
const n = w(e.value), r = await
|
|
160
|
-
r && n && (h.value = await
|
|
157
|
+
const n = w(e.value), r = await Q(l, a, n, f.value);
|
|
158
|
+
r && n && (h.value = await Z(
|
|
161
159
|
r,
|
|
162
160
|
l,
|
|
163
161
|
g,
|
|
164
162
|
n,
|
|
165
163
|
h.value
|
|
166
|
-
),
|
|
164
|
+
), W(a.optionsState, a.dataBindAes, h.value)), F.value = n ? await _(
|
|
167
165
|
a.optionsState.components,
|
|
168
166
|
l,
|
|
169
167
|
g,
|
|
170
168
|
n
|
|
171
|
-
) : {}, i === I.value && (
|
|
169
|
+
) : {}, i === I.value && (B.value = r, l.ready && (o.value.loading.initialCharts = !1), o.value.loading.chartData = !1);
|
|
172
170
|
}, { immediate: !0, deep: !0 }), a.chartType === "dendro") {
|
|
173
171
|
const l = p(0);
|
|
174
172
|
T([
|
|
@@ -181,20 +179,20 @@ function St(t, e, c, d, f, v, m) {
|
|
|
181
179
|
l.value++;
|
|
182
180
|
const u = l.value;
|
|
183
181
|
o.value.loading.dendroTableData = !0;
|
|
184
|
-
const s = await
|
|
185
|
-
l.value === u && (
|
|
182
|
+
const s = await X(i, n, S), C = await g.createTableData(n, s);
|
|
183
|
+
l.value === u && (N.value = C), o.value.loading.dendroTableData = !1;
|
|
186
184
|
}
|
|
187
185
|
}, { immediate: !0 });
|
|
188
186
|
}
|
|
189
|
-
return
|
|
187
|
+
return k(K, o), o;
|
|
190
188
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
189
|
+
function St() {
|
|
190
|
+
return q(z(K), "Empty store");
|
|
193
191
|
}
|
|
194
192
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
R as createReactiveState,
|
|
194
|
+
tt as factoryStore,
|
|
195
|
+
gt as provideStore,
|
|
196
|
+
St as useStore
|
|
199
197
|
};
|
|
200
198
|
//# sourceMappingURL=store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sources":["../../src/GraphMaker/store.ts"],"sourcesContent":["import { deepClone } from '@milaboratories/helpers';\nimport {\n ChartType,\n DemoDataStore,\n DendroStateController,\n DendroUIState,\n getControllerByType,\n getInitialStateByType,\n InputGuide,\n InputNamesByChartType,\n InputState,\n PlotDataAndSettings\n} from '@milaboratories/pf-plots';\nimport { PColumnSpec } from '@platforma-sdk/model';\nimport { ListOption } from '@platforma-sdk/ui-vue';\nimport { computed, ComputedRef, inject, provide, reactive, Reactive, Ref, ref, toRaw, watch } from 'vue';\nimport {\n AesType,\n getInitialAxesSettings,\n getInitialLayersSettings,\n getInitialStatisticsState,\n getInitialTemplate\n} from './constantsCommon';\nimport { updateDataBindAes } from './dataBindAes';\nimport { notEmpty } from './helpers';\nimport { storeKey } from './keys';\nimport {\n DendroNodeInfo,\n GraphMakerProps,\n GraphMakerState,\n ReactiveState, UniqueValuesBySourceMap\n} from './types';\nimport { loadDefaultSources } from './utils';\nimport { addFixedOptionsToState } from './utils/addFixedOptionsToState';\nimport { calculateDiscreteGroups } from './utils/calculateDiscreteGroups';\nimport { copyJSON } from './utils/copyJSON';\nimport { loadDataForPlot } from './utils/createChartSettingsForRender/composeChartSettings';\nimport { getUsedAesInMapping } from './utils/getUsedAesInMapping';\nimport {\n getUniqueValuesFromReadyChartData,\n loadFilterLabelsForTitle\n} from './utils/loadUniqueValuesToSave';\n\nfunction getInitialOptionsState(chartType: ChartType, optionsState: InputState | undefined) {\n const defaultState = copyJSON(getInitialStateByType(chartType));\n if (optionsState?.type !== chartType) {\n return defaultState;\n }\n const optionsStateCopy = copyJSON(optionsState);\n\n return {\n ...defaultState,\n ...optionsStateCopy,\n components: {\n ...defaultState.components,\n ...optionsStateCopy.components\n }\n };\n}\n\nexport function createReactiveState(\n initialData: GraphMakerState,\n chartType: ChartType\n): Reactive<ReactiveState> {\n return reactive({\n chartType: chartType,\n // from pf-plots\n optionsState: getInitialOptionsState(chartType, initialData.optionsState), // contains user selected inputs\n\n dataStateKey: deepClone(initialData.dataStateKey),\n //local form states, updates directly in forms\n template: getInitialTemplate(initialData.template, chartType),\n statisticsSettings: getInitialStatisticsState(chartType, initialData.statisticsSettings),\n layersSettings: getInitialLayersSettings(initialData.layersSettings),\n axesSettings: getInitialAxesSettings(chartType, initialData.axesSettings),\n //common aesthetics data mapped on columns/axes values\n dataBindAes: copyJSON(initialData.dataBindAes ?? {}),\n chartScale: initialData.zoomState ?? 100,\n lassoControlsState: null,\n currentTab: null,\n dendroInfoByClick: null as null | DendroNodeInfo,\n dendroSelectedNodeId: null,\n showTooltipHint: false,\n });\n}\n\nexport interface Store {\n reactive: Reactive<ReactiveState>;\n loading: {\n initialInputGuide: boolean;\n initialCharts: boolean;\n initialDefaults: boolean;\n inputGuide: boolean;\n chartData: boolean;\n dendroTableData: boolean;\n };\n commonHelpersData: {\n primaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n secondaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n usedAesInMapping: ComputedRef<Record<string, Record<AesType, boolean>>>;\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>;\n };\n controller: ReturnType<typeof getControllerByType>;\n columnsDataStore: DemoDataStore | null;\n inputGuide: Ref<InputGuide<InputState>>;\n chartData: Ref<PlotDataAndSettings | null>;\n uniqueValuesData: Ref<UniqueValuesBySourceMap>;\n filterLabelsInfo: Ref<Record<string, ListOption>>;\n readonlyInputs?: InputNamesByChartType[ChartType][];\n}\n\nexport function factoryStore(\n reactiveState: Reactive<ReactiveState>,\n dataStore: DemoDataStore | null,\n inputGuide: Ref<InputGuide<InputState>>,\n chartData: Ref<PlotDataAndSettings | null>,\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>,\n uniqueValuesData: Ref<UniqueValuesBySourceMap>,\n filterLabelsInfo: Ref<Record<string, ListOption>>,\n readonlyInputs?: InputNamesByChartType[ChartType][]\n): Store {\n return {\n reactive: reactiveState,\n loading: reactive({\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n dendroTableData: false\n }),\n commonHelpersData: {\n primaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'primaryGrouping'\n )\n ),\n secondaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'secondaryGrouping'\n )\n ),\n usedAesInMapping: computed<Record<string, Record<AesType, boolean>>>(() =>\n getUsedAesInMapping(\n reactiveState.chartType,\n reactiveState.template,\n reactiveState.layersSettings,\n reactiveState.statisticsSettings,\n reactiveState.optionsState,\n inputGuide.value\n )\n ),\n dendroTableData\n },\n controller: getControllerByType(reactiveState.chartType),\n columnsDataStore: dataStore,\n inputGuide,\n chartData,\n uniqueValuesData,\n filterLabelsInfo,\n readonlyInputs\n };\n}\n\nexport type ComputedStore = ComputedRef<Store>;\n\nexport function provideStore(\n initialState: GraphMakerState,\n dataStoreRef: Ref<DemoDataStore | null>,\n chartType: ChartType,\n defaultOptionsRef: Ref<GraphMakerProps['defaultOptions']>,\n fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>,\n dataColumnPredicate?: (spec:PColumnSpec) => boolean,\n readonlyInputs?: InputNamesByChartType[ChartType][]\n) {\n const reactiveState = createReactiveState(initialState, chartType);\n const controller = getControllerByType(reactiveState.chartType);\n\n const inputGuide = ref<InputGuide<InputState>>(getControllerByType(reactiveState.chartType).getEmptyInputGuide(reactiveState.optionsState));\n const chartData = ref<PlotDataAndSettings | null>(null);\n\n const uniqueValuesData = ref<UniqueValuesBySourceMap>({});\n const filterLabelsInfo = ref<Record<string, ListOption>>({}); // for auto titles of chart if something selected in filter/tabby\n\n const dendroTableData = ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>(null);\n\n // toRaw removes Vue proxy from dataStore.pframe (PFrame api)\n const store = computed(() => factoryStore(reactiveState, toRaw(dataStoreRef.value), inputGuide, chartData, dendroTableData, uniqueValuesData, filterLabelsInfo, readonlyInputs));\n\n watch([\n () => dataStoreRef.value,\n () => defaultOptionsRef.value\n ], async ([ds, defaultOptions]) => {\n if (!defaultOptions || !ds || !store.value.loading.initialDefaults) {\n return;\n }\n store.value.loading.initialDefaults = false; // to avoid multiple calculations, default settings cannot change except after reset\n store.value.loading.initialInputGuide = true; // to show loader on initial loading; changing of reactiveState.optionsState always triggers inputGuide recalculating, so it will be off after inputGuide\n\n const defaultStateMap = copyJSON(reactiveState.optionsState.components);\n const defaultOptionsWithoutUserChanges = defaultOptions.filter((opt) => {\n return reactiveState.optionsState.components[opt.inputName]?.selectorStates.length === 0 ||\n readonlyInputs?.includes(opt.inputName);\n })\n if (defaultOptionsWithoutUserChanges.length === 0) {\n return;\n }\n defaultOptionsWithoutUserChanges.forEach((opt) => {\n defaultStateMap[opt.inputName].selectorStates = [];\n });\n const loadedDefaultSources = await loadDefaultSources(ds, defaultOptionsWithoutUserChanges);\n for (const {\n inputName,\n selectedSource,\n filterType,\n selectedFilterValue,\n selectedFilterRange,\n fixedAxes\n } of loadedDefaultSources) {\n defaultStateMap[inputName].selectorStates.push({\n selectedSource,\n type: filterType,\n selectedFilterValue,\n selectedFilterRange,\n fixedAxes\n });\n }\n\n reactiveState.optionsState.components = {\n ...reactiveState.optionsState.components,\n ...defaultStateMap\n };\n }, { immediate: true });\n\n // recalculate input guide - options for every data input, consistency info etc\n const inputGuideCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState,\n () => dataStoreRef.value,\n () => fixedOptionsRef.value\n ], async ([optionsState, ds, fixedOptions]) => {\n inputGuideCounter.value++;\n const counter = inputGuideCounter.value;\n store.value.loading.inputGuide = true;\n const ignoredIds = ds && fixedOptions ? (await loadDefaultSources(ds, fixedOptions, false)).map(item => item.selectedSource) : [];\n\n // const start = Date.now();\n const nextInputGuide = ds ? await controller.calculateOptions(toRaw(ds), optionsState, ignoredIds, dataColumnPredicate) : controller.getEmptyInputGuide(optionsState);\n // console.log('input guide', Date.now() - start);\n\n if (counter === inputGuideCounter.value) { // race condition check\n inputGuide.value = nextInputGuide;\n\n store.value.loading.inputGuide = false;\n if (store.value.loading.initialInputGuide) { // open default/saved tab only after inputGuide loading\n store.value.loading.initialInputGuide = false;\n const initialTab = initialState.currentTab === undefined ? 'dataMapping' : initialState.currentTab;\n store.value.reactive.currentTab = store.value.reactive.currentTab ?? initialTab;\n }\n }\n }, { immediate: true, deep: true });\n\n // recalculate data for chart rendering (miplots4)\n const chartDataCounter = ref(0); // to avoid race condition on async calculations\n watch(() => inputGuide.value, async (ig) => {\n chartDataCounter.value++;\n const counter = chartDataCounter.value;\n store.value.loading.chartData = true;\n\n const ds = toRaw(dataStoreRef.value);\n const start = Date.now();\n const nextChartData = await loadDataForPlot(ig, reactiveState, ds, fixedOptionsRef.value);\n\n if (nextChartData && ds) {\n uniqueValuesData.value = await getUniqueValuesFromReadyChartData(\n nextChartData,\n ig,\n controller,\n ds,\n uniqueValuesData.value\n );\n updateDataBindAes(reactiveState.optionsState, reactiveState.dataBindAes, uniqueValuesData.value);\n }\n filterLabelsInfo.value = ds ? await loadFilterLabelsForTitle(\n reactiveState.optionsState.components,\n ig,\n controller,\n ds,\n ) : {};\n // console.log('chart data', Date.now() - start);\n\n if (counter === chartDataCounter.value) { // race condition check\n chartData.value = nextChartData;\n if (ig.ready) {\n store.value.loading.initialCharts = false;\n }\n store.value.loading.chartData = false;\n }\n }, { immediate: true, deep: true });\n\n // watch data for table, only dendro chart; data is also using for popup by tree node click\n if (reactiveState.chartType === 'dendro') {\n const dendroDataCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState as DendroUIState,\n () => dataStoreRef.value,\n () => inputGuide.value.readyData,\n () => fixedOptionsRef.value\n ], async ([optionsState, dataStore, ready, fixed]) => {\n if (ready && dataStore) {\n dendroDataCounter.value++;\n const counter = dendroDataCounter.value;\n store.value.loading.dendroTableData = true;\n const state = await addFixedOptionsToState(optionsState, dataStore, fixed) as DendroUIState;\n const nextDendroTableData = await (controller as unknown as DendroStateController).createTableData(dataStore, state);\n\n if (dendroDataCounter.value === counter) {\n dendroTableData.value = nextDendroTableData;\n }\n store.value.loading.dendroTableData = false;\n }\n }, { immediate: true });\n }\n\n provide(storeKey, store);\n return store;\n}\n\nexport function useStore() {\n return notEmpty(inject<ComputedStore>(storeKey), 'Empty store');\n}\n"],"names":["getInitialOptionsState","chartType","optionsState","defaultState","copyJSON","getInitialStateByType","optionsStateCopy","createReactiveState","initialData","reactive","deepClone","getInitialTemplate","getInitialStatisticsState","getInitialLayersSettings","getInitialAxesSettings","factoryStore","reactiveState","dataStore","inputGuide","chartData","dendroTableData","uniqueValuesData","filterLabelsInfo","readonlyInputs","computed","calculateDiscreteGroups","getUsedAesInMapping","getControllerByType","provideStore","initialState","dataStoreRef","defaultOptionsRef","fixedOptionsRef","dataColumnPredicate","controller","ref","store","toRaw","watch","ds","defaultOptions","defaultStateMap","defaultOptionsWithoutUserChanges","opt","_a","loadedDefaultSources","loadDefaultSources","inputName","selectedSource","filterType","selectedFilterValue","selectedFilterRange","fixedAxes","inputGuideCounter","fixedOptions","counter","ignoredIds","item","nextInputGuide","initialTab","chartDataCounter","ig","nextChartData","loadDataForPlot","getUniqueValuesFromReadyChartData","updateDataBindAes","loadFilterLabelsForTitle","dendroDataCounter","ready","fixed","state","addFixedOptionsToState","nextDendroTableData","provide","storeKey","useStore","notEmpty","inject"],"mappings":";;;;;;;;;;;;;;;AA2CA,SAASA,EAAuBC,GAAsBC,GAAsC;AAC1F,QAAMC,IAAeC,EAASC,EAAsBJ,CAAS,CAAC;AAC9D,OAAIC,KAAA,gBAAAA,EAAc,UAASD;AACzB,WAAOE;AAET,QAAMG,IAAmBF,EAASF,CAAY;AAE9C,SAAO;AAAA,IACL,GAAGC;AAAA,IACH,GAAGG;AAAA,IACH,YAAY;AAAA,MACV,GAAGH,EAAa;AAAA,MAChB,GAAGG,EAAiB;AAAA,IAAA;AAAA,EACtB;AAEJ;AAEO,SAASC,GACdC,GACAP,GACyB;AACzB,SAAOQ,EAAS;AAAA,IACd,WAAAR;AAAA;AAAA,IAEA,cAAcD,EAAuBC,GAAWO,EAAY,YAAY;AAAA;AAAA,IAExE,cAAcE,EAAUF,EAAY,YAAY;AAAA;AAAA,IAEhD,UAAUG,EAAmBH,EAAY,UAAUP,CAAS;AAAA,IAC5D,oBAAoBW,EAA0BX,GAAWO,EAAY,kBAAkB;AAAA,IACvF,gBAAgBK,EAAyBL,EAAY,cAAc;AAAA,IACnE,cAAcM,EAAuBb,GAAWO,EAAY,YAAY;AAAA;AAAA,IAExE,aAAaJ,EAASI,EAAY,eAAe,CAAA,CAAE;AAAA,IACnD,YAAYA,EAAY,aAAa;AAAA,IACrC,oBAAoB;AAAA,IACpB,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,sBAAsB;AAAA,IACtB,iBAAiB;AAAA,EAAA,CAClB;AACH;AA2BO,SAASO,GACdC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,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boratories/helpers';\nimport {\n ChartType,\n DemoDataStore,\n DendroStateController,\n DendroUIState,\n getControllerByType,\n getInitialStateByType,\n InputGuide,\n InputNamesByChartType,\n InputState,\n PlotDataAndSettings\n} from '@milaboratories/pf-plots';\nimport { PColumnSpec } from '@platforma-sdk/model';\nimport { ListOption } from '@platforma-sdk/ui-vue';\nimport { computed, ComputedRef, inject, provide, reactive, Reactive, Ref, ref, toRaw, watch } from 'vue';\nimport {\n AesType,\n getInitialAxesSettings,\n getInitialLayersSettings,\n getInitialStatisticsState,\n getInitialTemplate\n} from './constantsCommon';\nimport { updateDataBindAes } from './dataBindAes';\nimport { notEmpty } from './helpers';\nimport { storeKey } from './keys';\nimport {\n DendroNodeInfo,\n GraphMakerProps,\n GraphMakerState,\n ReactiveState, UniqueValuesBySourceMap\n} from './types';\nimport { loadDefaultSources } from './utils';\nimport { addFixedOptionsToState } from './utils/addFixedOptionsToState';\nimport { calculateDiscreteGroups } from './utils/calculateDiscreteGroups';\nimport { copyJSON } from './utils/copyJSON';\nimport { loadDataForPlot } from './utils/createChartSettingsForRender/composeChartSettings';\nimport { getUsedAesInMapping } from './utils/getUsedAesInMapping';\nimport {\n getUniqueValuesFromReadyChartData,\n loadFilterLabelsForTitle\n} from './utils/loadUniqueValuesToSave';\n\nfunction getInitialOptionsState(chartType: ChartType, optionsState: InputState | undefined) {\n const defaultState = copyJSON(getInitialStateByType(chartType));\n if (optionsState?.type !== chartType) {\n return defaultState;\n }\n const optionsStateCopy = copyJSON(optionsState);\n\n return {\n ...defaultState,\n ...optionsStateCopy,\n components: {\n ...defaultState.components,\n ...optionsStateCopy.components\n }\n };\n}\n\nexport function createReactiveState(\n initialData: GraphMakerState,\n chartType: ChartType\n): Reactive<ReactiveState> {\n return reactive({\n chartType: chartType,\n // from pf-plots\n optionsState: getInitialOptionsState(chartType, initialData.optionsState), // contains user selected inputs\n\n dataStateKey: deepClone(initialData.dataStateKey),\n //local form states, updates directly in forms\n template: getInitialTemplate(initialData.template, chartType),\n statisticsSettings: getInitialStatisticsState(chartType, initialData.statisticsSettings),\n layersSettings: getInitialLayersSettings(initialData.layersSettings),\n axesSettings: getInitialAxesSettings(chartType, initialData.axesSettings),\n //common aesthetics data mapped on columns/axes values\n dataBindAes: copyJSON(initialData.dataBindAes ?? {}),\n chartScale: initialData.zoomState ?? 100,\n lassoControlsState: null,\n currentTab: null,\n dendroInfoByClick: null as null | DendroNodeInfo,\n dendroSelectedNodeId: null,\n showTooltipHint: false,\n });\n}\n\nexport interface Store {\n reactive: Reactive<ReactiveState>;\n loading: {\n initialInputGuide: boolean;\n initialCharts: boolean;\n initialDefaults: boolean;\n inputGuide: boolean;\n chartData: boolean;\n dendroTableData: boolean;\n };\n commonHelpersData: {\n primaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n secondaryGroups: ComputedRef<ReturnType<typeof calculateDiscreteGroups>>;\n usedAesInMapping: ComputedRef<Record<string, Record<AesType, boolean>>>;\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>;\n };\n controller: ReturnType<typeof getControllerByType>;\n columnsDataStore: DemoDataStore | null;\n inputGuide: Ref<InputGuide<InputState>>;\n chartData: Ref<PlotDataAndSettings | null>;\n uniqueValuesData: Ref<UniqueValuesBySourceMap>;\n filterLabelsInfo: Ref<Record<string, ListOption>>;\n readonlyInputs?: InputNamesByChartType[ChartType][];\n}\n\nexport function factoryStore(\n reactiveState: Reactive<ReactiveState>,\n dataStore: DemoDataStore | null,\n inputGuide: Ref<InputGuide<InputState>>,\n chartData: Ref<PlotDataAndSettings | null>,\n dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>,\n uniqueValuesData: Ref<UniqueValuesBySourceMap>,\n filterLabelsInfo: Ref<Record<string, ListOption>>,\n readonlyInputs?: InputNamesByChartType[ChartType][]\n): Store {\n return {\n reactive: reactiveState,\n loading: reactive({\n initialInputGuide: true,\n initialCharts: true,\n initialDefaults: true,\n inputGuide: false,\n chartData: false,\n dendroTableData: false\n }),\n commonHelpersData: {\n primaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'primaryGrouping'\n )\n ),\n secondaryGroups: computed(() => calculateDiscreteGroups(\n reactiveState.optionsState,\n uniqueValuesData.value,\n 'secondaryGrouping'\n )\n ),\n usedAesInMapping: computed<Record<string, Record<AesType, boolean>>>(() =>\n getUsedAesInMapping(\n reactiveState.chartType,\n reactiveState.template,\n reactiveState.layersSettings,\n reactiveState.statisticsSettings,\n reactiveState.optionsState,\n inputGuide.value\n )\n ),\n dendroTableData\n },\n controller: getControllerByType(reactiveState.chartType),\n columnsDataStore: dataStore,\n inputGuide,\n chartData,\n uniqueValuesData,\n filterLabelsInfo,\n readonlyInputs\n };\n}\n\nexport type ComputedStore = ComputedRef<Store>;\n\nexport function provideStore(\n initialState: GraphMakerState,\n dataStoreRef: Ref<DemoDataStore | null>,\n chartType: ChartType,\n defaultOptionsRef: Ref<GraphMakerProps['defaultOptions']>,\n fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>,\n dataColumnPredicate?: (spec:PColumnSpec) => boolean,\n readonlyInputs?: InputNamesByChartType[ChartType][]\n) {\n const reactiveState = createReactiveState(initialState, chartType);\n const controller = getControllerByType(reactiveState.chartType);\n\n const inputGuide = ref<InputGuide<InputState>>(getControllerByType(reactiveState.chartType).getEmptyInputGuide(reactiveState.optionsState));\n const chartData = ref<PlotDataAndSettings | null>(null);\n\n const uniqueValuesData = ref<UniqueValuesBySourceMap>({});\n const filterLabelsInfo = ref<Record<string, ListOption>>({}); // for auto titles of chart if something selected in filter/tabby\n\n const dendroTableData = ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>(null);\n\n // toRaw removes Vue proxy from dataStore.pframe (PFrame api)\n const store = computed(() => factoryStore(reactiveState, toRaw(dataStoreRef.value), inputGuide, chartData, dendroTableData, uniqueValuesData, filterLabelsInfo, readonlyInputs));\n\n watch([\n () => dataStoreRef.value,\n () => defaultOptionsRef.value\n ], async ([ds, defaultOptions]) => {\n if (!defaultOptions || !ds || !store.value.loading.initialDefaults) {\n return;\n }\n store.value.loading.initialDefaults = false; // to avoid multiple calculations, default settings cannot change except after reset\n store.value.loading.initialInputGuide = true; // to show loader on initial loading; changing of reactiveState.optionsState always triggers inputGuide recalculating, so it will be off after inputGuide\n\n const defaultStateMap = copyJSON(reactiveState.optionsState.components);\n const defaultOptionsWithoutUserChanges = defaultOptions.filter((opt) => {\n return reactiveState.optionsState.components[opt.inputName]?.selectorStates.length === 0 ||\n readonlyInputs?.includes(opt.inputName);\n })\n if (defaultOptionsWithoutUserChanges.length === 0) {\n return;\n }\n defaultOptionsWithoutUserChanges.forEach((opt) => {\n defaultStateMap[opt.inputName].selectorStates = [];\n });\n const loadedDefaultSources = await loadDefaultSources(ds, defaultOptionsWithoutUserChanges);\n for (const {\n inputName,\n selectedSource,\n filterType,\n selectedFilterValues,\n selectedFilterRange\n } of loadedDefaultSources) {\n defaultStateMap[inputName].selectorStates.push({\n selectedSource,\n type: filterType,\n selectedFilterValues,\n selectedFilterRange\n });\n }\n\n reactiveState.optionsState.components = {\n ...reactiveState.optionsState.components,\n ...defaultStateMap\n };\n }, { immediate: true });\n\n // recalculate input guide - options for every data input, consistency info etc\n const inputGuideCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState,\n () => dataStoreRef.value,\n () => fixedOptionsRef.value\n ], async ([optionsState, ds, fixedOptions]) => {\n inputGuideCounter.value++;\n const counter = inputGuideCounter.value;\n store.value.loading.inputGuide = true;\n const ignoredIds = ds && fixedOptions ? (await loadDefaultSources(ds, fixedOptions, false)).map(item => item.selectedSource) : [];\n\n // const start = Date.now();\n const nextInputGuide = ds ? await controller.calculateOptions(toRaw(ds), optionsState, ignoredIds, dataColumnPredicate) : controller.getEmptyInputGuide(optionsState);\n // console.log('input guide', Date.now() - start);\n\n if (counter === inputGuideCounter.value) { // race condition check\n inputGuide.value = nextInputGuide;\n\n store.value.loading.inputGuide = false;\n if (store.value.loading.initialInputGuide) { // open default/saved tab only after inputGuide loading\n store.value.loading.initialInputGuide = false;\n const initialTab = initialState.currentTab === undefined ? 'dataMapping' : initialState.currentTab;\n store.value.reactive.currentTab = store.value.reactive.currentTab ?? initialTab;\n }\n }\n }, { immediate: true, deep: true });\n\n // recalculate data for chart rendering (miplots4)\n const chartDataCounter = ref(0); // to avoid race condition on async calculations\n watch(() => inputGuide.value, async (ig) => {\n chartDataCounter.value++;\n const counter = chartDataCounter.value;\n store.value.loading.chartData = true;\n\n const ds = toRaw(dataStoreRef.value);\n const start = Date.now();\n const nextChartData = await loadDataForPlot(ig, reactiveState, ds, fixedOptionsRef.value);\n\n if (nextChartData && ds) {\n uniqueValuesData.value = await getUniqueValuesFromReadyChartData(\n nextChartData,\n ig,\n controller,\n ds,\n uniqueValuesData.value\n );\n updateDataBindAes(reactiveState.optionsState, reactiveState.dataBindAes, uniqueValuesData.value);\n }\n filterLabelsInfo.value = ds ? await loadFilterLabelsForTitle(\n reactiveState.optionsState.components,\n ig,\n controller,\n ds,\n ) : {};\n // console.log('chart data', Date.now() - start);\n\n if (counter === chartDataCounter.value) { // race condition check\n chartData.value = nextChartData;\n if (ig.ready) {\n store.value.loading.initialCharts = false;\n }\n store.value.loading.chartData = false;\n }\n }, { immediate: true, deep: true });\n\n // watch data for table, only dendro chart; data is also using for popup by tree node click\n if (reactiveState.chartType === 'dendro') {\n const dendroDataCounter = ref(0); // to avoid race condition on async calculations\n watch([\n () => reactiveState.optionsState as DendroUIState,\n () => dataStoreRef.value,\n () => inputGuide.value.readyData,\n () => fixedOptionsRef.value\n ], async ([optionsState, dataStore, ready, fixed]) => {\n if (ready && dataStore) {\n dendroDataCounter.value++;\n const counter = dendroDataCounter.value;\n store.value.loading.dendroTableData = true;\n const state = await addFixedOptionsToState(optionsState, dataStore, fixed) as DendroUIState;\n const nextDendroTableData = await (controller as unknown as DendroStateController).createTableData(dataStore, state);\n\n if (dendroDataCounter.value === counter) {\n dendroTableData.value = nextDendroTableData;\n }\n store.value.loading.dendroTableData = false;\n }\n }, { immediate: true });\n }\n\n provide(storeKey, store);\n return store;\n}\n\nexport function useStore() {\n return notEmpty(inject<ComputedStore>(storeKey), 'Empty store');\n}\n"],"names":["getInitialOptionsState","chartType","optionsState","defaultState","copyJSON","getInitialStateByType","optionsStateCopy","createReactiveState","initialData","reactive","deepClone","getInitialTemplate","getInitialStatisticsState","getInitialLayersSettings","getInitialAxesSettings","factoryStore","reactiveState","dataStore","inputGuide","chartData","dendroTableData","uniqueValuesData","filterLabelsInfo","readonlyInputs","computed","calculateDiscreteGroups","getUsedAesInMapping","getControllerByType","provideStore","initialState","dataStoreRef","defaultOptionsRef","fixedOptionsRef","dataColumnPredicate","controller","ref","store","toRaw","watch","ds","defaultOptions","defaultStateMap","defaultOptionsWithoutUserChanges","opt","_a","loadedDefaultSources","loadDefaultSources","inputName","selectedSource","filterType","selectedFilterValues","selectedFilterRange","inputGuideCounter","fixedOptions","counter","ignoredIds","item","nextInputGuide","initialTab","chartDataCounter","ig","nextChartData","loadDataForPlot","getUniqueValuesFromReadyChartData","updateDataBindAes","loadFilterLabelsForTitle","dendroDataCounter","ready","fixed","state","addFixedOptionsToState","nextDendroTableData","provide","storeKey","useStore","notEmpty","inject"],"mappings":";;;;;;;;;;;;;;;AA2CA,SAASA,EAAuBC,GAAsBC,GAAsC;AAC1F,QAAMC,IAAeC,EAASC,EAAsBJ,CAAS,CAAC;AAC9D,OAAIC,KAAA,gBAAAA,EAAc,UAASD;AACzB,WAAOE;AAET,QAAMG,IAAmBF,EAASF,CAAY;AAE9C,SAAO;AAAA,IACL,GAAGC;AAAA,IACH,GAAGG;AAAA,IACH,YAAY;AAAA,MACV,GAAGH,EAAa;AAAA,MAChB,GAAGG,EAAiB;AAAA,IAAA;AAAA,EACtB;AAEJ;AAEO,SAASC,EACdC,GACAP,GACyB;AACzB,SAAOQ,EAAS;AAAA,IACd,WAAAR;AAAA;AAAA,IAEA,c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AClC,QAAA9B,EAAM,MAAM,QAAQ,kBAAkB;AACtC,cAAMiC,IAAQ,MAAMC,EAAuBpE,GAAce,GAAWmD,CAAK,GACnEG,IAAsB,MAAOrC,EAAgD,gBAAgBjB,GAAWoD,CAAK;AAEnH,QAAIH,EAAkB,UAAUZ,MAC9BlC,EAAgB,QAAQmD,IAE1BnC,EAAM,MAAM,QAAQ,kBAAkB;AAAA,MACxC;AAAA,IACF,GAAG,EAAE,WAAW,IAAM;AAAA,EACxB;AAEA,SAAAoC,EAAQC,GAAUrC,CAAK,GAChBA;AACT;AAEO,SAASsC,KAAW;AACzB,SAAOC,EAASC,EAAsBH,CAAQ,GAAG,aAAa;AAChE;"}
|
|
@@ -41,7 +41,7 @@ export type PredefinedGraphOption<T extends ChartType> = {
|
|
|
41
41
|
}[];
|
|
42
42
|
filterType?: SelectorStateFilter['type'];
|
|
43
43
|
selectedFilterRange?: Partial<NumberRange>;
|
|
44
|
-
|
|
44
|
+
selectedFilterValues?: string[];
|
|
45
45
|
};
|
|
46
46
|
export interface GraphMakerPropsTyped<T extends ChartType> {
|
|
47
47
|
pFrame: PFrameHandle | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/GraphMaker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EACL,SAAS,EACT,cAAc,EAAE,WAAW,EAC3B,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,eAAe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AAG,OAAO,GAAG,QAAQ,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACzD,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,KAAK,CAAC;AACrC,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,CAAA;AACxE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC,CAAA;AAE7E,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -4,8 +4,8 @@ async function d(o, n, e) {
|
|
|
4
4
|
if (!e || e.length === 0)
|
|
5
5
|
return o;
|
|
6
6
|
const c = await p(n, e, !1), t = l(o);
|
|
7
|
-
return c.forEach(({ inputName: r, selectedSource: s,
|
|
8
|
-
o.components[r] && t.components[r].selectorStates.push({ selectedSource: s, type: "equals",
|
|
7
|
+
return c.forEach(({ inputName: r, selectedSource: s, selectedFilterValues: a }) => {
|
|
8
|
+
o.components[r] && t.components[r].selectorStates.push({ selectedSource: s, type: "equals", selectedFilterValues: a });
|
|
9
9
|
}), t;
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addFixedOptionsToState.js","sources":["../../../src/GraphMaker/utils/addFixedOptionsToState.ts"],"sourcesContent":["import { GraphMakerProps } from '../types';\nimport { copyJSON } from './copyJSON';\nimport { DemoDataStore, InputState } from '@milaboratories/pf-plots';\nimport { loadDefaultSources } from './loadDefaultSources';\n\nexport async function addFixedOptionsToState(\n state: InputState,\n dataStore: DemoDataStore,\n fixedOptions: GraphMakerProps['fixedOptions']\n): Promise<InputState> {\n if (!fixedOptions || fixedOptions.length === 0) {\n return state;\n }\n const loadedFixedOptions = await loadDefaultSources(dataStore, fixedOptions, false);\n const res: InputState = copyJSON(state);\n loadedFixedOptions.forEach(({ inputName, selectedSource,
|
|
1
|
+
{"version":3,"file":"addFixedOptionsToState.js","sources":["../../../src/GraphMaker/utils/addFixedOptionsToState.ts"],"sourcesContent":["import { GraphMakerProps } from '../types';\nimport { copyJSON } from './copyJSON';\nimport { DemoDataStore, InputState } from '@milaboratories/pf-plots';\nimport { loadDefaultSources } from './loadDefaultSources';\n\nexport async function addFixedOptionsToState(\n state: InputState,\n dataStore: DemoDataStore,\n fixedOptions: GraphMakerProps['fixedOptions']\n): Promise<InputState> {\n if (!fixedOptions || fixedOptions.length === 0) {\n return state;\n }\n const loadedFixedOptions = await loadDefaultSources(dataStore, fixedOptions, false);\n const res: InputState = copyJSON(state);\n loadedFixedOptions.forEach(({ inputName, selectedSource, selectedFilterValues }) => {\n if (state.components[inputName]) {\n res.components[inputName].selectorStates.push({ selectedSource, type: 'equals', selectedFilterValues });\n }\n });\n return res;\n}"],"names":["addFixedOptionsToState","state","dataStore","fixedOptions","loadedFixedOptions","loadDefaultSources","res","copyJSON","inputName","selectedSource","selectedFilterValues"],"mappings":";;AAKA,eAAsBA,EACpBC,GACAC,GACAC,GACqB;AACrB,MAAI,CAACA,KAAgBA,EAAa,WAAW;AAC3C,WAAOF;AAET,QAAMG,IAAqB,MAAMC,EAAmBH,GAAWC,GAAc,EAAK,GAC5EG,IAAkBC,EAASN,CAAK;AACtC,SAAAG,EAAmB,QAAQ,CAAC,EAAE,WAAAI,GAAW,gBAAAC,GAAgB,sBAAAC,QAA2B;AAClF,IAAIT,EAAM,WAAWO,CAAS,KAC5BF,EAAI,WAAWE,CAAS,EAAE,eAAe,KAAK,EAAE,gBAAAC,GAAgB,MAAM,UAAU,sBAAAC,GAAsB;AAAA,EAE1G,CAAC,GACMJ;AACT;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { getControllerByType as
|
|
2
|
-
import { addFixedOptionsToState as
|
|
3
|
-
import { DEFAULT_HEIGHT_SMALL as T, DEFAULT_HEIGHT as
|
|
4
|
-
import { composeDiscreteSettings as
|
|
5
|
-
import { composeScatterplotSettings as
|
|
6
|
-
import { composeScatterplotUmapSettings as
|
|
7
|
-
import { composeHeatmapSettings as
|
|
8
|
-
import { composeDendroSettings as
|
|
9
|
-
import { composeHistogramSettings as
|
|
10
|
-
import { composeBubbleSettings as
|
|
11
|
-
function
|
|
1
|
+
import { getControllerByType as d } from "../../../node_modules/@milaboratories/pf-plots/dist/index.js";
|
|
2
|
+
import { addFixedOptionsToState as a } from "../addFixedOptionsToState.js";
|
|
3
|
+
import { DEFAULT_HEIGHT_SMALL as T, DEFAULT_HEIGHT as g, DEFAULT_WIDTH_SMALL as y, DEFAULT_WIDTH as w } from "../../constantsCommon.js";
|
|
4
|
+
import { composeDiscreteSettings as b } from "./composeDiscreteSettings.js";
|
|
5
|
+
import { composeScatterplotSettings as C } from "./composeScatterplotSettings.js";
|
|
6
|
+
import { composeScatterplotUmapSettings as H } from "./composeScatterplotUmapSettings.js";
|
|
7
|
+
import { composeHeatmapSettings as D } from "./composeHeatmapSettings.js";
|
|
8
|
+
import { composeDendroSettings as E } from "./composeDendroSettings.js";
|
|
9
|
+
import { composeHistogramSettings as F } from "./composeHistogramSettings.js";
|
|
10
|
+
import { composeBubbleSettings as A } from "./composeBubbleSettings.js";
|
|
11
|
+
function L(s, n = 0) {
|
|
12
12
|
return {
|
|
13
|
-
width: (n > 0 ?
|
|
14
|
-
height: (n > 0 ? T :
|
|
13
|
+
width: (n > 0 ? y : w) * (s / 100),
|
|
14
|
+
height: (n > 0 ? T : g) * (s / 100)
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function _(s, n, r, m) {
|
|
18
18
|
var o, t;
|
|
19
19
|
if (s !== "scatterplot" && s !== "scatterplot-umap" && s !== "discrete" && s !== "heatmap" && s !== "histogram" && s !== "bubble")
|
|
20
20
|
return { name: "", show: !1 };
|
|
@@ -27,20 +27,20 @@ function L(s, n, r, m) {
|
|
|
27
27
|
return [
|
|
28
28
|
...((o = n.components) == null ? void 0 : o.filters.selectorStates) ?? [],
|
|
29
29
|
...((t = n.components) == null ? void 0 : t.tabBy.selectorStates) ?? []
|
|
30
|
-
].forEach(({ type:
|
|
31
|
-
if ((!
|
|
32
|
-
const { value:
|
|
33
|
-
i.push(f ===
|
|
30
|
+
].forEach(({ type: l, selectedSource: e, selectedFilterValues: u }) => {
|
|
31
|
+
if ((!l || l === "equals") && u && r[e]) {
|
|
32
|
+
const { value: c, label: h } = r[e];
|
|
33
|
+
i.push(...u.map((f) => c === f ? h : String(f)));
|
|
34
34
|
}
|
|
35
35
|
}), { name: i.join(", "), show: !0, position: m.title.position };
|
|
36
36
|
}
|
|
37
37
|
return { name: "", show: !1 };
|
|
38
38
|
}
|
|
39
|
-
async function
|
|
39
|
+
async function J(s, n, r, m) {
|
|
40
40
|
if (!s.ready || r === null)
|
|
41
41
|
return null;
|
|
42
42
|
try {
|
|
43
|
-
const o =
|
|
43
|
+
const o = d(n.chartType), t = await a(
|
|
44
44
|
n.optionsState,
|
|
45
45
|
r,
|
|
46
46
|
m
|
|
@@ -53,19 +53,19 @@ async function k(s, n, r, m) {
|
|
|
53
53
|
return console.warn("Cant build chart data"), console.warn(o.message), null;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
var
|
|
56
|
+
function K(s, n, r, m, o) {
|
|
57
|
+
var p;
|
|
58
58
|
if (!n.ready || s === null)
|
|
59
59
|
return null;
|
|
60
60
|
let t = { ...s.settings };
|
|
61
61
|
const i = s.data.byColumns;
|
|
62
|
-
return t.title =
|
|
62
|
+
return t.title = _(o.chartType, o.optionsState, m, o.axesSettings), t.size = L(o.chartScale, ((p = o.optionsState.components) == null ? void 0 : p.facetBy.selectorStates.length) || 0), o.chartType === "discrete" && (t = b(t, o, r, n)), o.chartType === "scatterplot" && (t = C(t, i, o, n, r)), o.chartType === "scatterplot-umap" && (t = H(t, i, o, n, r)), o.chartType === "heatmap" && (t = D(t, o)), o.chartType === "dendro" && (t = E(t, i, o, n, r)), o.chartType === "histogram" && (t = F(t, o, r)), o.chartType === "bubble" && (t = A(t, o)), {
|
|
63
63
|
settings: t,
|
|
64
64
|
data: s.data.byColumns
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
K as composeChartSettings,
|
|
69
|
+
J as loadDataForPlot
|
|
70
70
|
};
|
|
71
71
|
//# sourceMappingURL=composeChartSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composeChartSettings.js","sources":["../../../../src/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.ts"],"sourcesContent":["import {\n ChartType,\n DemoDataStore,\n getControllerByType,\n InputGuide,\n InputState,\n PlotDataAndSettings,\n SelectorStateFilter\n} from '@milaboratories/pf-plots';\nimport {\n GraphMakerProps,\n ReactiveState,\n TitlePosition,\n UniqueValuesBySourceMap\n} from '../../types';\nimport { addFixedOptionsToState } from '../addFixedOptionsToState';\nimport {\n AxesState, DEFAULT_HEIGHT, DEFAULT_HEIGHT_SMALL, DEFAULT_WIDTH, DEFAULT_WIDTH_SMALL,\n} from '../../constantsCommon';\nimport {\n BubbleSettings,\n DataByColumns,\n DendroSettings,\n DiscreteSettings,\n HeatmapSettings,\n HistogramSettings,\n ScatterplotSettings,\n ScatterplotUmapSettings,\n Settings\n} from '@milaboratories/miplots4';\nimport { composeDiscreteSettings } from './composeDiscreteSettings';\nimport { composeScatterplotSettings } from './composeScatterplotSettings';\nimport { composeScatterplotUmapSettings } from './composeScatterplotUmapSettings';\nimport { composeHeatmapSettings } from './composeHeatmapSettings';\nimport { composeDendroSettings } from './composeDendroSettings';\nimport { composeHistogramSettings } from './composeHistogramSettings';\nimport { composeBubbleSettings } from './composeBubbleSettings';\nimport { ListOption } from '@platforma-sdk/ui-vue';\n\nfunction getChartSizes(chartScale: number, facetByLength = 0) {\n return {\n width: (facetByLength > 0 ? DEFAULT_WIDTH_SMALL : DEFAULT_WIDTH) * (chartScale / 100),\n height: (facetByLength > 0 ? DEFAULT_HEIGHT_SMALL : DEFAULT_HEIGHT) * (chartScale / 100)\n };\n}\n\nfunction getChartTitle(\n chartType: ChartType,\n optionsState: InputState,\n filterLabelsInfo: Record<string, ListOption>,\n axesSettings: AxesState\n): {\n name: string,\n show: boolean,\n position?: TitlePosition\n} {\n if (\n chartType !== 'scatterplot' &&\n chartType !== 'scatterplot-umap' &&\n chartType !== 'discrete' &&\n chartType !== 'heatmap' &&\n chartType !== 'histogram' &&\n chartType !== 'bubble'\n ) {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'hidden') {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'custom') {\n return { name: axesSettings.title.value, show: true, position: axesSettings.title.position };\n }\n if (axesSettings.title.mode === 'auto') {\n const selectedFilters: string[] = [];\n const usedInTitleStates = [\n ...(optionsState.components?.filters.selectorStates ?? []),\n ...(optionsState.components?.tabBy.selectorStates ?? [])\n ] as SelectorStateFilter[];\n usedInTitleStates.forEach(({ type, selectedSource,
|
|
1
|
+
{"version":3,"file":"composeChartSettings.js","sources":["../../../../src/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.ts"],"sourcesContent":["import {\n ChartType,\n DemoDataStore,\n getControllerByType,\n InputGuide,\n InputState,\n PlotDataAndSettings,\n SelectorStateFilter\n} from '@milaboratories/pf-plots';\nimport {\n GraphMakerProps,\n ReactiveState,\n TitlePosition,\n UniqueValuesBySourceMap\n} from '../../types';\nimport { addFixedOptionsToState } from '../addFixedOptionsToState';\nimport {\n AxesState, DEFAULT_HEIGHT, DEFAULT_HEIGHT_SMALL, DEFAULT_WIDTH, DEFAULT_WIDTH_SMALL,\n} from '../../constantsCommon';\nimport {\n BubbleSettings,\n DataByColumns,\n DendroSettings,\n DiscreteSettings,\n HeatmapSettings,\n HistogramSettings,\n ScatterplotSettings,\n ScatterplotUmapSettings,\n Settings\n} from '@milaboratories/miplots4';\nimport { composeDiscreteSettings } from './composeDiscreteSettings';\nimport { composeScatterplotSettings } from './composeScatterplotSettings';\nimport { composeScatterplotUmapSettings } from './composeScatterplotUmapSettings';\nimport { composeHeatmapSettings } from './composeHeatmapSettings';\nimport { composeDendroSettings } from './composeDendroSettings';\nimport { composeHistogramSettings } from './composeHistogramSettings';\nimport { composeBubbleSettings } from './composeBubbleSettings';\nimport { ListOption } from '@platforma-sdk/ui-vue';\n\nfunction getChartSizes(chartScale: number, facetByLength = 0) {\n return {\n width: (facetByLength > 0 ? DEFAULT_WIDTH_SMALL : DEFAULT_WIDTH) * (chartScale / 100),\n height: (facetByLength > 0 ? DEFAULT_HEIGHT_SMALL : DEFAULT_HEIGHT) * (chartScale / 100)\n };\n}\n\nfunction getChartTitle(\n chartType: ChartType,\n optionsState: InputState,\n filterLabelsInfo: Record<string, ListOption>,\n axesSettings: AxesState\n): {\n name: string,\n show: boolean,\n position?: TitlePosition\n} {\n if (\n chartType !== 'scatterplot' &&\n chartType !== 'scatterplot-umap' &&\n chartType !== 'discrete' &&\n chartType !== 'heatmap' &&\n chartType !== 'histogram' &&\n chartType !== 'bubble'\n ) {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'hidden') {\n return { name: '', show: false };\n }\n if (axesSettings.title.mode === 'custom') {\n return { name: axesSettings.title.value, show: true, position: axesSettings.title.position };\n }\n if (axesSettings.title.mode === 'auto') {\n const selectedFilters: string[] = [];\n const usedInTitleStates = [\n ...(optionsState.components?.filters.selectorStates ?? []),\n ...(optionsState.components?.tabBy.selectorStates ?? [])\n ] as SelectorStateFilter[];\n usedInTitleStates.forEach(({ type, selectedSource, selectedFilterValues }) => {\n if ((!type || type === 'equals') && selectedFilterValues && filterLabelsInfo[selectedSource]) {\n const {value, label} = filterLabelsInfo[selectedSource] as {value: unknown, label: string};\n selectedFilters.push(...selectedFilterValues.map(selectedFilterValue => value === selectedFilterValue ? label : String(selectedFilterValue)));\n }\n });\n const title = selectedFilters.join(', ');\n return { name: title, show: true, position: axesSettings.title.position };\n }\n return { name: '', show: false };\n}\n\nexport async function loadDataForPlot(\n inputGuide: InputGuide<InputState>,\n reactiveState: ReactiveState,\n dataStore: DemoDataStore | null,\n fixedOptions?: GraphMakerProps['fixedOptions']\n) {\n if (!inputGuide.ready || dataStore === null) {\n return null;\n }\n try {\n const controller = getControllerByType(reactiveState.chartType);\n const optionsStateWithFixed = await addFixedOptionsToState(\n reactiveState.optionsState,\n dataStore,\n fixedOptions\n );\n return controller.createDataForPlot(\n dataStore,\n optionsStateWithFixed\n );\n } catch (err) {\n console.warn('Cant build chart data');\n // @ts-ignore\n console.warn(err.message);\n return null;\n }\n}\nexport function composeChartSettings(\n chartData: PlotDataAndSettings | null,\n inputGuide: InputGuide<InputState>,\n labelsInfo: UniqueValuesBySourceMap,\n filterLabelsInfo: Record<string, ListOption>,\n reactiveState: ReactiveState,\n): null | {settings: Settings, data: DataByColumns} {\n if (!inputGuide.ready || chartData === null) {\n return null;\n }\n\n let settings = {...chartData.settings};\n const dataByColumns = chartData.data.byColumns;\n settings.title = getChartTitle(reactiveState.chartType, reactiveState.optionsState, filterLabelsInfo, reactiveState.axesSettings);\n settings.size = getChartSizes(reactiveState.chartScale, reactiveState.optionsState.components?.facetBy.selectorStates.length || 0);\n if (reactiveState.chartType === 'discrete') {\n settings = composeDiscreteSettings(settings as DiscreteSettings, reactiveState, labelsInfo, inputGuide);\n }\n if (reactiveState.chartType === 'scatterplot') {\n settings = composeScatterplotSettings(settings as ScatterplotSettings, dataByColumns, reactiveState, inputGuide, labelsInfo);\n }\n if (reactiveState.chartType === 'scatterplot-umap') {\n settings = composeScatterplotUmapSettings(settings as ScatterplotUmapSettings, dataByColumns, reactiveState, inputGuide, labelsInfo);\n }\n if (reactiveState.chartType === 'heatmap') {\n settings = composeHeatmapSettings(settings as HeatmapSettings, reactiveState);\n }\n if (reactiveState.chartType === 'dendro') {\n settings = composeDendroSettings(settings as DendroSettings, dataByColumns, reactiveState, inputGuide, labelsInfo);\n }\n if (reactiveState.chartType === 'histogram') {\n settings = composeHistogramSettings(settings as HistogramSettings, reactiveState, labelsInfo);\n }\n if (reactiveState.chartType === 'bubble') {\n settings = composeBubbleSettings(settings as BubbleSettings, reactiveState);\n }\n return {\n settings: settings as Settings,\n data: chartData.data.byColumns\n };\n}\n"],"names":["getChartSizes","chartScale","facetByLength","DEFAULT_WIDTH_SMALL","DEFAULT_WIDTH","DEFAULT_HEIGHT_SMALL","DEFAULT_HEIGHT","getChartTitle","chartType","optionsState","filterLabelsInfo","axesSettings","selectedFilters","_a","_b","type","selectedSource","selectedFilterValues","value","label","selectedFilterValue","loadDataForPlot","inputGuide","reactiveState","dataStore","fixedOptions","controller","getControllerByType","optionsStateWithFixed","addFixedOptionsToState","err","composeChartSettings","chartData","labelsInfo","settings","dataByColumns","composeDiscreteSettings","composeScatterplotSettings","composeScatterplotUmapSettings","composeHeatmapSettings","composeDendroSettings","composeHistogramSettings","composeBubbleSettings"],"mappings":";;;;;;;;;;AAuCA,SAASA,EAAcC,GAAoBC,IAAgB,GAAG;AAC5D,SAAO;AAAA,IACL,QAAQA,IAAgB,IAAIC,IAAsBC,MAAkBH,IAAa;AAAA,IACjF,SAASC,IAAgB,IAAIG,IAAuBC,MAAmBL,IAAa;AAAA,EAAA;AAExF;AAEA,SAASM,EACPC,GACAC,GACAC,GACAC,GAKA;;AACA,MACEH,MAAc,i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Type, DemoDataStore, InputNamesByChartType, SelectorStateFilter } from '@milaboratories/pf-plots';
|
|
2
2
|
import { PredefinedGraphOption } from '../types';
|
|
3
3
|
type LoadedDefaultOptions<T extends ChartType> = {
|
|
4
4
|
inputName: InputNamesByChartType[T];
|
|
5
5
|
selectedSource: string;
|
|
6
|
-
fixedAxes: SelectorStateSimple['fixedAxes'];
|
|
7
6
|
filterType?: SelectorStateFilter['type'];
|
|
8
7
|
selectedFilterRange?: SelectorStateFilter['selectedFilterRange'];
|
|
9
|
-
|
|
8
|
+
selectedFilterValues?: SelectorStateFilter['selectedFilterValues'];
|
|
10
9
|
};
|
|
11
10
|
export declare function loadDefaultSources(dataStore: DemoDataStore, defaultOptions: PredefinedGraphOption<ChartType>[], considerAxisDomains?: boolean): Promise<LoadedDefaultOptions<ChartType>[]>;
|
|
12
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadDefaultSources.d.ts","sourceRoot":"","sources":["../../../src/GraphMaker/utils/loadDefaultSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAET,aAAa,EACb,qBAAqB,EACrB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"loadDefaultSources.d.ts","sourceRoot":"","sources":["../../../src/GraphMaker/utils/loadDefaultSources.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAET,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKjD,KAAK,oBAAoB,CAAC,CAAC,SAAS,SAAS,IAAI;IAC/C,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;IACxC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;IAChE,oBAAoB,CAAC,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,CAAA;CACnE,CAAA;AAiCD,wBAAsB,kBAAkB,CACtC,SAAS,EAAC,aAAa,EACvB,cAAc,EAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,EACjD,mBAAmB,UAAO,GAC1B,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC,CAoF3C"}
|