@milaboratories/graph-maker 1.1.192 → 1.1.194
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/constantsAesthetic.d.ts +0 -1
- package/dist/constantsAesthetic.js +16 -17
- package/dist/constantsAesthetic.js.map +1 -1
- package/dist/constantsCommon.d.ts +4 -0
- package/dist/constantsCommon.js +21 -17
- package/dist/constantsCommon.js.map +1 -1
- package/dist/dataBindAes.d.ts +5 -5
- package/dist/dataBindAes.js +110 -110
- package/dist/dataBindAes.js.map +1 -1
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js +154 -144
- package/dist/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js +263 -193
- package/dist/forms/AxesSettingsForm/HeatmapAxesSettingsForm.vue.js.map +1 -1
- package/dist/forms/LayersForm/AesSelector.vue.js +59 -59
- package/dist/forms/LayersForm/AesSelector.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/Bubble.vue.js +41 -41
- package/dist/forms/LayersForm/Layer/Bubble.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.js +35 -35
- package/dist/forms/LayersForm/Layer/heatmap/Heatmap.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapAnnotations.vue.js +31 -31
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapAnnotations.vue.js.map +1 -1
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js +35 -35
- package/dist/forms/LayersForm/Layer/heatmap/HeatmapClustered.vue.js.map +1 -1
- package/dist/index.vue.js +94 -90
- package/dist/index.vue.js.map +1 -1
- package/dist/store.d.ts +8 -3
- package/dist/store.js +129 -123
- package/dist/store.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +2 -2
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.js +11 -11
- package/dist/utils/createChartSettingsForRender/composeBubbleSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeChartSettings.d.ts +2 -2
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js +28 -28
- package/dist/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeDendroSettings.js +23 -20
- package/dist/utils/createChartSettingsForRender/composeDendroSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +2 -2
- package/dist/utils/createChartSettingsForRender/composeDiscreteSettings.js +20 -18
- package/dist/utils/createChartSettingsForRender/composeDiscreteSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +2 -2
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.js +28 -28
- package/dist/utils/createChartSettingsForRender/composeHeatmapSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +2 -2
- package/dist/utils/createChartSettingsForRender/composeHistogramSettings.js +11 -10
- package/dist/utils/createChartSettingsForRender/composeHistogramSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +3 -3
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js +71 -68
- package/dist/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +2 -2
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +19 -18
- package/dist/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/getAxesDataFromForms.js +27 -27
- package/dist/utils/createChartSettingsForRender/getAxesDataFromForms.js.map +1 -1
- package/dist/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts +1 -1
- package/dist/utils/createChartSettingsForRender/getLayersDataFromForms.js +37 -37
- package/dist/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/package.json +2 -2
|
@@ -21,7 +21,6 @@ export declare const DIVERGING_MAP: Record<DivergingPalette, PaletteInfo>;
|
|
|
21
21
|
export declare const PALETTE_MAP: Record<Palette, PaletteInfo>;
|
|
22
22
|
export declare const DEFAULT_CATEGORICAL_PALETTE: CategoricalPalette;
|
|
23
23
|
export declare const DEFAULT_CONTINUOUS_PALETTE: ContinuousPalette;
|
|
24
|
-
export declare const DEFAULT_PALETTE: Palette;
|
|
25
24
|
export declare const FIXES_DOT_SHAPES: DotShape[];
|
|
26
25
|
export declare const UNKNOWN_COLOR = "#F0F0F0";
|
|
27
26
|
export declare const DEFAULT_DOT_SHAPE = "21";
|
|
@@ -34,7 +34,7 @@ l.reduce(
|
|
|
34
34
|
(o, e) => (o[e.color] = e, o),
|
|
35
35
|
{}
|
|
36
36
|
);
|
|
37
|
-
const t = l.slice(0, -3).map((o) => o.color), r = t.filter((o, e) => e % 3 === 0), a = t.filter((o, e) => e % 3 === 1), c = t.filter((o, e) => e % 3 === 2), i = t.filter((o, e) => e % 3 !== 2), n = t, s = ["#FFF680", "#53D788", "#36739D", "#4A005C"], F = ["#FFF680", "#F77E5B", "#902B83", "#2B125C"], A = ["#DFFADC", "#74CFD1", "#635AC1", "#611347"], E = ["#FAFAB4", "#8DDA7F", "#337E90", "#1C0F5C"], C = ["#FFEA80", "#F07A76", "#7535A4", "#003752"], D = ["#FFF780", "#6CEA90", "#6C90F0", "#942AAE"],
|
|
37
|
+
const t = l.slice(0, -3).map((o) => o.color), r = t.filter((o, e) => e % 3 === 0), a = t.filter((o, e) => e % 3 === 1), c = t.filter((o, e) => e % 3 === 2), i = t.filter((o, e) => e % 3 !== 2), n = t, s = ["#FFF680", "#53D788", "#36739D", "#4A005C"], F = ["#FFF680", "#F77E5B", "#902B83", "#2B125C"], A = ["#DFFADC", "#74CFD1", "#635AC1", "#611347"], E = ["#FAFAB4", "#8DDA7F", "#337E90", "#1C0F5C"], C = ["#FFEA80", "#F07A76", "#7535A4", "#003752"], D = ["#FFF780", "#6CEA90", "#6C90F0", "#942AAE"], _ = ["#43317B", "#7ACFAC", "#F5F5B7", "#F07B75", "#5C1243"], L = ["#122B5C", "#41B5A8", "#F0F0F0", "#F07C80", "#5C1243"], d = ["#0E0E8F", "#7E93FB", "#F0F0F0", "#ED7883", "#5C1243"], m = ["#2E5C00", "#9ED26A", "#F0F0F0", "#EB8BDB", "#701260"], T = [
|
|
38
38
|
"#4A005C",
|
|
39
39
|
"#36749D",
|
|
40
40
|
"#56D688",
|
|
@@ -79,16 +79,16 @@ const f = {
|
|
|
79
79
|
sunset: { title: "Sunset", colors: C },
|
|
80
80
|
perceptual_rainbow: { title: "Rainbow", colors: D }
|
|
81
81
|
}, g = {
|
|
82
|
-
spectrum: { title: "Spectrum", colors:
|
|
83
|
-
teal_red: { title: "Teal-Red", colors:
|
|
82
|
+
spectrum: { title: "Spectrum", colors: _ },
|
|
83
|
+
teal_red: { title: "Teal-Red", colors: L },
|
|
84
84
|
blue_red: { title: "Blue-Red", colors: d },
|
|
85
|
-
lime_rose: { title: "Lime-Rose", colors:
|
|
86
|
-
viridis_magma: { title: "Vir-Mag", colors:
|
|
85
|
+
lime_rose: { title: "Lime-Rose", colors: m },
|
|
86
|
+
viridis_magma: { title: "Vir-Mag", colors: T }
|
|
87
87
|
}, G = {
|
|
88
88
|
...f,
|
|
89
89
|
...R,
|
|
90
90
|
...g
|
|
91
|
-
}, N = "light", u = "salinity",
|
|
91
|
+
}, N = "light", u = "salinity", M = [
|
|
92
92
|
"0",
|
|
93
93
|
"5",
|
|
94
94
|
"1",
|
|
@@ -109,20 +109,20 @@ const f = {
|
|
|
109
109
|
"21",
|
|
110
110
|
"24",
|
|
111
111
|
"25"
|
|
112
|
-
],
|
|
112
|
+
], U = "#F0F0F0", k = "21", b = ["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"], p = "solid", y = {
|
|
113
113
|
solid: { title: "Solid" },
|
|
114
114
|
dashed: { title: "Dashed" },
|
|
115
115
|
dotted: { title: "Dotted" },
|
|
116
116
|
dotdash: { title: "Dotdash" },
|
|
117
117
|
longdash: { title: "Longdash" },
|
|
118
118
|
twodash: { title: "Twodash" }
|
|
119
|
-
},
|
|
119
|
+
}, V = {
|
|
120
120
|
A: "#cc0100",
|
|
121
121
|
C: "#0000cc",
|
|
122
122
|
G: "#ffb300",
|
|
123
123
|
T: "#027f00",
|
|
124
124
|
U: "#027f00"
|
|
125
|
-
},
|
|
125
|
+
}, v = {
|
|
126
126
|
A: "#7fa0f0",
|
|
127
127
|
R: "#ef1405",
|
|
128
128
|
N: "#01ff00",
|
|
@@ -148,27 +148,26 @@ const f = {
|
|
|
148
148
|
Z: "#eeeeee"
|
|
149
149
|
};
|
|
150
150
|
export {
|
|
151
|
-
|
|
151
|
+
v as AMINOACID_COLOR_MAPPING,
|
|
152
152
|
I as CATEGORICAL_LIST,
|
|
153
153
|
f as CATEGORICAL_MAP,
|
|
154
154
|
h as DEFAULT_BLACK,
|
|
155
155
|
N as DEFAULT_CATEGORICAL_PALETTE,
|
|
156
156
|
u as DEFAULT_CONTINUOUS_PALETTE,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
U as DEFAULT_PALETTE,
|
|
157
|
+
k as DEFAULT_DOT_SHAPE,
|
|
158
|
+
p as DEFAULT_LINE_TYPE,
|
|
160
159
|
B as DEFAULT_WHITE,
|
|
161
160
|
S as DIVERGING_LIST,
|
|
162
161
|
g as DIVERGING_MAP,
|
|
163
162
|
l as FIXED_COLORS,
|
|
164
|
-
|
|
163
|
+
b as FIXED_LINE_TYPES,
|
|
165
164
|
M as FIXES_DOT_SHAPES,
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
y as LINE_TYPES_MAP,
|
|
166
|
+
V as NUCLEOTIDE_COLOR_MAPPING,
|
|
168
167
|
G as PALETTE_MAP,
|
|
169
168
|
O as SEQUENTIAL_LIST,
|
|
170
169
|
R as SEQUENTIAL_MAP,
|
|
171
|
-
|
|
170
|
+
U as UNKNOWN_COLOR,
|
|
172
171
|
P as isCategorical
|
|
173
172
|
};
|
|
174
173
|
//# sourceMappingURL=constantsAesthetic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantsAesthetic.js","sources":["../src/constantsAesthetic.ts"],"sourcesContent":["import type {\n CategoricalPalette, ContinuousPalette,\n DivergingPalette, DotShape, LineType, LineTypeInfo,\n Palette,\n PaletteInfo,\n SequentialPalette,\n} from './components/AesSettings/types';\n\nexport const FIXED_COLORS: { name: string; color: string }[] = [\n { name: 'Light green', color: '#99E099' },\n { name: 'Green', color: '#42B842' },\n { name: 'Dark green', color: '#198020' },\n { name: 'Light violet', color: '#C1ADFF' },\n { name: 'Violet', color: '#845CFF' },\n { name: 'Dark violet', color: '#5F31CC' },\n { name: 'Light orange', color: '#FFCB8F' },\n { name: 'Orange', color: '#FF9429' },\n { name: 'Dark orange', color: '#C26A27' },\n { name: 'Light teal', color: '#90E0E0' },\n { name: 'Teal', color: '#27C2C2' },\n { name: 'Dark teal', color: '#068A94' },\n { name: 'Light rose', color: '#FAAAFA' },\n { name: 'Rose', color: '#E553E5' },\n { name: 'Dark rose', color: '#A324B2' },\n { name: 'Light lime', color: '#CBEB67' },\n { name: 'Lime', color: '#95C700' },\n { name: 'Dark lime', color: '#659406' },\n { name: 'Light blue', color: '#99CCFF' },\n { name: 'Blue', color: '#2D93FA' },\n { name: 'Dark blue', color: '#105BCC' },\n { name: 'Light red', color: '#FFADBA' },\n { name: 'Red', color: '#F05670' },\n { name: 'Dark red', color: '#AD3757' },\n { name: 'Light grey', color: '#D3D7E0' },\n { name: 'Grey', color: '#929BAD' },\n { name: 'Dark grey', color: '#5E5E70' },\n { name: 'Black', color: '#110529' },\n { name: 'White', color: '#FFFFFF' },\n { name: 'None', color: 'transparent' },\n];\n\nexport const DEFAULT_WHITE = '#FFFFFF';\nexport const DEFAULT_BLACK = '#110529';\n\nexport const FIXED_COLORS_MAP = FIXED_COLORS.reduce(\n (res: Record<string, { name: string; color: string }>, item) => {\n res[item.color] = item;\n return res;\n },\n {},\n);\n\n// fixed colors without black, white, transparent - base for categorical palettes\nconst COLORS = FIXED_COLORS.slice(0, -3).map((el) => el.color);\n\nconst CATEGORICAL_LIGHT = COLORS.filter((_el, idx) => idx % 3 === 0);\nconst CATEGORICAL_BRIGHT = COLORS.filter((_el, idx) => idx % 3 === 1);\nconst CATEGORICAL_DARK = COLORS.filter((_el, idx) => idx % 3 === 2);\nconst CATEGORICAL_PAIRED = COLORS.filter((_el, idx) => idx % 3 !== 2);\nconst CATEGORICAL_TRIADIC = COLORS;\n\nconst VIRIDIS = ['#FFF680', '#53D788', '#36739D', '#4A005C'];\nconst MAGMA = ['#FFF680', '#F77E5B', '#902B83', '#2B125C'];\nconst DENSITY = ['#DFFADC', '#74CFD1', '#635AC1', '#611347'];\nconst SALINITY = ['#FAFAB4', '#8DDA7F', '#337E90', '#1C0F5C'];\nconst SUNSET = ['#FFEA80', '#F07A76', '#7535A4', '#003752'];\nconst PERCEPTUAL_RAINBOW = ['#FFF780', '#6CEA90', '#6C90F0', '#942AAE'];\n\nconst SPECTRUM = ['#43317B', '#7ACFAC', '#F5F5B7', '#F07B75', '#5C1243'];\nconst TEAL_RED = ['#122B5C', '#41B5A8', '#F0F0F0', '#F07C80', '#5C1243'];\nconst BLUE_RED = ['#0E0E8F', '#7E93FB', '#F0F0F0', '#ED7883', '#5C1243'];\nconst LIME_ROSE = ['#2E5C00', '#9ED26A', '#F0F0F0', '#EB8BDB', '#701260'];\nconst VIRIDIS_MAGMA = [\n '#4A005C',\n '#36749D',\n '#56D688',\n '#FFF680',\n '#F77E5E',\n '#902B82',\n '#2B125C',\n];\n\nexport const CATEGORICAL_LIST: CategoricalPalette[] = [\n 'light',\n 'bright',\n 'dark',\n 'paired',\n 'triadic',\n];\nexport const SEQUENTIAL_LIST: SequentialPalette[] = [\n 'viridis',\n 'magma',\n 'density',\n 'salinity',\n 'sunset',\n 'perceptual_rainbow',\n];\nexport const DIVERGING_LIST: DivergingPalette[] = [\n 'spectrum',\n 'teal_red',\n 'blue_red',\n 'lime_rose',\n 'viridis_magma',\n];\n\nexport function isCategorical(value: Palette): value is CategoricalPalette {\n return CATEGORICAL_LIST.includes(value as CategoricalPalette);\n}\n\nexport function isSequential(value: Palette): value is SequentialPalette {\n return SEQUENTIAL_LIST.includes(value as SequentialPalette);\n}\n\nexport function isDiverging(value: Palette): value is DivergingPalette {\n return DIVERGING_LIST.includes(value as DivergingPalette);\n}\n\nexport const CATEGORICAL_MAP: Record<CategoricalPalette, PaletteInfo> = {\n light: { title: 'Light', colors: CATEGORICAL_LIGHT },\n bright: { title: 'Bright', colors: CATEGORICAL_BRIGHT },\n dark: { title: 'Dark', colors: CATEGORICAL_DARK },\n paired: { title: 'Paired', colors: CATEGORICAL_PAIRED },\n triadic: { title: 'Triadic', colors: CATEGORICAL_TRIADIC },\n};\nexport const SEQUENTIAL_MAP: Record<SequentialPalette, PaletteInfo> = {\n viridis: { title: 'Viridis', colors: VIRIDIS },\n magma: { title: 'Magma', colors: MAGMA },\n density: { title: 'Density', colors: DENSITY },\n salinity: { title: 'Salinity', colors: SALINITY },\n sunset: { title: 'Sunset', colors: SUNSET },\n perceptual_rainbow: { title: 'Rainbow', colors: PERCEPTUAL_RAINBOW },\n};\n\nexport const DIVERGING_MAP: Record<DivergingPalette, PaletteInfo> = {\n spectrum: { title: 'Spectrum', colors: SPECTRUM },\n teal_red: { title: 'Teal-Red', colors: TEAL_RED },\n blue_red: { title: 'Blue-Red', colors: BLUE_RED },\n lime_rose: { title: 'Lime-Rose', colors: LIME_ROSE },\n viridis_magma: { title: 'Vir-Mag', colors: VIRIDIS_MAGMA },\n};\n\nexport const PALETTE_MAP: Record<Palette, PaletteInfo> = {\n ...CATEGORICAL_MAP,\n ...SEQUENTIAL_MAP,\n ...DIVERGING_MAP,\n};\n\nexport const DEFAULT_CATEGORICAL_PALETTE: CategoricalPalette = 'light';\nexport const DEFAULT_CONTINUOUS_PALETTE: ContinuousPalette = 'salinity';\nexport const DEFAULT_PALETTE: Palette = 'salinity';\nexport const FIXES_DOT_SHAPES: DotShape[] = [\n '0', '5', '1', '2', '6',\n '7', '9', '3', '4', '8',\n '12', '10', '13', '14', '11',\n '22', '23', '21', '24', '25',\n];\n\nexport const UNKNOWN_COLOR = '#F0F0F0';\n\nexport const DEFAULT_DOT_SHAPE = '21'; // filled circle\n\nexport const FIXED_LINE_TYPES: LineType[] = ['solid', 'dashed', 'dotted', 'dotdash', 'longdash', 'twodash'];\n\nexport const DEFAULT_LINE_TYPE: LineType = 'solid';\nexport const LINE_TYPES_MAP: Record<LineType, LineTypeInfo> = {\n solid: { title: 'Solid' },\n dashed: { title: 'Dashed' },\n dotted: { title: 'Dotted' },\n dotdash: { title: 'Dotdash' },\n longdash: { title: 'Longdash' },\n twodash: { title: 'Twodash' },\n};\n\nexport const NUCLEOTIDE_COLOR_MAPPING = {\n A: '#cc0100',\n C: '#0000cc',\n G: '#ffb300',\n T: '#027f00',\n U: '#027f00',\n};\n\nexport const AMINOACID_COLOR_MAPPING = {\n A: '#7fa0f0',\n R: '#ef1405',\n N: '#01ff00',\n D: '#c048bf',\n C: '#ef8080',\n Q: '#01ff00',\n E: '#c048bf',\n G: '#f09047',\n H: '#14a4a4',\n I: '#7fa0f0',\n L: '#7fa0f0',\n K: '#ef1405',\n M: '#7fa0f0',\n F: '#7fa0f0',\n P: '#ffff00',\n S: '#01ff00',\n T: '#01ff00',\n W: '#7fa0f0',\n Y: '#14a4a4',\n V: '#7fa0f0',\n B: '#eeeeee',\n X: '#eeeeee',\n Z: '#eeeeee',\n};\n"],"names":["FIXED_COLORS","DEFAULT_WHITE","DEFAULT_BLACK","res","item","COLORS","el","CATEGORICAL_LIGHT","_el","idx","CATEGORICAL_BRIGHT","CATEGORICAL_DARK","CATEGORICAL_PAIRED","CATEGORICAL_TRIADIC","VIRIDIS","MAGMA","DENSITY","SALINITY","SUNSET","PERCEPTUAL_RAINBOW","SPECTRUM","TEAL_RED","BLUE_RED","LIME_ROSE","VIRIDIS_MAGMA","CATEGORICAL_LIST","SEQUENTIAL_LIST","DIVERGING_LIST","isCategorical","value","CATEGORICAL_MAP","SEQUENTIAL_MAP","DIVERGING_MAP","PALETTE_MAP","DEFAULT_CATEGORICAL_PALETTE","DEFAULT_CONTINUOUS_PALETTE","DEFAULT_PALETTE","FIXES_DOT_SHAPES","UNKNOWN_COLOR","DEFAULT_DOT_SHAPE","FIXED_LINE_TYPES","DEFAULT_LINE_TYPE","LINE_TYPES_MAP","NUCLEOTIDE_COLOR_MAPPING","AMINOACID_COLOR_MAPPING"],"mappings":"AAQO,MAAMA,IAAkD;AAAA,EAC7D,EAAE,MAAM,eAAe,OAAO,UAAA;AAAA,EAC9B,EAAE,MAAM,SAAS,OAAO,UAAA;AAAA,EACxB,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,gBAAgB,OAAO,UAAA;AAAA,EAC/B,EAAE,MAAM,UAAU,OAAO,UAAA;AAAA,EACzB,EAAE,MAAM,eAAe,OAAO,UAAA;AAAA,EAC9B,EAAE,MAAM,gBAAgB,OAAO,UAAA;AAAA,EAC/B,EAAE,MAAM,UAAU,OAAO,UAAA;AAAA,EACzB,EAAE,MAAM,eAAe,OAAO,UAAA;AAAA,EAC9B,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,QAAQ,OAAO,UAAA;AAAA,EACvB,EAAE,MAAM,aAAa,OAAO,UAAA;AAAA,EAC5B,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,QAAQ,OAAO,UAAA;AAAA,EACvB,EAAE,MAAM,aAAa,OAAO,UAAA;AAAA,EAC5B,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,QAAQ,OAAO,UAAA;AAAA,EACvB,EAAE,MAAM,aAAa,OAAO,UAAA;AAAA,EAC5B,E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AG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;"}
|
|
1
|
+
{"version":3,"file":"constantsAesthetic.js","sources":["../src/constantsAesthetic.ts"],"sourcesContent":["import type {\n CategoricalPalette, ContinuousPalette,\n DivergingPalette, DotShape, LineType, LineTypeInfo,\n Palette,\n PaletteInfo,\n SequentialPalette,\n} from './components/AesSettings/types';\n\nexport const FIXED_COLORS: { name: string; color: string }[] = [\n { name: 'Light green', color: '#99E099' },\n { name: 'Green', color: '#42B842' },\n { name: 'Dark green', color: '#198020' },\n { name: 'Light violet', color: '#C1ADFF' },\n { name: 'Violet', color: '#845CFF' },\n { name: 'Dark violet', color: '#5F31CC' },\n { name: 'Light orange', color: '#FFCB8F' },\n { name: 'Orange', color: '#FF9429' },\n { name: 'Dark orange', color: '#C26A27' },\n { name: 'Light teal', color: '#90E0E0' },\n { name: 'Teal', color: '#27C2C2' },\n { name: 'Dark teal', color: '#068A94' },\n { name: 'Light rose', color: '#FAAAFA' },\n { name: 'Rose', color: '#E553E5' },\n { name: 'Dark rose', color: '#A324B2' },\n { name: 'Light lime', color: '#CBEB67' },\n { name: 'Lime', color: '#95C700' },\n { name: 'Dark lime', color: '#659406' },\n { name: 'Light blue', color: '#99CCFF' },\n { name: 'Blue', color: '#2D93FA' },\n { name: 'Dark blue', color: '#105BCC' },\n { name: 'Light red', color: '#FFADBA' },\n { name: 'Red', color: '#F05670' },\n { name: 'Dark red', color: '#AD3757' },\n { name: 'Light grey', color: '#D3D7E0' },\n { name: 'Grey', color: '#929BAD' },\n { name: 'Dark grey', color: '#5E5E70' },\n { name: 'Black', color: '#110529' },\n { name: 'White', color: '#FFFFFF' },\n { name: 'None', color: 'transparent' },\n];\n\nexport const DEFAULT_WHITE = '#FFFFFF';\nexport const DEFAULT_BLACK = '#110529';\n\nexport const FIXED_COLORS_MAP = FIXED_COLORS.reduce(\n (res: Record<string, { name: string; color: string }>, item) => {\n res[item.color] = item;\n return res;\n },\n {},\n);\n\n// fixed colors without black, white, transparent - base for categorical palettes\nconst COLORS = FIXED_COLORS.slice(0, -3).map((el) => el.color);\n\nconst CATEGORICAL_LIGHT = COLORS.filter((_el, idx) => idx % 3 === 0);\nconst CATEGORICAL_BRIGHT = COLORS.filter((_el, idx) => idx % 3 === 1);\nconst CATEGORICAL_DARK = COLORS.filter((_el, idx) => idx % 3 === 2);\nconst CATEGORICAL_PAIRED = COLORS.filter((_el, idx) => idx % 3 !== 2);\nconst CATEGORICAL_TRIADIC = COLORS;\n\nconst VIRIDIS = ['#FFF680', '#53D788', '#36739D', '#4A005C'];\nconst MAGMA = ['#FFF680', '#F77E5B', '#902B83', '#2B125C'];\nconst DENSITY = ['#DFFADC', '#74CFD1', '#635AC1', '#611347'];\nconst SALINITY = ['#FAFAB4', '#8DDA7F', '#337E90', '#1C0F5C'];\nconst SUNSET = ['#FFEA80', '#F07A76', '#7535A4', '#003752'];\nconst PERCEPTUAL_RAINBOW = ['#FFF780', '#6CEA90', '#6C90F0', '#942AAE'];\n\nconst SPECTRUM = ['#43317B', '#7ACFAC', '#F5F5B7', '#F07B75', '#5C1243'];\nconst TEAL_RED = ['#122B5C', '#41B5A8', '#F0F0F0', '#F07C80', '#5C1243'];\nconst BLUE_RED = ['#0E0E8F', '#7E93FB', '#F0F0F0', '#ED7883', '#5C1243'];\nconst LIME_ROSE = ['#2E5C00', '#9ED26A', '#F0F0F0', '#EB8BDB', '#701260'];\nconst VIRIDIS_MAGMA = [\n '#4A005C',\n '#36749D',\n '#56D688',\n '#FFF680',\n '#F77E5E',\n '#902B82',\n '#2B125C',\n];\n\nexport const CATEGORICAL_LIST: CategoricalPalette[] = [\n 'light',\n 'bright',\n 'dark',\n 'paired',\n 'triadic',\n];\nexport const SEQUENTIAL_LIST: SequentialPalette[] = [\n 'viridis',\n 'magma',\n 'density',\n 'salinity',\n 'sunset',\n 'perceptual_rainbow',\n];\nexport const DIVERGING_LIST: DivergingPalette[] = [\n 'spectrum',\n 'teal_red',\n 'blue_red',\n 'lime_rose',\n 'viridis_magma',\n];\n\nexport function isCategorical(value: Palette): value is CategoricalPalette {\n return CATEGORICAL_LIST.includes(value as CategoricalPalette);\n}\n\nexport function isSequential(value: Palette): value is SequentialPalette {\n return SEQUENTIAL_LIST.includes(value as SequentialPalette);\n}\n\nexport function isDiverging(value: Palette): value is DivergingPalette {\n return DIVERGING_LIST.includes(value as DivergingPalette);\n}\n\nexport const CATEGORICAL_MAP: Record<CategoricalPalette, PaletteInfo> = {\n light: { title: 'Light', colors: CATEGORICAL_LIGHT },\n bright: { title: 'Bright', colors: CATEGORICAL_BRIGHT },\n dark: { title: 'Dark', colors: CATEGORICAL_DARK },\n paired: { title: 'Paired', colors: CATEGORICAL_PAIRED },\n triadic: { title: 'Triadic', colors: CATEGORICAL_TRIADIC },\n};\nexport const SEQUENTIAL_MAP: Record<SequentialPalette, PaletteInfo> = {\n viridis: { title: 'Viridis', colors: VIRIDIS },\n magma: { title: 'Magma', colors: MAGMA },\n density: { title: 'Density', colors: DENSITY },\n salinity: { title: 'Salinity', colors: SALINITY },\n sunset: { title: 'Sunset', colors: SUNSET },\n perceptual_rainbow: { title: 'Rainbow', colors: PERCEPTUAL_RAINBOW },\n};\n\nexport const DIVERGING_MAP: Record<DivergingPalette, PaletteInfo> = {\n spectrum: { title: 'Spectrum', colors: SPECTRUM },\n teal_red: { title: 'Teal-Red', colors: TEAL_RED },\n blue_red: { title: 'Blue-Red', colors: BLUE_RED },\n lime_rose: { title: 'Lime-Rose', colors: LIME_ROSE },\n viridis_magma: { title: 'Vir-Mag', colors: VIRIDIS_MAGMA },\n};\n\nexport const PALETTE_MAP: Record<Palette, PaletteInfo> = {\n ...CATEGORICAL_MAP,\n ...SEQUENTIAL_MAP,\n ...DIVERGING_MAP,\n};\n\nexport const DEFAULT_CATEGORICAL_PALETTE: CategoricalPalette = 'light';\nexport const DEFAULT_CONTINUOUS_PALETTE: ContinuousPalette = 'salinity';\nexport const FIXES_DOT_SHAPES: DotShape[] = [\n '0', '5', '1', '2', '6',\n '7', '9', '3', '4', '8',\n '12', '10', '13', '14', '11',\n '22', '23', '21', '24', '25',\n];\n\nexport const UNKNOWN_COLOR = '#F0F0F0';\n\nexport const DEFAULT_DOT_SHAPE = '21'; // filled circle\n\nexport const FIXED_LINE_TYPES: LineType[] = ['solid', 'dashed', 'dotted', 'dotdash', 'longdash', 'twodash'];\n\nexport const DEFAULT_LINE_TYPE: LineType = 'solid';\nexport const LINE_TYPES_MAP: Record<LineType, LineTypeInfo> = {\n solid: { title: 'Solid' },\n dashed: { title: 'Dashed' },\n dotted: { title: 'Dotted' },\n dotdash: { title: 'Dotdash' },\n longdash: { title: 'Longdash' },\n twodash: { title: 'Twodash' },\n};\n\nexport const NUCLEOTIDE_COLOR_MAPPING = {\n A: '#cc0100',\n C: '#0000cc',\n G: '#ffb300',\n T: '#027f00',\n U: '#027f00',\n};\n\nexport const AMINOACID_COLOR_MAPPING = {\n A: '#7fa0f0',\n R: '#ef1405',\n N: '#01ff00',\n D: '#c048bf',\n C: '#ef8080',\n Q: '#01ff00',\n E: '#c048bf',\n G: '#f09047',\n H: '#14a4a4',\n I: '#7fa0f0',\n L: '#7fa0f0',\n K: '#ef1405',\n M: '#7fa0f0',\n F: '#7fa0f0',\n P: '#ffff00',\n S: '#01ff00',\n T: '#01ff00',\n W: '#7fa0f0',\n Y: '#14a4a4',\n V: '#7fa0f0',\n B: '#eeeeee',\n X: '#eeeeee',\n Z: '#eeeeee',\n};\n"],"names":["FIXED_COLORS","DEFAULT_WHITE","DEFAULT_BLACK","res","item","COLORS","el","CATEGORICAL_LIGHT","_el","idx","CATEGORICAL_BRIGHT","CATEGORICAL_DARK","CATEGORICAL_PAIRED","CATEGORICAL_TRIADIC","VIRIDIS","MAGMA","DENSITY","SALINITY","SUNSET","PERCEPTUAL_RAINBOW","SPECTRUM","TEAL_RED","BLUE_RED","LIME_ROSE","VIRIDIS_MAGMA","CATEGORICAL_LIST","SEQUENTIAL_LIST","DIVERGING_LIST","isCategorical","value","CATEGORICAL_MAP","SEQUENTIAL_MAP","DIVERGING_MAP","PALETTE_MAP","DEFAULT_CATEGORICAL_PALETTE","DEFAULT_CONTINUOUS_PALETTE","FIXES_DOT_SHAPES","UNKNOWN_COLOR","DEFAULT_DOT_SHAPE","FIXED_LINE_TYPES","DEFAULT_LINE_TYPE","LINE_TYPES_MAP","NUCLEOTIDE_COLOR_MAPPING","AMINOACID_COLOR_MAPPING"],"mappings":"AAQO,MAAMA,IAAkD;AAAA,EAC7D,EAAE,MAAM,eAAe,OAAO,UAAA;AAAA,EAC9B,EAAE,MAAM,SAAS,OAAO,UAAA;AAAA,EACxB,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,gBAAgB,OAAO,UAAA;AAAA,EAC/B,EAAE,MAAM,UAAU,OAAO,UAAA;AAAA,EACzB,EAAE,MAAM,eAAe,OAAO,UAAA;AAAA,EAC9B,EAAE,MAAM,gBAAgB,OAAO,UAAA;AAAA,EAC/B,EAAE,MAAM,UAAU,OAAO,UAAA;AAAA,EACzB,EAAE,MAAM,eAAe,OAAO,UAAA;AAAA,EAC9B,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,QAAQ,OAAO,UAAA;AAAA,EACvB,EAAE,MAAM,aAAa,OAAO,UAAA;AAAA,EAC5B,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,EAC7B,EAAE,MAAM,QAAQ,OAAO,UAAA;AAAA,EACvB,EAAE,MAAM,aAAa,OAAO,UAAA;AAAA,EAC5B,EAAE,MAAM,cAAc,OAAO,UAAA;AAAA,E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AA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;"}
|
|
@@ -263,6 +263,8 @@ export type AxesState = {
|
|
|
263
263
|
} | null;
|
|
264
264
|
cellSize: number | null;
|
|
265
265
|
annotationTitlePosition: 'left' | 'right' | 'hidden';
|
|
266
|
+
hideAxisLabels: boolean;
|
|
267
|
+
hideAxisGroupLabels: boolean;
|
|
266
268
|
};
|
|
267
269
|
axisY: {
|
|
268
270
|
labelsRotation: LabelsRotation | null;
|
|
@@ -284,6 +286,8 @@ export type AxesState = {
|
|
|
284
286
|
} | null;
|
|
285
287
|
cellSize: number | null;
|
|
286
288
|
annotationTitlePosition: 'top' | 'bottom' | 'hidden';
|
|
289
|
+
hideAxisLabels: boolean;
|
|
290
|
+
hideAxisGroupLabels: boolean;
|
|
287
291
|
};
|
|
288
292
|
legend: {
|
|
289
293
|
show?: boolean;
|
package/dist/constantsCommon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_DOT_SHAPE as s, DEFAULT_LINE_TYPE as d, DEFAULT_BLACK as u } from "./constantsAesthetic.js";
|
|
2
2
|
import { DEFAULT_LINE_COLOR as i, DEFAULT_DOT_SIZE as X } from "./dataBindAes.js";
|
|
3
3
|
import W from "./icons/BarAndErrorIcon.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import F from "./icons/BarAndLineIcon.vue.js";
|
|
5
5
|
import R from "./icons/BarIcon.vue.js";
|
|
6
6
|
import J from "./icons/BinnedDotsIcon.vue.js";
|
|
7
7
|
import K from "./icons/BoxplotAndBinnedIcon.vue.js";
|
|
@@ -50,10 +50,10 @@ const de = {
|
|
|
50
50
|
dots: ["dots"],
|
|
51
51
|
curve: ["curve"],
|
|
52
52
|
curve_dots: ["curve", "dots"]
|
|
53
|
-
},
|
|
53
|
+
}, Ge = {
|
|
54
54
|
dots: ["dots"],
|
|
55
55
|
curve_dots: ["curve", "dots"]
|
|
56
|
-
},
|
|
56
|
+
}, Fe = {
|
|
57
57
|
heatmap: ["heatmap"],
|
|
58
58
|
heatmapClustered: ["heatmapClustered"]
|
|
59
59
|
}, Re = {
|
|
@@ -79,7 +79,7 @@ const de = {
|
|
|
79
79
|
bubble: "Bubble plot"
|
|
80
80
|
};
|
|
81
81
|
function Ye(o, t) {
|
|
82
|
-
var l, a, n, c, m,
|
|
82
|
+
var l, a, n, c, m, f, p, b, g, h, A, _, D, L, T, S, E, M, v, x, y, I, B, C, H, O, k, P, w, j, G;
|
|
83
83
|
if (o === "discrete") {
|
|
84
84
|
const e = t;
|
|
85
85
|
return {
|
|
@@ -89,21 +89,21 @@ function Ye(o, t) {
|
|
|
89
89
|
},
|
|
90
90
|
referenceGroup: {
|
|
91
91
|
data: {
|
|
92
|
-
testMethod: ((
|
|
93
|
-
referenceGroup: ((b = (
|
|
92
|
+
testMethod: ((f = (m = e == null ? void 0 : e.referenceGroup) == null ? void 0 : m.data) == null ? void 0 : f.testMethod) ?? null,
|
|
93
|
+
referenceGroup: ((b = (p = e == null ? void 0 : e.referenceGroup) == null ? void 0 : p.data) == null ? void 0 : b.referenceGroup) ?? null,
|
|
94
94
|
correctionMethod: ((h = (g = e == null ? void 0 : e.referenceGroup) == null ? void 0 : g.data) == null ? void 0 : h.correctionMethod) ?? "Bonferroni",
|
|
95
95
|
format: ((_ = (A = e == null ? void 0 : e.referenceGroup) == null ? void 0 : A.data) == null ? void 0 : _.format) ?? "significance",
|
|
96
|
-
ns: ((
|
|
96
|
+
ns: ((L = (D = e == null ? void 0 : e.referenceGroup) == null ? void 0 : D.data) == null ? void 0 : L.ns) ?? !1
|
|
97
97
|
},
|
|
98
98
|
validity: {
|
|
99
|
-
testMethod: ((S = (
|
|
99
|
+
testMethod: ((S = (T = e == null ? void 0 : e.referenceGroup) == null ? void 0 : T.validity) == null ? void 0 : S.testMethod) ?? !0,
|
|
100
100
|
referenceGroup: ((M = (E = e == null ? void 0 : e.referenceGroup) == null ? void 0 : E.validity) == null ? void 0 : M.referenceGroup) ?? !0
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
pairwise: {
|
|
104
104
|
data: {
|
|
105
|
-
testMethod: ((
|
|
106
|
-
correctionMethod: ((I = (
|
|
105
|
+
testMethod: ((x = (v = e == null ? void 0 : e.pairwise) == null ? void 0 : v.data) == null ? void 0 : x.testMethod) ?? null,
|
|
106
|
+
correctionMethod: ((I = (y = e == null ? void 0 : e.pairwise) == null ? void 0 : y.data) == null ? void 0 : I.correctionMethod) ?? "Bonferroni",
|
|
107
107
|
format: ((C = (B = e == null ? void 0 : e.pairwise) == null ? void 0 : B.data) == null ? void 0 : C.format) ?? "significance",
|
|
108
108
|
ns: ((O = (H = e == null ? void 0 : e.pairwise) == null ? void 0 : H.data) == null ? void 0 : O.ns) ?? !1
|
|
109
109
|
},
|
|
@@ -116,7 +116,7 @@ function Ye(o, t) {
|
|
|
116
116
|
trend: {
|
|
117
117
|
on: ((w = r == null ? void 0 : r.trend) == null ? void 0 : w.on) ?? !1,
|
|
118
118
|
trim: ((j = r == null ? void 0 : r.trend) == null ? void 0 : j.trim) ?? !1,
|
|
119
|
-
showLegend: ((
|
|
119
|
+
showLegend: ((G = r == null ? void 0 : r.trend) == null ? void 0 : G.showLegend) ?? !0
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
}
|
|
@@ -306,7 +306,9 @@ const me = () => ({
|
|
|
306
306
|
allowNullSecondaryGroups: !1,
|
|
307
307
|
order: null,
|
|
308
308
|
cellSize: null,
|
|
309
|
-
annotationTitlePosition: "right"
|
|
309
|
+
annotationTitlePosition: "right",
|
|
310
|
+
hideAxisLabels: !1,
|
|
311
|
+
hideAxisGroupLabels: !1
|
|
310
312
|
},
|
|
311
313
|
axisY: {
|
|
312
314
|
labelsRotation: null,
|
|
@@ -321,7 +323,9 @@ const me = () => ({
|
|
|
321
323
|
sorting: "asc",
|
|
322
324
|
order: null,
|
|
323
325
|
cellSize: null,
|
|
324
|
-
annotationTitlePosition: "top"
|
|
326
|
+
annotationTitlePosition: "top",
|
|
327
|
+
hideAxisLabels: !1,
|
|
328
|
+
hideAxisGroupLabels: !1
|
|
325
329
|
},
|
|
326
330
|
legend: {},
|
|
327
331
|
other: {
|
|
@@ -380,7 +384,7 @@ const Je = {
|
|
|
380
384
|
violin_binnedDots: le,
|
|
381
385
|
violin_jitteredDots: ie,
|
|
382
386
|
bar: R,
|
|
383
|
-
bar_line:
|
|
387
|
+
bar_line: F,
|
|
384
388
|
bar_errorbar: W,
|
|
385
389
|
stackedBar: ne,
|
|
386
390
|
stackedArea: ae,
|
|
@@ -388,7 +392,7 @@ const Je = {
|
|
|
388
392
|
line_binnedDots: $,
|
|
389
393
|
line_jitteredDots: z,
|
|
390
394
|
line_errorbar: ee,
|
|
391
|
-
errorbar:
|
|
395
|
+
errorbar: F,
|
|
392
396
|
sina: re,
|
|
393
397
|
logo: oe,
|
|
394
398
|
dots: te,
|
|
@@ -424,13 +428,13 @@ export {
|
|
|
424
428
|
eo as DEFAULT_WIDTH_SMALL,
|
|
425
429
|
de as DISCRETE_TEMPLATES_MAP,
|
|
426
430
|
Qe as FORMAT_P_VALUE_OPTIONS,
|
|
427
|
-
|
|
431
|
+
Fe as HEATMAP_TEMPLATES_MAP,
|
|
428
432
|
Re as HISTOGRAM_TEMPLATES_MAP,
|
|
429
433
|
Je as LAYER_ICONS,
|
|
430
434
|
Ne as LAYER_TITLES,
|
|
431
435
|
to as MAX_SEARCH_OPTIONS_LIST_LENGTH,
|
|
432
436
|
ue as SCATTERPLOT_TEMPLATES_MAP,
|
|
433
|
-
|
|
437
|
+
Ge as SCATTERPLOT_UMAP_TEMPLATES_MAP,
|
|
434
438
|
qe as STAT_CORRECTION_METHOD,
|
|
435
439
|
Ke as STAT_TEST_METHOD,
|
|
436
440
|
We as getInitialAxesSettings,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantsCommon.js","sources":["../src/constantsCommon.ts"],"sourcesContent":["import type { ChartType } from '@milaboratories/pf-plots';\nimport type { Component } from 'vue';\nimport type {\n DotShape,\n LineType,\n} from './components/AesSettings/types';\nimport {\n DEFAULT_BLACK,\n DEFAULT_DOT_SHAPE,\n DEFAULT_LINE_TYPE,\n} from './constantsAesthetic';\nimport { DEFAULT_DOT_SIZE, DEFAULT_LINE_COLOR } from './dataBindAes';\nimport BarAndErrorIcon from './icons/BarAndErrorIcon.vue';\nimport BarAndLineIcon from './icons/BarAndLineIcon.vue';\nimport BarIcon from './icons/BarIcon.vue';\nimport BinnedDotsIcon from './icons/BinnedDotsIcon.vue';\nimport BoxplotAndBinnedIcon from './icons/BoxplotAndBinnedIcon.vue';\nimport BoxplotAndJitterIcon from './icons/BoxplotAndJitterIcon.vue';\nimport BoxplotIcon from './icons/BoxplotIcon.vue';\nimport DendroIcon from './icons/DendroIcon.vue';\nimport HeatmapIcon from './icons/HeatmapIcon.vue';\nimport JitteredDotsIcon from './icons/JitteredDotsIcon.vue';\nimport LineAndBinnedIcon from './icons/LineAndBinnedIcon.vue';\nimport LineAndErrorbarIcon from './icons/LineAndErrorbarIcon.vue';\nimport LineAndJitterIcon from './icons/LineAndJitterIcon.vue';\nimport LineIcon from './icons/LineIcon.vue';\nimport LogoIcon from './icons/LogoIcon.vue';\nimport ScatterplotIcon from './icons/ScatterplotIcon.vue';\nimport SinaIcon from './icons/SinaIcon.vue';\nimport StackedBarIcon from './icons/StackedBarIcon.vue';\nimport StackedAreaIcon from './icons/StackedAreaIcon.vue';\nimport ViolinAndBinnedIcon from './icons/ViolinAndBinnedIcon.vue';\nimport ViolinAndJitterIcon from './icons/ViolinAndJitterIcon.vue';\nimport ViolinIcon from './icons/ViolinIcon.vue';\nimport type {\n AxisTitleMode,\n DeepPartial,\n DiscreteLayer,\n DiscreteLayersTemplate,\n Frame,\n HeatmapFrame, HeatmapLayer, HeatmapLayerTemplate, HistogramLayer, HistogramLayerTemplate,\n LabelsPosition,\n LabelsRotation,\n Layer,\n LayersTemplate,\n Scale,\n ScatterplotLayer,\n ScatterplotLayersTemplate,\n TitlePosition,\n} from './types';\n\nexport const DEFAULT_CHART_TYPE: ChartType = 'discrete';\n\nexport function getInitialTemplate(\n restoredTemplate: LayersTemplate | null,\n chartType: ChartType,\n) {\n if (chartType === 'discrete') {\n return restoredTemplate\n && DISCRETE_TEMPLATES_MAP[restoredTemplate as DiscreteLayersTemplate]\n ? restoredTemplate\n : 'box';\n }\n if (chartType === 'scatterplot' || chartType === 'scatterplot-umap') {\n return restoredTemplate\n && SCATTERPLOT_TEMPLATES_MAP[restoredTemplate as ScatterplotLayersTemplate]\n ? restoredTemplate\n : 'dots';\n }\n if (chartType === 'dendro') {\n return 'dendro';\n }\n return restoredTemplate ?? 'heatmap';\n}\n\nexport const DISCRETE_TEMPLATES_MAP: Record<\n DiscreteLayersTemplate,\n DiscreteLayer[]\n> = {\n box: ['box'],\n box_binnedDots: ['box', 'binnedDots'],\n box_jitteredDots: ['box', 'jitteredDots'],\n violin: ['violin'],\n violin_binnedDots: ['violin', 'binnedDots'],\n violin_jitteredDots: ['violin', 'jitteredDots'],\n binnedDots: ['binnedDots'],\n jitteredDots: ['jitteredDots'],\n bar: ['bar'],\n bar_line: ['bar', 'line'],\n bar_errorbar: ['bar', 'errorbar'],\n stackedBar: ['stackedBar'],\n stackedArea: ['stackedArea'],\n line: ['line'],\n line_jitteredDots: ['line', 'jitteredDots'],\n line_binnedDots: ['line', 'binnedDots'],\n line_errorbar: ['line', 'errorbar'],\n errorbar: ['errorbar'],\n sina: ['sina'],\n logo: ['logo'],\n};\n\nexport const SCATTERPLOT_TEMPLATES_MAP: Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n> = {\n dots: ['dots'],\n curve: ['curve'],\n curve_dots: ['curve', 'dots'],\n};\n\nexport const SCATTERPLOT_UMAP_TEMPLATES_MAP: Partial<Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n>> = {\n dots: ['dots'],\n curve_dots: ['curve', 'dots'],\n};\n\nexport const HEATMAP_TEMPLATES_MAP: Record<HeatmapLayerTemplate, HeatmapLayer[]> = {\n heatmap: ['heatmap'],\n heatmapClustered: ['heatmapClustered'],\n};\nexport const HISTOGRAM_TEMPLATES_MAP: Record<HistogramLayerTemplate, HistogramLayer[]> = {\n bins: ['bins'],\n};\nexport const LAYER_TITLES: Record<Layer, string> = {\n box: 'Boxplot',\n binnedDots: 'Binned Dots',\n jitteredDots: 'Jittered Dots',\n violin: 'Violins',\n bar: 'Bar',\n stackedBar: 'Stacked Bar',\n stackedArea: 'Stacked Bar + Stream Area',\n line: 'Line',\n errorbar: 'Error Bar',\n sina: 'Sina',\n logo: 'Logo Plot',\n dots: 'Scatter Plot',\n curve: 'Curve',\n heatmap: 'Heatmap',\n heatmapClustered: 'Heatmap + Dendro',\n dendro: 'Dendrogram',\n bins: 'Histogram',\n bubble: 'Bubble plot',\n};\n\nexport type DiscreteStatisticsState = {\n overall: {\n data: { testMethod: null | string };\n validity: { testMethod: boolean };\n };\n referenceGroup: {\n data: {\n testMethod: null | string;\n referenceGroup: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: {\n testMethod: boolean;\n referenceGroup: boolean;\n };\n };\n pairwise: {\n data: {\n testMethod: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: { testMethod: boolean };\n };\n};\n\nexport type ScatterplotStatisticsState = {\n trend: {\n on: boolean;\n trim: boolean;\n showLegend: boolean;\n };\n};\n\nexport type StatisticsState = DiscreteStatisticsState | ScatterplotStatisticsState;\n\nexport function getInitialStatisticsState(chartType: ChartType, initialData?: DeepPartial<StatisticsState>): StatisticsState {\n if (chartType === 'discrete') {\n const initial = initialData as DiscreteStatisticsState;\n return {\n overall: {\n data: { testMethod: initial?.overall?.data?.testMethod ?? null },\n validity: { testMethod: initial?.overall?.validity?.testMethod ?? true },\n },\n referenceGroup: {\n data: {\n testMethod: initial?.referenceGroup?.data?.testMethod ?? null,\n referenceGroup: initial?.referenceGroup?.data?.referenceGroup ?? null,\n correctionMethod: initial?.referenceGroup?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.referenceGroup?.data?.format ?? 'significance',\n ns: initial?.referenceGroup?.data?.ns ?? false,\n },\n validity: {\n testMethod: initial?.referenceGroup?.validity?.testMethod ?? true,\n referenceGroup: initial?.referenceGroup?.validity?.referenceGroup ?? true,\n },\n },\n pairwise: {\n data: {\n testMethod: initial?.pairwise?.data?.testMethod ?? null,\n correctionMethod: initial?.pairwise?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.pairwise?.data?.format ?? 'significance',\n ns: initial?.pairwise?.data?.ns ?? false,\n },\n validity: { testMethod: initial?.pairwise?.validity?.testMethod ?? true },\n },\n } as DiscreteStatisticsState;\n }\n const initial = initialData as ScatterplotStatisticsState;\n return {\n trend: {\n on: initial?.trend?.on ?? false,\n trim: initial?.trend?.trim ?? false,\n showLegend: initial?.trend?.showLegend ?? true,\n },\n };\n}\n\nexport type NumberRange = { min: number; max: number };\nexport type MappingLink = { type: string; value?: string }; // {type: 'primaryGrouping'} for example\nexport type ColorAes = string | MappingLink;\nexport type DotShapeAes = DotShape | MappingLink;\nexport type DotSizeAes = number | NumberRange;\nexport type LineTypeAes = LineType | MappingLink;\nexport type FixedOrMappedAes = ColorAes | DotShapeAes | LineTypeAes;\n\nexport type ContinuousDataMappingSize = {\n column: string;\n range: NumberRange;\n};\n\nexport type ContinuousDataMappingForGraph<T extends string | number> = { columnName: ColumnNameSchema; domain: number[]; range: T[]; type: 'linear' | 'log' };\n\nexport type ColumnNameSchema = {\n type: 'column';\n value: string;\n label?: string;\n valueLabels?: string;\n};\n\nexport function isNumberRange(v: number | NumberRange | null | undefined): v is NumberRange {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'min' in v && 'max' in v;\n}\n\nexport function isMappedAes(\n item: FixedOrMappedAes | null | string | number | boolean | unknown,\n): item is MappingLink {\n return typeof item === 'object' && item !== null && 'type' in item;\n}\n\nexport function isContinuousDataMapping(v: ContinuousDataMappingSize | MappingLink | number | string | null | undefined): v is ContinuousDataMappingSize {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'range' in v;\n}\n\nexport type LayersSettings = {\n // bubble\n bubble: {\n NAValueAs: number | null;\n minRadius: number;\n maxRadius: number;\n normalizationDirection: 'row' | 'column' | null;\n normalizationMethod: 'standardScaling' | 'meanNormalization';\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max';\n strokeColor: null | string;\n };\n // histogram\n bins: {\n fillColor: ColorAes | null;\n opacity: number;\n };\n // dendrogram\n dendro: {\n dotFill: ColorAes;\n dotShape: DotShapeAes;\n dotSize: DotSizeAes;\n lineColor: ColorAes;\n mode: 'normal' | 'useAllNodesAsLeaves';\n leavesMode: 'normal' | 'alignLeavesToLine';\n showTable: boolean;\n showLegend: boolean;\n };\n // heatmap\n heatmap: {\n NAValueAs: number | null;\n normalizationDirection: 'row' | 'column' | null;\n normalizationMethod: 'standardScaling' | 'meanNormalization';\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max';\n };\n heatmapClustered: {\n NAValueAs: number | null;\n normalizationDirection: 'row' | 'column' | null;\n normalizationMethod: 'standardScaling' | 'meanNormalization';\n dendrogramX: boolean;\n dendrogramY: boolean;\n disableClusteringX: boolean;\n disableClusteringY: boolean;\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max';\n };\n // scatterplot\n dots: {\n dotFill: ColorAes | null;\n dotShape: DotShapeAes | null;\n dotSize: ContinuousDataMappingSize | number | null;\n };\n curve: {\n smoothing: boolean;\n lineColor: ColorAes;\n };\n // discrete\n box: {\n showOutliers: boolean;\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n dotShape: DotShapeAes;\n lineType: LineTypeAes;\n gapWidth: number;\n opacity: number;\n stat: {\n low: number;\n middle: number;\n upper: number;\n k: number;\n };\n };\n binnedDots: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n opacity: number;\n showOutliers: boolean;\n };\n jitteredDots: {\n dotFill: ColorAes | null;\n dotShape: DotShapeAes;\n lineColor: ColorAes;\n opacity: number;\n showOutliers: boolean;\n };\n violin: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n lineType: LineTypeAes;\n opacity: number;\n trim: boolean;\n showQuartiles: boolean;\n quartilesLineStyle: LineType;\n medianLineStyle: LineType;\n };\n bar: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n opacity: number;\n height: 'max' | 'mean' | 'median';\n };\n stackedBar: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n opacity: number;\n normalize: boolean;\n height: 'sum' | 'max' | 'mean' | 'median';\n };\n stackedArea: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n barsOpacity: number;\n areaOpacity: number;\n normalize: boolean;\n height: 'sum' | 'max' | 'mean' | 'median';\n showBars: boolean;\n };\n line: {\n pointsValues: 'mean' | 'median';\n emptyGroupValue: number;\n lineColor: ColorAes | null;\n dotShape: DotShapeAes;\n lineType: LineTypeAes;\n dotFill: ColorAes | null;\n opacity: number;\n };\n errorbar: {\n pointsValues: 'mean' | 'median';\n interval: 'sd' | 'se' | '';\n lineColor: ColorAes | null;\n dotShape: DotShapeAes;\n dotFill: ColorAes | null;\n opacity: number;\n };\n sina: {\n dotFill: ColorAes | null;\n dotShape: DotShapeAes;\n opacity: number;\n showOutliers: boolean;\n };\n logo: {\n normalize: boolean;\n opacity: number;\n };\n};\nexport const DEFAULT_LAYERS_SETTINGS: () => LayersSettings = () => ({\n // bubble\n bubble: {\n NAValueAs: 0,\n strokeColor: null,\n minRadius: 3,\n maxRadius: 38,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean',\n },\n // histogram\n bins: {\n fillColor: null,\n opacity: 1,\n },\n // dendro\n dendro: {\n dotFill: DEFAULT_BLACK,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineColor: DEFAULT_BLACK,\n mode: 'normal',\n leavesMode: 'normal',\n showTable: false,\n showLegend: true,\n },\n // heatmap\n heatmap: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean',\n },\n heatmapClustered: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n dendrogramX: true,\n dendrogramY: true,\n disableClusteringX: false,\n disableClusteringY: false,\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean',\n },\n // scatterplot\n dots: {\n dotFill: null as ColorAes | null,\n dotShape: null as DotShapeAes | null,\n dotSize: null as ContinuousDataMappingSize | number | null,\n },\n curve: { lineColor: DEFAULT_BLACK, smoothing: true },\n // discrete\n box: {\n showOutliers: true,\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n gapWidth: 0.2,\n opacity: 1,\n stat: {\n low: 0.25,\n middle: 0.5,\n upper: 0.75,\n k: 1.5,\n },\n },\n binnedDots: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true,\n },\n jitteredDots: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true,\n },\n violin: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n opacity: 1,\n trim: false,\n showQuartiles: false,\n quartilesLineStyle: 'dashed',\n medianLineStyle: 'solid',\n },\n bar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n height: 'max',\n },\n stackedBar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n normalize: false,\n height: 'sum',\n },\n stackedArea: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n barsOpacity: 1,\n areaOpacity: 0.7,\n normalize: false,\n showBars: true,\n height: 'sum',\n },\n line: {\n pointsValues: 'mean',\n emptyGroupValue: 0,\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n dotFill: null as ColorAes | null,\n opacity: 1,\n },\n errorbar: {\n pointsValues: 'mean',\n interval: 'sd',\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n dotFill: null as ColorAes | null,\n opacity: 1,\n },\n sina: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n opacity: 1,\n showOutliers: true,\n },\n logo: {\n normalize: false,\n opacity: 1,\n },\n});\n\nexport function getDefaultLayersSettings() {\n return DEFAULT_LAYERS_SETTINGS();\n}\n\nconst DISCRETE_LAYERS: Layer[] = [\n 'box',\n 'binnedDots',\n 'jitteredDots',\n 'violin',\n 'bar',\n 'stackedBar',\n 'line',\n 'errorbar',\n 'sina',\n 'logo',\n];\nconst SCATTERPLOT_LAYERS: Layer[] = ['dots', 'curve'];\nconst SCATTERPLOT_UMAP_LAYERS: Layer[] = ['dots'];\nconst HEATMAP_LAYERS: Layer[] = ['heatmap', 'heatmapClustered'];\nconst DENDRO_LAYERS: Layer[] = ['dendro'];\nconst HISTOGRAM_LAYERS: Layer[] = ['bins'];\nconst BUBBLE_LAYERS: Layer[] = ['bubble'];\nconst _LAYERS_BY_CHART_TYPE: Record<ChartType, Layer[]> = {\n 'discrete': DISCRETE_LAYERS,\n 'scatterplot': SCATTERPLOT_LAYERS,\n 'scatterplot-umap': SCATTERPLOT_UMAP_LAYERS,\n 'heatmap': HEATMAP_LAYERS,\n 'dendro': DENDRO_LAYERS,\n 'histogram': HISTOGRAM_LAYERS,\n 'bubble': BUBBLE_LAYERS,\n};\n\nexport function getInitialLayersSettings(\n initialSettings?: DeepPartial<LayersSettings>,\n): LayersSettings {\n const defaultSettings = DEFAULT_LAYERS_SETTINGS();\n const layers: Layer[] = Object.keys(defaultSettings) as Layer[];\n return layers.reduce((res, layer) => {\n Object.assign(\n res[layer],\n initialSettings?.[layer] ?? {},\n );\n return res;\n }, defaultSettings);\n}\n\nexport type Sorting = 'asc' | 'desc';\nexport type AxesState = {\n title: { value: string; position: TitlePosition; mode: AxisTitleMode; facetTitleFrame: Frame };\n axisX: {\n labelsPosition: LabelsPosition; // for heatmap - top/bottom/left/right/hidden\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n titleMode: AxisTitleMode; // 'auto' - from column or 'custom' - from 'customTitle' field or 'hidden'\n customTitle: string; // user axis title, not default from column\n gridlines: boolean;\n linesBetweenCategories: boolean; // for discrete - position for vertical gridlines\n ticks: boolean;\n scale: Scale; // linear or log\n significantLinesStyle: LineType;\n sorting: Sorting;\n allowNullPrimaryGroups: boolean; // for discrete - allow group with null grouping value\n allowNullSecondaryGroups: boolean;\n order: {\n source: string;\n options: { value: string; label: string }[];\n } | null;\n cellSize: number | null;\n annotationTitlePosition: 'left' | 'right' | 'hidden';\n };\n axisY: {\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n titleMode: AxisTitleMode;\n customTitle: string;\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n gridlines: boolean;\n ticks: boolean;\n scale: Scale;\n significantLinesStyle: LineType;\n sorting: Sorting;\n order: {\n source: string;\n options: { value: string; label: string }[];\n } | null;\n cellSize: number | null;\n annotationTitlePosition: 'top' | 'bottom' | 'hidden';\n };\n legend: { show?: boolean };\n other: {\n frame: Frame | HeatmapFrame;\n reverse: boolean;\n facetSharedBy: 'x' | 'y' | 'xy' | 'none';\n facetColumns: number;\n binsCount: number;\n groupingDirection: 'straight' | 'reverse';\n groupingStack: 'vertical' | 'horizontal';\n canvasRenderMode: boolean;\n };\n};\n\nconst DEFAULT_AXES: () => AxesState = () => ({\n title: {\n value: 'Graph 1',\n position: 'center',\n mode: 'auto',\n facetTitleFrame: 'full',\n },\n axisX: {\n labelsPosition: 'bottom',\n labelsRotation: null,\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n titleMode: 'auto',\n customTitle: '',\n gridlines: true,\n linesBetweenCategories: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n allowNullPrimaryGroups: false,\n allowNullSecondaryGroups: false,\n order: null,\n cellSize: null,\n annotationTitlePosition: 'right',\n },\n axisY: {\n labelsRotation: null,\n titleMode: 'auto',\n customTitle: '',\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n gridlines: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n order: null,\n cellSize: null,\n annotationTitlePosition: 'top',\n },\n legend: {},\n other: {\n frame: 'full',\n reverse: false,\n canvasRenderMode: false,\n facetSharedBy: 'xy',\n facetColumns: 3,\n binsCount: 10,\n groupingDirection: 'straight',\n groupingStack: 'vertical',\n },\n});\n\nfunction isHeatmapFrame(frame: Frame | HeatmapFrame): frame is HeatmapFrame {\n return frame === 'full' || frame === 'none';\n}\n\nexport function getInitialAxesSettings(\n chartType: ChartType,\n initialAxesSettings?: DeepPartial<AxesState>,\n): AxesState {\n const defaultAxes = DEFAULT_AXES();\n if (!initialAxesSettings) {\n return defaultAxes;\n }\n\n // TODO: divide into separated settings for chart types\n function getFrame(frame?: Frame | HeatmapFrame): Frame | HeatmapFrame {\n if (!frame) {\n return 'full';\n }\n if (chartType === 'heatmap' && !isHeatmapFrame(frame)) {\n return 'full' as HeatmapFrame;\n }\n if (chartType !== 'heatmap' && isHeatmapFrame(frame)) {\n return frame === 'none' ? 'empty' : (frame as Frame);\n }\n return frame;\n }\n\n return {\n title: {\n ...defaultAxes.title,\n ...initialAxesSettings.title,\n },\n axisX: {\n ...defaultAxes.axisX,\n ...initialAxesSettings.axisX,\n },\n axisY: {\n ...defaultAxes.axisY,\n ...initialAxesSettings.axisY,\n },\n legend: {\n ...defaultAxes.legend,\n ...initialAxesSettings.legend,\n },\n other: {\n ...defaultAxes.other,\n ...initialAxesSettings.other,\n frame: getFrame(initialAxesSettings.other?.frame),\n },\n };\n}\n\nexport const LAYER_ICONS: Record<LayersTemplate, Component> = {\n box: BoxplotIcon,\n box_binnedDots: BoxplotAndBinnedIcon,\n box_jitteredDots: BoxplotAndJitterIcon,\n binnedDots: BinnedDotsIcon,\n jitteredDots: JitteredDotsIcon,\n violin: ViolinIcon,\n violin_binnedDots: ViolinAndBinnedIcon,\n violin_jitteredDots: ViolinAndJitterIcon,\n bar: BarIcon,\n bar_line: BarAndLineIcon,\n bar_errorbar: BarAndErrorIcon,\n stackedBar: StackedBarIcon,\n stackedArea: StackedAreaIcon,\n line: LineIcon,\n line_binnedDots: LineAndBinnedIcon,\n line_jitteredDots: LineAndJitterIcon,\n line_errorbar: LineAndErrorbarIcon,\n errorbar: BarAndLineIcon,\n sina: SinaIcon,\n logo: LogoIcon,\n dots: ScatterplotIcon,\n curve: LineIcon,\n curve_dots: LineAndJitterIcon,\n heatmap: HeatmapIcon,\n heatmapClustered: DendroIcon,\n dendro: DendroIcon,\n bins: BarIcon,\n bubble: HeatmapIcon,\n};\n\ntype Option = { value: string; text: string };\nexport const STAT_TEST_METHOD: Option[] = [\n { value: 'ttest', text: 'TTest' },\n { value: 'anova', text: 'ANOVA' },\n { value: 'wilcoxon', text: 'Wilcoxon' },\n { value: 'kruskalWallis', text: 'Kruskal-Wallis' },\n];\n\nexport const STAT_CORRECTION_METHOD: Option[] = [\n { value: 'BenjaminiHochberg', text: 'Benjamini-Hochberg' },\n { value: 'BenjaminiYekutieli', text: 'Benjamini-Yekutieli' },\n { value: 'Bonferroni', text: 'Bonferroni' },\n { value: 'Hochberg', text: 'Hochberg' },\n { value: 'Holm', text: 'Holm' },\n { value: 'Hommel', text: 'Hommel' },\n { value: 'none', text: 'None' },\n];\n\nexport const FORMAT_P_VALUE_OPTIONS: Option[] = [\n { value: 'pValue', text: 'p-value' },\n { value: 'significance', text: 'significance' },\n];\n\nexport type AesType = 'fill' | 'stroke' | 'dotShape' | 'lineType' | 'size';\n\nexport const DEFAULT_WIDTH = 600;\nexport const DEFAULT_HEIGHT = 350;\nexport const DEFAULT_WIDTH_SMALL = 400;\nexport const DEFAULT_HEIGHT_SMALL = 250;\n\nexport const MAX_SEARCH_OPTIONS_LIST_LENGTH = 100;\n"],"names":["getInitialTemplate","restoredTemplate","chartType","DISCRETE_TEMPLATES_MAP","SCATTERPLOT_TEMPLATES_MAP","SCATTERPLOT_UMAP_TEMPLATES_MAP","HEATMAP_TEMPLATES_MAP","HISTOGRAM_TEMPLATES_MAP","LAYER_TITLES","getInitialStatisticsState","initialData","initial","_C","_D","_E","isNumberRange","v","isMappedAes","item","isContinuousDataMapping","DEFAULT_LAYERS_SETTINGS","DEFAULT_BLACK","DEFAULT_DOT_SHAPE","DEFAULT_DOT_SIZE","DEFAULT_LINE_COLOR","DEFAULT_LINE_TYPE","getInitialLayersSettings","initialSettings","defaultSettings","res","layer","DEFAULT_AXES","isHeatmapFrame","frame","getInitialAxesSettings","initialAxesSettings","defaultAxes","getFrame","_a","LAYER_ICONS","BoxplotIcon","BoxplotAndBinnedIcon","BoxplotAndJitterIcon","BinnedDotsIcon","JitteredDotsIcon","ViolinIcon","ViolinAndBinnedIcon","ViolinAndJitterIcon","BarIcon","BarAndLineIcon","BarAndErrorIcon","StackedBarIcon","StackedAreaIcon","LineIcon","LineAndBinnedIcon","LineAndJitterIcon","LineAndErrorbarIcon","SinaIcon","LogoIcon","ScatterplotIcon","HeatmapIcon","DendroIcon","STAT_TEST_METHOD","STAT_CORRECTION_METHOD","FORMAT_P_VALUE_OPTIONS","DEFAULT_WIDTH","DEFAULT_HEIGHT","DEFAULT_WIDTH_SMALL","DEFAULT_HEIGHT_SMALL","MAX_SEARCH_OPTIONS_LIST_LENGTH"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqDO,SAASA,GACdC,GACAC,GACA;AACA,SAAIA,MAAc,aACTD,KACFE,GAAuBF,CAA0C,IAClEA,IACA,QAEFC,MAAc,iBAAiBA,MAAc,qBACxCD,KACFG,GAA0BH,CAA6C,IACxEA,IACA,SAEFC,MAAc,WACT,WAEFD,KAAoB;AAC7B;AAEO,MAAME,KAGT;AAAA,EACF,KAAK,CAAC,KAAK;AAAA,EACX,gBAAgB,CAAC,OAAO,YAAY;AAAA,EACpC,kBAAkB,CAAC,OAAO,cAAc;AAAA,EACxC,QAAQ,CAAC,QAAQ;AAAA,EACjB,mBAAmB,CAAC,UAAU,YAAY;AAAA,EAC1C,qBAAqB,CAAC,UAAU,cAAc;AAAA,EAC9C,YAAY,CAAC,YAAY;AAAA,EACzB,cAAc,CAAC,cAAc;AAAA,EAC7B,KAAK,CAAC,KAAK;AAAA,EACX,UAAU,CAAC,OAAO,MAAM;AAAA,EACxB,cAAc,CAAC,OAAO,UAAU;AA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,WAAA;AAAA,EAC3B,EAAE,OAAO,iBAAiB,MAAM,iBAAA;AAClC,GAEaC,KAAmC;AAAA,EAC9C,EAAE,OAAO,qBAAqB,MAAM,qBAAA;AAAA,EACpC,EAAE,OAAO,sBAAsB,MAAM,sBAAA;AAAA,EACrC,EAAE,OAAO,cAAc,MAAM,aAAA;AAAA,EAC7B,EAAE,OAAO,YAAY,MAAM,WAAA;AAAA,EAC3B,EAAE,OAAO,QAAQ,MAAM,OAAA;AAAA,EACvB,EAAE,OAAO,UAAU,MAAM,SAAA;AAAA,EACzB,EAAE,OAAO,QAAQ,MAAM,OAAA;AACzB,GAEaC,KAAmC;AAAA,EAC9C,EAAE,OAAO,UAAU,MAAM,UAAA;AAAA,EACzB,EAAE,OAAO,gBAAgB,MAAM,eAAA;AACjC,GAIaC,KAAgB,KAChBC,KAAiB,KACjBC,KAAsB,KACtBC,KAAuB,KAEvBC,KAAiC;"}
|
|
1
|
+
{"version":3,"file":"constantsCommon.js","sources":["../src/constantsCommon.ts"],"sourcesContent":["import type { ChartType } from '@milaboratories/pf-plots';\nimport type { Component } from 'vue';\nimport type {\n DotShape,\n LineType,\n} from './components/AesSettings/types';\nimport {\n DEFAULT_BLACK,\n DEFAULT_DOT_SHAPE,\n DEFAULT_LINE_TYPE,\n} from './constantsAesthetic';\nimport { DEFAULT_DOT_SIZE, DEFAULT_LINE_COLOR } from './dataBindAes';\nimport BarAndErrorIcon from './icons/BarAndErrorIcon.vue';\nimport BarAndLineIcon from './icons/BarAndLineIcon.vue';\nimport BarIcon from './icons/BarIcon.vue';\nimport BinnedDotsIcon from './icons/BinnedDotsIcon.vue';\nimport BoxplotAndBinnedIcon from './icons/BoxplotAndBinnedIcon.vue';\nimport BoxplotAndJitterIcon from './icons/BoxplotAndJitterIcon.vue';\nimport BoxplotIcon from './icons/BoxplotIcon.vue';\nimport DendroIcon from './icons/DendroIcon.vue';\nimport HeatmapIcon from './icons/HeatmapIcon.vue';\nimport JitteredDotsIcon from './icons/JitteredDotsIcon.vue';\nimport LineAndBinnedIcon from './icons/LineAndBinnedIcon.vue';\nimport LineAndErrorbarIcon from './icons/LineAndErrorbarIcon.vue';\nimport LineAndJitterIcon from './icons/LineAndJitterIcon.vue';\nimport LineIcon from './icons/LineIcon.vue';\nimport LogoIcon from './icons/LogoIcon.vue';\nimport ScatterplotIcon from './icons/ScatterplotIcon.vue';\nimport SinaIcon from './icons/SinaIcon.vue';\nimport StackedBarIcon from './icons/StackedBarIcon.vue';\nimport StackedAreaIcon from './icons/StackedAreaIcon.vue';\nimport ViolinAndBinnedIcon from './icons/ViolinAndBinnedIcon.vue';\nimport ViolinAndJitterIcon from './icons/ViolinAndJitterIcon.vue';\nimport ViolinIcon from './icons/ViolinIcon.vue';\nimport type {\n AxisTitleMode,\n DeepPartial,\n DiscreteLayer,\n DiscreteLayersTemplate,\n Frame,\n HeatmapFrame, HeatmapLayer, HeatmapLayerTemplate, HistogramLayer, HistogramLayerTemplate,\n LabelsPosition,\n LabelsRotation,\n Layer,\n LayersTemplate,\n Scale,\n ScatterplotLayer,\n ScatterplotLayersTemplate,\n TitlePosition,\n} from './types';\n\nexport const DEFAULT_CHART_TYPE: ChartType = 'discrete';\n\nexport function getInitialTemplate(\n restoredTemplate: LayersTemplate | null,\n chartType: ChartType,\n) {\n if (chartType === 'discrete') {\n return restoredTemplate\n && DISCRETE_TEMPLATES_MAP[restoredTemplate as DiscreteLayersTemplate]\n ? restoredTemplate\n : 'box';\n }\n if (chartType === 'scatterplot' || chartType === 'scatterplot-umap') {\n return restoredTemplate\n && SCATTERPLOT_TEMPLATES_MAP[restoredTemplate as ScatterplotLayersTemplate]\n ? restoredTemplate\n : 'dots';\n }\n if (chartType === 'dendro') {\n return 'dendro';\n }\n return restoredTemplate ?? 'heatmap';\n}\n\nexport const DISCRETE_TEMPLATES_MAP: Record<\n DiscreteLayersTemplate,\n DiscreteLayer[]\n> = {\n box: ['box'],\n box_binnedDots: ['box', 'binnedDots'],\n box_jitteredDots: ['box', 'jitteredDots'],\n violin: ['violin'],\n violin_binnedDots: ['violin', 'binnedDots'],\n violin_jitteredDots: ['violin', 'jitteredDots'],\n binnedDots: ['binnedDots'],\n jitteredDots: ['jitteredDots'],\n bar: ['bar'],\n bar_line: ['bar', 'line'],\n bar_errorbar: ['bar', 'errorbar'],\n stackedBar: ['stackedBar'],\n stackedArea: ['stackedArea'],\n line: ['line'],\n line_jitteredDots: ['line', 'jitteredDots'],\n line_binnedDots: ['line', 'binnedDots'],\n line_errorbar: ['line', 'errorbar'],\n errorbar: ['errorbar'],\n sina: ['sina'],\n logo: ['logo'],\n};\n\nexport const SCATTERPLOT_TEMPLATES_MAP: Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n> = {\n dots: ['dots'],\n curve: ['curve'],\n curve_dots: ['curve', 'dots'],\n};\n\nexport const SCATTERPLOT_UMAP_TEMPLATES_MAP: Partial<Record<\n ScatterplotLayersTemplate,\n ScatterplotLayer[]\n>> = {\n dots: ['dots'],\n curve_dots: ['curve', 'dots'],\n};\n\nexport const HEATMAP_TEMPLATES_MAP: Record<HeatmapLayerTemplate, HeatmapLayer[]> = {\n heatmap: ['heatmap'],\n heatmapClustered: ['heatmapClustered'],\n};\nexport const HISTOGRAM_TEMPLATES_MAP: Record<HistogramLayerTemplate, HistogramLayer[]> = {\n bins: ['bins'],\n};\nexport const LAYER_TITLES: Record<Layer, string> = {\n box: 'Boxplot',\n binnedDots: 'Binned Dots',\n jitteredDots: 'Jittered Dots',\n violin: 'Violins',\n bar: 'Bar',\n stackedBar: 'Stacked Bar',\n stackedArea: 'Stacked Bar + Stream Area',\n line: 'Line',\n errorbar: 'Error Bar',\n sina: 'Sina',\n logo: 'Logo Plot',\n dots: 'Scatter Plot',\n curve: 'Curve',\n heatmap: 'Heatmap',\n heatmapClustered: 'Heatmap + Dendro',\n dendro: 'Dendrogram',\n bins: 'Histogram',\n bubble: 'Bubble plot',\n};\n\nexport type DiscreteStatisticsState = {\n overall: {\n data: { testMethod: null | string };\n validity: { testMethod: boolean };\n };\n referenceGroup: {\n data: {\n testMethod: null | string;\n referenceGroup: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: {\n testMethod: boolean;\n referenceGroup: boolean;\n };\n };\n pairwise: {\n data: {\n testMethod: null | string;\n correctionMethod: string;\n format: 'significance' | 'pValue';\n ns: boolean;\n };\n validity: { testMethod: boolean };\n };\n};\n\nexport type ScatterplotStatisticsState = {\n trend: {\n on: boolean;\n trim: boolean;\n showLegend: boolean;\n };\n};\n\nexport type StatisticsState = DiscreteStatisticsState | ScatterplotStatisticsState;\n\nexport function getInitialStatisticsState(chartType: ChartType, initialData?: DeepPartial<StatisticsState>): StatisticsState {\n if (chartType === 'discrete') {\n const initial = initialData as DiscreteStatisticsState;\n return {\n overall: {\n data: { testMethod: initial?.overall?.data?.testMethod ?? null },\n validity: { testMethod: initial?.overall?.validity?.testMethod ?? true },\n },\n referenceGroup: {\n data: {\n testMethod: initial?.referenceGroup?.data?.testMethod ?? null,\n referenceGroup: initial?.referenceGroup?.data?.referenceGroup ?? null,\n correctionMethod: initial?.referenceGroup?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.referenceGroup?.data?.format ?? 'significance',\n ns: initial?.referenceGroup?.data?.ns ?? false,\n },\n validity: {\n testMethod: initial?.referenceGroup?.validity?.testMethod ?? true,\n referenceGroup: initial?.referenceGroup?.validity?.referenceGroup ?? true,\n },\n },\n pairwise: {\n data: {\n testMethod: initial?.pairwise?.data?.testMethod ?? null,\n correctionMethod: initial?.pairwise?.data?.correctionMethod ?? 'Bonferroni',\n format: initial?.pairwise?.data?.format ?? 'significance',\n ns: initial?.pairwise?.data?.ns ?? false,\n },\n validity: { testMethod: initial?.pairwise?.validity?.testMethod ?? true },\n },\n } as DiscreteStatisticsState;\n }\n const initial = initialData as ScatterplotStatisticsState;\n return {\n trend: {\n on: initial?.trend?.on ?? false,\n trim: initial?.trend?.trim ?? false,\n showLegend: initial?.trend?.showLegend ?? true,\n },\n };\n}\n\nexport type NumberRange = { min: number; max: number };\nexport type MappingLink = { type: string; value?: string }; // {type: 'primaryGrouping'} for example\nexport type ColorAes = string | MappingLink;\nexport type DotShapeAes = DotShape | MappingLink;\nexport type DotSizeAes = number | NumberRange;\nexport type LineTypeAes = LineType | MappingLink;\nexport type FixedOrMappedAes = ColorAes | DotShapeAes | LineTypeAes;\n\nexport type ContinuousDataMappingSize = {\n column: string;\n range: NumberRange;\n};\n\nexport type ContinuousDataMappingForGraph<T extends string | number> = { columnName: ColumnNameSchema; domain: number[]; range: T[]; type: 'linear' | 'log' };\n\nexport type ColumnNameSchema = {\n type: 'column';\n value: string;\n label?: string;\n valueLabels?: string;\n};\n\nexport function isNumberRange(v: number | NumberRange | null | undefined): v is NumberRange {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'min' in v && 'max' in v;\n}\n\nexport function isMappedAes(\n item: FixedOrMappedAes | null | string | number | boolean | unknown,\n): item is MappingLink {\n return typeof item === 'object' && item !== null && 'type' in item;\n}\n\nexport function isContinuousDataMapping(v: ContinuousDataMappingSize | MappingLink | number | string | null | undefined): v is ContinuousDataMappingSize {\n return typeof v !== 'undefined' && v !== null && typeof v === 'object' && 'range' in v;\n}\n\nexport type LayersSettings = {\n // bubble\n bubble: {\n NAValueAs: number | null;\n minRadius: number;\n maxRadius: number;\n normalizationDirection: 'row' | 'column' | null;\n normalizationMethod: 'standardScaling' | 'meanNormalization';\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max';\n strokeColor: null | string;\n };\n // histogram\n bins: {\n fillColor: ColorAes | null;\n opacity: number;\n };\n // dendrogram\n dendro: {\n dotFill: ColorAes;\n dotShape: DotShapeAes;\n dotSize: DotSizeAes;\n lineColor: ColorAes;\n mode: 'normal' | 'useAllNodesAsLeaves';\n leavesMode: 'normal' | 'alignLeavesToLine';\n showTable: boolean;\n showLegend: boolean;\n };\n // heatmap\n heatmap: {\n NAValueAs: number | null;\n normalizationDirection: 'row' | 'column' | null;\n normalizationMethod: 'standardScaling' | 'meanNormalization';\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max';\n };\n heatmapClustered: {\n NAValueAs: number | null;\n normalizationDirection: 'row' | 'column' | null;\n normalizationMethod: 'standardScaling' | 'meanNormalization';\n dendrogramX: boolean;\n dendrogramY: boolean;\n disableClusteringX: boolean;\n disableClusteringY: boolean;\n aggregateByX: boolean;\n aggregateByY: boolean;\n aggregationMethod: 'mean' | 'median' | 'min' | 'max';\n };\n // scatterplot\n dots: {\n dotFill: ColorAes | null;\n dotShape: DotShapeAes | null;\n dotSize: ContinuousDataMappingSize | number | null;\n };\n curve: {\n smoothing: boolean;\n lineColor: ColorAes;\n };\n // discrete\n box: {\n showOutliers: boolean;\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n dotShape: DotShapeAes;\n lineType: LineTypeAes;\n gapWidth: number;\n opacity: number;\n stat: {\n low: number;\n middle: number;\n upper: number;\n k: number;\n };\n };\n binnedDots: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n opacity: number;\n showOutliers: boolean;\n };\n jitteredDots: {\n dotFill: ColorAes | null;\n dotShape: DotShapeAes;\n lineColor: ColorAes;\n opacity: number;\n showOutliers: boolean;\n };\n violin: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n lineType: LineTypeAes;\n opacity: number;\n trim: boolean;\n showQuartiles: boolean;\n quartilesLineStyle: LineType;\n medianLineStyle: LineType;\n };\n bar: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n opacity: number;\n height: 'max' | 'mean' | 'median';\n };\n stackedBar: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n opacity: number;\n normalize: boolean;\n height: 'sum' | 'max' | 'mean' | 'median';\n };\n stackedArea: {\n fillColor: ColorAes | null;\n lineColor: ColorAes;\n barsOpacity: number;\n areaOpacity: number;\n normalize: boolean;\n height: 'sum' | 'max' | 'mean' | 'median';\n showBars: boolean;\n };\n line: {\n pointsValues: 'mean' | 'median';\n emptyGroupValue: number;\n lineColor: ColorAes | null;\n dotShape: DotShapeAes;\n lineType: LineTypeAes;\n dotFill: ColorAes | null;\n opacity: number;\n };\n errorbar: {\n pointsValues: 'mean' | 'median';\n interval: 'sd' | 'se' | '';\n lineColor: ColorAes | null;\n dotShape: DotShapeAes;\n dotFill: ColorAes | null;\n opacity: number;\n };\n sina: {\n dotFill: ColorAes | null;\n dotShape: DotShapeAes;\n opacity: number;\n showOutliers: boolean;\n };\n logo: {\n normalize: boolean;\n opacity: number;\n };\n};\nexport const DEFAULT_LAYERS_SETTINGS: () => LayersSettings = () => ({\n // bubble\n bubble: {\n NAValueAs: 0,\n strokeColor: null,\n minRadius: 3,\n maxRadius: 38,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean',\n },\n // histogram\n bins: {\n fillColor: null,\n opacity: 1,\n },\n // dendro\n dendro: {\n dotFill: DEFAULT_BLACK,\n dotShape: DEFAULT_DOT_SHAPE,\n dotSize: DEFAULT_DOT_SIZE,\n lineColor: DEFAULT_BLACK,\n mode: 'normal',\n leavesMode: 'normal',\n showTable: false,\n showLegend: true,\n },\n // heatmap\n heatmap: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean',\n },\n heatmapClustered: {\n NAValueAs: 0,\n normalizationDirection: 'row',\n normalizationMethod: 'standardScaling',\n dendrogramX: true,\n dendrogramY: true,\n disableClusteringX: false,\n disableClusteringY: false,\n aggregateByX: false,\n aggregateByY: false,\n aggregationMethod: 'mean',\n },\n // scatterplot\n dots: {\n dotFill: null as ColorAes | null,\n dotShape: null as DotShapeAes | null,\n dotSize: null as ContinuousDataMappingSize | number | null,\n },\n curve: { lineColor: DEFAULT_BLACK, smoothing: true },\n // discrete\n box: {\n showOutliers: true,\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n gapWidth: 0.2,\n opacity: 1,\n stat: {\n low: 0.25,\n middle: 0.5,\n upper: 0.75,\n k: 1.5,\n },\n },\n binnedDots: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true,\n },\n jitteredDots: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n showOutliers: true,\n },\n violin: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n opacity: 1,\n trim: false,\n showQuartiles: false,\n quartilesLineStyle: 'dashed',\n medianLineStyle: 'solid',\n },\n bar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n height: 'max',\n },\n stackedBar: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n opacity: 1,\n normalize: false,\n height: 'sum',\n },\n stackedArea: {\n fillColor: null as ColorAes | null,\n lineColor: DEFAULT_LINE_COLOR as ColorAes,\n barsOpacity: 1,\n areaOpacity: 0.7,\n normalize: false,\n showBars: true,\n height: 'sum',\n },\n line: {\n pointsValues: 'mean',\n emptyGroupValue: 0,\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n lineType: DEFAULT_LINE_TYPE as LineTypeAes,\n dotFill: null as ColorAes | null,\n opacity: 1,\n },\n errorbar: {\n pointsValues: 'mean',\n interval: 'sd',\n lineColor: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n dotFill: null as ColorAes | null,\n opacity: 1,\n },\n sina: {\n dotFill: null as ColorAes | null,\n dotShape: DEFAULT_DOT_SHAPE as DotShapeAes,\n opacity: 1,\n showOutliers: true,\n },\n logo: {\n normalize: false,\n opacity: 1,\n },\n});\n\nexport function getDefaultLayersSettings() {\n return DEFAULT_LAYERS_SETTINGS();\n}\n\nconst DISCRETE_LAYERS: Layer[] = [\n 'box',\n 'binnedDots',\n 'jitteredDots',\n 'violin',\n 'bar',\n 'stackedBar',\n 'line',\n 'errorbar',\n 'sina',\n 'logo',\n];\nconst SCATTERPLOT_LAYERS: Layer[] = ['dots', 'curve'];\nconst SCATTERPLOT_UMAP_LAYERS: Layer[] = ['dots'];\nconst HEATMAP_LAYERS: Layer[] = ['heatmap', 'heatmapClustered'];\nconst DENDRO_LAYERS: Layer[] = ['dendro'];\nconst HISTOGRAM_LAYERS: Layer[] = ['bins'];\nconst BUBBLE_LAYERS: Layer[] = ['bubble'];\nconst _LAYERS_BY_CHART_TYPE: Record<ChartType, Layer[]> = {\n 'discrete': DISCRETE_LAYERS,\n 'scatterplot': SCATTERPLOT_LAYERS,\n 'scatterplot-umap': SCATTERPLOT_UMAP_LAYERS,\n 'heatmap': HEATMAP_LAYERS,\n 'dendro': DENDRO_LAYERS,\n 'histogram': HISTOGRAM_LAYERS,\n 'bubble': BUBBLE_LAYERS,\n};\n\nexport function getInitialLayersSettings(\n initialSettings?: DeepPartial<LayersSettings>,\n): LayersSettings {\n const defaultSettings = DEFAULT_LAYERS_SETTINGS();\n const layers: Layer[] = Object.keys(defaultSettings) as Layer[];\n return layers.reduce((res, layer) => {\n Object.assign(\n res[layer],\n initialSettings?.[layer] ?? {},\n );\n return res;\n }, defaultSettings);\n}\n\nexport type Sorting = 'asc' | 'desc';\nexport type AxesState = {\n title: { value: string; position: TitlePosition; mode: AxisTitleMode; facetTitleFrame: Frame };\n axisX: {\n labelsPosition: LabelsPosition; // for heatmap - top/bottom/left/right/hidden\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n titleMode: AxisTitleMode; // 'auto' - from column or 'custom' - from 'customTitle' field or 'hidden'\n customTitle: string; // user axis title, not default from column\n gridlines: boolean;\n linesBetweenCategories: boolean; // for discrete - position for vertical gridlines\n ticks: boolean;\n scale: Scale; // linear or log\n significantLinesStyle: LineType;\n sorting: Sorting;\n allowNullPrimaryGroups: boolean; // for discrete - allow group with null grouping value\n allowNullSecondaryGroups: boolean;\n order: {\n source: string;\n options: { value: string; label: string }[];\n } | null;\n cellSize: number | null;\n annotationTitlePosition: 'left' | 'right' | 'hidden';\n hideAxisLabels: boolean;\n hideAxisGroupLabels: boolean;\n };\n axisY: {\n labelsRotation: LabelsRotation | null; // only for discrete X axis - 'center'/'90deg'/'45deg'; null for auto mode before user chose\n titleMode: AxisTitleMode;\n customTitle: string;\n axisLabelsAngle: 0 | 45 | 90; // for heatmap\n groupLabelsAngle: 0 | 45 | 90; // for heatmap\n gridlines: boolean;\n ticks: boolean;\n scale: Scale;\n significantLinesStyle: LineType;\n sorting: Sorting;\n order: {\n source: string;\n options: { value: string; label: string }[];\n } | null;\n cellSize: number | null;\n annotationTitlePosition: 'top' | 'bottom' | 'hidden';\n hideAxisLabels: boolean;\n hideAxisGroupLabels: boolean;\n };\n legend: { show?: boolean };\n other: {\n frame: Frame | HeatmapFrame;\n reverse: boolean;\n facetSharedBy: 'x' | 'y' | 'xy' | 'none';\n facetColumns: number;\n binsCount: number;\n groupingDirection: 'straight' | 'reverse';\n groupingStack: 'vertical' | 'horizontal';\n canvasRenderMode: boolean;\n };\n};\n\nconst DEFAULT_AXES: () => AxesState = () => ({\n title: {\n value: 'Graph 1',\n position: 'center',\n mode: 'auto',\n facetTitleFrame: 'full',\n },\n axisX: {\n labelsPosition: 'bottom',\n labelsRotation: null,\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n titleMode: 'auto',\n customTitle: '',\n gridlines: true,\n linesBetweenCategories: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n allowNullPrimaryGroups: false,\n allowNullSecondaryGroups: false,\n order: null,\n cellSize: null,\n annotationTitlePosition: 'right',\n hideAxisLabels: false,\n hideAxisGroupLabels: false,\n },\n axisY: {\n labelsRotation: null,\n titleMode: 'auto',\n customTitle: '',\n axisLabelsAngle: 90,\n groupLabelsAngle: 45,\n gridlines: true,\n ticks: true,\n scale: 'linear',\n significantLinesStyle: 'dashed',\n sorting: 'asc',\n order: null,\n cellSize: null,\n annotationTitlePosition: 'top',\n hideAxisLabels: false,\n hideAxisGroupLabels: false,\n },\n legend: {},\n other: {\n frame: 'full',\n reverse: false,\n canvasRenderMode: false,\n facetSharedBy: 'xy',\n facetColumns: 3,\n binsCount: 10,\n groupingDirection: 'straight',\n groupingStack: 'vertical',\n },\n});\n\nfunction isHeatmapFrame(frame: Frame | HeatmapFrame): frame is HeatmapFrame {\n return frame === 'full' || frame === 'none';\n}\n\nexport function getInitialAxesSettings(\n chartType: ChartType,\n initialAxesSettings?: DeepPartial<AxesState>,\n): AxesState {\n const defaultAxes = DEFAULT_AXES();\n if (!initialAxesSettings) {\n return defaultAxes;\n }\n\n // TODO: divide into separated settings for chart types\n function getFrame(frame?: Frame | HeatmapFrame): Frame | HeatmapFrame {\n if (!frame) {\n return 'full';\n }\n if (chartType === 'heatmap' && !isHeatmapFrame(frame)) {\n return 'full' as HeatmapFrame;\n }\n if (chartType !== 'heatmap' && isHeatmapFrame(frame)) {\n return frame === 'none' ? 'empty' : (frame as Frame);\n }\n return frame;\n }\n\n return {\n title: {\n ...defaultAxes.title,\n ...initialAxesSettings.title,\n },\n axisX: {\n ...defaultAxes.axisX,\n ...initialAxesSettings.axisX,\n },\n axisY: {\n ...defaultAxes.axisY,\n ...initialAxesSettings.axisY,\n },\n legend: {\n ...defaultAxes.legend,\n ...initialAxesSettings.legend,\n },\n other: {\n ...defaultAxes.other,\n ...initialAxesSettings.other,\n frame: getFrame(initialAxesSettings.other?.frame),\n },\n };\n}\n\nexport const LAYER_ICONS: Record<LayersTemplate, Component> = {\n box: BoxplotIcon,\n box_binnedDots: BoxplotAndBinnedIcon,\n box_jitteredDots: BoxplotAndJitterIcon,\n binnedDots: BinnedDotsIcon,\n jitteredDots: JitteredDotsIcon,\n violin: ViolinIcon,\n violin_binnedDots: ViolinAndBinnedIcon,\n violin_jitteredDots: ViolinAndJitterIcon,\n bar: BarIcon,\n bar_line: BarAndLineIcon,\n bar_errorbar: BarAndErrorIcon,\n stackedBar: StackedBarIcon,\n stackedArea: StackedAreaIcon,\n line: LineIcon,\n line_binnedDots: LineAndBinnedIcon,\n line_jitteredDots: LineAndJitterIcon,\n line_errorbar: LineAndErrorbarIcon,\n errorbar: BarAndLineIcon,\n sina: SinaIcon,\n logo: LogoIcon,\n dots: ScatterplotIcon,\n curve: LineIcon,\n curve_dots: LineAndJitterIcon,\n heatmap: HeatmapIcon,\n heatmapClustered: DendroIcon,\n dendro: DendroIcon,\n bins: BarIcon,\n bubble: HeatmapIcon,\n};\n\ntype Option = { value: string; text: string };\nexport const STAT_TEST_METHOD: Option[] = [\n { value: 'ttest', text: 'TTest' },\n { value: 'anova', text: 'ANOVA' },\n { value: 'wilcoxon', text: 'Wilcoxon' },\n { value: 'kruskalWallis', text: 'Kruskal-Wallis' },\n];\n\nexport const STAT_CORRECTION_METHOD: Option[] = [\n { value: 'BenjaminiHochberg', text: 'Benjamini-Hochberg' },\n { value: 'BenjaminiYekutieli', text: 'Benjamini-Yekutieli' },\n { value: 'Bonferroni', text: 'Bonferroni' },\n { value: 'Hochberg', text: 'Hochberg' },\n { value: 'Holm', text: 'Holm' },\n { value: 'Hommel', text: 'Hommel' },\n { value: 'none', text: 'None' },\n];\n\nexport const FORMAT_P_VALUE_OPTIONS: Option[] = [\n { value: 'pValue', text: 'p-value' },\n { value: 'significance', text: 'significance' },\n];\n\nexport type AesType = 'fill' | 'stroke' | 'dotShape' | 'lineType' | 'size';\n\nexport const DEFAULT_WIDTH = 600;\nexport const DEFAULT_HEIGHT = 350;\nexport const DEFAULT_WIDTH_SMALL = 400;\nexport const DEFAULT_HEIGHT_SMALL = 250;\n\nexport const MAX_SEARCH_OPTIONS_LIST_LENGTH = 100;\n"],"names":["getInitialTemplate","restoredTemplate","chartType","DISCRETE_TEMPLATES_MAP","SCATTERPLOT_TEMPLATES_MAP","SCATTERPLOT_UMAP_TEMPLATES_MAP","HEATMAP_TEMPLATES_MAP","HISTOGRAM_TEMPLATES_MAP","LAYER_TITLES","getInitialStatisticsState","initialData","initial","_C","_D","_E","isNumberRange","v","isMappedAes","item","isContinuousDataMapping","DEFAULT_LAYERS_SETTINGS","DEFAULT_BLACK","DEFAULT_DOT_SHAPE","DEFAULT_DOT_SIZE","DEFAULT_LINE_COLOR","DEFAULT_LINE_TYPE","getInitialLayersSettings","initialSettings","defaultSettings","res","layer","DEFAULT_AXES","isHeatmapFrame","frame","getInitialAxesSettings","initialAxesSettings","defaultAxes","getFrame","_a","LAYER_ICONS","BoxplotIcon","BoxplotAndBinnedIcon","BoxplotAndJitterIcon","BinnedDotsIcon","JitteredDotsIcon","ViolinIcon","ViolinAndBinnedIcon","ViolinAndJitterIcon","BarIcon","BarAndLineIcon","BarAndErrorIcon","StackedBarIcon","StackedAreaIcon","LineIcon","LineAndBinnedIcon","LineAndJitterIcon","LineAndErrorbarIcon","SinaIcon","LogoIcon","ScatterplotIcon","HeatmapIcon","DendroIcon","STAT_TEST_METHOD","STAT_CORRECTION_METHOD","FORMAT_P_VALUE_OPTIONS","DEFAULT_WIDTH","DEFAULT_HEIGHT","DEFAULT_WIDTH_SMALL","DEFAULT_HEIGHT_SMALL","MAX_SEARCH_OPTIONS_LIST_LENGTH"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqDO,SAASA,GACdC,GACAC,GACA;AACA,SAAIA,MAAc,aACTD,KACFE,GAAuBF,CAA0C,IAClEA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oricalMappingFromPalette(palette: Palette, va
|
|
|
55
55
|
export declare function updateDataBindAes(optionsState: InputState, dataBindAes: Record<string, AestheticMapping>, uniqueValuesMap: UniqueValuesBySourceMap): void;
|
|
56
56
|
export declare function updateCategoricalMapping(newUniqueValues: string[], currentMapping: AestheticMappingCategorical): AestheticMappingCategorical;
|
|
57
57
|
export declare function createContinuousMappingFromPalette(palette: ContinuousPalette): AestheticMappingContinuous;
|
|
58
|
-
export declare function createDefaultMapping(values: string[]): AestheticMappingCategorical;
|
|
58
|
+
export declare function createDefaultMapping(values: string[], palette: Palette): AestheticMappingCategorical;
|
|
59
59
|
export declare function createDefaultContinuousMapping(columnId: string): ContinuousDataMappingSize;
|
|
60
|
-
export declare function getChartSettingsInheritedAes(uniqueValuesData: UniqueValuesBySourceMap, savedMapping: AestheticMapping | undefined, sourceId: string | null, usedAesInMapping: Record<AesType, boolean
|
|
60
|
+
export declare function getChartSettingsInheritedAes(uniqueValuesData: UniqueValuesBySourceMap, savedMapping: AestheticMapping | undefined, sourceId: string | null, usedAesInMapping: Record<AesType, boolean>, palette: Palette): {
|
|
61
61
|
inheritedAes: {};
|
|
62
62
|
order?: undefined;
|
|
63
63
|
} | {
|
|
64
64
|
order: string[];
|
|
65
65
|
inheritedAes: Record<string, any>;
|
|
66
66
|
};
|
|
67
|
-
export declare function getScatterplotAes(selectedSource: string, uniqueValuesData: UniqueValuesBySourceMap, dataBindAes: AestheticMappingState): {
|
|
67
|
+
export declare function getScatterplotAes(selectedSource: string, uniqueValuesData: UniqueValuesBySourceMap, dataBindAes: AestheticMappingState, palette: Palette): {
|
|
68
68
|
order: string[];
|
|
69
69
|
inheritedAes: Record<string, any>;
|
|
70
70
|
};
|
|
71
|
-
export declare function getHistogramAes(selectedSource: string, uniqueValuesData: UniqueValuesBySourceMap, dataBindAes: AestheticMappingState): {
|
|
71
|
+
export declare function getHistogramAes(selectedSource: string, uniqueValuesData: UniqueValuesBySourceMap, dataBindAes: AestheticMappingState, palette: Palette): {
|
|
72
72
|
order?: undefined;
|
|
73
73
|
inheritedAes?: undefined;
|
|
74
74
|
} | {
|
|
75
75
|
order: string[];
|
|
76
76
|
inheritedAes: Record<string, any>;
|
|
77
77
|
};
|
|
78
|
-
export declare function getDendroAes(selectedSource: string, uniqueValuesData: UniqueValuesBySourceMap, dataBindAes: AestheticMappingState, field: keyof AestheticValues): Record<string, AestheticValues[keyof AestheticValues]>;
|
|
78
|
+
export declare function getDendroAes(selectedSource: string, uniqueValuesData: UniqueValuesBySourceMap, dataBindAes: AestheticMappingState, field: keyof AestheticValues, palette: Palette): Record<string, AestheticValues[keyof AestheticValues]>;
|
|
79
79
|
export {};
|