@milaboratories/miplots4 1.0.161 → 1.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.js +2 -5
- package/dist/_virtual/index10.js.map +1 -1
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +4 -4
- package/dist/_virtual/index7.js +1 -1
- package/dist/_virtual/index8.js +4 -4
- package/dist/_virtual/index9.js +3 -3
- package/dist/discrete/layers/stats/pValueCalculation.js +5 -5
- package/dist/heatmap/components/Captions/AxisCaptions.js +34 -34
- package/dist/heatmap/components/Captions/AxisCaptions.js.map +1 -1
- package/dist/heatmap/utils/calculateChartSideElementSizes.js +23 -23
- package/dist/heatmap/utils/calculateChartSideElementSizes.js.map +1 -1
- package/dist/node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index10.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { __require as o } from "../node_modules/.pnpm/@stdlib_stats-wilcoxon@0.2.2/node_modules/@stdlib/stats-wilcoxon/lib/index.js";
|
|
3
|
-
var t = o();
|
|
4
|
-
const a = /* @__PURE__ */ r(t);
|
|
1
|
+
var e = { exports: {} };
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
e as __module
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=index10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index10.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index10.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../node_modules/.pnpm/@stdlib_stats-anova1@0.2.2/node_modules/@stdlib/stats-anova1/lib/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const i = /* @__PURE__ */ r(t);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
i as default
|
|
4
7
|
};
|
|
5
8
|
//# sourceMappingURL=index5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as t } from "../node_modules/.pnpm/@stdlib_stats-ttest@0.2.2/node_modules/@stdlib/stats-ttest/lib/index.js";
|
|
3
|
+
var e = t();
|
|
4
|
+
const s = /* @__PURE__ */ r(e);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index6.js.map
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as t } from "../node_modules/.pnpm/@stdlib_stats-
|
|
2
|
+
import { __require as t } from "../node_modules/.pnpm/@stdlib_stats-ttest2@0.2.2/node_modules/@stdlib/stats-ttest2/lib/index.js";
|
|
3
3
|
var e = t();
|
|
4
4
|
const s = /* @__PURE__ */ r(e);
|
|
5
5
|
export {
|
package/dist/_virtual/index8.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../node_modules/.pnpm/@stdlib_stats-kruskal-test@0.2.2/node_modules/@stdlib/stats-kruskal-test/lib/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const i = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index8.js.map
|
package/dist/_virtual/index9.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../node_modules/.pnpm/@stdlib_stats-
|
|
2
|
+
import { __require as o } from "../node_modules/.pnpm/@stdlib_stats-wilcoxon@0.2.2/node_modules/@stdlib/stats-wilcoxon/lib/index.js";
|
|
3
3
|
var t = o();
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index9.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import l from "../../../_virtual/
|
|
2
|
-
import s from "../../../_virtual/
|
|
3
|
-
import f from "../../../_virtual/
|
|
4
|
-
import m from "../../../_virtual/
|
|
5
|
-
import h from "../../../_virtual/
|
|
1
|
+
import l from "../../../_virtual/index5.js";
|
|
2
|
+
import s from "../../../_virtual/index6.js";
|
|
3
|
+
import f from "../../../_virtual/index7.js";
|
|
4
|
+
import m from "../../../_virtual/index8.js";
|
|
5
|
+
import h from "../../../_virtual/index9.js";
|
|
6
6
|
import { MannWhitneyU as c } from "./MannWhitneyU.js";
|
|
7
7
|
import n from "../../../_virtual/lodash.js";
|
|
8
8
|
function u(t, a, r) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { BLACK as
|
|
3
|
-
import { DEFAULT_TICKS_SIZE as
|
|
2
|
+
import { BLACK as c } from "../../../constants.js";
|
|
3
|
+
import { DEFAULT_TICKS_SIZE as L, TICK_OFFSET as y } from "../../constants.js";
|
|
4
4
|
function D({
|
|
5
5
|
sideElementBBoxes: i,
|
|
6
|
-
debug:
|
|
7
|
-
xKeys:
|
|
6
|
+
debug: j,
|
|
7
|
+
xKeys: A,
|
|
8
8
|
yKeys: S,
|
|
9
|
-
scales:
|
|
10
|
-
xAxis:
|
|
11
|
-
yAxis:
|
|
9
|
+
scales: T,
|
|
10
|
+
xAxis: p,
|
|
11
|
+
yAxis: h,
|
|
12
12
|
stepX: u,
|
|
13
13
|
stepY: z,
|
|
14
|
-
labelAngles:
|
|
14
|
+
labelAngles: l,
|
|
15
15
|
xLabels: C,
|
|
16
16
|
yLabels: X
|
|
17
17
|
}) {
|
|
18
|
-
const V =
|
|
18
|
+
const V = p.showTicks ? L : 0, k = h.showTicks ? L : 0, Y = i.top.axis.isVisible || i.bottom.axis.isVisible, r = i.top.axisTitle.isVisible ? i.top.axisTitle : i.bottom.axisTitle, e = i.top.axis.isVisible ? i.top.axis : i.bottom.axis, F = i.left.axis.isVisible || i.right.axis.isVisible, n = i.left.axisTitle.isVisible ? i.left.axisTitle : i.right.axisTitle, x = i.left.axis.isVisible ? i.left.axis : i.right.axis;
|
|
19
19
|
return /* @__PURE__ */ t.jsxs("g", { children: [
|
|
20
20
|
/* @__PURE__ */ t.jsxs("g", { children: [
|
|
21
21
|
r.isVisible && /* @__PURE__ */ t.jsxs("g", { transform: `translate(${r.x},${r.y})`, children: [
|
|
@@ -26,38 +26,38 @@ function D({
|
|
|
26
26
|
y: r.height / 2,
|
|
27
27
|
textAnchor: "middle",
|
|
28
28
|
dominantBaseline: "central",
|
|
29
|
-
children:
|
|
29
|
+
children: p.title
|
|
30
30
|
}
|
|
31
31
|
),
|
|
32
|
-
|
|
32
|
+
j && /* @__PURE__ */ t.jsx(
|
|
33
33
|
"rect",
|
|
34
34
|
{
|
|
35
35
|
width: r.width,
|
|
36
36
|
height: r.height,
|
|
37
|
-
stroke:
|
|
37
|
+
stroke: c,
|
|
38
38
|
fill: "none"
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
] }),
|
|
42
|
-
Y && /* @__PURE__ */ t.jsxs("g", { fontSize: "14px", transform: `translate(${
|
|
43
|
-
|
|
44
|
-
const
|
|
42
|
+
Y && /* @__PURE__ */ t.jsxs("g", { fontSize: "14px", transform: `translate(${e.x},${e.y})`, children: [
|
|
43
|
+
A.map((a) => {
|
|
44
|
+
const b = l.xAxisLabels !== 0, s = p.position === "bottom", f = s ? 0 : e.height, d = s ? f + V : f - V, w = s ? d + y : d - y, o = T.x(a) + u / 2, g = -l.xAxisLabels, $ = b ? s ? "end" : "start" : "middle";
|
|
45
45
|
return /* @__PURE__ */ t.jsxs("g", { children: [
|
|
46
|
-
/* @__PURE__ */ t.jsx("line", { x1: o, x2: o, y1:
|
|
47
|
-
/* @__PURE__ */ t.jsx(
|
|
46
|
+
/* @__PURE__ */ t.jsx("line", { x1: o, x2: o, y1: f, y2: d, stroke: c }),
|
|
47
|
+
p.showAxisLabels && /* @__PURE__ */ t.jsx(
|
|
48
48
|
"text",
|
|
49
49
|
{
|
|
50
50
|
x: o,
|
|
51
|
-
y,
|
|
51
|
+
y: w,
|
|
52
52
|
textAnchor: $,
|
|
53
|
-
transform: `rotate(${
|
|
54
|
-
dominantBaseline:
|
|
55
|
-
children: C[
|
|
53
|
+
transform: `rotate(${g},${o},${w})`,
|
|
54
|
+
dominantBaseline: b ? "central" : s ? "hanging" : "auto",
|
|
55
|
+
children: C[a]
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
|
-
] },
|
|
58
|
+
] }, a);
|
|
59
59
|
}),
|
|
60
|
-
|
|
60
|
+
j && /* @__PURE__ */ t.jsx("rect", { width: e.width, height: e.height, stroke: c, fill: "none" })
|
|
61
61
|
] })
|
|
62
62
|
] }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("g", { children: [
|
|
@@ -70,40 +70,40 @@ function D({
|
|
|
70
70
|
children: /* @__PURE__ */ t.jsx(
|
|
71
71
|
"text",
|
|
72
72
|
{
|
|
73
|
-
transform: `rotate(${
|
|
73
|
+
transform: `rotate(${h.position === "left" ? -90 : 90})`,
|
|
74
74
|
dominantBaseline: "central",
|
|
75
75
|
textAnchor: "middle",
|
|
76
|
-
children:
|
|
76
|
+
children: h.title
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
|
-
|
|
81
|
+
j && /* @__PURE__ */ t.jsx(
|
|
82
82
|
"rect",
|
|
83
83
|
{
|
|
84
84
|
x: n.x,
|
|
85
85
|
y: n.y,
|
|
86
86
|
width: n.width,
|
|
87
87
|
height: n.height,
|
|
88
|
-
stroke:
|
|
88
|
+
stroke: c,
|
|
89
89
|
fill: "none"
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
F && /* @__PURE__ */ t.jsx("g", { fontSize: "14px", transform: `translate(${x.x},${x.y})`, children: S.map((
|
|
93
|
-
const
|
|
92
|
+
F && /* @__PURE__ */ t.jsx("g", { fontSize: "14px", transform: `translate(${x.x},${x.y})`, children: S.map((a) => {
|
|
93
|
+
const b = l.yAxisLabels !== 0, s = h.position === "left", f = -(90 - l.yAxisLabels), d = l.yAxisLabels === 0 ? "middle" : s ? "end" : "start", w = b ? "central" : s ? "auto" : "hanging", o = s ? x.width : 0, g = s ? o - k : o + k, $ = s ? g - y : g + y, m = T.y(a) + z / 2;
|
|
94
94
|
return /* @__PURE__ */ t.jsxs("g", { children: [
|
|
95
|
-
/* @__PURE__ */ t.jsx("line", { x1: o, x2:
|
|
96
|
-
/* @__PURE__ */ t.jsx("text", { x: $, y:
|
|
97
|
-
] },
|
|
95
|
+
/* @__PURE__ */ t.jsx("line", { x1: o, x2: g, y1: m, y2: m, stroke: c }),
|
|
96
|
+
h.showAxisLabels && /* @__PURE__ */ t.jsx("text", { x: $, y: m, textAnchor: d, transform: `rotate(${f},${$},${m})`, dominantBaseline: w, children: X[a] })
|
|
97
|
+
] }, a);
|
|
98
98
|
}) }),
|
|
99
|
-
|
|
99
|
+
j && /* @__PURE__ */ t.jsx(
|
|
100
100
|
"rect",
|
|
101
101
|
{
|
|
102
102
|
x: x.x,
|
|
103
103
|
y: x.y,
|
|
104
104
|
height: x.height,
|
|
105
105
|
width: x.width,
|
|
106
|
-
stroke:
|
|
106
|
+
stroke: c,
|
|
107
107
|
fill: "none"
|
|
108
108
|
}
|
|
109
109
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AxisCaptions.js","sources":["../../../../src/heatmap/components/Captions/AxisCaptions.tsx"],"sourcesContent":["import {BLACK} from '../../../constants';\nimport type {ChartScales, ChartSideElementsBBoxes, LabelAngles} from '../types';\nimport {DEFAULT_TICKS_SIZE, TICK_OFFSET} from '../../constants';\nimport type {HeatmapSettingsImpl} from '../../HeatmapSettingsImpl';\nimport React from 'react';\n\ninterface AxisCaptionsProps {\n sideElementBBoxes: ChartSideElementsBBoxes;\n debug: boolean;\n xKeys: string[];\n yKeys: string[];\n scales: ChartScales;\n xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'];\n yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'];\n stepX: number;\n stepY: number;\n labelAngles: LabelAngles;\n xLabels: Record<string, string>;\n yLabels: Record<string, string>;\n}\nexport function AxisCaptions({\n sideElementBBoxes,\n debug,\n xKeys,\n yKeys,\n scales,\n xAxis,\n yAxis,\n stepX,\n stepY,\n labelAngles,\n xLabels,\n yLabels\n}: AxisCaptionsProps) {\n const tickSizeX = xAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const tickSizeY = yAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n\n const xAxisVisible = sideElementBBoxes.top.axis.isVisible || sideElementBBoxes.bottom.axis.isVisible;\n const xAxisTitleBBox = sideElementBBoxes.top.axisTitle.isVisible\n ? sideElementBBoxes.top.axisTitle\n : sideElementBBoxes.bottom.axisTitle;\n const xAxisBBox = sideElementBBoxes.top.axis.isVisible ? sideElementBBoxes.top.axis : sideElementBBoxes.bottom.axis;\n\n const yAxisVisible = sideElementBBoxes.left.axis.isVisible || sideElementBBoxes.right.axis.isVisible;\n const yAxisTitleBBox = sideElementBBoxes.left.axisTitle.isVisible\n ? sideElementBBoxes.left.axisTitle\n : sideElementBBoxes.right.axisTitle;\n const yAxisBBox = sideElementBBoxes.left.axis.isVisible\n ? sideElementBBoxes.left.axis\n : sideElementBBoxes.right.axis;\n return (\n <g>\n {/* x-axis title, ticks and captions */}\n <g>\n {xAxisTitleBBox.isVisible && (\n <g transform={`translate(${xAxisTitleBBox.x},${xAxisTitleBBox.y})`}>\n <text\n x={xAxisTitleBBox.width / 2}\n y={xAxisTitleBBox.height / 2}\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n >\n {xAxis.title}\n </text>\n {debug && (\n <rect\n width={xAxisTitleBBox.width}\n height={xAxisTitleBBox.height}\n stroke={BLACK}\n fill=\"none\"\n />\n )}\n </g>\n )}\n {xAxisVisible && (\n <g fontSize=\"14px\" transform={`translate(${xAxisBBox.x},${xAxisBBox.y})`}>\n {xKeys.map(key => {\n const inclined = labelAngles.xAxisLabels !== 0;\n const onBottom = xAxis.position === 'bottom';\n const tickY1 = onBottom ? 0 : xAxisBBox.height;\n const tickY2 = onBottom ? tickY1 + tickSizeX : tickY1 - tickSizeX;\n const textY = onBottom ? tickY2 + TICK_OFFSET : tickY2 - TICK_OFFSET;\n const x = scales.x(key) + stepX / 2;\n const angle = -labelAngles.xAxisLabels;\n const textAnchor = !inclined ? 'middle' : onBottom ? 'end' : 'start';\n return (\n <g key={key}>\n <line x1={x} x2={x} y1={tickY1} y2={tickY2} stroke={BLACK} />\n <text\n x={x}\n y={textY}\n textAnchor={textAnchor}\n transform={`rotate(${angle},${x},${textY})`}\n dominantBaseline={inclined ? 'central' : onBottom ? 'hanging' :'auto'}\n >\n {xLabels[key]}\n </text>\n </g>\n );\n })}\n {debug && <rect width={xAxisBBox.width} height={xAxisBBox.height} stroke={BLACK} fill=\"none\" />}\n </g>\n )}\n </g>\n {/* y-axis title, ticks and captions */}\n <g>\n {yAxisTitleBBox.isVisible && (\n <g\n transform={`translate(\n ${yAxisTitleBBox.x + yAxisTitleBBox.width / 2},\n ${yAxisTitleBBox.y + yAxisTitleBBox.height / 2})`}\n >\n <text\n transform={`rotate(${yAxis.position === 'left' ? -90 : 90})`}\n dominantBaseline=\"central\"\n textAnchor=\"middle\"\n >\n {yAxis.title}\n </text>\n </g>\n )}\n {debug && (\n <rect\n x={yAxisTitleBBox.x}\n y={yAxisTitleBBox.y}\n width={yAxisTitleBBox.width}\n height={yAxisTitleBBox.height}\n stroke={BLACK}\n fill=\"none\"\n />\n )}\n {yAxisVisible && (\n <g fontSize=\"14px\" transform={`translate(${yAxisBBox.x},${yAxisBBox.y})`}>\n {yKeys.map(key => {\n const inclined = labelAngles.yAxisLabels !== 0;\n const onLeft = yAxis.position === 'left';\n const angle = -(90 - labelAngles.yAxisLabels);\n const textAnchor = labelAngles.yAxisLabels === 0 ? 'middle' : onLeft ? 'end' : 'start';\n const dominantBaseline = inclined ? 'central' : onLeft ? 'auto' : 'hanging';\n const tickX1 = onLeft ? yAxisBBox.width : 0;\n const tickX2 = onLeft ? tickX1 - tickSizeY : tickX1 + tickSizeY;\n const textX = onLeft ? tickX2 - TICK_OFFSET : tickX2 + TICK_OFFSET;\n const y = scales.y(key) + stepY / 2;\n return (\n <g key={key}>\n <line x1={tickX1} x2={tickX2} y1={y} y2={y} stroke={BLACK} />\n <text x={textX} y={y} textAnchor={textAnchor} transform={`rotate(${angle},${textX},${y})`} dominantBaseline={dominantBaseline}>\n {yLabels[key]}\n </text>\n </g>\n );\n })}\n </g>\n )}\n {debug && (\n <rect\n x={yAxisBBox.x}\n y={yAxisBBox.y}\n height={yAxisBBox.height}\n width={yAxisBBox.width}\n stroke={BLACK}\n fill=\"none\"\n />\n )}\n </g>\n </g>\n );\n}\n"],"names":["AxisCaptions","sideElementBBoxes","debug","xKeys","yKeys","scales","xAxis","yAxis","stepX","stepY","labelAngles","xLabels","yLabels","tickSizeX","DEFAULT_TICKS_SIZE","tickSizeY","xAxisVisible","xAxisTitleBBox","xAxisBBox","yAxisVisible","yAxisTitleBBox","yAxisBBox","jsxs","jsx","BLACK","key","inclined","onBottom","tickY1","tickY2","textY","TICK_OFFSET","x","angle","textAnchor","onLeft","dominantBaseline","tickX1","tickX2","textX","y"],"mappings":";;;AAoBO,SAASA,EAAa;AAAA,EACzB,mBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AACJ,GAAsB;AAClB,QAAMC,IAAYP,EAAM,YAAYQ,IAAqB,GACnDC,IAAYR,EAAM,YAAYO,IAAqB,GAEnDE,IAAef,EAAkB,IAAI,KAAK,aAAaA,EAAkB,OAAO,KAAK,WACrFgB,IAAiBhB,EAAkB,IAAI,UAAU,YACjDA,EAAkB,IAAI,YACtBA,EAAkB,OAAO,WACzBiB,IAAYjB,EAAkB,IAAI,KAAK,YAAYA,EAAkB,IAAI,OAAOA,EAAkB,OAAO,MAEzGkB,IAAelB,EAAkB,KAAK,KAAK,aAAaA,EAAkB,MAAM,KAAK,WACrFmB,IAAiBnB,EAAkB,KAAK,UAAU,YAClDA,EAAkB,KAAK,YACvBA,EAAkB,MAAM,WACxBoB,IAAYpB,EAAkB,KAAK,KAAK,YACxCA,EAAkB,KAAK,OACvBA,EAAkB,MAAM;AAC9B,gCACK,KAAA,EAEG,UAAA;AAAA,IAAAqB,gBAAAA,OAAC,KAAA,EACI,UAAA;AAAA,MAAAL,EAAe,aACZK,gBAAAA,EAAAA,KAAC,KAAA,EAAE,WAAW,aAAaL,EAAe,CAAC,IAAIA,EAAe,CAAC,KAC3D,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AAQ,SACzEC,IAAmBV,IAAW,YAAYS,IAAS,SAAS,WAC5DE,IAASF,IAASd,EAAU,QAAQ,GACpCiB,IAASH,IAASE,IAAStB,IAAYsB,IAAStB,GAChDwB,IAAQJ,IAASG,IAASP,IAAcO,IAASP,GACjDS,IAAInC,EAAO,EAAEoB,CAAG,IAAIhB,IAAQ;AAClC,sCACK,KAAA,EACG,UAAA;AAAA,UAAAc,gBAAAA,EAAAA,IAAC,QAAA,EAAK,IAAIc,GAAQ,IAAIC,GAAQ,IAAIE,GAAG,IAAIA,GAAG,QAAQhB,EAAA,CAAO;AAAA,gCAC1D,QAAA,EAAK,GAAGe,GAAO,GAAAC,GAAM,YAAAN,GAAwB,WAAW,UAAUD,CAAK,IAAIM,CAAK,IAAIC,CAAC,KAAK,kBAAAJ,GACtF,UAAAxB,EAAQa,CAAG,EAAA,CAChB;AAAA,QAAA,EAAA,GAJIA,CAKR;AAAA,MAER,CAAC,EAAA,CACL;AAAA,MAEHvB,KACGqB,gBAAAA,EAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACG,GAAGF,EAAU;AAAA,UACb,GAAGA,EAAU;AAAA,UACb,QAAQA,EAAU;AAAA,UAClB,OAAOA,EAAU;AAAA,UACjB,QAAQG;AAAA,UACR,MAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IACT,EAAA,CAER;AAAA,EAAA,GACJ;AAER;"}
|
|
1
|
+
{"version":3,"file":"AxisCaptions.js","sources":["../../../../src/heatmap/components/Captions/AxisCaptions.tsx"],"sourcesContent":["import {BLACK} from '../../../constants';\nimport type {ChartScales, ChartSideElementsBBoxes, LabelAngles} from '../types';\nimport {DEFAULT_TICKS_SIZE, TICK_OFFSET} from '../../constants';\nimport type {HeatmapSettingsImpl} from '../../HeatmapSettingsImpl';\nimport React from 'react';\n\ninterface AxisCaptionsProps {\n sideElementBBoxes: ChartSideElementsBBoxes;\n debug: boolean;\n xKeys: string[];\n yKeys: string[];\n scales: ChartScales;\n xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'];\n yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'];\n stepX: number;\n stepY: number;\n labelAngles: LabelAngles;\n xLabels: Record<string, string>;\n yLabels: Record<string, string>;\n}\nexport function AxisCaptions({\n sideElementBBoxes,\n debug,\n xKeys,\n yKeys,\n scales,\n xAxis,\n yAxis,\n stepX,\n stepY,\n labelAngles,\n xLabels,\n yLabels\n}: AxisCaptionsProps) {\n const tickSizeX = xAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const tickSizeY = yAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n\n const xAxisVisible = sideElementBBoxes.top.axis.isVisible || sideElementBBoxes.bottom.axis.isVisible;\n const xAxisTitleBBox = sideElementBBoxes.top.axisTitle.isVisible\n ? sideElementBBoxes.top.axisTitle\n : sideElementBBoxes.bottom.axisTitle;\n const xAxisBBox = sideElementBBoxes.top.axis.isVisible ? sideElementBBoxes.top.axis : sideElementBBoxes.bottom.axis;\n\n const yAxisVisible = sideElementBBoxes.left.axis.isVisible || sideElementBBoxes.right.axis.isVisible;\n const yAxisTitleBBox = sideElementBBoxes.left.axisTitle.isVisible\n ? sideElementBBoxes.left.axisTitle\n : sideElementBBoxes.right.axisTitle;\n const yAxisBBox = sideElementBBoxes.left.axis.isVisible\n ? sideElementBBoxes.left.axis\n : sideElementBBoxes.right.axis;\n return (\n <g>\n {/* x-axis title, ticks and captions */}\n <g>\n {xAxisTitleBBox.isVisible && (\n <g transform={`translate(${xAxisTitleBBox.x},${xAxisTitleBBox.y})`}>\n <text\n x={xAxisTitleBBox.width / 2}\n y={xAxisTitleBBox.height / 2}\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n >\n {xAxis.title}\n </text>\n {debug && (\n <rect\n width={xAxisTitleBBox.width}\n height={xAxisTitleBBox.height}\n stroke={BLACK}\n fill=\"none\"\n />\n )}\n </g>\n )}\n {xAxisVisible && (\n <g fontSize=\"14px\" transform={`translate(${xAxisBBox.x},${xAxisBBox.y})`}>\n {xKeys.map(key => {\n const inclined = labelAngles.xAxisLabels !== 0;\n const onBottom = xAxis.position === 'bottom';\n const tickY1 = onBottom ? 0 : xAxisBBox.height;\n const tickY2 = onBottom ? tickY1 + tickSizeX : tickY1 - tickSizeX;\n const textY = onBottom ? tickY2 + TICK_OFFSET : tickY2 - TICK_OFFSET;\n const x = scales.x(key) + stepX / 2;\n const angle = -labelAngles.xAxisLabels;\n const textAnchor = !inclined ? 'middle' : onBottom ? 'end' : 'start';\n return (\n <g key={key}>\n <line x1={x} x2={x} y1={tickY1} y2={tickY2} stroke={BLACK} />\n {xAxis.showAxisLabels && (<text\n x={x}\n y={textY}\n textAnchor={textAnchor}\n transform={`rotate(${angle},${x},${textY})`}\n dominantBaseline={inclined ? 'central' : onBottom ? 'hanging' :'auto'}\n >\n {xLabels[key]}\n </text>)}\n </g>\n );\n })}\n {debug && <rect width={xAxisBBox.width} height={xAxisBBox.height} stroke={BLACK} fill=\"none\" />}\n </g>\n )}\n </g>\n {/* y-axis title, ticks and captions */}\n <g>\n {yAxisTitleBBox.isVisible && (\n <g\n transform={`translate(\n ${yAxisTitleBBox.x + yAxisTitleBBox.width / 2},\n ${yAxisTitleBBox.y + yAxisTitleBBox.height / 2})`}\n >\n <text\n transform={`rotate(${yAxis.position === 'left' ? -90 : 90})`}\n dominantBaseline=\"central\"\n textAnchor=\"middle\"\n >\n {yAxis.title}\n </text>\n </g>\n )}\n {debug && (\n <rect\n x={yAxisTitleBBox.x}\n y={yAxisTitleBBox.y}\n width={yAxisTitleBBox.width}\n height={yAxisTitleBBox.height}\n stroke={BLACK}\n fill=\"none\"\n />\n )}\n {yAxisVisible && (\n <g fontSize=\"14px\" transform={`translate(${yAxisBBox.x},${yAxisBBox.y})`}>\n {yKeys.map(key => {\n const inclined = labelAngles.yAxisLabels !== 0;\n const onLeft = yAxis.position === 'left';\n const angle = -(90 - labelAngles.yAxisLabels);\n const textAnchor = labelAngles.yAxisLabels === 0 ? 'middle' : onLeft ? 'end' : 'start';\n const dominantBaseline = inclined ? 'central' : onLeft ? 'auto' : 'hanging';\n const tickX1 = onLeft ? yAxisBBox.width : 0;\n const tickX2 = onLeft ? tickX1 - tickSizeY : tickX1 + tickSizeY;\n const textX = onLeft ? tickX2 - TICK_OFFSET : tickX2 + TICK_OFFSET;\n const y = scales.y(key) + stepY / 2;\n return (\n <g key={key}>\n <line x1={tickX1} x2={tickX2} y1={y} y2={y} stroke={BLACK} />\n {yAxis.showAxisLabels && (<text x={textX} y={y} textAnchor={textAnchor} transform={`rotate(${angle},${textX},${y})`} dominantBaseline={dominantBaseline}>\n {yLabels[key]}\n </text>)}\n </g>\n );\n })}\n </g>\n )}\n {debug && (\n <rect\n x={yAxisBBox.x}\n y={yAxisBBox.y}\n height={yAxisBBox.height}\n width={yAxisBBox.width}\n stroke={BLACK}\n fill=\"none\"\n />\n )}\n </g>\n </g>\n );\n}\n"],"names":["AxisCaptions","sideElementBBoxes","debug","xKeys","yKeys","scales","xAxis","yAxis","stepX","stepY","labelAngles","xLabels","yLabels","tickSizeX","DEFAULT_TICKS_SIZE","tickSizeY","xAxisVisible","xAxisTitleBBox","xAxisBBox","yAxisVisible","yAxisTitleBBox","yAxisBBox","jsxs","jsx","BLACK","key","inclined","onBottom","tickY1","tickY2","textY","TICK_OFFSET","x","angle","textAnchor","onLeft","dominantBaseline","tickX1","tickX2","textX","y"],"mappings":";;;AAoBO,SAASA,EAAa;AAAA,EACzB,mBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AACJ,GAAsB;AAClB,QAAMC,IAAYP,EAAM,YAAYQ,IAAqB,GACnDC,IAAYR,EAAM,YAAYO,IAAqB,GAEnDE,IAAef,EAAkB,IAAI,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CAAC,EAAA,CACL;AAAA,MAEHvB,KACGqB,gBAAAA,EAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACG,GAAGF,EAAU;AAAA,UACb,GAAGA,EAAU;AAAA,UACb,QAAQA,EAAU;AAAA,UAClB,OAAOA,EAAU;AAAA,UACjB,QAAQG;AAAA,UACR,MAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IACT,EAAA,CAER;AAAA,EAAA,GACJ;AAER;"}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { DEFAULT_TICKS_SIZE as
|
|
2
|
-
function J(
|
|
3
|
-
const U = H.length > 1 && (!
|
|
1
|
+
import { DEFAULT_TICKS_SIZE as G, TITLE_LINE as S, MIN_STEP_FOR_VISIBLE_LABELS as z, TICK_OFFSET as h, FACET_TITLE_LINE as q, ANNOTATION_WIDTH as T, ANNOTATIONS_OFFSET as c } from "../constants.js";
|
|
2
|
+
function J(t, o, l, B, i, s, p, f, b, D, K, H, M, R) {
|
|
3
|
+
const U = H.length > 1 && (!b || p.includes(o.groupingPosition)), L = !b || p.includes(o.position), V = K.length > 1 && (!f || p.includes(t.groupingPosition)), C = !f || p.includes(t.position), W = D.length > 1, u = B.filter((n) => p.includes(n.position) || !f && ["left", "right"].includes(n.position) || !b && ["top", "bottom"].includes(n.position)), E = u.filter((n) => n.position === "left").length, I = u.filter((n) => n.position === "right").length, e = u.filter((n) => n.position === "top").length, w = u.filter((n) => n.position === "bottom").length, Z = t.showTicks ? G : 0, j = o.showTicks ? G : 0, _ = C && t.showTitle ? S : 0, N = L && o.showTitle ? S : 0, F = C && (t.showAxisLabels || t.showTicks) && M > z ? (t.showAxisLabels ? l.xAxisCaptions : 0) + Z + h : 0, O = L && (o.showAxisLabels || o.showTicks) && R > z ? (o.showAxisLabels ? l.yAxisCaptions : 0) + j + h : 0, P = V && t.showGroupLabels ? l.xGroupCaptions + h : 0, k = U && o.showGroupLabels ? l.yGroupCaptions + h : 0;
|
|
4
4
|
return {
|
|
5
5
|
left: {
|
|
6
|
-
dendro: !(
|
|
7
|
-
axisTitle:
|
|
8
|
-
groups:
|
|
9
|
-
axis:
|
|
10
|
-
annotations:
|
|
6
|
+
dendro: !(s != null && s.hidden) && (s == null ? void 0 : s.position) === "left" ? s.size : 0,
|
|
7
|
+
axisTitle: o.position === "left" ? N : 0,
|
|
8
|
+
groups: o.groupingPosition === "left" ? k : 0,
|
|
9
|
+
axis: o.position === "left" ? O : 0,
|
|
10
|
+
annotations: E * T + (E && c)
|
|
11
11
|
},
|
|
12
12
|
right: {
|
|
13
|
-
dendro: !(
|
|
14
|
-
axisTitle:
|
|
15
|
-
groups:
|
|
16
|
-
axis:
|
|
17
|
-
annotations:
|
|
13
|
+
dendro: !(s != null && s.hidden) && (s == null ? void 0 : s.position) === "right" ? s.size : 0,
|
|
14
|
+
axisTitle: o.position === "right" ? N : 0,
|
|
15
|
+
groups: o.groupingPosition === "right" ? k : 0,
|
|
16
|
+
axis: o.position === "right" ? O : 0,
|
|
17
|
+
annotations: I * T + (I && c)
|
|
18
18
|
},
|
|
19
19
|
top: {
|
|
20
20
|
facetTitle: W ? q : 0,
|
|
21
|
-
dendro: !(
|
|
22
|
-
axisTitle:
|
|
23
|
-
groups:
|
|
24
|
-
axis:
|
|
25
|
-
annotations:
|
|
21
|
+
dendro: !(i != null && i.hidden) && (i == null ? void 0 : i.position) === "top" ? i.size : 0,
|
|
22
|
+
axisTitle: t.position === "top" ? _ : 0,
|
|
23
|
+
groups: t.groupingPosition === "top" ? P : 0,
|
|
24
|
+
axis: t.position === "top" ? F : 0,
|
|
25
|
+
annotations: e * T + (e && c)
|
|
26
26
|
},
|
|
27
27
|
bottom: {
|
|
28
|
-
dendro: !(
|
|
29
|
-
axisTitle:
|
|
30
|
-
groups:
|
|
31
|
-
axis:
|
|
32
|
-
annotations:
|
|
28
|
+
dendro: !(i != null && i.hidden) && (i == null ? void 0 : i.position) === "bottom" ? i.size : 0,
|
|
29
|
+
axisTitle: t.position === "bottom" ? _ : 0,
|
|
30
|
+
groups: t.groupingPosition === "bottom" ? P : 0,
|
|
31
|
+
axis: t.position === "bottom" ? F : 0,
|
|
32
|
+
annotations: w * T + (w && c)
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculateChartSideElementSizes.js","sources":["../../../src/heatmap/utils/calculateChartSideElementSizes.ts"],"sourcesContent":["import {\n ANNOTATION_WIDTH,\n ANNOTATIONS_OFFSET,\n DEFAULT_TICKS_SIZE,\n FACET_TITLE_LINE,\n MIN_STEP_FOR_VISIBLE_LABELS,\n TICK_OFFSET,\n TITLE_LINE,\n} from '../constants';\nimport type {CaptionsSizes} from '../components/types';\nimport type {HeatmapSettingsImpl} from '../HeatmapSettingsImpl';\n\nexport function calculateChartSideElementSizes(\n xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'],\n yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'],\n captionsSizes: CaptionsSizes,\n annotations: HeatmapSettingsImpl['annotations'],\n dendrogramX: HeatmapSettingsImpl['dendrogramX'],\n dendrogramY: HeatmapSettingsImpl['dendrogramY'],\n chartSides: ('left' | 'right' | 'top' | 'bottom')[],\n sharedX: boolean,\n sharedY: boolean,\n facetKeys: string[],\n xGroupKeys: string[],\n yGroupKeys: string[],\n stepX: number,\n stepY: number\n): Record<string, Record<string, number>> {\n const hasGroupingY = yGroupKeys.length > 1 && (!sharedY || chartSides.includes(yAxis.groupingPosition));\n const hasAxisY = !sharedY || chartSides.includes(yAxis.position);\n const hasGroupingX = xGroupKeys.length > 1 && (!sharedX || chartSides.includes(xAxis.groupingPosition));\n const hasAxisX = !sharedX || chartSides.includes(xAxis.position);\n const hasChartTitle = facetKeys.length > 1;\n const usedAnnotations = annotations.filter(item => {\n return (\n chartSides.includes(item.position) ||\n (!sharedX && ['left', 'right'].includes(item.position)) ||\n (!sharedY && ['top', 'bottom'].includes(item.position))\n );\n });\n const leftAnnotationsCount = usedAnnotations.filter(item => item.position === 'left').length;\n const rightAnnotationsCount = usedAnnotations.filter(item => item.position === 'right').length;\n const topAnnotationsCount = usedAnnotations.filter(item => item.position === 'top').length;\n const bottomAnnotationsCount = usedAnnotations.filter(item => item.position === 'bottom').length;\n\n const tickSizeX = xAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const tickSizeY = yAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const axisTitleX = hasAxisX && xAxis.showTitle ? TITLE_LINE : 0;\n const axisTitleY = hasAxisY && yAxis.showTitle ? TITLE_LINE : 0;\n\n const axisX =\n hasAxisX && xAxis.showAxisLabels && stepX > MIN_STEP_FOR_VISIBLE_LABELS\n ? captionsSizes.xAxisCaptions + tickSizeX + TICK_OFFSET\n : 0;\n const axisY =\n hasAxisY && yAxis.showAxisLabels && stepY > MIN_STEP_FOR_VISIBLE_LABELS\n ? captionsSizes.yAxisCaptions + tickSizeY + TICK_OFFSET\n : 0;\n // can be rotated, then labels max width\n const groupX = hasGroupingX && xAxis.showGroupLabels ? captionsSizes.xGroupCaptions + TICK_OFFSET : 0;\n const groupY = hasGroupingY && yAxis.showGroupLabels ? captionsSizes.yGroupCaptions + TICK_OFFSET : 0;\n\n return {\n left: {\n dendro: !dendrogramY?.hidden && dendrogramY?.position === 'left' ? dendrogramY.size : 0,\n axisTitle: yAxis.position === 'left' ? axisTitleY : 0,\n groups: yAxis.groupingPosition === 'left' ? groupY : 0,\n axis: yAxis.position === 'left' ? axisY : 0,\n annotations: leftAnnotationsCount * ANNOTATION_WIDTH + (leftAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n right: {\n dendro: !dendrogramY?.hidden && dendrogramY?.position === 'right' ? dendrogramY.size : 0,\n axisTitle: yAxis.position === 'right' ? axisTitleY : 0,\n groups: yAxis.groupingPosition === 'right' ? groupY : 0,\n axis: yAxis.position === 'right' ? axisY : 0,\n annotations: rightAnnotationsCount * ANNOTATION_WIDTH + (rightAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n top: {\n facetTitle: hasChartTitle ? FACET_TITLE_LINE : 0,\n dendro: !dendrogramX?.hidden && dendrogramX?.position === 'top' ? dendrogramX.size : 0,\n axisTitle: xAxis.position === 'top' ? axisTitleX : 0,\n groups: xAxis.groupingPosition === 'top' ? groupX : 0,\n axis: xAxis.position === 'top' ? axisX : 0,\n annotations: topAnnotationsCount * ANNOTATION_WIDTH + (topAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n bottom: {\n dendro: !dendrogramX?.hidden && dendrogramX?.position === 'bottom' ? dendrogramX.size : 0,\n axisTitle: xAxis.position === 'bottom' ? axisTitleX : 0,\n groups: xAxis.groupingPosition === 'bottom' ? groupX : 0,\n axis: xAxis.position === 'bottom' ? axisX : 0,\n annotations: bottomAnnotationsCount * ANNOTATION_WIDTH + (bottomAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n };\n}\n"],"names":["calculateChartSideElementSizes","xAxis","yAxis","captionsSizes","annotations","dendrogramX","dendrogramY","chartSides","sharedX","sharedY","facetKeys","xGroupKeys","yGroupKeys","stepX","stepY","hasGroupingY","hasAxisY","hasGroupingX","hasAxisX","hasChartTitle","usedAnnotations","item","leftAnnotationsCount","rightAnnotationsCount","topAnnotationsCount","bottomAnnotationsCount","tickSizeX","DEFAULT_TICKS_SIZE","tickSizeY","axisTitleX","TITLE_LINE","axisTitleY","axisX","MIN_STEP_FOR_VISIBLE_LABELS","TICK_OFFSET","axisY","groupX","groupY","ANNOTATION_WIDTH","ANNOTATIONS_OFFSET","FACET_TITLE_LINE"],"mappings":";AAYO,SAASA,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACsC;AACtC,QAAMC,IAAeH,EAAW,SAAS,MAAM,CAACH,KAAWF,EAAW,SAASL,EAAM,gBAAgB,IAC/Fc,IAAW,CAACP,KAAWF,EAAW,SAASL,EAAM,QAAQ,GACzDe,IAAeN,EAAW,SAAS,MAAM,CAACH,KAAWD,EAAW,SAASN,EAAM,gBAAgB,IAC/FiB,IAAW,CAACV,KAAWD,EAAW,SAASN,EAAM,QAAQ,GACzDkB,IAAgBT,EAAU,SAAS,GACnCU,IAAkBhB,EAAY,OAAO,CAAAiB,MAEnCd,EAAW,SAASc,EAAK,QAAQ,KAChC,CAACb,KAAW,CAAC,QAAQ,OAAO,EAAE,SAASa,EAAK,QAAQ,KACpD,CAACZ,KAAW,CAAC,OAAO,QAAQ,EAAE,SAASY,EAAK,QAAQ,CAE5D,GACKC,IAAuBF,EAAgB,OAAO,OAAQC,EAAK,aAAa,MAAM,EAAE,QAChFE,IAAwBH,EAAgB,OAAO,OAAQC,EAAK,aAAa,OAAO,EAAE,QAClFG,IAAsBJ,EAAgB,OAAO,OAAQC,EAAK,aAAa,KAAK,EAAE,QAC9EI,IAAyBL,EAAgB,OAAO,OAAQC,EAAK,aAAa,QAAQ,EAAE,QAEpFK,IAAYzB,EAAM,YAAY0B,IAAqB,GACnDC,IAAY1B,EAAM,YAAYyB,IAAqB,GACnDE,IAAaX,KAAYjB,EAAM,YAAY6B,IAAa,GACxDC,IAAaf,KAAYd,EAAM,YAAY4B,IAAa,GAExDE,IACFd,
|
|
1
|
+
{"version":3,"file":"calculateChartSideElementSizes.js","sources":["../../../src/heatmap/utils/calculateChartSideElementSizes.ts"],"sourcesContent":["import {\n ANNOTATION_WIDTH,\n ANNOTATIONS_OFFSET,\n DEFAULT_TICKS_SIZE,\n FACET_TITLE_LINE,\n MIN_STEP_FOR_VISIBLE_LABELS,\n TICK_OFFSET,\n TITLE_LINE,\n} from '../constants';\nimport type {CaptionsSizes} from '../components/types';\nimport type {HeatmapSettingsImpl} from '../HeatmapSettingsImpl';\n\nexport function calculateChartSideElementSizes(\n xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'],\n yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'],\n captionsSizes: CaptionsSizes,\n annotations: HeatmapSettingsImpl['annotations'],\n dendrogramX: HeatmapSettingsImpl['dendrogramX'],\n dendrogramY: HeatmapSettingsImpl['dendrogramY'],\n chartSides: ('left' | 'right' | 'top' | 'bottom')[],\n sharedX: boolean,\n sharedY: boolean,\n facetKeys: string[],\n xGroupKeys: string[],\n yGroupKeys: string[],\n stepX: number,\n stepY: number\n): Record<string, Record<string, number>> {\n const hasGroupingY = yGroupKeys.length > 1 && (!sharedY || chartSides.includes(yAxis.groupingPosition));\n const hasAxisY = !sharedY || chartSides.includes(yAxis.position);\n const hasGroupingX = xGroupKeys.length > 1 && (!sharedX || chartSides.includes(xAxis.groupingPosition));\n const hasAxisX = !sharedX || chartSides.includes(xAxis.position);\n const hasChartTitle = facetKeys.length > 1;\n const usedAnnotations = annotations.filter(item => {\n return (\n chartSides.includes(item.position) ||\n (!sharedX && ['left', 'right'].includes(item.position)) ||\n (!sharedY && ['top', 'bottom'].includes(item.position))\n );\n });\n const leftAnnotationsCount = usedAnnotations.filter(item => item.position === 'left').length;\n const rightAnnotationsCount = usedAnnotations.filter(item => item.position === 'right').length;\n const topAnnotationsCount = usedAnnotations.filter(item => item.position === 'top').length;\n const bottomAnnotationsCount = usedAnnotations.filter(item => item.position === 'bottom').length;\n\n const tickSizeX = xAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const tickSizeY = yAxis.showTicks ? DEFAULT_TICKS_SIZE : 0;\n const axisTitleX = hasAxisX && xAxis.showTitle ? TITLE_LINE : 0;\n const axisTitleY = hasAxisY && yAxis.showTitle ? TITLE_LINE : 0;\n\n const axisX =\n hasAxisX && (xAxis.showAxisLabels || xAxis.showTicks) && stepX > MIN_STEP_FOR_VISIBLE_LABELS\n ? (xAxis.showAxisLabels ? captionsSizes.xAxisCaptions : 0) + tickSizeX + TICK_OFFSET\n : 0;\n const axisY =\n hasAxisY && (yAxis.showAxisLabels || yAxis.showTicks) && stepY > MIN_STEP_FOR_VISIBLE_LABELS\n ? (yAxis.showAxisLabels ? captionsSizes.yAxisCaptions : 0) + tickSizeY + TICK_OFFSET\n : 0;\n // can be rotated, then labels max width\n const groupX = hasGroupingX && xAxis.showGroupLabels ? captionsSizes.xGroupCaptions + TICK_OFFSET : 0;\n const groupY = hasGroupingY && yAxis.showGroupLabels ? captionsSizes.yGroupCaptions + TICK_OFFSET : 0;\n\n return {\n left: {\n dendro: !dendrogramY?.hidden && dendrogramY?.position === 'left' ? dendrogramY.size : 0,\n axisTitle: yAxis.position === 'left' ? axisTitleY : 0,\n groups: yAxis.groupingPosition === 'left' ? groupY : 0,\n axis: yAxis.position === 'left' ? axisY : 0,\n annotations: leftAnnotationsCount * ANNOTATION_WIDTH + (leftAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n right: {\n dendro: !dendrogramY?.hidden && dendrogramY?.position === 'right' ? dendrogramY.size : 0,\n axisTitle: yAxis.position === 'right' ? axisTitleY : 0,\n groups: yAxis.groupingPosition === 'right' ? groupY : 0,\n axis: yAxis.position === 'right' ? axisY : 0,\n annotations: rightAnnotationsCount * ANNOTATION_WIDTH + (rightAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n top: {\n facetTitle: hasChartTitle ? FACET_TITLE_LINE : 0,\n dendro: !dendrogramX?.hidden && dendrogramX?.position === 'top' ? dendrogramX.size : 0,\n axisTitle: xAxis.position === 'top' ? axisTitleX : 0,\n groups: xAxis.groupingPosition === 'top' ? groupX : 0,\n axis: xAxis.position === 'top' ? axisX : 0,\n annotations: topAnnotationsCount * ANNOTATION_WIDTH + (topAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n bottom: {\n dendro: !dendrogramX?.hidden && dendrogramX?.position === 'bottom' ? dendrogramX.size : 0,\n axisTitle: xAxis.position === 'bottom' ? axisTitleX : 0,\n groups: xAxis.groupingPosition === 'bottom' ? groupX : 0,\n axis: xAxis.position === 'bottom' ? axisX : 0,\n annotations: bottomAnnotationsCount * ANNOTATION_WIDTH + (bottomAnnotationsCount && ANNOTATIONS_OFFSET),\n },\n };\n}\n"],"names":["calculateChartSideElementSizes","xAxis","yAxis","captionsSizes","annotations","dendrogramX","dendrogramY","chartSides","sharedX","sharedY","facetKeys","xGroupKeys","yGroupKeys","stepX","stepY","hasGroupingY","hasAxisY","hasGroupingX","hasAxisX","hasChartTitle","usedAnnotations","item","leftAnnotationsCount","rightAnnotationsCount","topAnnotationsCount","bottomAnnotationsCount","tickSizeX","DEFAULT_TICKS_SIZE","tickSizeY","axisTitleX","TITLE_LINE","axisTitleY","axisX","MIN_STEP_FOR_VISIBLE_LABELS","TICK_OFFSET","axisY","groupX","groupY","ANNOTATION_WIDTH","ANNOTATIONS_OFFSET","FACET_TITLE_LINE"],"mappings":";AAYO,SAASA,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACsC;AACtC,QAAMC,IAAeH,EAAW,SAAS,MAAM,CAACH,KAAWF,EAAW,SAASL,EAAM,gBAAgB,IAC/Fc,IAAW,CAACP,KAAWF,EAAW,SAASL,EAAM,QAAQ,GACzDe,IAAeN,EAAW,SAAS,MAAM,CAACH,KAAWD,EAAW,SAASN,EAAM,gBAAgB,IAC/FiB,IAAW,CAACV,KAAWD,EAAW,SAASN,EAAM,QAAQ,GACzDkB,IAAgBT,EAAU,SAAS,GACnCU,IAAkBhB,EAAY,OAAO,CAAAiB,MAEnCd,EAAW,SAASc,EAAK,QAAQ,KAChC,CAACb,KAAW,CAAC,QAAQ,OAAO,EAAE,SAASa,EAAK,QAAQ,KACpD,CAACZ,KAAW,CAAC,OAAO,QAAQ,EAAE,SAASY,EAAK,QAAQ,CAE5D,GACKC,IAAuBF,EAAgB,OAAO,OAAQC,EAAK,aAAa,MAAM,EAAE,QAChFE,IAAwBH,EAAgB,OAAO,OAAQC,EAAK,aAAa,OAAO,EAAE,QAClFG,IAAsBJ,EAAgB,OAAO,OAAQC,EAAK,aAAa,KAAK,EAAE,QAC9EI,IAAyBL,EAAgB,OAAO,OAAQC,EAAK,aAAa,QAAQ,EAAE,QAEpFK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MAC/C,QAAQ,EAACnC,KAAA,QAAAA,EAAa,YAAUA,KAAA,gBAAAA,EAAa,cAAa,QAAQA,EAAY,OAAO;AAAA,MACrF,WAAWJ,EAAM,aAAa,QAAQ4B,IAAa;AAAA,MACnD,QAAQ5B,EAAM,qBAAqB,QAAQmC,IAAS;AAAA,MACpD,MAAMnC,EAAM,aAAa,QAAQ+B,IAAQ;AAAA,MACzC,aAAaR,IAAsBc,KAAoBd,KAAuBe;AAAA,IAAA;AAAA,IAElF,QAAQ;AAAA,MACJ,QAAQ,EAAClC,KAAA,QAAAA,EAAa,YAAUA,KAAA,gBAAAA,EAAa,cAAa,WAAWA,EAAY,OAAO;AAAA,MACxF,WAAWJ,EAAM,aAAa,WAAW4B,IAAa;AAAA,MACtD,QAAQ5B,EAAM,qBAAqB,WAAWmC,IAAS;AAAA,MACvD,MAAMnC,EAAM,aAAa,WAAW+B,IAAQ;AAAA,MAC5C,aAAaP,IAAyBa,KAAoBb,KAA0Bc;AAAA,IAAA;AAAA,EACxF;AAER;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../../_virtual/index10.js";
|
|
2
2
|
import { __require as o } from "./cjs/scheduler.production.min.js";
|
|
3
3
|
import { __require as u } from "./cjs/scheduler.development.js";
|
|
4
4
|
var r;
|