@milaboratories/graph-maker 1.1.167 → 1.1.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/GraphMaker/constantsCommon.d.ts +5 -0
  2. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  3. package/dist/GraphMaker/constantsCommon.js +13 -8
  4. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  5. package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.d.ts.map +1 -1
  6. package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.js +60 -56
  7. package/dist/GraphMaker/forms/DataMappingForm/BubbleForm.vue.js.map +1 -1
  8. package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.d.ts.map +1 -1
  9. package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.js +86 -58
  10. package/dist/GraphMaker/forms/LayersForm/Layer/Bubble.vue.js.map +1 -1
  11. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -1
  12. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +56 -38
  13. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -1
  14. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.d.ts.map +1 -1
  15. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js +48 -30
  16. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedBar.vue.js.map +1 -1
  17. package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +109 -112
  18. package/dist/GraphMaker/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +20 -0
  20. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
  21. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js +19 -15
  22. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
  23. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +3 -1
  24. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  25. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +8 -8
  26. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  27. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +23 -23
  28. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
  29. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +7 -5
  31. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
  32. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/BubbleSettingsImpl.js +19 -14
  33. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/BubbleSettingsImpl.js.map +1 -1
  34. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +132 -132
  35. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
  36. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +53 -53
  37. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
  38. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
  39. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +7 -7
  40. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -1
  41. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +49 -83
  42. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -1
  43. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +51 -34
  44. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
  45. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
  46. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +8 -8
  47. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +8 -8
  49. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +54 -29
  50. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
  51. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +2 -2
  52. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  53. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  54. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js.map +1 -1
  55. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js.map +1 -1
  56. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
  57. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js +31 -31
  58. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js.map +1 -1
  59. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +20 -20
  60. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  61. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +12 -12
  62. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  63. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js +14 -14
  64. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js.map +1 -1
  65. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js +14 -14
  66. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js.map +1 -1
  67. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/fillCellsData.js +244 -0
  68. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/fillCellsData.js.map +1 -0
  69. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +28 -214
  70. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  71. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js +26 -26
  72. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getDendrograms.js.map +1 -1
  73. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +8 -8
  74. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  75. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +12 -6
  77. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
  78. package/dist/node_modules/@milaboratories/miplots4/dist/types/bubble.js +23 -12
  79. package/dist/node_modules/@milaboratories/miplots4/dist/types/bubble.js.map +1 -1
  80. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +2 -0
  81. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
  82. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetOrGroupKey.js +7 -0
  83. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetOrGroupKey.js.map +1 -0
  84. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +165 -95
  85. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -1
  86. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +64 -64
  87. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -1
  88. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +30 -30
  89. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
  90. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
- import k from "../../_virtual/canonicalize.js";
2
- import z from "../../_virtual/lodash.js";
3
- import { ControllerBase as E } from "../ControllerBase.js";
1
+ import z from "../../_virtual/canonicalize.js";
2
+ import E from "../../_virtual/lodash.js";
3
+ import { ControllerBase as M } from "../ControllerBase.js";
4
4
  import { ComponentController as u } from "../ComponentController.js";
5
5
  import { AxisId as B, columnOrAxisIdFromString as h, isColumnId as C } from "../../spec.js";
6
- import { createLinkerMap as M, createMultipliesByMap as q, getFiltersFromStates as X, getAxesSpecsFromSources as Y, getLinkerColumnsForSource as F, getColumnOrAxisValueLabelsId as v, createHighlightColumn as j, getColumnOrAxisLabel as O, getColumnOrAxisSpec as T, getFormat as N } from "../../utils.js";
7
- var J = Object.defineProperty, Z = (x, t, e) => t in x ? J(x, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[t] = e, H = (x, t, e) => Z(x, t + "", e);
6
+ import { createLinkerMap as q, createMultipliesByMap as X, getFiltersFromStates as Y, getAxesSpecsFromSources as j, getLinkerColumnsForSource as F, getColumnOrAxisValueLabelsId as v, createHighlightColumn as H, getColumnOrAxisLabel as A, getColumnOrAxisSpec as T, getFormat as N } from "../../utils.js";
7
+ var J = Object.defineProperty, U = (x, t, e) => t in x ? J(x, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[t] = e, k = (x, t, e) => U(x, typeof t != "symbol" ? t + "" : t, e);
8
8
  const W = {
9
9
  type: "scatterplot",
10
10
  components: {
@@ -22,7 +22,7 @@ const W = {
22
22
  },
23
23
  dividedAxes: {}
24
24
  };
25
- class _ extends E {
25
+ class _ extends M {
26
26
  //allowHangingAxes = true;
27
27
  constructor() {
28
28
  super(
@@ -157,7 +157,7 @@ class _ extends E {
157
157
  }
158
158
  })
159
159
  }
160
- ), H(this, "dataInputs", ["x", "y"]);
160
+ ), k(this, "dataInputs", ["x", "y"]), k(this, "dontAllowUnfilteredHighCardinality", !0);
161
161
  }
162
162
  getMustBeConsumedAxes(t, e) {
163
163
  if (!t.components.x.selectorStates.length || !t.components.y.selectorStates.length)
@@ -165,7 +165,7 @@ class _ extends E {
165
165
  const g = t.components.x.selectorStates[0].selectedSource, S = t.components.y.selectorStates[0].selectedSource, d = e.get(g), r = e.get(S);
166
166
  if (!d || !r || d.kind !== "column" || r.kind !== "column")
167
167
  return /* @__PURE__ */ new Set();
168
- const c = d.spec.axesSpec.map((i) => B.fromAxisSpec(i).toCanonicalString()), m = r.spec.axesSpec.map((i) => B.fromAxisSpec(i).toCanonicalString()), l = c.filter((i) => !m.some((y) => y === i)), s = m.filter((i) => !c.some((y) => y === i));
168
+ const i = d.spec.axesSpec.map((c) => B.fromAxisSpec(c).toCanonicalString()), m = r.spec.axesSpec.map((c) => B.fromAxisSpec(c).toCanonicalString()), l = i.filter((c) => !m.some((y) => y === c)), s = m.filter((c) => !i.some((y) => y === c));
169
169
  return l.length && s.length ? /* @__PURE__ */ new Set([...l, ...s]) : /* @__PURE__ */ new Set();
170
170
  }
171
171
  async createDataByColumns(t, e) {
@@ -173,22 +173,22 @@ class _ extends E {
173
173
  const d = (g = e.components.x.selectorStates[0]) == null ? void 0 : g.selectedSource, r = (S = e.components.y.selectorStates[0]) == null ? void 0 : S.selectedSource;
174
174
  if (!d || !r)
175
175
  throw Error("X or Y column is not valid");
176
- const c = h(d), m = h(r), l = {
176
+ const i = h(d), m = h(r), l = {
177
177
  type: "columns",
178
- id: k(e.components) ?? "",
178
+ id: z(e.components) ?? "",
179
179
  values: {}
180
- }, s = await M(t), i = await q(t), y = [
180
+ }, s = await q(t), c = await X(t), y = [
181
181
  ...e.components.filters.selectorStates,
182
182
  ...e.components.tabBy.selectorStates
183
- ], L = X(y), A = y.map((a) => h(a.selectedSource)).filter(C), b = [c, m].filter(C).map((a) => a.toCanonicalString());
183
+ ], L = Y(y), O = y.map((a) => h(a.selectedSource)).filter(C), b = [i, m].filter(C).map((a) => a.toCanonicalString());
184
184
  if (b.length === 0)
185
185
  throw Error("One of X and Y should be a column");
186
- const D = await Y(t, b), P = [c, m, ...A], w = [], f = [];
186
+ const D = await j(t, b), P = [i, m, ...O], w = [], f = [];
187
187
  for (const { selectedSource: a } of y)
188
188
  f.push(...await F(
189
189
  t,
190
190
  s,
191
- i,
191
+ c,
192
192
  D,
193
193
  a
194
194
  ));
@@ -206,7 +206,7 @@ class _ extends E {
206
206
  w.push(h(p)), f.push(...await F(
207
207
  t,
208
208
  s,
209
- i,
209
+ c,
210
210
  D,
211
211
  p
212
212
  ));
@@ -214,7 +214,7 @@ class _ extends E {
214
214
  I && w.push(I);
215
215
  }
216
216
  const n = await t.pFrameProvider.getTableOuterJoin(
217
- [c, m, ...f, ...A],
217
+ [i, m, ...f, ...O],
218
218
  w,
219
219
  L,
220
220
  !1
@@ -222,25 +222,25 @@ class _ extends E {
222
222
  return [...P, ...w].forEach((a) => {
223
223
  const p = a.toCanonicalString();
224
224
  l.values[p] = C(a) ? n.columnsData[p] : n.axesData[p];
225
- }), l.values.key = new Array(l.values[Object.keys(l.values)[0]].length).fill(0).map((a, p) => p), e.components.highlight.selectorStates.length && (l.values.highlight = j(e.components.highlight.selectorStates, n)), { byColumns: l };
225
+ }), l.values.key = new Array(l.values[Object.keys(l.values)[0]].length).fill(0).map((a, p) => p), e.components.highlight.selectorStates.length && (l.values.highlight = H(e.components.highlight.selectorStates, n)), { byColumns: l };
226
226
  }
227
227
  async createChartSettings(t, e) {
228
228
  var g, S, d;
229
- const r = (g = e.components.x.selectorStates[0]) == null ? void 0 : g.selectedSource, c = (S = e.components.y.selectorStates[0]) == null ? void 0 : S.selectedSource, m = r ? h(r) : null, l = c ? h(c) : null;
230
- if (!r || !c || !m || !l || !C(m) && !C(l))
229
+ const r = (g = e.components.x.selectorStates[0]) == null ? void 0 : g.selectedSource, i = (S = e.components.y.selectorStates[0]) == null ? void 0 : S.selectedSource, m = r ? h(r) : null, l = i ? h(i) : null;
230
+ if (!r || !i || !m || !l || !C(m) && !C(l))
231
231
  throw Error("Empty or invalid required data");
232
- const s = [m, l].filter(C).map((o) => o.toCanonicalString()), i = {
232
+ const s = [m, l].filter(C).map((o) => o.toCanonicalString()), c = {
233
233
  type: "column",
234
234
  value: r,
235
- label: await O(t, r, s)
235
+ label: await A(t, r, s)
236
236
  }, y = {
237
237
  type: "column",
238
- value: c,
239
- label: await O(t, c, s)
238
+ value: i,
239
+ label: await A(t, i, s)
240
240
  }, L = {
241
241
  type: "column",
242
242
  value: "key"
243
- }, A = await Promise.all(
243
+ }, O = await Promise.all(
244
244
  e.components.facetBy.selectorStates.map(async (o) => {
245
245
  var n;
246
246
  return {
@@ -248,7 +248,7 @@ class _ extends E {
248
248
  value: ((n = await v(t, o.selectedSource, s)) == null ? void 0 : n.toCanonicalString()) ?? o.selectedSource
249
249
  };
250
250
  })
251
- ), b = z.uniq([
251
+ ), b = E.uniq([
252
252
  ...e.components.grouping.selectorStates.map((o) => o.selectedSource),
253
253
  ...e.components.size.selectorStates.map((o) => o.selectedSource),
254
254
  ...e.components.shape.selectorStates.map((o) => o.selectedSource)
@@ -258,7 +258,7 @@ class _ extends E {
258
258
  return {
259
259
  columnName: {
260
260
  type: "column",
261
- label: await O(t, o, s) || o,
261
+ label: await A(t, o, s) || o,
262
262
  value: o,
263
263
  valueLabels: ((n = await v(t, o, s)) == null ? void 0 : n.toCanonicalString()) ?? o
264
264
  }
@@ -269,7 +269,7 @@ class _ extends E {
269
269
  const n = o.selectedSource, a = h(n), p = await v(t, n, s) ?? a, I = await T(t, n, s);
270
270
  return {
271
271
  type: "column",
272
- label: await O(t, n, s) || n,
272
+ label: await A(t, n, s) || n,
273
273
  value: n,
274
274
  valueLabels: p.toCanonicalString(),
275
275
  format: N(I)
@@ -282,7 +282,7 @@ class _ extends E {
282
282
  w = {
283
283
  type: "column",
284
284
  value: o,
285
- label: await O(t, o, s),
285
+ label: await A(t, o, s),
286
286
  valueLabels: ((d = await v(t, o, s)) == null ? void 0 : d.toCanonicalString()) ?? o,
287
287
  format: N(n)
288
288
  };
@@ -293,10 +293,10 @@ class _ extends E {
293
293
  value: "highlight"
294
294
  }), {
295
295
  type: "scatterplot",
296
- x: i,
296
+ x: c,
297
297
  y,
298
298
  keyColumn: L,
299
- facetBy: A,
299
+ facetBy: O,
300
300
  grouping: D,
301
301
  label: w,
302
302
  highlight: f,
@@ -1 +1 @@
1
- {"version":3,"file":"scatterplot.js","sources":["../../../../../../../node_modules/@milaboratories/pf-plots/src/controllers/controllersByChartType/scatterplot.ts"],"sourcesContent":["import canonicalize from 'canonicalize';\nimport lodash from 'lodash';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n DataByColumns,\n InputStateParent,\n} from '../../common';\nimport {PValue} from '../../store';\nimport {ControllerBase, PlotDataAndSettings} from '../ControllerBase';\nimport {ComponentController} from '../ComponentController';\nimport {AxisId, ColumnId} from '../../spec';\nimport {columnOrAxisIdFromString, isColumnId} from '../../spec';\nimport type {DataStore} from '../../store';\nimport {\n createHighlightColumn,\n createLinkerMap,\n createMultipliesByMap,\n getAxesSpecsFromSources,\n getColumnOrAxisLabel, getColumnOrAxisSpec,\n getColumnOrAxisValueLabelsId,\n getFiltersFromStates,\n getFormat,\n getLinkerColumnsForSource,\n OptionsInfo,\n} from '../../utils';\n\nexport interface ScatterplotUIState extends InputStateParent<'scatterplot'> {\n type: 'scatterplot';\n components: {\n x: ComponentStateSimple;\n y: ComponentStateSimple;\n filters: ComponentStateFilter;\n highlight: ComponentStateFilter;\n tabBy: ComponentStateFilter;\n facetBy: ComponentStateSimple;\n grouping: ComponentStateSimple;\n shape: ComponentStateSimple;\n size: ComponentStateSimple;\n label: ComponentStateSimple;\n tooltipContent: ComponentStateSimple;\n };\n}\n\nexport const InitialScatterplotState: ScatterplotUIState = {\n type: 'scatterplot',\n components: {\n x: {type: 'simple', selectorStates: []},\n y: {type: 'simple', selectorStates: []},\n filters: {type: 'filter', selectorStates: []},\n highlight: {type: 'filter', selectorStates: []},\n tabBy: {type: 'filter', selectorStates: []},\n facetBy: {type: 'simple', selectorStates: []},\n grouping: {type: 'simple', selectorStates: []},\n shape: {type: 'simple', selectorStates: []},\n size: {type: 'simple', selectorStates: []},\n label: {type: 'simple', selectorStates: []},\n tooltipContent: {type: 'simple', selectorStates: []}\n },\n dividedAxes: {},\n};\n\nexport class ScatterplotStateController extends ControllerBase<ScatterplotUIState> {\n dataInputs = ['x', 'y'];\n //allowHangingAxes = true;\n\n constructor() {\n super(\n {\n x: new ComponentController<ScatterplotUIState, 'x'>({\n componentName: 'x',\n allowedTypes: ['Int', 'Long', 'Double' , 'Float', 'String'],\n parentComponents: ['y'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n y: new ComponentController<ScatterplotUIState, 'y'>({\n componentName: 'y',\n allowedTypes: ['Int', 'Long', 'Double', 'Float', 'String'],\n parentComponents: ['x'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n facetBy: new ComponentController<ScatterplotUIState, 'facetBy'>({\n componentName: 'facetBy',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n grouping: new ComponentController<ScatterplotUIState, 'grouping'>({\n componentName: 'grouping',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n shape: new ComponentController<ScatterplotUIState, 'shape'>({\n componentName: 'shape',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n size: new ComponentController<ScatterplotUIState, 'size'>({\n componentName: 'size',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n tooltipContent: new ComponentController<ScatterplotUIState, 'tooltipContent'>({\n componentName: 'tooltipContent',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n columnsAllowed: true,\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n label: new ComponentController<ScatterplotUIState, 'label'>({\n componentName: 'label',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: false,\n },\n }),\n },\n {\n filters: new ComponentController<ScatterplotUIState, 'filters'>({\n componentName: 'filters',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n tabBy: new ComponentController<ScatterplotUIState, 'tabBy'>({\n componentName: 'tabBy',\n allowedTypes: ['String', 'Int'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n },\n }),\n highlight: new ComponentController<ScatterplotUIState, 'highlight'>({\n componentName: 'highlight',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: true,\n },\n }),\n }\n );\n }\n\n getMustBeConsumedAxes(state: ScatterplotUIState, optionsInfo: OptionsInfo): Set<string> {\n if (!state.components.x.selectorStates.length || !state.components.y.selectorStates.length) {\n return new Set<string>();\n }\n const sourceIdX = state.components.x.selectorStates[0].selectedSource;\n const sourceIdY = state.components.y.selectorStates[0].selectedSource;\n const dataX = optionsInfo.get(sourceIdX);\n const dataY = optionsInfo.get(sourceIdY);\n if (!dataX || !dataY || dataX.kind !== 'column' || dataY.kind !== 'column') {\n return new Set<string>();\n }\n const axesX = dataX.spec.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const axesY = dataY.spec.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const hangingX = axesX.filter(axisKey => !axesY.some(id => id === axisKey));\n const hangingY = axesY.filter(axisKey => !axesX.some(id => id === axisKey));\n\n if (hangingX.length && hangingY.length) {\n return new Set<string>([...hangingX, ...hangingY])\n }\n return new Set<string>();\n }\n\n async createDataByColumns(store: DataStore, state: ScatterplotUIState): Promise<PlotDataAndSettings['data']> {\n const xColumnIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yColumnIdString = state.components.y.selectorStates[0]?.selectedSource;\n if (!xColumnIdString || !yColumnIdString) {\n throw Error('X or Y column is not valid');\n }\n const xId = columnOrAxisIdFromString(xColumnIdString);\n const yId = columnOrAxisIdFromString(yColumnIdString);\n const dataByColumns: DataByColumns = {\n type: 'columns',\n id: canonicalize(state.components) ?? '',\n values: {},\n };\n\n const linkerMap = await createLinkerMap(store);\n const multipliesByMap = await createMultipliesByMap(store);\n\n const filterSelectedStates = [\n ...state.components.filters.selectorStates,\n ...state.components.tabBy.selectorStates\n ]\n // filters for column/axes data requests\n const filters = getFiltersFromStates(filterSelectedStates);\n const filterColumns = filterSelectedStates.map(s => columnOrAxisIdFromString(s.selectedSource)).filter(isColumnId);\n\n const parentSources = [xId, yId].filter(isColumnId).map(item => item.toCanonicalString());\n\n if (parentSources.length === 0) {\n throw Error('One of X and Y should be a column');\n }\n const parentAxesList = await getAxesSpecsFromSources(store, parentSources);\n\n const primarySources = [xId, yId, ...filterColumns];\n const secondarySources: (ColumnId | AxisId)[] = [];\n const linkerColumns:ColumnId[] = [];\n\n for (const {selectedSource} of filterSelectedStates) {\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n multipliesByMap,\n parentAxesList,\n selectedSource\n ));\n }\n\n const inputs = [\n state.components.grouping,\n state.components.size,\n state.components.shape,\n state.components.tooltipContent,\n state.components.facetBy,\n state.components.label,\n state.components.highlight,\n ];\n for (const input of inputs) {\n for (const {selectedSource} of input.selectorStates) {\n secondarySources.push(columnOrAxisIdFromString(selectedSource)!);\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n multipliesByMap,\n parentAxesList,\n selectedSource\n ));\n const labelsColumnId = await getColumnOrAxisValueLabelsId(store, selectedSource, parentSources);\n if (labelsColumnId) {\n secondarySources.push(labelsColumnId);\n }\n }\n }\n\n const data = await store.pFrameProvider.getTableOuterJoin(\n [xId, yId, ...linkerColumns, ...filterColumns],\n secondarySources,\n filters,\n false\n );\n\n [...primarySources, ...secondarySources].forEach(item => {\n const key = item.toCanonicalString();\n dataByColumns.values[key] = isColumnId(item) ? data.columnsData[key] : data.axesData[key];\n });\n\n dataByColumns.values['key'] = new Array(dataByColumns.values[Object.keys(dataByColumns.values)[0]].length).fill(0).map((_v, idx) => idx);\n\n if (state.components.highlight.selectorStates.length) {\n dataByColumns.values['highlight'] = createHighlightColumn(state.components.highlight.selectorStates, data) as PValue[];\n }\n\n return {byColumns: dataByColumns};\n }\n\n async createChartSettings(store: DataStore, state: ScatterplotUIState): Promise<Record<string, unknown>> {\n const xIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yIdString = state.components.y.selectorStates[0]?.selectedSource;\n const xIdWithQ = xIdString ? columnOrAxisIdFromString(xIdString) : null;\n const yIdWithQ = yIdString ? columnOrAxisIdFromString(yIdString) : null;\n if (!xIdString || !yIdString || !xIdWithQ || !yIdWithQ || (!isColumnId(xIdWithQ) && !isColumnId(yIdWithQ))) {\n throw Error('Empty or invalid required data');\n }\n\n const parentSources = [xIdWithQ, yIdWithQ].filter(isColumnId).map(item => item.toCanonicalString());\n const x = {\n type: 'column',\n value: xIdString,\n label: await getColumnOrAxisLabel(store, xIdString, parentSources),\n };\n const y = {\n type: 'column',\n value: yIdString,\n label: await getColumnOrAxisLabel(store, yIdString, parentSources),\n };\n const keyColumn = {\n type: 'column',\n value: 'key',\n };\n const facetBy = await Promise.all(\n state.components.facetBy.selectorStates.map(async selectorState => ({\n type: 'column',\n value:\n (await getColumnOrAxisValueLabelsId(store, selectorState.selectedSource, parentSources))?.toCanonicalString() ??\n selectorState.selectedSource,\n }))\n );\n const allGroupingIds = lodash.uniq([\n ...state.components.grouping.selectorStates.map(s => s.selectedSource),\n ...state.components.size.selectorStates.map(s => s.selectedSource),\n ...state.components.shape.selectorStates.map(s => s.selectedSource),\n ]);\n const grouping = await Promise.all(\n allGroupingIds.map(async idString => {\n return {\n columnName: {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, idString, parentSources)) || idString,\n value: idString,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, idString, parentSources))?.toCanonicalString() ??\n idString,\n }\n };\n })\n );\n\n const tooltipContent = await Promise.all(\n state.components.tooltipContent.selectorStates.map(async selectorState => {\n const source = selectorState.selectedSource;\n const id = columnOrAxisIdFromString(source);\n const labelColumn = (await getColumnOrAxisValueLabelsId(store, source, parentSources)) ?? id;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n return {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, source, parentSources)) || source,\n value: source,\n valueLabels: labelColumn.toCanonicalString(),\n format: getFormat(spec)\n };\n })\n );\n\n let label;\n if (state.components.label.selectorStates.length) {\n const source = state.components.label.selectorStates[0].selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n label = {\n type: 'column',\n value: source,\n label: await getColumnOrAxisLabel(store, source, parentSources),\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: getFormat(spec)\n };\n }\n let highlight;\n if (state.components.highlight.selectorStates.length) {\n highlight = {\n type: 'column',\n value: 'highlight'\n }\n }\n return {\n type: 'scatterplot',\n x,\n y,\n keyColumn,\n facetBy,\n grouping,\n label,\n highlight,\n tooltips: {\n show: true,\n content: tooltipContent\n }\n };\n }\n}\n"],"names":["InitialScatterplotState","ScatterplotStateController","ControllerBase","ComponentController","__publicField","state","optionsInfo","sourceIdX","sourceIdY","dataX","dataY","axesX","s","AxisId","axesY","hangingX","axisKey","id","hangingY","store","xColumnIdString","_a","yColumnIdString","_b","xId","columnOrAxisIdFromString","yId","dataByColumns","canonicalize","linkerMap","createLinkerMap","multipliesByMap","createMultipliesByMap","filterSelectedStates","filters","getFiltersFromStates","filterColumns","isColumnId","parentSources","item","parentAxesList","getAxesSpecsFromSources","primarySources","secondarySources","linkerColumns","selectedSource","getLinkerColumnsForSource","inputs","input","labelsColumnId","getColumnOrAxisValueLabelsId","data","key","_v","idx","createHighlightColumn","xIdString","yIdString","xIdWithQ","yIdWithQ","x","getColumnOrAxisLabel","y","keyColumn","facetBy","selectorState","allGroupingIds","lodash","grouping","idString","tooltipContent","source","labelColumn","spec","getColumnOrAxisSpec","getFormat","label","_c","highlight","w"],"mappings":";;;;;;;AA4CO,MAAMA,IAA8C;AAAA,E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AAO,MAAMC,EAAoBvD,GAAOoD,GAAQjC,CAAa;AAC3DsC,MAAAA,IAAA;AAAA,QACJ,MAAM;AAAA,QACN,OAAOL;AAAAA,QACP,OAAO,MAAMV,EAAqB1C,GAAOoD,GAAQjC,CAAa;AAAA,QAC9D,eACKuC,IAAA,MAAM3B,EAA6B/B,GAAOoD,GAAQjC,CAAa,MAA/D,OAAA,SAAAuC,EAAmE,kBAAA,MACpEN;AAAAA,QACJ,QAAQI,EAAUF,CAAI;AAAA,MAAA;AAAA,IAC1B;AAEA,QAAAK;AACJ,WAAIzE,EAAM,WAAW,UAAU,eAAe,WAC9ByE,IAAA;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA,IAGR;AAAA,MACH,MAAM;AAAA,MACN,GAAAlB;AAAAA,MACAmB;AAAA,MACA,WAAAhB;AAAAA,MACA,SAAAC;AAAAA,MACA,UAAAI;AAAAA,MACA,OAAAQ;AAAAA,MACA,WAAAE;AAAAA,MACA,UAAU;AAAA,QACN,MAAM;AAAA,QACN,SAASR;AAAAA,MAAA;AAAA,IAAA;AAAA,EAEjB;AAER;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"scatterplot.js","sources":["../../../../../../../node_modules/@milaboratories/pf-plots/src/controllers/controllersByChartType/scatterplot.ts"],"sourcesContent":["import canonicalize from 'canonicalize';\nimport lodash from 'lodash';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n DataByColumns,\n InputStateParent,\n} from '../../common';\nimport {PValue} from '../../store';\nimport {ControllerBase, PlotDataAndSettings} from '../ControllerBase';\nimport {ComponentController} from '../ComponentController';\nimport {AxisId, ColumnId} from '../../spec';\nimport {columnOrAxisIdFromString, isColumnId} from '../../spec';\nimport type {DataStore} from '../../store';\nimport {\n createHighlightColumn,\n createLinkerMap,\n createMultipliesByMap,\n getAxesSpecsFromSources,\n getColumnOrAxisLabel, getColumnOrAxisSpec,\n getColumnOrAxisValueLabelsId,\n getFiltersFromStates,\n getFormat,\n getLinkerColumnsForSource,\n OptionsInfo,\n} from '../../utils';\n\nexport interface ScatterplotUIState extends InputStateParent<'scatterplot'> {\n type: 'scatterplot';\n components: {\n x: ComponentStateSimple;\n y: ComponentStateSimple;\n filters: ComponentStateFilter;\n highlight: ComponentStateFilter;\n tabBy: ComponentStateFilter;\n facetBy: ComponentStateSimple;\n grouping: ComponentStateSimple;\n shape: ComponentStateSimple;\n size: ComponentStateSimple;\n label: ComponentStateSimple;\n tooltipContent: ComponentStateSimple;\n };\n}\n\nexport const InitialScatterplotState: ScatterplotUIState = {\n type: 'scatterplot',\n components: {\n x: {type: 'simple', selectorStates: []},\n y: {type: 'simple', selectorStates: []},\n filters: {type: 'filter', selectorStates: []},\n highlight: {type: 'filter', selectorStates: []},\n tabBy: {type: 'filter', selectorStates: []},\n facetBy: {type: 'simple', selectorStates: []},\n grouping: {type: 'simple', selectorStates: []},\n shape: {type: 'simple', selectorStates: []},\n size: {type: 'simple', selectorStates: []},\n label: {type: 'simple', selectorStates: []},\n tooltipContent: {type: 'simple', selectorStates: []}\n },\n dividedAxes: {},\n};\n\nexport class ScatterplotStateController extends ControllerBase<ScatterplotUIState> {\n dataInputs = ['x', 'y'];\n dontAllowUnfilteredHighCardinality = true;\n //allowHangingAxes = true;\n\n constructor() {\n super(\n {\n x: new ComponentController<ScatterplotUIState, 'x'>({\n componentName: 'x',\n allowedTypes: ['Int', 'Long', 'Double' , 'Float', 'String'],\n parentComponents: ['y'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n y: new ComponentController<ScatterplotUIState, 'y'>({\n componentName: 'y',\n allowedTypes: ['Int', 'Long', 'Double', 'Float', 'String'],\n parentComponents: ['x'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n facetBy: new ComponentController<ScatterplotUIState, 'facetBy'>({\n componentName: 'facetBy',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n grouping: new ComponentController<ScatterplotUIState, 'grouping'>({\n componentName: 'grouping',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n shape: new ComponentController<ScatterplotUIState, 'shape'>({\n componentName: 'shape',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n size: new ComponentController<ScatterplotUIState, 'size'>({\n componentName: 'size',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n tooltipContent: new ComponentController<ScatterplotUIState, 'tooltipContent'>({\n componentName: 'tooltipContent',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n columnsAllowed: true,\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n label: new ComponentController<ScatterplotUIState, 'label'>({\n componentName: 'label',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: false,\n },\n }),\n },\n {\n filters: new ComponentController<ScatterplotUIState, 'filters'>({\n componentName: 'filters',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n tabBy: new ComponentController<ScatterplotUIState, 'tabBy'>({\n componentName: 'tabBy',\n allowedTypes: ['String', 'Int'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n },\n }),\n highlight: new ComponentController<ScatterplotUIState, 'highlight'>({\n componentName: 'highlight',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: true,\n },\n }),\n }\n );\n }\n\n getMustBeConsumedAxes(state: ScatterplotUIState, optionsInfo: OptionsInfo): Set<string> {\n if (!state.components.x.selectorStates.length || !state.components.y.selectorStates.length) {\n return new Set<string>();\n }\n const sourceIdX = state.components.x.selectorStates[0].selectedSource;\n const sourceIdY = state.components.y.selectorStates[0].selectedSource;\n const dataX = optionsInfo.get(sourceIdX);\n const dataY = optionsInfo.get(sourceIdY);\n if (!dataX || !dataY || dataX.kind !== 'column' || dataY.kind !== 'column') {\n return new Set<string>();\n }\n const axesX = dataX.spec.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const axesY = dataY.spec.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const hangingX = axesX.filter(axisKey => !axesY.some(id => id === axisKey));\n const hangingY = axesY.filter(axisKey => !axesX.some(id => id === axisKey));\n\n if (hangingX.length && hangingY.length) {\n return new Set<string>([...hangingX, ...hangingY])\n }\n return new Set<string>();\n }\n\n async createDataByColumns(store: DataStore, state: ScatterplotUIState): Promise<PlotDataAndSettings['data']> {\n const xColumnIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yColumnIdString = state.components.y.selectorStates[0]?.selectedSource;\n if (!xColumnIdString || !yColumnIdString) {\n throw Error('X or Y column is not valid');\n }\n const xId = columnOrAxisIdFromString(xColumnIdString);\n const yId = columnOrAxisIdFromString(yColumnIdString);\n const dataByColumns: DataByColumns = {\n type: 'columns',\n id: canonicalize(state.components) ?? '',\n values: {},\n };\n\n const linkerMap = await createLinkerMap(store);\n const multipliesByMap = await createMultipliesByMap(store);\n\n const filterSelectedStates = [\n ...state.components.filters.selectorStates,\n ...state.components.tabBy.selectorStates\n ]\n // filters for column/axes data requests\n const filters = getFiltersFromStates(filterSelectedStates);\n const filterColumns = filterSelectedStates.map(s => columnOrAxisIdFromString(s.selectedSource)).filter(isColumnId);\n\n const parentSources = [xId, yId].filter(isColumnId).map(item => item.toCanonicalString());\n\n if (parentSources.length === 0) {\n throw Error('One of X and Y should be a column');\n }\n const parentAxesList = await getAxesSpecsFromSources(store, parentSources);\n\n const primarySources = [xId, yId, ...filterColumns];\n const secondarySources: (ColumnId | AxisId)[] = [];\n const linkerColumns:ColumnId[] = [];\n\n for (const {selectedSource} of filterSelectedStates) {\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n multipliesByMap,\n parentAxesList,\n selectedSource\n ));\n }\n\n const inputs = [\n state.components.grouping,\n state.components.size,\n state.components.shape,\n state.components.tooltipContent,\n state.components.facetBy,\n state.components.label,\n state.components.highlight,\n ];\n for (const input of inputs) {\n for (const {selectedSource} of input.selectorStates) {\n secondarySources.push(columnOrAxisIdFromString(selectedSource)!);\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n multipliesByMap,\n parentAxesList,\n selectedSource\n ));\n const labelsColumnId = await getColumnOrAxisValueLabelsId(store, selectedSource, parentSources);\n if (labelsColumnId) {\n secondarySources.push(labelsColumnId);\n }\n }\n }\n\n const data = await store.pFrameProvider.getTableOuterJoin(\n [xId, yId, ...linkerColumns, ...filterColumns],\n secondarySources,\n filters,\n false\n );\n\n [...primarySources, ...secondarySources].forEach(item => {\n const key = item.toCanonicalString();\n dataByColumns.values[key] = isColumnId(item) ? data.columnsData[key] : data.axesData[key];\n });\n\n dataByColumns.values['key'] = new Array(dataByColumns.values[Object.keys(dataByColumns.values)[0]].length).fill(0).map((_v, idx) => idx);\n\n if (state.components.highlight.selectorStates.length) {\n dataByColumns.values['highlight'] = createHighlightColumn(state.components.highlight.selectorStates, data) as PValue[];\n }\n\n return {byColumns: dataByColumns};\n }\n\n async createChartSettings(store: DataStore, state: ScatterplotUIState): Promise<Record<string, unknown>> {\n const xIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yIdString = state.components.y.selectorStates[0]?.selectedSource;\n const xIdWithQ = xIdString ? columnOrAxisIdFromString(xIdString) : null;\n const yIdWithQ = yIdString ? columnOrAxisIdFromString(yIdString) : null;\n if (!xIdString || !yIdString || !xIdWithQ || !yIdWithQ || (!isColumnId(xIdWithQ) && !isColumnId(yIdWithQ))) {\n throw Error('Empty or invalid required data');\n }\n\n const parentSources = [xIdWithQ, yIdWithQ].filter(isColumnId).map(item => item.toCanonicalString());\n const x = {\n type: 'column',\n value: xIdString,\n label: await getColumnOrAxisLabel(store, xIdString, parentSources),\n };\n const y = {\n type: 'column',\n value: yIdString,\n label: await getColumnOrAxisLabel(store, yIdString, parentSources),\n };\n const keyColumn = {\n type: 'column',\n value: 'key',\n };\n const facetBy = await Promise.all(\n state.components.facetBy.selectorStates.map(async selectorState => ({\n type: 'column',\n value:\n (await getColumnOrAxisValueLabelsId(store, selectorState.selectedSource, parentSources))?.toCanonicalString() ??\n selectorState.selectedSource,\n }))\n );\n const allGroupingIds = lodash.uniq([\n ...state.components.grouping.selectorStates.map(s => s.selectedSource),\n ...state.components.size.selectorStates.map(s => s.selectedSource),\n ...state.components.shape.selectorStates.map(s => s.selectedSource),\n ]);\n const grouping = await Promise.all(\n allGroupingIds.map(async idString => {\n return {\n columnName: {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, idString, parentSources)) || idString,\n value: idString,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, idString, parentSources))?.toCanonicalString() ??\n idString,\n }\n };\n })\n );\n\n const tooltipContent = await Promise.all(\n state.components.tooltipContent.selectorStates.map(async selectorState => {\n const source = selectorState.selectedSource;\n const id = columnOrAxisIdFromString(source);\n const labelColumn = (await getColumnOrAxisValueLabelsId(store, source, parentSources)) ?? id;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n return {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, source, parentSources)) || source,\n value: source,\n valueLabels: labelColumn.toCanonicalString(),\n format: getFormat(spec)\n };\n })\n );\n\n let label;\n if (state.components.label.selectorStates.length) {\n const source = state.components.label.selectorStates[0].selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n label = {\n type: 'column',\n value: source,\n label: await getColumnOrAxisLabel(store, source, parentSources),\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: getFormat(spec)\n };\n }\n let highlight;\n if (state.components.highlight.selectorStates.length) {\n highlight = {\n type: 'column',\n value: 'highlight'\n }\n }\n return {\n type: 'scatterplot',\n x,\n y,\n keyColumn,\n facetBy,\n grouping,\n label,\n highlight,\n tooltips: {\n show: true,\n content: tooltipContent\n }\n };\n }\n}\n"],"names":["InitialScatterplotState","ScatterplotStateController","ControllerBase","ComponentController","__publicField","state","optionsInfo","sourceIdX","sourceIdY","dataX","dataY","axesX","s","AxisId","axesY","hangingX","axisKey","id","hangingY","store","xColumnIdString","_a","yColumnIdString","_b","xId","columnOrAxisIdFromString","yId","dataByColumns","canonicalize","linkerMap","createLinkerMap","multipliesByMap","createMultipliesByMap","filterSelectedStates","filters","getFiltersFromStates","filterColumns","isColumnId","parentSources","item","parentAxesList","getAxesSpecsFromSources","primarySources","secondarySources","linkerColumns","selectedSource","getLinkerColumnsForSource","inputs","input","labelsColumnId","getColumnOrAxisValueLabelsId","data","key","_v","idx","createHighlightColumn","xIdString","yIdString","xIdWithQ","yIdWithQ","x","getColumnOrAxisLabel","y","keyColumn","facetBy","selectorState","allGroupingIds","lodash","grouping","idString","tooltipContent","source","labelColumn","spec","getColumnOrAxisSpec","getFormat","label","_c","highlight","w"],"mappings":";;;;;;;AA4CO,MAAMA,IAA8C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACR,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,WAAW,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC5C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,UAAU,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC3C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,MAAM,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACvC,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,gBAAgB,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAE;AAAA,EAAA;AAAA,EAEvD,aAAa,CAAA;AACjB;AAEO,MAAMC,UAAmCC,EAAmC;AAAA;AAAA,EAK/E,cAAc;AACV;AAAA,MACI;AAAA,QACI,GAAG,IAAIC,EAA6C;AAAA,UAChD,eAAe;AAAA,UACf,cAAc,CAAC,OAAO,QAAQ,UAAW,SAAS,QAAQ;AAAA,UAC1D,kBAAkB,CAAC,GAAG;AAAA,UACtB,0BAA0B;AAAA,UAC1B,UAAU;AAAA,YACN,iBAAiB;AAAA,YACjB,UAAU;AAAA,YACV,aAAa;AAAA,YACb,gBAAgB;AAAA,UAAA;AAAA,QAAA,CAEvB;AAAA,QACD,GAAG,IAAIA,EAA6C;AAAA,UAChD,eAA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QAAA;AAAA,MAE7B,CAAA;AAAA,IAAA;AAGD,QAAAG;AACJ,QAAIvE,EAAM,WAAW,MAAM,eAAe,QAAQ;AAC9C,YAAMkE,IAAUlE,EAAM,WAAW,MAAM,eAAe,CAAC,EAAE,gBACnDoE,IAAO,MAAMC,EAAoBvD,GAAOoD,GAAQjC,CAAa;AAC3DsC,MAAAA,IAAA;AAAA,QACJ,MAAM;AAAA,QACN,OAAOL;AAAAA,QACP,OAAO,MAAMV,EAAqB1C,GAAOoD,GAAQjC,CAAa;AAAA,QAC9D,eACKuC,IAAA,MAAM3B,EAA6B/B,GAAOoD,GAAQjC,CAAa,MAA/D,OAAA,SAAAuC,EAAmE,kBAAA,MACpEN;AAAAA,QACJ,QAAQI,EAAUF,CAAI;AAAA,MAAA;AAAA,IAC1B;AAEA,QAAAK;AACJ,WAAIzE,EAAM,WAAW,UAAU,eAAe,WAC9ByE,IAAA;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA,IAGR;AAAA,MACH,MAAM;AAAA,MACN,GAAAlB;AAAAA,MACAmB;AAAA,MACA,WAAAhB;AAAAA,MACA,SAAAC;AAAAA,MACA,UAAAI;AAAAA,MACA,OAAAQ;AAAAA,MACA,WAAAE;AAAAA,MACA,UAAU;AAAA,QACN,MAAM;AAAA,QACN,SAASR;AAAAA,MAAA;AAAA,IAAA;AAAA,EAEjB;AAER;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/graph-maker",
3
- "version": "1.1.167",
3
+ "version": "1.1.169",
4
4
  "type": "module",
5
5
  "main": "dist/lib.js",
6
6
  "types": "dist/lib.d.ts",
@@ -37,8 +37,8 @@
37
37
  "dependencies": {
38
38
  "@ag-grid-community/core": "^32.3.3",
39
39
  "@milaboratories/helpers": "^1.6.15",
40
- "@milaboratories/miplots4": "^1.0.150",
41
- "@milaboratories/pf-plots": "^1.1.39",
40
+ "@milaboratories/miplots4": "^1.0.152",
41
+ "@milaboratories/pf-plots": "^1.1.41",
42
42
  "@platforma-sdk/model": "^1.43.29",
43
43
  "@platforma-sdk/ui-vue": "^1.42.36",
44
44
  "@types/d3-hierarchy": "^3.1.7",