@milaboratories/graph-maker 1.1.156 → 1.1.158

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 (71) hide show
  1. package/dist/GraphMaker/components/Chart.vue.d.ts.map +1 -1
  2. package/dist/GraphMaker/components/Chart.vue.js +20 -16
  3. package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
  4. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.d.ts.map +1 -1
  5. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.js +24 -23
  6. package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.js.map +1 -1
  7. package/dist/GraphMaker/constantsCommon.d.ts +1 -0
  8. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  9. package/dist/GraphMaker/constantsCommon.js +17 -16
  10. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  11. package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.d.ts.map +1 -1
  12. package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +104 -93
  13. package/dist/GraphMaker/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
  14. package/dist/GraphMaker/index.vue.js +33 -33
  15. package/dist/GraphMaker/index.vue.js.map +1 -1
  16. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +1 -0
  17. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  18. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js +11 -11
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
  20. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +136 -135
  21. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
  22. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +2 -2
  23. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
  24. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +115 -107
  25. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  26. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js +99 -0
  27. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsCanvas.js.map +1 -0
  28. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js +57 -0
  29. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/AnnotationCellsSvg.js.map +1 -0
  30. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js +43 -43
  31. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/index.js.map +1 -1
  32. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js +85 -0
  33. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/CanvasCells.js.map +1 -0
  34. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/AxisCaptions.js +5 -5
  35. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Captions/GroupCaptions.js +16 -16
  36. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +191 -197
  37. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  38. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +29 -27
  39. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
  40. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js +38 -0
  41. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/SvgCells.js.map +1 -0
  42. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js +44 -0
  43. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/tooltipUtils.js.map +1 -0
  44. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/constants.js +16 -15
  45. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/constants.js.map +1 -1
  46. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +63 -66
  47. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +64 -62
  49. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  50. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateChartSideElementSizes.js +9 -9
  51. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +14 -14
  52. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +5 -4
  53. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
  54. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +10 -8
  55. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +1 -1
  56. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +21 -21
  57. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +19 -19
  58. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +8 -8
  59. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +9 -9
  60. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +7 -7
  61. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js +2 -2
  62. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/blob.js.map +1 -1
  63. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js +59 -57
  64. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/drivers/pframe/spec/spec.js.map +1 -1
  65. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/components/PlDataTable.js.map +1 -1
  66. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/render/util/label.js +13 -13
  67. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +137 -133
  68. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -1
  69. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +74 -74
  70. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -1
  71. package/package.json +3 -3
@@ -1,26 +1,26 @@
1
- import { j } from "../node_modules/react/jsx-runtime.js";
1
+ import { j as I } from "../node_modules/react/jsx-runtime.js";
2
2
  import ot from "../node_modules/lodash/lodash.js";
3
3
  import { createRoot as at } from "../node_modules/react-dom/client.js";
4
4
  import { Error as rt } from "../common/Error.js";
5
5
  import { DataFrameProvider as nt } from "../common/useDataFrame.js";
6
- import { TITLE_LINE_HEIGHT as ht, TITLE_MARGIN as lt, DEFAULT_HEIGHT as X, DEFAULT_WIDTH as V } from "../constants.js";
6
+ import { TITLE_LINE_HEIGHT as lt, TITLE_MARGIN as ht, DEFAULT_HEIGHT as X, DEFAULT_WIDTH as V } from "../constants.js";
7
7
  import { arrangeLegendParts as ct } from "../utils/arrangeLegendParts.js";
8
8
  import { getChartEdgeSides as ut } from "../utils/getChartEdgeSides.js";
9
9
  import { getContinuousLegendTicks as J } from "../utils/getContinuousLegendTicks.js";
10
10
  import { TextMeasurer as dt } from "../utils/TextMeasurer/TextMeasurer.js";
11
11
  import { ChartsGroup as pt } from "./components/ChartsGroup.js";
12
- import { LEGEND_OFFSET as mt, DEFAULT_AES as Q, CHART_SIDE_ELEMENTS as gt, TITLE_LINE as Y, MIN_MARGIN as O } from "./constants.js";
13
- import { calculateChartSideElementSizes as yt } from "./utils/calculateChartSideElementSizes.js";
14
- import { calculateSideElementsBBoxes as ft } from "./utils/calculateSideElementsBBoxes.js";
15
- import { createDiscreteColorScale as Z, createContinuousColorScale as xt } from "./utils/createColorScales.js";
16
- import { calculateAnnotationTitleSizes as St } from "./utils/calculateAnnotationTitleSizes.js";
12
+ import { LEGEND_OFFSET as mt, DEFAULT_AES as Q, CHART_SIDE_ELEMENTS as gt, TITLE_LINE as Y, MIN_MARGIN as j } from "./constants.js";
13
+ import { calculateChartSideElementSizes as ft } from "./utils/calculateChartSideElementSizes.js";
14
+ import { calculateSideElementsBBoxes as yt } from "./utils/calculateSideElementsBBoxes.js";
15
+ import { createDiscreteColorScale as Z, createContinuousColorScale as St } from "./utils/createColorScales.js";
16
+ import { calculateAnnotationTitleSizes as xt } from "./utils/calculateAnnotationTitleSizes.js";
17
17
  import { calculateCaptionTails as Ct } from "./utils/calculateCaptionTails.js";
18
- import B from "../node_modules/d3-scale/src/ordinal.js";
19
- import H from "../node_modules/d3-scale/src/linear.js";
18
+ import W from "../node_modules/d3-scale/src/ordinal.js";
19
+ import N from "../node_modules/d3-scale/src/linear.js";
20
20
  import bt from "../node_modules/d3-array/src/extent.js";
21
21
  import tt from "../node_modules/d3-hierarchy/src/cluster.js";
22
- var At = Object.defineProperty, Et = (m, s, e) => s in m ? At(m, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[s] = e, A = (m, s, e) => Et(m, typeof s != "symbol" ? s + "" : s, e);
23
- const Gt = Math.cos(Math.PI / 4), zt = 5;
22
+ var At = Object.defineProperty, Gt = (m, s, e) => s in m ? At(m, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[s] = e, A = (m, s, e) => Gt(m, typeof s != "symbol" ? s + "" : s, e);
23
+ const zt = Math.cos(Math.PI / 4), Et = 5;
24
24
  function et(m, s, e) {
25
25
  function t(r) {
26
26
  r[e] = s(r.data.height), r.children && r.children.forEach(t);
@@ -37,8 +37,8 @@ const Lt = (m, s) => {
37
37
  const e = Math.min(...s), t = Math.max(...s);
38
38
  if (e === t) {
39
39
  const n = m % 2 === 0 ? [] : [e];
40
- for (let h = 1; h < m / 2 + 1; h++)
41
- n.push(e + h), n.unshift(e - h);
40
+ for (let l = 1; l < m / 2 + 1; l++)
41
+ n.push(e + l), n.unshift(e - l);
42
42
  return n;
43
43
  }
44
44
  if (m < 2)
@@ -52,7 +52,7 @@ function it(m, s, e) {
52
52
  let t = e;
53
53
  return m && (m.colorRange && (t = m.colorRange), m.method === "standardScaling" && (t = [-2, 2]), m.method === "meanNormalization" && (t = [-0.75, 0.75])), Lt(s, t);
54
54
  }
55
- function $(m, s, e) {
55
+ function k(m, s, e) {
56
56
  let t = 0;
57
57
  for (const r of m) {
58
58
  if (s[r] === void 0) continue;
@@ -62,11 +62,11 @@ function $(m, s, e) {
62
62
  return t;
63
63
  }
64
64
  function F(m, s) {
65
- return s === 90 ? m : s === 45 ? m * Gt + (m > 0 ? 2 * zt : 0) : Y;
65
+ return s === 90 ? m : s === 45 ? m * zt + (m > 0 ? 2 * Et : 0) : Y;
66
66
  }
67
67
  class Yt {
68
68
  constructor() {
69
- A(this, "reactRoot", null), A(this, "parentNode", null), A(this, "rootNode", null), A(this, "component", /* @__PURE__ */ j.jsx(j.Fragment, {})), A(this, "chartsDimensions", {}), A(this, "chartSizes", {
69
+ A(this, "reactRoot", null), A(this, "parentNode", null), A(this, "rootNode", null), A(this, "component", /* @__PURE__ */ I.jsx(I.Fragment, {})), A(this, "chartsDimensions", {}), A(this, "chartSizes", {
70
70
  chartWidth: V,
71
71
  // width of single chart
72
72
  chartHeight: X,
@@ -80,10 +80,10 @@ class Yt {
80
80
  totalHeight: X
81
81
  // width of all charts in charts height, plus bottom axis, plus top title
82
82
  }), A(this, "margins", {
83
- top: O,
84
- bottom: O,
85
- left: O,
86
- right: O
83
+ top: j,
84
+ bottom: j,
85
+ left: j,
86
+ right: j
87
87
  }), A(this, "captionsSizes", {
88
88
  xAxisCaptions: 100,
89
89
  yAxisCaptions: 100,
@@ -98,9 +98,9 @@ class Yt {
98
98
  yGroupLabels: 0
99
99
  }), A(this, "columnsCount", 1), A(this, "rowsCount", 1), A(this, "scales", {
100
100
  // scales grouped by facet
101
- x: { null: B().domain(["null"]).range([1]) },
102
- y: { null: B().domain(["null"]).range([1]) }
103
- }), A(this, "step", { x: {}, y: {} }), A(this, "colorScale", H().domain([0, 1]).range(["white", "black"])), A(this, "annotationColorScales", {}), A(this, "dendrogramAesScales", {}), A(this, "legend", {
101
+ x: { null: W().domain(["null"]).range([1]) },
102
+ y: { null: W().domain(["null"]).range([1]) }
103
+ }), A(this, "step", { x: {}, y: {} }), A(this, "colorScale", N().domain([0, 1]).range(["white", "black"])), A(this, "annotationColorScales", {}), A(this, "dendrogramAesScales", {}), A(this, "legend", {
104
104
  width: 0,
105
105
  height: 0,
106
106
  items: []
@@ -118,7 +118,7 @@ class Yt {
118
118
  }
119
119
  updateMargins(s, e) {
120
120
  this.margins = {
121
- top: s.show ? ht + lt * 2 : e.outerOffset,
121
+ top: s.show ? lt + ht * 2 : e.outerOffset,
122
122
  bottom: e.outerOffset,
123
123
  left: e.outerOffset,
124
124
  right: this.legend.width + e.outerOffset
@@ -129,52 +129,52 @@ class Yt {
129
129
  this.legend = { width: 0, height: 0, items: [] };
130
130
  return;
131
131
  }
132
- const n = this.chartSizes.chartHeight, h = [], u = { width: 0, height: 0, left: 0, top: 0 }, f = (c) => c.reduce((l, i) => (l[i] = String(i), l), {});
132
+ const n = this.chartSizes.chartHeight, l = [], u = { width: 0, height: 0, left: 0, top: 0 }, f = (c) => c.reduce((h, i) => (h[i] = String(i), h), {});
133
133
  if (s === "continuous") {
134
- const c = this.colorScale, l = J(c, o), i = H([l[0], l[l.length - 1]], [n, 0]), a = r.label ?? r.value;
135
- h.push({
134
+ const c = this.colorScale, h = J(c, o), i = N([h[0], h[h.length - 1]], [n, 0]), a = r.label ?? r.value;
135
+ l.push({
136
136
  ...u,
137
137
  type: "continuous",
138
138
  id: "heatmapValue",
139
139
  scale: c,
140
- values: l,
140
+ values: h,
141
141
  title: a,
142
142
  tickPositionScale: i
143
143
  });
144
144
  } else if (s === "discrete") {
145
- const c = this.colorScale, l = r.label ?? r.value, i = c.domain(), a = f(i);
146
- h.push({ ...u, type: "discreteColor", id: "heatmapValue", title: l, scale: c, values: i, labels: a });
145
+ const c = this.colorScale, h = r.label ?? r.value, i = c.domain(), a = f(i);
146
+ l.push({ ...u, type: "discreteColor", id: "heatmapValue", title: h, scale: c, values: i, labels: a });
147
147
  }
148
148
  if (t.forEach((c) => {
149
- const l = c.valueColumn.label ?? c.valueColumn.value;
149
+ const h = c.valueColumn.label ?? c.valueColumn.value;
150
150
  if (c.type === "continuous") {
151
- const i = this.annotationColorScales[c.id].scale, a = J(i, o), y = H([a[0], a[a.length - 1]], [n, 0]);
152
- h.push({ ...u, type: "continuous", id: c.id, tickPositionScale: y, title: l, scale: i, values: a });
151
+ const i = this.annotationColorScales[c.id].scale, a = J(i, o), y = N([a[0], a[a.length - 1]], [n, 0]);
152
+ l.push({ ...u, type: "continuous", id: c.id, tickPositionScale: y, title: h, scale: i, values: a });
153
153
  }
154
154
  if (c.type === "discrete") {
155
155
  const i = this.annotationColorScales[c.id].scale, a = i.domain(), y = f(a);
156
- h.push({ ...u, type: "discreteColor", id: c.id, title: l, scale: i, values: a, labels: y });
156
+ l.push({ ...u, type: "discreteColor", id: c.id, title: h, scale: i, values: a, labels: y });
157
157
  }
158
- }), !h.length) {
158
+ }), !l.length) {
159
159
  this.legend = { width: 0, height: 0, items: [] };
160
160
  return;
161
161
  }
162
- const d = ct(h, this.chartSizes.chartHeight), p = d[d.length - 1], z = p.left + p.width + mt;
162
+ const d = ct(l, this.chartSizes.chartHeight), p = d[d.length - 1], E = p.left + p.width + mt;
163
163
  this.legend = {
164
- width: z,
164
+ width: E,
165
165
  height: n,
166
166
  items: d
167
167
  };
168
168
  }
169
169
  updateCaptionsSize(s, e, t, r) {
170
- const o = new dt("bold 16px Manrope"), { xGroupKeys: n, yGroupKeys: h, xGroupLabels: u, yGroupLabels: f, xKeysByGroups: d, yKeysByGroups: p, xLabels: z, yLabels: c } = s.meta;
170
+ const o = new dt("bold 16px Manrope"), { xGroupKeys: n, yGroupKeys: l, xGroupLabels: u, yGroupLabels: f, xKeysByGroups: d, yKeysByGroups: p, xLabels: E, yLabels: c } = s.meta;
171
171
  this.labelAngles = {
172
172
  xAxisLabels: e.axisLabelsAngle,
173
173
  yAxisLabels: t.axisLabelsAngle,
174
174
  xGroupLabels: e.groupLabelsAngle,
175
175
  yGroupLabels: t.groupLabelsAngle
176
176
  };
177
- const l = n.reduce((x, g) => Math.max(x, $(d[g], z, o)), 0), i = h.reduce((x, g) => Math.max(x, $(p[g], c, o)), 0), a = $(n, u, o), y = $(h, f, o), { xCaptionTail: S, yCaptionTail: v } = Ct(
177
+ const h = n.reduce((C, g) => Math.max(C, k(d[g], E, o)), 0), i = l.reduce((C, g) => Math.max(C, k(p[g], c, o)), 0), a = k(n, u, o), y = k(l, f, o), { xCaptionTail: x, yCaptionTail: T } = Ct(
178
178
  this.labelAngles,
179
179
  r,
180
180
  this.scales,
@@ -183,70 +183,70 @@ class Yt {
183
183
  o
184
184
  );
185
185
  this.captionsSizes = {
186
- xCaptionTail: S,
187
- yCaptionTail: v,
186
+ xCaptionTail: x,
187
+ yCaptionTail: T,
188
188
  xGroupCaptions: F(a, this.labelAngles.xGroupLabels),
189
189
  yGroupCaptions: F(y, this.labelAngles.yGroupLabels),
190
- xAxisCaptions: F(l, this.labelAngles.xAxisLabels),
190
+ xAxisCaptions: F(h, this.labelAngles.xAxisLabels),
191
191
  yAxisCaptions: F(i, this.labelAngles.yAxisLabels)
192
192
  };
193
193
  }
194
- updateChartDimensions(s, e, t, r, o, n, h, u, f, d) {
195
- const p = e.length, z = Math.min(o.nRows ?? p, p), c = Math.min(o.nCols ?? p, p);
196
- this.columnsCount = o.nRows ? Math.ceil(p / z) : c, this.rowsCount = Math.ceil(p / this.columnsCount);
197
- const { sharedX: l, sharedY: i } = o;
194
+ updateChartDimensions(s, e, t, r, o, n, l, u, f, d) {
195
+ const p = e.length, E = Math.min(o.nRows ?? p, p), c = Math.min(o.nCols ?? p, p);
196
+ this.columnsCount = o.nRows ? Math.ceil(p / E) : c, this.rowsCount = Math.ceil(p / this.columnsCount);
197
+ const { sharedX: h, sharedY: i } = o;
198
198
  this.chartsDimensions = {};
199
199
  let a = 0, y = 0;
200
- e.forEach((x, g) => {
201
- const b = g % this.columnsCount + 1, C = ut(g, e.length, this.columnsCount, this.rowsCount), E = this.step.x[x], M = this.step.y[x], N = yt(
200
+ e.forEach((C, g) => {
201
+ const b = g % this.columnsCount + 1, S = ut(g, e.length, this.columnsCount, this.rowsCount), G = this.step.x[C], M = this.step.y[C], w = ft(
202
202
  n,
203
- h,
203
+ l,
204
204
  this.captionsSizes,
205
205
  u,
206
206
  f,
207
207
  d,
208
- C,
209
- l,
208
+ S,
209
+ h,
210
210
  i,
211
211
  e,
212
212
  t,
213
213
  r,
214
- E,
214
+ G,
215
215
  M
216
- ), w = St(u, C, l, i);
217
- function K(D) {
216
+ ), H = xt(u, S, h, i);
217
+ function v(B) {
218
218
  return Math.max(
219
- gt[D].reduce((_, I) => _ + N[D][I], 0),
220
- w[D],
219
+ gt[B].reduce((O, $) => O + w[B][$], 0),
220
+ H[B],
221
221
  s.innerOffset
222
222
  );
223
223
  }
224
224
  const L = {
225
- left: K("left"),
226
- right: K("right"),
227
- top: K("top"),
228
- bottom: K("bottom")
225
+ left: v("left"),
226
+ right: v("right"),
227
+ top: v("top"),
228
+ bottom: v("bottom")
229
229
  };
230
230
  L.left < this.captionsSizes.xCaptionTail && (L.left = this.captionsSizes.xCaptionTail), L.bottom < this.captionsSizes.yCaptionTail && (L.bottom = this.captionsSizes.yCaptionTail);
231
- const k = ft(N, this.chartSizes.chartWidth, this.chartSizes.chartHeight), W = this.chartSizes.chartWidth + L.left + L.right, R = this.chartSizes.chartHeight + L.top + L.bottom;
232
- this.chartsDimensions[x] = {
231
+ const D = yt(w, this.chartSizes.chartWidth, this.chartSizes.chartHeight), R = this.chartSizes.chartWidth + L.left + L.right, _ = this.chartSizes.chartHeight + L.top + L.bottom;
232
+ this.chartsDimensions[C] = {
233
233
  left: a,
234
234
  top: y,
235
235
  inner: { width: this.chartSizes.chartWidth, height: this.chartSizes.chartHeight },
236
- outer: { width: W, height: R },
236
+ outer: { width: R, height: _ },
237
237
  padding: L,
238
- sideElementBBoxes: k,
239
- chartEdgeSides: C
240
- }, a += W, b === this.columnsCount && (a = 0, y += R);
238
+ sideElementBBoxes: D,
239
+ chartEdgeSides: S
240
+ }, a += R, b === this.columnsCount && (a = 0, y += _);
241
241
  });
242
- const S = e.slice(0, this.columnsCount).reduce((x, g) => x + this.chartsDimensions[g].outer.width, 0), v = e.filter((x, g) => g % this.columnsCount === 0).reduce((x, g) => x + this.chartsDimensions[g].outer.height, 0);
243
- this.chartSizes.chartsWidth = S, this.chartSizes.chartsHeight = v;
242
+ const x = e.slice(0, this.columnsCount).reduce((C, g) => C + this.chartsDimensions[g].outer.width, 0), T = e.filter((C, g) => g % this.columnsCount === 0).reduce((C, g) => C + this.chartsDimensions[g].outer.height, 0);
243
+ this.chartSizes.chartsWidth = x, this.chartSizes.chartsHeight = T;
244
244
  }
245
245
  updateChartsSizes(s, e, t, r) {
246
- const { width: o, height: n, cellWidth: h, cellHeight: u } = s, f = t.meta.facetKeys[0];
247
- if (h && e.sharedX && f) {
246
+ const { width: o, height: n, cellWidth: l, cellHeight: u } = s, f = t.meta.facetKeys[0];
247
+ if (l && e.sharedX && f) {
248
248
  const d = t.facets[f].xKeys.length, p = t.meta.xGroupKeys.length;
249
- this.chartSizes.chartWidth = d * h + r * (p - 1);
249
+ this.chartSizes.chartWidth = d * l + r * (p - 1);
250
250
  } else
251
251
  this.chartSizes.chartWidth = o;
252
252
  if (u && e.sharedY && f) {
@@ -256,42 +256,42 @@ class Yt {
256
256
  this.chartSizes.chartHeight = n;
257
257
  }
258
258
  // update scales for cell positions, x and y for each facet
259
- updateScales(s, e, t, r, o, n, h, u, f, d) {
260
- const { width: p, height: z, cellWidth: c, cellHeight: l } = o, { meta: i, facets: a } = e, { sharedX: y, sharedY: S } = r, v = (g, b = {}) => g.sort(
261
- (C, E) => n.sorting === "asc" ? (b[C] ?? C).localeCompare(b[E] ?? E, "en", { numeric: !0 }) : (b[E] ?? E).localeCompare(b[C] ?? C, "en", { numeric: !0 })
262
- ), x = (g, b = {}) => g.sort(
263
- (C, E) => h.sorting === "asc" ? (b[C] ?? C).localeCompare(b[E] ?? E, "en", { numeric: !0 }) : (b[E] ?? E).localeCompare(b[C] ?? C, "en", { numeric: !0 })
259
+ updateScales(s, e, t, r, o, n, l, u, f, d) {
260
+ const { width: p, height: E, cellWidth: c, cellHeight: h } = o, { meta: i, facets: a } = e, { sharedX: y, sharedY: x } = r, T = (g, b = {}) => g.sort(
261
+ (S, G) => n.sorting === "asc" ? (b[S] ?? S).localeCompare(b[G] ?? G, "en", { numeric: !0 }) : (b[G] ?? G).localeCompare(b[S] ?? S, "en", { numeric: !0 })
262
+ ), C = (g, b = {}) => g.sort(
263
+ (S, G) => l.sorting === "asc" ? (b[S] ?? S).localeCompare(b[G] ?? G, "en", { numeric: !0 }) : (b[G] ?? G).localeCompare(b[S] ?? S, "en", { numeric: !0 })
264
264
  );
265
265
  s.forEach((g) => {
266
- const b = a[g], C = d.xGroup ? i.xGroupKeys : v(i.xGroupKeys), E = d.yGroup ? i.yGroupKeys : x(i.yGroupKeys), { xKeysByGroups: M } = y ? i : b, { yKeysByGroups: N } = S ? i : b, w = C.map((G) => M[G].length), K = E.map((G) => N[G].length), L = w.reduce((G, T) => G + T, 0), k = K.reduce((G, T) => G + T, 0), W = y && c ? c : (p - (w.filter((G) => G > 0).length - 1) * t) / L, R = S && l ? l : (z - (K.filter((G) => G > 0).length - 1) * t) / k, D = [], _ = [];
267
- let I = 0;
268
- C.forEach((G) => {
269
- const T = u || d.x ? M[G] : v(M[G], i.xLabels);
270
- _.push(...T), T.forEach(() => {
271
- D.push(I), I += W;
272
- }), T.length > 0 && (I += t);
266
+ const b = a[g], S = d.xGroup ? i.xGroupKeys : T(i.xGroupKeys), G = d.yGroup ? i.yGroupKeys : C(i.yGroupKeys), { xKeysByGroups: M } = y ? i : b, { yKeysByGroups: w } = x ? i : b, H = S.map((z) => M[z].length), v = G.map((z) => w[z].length), L = H.reduce((z, K) => z + K, 0), D = v.reduce((z, K) => z + K, 0), R = y && c ? c : (p - (H.filter((z) => z > 0).length - 1) * t) / L, _ = x && h ? h : (E - (v.filter((z) => z > 0).length - 1) * t) / D, B = [], O = [];
267
+ let $ = 0;
268
+ S.forEach((z) => {
269
+ const K = u || d.x ? M[z] : T(M[z], i.xLabels);
270
+ O.push(...K), K.forEach(() => {
271
+ B.push($), $ += R;
272
+ }), K.length > 0 && ($ += t);
273
273
  });
274
274
  const U = [], q = [];
275
275
  let P = 0;
276
- E.forEach((G) => {
277
- const T = f || d.y ? N[G] : x(N[G], i.yLabels);
278
- q.push(...T), T.forEach(() => {
279
- U.push(P), P += R;
280
- }), T.length > 0 && (P += t);
281
- }), this.scales.x[g] = B().domain(_).range(D), this.scales.y[g] = B().domain(q).range(U), this.step.x[g] = W, this.step.y[g] = R;
276
+ G.forEach((z) => {
277
+ const K = f || d.y ? w[z] : C(w[z], i.yLabels);
278
+ q.push(...K), K.forEach(() => {
279
+ U.push(P), P += _;
280
+ }), K.length > 0 && (P += t);
281
+ }), this.scales.x[g] = W().domain(O).range(B), this.scales.y[g] = W().domain(q).range(U), this.step.x[g] = R, this.step.y[g] = _;
282
282
  });
283
283
  }
284
- updateAesScale(s, e, t, r, o, n, h) {
284
+ updateAesScale(s, e, t, r, o, n, l) {
285
285
  if (s === "continuous")
286
- t.valueColors ? this.colorScale = H().domain(t.valuesByColors ?? it(h, t.valueColors.length, e)).range(t.valueColors) : t.colorsList && (this.colorScale = H().domain(it(h, t.colorsList.length, e)).range(t.colorsList));
286
+ t.valueColors ? this.colorScale = N().domain(t.valuesByColors ?? it(l, t.valueColors.length, e)).range(t.valueColors) : t.colorsList && (this.colorScale = N().domain(it(l, t.colorsList.length, e)).range(t.colorsList));
287
287
  else if (t.colorsMap) {
288
288
  const d = Object.entries(t.colorsMap);
289
- this.colorScale = B().domain(d.map((p) => p[0])).range(d.map((p) => p[1])).unknown("#ccc");
289
+ this.colorScale = W().domain(d.map((p) => p[0])).range(d.map((p) => p[1])).unknown("#ccc");
290
290
  } else t.colorsList && (this.colorScale = Z(t.colorsList, n.map(String)));
291
291
  const { xDataByKeys: u, yDataByKeys: f } = o.meta;
292
292
  r.forEach((d) => {
293
- const { colors: p, type: z, axis: c, valueColumn: l } = d, i = (c === "x" ? u : f)[l.value];
294
- if (z === "discrete") {
293
+ const { colors: p, type: E, axis: c, valueColumn: h } = d, i = (c === "x" ? u : f)[h.value];
294
+ if (E === "discrete") {
295
295
  const a = ot.uniq(Object.values(i).map(String)).sort();
296
296
  this.annotationColorScales[d.id] = {
297
297
  type: "discrete",
@@ -301,45 +301,45 @@ class Yt {
301
301
  const a = Object.values(i).map(Number);
302
302
  if (!a.length)
303
303
  return;
304
- const [y = a[0], S = a[0]] = bt(a);
304
+ const [y = a[0], x = a[0]] = bt(a);
305
305
  this.annotationColorScales[d.id] = {
306
306
  type: "continuous",
307
- scale: xt(p, y, S, 0, 0.5, 1)
307
+ scale: St(p, y, x, 0, 0.5, 1)
308
308
  };
309
309
  }
310
310
  });
311
311
  }
312
- updateDendrogram(s, e, t, r, o, n, h) {
312
+ updateDendrogram(s, e, t, r, o, n, l) {
313
313
  s.forEach((u) => {
314
- this.dendrograms[u] = { x: { treesByGroupKey: {}, data: n }, y: { treesByGroupKey: {}, data: h } };
315
- const { xKeysByGroups: f, yKeysByGroups: d } = r[u], { hierarchyByGroupX: p, hierarchyByGroupY: z } = o[u];
314
+ this.dendrograms[u] = { x: { treesByGroupKey: {}, data: n }, y: { treesByGroupKey: {}, data: l } };
315
+ const { xKeysByGroups: f, yKeysByGroups: d } = r[u], { hierarchyByGroupX: p, hierarchyByGroupY: E } = o[u];
316
316
  if (n) {
317
- const c = e.reduce((l, i) => {
317
+ const c = e.reduce((h, i) => {
318
318
  var a;
319
- return Math.max(l, (a = p[i]) == null ? void 0 : a.data.height);
319
+ return Math.max(h, (a = p[i]) == null ? void 0 : a.data.height);
320
320
  }, 0);
321
- this.dendrograms[u].x.treesByGroupKey = e.reduce((l, i) => {
321
+ this.dendrograms[u].x.treesByGroupKey = e.reduce((h, i) => {
322
322
  const a = p[i], y = f[i];
323
323
  tt().separation(() => 1).size([y.length * this.step.x[u], n.size])(
324
324
  a
325
325
  );
326
- const S = a, v = H().domain(n.position === "top" ? [0, c] : [c, 0]).range([n.size, 0]);
327
- return et(S, v, "y"), st(S, this.scales.x[u](y[0]), "x"), l[i] = S, l;
326
+ const x = a, T = N().domain(n.position === "top" ? [0, c] : [c, 0]).range([n.size, 0]);
327
+ return et(x, T, "y"), st(x, this.scales.x[u](y[0]), "x"), h[i] = x, h;
328
328
  }, {}), this.dendrograms[u].x.data = n;
329
329
  }
330
- if (h) {
331
- const c = t.reduce((l, i) => {
330
+ if (l) {
331
+ const c = t.reduce((h, i) => {
332
332
  var a;
333
- return Math.max(l, (a = z[i]) == null ? void 0 : a.data.height);
333
+ return Math.max(h, (a = E[i]) == null ? void 0 : a.data.height);
334
334
  }, 0);
335
- this.dendrograms[u].y.treesByGroupKey = t.reduce((l, i) => {
336
- const a = z[i], y = d[i];
337
- tt().separation(() => 1).size([y.length * this.step.y[u], h.size])(
335
+ this.dendrograms[u].y.treesByGroupKey = t.reduce((h, i) => {
336
+ const a = E[i], y = d[i];
337
+ tt().separation(() => 1).size([y.length * this.step.y[u], l.size])(
338
338
  a
339
339
  );
340
- const S = a, v = H().domain(h.position === "left" ? [0, c] : [c, 0]).range([h.size, 0]);
341
- return st(S, this.scales.y[u](y[0]), "x", "y"), et(S, v, "x"), l[i] = S, l;
342
- }, {}), this.dendrograms[u].y.data = h;
340
+ const x = a, T = N().domain(l.position === "left" ? [0, c] : [c, 0]).range([l.size, 0]);
341
+ return st(x, this.scales.y[u](y[0]), "x", "y"), et(x, T, "x"), h[i] = x, h;
342
+ }, {}), this.dendrograms[u].y.data = l;
343
343
  }
344
344
  });
345
345
  }
@@ -349,37 +349,37 @@ class Yt {
349
349
  const e = Object.keys(s);
350
350
  this.dendrogramAesScales = e.reduce((t, r) => {
351
351
  const o = s[r], n = Object.keys(o);
352
- return t[r] = B().domain(n).range(
353
- n.map((h) => ({
352
+ return t[r] = W().domain(n).range(
353
+ n.map((l) => ({
354
354
  ...Q,
355
- ...o[h]
355
+ ...o[l]
356
356
  }))
357
357
  ).unknown(Q), t;
358
358
  }, {});
359
359
  }
360
- render(s, e, t, r, o, n, h, u, f, d, p, z, c, l, i, a) {
361
- var y;
362
- const { meta: S, facets: v } = n, { facetKeys: x, xGroupKeys: g, yGroupKeys: b, valueExtent: C } = S, { xAxis: E, yAxis: M, title: N, size: w, valueType: K } = t;
363
- this.updateChartsSizes(w, r, n, o.groupGap), this.updateAesScale(K, C, o, h, n, c, l), this.updateScales(x, n, o.groupGap, r, w, t.xAxis, t.yAxis, f, d, a), this.updateCaptionsSize(n, E, M, r), this.updateChartDimensions(
364
- w,
365
- x,
360
+ render(s, e, t, r, o, n, l, u, f, d, p, E, c, h, i, a, y) {
361
+ var x;
362
+ const { meta: T, facets: C } = n, { facetKeys: g, xGroupKeys: b, yGroupKeys: S, valueExtent: G } = T, { xAxis: M, yAxis: w, title: H, size: v, valueType: L } = t;
363
+ this.updateChartsSizes(v, r, n, o.groupGap), this.updateAesScale(L, G, o, l, n, c, h), this.updateScales(g, n, o.groupGap, r, v, t.xAxis, t.yAxis, f, d, a), this.updateCaptionsSize(n, M, w, r), this.updateChartDimensions(
364
+ v,
366
365
  g,
367
366
  b,
367
+ S,
368
368
  r,
369
- E,
370
369
  M,
371
- h,
370
+ w,
371
+ l,
372
372
  f,
373
373
  d
374
- ), this.updateLegendSize(K, t.legend, h, u, C), this.updateMargins(N, w), this.updateDendrogram(x, g, b, v, p, f, d), this.updateDendrogramAesScales(z);
375
- const L = /* @__PURE__ */ j.jsx(nt, { dataFrame: s, children: /* @__PURE__ */ j.jsx(
374
+ ), this.updateLegendSize(L, t.legend, l, u, G), this.updateMargins(H, v), this.updateDendrogram(g, b, S, C, p, f, d), this.updateDendrogramAesScales(E);
375
+ const D = /* @__PURE__ */ I.jsx(nt, { dataFrame: s, children: /* @__PURE__ */ I.jsx(
376
376
  pt,
377
377
  {
378
378
  aes: o,
379
- annotations: h,
379
+ annotations: l,
380
380
  annotationColorScales: this.annotationColorScales,
381
381
  captionsSizes: this.captionsSizes,
382
- cellsMeta: S,
382
+ cellsMeta: T,
383
383
  columnsCount: this.columnsCount,
384
384
  chartsDimensions: this.chartsDimensions,
385
385
  chartSettings: t,
@@ -387,25 +387,26 @@ class Yt {
387
387
  colorScale: this.colorScale,
388
388
  dendrogramAesScales: this.dendrogramAesScales,
389
389
  dendrograms: this.dendrograms,
390
- facetKeys: x,
390
+ facetKeys: g,
391
391
  facetSettings: r,
392
- groupedCells: v,
392
+ groupedCells: C,
393
393
  labelAngles: this.labelAngles,
394
394
  legend: this.legend,
395
395
  margins: this.margins,
396
396
  scales: this.scales,
397
397
  settingsId: e,
398
398
  step: this.step,
399
- xGroupKeys: g,
400
- yGroupKeys: b,
401
- onTooltipHintSwitch: i
399
+ xGroupKeys: b,
400
+ yGroupKeys: S,
401
+ onTooltipHintSwitch: i,
402
+ cellsRenderingMode: y
402
403
  }
403
404
  ) });
404
- this.component = L, (y = this.reactRoot) == null || y.render(L);
405
+ this.component = D, (x = this.reactRoot) == null || x.render(D);
405
406
  }
406
407
  renderError(s) {
407
408
  var e;
408
- (e = this.reactRoot) == null || e.render(/* @__PURE__ */ j.jsx(rt, { message: s }));
409
+ (e = this.reactRoot) == null || e.render(/* @__PURE__ */ I.jsx(rt, { message: s }));
409
410
  }
410
411
  }
411
412
  export {