@milaboratories/graph-maker 1.1.213 → 1.1.215

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 (32) hide show
  1. package/dist/components/AesSettings/AesDataMappingDiscrete.vue3.js +0 -1
  2. package/dist/components/AesSettings/DiscreteRow.vue3.js +0 -1
  3. package/dist/components/Chart.vue.js +16 -16
  4. package/dist/components/Chart.vue.js.map +1 -1
  5. package/dist/components/ChartErrorNotificationAlert.vue3.js +0 -1
  6. package/dist/components/GraphStatusScreen.vue3.js +0 -1
  7. package/dist/components/LassoControls/index.vue3.js +0 -1
  8. package/dist/components/ReorderForm.vue3.js +0 -1
  9. package/dist/components/SettingsTabs/index.vue.d.ts.map +1 -1
  10. package/dist/components/SettingsTabs/index.vue.js +47 -44
  11. package/dist/components/SettingsTabs/index.vue.js.map +1 -1
  12. package/dist/components/TransitionSlidePanel.vue3.js +1 -2
  13. package/dist/forms/DataMappingForm/Layout/OptionsList.vue3.js +0 -1
  14. package/dist/forms/LayersForm/DotSizeSelector.vue3.js +1 -2
  15. package/dist/forms/LayersForm/Layer/scatterplot/Scatter.vue.js +1 -2
  16. package/dist/forms/LayersForm/Layer/scatterplot-umap/Scatter.vue.js +1 -2
  17. package/dist/forms/index.d.ts +1 -0
  18. package/dist/forms/index.d.ts.map +1 -1
  19. package/dist/forms/index.js +44 -40
  20. package/dist/forms/index.js.map +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/index.vue.d.ts.map +1 -1
  23. package/dist/index.vue.js +123 -128
  24. package/dist/index.vue.js.map +1 -1
  25. package/dist/store.d.ts.map +1 -1
  26. package/dist/store.js +30 -34
  27. package/dist/store.js.map +1 -1
  28. package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +28 -0
  29. package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  30. package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js +70 -61
  31. package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
  32. package/package.json +6 -6
@@ -1,100 +1,109 @@
1
- import { PALETTE_MAP as F, UNKNOWN_COLOR as U, DEFAULT_BLACK as w } from "../../constantsAesthetic.js";
1
+ import { UNKNOWN_COLOR as U, PALETTE_MAP as F, DEFAULT_BLACK as w } from "../../constantsAesthetic.js";
2
2
  import { SCATTERPLOT_TEMPLATES_MAP as P, isMappedAes as G } from "../../constantsCommon.js";
3
- import { getScatterplotAes as K, DEFAULT_LINE_WIDTH as M, DEFAULT_DOT_SIZE as j, DEFAULT_DOT_SHAPE as k } from "../../dataBindAes.js";
3
+ import { DEFAULT_LINE_WIDTH as K, DEFAULT_DOT_SIZE as M, DEFAULT_DOT_SHAPE as j, getScatterplotAes as k } from "../../dataBindAes.js";
4
4
  import { getScatterplotLayersSettings as V } from "./getLayersDataFromForms.js";
5
5
  import { getAxesDataFromFormsScatterplot as W } from "./getAxesDataFromForms.js";
6
6
  import "@milaboratories/pf-plots";
7
- import { readAnnotation as u, Annotation as d } from "@platforma-sdk/model";
7
+ import { readAnnotation as d, Annotation as h } from "@platforma-sdk/model";
8
8
  import "vue";
9
- function B(o, g, e, A, i) {
10
- var E, y, L, x, N;
11
- const c = (E = g.selectorStates[0]) == null ? void 0 : E.selectedSource, a = (y = e.selectorStates[0]) == null ? void 0 : y.selectedSource, p = (L = A.selectorStates[0]) == null ? void 0 : L.selectedSource, t = i.getSourceInfo(a), r = i.getSourceInfo(p);
12
- o.grouping = [...o.grouping ?? []].map((s) => ({ ...s }));
13
- const n = o.xAxis, h = o.yAxis;
14
- if (g.selectorStates.length) {
15
- const s = i.getSourceInfo(c).spec, l = u(s, d.Graph.Thresholds);
16
- l && (JSON.parse(l) ?? []).forEach((D) => {
17
- var b;
18
- const { columnId: f, value: T } = D;
19
- f && t.kind === "column" && t.type === f.valueType && t.name === f.name && ((b = o.xAxis) == null ? void 0 : b.scale) === "discrete" && (n.significantLines || (n.significantLines = []), n.significantLines.push(Number(T))), f && r.kind === "column" && r.type === f.valueType && r.name === f.name && (h.significantLines || (h.significantLines = []), h.significantLines.push(Number(T)));
9
+ function z(o, y, e, A, p) {
10
+ var t, b, E, x, N;
11
+ const l = (t = y.selectorStates[0]) == null ? void 0 : t.selectedSource, L = (b = e.selectorStates[0]) == null ? void 0 : b.selectedSource, m = (E = A.selectorStates[0]) == null ? void 0 : E.selectedSource, r = p.getSourceInfo(L), n = p.getSourceInfo(m);
12
+ o.grouping = [...o.grouping ?? []].map((c) => ({ ...c }));
13
+ const i = o.xAxis, a = o.yAxis;
14
+ if (y.selectorStates.length) {
15
+ const c = p.getSourceInfo(l).spec, s = d(c, h.Graph.Thresholds);
16
+ s && (JSON.parse(s) ?? []).forEach((D) => {
17
+ var g;
18
+ const { columnId: u, value: T } = D;
19
+ u && r.kind === "column" && r.type === u.valueType && r.name === u.name && ((g = o.xAxis) == null ? void 0 : g.scale) === "discrete" && (i.significantLines || (i.significantLines = []), i.significantLines.push(Number(T))), u && n.kind === "column" && n.type === u.valueType && n.name === u.name && (a.significantLines || (a.significantLines = []), a.significantLines.push(Number(T)));
20
20
  });
21
- const m = u(s, d.Graph.Palette);
22
- if (m) {
23
- const O = JSON.parse(m), { mapping: D = {}, name: f = "" } = O;
21
+ const f = d(c, h.Graph.Palette);
22
+ if (f) {
23
+ const O = JSON.parse(f), { mapping: D = {}, name: u = "" } = O;
24
24
  o.layers.forEach((S) => {
25
- S.type === "dots" && (S.aes || (S.aes = {}), S.aes.dotFill = { type: "grouping", value: c });
25
+ S.type === "dots" && (S.aes || (S.aes = {}), S.aes.dotFill = { type: "grouping", value: l });
26
26
  });
27
- const T = [...Object.entries(D), ["null", U]], b = ((x = F[f]) == null ? void 0 : x.colors) ?? [];
27
+ const T = [...Object.entries(D), ["null", U]], g = ((x = F[u]) == null ? void 0 : x.colors) ?? [];
28
28
  (N = o.grouping) == null || N.forEach((S) => {
29
- S.columnName.value === c && (S.inheritedAes = T.reduce((_, [R, C]) => {
30
- const I = b[Number(C)] ?? w;
29
+ S.columnName.value === l && (S.inheritedAes = T.reduce((_, [R, C]) => {
30
+ const I = g[Number(C)] ?? w;
31
31
  return _[R] = {
32
32
  fillColor: I,
33
33
  lineColor: I,
34
34
  dotFill: I,
35
- dotShape: k,
36
- dotSize: j,
37
- lineWidth: M
35
+ dotShape: j,
36
+ dotSize: M,
37
+ lineWidth: K
38
38
  }, _;
39
39
  }, {}));
40
40
  });
41
41
  }
42
42
  }
43
- if (t.annotations) {
44
- const s = u(t, d.Graph.Axis.UpperLimit), l = u(t, d.Graph.Axis.LowerLimit), m = u(t, d.Graph.Axis.SymmetricRange);
45
- s && (n.upperValue = Number(s)), l && (n.lowerValue = Number(l)), m && (n.symmetricRange = Number(m));
46
- }
47
43
  if (r.annotations) {
48
- const s = u(r, d.Graph.Axis.UpperLimit), l = u(r, d.Graph.Axis.LowerLimit), m = u(r, d.Graph.Axis.SymmetricRange);
49
- s && (h.upperValue = Number(s)), l && (h.lowerValue = Number(l)), m && (h.symmetricRange = Number(m));
44
+ const c = d(r, h.Graph.Axis.UpperLimit), s = d(r, h.Graph.Axis.LowerLimit), f = d(r, h.Graph.Axis.SymmetricRange);
45
+ c && (i.upperValue = Number(c)), s && (i.lowerValue = Number(s)), f && (i.symmetricRange = Number(f));
46
+ }
47
+ if (n.annotations) {
48
+ const c = d(n, h.Graph.Axis.UpperLimit), s = d(n, h.Graph.Axis.LowerLimit), f = d(n, h.Graph.Axis.SymmetricRange);
49
+ c && (a.upperValue = Number(c)), s && (a.lowerValue = Number(s)), f && (a.symmetricRange = Number(f));
50
50
  }
51
51
  }
52
- function H(o, g, e, A, i, c) {
53
- (g.selectorStates.length || e != null && e.selectorStates.length) && (o.grouping = [...o.grouping ?? []].map((a) => ({ ...a })), o.grouping.forEach((a) => {
54
- const p = a.columnName.value, t = K(p, A, i, c);
55
- t.order.length ? (a.order = t.order, a.inheritedAes = t.inheritedAes) : o.layers.forEach((r) => {
56
- const n = r.aes;
57
- if (!n)
58
- return;
59
- Object.keys(n).forEach((E) => {
60
- var L, x;
61
- const y = n[E];
62
- if (G(y) && y.value === p) {
63
- const N = ((x = F[((L = i[p]) == null ? void 0 : L.palette) ?? c]) == null ? void 0 : x.colors) ?? [];
64
- y.palette = N;
65
- }
52
+ function B(o, y, e, A, p, l) {
53
+ if (y.selectorStates.length || e != null && e.selectorStates.length) {
54
+ let L = function(m) {
55
+ m && m.forEach((r) => {
56
+ const n = r.columnName.value, i = k(n, A, p, l);
57
+ i.order.length ? (r.order = i.order, r.inheritedAes = i.inheritedAes) : o.layers.forEach((a) => {
58
+ const t = a.aes;
59
+ if (!t)
60
+ return;
61
+ Object.keys(t).forEach((E) => {
62
+ var N, c;
63
+ const x = t[E];
64
+ if (G(x) && x.value === n) {
65
+ const s = ((c = F[((N = p[n]) == null ? void 0 : N.palette) ?? l]) == null ? void 0 : c.colors) ?? [];
66
+ x.palette = s;
67
+ }
68
+ });
69
+ });
66
70
  });
67
- });
68
- }));
71
+ };
72
+ o.grouping = [...o.grouping ?? []].map((m) => ({ ...m })), L(o.grouping), o.type === "scatterplot" && o.dotShape && L(o.dotShape);
73
+ }
69
74
  }
70
- function v(o, g, e, A, i, c) {
71
- var t, r;
75
+ function v(o, y, e, A, p, l) {
76
+ var r, n, i, a;
72
77
  o.layers = V(
73
78
  P[e.template],
74
79
  e.layersSettings,
75
- g,
80
+ y,
76
81
  e.optionsState,
77
82
  e.dataBindAes,
78
83
  A,
79
- (t = o == null ? void 0 : o.grouping) == null ? void 0 : t.map((n) => n.columnName),
84
+ [
85
+ ...((r = o == null ? void 0 : o.grouping) == null ? void 0 : r.map((t) => t.columnName)) ?? [],
86
+ ...((n = o == null ? void 0 : o.dotSize) == null ? void 0 : n.map((t) => t.columnName)) ?? [],
87
+ ...((i = o == null ? void 0 : o.dotShape) == null ? void 0 : i.map((t) => t.columnName)) ?? []
88
+ ],
80
89
  void 0,
81
- c.continuous
82
- ), H(
90
+ l.continuous
91
+ ), B(
83
92
  o,
84
93
  e.optionsState.components.grouping,
85
94
  e.optionsState.components.shape,
86
- i,
95
+ p,
87
96
  e.dataBindAes,
88
- c.categorical
97
+ l.categorical
89
98
  );
90
- const a = e.statisticsSettings, p = o.layers.find((n) => n.type === "dots");
91
- return a.trend.on && p && (o.trend = {
92
- color: (r = p.aes) == null ? void 0 : r.dotFill,
99
+ const L = e.statisticsSettings, m = o.layers.find((t) => t.type === "dots");
100
+ return L.trend.on && m && (o.trend = {
101
+ color: (a = m.aes) == null ? void 0 : a.dotFill,
93
102
  bounded: !1
94
103
  }), Object.assign(
95
104
  o,
96
- W(e.axesSettings, i, e.optionsState, A)
97
- ), B(
105
+ W(e.axesSettings, p, e.optionsState, A)
106
+ ), z(
98
107
  o,
99
108
  e.optionsState.components.grouping,
100
109
  e.optionsState.components.x,
@@ -103,8 +112,8 @@ function v(o, g, e, A, i, c) {
103
112
  ), o;
104
113
  }
105
114
  export {
106
- B as applyChartInfoFromAnnotations,
107
- H as applyInheritedAes,
115
+ z as applyChartInfoFromAnnotations,
116
+ B as applyInheritedAes,
108
117
  v as composeScatterplotSettings
109
118
  };
110
119
  //# sourceMappingURL=composeScatterplotSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"composeScatterplotSettings.js","sources":["../../../src/utils/createChartSettingsForRender/composeScatterplotSettings.ts"],"sourcesContent":["import type { ScatterplotSettings, ScatterplotUmapSettings } from '@milaboratories/miplots4';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n InputGuide,\n InputState,\n PlotDataAndSettings,\n ScatterplotUIState,\n} from '@milaboratories/pf-plots';\nimport {\n DEFAULT_BLACK,\n PALETTE_MAP,\n UNKNOWN_COLOR,\n} from '../../constantsAesthetic';\nimport type {\n MappingLink,\n ScatterplotStatisticsState } from '../../constantsCommon';\nimport {\n isMappedAes,\n SCATTERPLOT_TEMPLATES_MAP,\n} from '../../constantsCommon';\nimport type {\n AestheticMappingState } from '../../dataBindAes';\nimport {\n DEFAULT_DOT_SHAPE,\n DEFAULT_DOT_SIZE,\n DEFAULT_LINE_WIDTH,\n getScatterplotAes,\n} from '../../dataBindAes';\nimport type {\n DefaultPalettes,\n ReactiveState,\n ScatterplotLayersTemplate,\n UniqueValuesBySourceMap,\n} from '../../types';\nimport { getAxesDataFromFormsScatterplot, getScatterplotLayersSettings } from '../index';\nimport type { AxisSettingsContinuous } from '@milaboratories/miplots4';\nimport { Annotation, readAnnotation } from '@platforma-sdk/model';\nimport type { Palette } from '../../components/AesSettings/types';\n\nexport function applyChartInfoFromAnnotations(\n settings: ScatterplotSettings | ScatterplotUmapSettings,\n grouping: ComponentStateSimple | ComponentStateFilter,\n x: ComponentStateSimple | ComponentStateFilter,\n y: ComponentStateSimple | ComponentStateFilter,\n inputGuide: InputGuide<InputState>,\n) {\n const groupingSource = grouping.selectorStates[0]?.selectedSource;\n const xSource = x.selectorStates[0]?.selectedSource;\n const ySource = y.selectorStates[0]?.selectedSource;\n const xInfo = inputGuide.getSourceInfo(xSource);\n const yInfo = inputGuide.getSourceInfo(ySource);\n\n settings.grouping = [...(settings.grouping ?? [])].map((v) => ({ ...v }));\n\n const xAxis = settings.xAxis as AxisSettingsContinuous;\n const yAxis = settings.yAxis as AxisSettingsContinuous;\n if (grouping.selectorStates.length) {\n const spec = inputGuide.getSourceInfo(groupingSource).spec;\n const thresholds = readAnnotation(spec, Annotation.Graph.Thresholds);\n if (thresholds) {\n const thresholdsData = JSON.parse(thresholds) ?? [];\n\n thresholdsData.forEach((thresholdData: { columnId: Record<string, string>; value: number }) => {\n const { columnId, value } = thresholdData;\n if (columnId && (xInfo.kind === 'column' && xInfo.type === columnId.valueType && xInfo.name === columnId.name && settings.xAxis?.scale === 'discrete')) {\n if (!xAxis.significantLines) {\n xAxis.significantLines = [];\n }\n xAxis.significantLines.push(Number(value));\n }\n\n if (columnId && (yInfo.kind === 'column' && yInfo.type === columnId.valueType && yInfo.name === columnId.name)) {\n if (!yAxis.significantLines) {\n yAxis.significantLines = [];\n }\n yAxis.significantLines.push(Number(value));\n }\n });\n }\n\n const palette = readAnnotation(spec, Annotation.Graph.Palette);\n if (palette) {\n const paletteData = JSON.parse(palette);\n const { mapping = {}, name = '' } = paletteData;\n settings.layers.forEach((layer) => {\n if (layer.type === 'dots') {\n if (!layer.aes) {\n layer.aes = {};\n }\n layer.aes.dotFill = { type: 'grouping', value: groupingSource };\n }\n });\n const paletteEntries = [...Object.entries(mapping), ['null', UNKNOWN_COLOR]];\n const paletteColors = PALETTE_MAP[name as keyof typeof PALETTE_MAP]?.colors ?? [];\n\n settings.grouping?.forEach((groupingElement) => {\n if (groupingElement.columnName.value === groupingSource) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupingElement.inheritedAes = paletteEntries.reduce((res: Record<string, any>, [key, value]) => { // TODO: remove any\n const color = paletteColors[Number(value)] ?? DEFAULT_BLACK;\n res[key] = {\n fillColor: color,\n lineColor: color,\n dotFill: color,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineWidth: DEFAULT_LINE_WIDTH,\n };\n return res;\n }, {});\n }\n });\n }\n }\n if (xInfo.annotations) {\n const upperLimit = readAnnotation(xInfo, Annotation.Graph.Axis.UpperLimit);\n const lowerLimit = readAnnotation(xInfo, Annotation.Graph.Axis.LowerLimit);\n const symmetricRange = readAnnotation(xInfo, Annotation.Graph.Axis.SymmetricRange);\n if (upperLimit) {\n xAxis!.upperValue = Number(upperLimit);\n }\n if (lowerLimit) {\n xAxis!.lowerValue = Number(lowerLimit);\n }\n if (symmetricRange) {\n xAxis!.symmetricRange = Number(symmetricRange);\n }\n }\n\n if (yInfo.annotations) {\n const upperLimit = readAnnotation(yInfo, Annotation.Graph.Axis.UpperLimit);\n const lowerLimit = readAnnotation(yInfo, Annotation.Graph.Axis.LowerLimit);\n const symmetricRange = readAnnotation(yInfo, Annotation.Graph.Axis.SymmetricRange);\n if (upperLimit) {\n yAxis!.upperValue = Number(upperLimit);\n }\n if (lowerLimit) {\n yAxis!.lowerValue = Number(lowerLimit);\n }\n if (symmetricRange) {\n yAxis!.symmetricRange = Number(symmetricRange);\n }\n }\n}\n\nexport function applyInheritedAes(\n settings: ScatterplotSettings | ScatterplotUmapSettings,\n grouping: ComponentStateSimple | ComponentStateFilter,\n shape: ComponentStateSimple | ComponentStateFilter | undefined,\n uniqueValuesData: UniqueValuesBySourceMap,\n dataBindAes: AestheticMappingState,\n defaultPalette: Palette,\n) {\n if (grouping.selectorStates.length || shape?.selectorStates.length) {\n settings.grouping = [...(settings.grouping ?? [])].map((v) => ({ ...v }));\n settings.grouping.forEach((el) => {\n const selectedSource = el.columnName.value;\n const savedData = getScatterplotAes(selectedSource, uniqueValuesData, dataBindAes, defaultPalette); // get saved or default color or shape mapping\n // if mapping exists but doesn't have saved order and value-color pairs - add just colors list to chart settings, chart will use it\n if (!savedData.order.length) {\n settings.layers.forEach((layer) => {\n const layerAes = layer.aes;\n if (!layerAes) {\n return;\n }\n const aesKeys = Object.keys(layerAes);\n aesKeys.forEach((aesKey) => {\n const value = layerAes[aesKey as keyof typeof layerAes] as unknown;\n if (isMappedAes(value) && value.value === selectedSource) {\n const colors = PALETTE_MAP[dataBindAes[selectedSource]?.palette ?? defaultPalette]?.colors ?? [];\n (value as MappingLink & { palette: string[] }).palette = colors;\n }\n });\n });\n } else {\n el.order = savedData.order;\n el.inheritedAes = savedData.inheritedAes;\n }\n });\n }\n}\nexport function composeScatterplotSettings(\n settings: ScatterplotSettings,\n dataByColumns: PlotDataAndSettings['data']['byColumns'],\n reactiveState: ReactiveState,\n inputGuide: InputGuide<InputState>,\n uniqueValuesData: UniqueValuesBySourceMap,\n defaultPalette: DefaultPalettes,\n) {\n settings.layers = getScatterplotLayersSettings(\n SCATTERPLOT_TEMPLATES_MAP[reactiveState.template as ScatterplotLayersTemplate],\n reactiveState.layersSettings,\n dataByColumns,\n reactiveState.optionsState as ScatterplotUIState,\n reactiveState.dataBindAes,\n inputGuide,\n settings?.grouping?.map((v) => v.columnName),\n undefined,\n defaultPalette.continuous,\n );\n\n applyInheritedAes(\n settings,\n reactiveState.optionsState.components.grouping,\n reactiveState.optionsState.components.shape,\n uniqueValuesData,\n reactiveState.dataBindAes,\n defaultPalette.categorical,\n );\n\n const statisticsSettings = reactiveState.statisticsSettings as ScatterplotStatisticsState;\n const dotsLayer = settings.layers.find((layer) => layer.type === 'dots');\n if (statisticsSettings.trend.on && dotsLayer) {\n settings.trend = {\n color: dotsLayer.aes?.dotFill,\n bounded: false,\n };\n }\n\n Object.assign(\n settings,\n getAxesDataFromFormsScatterplot(reactiveState.axesSettings, uniqueValuesData, reactiveState.optionsState, inputGuide),\n );\n\n applyChartInfoFromAnnotations(\n settings,\n reactiveState.optionsState.components.grouping,\n reactiveState.optionsState.components.x,\n reactiveState.optionsState.components.y,\n inputGuide,\n );\n\n return settings;\n}\n"],"names":["applyChartInfoFromAnnotations","settings","grouping","x","y","inputGuide","groupingSource","_a","xSource","_b","ySource","_c","xInfo","yInfo","v","xAxis","yAxis","spec","thresholds","readAnnotation","Annotation","thresholdData","columnId","value","palette","paletteData","mapping","name","layer","paletteEntries","UNKNOWN_COLOR","paletteColors","_d","PALETTE_MAP","_e","groupingElement","res","key","color","DEFAULT_BLACK","DEFAULT_DOT_SHAPE","DEFAULT_DOT_SIZE","DEFAULT_LINE_WIDTH","upperLimit","lowerLimit","symmetricRange","applyInheritedAes","shape","uniqueValuesData","dataBindAes","defaultPalette","el","selectedSource","savedData","getScatterplotAes","layerAes","aesKey","isMappedAes","colors","composeScatterplotSettings","dataByColumns","reactiveState","getScatterplotLayersSettings","SCATTERPLOT_TEMPLATES_MAP","statisticsSettings","dotsLayer","getAxesDataFromFormsScatterplot"],"mappings":";;;;;;;;AAwCO,SAASA,EACdC,GACAC,GACAC,GACAC,GACAC,GACA;;AACA,QAAMC,KAAiBC,IAAAL,EAAS,eAAe,CAAC,MAAzB,gBAAAK,EAA4B,gBAC7CC,KAAUC,IAAAN,EAAE,eAAe,CAAC,MAAlB,gBAAAM,EAA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;AAAA,IACAC,EAAc;AAAA,IACdA,EAAc;AAAA,IACdxD;AAAA,KACAE,IAAAN,KAAA,gBAAAA,EAAU,aAAV,gBAAAM,EAAoB,IAAI,CAACO,MAAMA,EAAE;AAAA,IACjC;AAAA,IACAoC,EAAe;AAAA,EAAA,GAGjBJ;AAAA,IACE7C;AAAA,IACA4D,EAAc,aAAa,WAAW;AAAA,IACtCA,EAAc,aAAa,WAAW;AAAA,IACtCb;AAAA,IACAa,EAAc;AAAA,IACdX,EAAe;AAAA,EAAA;AAGjB,QAAMc,IAAqBH,EAAc,oBACnCI,IAAYhE,EAAS,OAAO,KAAK,CAAC2B,MAAUA,EAAM,SAAS,MAAM;AACvE,SAAIoC,EAAmB,MAAM,MAAMC,MACjChE,EAAS,QAAQ;AAAA,IACf,QAAOQ,IAAAwD,EAAU,QAAV,gBAAAxD,EAAe;AAAA,IACtB,SAAS;AAAA,EAAA,IAIb,OAAO;AAAA,IACLR;AAAA,IACAiE,EAAgCL,EAAc,cAAcb,GAAkBa,EAAc,cAAcxD,CAAU;AAAA,EAAA,GAGtHL;AAAA,IACEC;AAAA,IACA4D,EAAc,aAAa,WAAW;AAAA,IACtCA,EAAc,aAAa,WAAW;AAAA,IACtCA,EAAc,aAAa,WAAW;AAAA,IACtCxD;AAAA,EAAA,GAGKJ;AACT;"}
1
+ {"version":3,"file":"composeScatterplotSettings.js","sources":["../../../src/utils/createChartSettingsForRender/composeScatterplotSettings.ts"],"sourcesContent":["import type { ScatterplotSettings, ScatterplotUmapSettings } from '@milaboratories/miplots4';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n InputGuide,\n InputState,\n PlotDataAndSettings,\n ScatterplotUIState,\n} from '@milaboratories/pf-plots';\nimport {\n DEFAULT_BLACK,\n PALETTE_MAP,\n UNKNOWN_COLOR,\n} from '../../constantsAesthetic';\nimport type {\n MappingLink,\n ScatterplotStatisticsState } from '../../constantsCommon';\nimport {\n isMappedAes,\n SCATTERPLOT_TEMPLATES_MAP,\n} from '../../constantsCommon';\nimport type {\n AestheticMappingState } from '../../dataBindAes';\nimport {\n DEFAULT_DOT_SHAPE,\n DEFAULT_DOT_SIZE,\n DEFAULT_LINE_WIDTH,\n getScatterplotAes,\n} from '../../dataBindAes';\nimport type {\n DefaultPalettes,\n ReactiveState,\n ScatterplotLayersTemplate,\n UniqueValuesBySourceMap,\n} from '../../types';\nimport { getAxesDataFromFormsScatterplot, getScatterplotLayersSettings } from '../index';\nimport type { AxisSettingsContinuous } from '@milaboratories/miplots4';\nimport { Annotation, readAnnotation } from '@platforma-sdk/model';\nimport type { Palette } from '../../components/AesSettings/types';\n\nexport function applyChartInfoFromAnnotations(\n settings: ScatterplotSettings | ScatterplotUmapSettings,\n grouping: ComponentStateSimple | ComponentStateFilter,\n x: ComponentStateSimple | ComponentStateFilter,\n y: ComponentStateSimple | ComponentStateFilter,\n inputGuide: InputGuide<InputState>,\n) {\n const groupingSource = grouping.selectorStates[0]?.selectedSource;\n const xSource = x.selectorStates[0]?.selectedSource;\n const ySource = y.selectorStates[0]?.selectedSource;\n const xInfo = inputGuide.getSourceInfo(xSource);\n const yInfo = inputGuide.getSourceInfo(ySource);\n\n settings.grouping = [...(settings.grouping ?? [])].map((v) => ({ ...v }));\n\n const xAxis = settings.xAxis as AxisSettingsContinuous;\n const yAxis = settings.yAxis as AxisSettingsContinuous;\n if (grouping.selectorStates.length) {\n const spec = inputGuide.getSourceInfo(groupingSource).spec;\n const thresholds = readAnnotation(spec, Annotation.Graph.Thresholds);\n if (thresholds) {\n const thresholdsData = JSON.parse(thresholds) ?? [];\n\n thresholdsData.forEach((thresholdData: { columnId: Record<string, string>; value: number }) => {\n const { columnId, value } = thresholdData;\n if (columnId && (xInfo.kind === 'column' && xInfo.type === columnId.valueType && xInfo.name === columnId.name && settings.xAxis?.scale === 'discrete')) {\n if (!xAxis.significantLines) {\n xAxis.significantLines = [];\n }\n xAxis.significantLines.push(Number(value));\n }\n\n if (columnId && (yInfo.kind === 'column' && yInfo.type === columnId.valueType && yInfo.name === columnId.name)) {\n if (!yAxis.significantLines) {\n yAxis.significantLines = [];\n }\n yAxis.significantLines.push(Number(value));\n }\n });\n }\n\n const palette = readAnnotation(spec, Annotation.Graph.Palette);\n if (palette) {\n const paletteData = JSON.parse(palette);\n const { mapping = {}, name = '' } = paletteData;\n settings.layers.forEach((layer) => {\n if (layer.type === 'dots') {\n if (!layer.aes) {\n layer.aes = {};\n }\n layer.aes.dotFill = { type: 'grouping', value: groupingSource };\n }\n });\n const paletteEntries = [...Object.entries(mapping), ['null', UNKNOWN_COLOR]];\n const paletteColors = PALETTE_MAP[name as keyof typeof PALETTE_MAP]?.colors ?? [];\n\n settings.grouping?.forEach((groupingElement) => {\n if (groupingElement.columnName.value === groupingSource) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupingElement.inheritedAes = paletteEntries.reduce((res: Record<string, any>, [key, value]) => { // TODO: remove any\n const color = paletteColors[Number(value)] ?? DEFAULT_BLACK;\n res[key] = {\n fillColor: color,\n lineColor: color,\n dotFill: color,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineWidth: DEFAULT_LINE_WIDTH,\n };\n return res;\n }, {});\n }\n });\n }\n }\n if (xInfo.annotations) {\n const upperLimit = readAnnotation(xInfo, Annotation.Graph.Axis.UpperLimit);\n const lowerLimit = readAnnotation(xInfo, Annotation.Graph.Axis.LowerLimit);\n const symmetricRange = readAnnotation(xInfo, Annotation.Graph.Axis.SymmetricRange);\n if (upperLimit) {\n xAxis!.upperValue = Number(upperLimit);\n }\n if (lowerLimit) {\n xAxis!.lowerValue = Number(lowerLimit);\n }\n if (symmetricRange) {\n xAxis!.symmetricRange = Number(symmetricRange);\n }\n }\n\n if (yInfo.annotations) {\n const upperLimit = readAnnotation(yInfo, Annotation.Graph.Axis.UpperLimit);\n const lowerLimit = readAnnotation(yInfo, Annotation.Graph.Axis.LowerLimit);\n const symmetricRange = readAnnotation(yInfo, Annotation.Graph.Axis.SymmetricRange);\n if (upperLimit) {\n yAxis!.upperValue = Number(upperLimit);\n }\n if (lowerLimit) {\n yAxis!.lowerValue = Number(lowerLimit);\n }\n if (symmetricRange) {\n yAxis!.symmetricRange = Number(symmetricRange);\n }\n }\n}\n\nexport function applyInheritedAes(\n settings: ScatterplotSettings | ScatterplotUmapSettings,\n grouping: ComponentStateSimple | ComponentStateFilter,\n shape: ComponentStateSimple | ComponentStateFilter | undefined,\n uniqueValuesData: UniqueValuesBySourceMap,\n dataBindAes: AestheticMappingState,\n defaultPalette: Palette,\n) {\n if (grouping.selectorStates.length || shape?.selectorStates.length) {\n settings.grouping = [...(settings.grouping ?? [])].map((v) => ({ ...v }));\n\n function applyAesMapping(aesMappings: ScatterplotSettings['grouping'] | ScatterplotSettings['dotShape']) {\n if (!aesMappings) {\n return;\n }\n aesMappings.forEach((el) => {\n const selectedSource = el.columnName.value;\n const savedData = getScatterplotAes(selectedSource, uniqueValuesData, dataBindAes, defaultPalette); // get saved or default color or shape mapping\n if (!savedData.order.length) {\n settings.layers.forEach((layer) => {\n const layerAes = layer.aes;\n if (!layerAes) {\n return;\n }\n const aesKeys = Object.keys(layerAes);\n aesKeys.forEach((aesKey) => {\n const value = layerAes[aesKey as keyof typeof layerAes] as unknown;\n if (isMappedAes(value) && value.value === selectedSource) {\n const colors = PALETTE_MAP[dataBindAes[selectedSource]?.palette ?? defaultPalette]?.colors ?? [];\n (value as MappingLink & { palette: string[] }).palette = colors;\n }\n });\n });\n } else {\n el.order = savedData.order;\n el.inheritedAes = savedData.inheritedAes;\n }\n });\n }\n applyAesMapping(settings.grouping);\n if (settings.type === 'scatterplot' && settings.dotShape) {\n applyAesMapping(settings.dotShape);\n }\n }\n}\nexport function composeScatterplotSettings(\n settings: ScatterplotSettings,\n dataByColumns: PlotDataAndSettings['data']['byColumns'],\n reactiveState: ReactiveState,\n inputGuide: InputGuide<InputState>,\n uniqueValuesData: UniqueValuesBySourceMap,\n defaultPalette: DefaultPalettes,\n) {\n settings.layers = getScatterplotLayersSettings(\n SCATTERPLOT_TEMPLATES_MAP[reactiveState.template as ScatterplotLayersTemplate],\n reactiveState.layersSettings,\n dataByColumns,\n reactiveState.optionsState as ScatterplotUIState,\n reactiveState.dataBindAes,\n inputGuide,\n [\n ...(settings?.grouping?.map((v) => v.columnName) ?? []),\n ...(settings?.dotSize?.map((v) => v.columnName) ?? []),\n ...(settings?.dotShape?.map((v) => v.columnName) ?? []),\n ],\n undefined,\n defaultPalette.continuous,\n );\n\n applyInheritedAes(\n settings,\n reactiveState.optionsState.components.grouping,\n reactiveState.optionsState.components.shape,\n uniqueValuesData,\n reactiveState.dataBindAes,\n defaultPalette.categorical,\n );\n\n const statisticsSettings = reactiveState.statisticsSettings as ScatterplotStatisticsState;\n const dotsLayer = settings.layers.find((layer) => layer.type === 'dots');\n if (statisticsSettings.trend.on && dotsLayer) {\n settings.trend = {\n color: dotsLayer.aes?.dotFill,\n bounded: false,\n };\n }\n\n Object.assign(\n settings,\n getAxesDataFromFormsScatterplot(reactiveState.axesSettings, uniqueValuesData, reactiveState.optionsState, inputGuide),\n );\n\n applyChartInfoFromAnnotations(\n settings,\n reactiveState.optionsState.components.grouping,\n reactiveState.optionsState.components.x,\n reactiveState.optionsState.components.y,\n inputGuide,\n );\n\n return settings;\n}\n"],"names":["applyChartInfoFromAnnotations","settings","grouping","x","y","inputGuide","groupingSource","_a","xSource","_b","ySource","_c","xInfo","yInfo","v","xAxis","yAxis","spec","thresholds","readAnnotation","Annotation","thresholdData","columnId","value","palette","paletteData","mapping","name","layer","paletteEntries","UNKNOWN_COLOR","paletteColors","_d","PALETTE_MAP","_e","groupingElement","res","key","color","DEFAULT_BLACK","DEFAULT_DOT_SHAPE","DEFAULT_DOT_SIZE","DEFAULT_LINE_WIDTH","upperLimit","lowerLimit","symmetricRange","applyInheritedAes","shape","uniqueValuesData","dataBindAes","defaultPalette","applyAesMapping","aesMappings","el","selectedSource","savedData","getScatterplotAes","layerAes","aesKey","isMappedAes","colors","composeScatterplotSettings","dataByColumns","reactiveState","getScatterplotLayersSettings","SCATTERPLOT_TEMPLATES_MAP","statisticsSettings","dotsLayer","getAxesDataFromFormsScatterplot"],"mappings":";;;;;;;;AAwCO,SAASA,EACdC,GACAC,GACAC,GACAC,GACAC,GACA;;AACA,QAAMC,KAAiBC,IAAAL,EAAS,eAAe,CAAC,MAAzB,gBAAAK,EAA4B,gBAC7CC,KAAUC,IAAAN,EAAE,eAAe,CAAC,MAAlB,gBAAAM,EAAqB,gBAC/BC,KAAUC,IAAAP,EAAE,eAAe,CAAC,MAAlB,gBAAAO,EAAqB,gBAC/BC,IAAQP,EAAW,cAAcG,CAAO,GACxCK,IAAQR,EAAW,cAAcK,CAAO;AAE9C,EAAAT,EAAS,WAAW,CAAC,GAAIA,EAAS,YAAY,CAAA,CAAG,EAAE,IAAI,CAACa,OAAO,EAAE,GAAGA,IAAI;AAExE,QAAMC,IAAQd,EAAS,OACjBe,IAAQf,EAAS;AACvB,MAAIC,EAAS,eAAe,QAAQ;AAClC,UAAMe,IAAOZ,EAAW,cAAcC,CAAc,EAAE,MAChDY,IAAaC,EAAeF,GAAMG,EAAW,MAAM,UAAU;AACnE,IAAIF,MACqB,KAAK,MAAMA,CAAU,KAAK,CAAA,GAElC,QAAQ,CAACG,MAAuE;;AAC7F,YAAM,EAAE,UAAAC,GAAU,OAAAC,EAAA,IAAUF;AAC5B,MAAIC,KAAaV,EAAM,SAAS,YAAYA,EAAM,SAASU,EAAS,aAAaV,EAAM,SAASU,EAAS,UAAQf,IAAAN,EAAS,UAAT,gBAAAM,EAAgB,WAAU,eACpIQ,EAAM,qBACTA,EAAM,mBAAmB,CAAA,IAE3BA,EAAM,iBAAiB,KAAK,OAAOQ,CAAK,CAAC,IAGvCD,KAAaT,EAAM,SAAS,YAAYA,EAAM,SAASS,EAAS,aAAaT,EAAM,SAASS,EAAS,SAClGN,EAAM,qBACTA,EAAM,mBAAmB,CAAA,IAE3BA,EAAM,iBAAiB,KA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AQ;AAAA,IACf,QAAO+B,IAAAmC,EAAU,QAAV,gBAAAnC,EAAe;AAAA,IACtB,SAAS;AAAA,EAAA,IAIb,OAAO;AAAA,IACL/B;AAAA,IACAmE,EAAgCL,EAAc,cAAcf,GAAkBe,EAAc,cAAc1D,CAAU;AAAA,EAAA,GAGtHL;AAAA,IACEC;AAAA,IACA8D,EAAc,aAAa,WAAW;AAAA,IACtCA,EAAc,aAAa,WAAW;AAAA,IACtCA,EAAc,aAAa,WAAW;AAAA,IACtC1D;AAAA,EAAA,GAGKJ;AACT;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/graph-maker",
3
- "version": "1.1.213",
3
+ "version": "1.1.215",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,13 +36,13 @@
36
36
  "d3-hierarchy": "^3.1.2",
37
37
  "d3-scale": "^4.0.2",
38
38
  "vue": "^3.5.24",
39
- "@milaboratories/miplots4": "1.0.167",
40
- "@milaboratories/pf-plots": "1.1.60"
39
+ "@milaboratories/miplots4": "1.0.168",
40
+ "@milaboratories/pf-plots": "1.1.61"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@milaboratories/build-configs": "^1.0.5",
44
44
  "@milaboratories/ts-configs": "^1.2.0",
45
- "@milaboratories/ts-builder": "^1.2.1",
45
+ "@milaboratories/ts-builder": "^1.2.4",
46
46
  "@milaboratories/eslint-config": "^1.0.5",
47
47
  "@types/node": "^22.19.1",
48
48
  "sass": "^1.94.2",
@@ -52,8 +52,8 @@
52
52
  "vue-tsc": "^3.1.3"
53
53
  },
54
54
  "peerDependencies": {
55
- "@platforma-sdk/model": "^1.51.5",
56
- "@platforma-sdk/ui-vue": "^1.51.5"
55
+ "@platforma-sdk/model": "^1.53.0",
56
+ "@platforma-sdk/ui-vue": "^1.53.0"
57
57
  },
58
58
  "scripts": {
59
59
  "dev": "vite",