@milaboratories/graph-maker 1.1.141 → 1.1.143
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/GraphMaker/components/LassoControls/index.vue.js +1 -1
- package/dist/GraphMaker/components/ReorderForm.vue.d.ts +15 -0
- package/dist/GraphMaker/components/ReorderForm.vue.d.ts.map +1 -0
- package/dist/GraphMaker/components/ReorderForm.vue.js +43 -0
- package/dist/GraphMaker/components/ReorderForm.vue.js.map +1 -0
- package/dist/GraphMaker/components/ReorderForm.vue2.js +5 -0
- package/dist/GraphMaker/components/ReorderForm.vue2.js.map +1 -0
- package/dist/GraphMaker/constantsCommon.d.ts +23 -0
- package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
- package/dist/GraphMaker/constantsCommon.js +97 -83
- package/dist/GraphMaker/constantsCommon.js.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js +305 -172
- package/dist/GraphMaker/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts +3 -0
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -0
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +90 -0
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -0
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue2.js +5 -0
- package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue2.js.map +1 -0
- package/dist/GraphMaker/forms/LayersForm/index.vue.d.ts.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/index.vue.js +45 -43
- package/dist/GraphMaker/forms/LayersForm/index.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.d.ts.map +1 -1
- package/dist/GraphMaker/index.vue.js +33 -34
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/types.d.ts +1 -1
- package/dist/GraphMaker/types.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +3 -3
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +9 -9
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +21 -11
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +3 -3
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +31 -5
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +56 -53
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +1 -7
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +13 -13
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.d.ts +6 -4
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.js +42 -13
- package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +84 -70
- package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +48 -44
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/{discrete/components → common}/BandAxis.js +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/common/BandAxis.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/common/ContinuousGrid.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +197 -270
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +182 -161
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/Chart.js +121 -104
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/ChartsGroup.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/Grid.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedAreaElement.js +105 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedAreaElement.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedBarElement.js +66 -59
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedBarElement.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +61 -58
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedArea.js +17 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedArea.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-scale/src/band.js +44 -34
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-scale/src/band.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +272 -195
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +23 -23
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +54 -50
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxis.js +32 -28
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxis.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +29 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +44 -41
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Grid.js +31 -27
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Grid.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +29 -18
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +71 -57
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/isNumericScale.js +11 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/isNumericScale.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +10 -10
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +6 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +35 -25
- package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +51 -36
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +6 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/createMultilineDiscreteLabels.js +32 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/createMultilineDiscreteLabels.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetRowsColumns.js +18 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetRowsColumns.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/measureMultilineDiscreteLabels.js +63 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/measureMultilineDiscreteLabels.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/{discrete/utils → utils}/splitTextByWidth.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/splitTextByWidth.js.map +1 -0
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +2 -2
- package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
- package/package.json +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/BandAxis.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Axis.js +0 -59
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Axis.js.map +0 -1
|
@@ -9,13 +9,13 @@ const i = o.enum(["discrete", "continuous"]), a = o.object({
|
|
|
9
9
|
axis: o.literal("x"),
|
|
10
10
|
position: o.optional(o.enum(["top", "bottom"])),
|
|
11
11
|
titlePosition: o.optional(o.enum(["left", "right"]))
|
|
12
|
-
}),
|
|
12
|
+
}), c = a.extend({
|
|
13
13
|
axis: o.literal("y"),
|
|
14
14
|
position: o.optional(o.enum(["left", "right"])),
|
|
15
15
|
titlePosition: o.optional(o.enum(["top", "bottom"]))
|
|
16
|
-
}),
|
|
16
|
+
}), b = o.enum(["euclidean", "squaredEuclidean"]), g = o.enum(["average", "complete", "single"]), e = o.object({
|
|
17
17
|
size: o.optional(o.number()),
|
|
18
|
-
distance: o.optional(
|
|
18
|
+
distance: o.optional(b),
|
|
19
19
|
linkage: o.optional(g),
|
|
20
20
|
showNodes: o.optional(o.boolean()),
|
|
21
21
|
edgeInheritance: o.optional(o.enum(["up", "down"])),
|
|
@@ -41,7 +41,7 @@ const i = o.enum(["discrete", "continuous"]), a = o.object({
|
|
|
41
41
|
showGroupLabels: o.optional(o.boolean()),
|
|
42
42
|
axisLabelsAngle: o.optional(o.union([o.literal(0), o.literal(45), o.literal(90)])),
|
|
43
43
|
groupLabelsAngle: o.optional(o.union([o.literal(0), o.literal(45), o.literal(90)]))
|
|
44
|
-
},
|
|
44
|
+
}, x = o.object({
|
|
45
45
|
type: o.literal("heatmap"),
|
|
46
46
|
title: o.object({
|
|
47
47
|
name: o.string(),
|
|
@@ -97,7 +97,7 @@ const i = o.enum(["discrete", "continuous"]), a = o.object({
|
|
|
97
97
|
method: o.enum(["standardScaling", "meanNormalization"]),
|
|
98
98
|
colorRange: o.optional(o.array(o.number()))
|
|
99
99
|
})),
|
|
100
|
-
annotations: o.optional(o.array(o.union([m,
|
|
100
|
+
annotations: o.optional(o.array(o.union([m, c]))),
|
|
101
101
|
dendrogramX: o.optional(d),
|
|
102
102
|
dendrogramY: o.optional(h),
|
|
103
103
|
inheritedDendrogramAes: o.optional(o.record(o.string(), r)),
|
|
@@ -114,6 +114,6 @@ const i = o.enum(["discrete", "continuous"]), a = o.object({
|
|
|
114
114
|
}))
|
|
115
115
|
});
|
|
116
116
|
export {
|
|
117
|
-
|
|
117
|
+
x as HeatmapSettingsSchema
|
|
118
118
|
};
|
|
119
119
|
//# sourceMappingURL=heatmap.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o from "../node_modules/zod/lib/index.js";
|
|
2
|
-
import { continuousAesMappingFromValueSchema as a, PointShapeSchema as
|
|
2
|
+
import { continuousAesMappingFromValueSchema as a, PointShapeSchema as i, LineShapeSchema as l, ColumnNameSchema as t, AesRecordSchema as p, DataValueSchema as r, AxisSettingsContinuousSchema as n, FrameTypeSchema as s, LegendPositionSchema as m, TitlePositionSchema as c } from "./common.js";
|
|
3
3
|
const e = o.object({
|
|
4
4
|
type: o.literal("grouping"),
|
|
5
5
|
value: o.string(),
|
|
@@ -13,11 +13,11 @@ const e = o.object({
|
|
|
13
13
|
dotFill: o.optional(
|
|
14
14
|
o.union([o.string(), e, a(o.string())])
|
|
15
15
|
),
|
|
16
|
-
dotShape: o.optional(o.union([
|
|
16
|
+
dotShape: o.optional(o.union([i, e])),
|
|
17
17
|
dotSize: o.optional(o.union([o.number(), a(o.number())]))
|
|
18
18
|
})
|
|
19
19
|
)
|
|
20
|
-
}),
|
|
20
|
+
}), u = o.object({
|
|
21
21
|
type: o.literal("curve"),
|
|
22
22
|
smoothing: o.optional(o.boolean()),
|
|
23
23
|
aes: o.optional(
|
|
@@ -28,7 +28,7 @@ const e = o.object({
|
|
|
28
28
|
opacity: o.optional(o.number())
|
|
29
29
|
})
|
|
30
30
|
)
|
|
31
|
-
}),
|
|
31
|
+
}), b = o.union([h, u]), y = o.object({
|
|
32
32
|
type: o.literal("scatterplot-umap"),
|
|
33
33
|
title: o.object({
|
|
34
34
|
name: o.string(),
|
|
@@ -57,8 +57,8 @@ const e = o.object({
|
|
|
57
57
|
keyColumn: o.optional(t),
|
|
58
58
|
x: t,
|
|
59
59
|
y: t,
|
|
60
|
-
xAxis: o.optional(
|
|
61
|
-
yAxis: o.optional(
|
|
60
|
+
xAxis: o.optional(n),
|
|
61
|
+
yAxis: o.optional(n),
|
|
62
62
|
grouping: o.optional(o.array(
|
|
63
63
|
o.object({
|
|
64
64
|
columnName: t,
|
|
@@ -69,7 +69,7 @@ const e = o.object({
|
|
|
69
69
|
)),
|
|
70
70
|
label: o.optional(t),
|
|
71
71
|
highlight: o.optional(t),
|
|
72
|
-
layers: o.array(
|
|
72
|
+
layers: o.array(b)
|
|
73
73
|
});
|
|
74
74
|
export {
|
|
75
75
|
y as ScatterplotUmapSettingsSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scatterplot-umap.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/types/scatterplot-umap.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { categoricalAesMappingFromValueSchema } from './common';\nimport {\n AesRecordSchema, AxisSettingsSchema,\n ColumnNameSchema, continuousAesMappingFromValueSchema, DataValueSchema, FrameTypeSchema,\n LegendPositionSchema, LineShapeSchema, PointShapeSchema,\n TitlePositionSchema,\n} from './common';\nimport type { ScatterplotLegendInfo } from './scatterplot';\n\ntype catAesFromColumn<ValueType extends z.ZodType> = ReturnType<typeof categoricalAesMappingFromValueSchema<ValueType>>;\ntype contAesFromColumn<ValueType extends z.ZodType> = ReturnType<typeof continuousAesMappingFromValueSchema<ValueType>>;\n\nexport type CategoricalAesFromColumn<ValueType> = z.infer<catAesFromColumn<z.ZodType<ValueType>>>;\nexport type ContinuousAesFromColumn<ValueType> = z.infer<contAesFromColumn<z.ZodType<ValueType>>>;\n\nconst InheritAesSchema = z.object({\n type: z.literal('grouping'),\n value: z.string(), // link to aes mapped to column\n palette: z.optional(z.array(z.string())) // if defined we use palette to create mapping without inheritedAes field\n});\nexport type InheritAesScatterplot = z.infer<typeof InheritAesSchema>;\n\nconst DotsUmapLayerSchema = z.object({\n type: z.literal('dots'),\n aes: z.optional(\n z.object({\n dotFill: z.optional(\n z.union([z.string(), InheritAesSchema, continuousAesMappingFromValueSchema(z.string())])\n ),\n dotShape: z.optional(z.union([PointShapeSchema, InheritAesSchema])),\n dotSize: z.optional(z.union([z.number(), continuousAesMappingFromValueSchema(z.number())])),\n })\n ),\n});\n\nconst CurveUmapLayerSchema = z.object({\n type: z.literal('curve'),\n smoothing: z.optional(z.boolean()),\n aes: z.optional(\n z.object({\n lineWidth: z.optional(z.number()),\n lineShape: z.optional(LineShapeSchema),\n lineColor: z.optional(z.union([z.string(), InheritAesSchema, continuousAesMappingFromValueSchema(z.string())])),\n opacity: z.optional(z.number()),\n })\n ),\n});\n\nconst ScatterplotUmapLayerSchema = z.union([DotsUmapLayerSchema, CurveUmapLayerSchema]);\n\nexport type DotsUmapLayer = z.infer<typeof DotsUmapLayerSchema>;\nexport type CurveUmapLayer = z.infer<typeof CurveUmapLayerSchema>;\nexport type ScatterplotUmapLayer = z.infer<typeof ScatterplotUmapLayerSchema>;\n\nexport const ScatterplotUmapSettingsSchema = z.object({\n type: z.literal('scatterplot-umap'),\n title: z.object({\n name: z.string(),\n show: z.optional(z.boolean()),\n position: z.optional(TitlePositionSchema),\n }),\n size: z.optional(\n z.object({\n width: z.optional(z.number()),\n height: z.optional(z.number()),\n })\n ),\n legend: z.optional(\n z.object({\n show: z.optional(z.boolean()),\n position: z.optional(LegendPositionSchema),\n })\n ),\n tooltips: z.optional(\n z.object({\n show: z.optional(z.boolean()),\n content: z.optional(z.array(ColumnNameSchema)),\n })\n ),\n frame: z.optional(z.object({type: z.optional(FrameTypeSchema)})),\n keyColumn: z.optional(ColumnNameSchema),\n x: ColumnNameSchema,\n y: ColumnNameSchema,\n xAxis: z.optional(
|
|
1
|
+
{"version":3,"file":"scatterplot-umap.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/types/scatterplot-umap.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { categoricalAesMappingFromValueSchema } from './common';\nimport {\n AesRecordSchema, AxisSettingsContinuousSchema, AxisSettingsSchema,\n ColumnNameSchema, continuousAesMappingFromValueSchema, DataValueSchema, FrameTypeSchema,\n LegendPositionSchema, LineShapeSchema, PointShapeSchema,\n TitlePositionSchema,\n} from './common';\nimport type { ScatterplotLegendInfo } from './scatterplot';\n\ntype catAesFromColumn<ValueType extends z.ZodType> = ReturnType<typeof categoricalAesMappingFromValueSchema<ValueType>>;\ntype contAesFromColumn<ValueType extends z.ZodType> = ReturnType<typeof continuousAesMappingFromValueSchema<ValueType>>;\n\nexport type CategoricalAesFromColumn<ValueType> = z.infer<catAesFromColumn<z.ZodType<ValueType>>>;\nexport type ContinuousAesFromColumn<ValueType> = z.infer<contAesFromColumn<z.ZodType<ValueType>>>;\n\nconst InheritAesSchema = z.object({\n type: z.literal('grouping'),\n value: z.string(), // link to aes mapped to column\n palette: z.optional(z.array(z.string())) // if defined we use palette to create mapping without inheritedAes field\n});\nexport type InheritAesScatterplot = z.infer<typeof InheritAesSchema>;\n\nconst DotsUmapLayerSchema = z.object({\n type: z.literal('dots'),\n aes: z.optional(\n z.object({\n dotFill: z.optional(\n z.union([z.string(), InheritAesSchema, continuousAesMappingFromValueSchema(z.string())])\n ),\n dotShape: z.optional(z.union([PointShapeSchema, InheritAesSchema])),\n dotSize: z.optional(z.union([z.number(), continuousAesMappingFromValueSchema(z.number())])),\n })\n ),\n});\n\nconst CurveUmapLayerSchema = z.object({\n type: z.literal('curve'),\n smoothing: z.optional(z.boolean()),\n aes: z.optional(\n z.object({\n lineWidth: z.optional(z.number()),\n lineShape: z.optional(LineShapeSchema),\n lineColor: z.optional(z.union([z.string(), InheritAesSchema, continuousAesMappingFromValueSchema(z.string())])),\n opacity: z.optional(z.number()),\n })\n ),\n});\n\nconst ScatterplotUmapLayerSchema = z.union([DotsUmapLayerSchema, CurveUmapLayerSchema]);\n\nexport type DotsUmapLayer = z.infer<typeof DotsUmapLayerSchema>;\nexport type CurveUmapLayer = z.infer<typeof CurveUmapLayerSchema>;\nexport type ScatterplotUmapLayer = z.infer<typeof ScatterplotUmapLayerSchema>;\n\nexport const ScatterplotUmapSettingsSchema = z.object({\n type: z.literal('scatterplot-umap'),\n title: z.object({\n name: z.string(),\n show: z.optional(z.boolean()),\n position: z.optional(TitlePositionSchema),\n }),\n size: z.optional(\n z.object({\n width: z.optional(z.number()),\n height: z.optional(z.number()),\n })\n ),\n legend: z.optional(\n z.object({\n show: z.optional(z.boolean()),\n position: z.optional(LegendPositionSchema),\n })\n ),\n tooltips: z.optional(\n z.object({\n show: z.optional(z.boolean()),\n content: z.optional(z.array(ColumnNameSchema)),\n })\n ),\n frame: z.optional(z.object({type: z.optional(FrameTypeSchema)})),\n keyColumn: z.optional(ColumnNameSchema),\n x: ColumnNameSchema,\n y: ColumnNameSchema,\n xAxis: z.optional(AxisSettingsContinuousSchema),\n yAxis: z.optional(AxisSettingsContinuousSchema),\n grouping: z.optional(z.array(\n z.object({\n columnName: ColumnNameSchema,\n order: z.optional(z.array(DataValueSchema)),\n inheritedAes: z.optional(AesRecordSchema),\n allowNullGroup: z.optional(z.boolean())\n })\n )),\n label: z.optional(ColumnNameSchema),\n highlight: z.optional(ColumnNameSchema),\n layers: z.array(ScatterplotUmapLayerSchema)\n});\n\nexport type ScatterplotUmapSettings = z.infer<typeof ScatterplotUmapSettingsSchema>;\n\nexport type ScatterplotUmapLegendInfo = ScatterplotLegendInfo;\n"],"names":["InheritAesSchema","z","DotsUmapLayerSchema","continuousAesMappingFromValueSchema","PointShapeSchema","CurveUmapLayerSchema","LineShapeSchema","ScatterplotUmapLayerSchema","ScatterplotUmapSettingsSchema","TitlePositionSchema","LegendPositionSchema","ColumnNameSchema","FrameTypeSchema","AxisSettingsContinuousSchema","DataValueSchema","AesRecordSchema"],"mappings":";;AAgBA,MAAMA,IAAmBC,EAAE,OAAO;AAAA,EAC9B,MAAMA,EAAE,QAAQ,UAAU;AAAA,EAC1B,OAAOA,EAAE,OAAA;AAAA;AAAA,EACT,SAASA,EAAE,SAASA,EAAE,MAAMA,EAAE,QAAQ,CAAC;AAAA;AAC3C,CAAC,GAGKC,IAAsBD,EAAE,OAAO;AAAA,EACjC,MAAM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@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CAPTION_LINE_HEIGHT as d } from "../discrete/constants.js";
|
|
2
|
+
import { splitTextByWidth as N } from "./splitTextByWidth.js";
|
|
3
|
+
const P = Math.sin(Math.PI / 4);
|
|
4
|
+
function x(f, i, l, h, m, p) {
|
|
5
|
+
const g = {
|
|
6
|
+
center: 120,
|
|
7
|
+
"45deg": 256,
|
|
8
|
+
"90deg": 320
|
|
9
|
+
}, M = m === "vertical";
|
|
10
|
+
function I(t, e) {
|
|
11
|
+
return t === "center" ? 1 / 0 : Math.floor(t === "45deg" ? e * P / d : e / d);
|
|
12
|
+
}
|
|
13
|
+
return f.reduce((t, e) => {
|
|
14
|
+
const s = p[e], c = s.step(), a = g[i], E = i === "center" ? Math.min(a, c) : a;
|
|
15
|
+
return t[e] = s.domain().reduce((r, n) => {
|
|
16
|
+
if (h)
|
|
17
|
+
return r[n] = [], r;
|
|
18
|
+
const o = l[n];
|
|
19
|
+
if (!M)
|
|
20
|
+
r[n] = [o];
|
|
21
|
+
else {
|
|
22
|
+
const L = I(i, c), u = N(o, E, 14);
|
|
23
|
+
r[n] = u.length > L ? [o] : u;
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}, {}), t;
|
|
27
|
+
}, {});
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
x as createMultilineDiscreteLabels
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=createMultilineDiscreteLabels.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/utils/createMultilineDiscreteLabels.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMultilineDiscreteLabels.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/createMultilineDiscreteLabels.ts"],"sourcesContent":["import type { ScaleBand, ScalePoint } from 'd3-scale';\nimport type { DiscreteLabelsPosition, Orientation } from '../types';\nimport { CAPTION_LINE_HEIGHT } from '../discrete/constants';\nimport { splitTextByWidth } from './splitTextByWidth';\n\nconst SIN_PI_4 = Math.sin(Math.PI / 4);\n\nexport function createMultilineDiscreteLabels(\n facetKeys: string[],\n labelsPosition: DiscreteLabelsPosition,\n labelsMap: Record<string, string>,\n hiddenLabels: boolean,\n orientation: Orientation,\n scalesByFacet: Record<string, ScaleBand<string> | ScalePoint<string | number>>\n) {\n const DEFAULT_MAX_WIDTH = {\n 'center': 120,\n '45deg': 256,\n '90deg': 320,\n };\n const isVertical = orientation === 'vertical';\n\n function getMaxLinesCount(labelsPosition: 'center' | '45deg' | '90deg', bandwidth: number) {\n if (labelsPosition === 'center') {\n return Infinity;\n }\n if (labelsPosition === '45deg') {\n return Math.floor((bandwidth * SIN_PI_4) / CAPTION_LINE_HEIGHT);\n }\n return Math.floor(bandwidth / CAPTION_LINE_HEIGHT);\n }\n\n return facetKeys.reduce((res: Record<string, Record<string, string[]>>, facetKey) => {\n const scale = scalesByFacet[facetKey];\n const bandwidth = scale.step();\n const defaultWidth = DEFAULT_MAX_WIDTH[labelsPosition];\n const width = labelsPosition === 'center' ? Math.min(defaultWidth, bandwidth) : defaultWidth;\n res[facetKey] = scale.domain().reduce((res2: Record<string, string[]>, axisKey) => {\n if (hiddenLabels) {\n res2[axisKey] = [];\n return res2;\n }\n const label = labelsMap[axisKey];\n if (!isVertical) {\n res2[axisKey] = [label];\n } else {\n const maxLinesCount = getMaxLinesCount(labelsPosition, bandwidth);\n const multilineKey = splitTextByWidth(label, width, 14);\n res2[axisKey] = multilineKey.length > maxLinesCount ? [label] : multilineKey;\n }\n return res2;\n }, {});\n return res;\n }, {});\n}"],"names":["SIN_PI_4","createMultilineDiscreteLabels","facetKeys","labelsPosition","labelsMap","hiddenLabels","orientation","scalesByFacet","DEFAULT_MAX_WIDTH","isVertical","getMaxLinesCount","bandwidth","CAPTION_LINE_HEIGHT","res","facetKey","scale","defaultWidth","width","res2","axisKey","label","maxLinesCount","multilineKey","splitTextByWidth"],"mappings":";;AAKA,MAAMA,IAAW,KAAK,IAAI,KAAK,KAAK,CAAC;AAE9B,SAASC,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACF;AACG,QAAMC,IAAoB;AAAA,IACvB,QAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,EAAA,GAEPC,IAAaH,MAAgB;AAEnC,WAASI,EAAiBP,GAA8CQ,GAAmB;AACvF,WAAIR,MAAmB,WACZ,QAGA,KAAK,MADZA,MAAmB,UACAQ,IAAYX,IAAYY,IAE7BD,IAAYC,CAFoC;AAAA,EAGtE;AAEA,SAAOV,EAAU,OAAO,CAACW,GAA+CC,MAAa;AACjF,UAAMC,IAAQR,EAAcO,CAAQ,GAC9BH,IAAYI,EAAM,QAClBC,IAAeR,EAAkBL,CAAc,GAC/Cc,IAAQd,MAAmB,WAAW,KAAK,IAAIa,GAAcL,CAAS,IAAIK;AAChF,WAAAH,EAAIC,CAAQ,IAAIC,EAAM,SAAS,OAAO,CAACG,GAAgCC,MAAY;AAC/E,UAAId;AACA,eAAAa,EAAKC,CAAO,IAAI,CAAA,GACTD;AAEX,YAAME,IAAQhB,EAAUe,CAAO;AAC/B,UAAI,CAACV;AACDS,QAAAA,EAAKC,CAAO,IAAI,CAACC,CAAK;AAAA,WACnB;AACH,cAAMC,IAAgBX,EAAiBP,GAAgBQ,CAAS,GAC1DW,IAAeC,EAAiBH,GAAOH,GAAO,EAAE;AACtDC,QAAAA,EAAKC,CAAO,IAAIG,EAAa,SAASD,IAAgB,CAACD,CAAK,IAAIE;AAAAA,MACpE;AACA,aAAOJ;AAAAA,IACX,GAAG,CAAA,CAAE,GACEL;AAAAA,EACX,GAAG,CAAA,CAAE;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function e(o, s, n) {
|
|
2
|
+
const r = new Array(n).fill(null).map(() => []);
|
|
3
|
+
for (let t = 0; t < n; t++)
|
|
4
|
+
for (let l = 0; l < s; l++)
|
|
5
|
+
l * n + t < o.length && r[t].push(o[l * n + t]);
|
|
6
|
+
return r;
|
|
7
|
+
}
|
|
8
|
+
function u(o, s, n) {
|
|
9
|
+
const r = [];
|
|
10
|
+
for (let t = 0; t < s; t++)
|
|
11
|
+
r.push(o.slice(t * n, t * n + n));
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
e as getFacetColumns,
|
|
16
|
+
u as getFacetRows
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=getFacetRowsColumns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFacetRowsColumns.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/getFacetRowsColumns.ts"],"sourcesContent":["\n// facet keys grouped by columns\nexport function getFacetColumns(facetKeys: string[], nRows: number, nColumns: number): string[][] {\n const result: string[][] = new Array(nColumns).fill(null).map(() => []);\n for (let i = 0; i < nColumns; i++) {\n for (let j = 0; j < nRows; j++) {\n const facetIdx = j * nColumns + i;\n if (facetIdx < facetKeys.length) {\n result[i].push(facetKeys[j * nColumns + i]);\n }\n }\n }\n return result;\n}\n\n// facet keys grouped by rows\nexport function getFacetRows(facetKeys: string[], nRows: number, nColumns: number): string[][] {\n const result: string[][] = [];\n for (let i = 0; i < nRows; i++) {\n result.push(facetKeys.slice(i * nColumns, i * nColumns + nColumns));\n }\n return result;\n}"],"names":["getFacetColumns","facetKeys","nRows","nColumns","result","i","j","getFacetRows"],"mappings":"AAEO,SAASA,EAAgBC,GAAqBC,GAAeC,GAA8B;AAC9F,QAAMC,IAAqB,IAAI,MAAMD,CAAQ,EAAE,KAAK,IAAI,EAAE,IAAI,MAAM,EAAE;AACtE,WAASE,IAAI,GAAGA,IAAIF,GAAUE;AAC1B,aAASC,IAAI,GAAGA,IAAIJ,GAAOI;AACNA,MAAAA,IAAIH,IAAWE,IACjBJ,EAAU,UACrBG,EAAOC,CAAC,EAAE,KAAKJ,EAAUK,IAAIH,IAAWE,CAAC,CAAC;AAItD,SAAOD;AACX;AAGO,SAASG,EAAaN,GAAqBC,GAAeC,GAA8B;AAC3F,QAAMC,IAAqB,CAAA;AAC3B,WAASC,IAAI,GAAGA,IAAIH,GAAOG;AACvBD,MAAO,KAAKH,EAAU,MAAMI,IAAIF,GAAUE,IAAIF,IAAWA,CAAQ,CAAC;AAEtE,SAAOC;AACX;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/utils/measureMultilineDiscreteLabels.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CAPTION_LINE_HEIGHT as D } from "../discrete/constants.js";
|
|
2
|
+
import { TextMeasurer as F } from "./TextMeasurer/TextMeasurer.js";
|
|
3
|
+
import { getFacetRows as H, getFacetColumns as L } from "./getFacetRowsColumns.js";
|
|
4
|
+
const W = Math.sin(Math.PI / 4);
|
|
5
|
+
function G(l, M, d, o, i, y, s) {
|
|
6
|
+
const E = new F("600 14px Manrope"), _ = y === "vertical";
|
|
7
|
+
function f(a) {
|
|
8
|
+
return a.length ? Math.max(...a.map((t) => E.getTextWidth(t))) : 0;
|
|
9
|
+
}
|
|
10
|
+
function g(a) {
|
|
11
|
+
return a.length ? Math.max(...a.map(f)) : 0;
|
|
12
|
+
}
|
|
13
|
+
let u = [], h = [], T = 0, C = 0;
|
|
14
|
+
const p = H(l, M, d), x = L(l, M, d);
|
|
15
|
+
function b(a) {
|
|
16
|
+
return a.map(
|
|
17
|
+
(t) => Math.max(
|
|
18
|
+
...t.map(
|
|
19
|
+
(n) => Math.max(
|
|
20
|
+
...s[n].domain().map(
|
|
21
|
+
(e) => e ? i[n][e].length * D : 0
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function I(a) {
|
|
29
|
+
return a.map((t) => Math.max(
|
|
30
|
+
...t.map((n) => {
|
|
31
|
+
const e = s[n].domain().map((m) => i[n][m]), r = g(e);
|
|
32
|
+
return r > 0 ? r * W + 14 : 0;
|
|
33
|
+
})
|
|
34
|
+
));
|
|
35
|
+
}
|
|
36
|
+
function w(a) {
|
|
37
|
+
return a.map(
|
|
38
|
+
(t) => Math.max(
|
|
39
|
+
...t.map(
|
|
40
|
+
(n) => g(
|
|
41
|
+
s[n].domain().map((e) => i[n][e])
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function N(a, t = !0) {
|
|
48
|
+
const n = t ? a[0] : a[a.length - 1];
|
|
49
|
+
return Math.max(
|
|
50
|
+
...n.map((e) => {
|
|
51
|
+
const r = s[e], m = r.domain(), A = (c) => r(m[t ? c : m.length - c - 1]) + r.bandwidth() / 2;
|
|
52
|
+
return Math.max(
|
|
53
|
+
...m.map((c, B) => f(i[e][c]) * W - A(B) + 14)
|
|
54
|
+
);
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return _ ? (o === "center" && (u = b(p)), o === "45deg" && (u = I(p), T = N(p, !0)), o === "90deg" && (u = w(p))) : o === "45deg" ? (h = I(x), C = N(x, !1)) : h = w(x), { axisCaptionsWidthByRows: u, axisCaptionsWidthByColumns: h, xTail: T, yTail: C };
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
G as measureMultilineDiscreteLabels
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=measureMultilineDiscreteLabels.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/utils/measureMultilineDiscreteLabels.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureMultilineDiscreteLabels.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/measureMultilineDiscreteLabels.ts"],"sourcesContent":["import type { ScaleBand, ScalePoint } from 'd3-scale';\nimport { CAPTION_LINE_HEIGHT } from '../discrete/constants';\nimport type { DiscreteLabelsPosition, Orientation } from '../types';\nimport { TextMeasurer } from './TextMeasurer/TextMeasurer';\nimport { getFacetColumns, getFacetRows } from './getFacetRowsColumns';\nimport { ZodNumber } from 'zod';\n\nconst SIN_45 = Math.sin(Math.PI / 4);\n\nexport function measureMultilineDiscreteLabels (\n facetKeys: string[],\n rowsCount: number,\n columnsCount: number,\n labelsPosition: DiscreteLabelsPosition,\n axisLabels: Record<string, Record<string, string[]>>,\n orientation: Orientation,\n scalesByFacet: Record<string, ScaleBand<string> | ScalePoint<string | number>>\n ) {\n const LABEL_FONT_SIZE = 14;\n const textMeasurer = new TextMeasurer(`600 ${LABEL_FONT_SIZE}px Manrope`);\n const isVertical = orientation === 'vertical';\n\n function getMaxStrWidth(strs: string[]) {\n if (!strs.length) {\n return 0;\n }\n return Math.max(...strs.map(str => textMeasurer.getTextWidth(str)));\n }\n\n function getMultilineMaxStrWidth(strs: string[][]) {\n if (!strs.length) {\n return 0;\n }\n return Math.max(...strs.map(getMaxStrWidth));\n }\n\n // x ticks are always strings and can have variable width in different facets, and can be rotated;\n // for x we consider the widest tick caption in row (column for horizontal orientation);\n // y ticks are always numbers, and we consider only the widest number of all facets\n // because numbers sizes are closer to each other, and it makes more equal facets grid without superwide empty offsets\n let axisCaptionsWidthByRows: number[] = [];\n let axisCaptionsWidthByColumns: number[] = [];\n let xTail = 0;\n let yTail = 0;\n\n const facetRows = getFacetRows(facetKeys, rowsCount, columnsCount);\n const facetColumns = getFacetColumns(facetKeys, rowsCount, columnsCount);\n\n function getSizeWithPositionCenter(columnOrRowKeys:string[][]) {\n return columnOrRowKeys.map(keys =>\n Math.max(\n ...keys.map(facetKey =>\n Math.max(\n ...scalesByFacet[facetKey]\n .domain()\n // do not consider empty ticks captions, for example - single group\n .map(axisKey =>\n axisKey ? axisLabels[facetKey][axisKey].length * CAPTION_LINE_HEIGHT : 0\n )\n )\n )\n )\n );\n }\n function getSizeWithPosition45deg(columnOrRowKeys:string[][]) {\n return columnOrRowKeys.map(keys => {\n return Math.max(\n ...keys.map(key => {\n const labels = scalesByFacet[key]\n .domain()\n .map(axisKey => axisLabels[key][axisKey]);\n const ticksWidth = getMultilineMaxStrWidth(labels);\n return ticksWidth > 0 ? ticksWidth * SIN_45 + LABEL_FONT_SIZE : 0;\n })\n );\n });\n }\n function getSizeWithPosition90deg(columnOrRowKeys:string[][]) {\n return columnOrRowKeys\n // max of ticks width in every facet's column\n .map(keys =>\n Math.max(\n ...keys.map(facetKey =>\n getMultilineMaxStrWidth(\n scalesByFacet[facetKey]\n .domain()\n .map(axisKey => axisLabels[facetKey][axisKey])\n )\n )\n )\n );\n }\n function getTail(columnOrRowKeys:string[][], first = true) {\n const keys = first ? columnOrRowKeys[0] : columnOrRowKeys[columnOrRowKeys.length - 1];\n return Math.max(\n ...keys.map(facetKey => {\n const scale = scalesByFacet[facetKey];\n const ticks = scale.domain();\n const pos = (idx:number) => (scale(ticks[first ? idx : ticks.length - idx - 1] as string) as number) + scale.bandwidth() / 2;\n return Math.max(\n ...ticks.map((tick, idx) => getMaxStrWidth(axisLabels[facetKey][tick]) * SIN_45 - pos(idx) + LABEL_FONT_SIZE)\n );\n })\n );\n }\n if (!isVertical) {\n if (labelsPosition === '45deg') {\n axisCaptionsWidthByColumns = getSizeWithPosition45deg(facetColumns);\n yTail = getTail(facetColumns, false);\n } else {\n // with horizontal chart orientation X ticks are always in horizontal position\n axisCaptionsWidthByColumns = getSizeWithPosition90deg(facetColumns);\n }\n } else {\n if (labelsPosition === 'center') {\n axisCaptionsWidthByRows = getSizeWithPositionCenter(facetRows);\n }\n if (labelsPosition === '45deg') {\n axisCaptionsWidthByRows = getSizeWithPosition45deg(facetRows);\n xTail = getTail(facetRows, true);\n }\n if (labelsPosition === '90deg') {\n axisCaptionsWidthByRows = getSizeWithPosition90deg(facetRows);\n }\n }\n\n return {axisCaptionsWidthByRows, axisCaptionsWidthByColumns, xTail, yTail};\n }"],"names":["SIN_45","measureMultilineDiscreteLabels","facetKeys","rowsCount","columnsCount","labelsPosition","axisLabels","orientation","scalesByFacet","textMeasurer","TextMeasurer","isVertical","getMaxStrWidth","strs","n","str","getMultilineMaxStrWidth","axisCaptionsWidthByRows","axisCaptionsWidthByColumns","xTail","yTail","facetRows","getFacetRows","facetColumns","getFacetColumns","getSizeWithPositionCenter","columnOrRowKeys","keys","facetKey","axisKey","CAPTION_LINE_HEIGHT","getSizeWithPosition45deg","key","labels","ticksWidth","getSizeWithPosition90deg","getTail","first","scale","ticks","pos","idx","tick"],"mappings":";;;AAOA,MAAMA,IAAS,KAAK,IAAI,KAAK,KAAK,CAAC;AAE5B,SAASC,EACRC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACF;AAEE,QAAMC,IAAe,IAAIC,EAAa,kBAAkC,GAClEC,IAAaJ,MAAgB;AAEnC,WAASK,EAAeC,GAAgB;AACpC,WAAKA,EAAK,SAGH,KAAK,IAAI,GAAGA,EAAK,IAAI,CAAAC,MAAOL,EAAa,aAAaM,CAAG,CAAC,CAAC,IAFvD;AAAA,EAGf;AAEA,WAASC,EAAwBH,GAAkB;AAC/C,WAAKA,EAAK,SAGH,KAAK,IAAI,GAAGA,EAAK,IAAID,CAAc,CAAC,IAFhC;AAAA,EAGf;AAMA,MAAIK,IAAoC,CAAA,GACpCC,IAAuC,CAAA,GACvCC,IAAQ,GACRC,IAAQ;AAEZ,QAAMC,IAAYC,EAAapB,GAAWC,GAAWC,CAAY,GAC3DmB,IAAeC,EAAgBtB,GAAWC,GAAWC,CAAY;AAEvE,WAASqB,EAA0BC,GAA4B;AAC3D,WAAOA,EAAgB;AAAA,MAAI,OACnB,KAAK;AAAA,QACD,GAAGC,EAAK;AAAA,UAAI,OACR,KAAK;AAAA,YACD,GAAGnB,EAAcoB,CAAQ,EACpB,OAAA,EAEA;AAAA,cAAI,CAAAC,MACDA,IAAUvB,EAAWsB,CAAQ,EAAEC,CAAO,EAAE,SAASC,IAAsB;AAAA,YAAA;AAAA,UAAA;AAAA,QAC3E;AAAA,MACR;AAAA,IACJ;AAAA,EAGhB;AACA,WAASC,EAAyBL,GAA4B;AAC1D,WA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ACnBY,IAA0Bc,EAAyBV,CAAS,GAC5DF,IAAQiB,EAAQf,GAAW,EAAI,IAE/BhB,MAAmB,YACnBY,IAA0BkB,EAAyBd,CAAS,MAhB5DhB,MAAmB,WACnBa,IAA6Ba,EAAyBR,CAAY,GAClEH,IAAQgB,EAAQb,GAAc,EAAK,KAGnCL,IAA6BiB,EAAyBZ,CAAY,GAenE,EAAC,yBAAAN,GAAyB,4BAAAC,GAA4B,OAAAC,GAAO,OAAAC,EAAAA;AACxE;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/{discrete/utils → utils}/splitTextByWidth.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextMeasurer as f } from "
|
|
1
|
+
import { TextMeasurer as f } from "./TextMeasurer/TextMeasurer.js";
|
|
2
2
|
function d(h, p, a, o = 14) {
|
|
3
3
|
const i = new f(`600 ${o}px Manrope`), s = [];
|
|
4
4
|
h.split(new RegExp("(?=[_-])|(?<=[_-])")).forEach((n) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitTextByWidth.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/utils/splitTextByWidth.ts"],"sourcesContent":["import { TextMeasurer } from './TextMeasurer/TextMeasurer';\n\nfunction splitWord(word:string, startLineLength:number, maxLength:number, fontSize = 14) {\n const textMeasurer = new TextMeasurer(`600 ${fontSize}px Manrope`);\n // \"_\" and \"-\" symbols have priority as separation bounds, if this is not enough split by single symbols\n const parts:string[] = [];\n word\n .split(/(?=[_-])|(?<=[_-])/)\n .forEach((part) => {\n const length = textMeasurer.getTextWidth(part);\n if (length > maxLength) {\n parts.push(...part.split(''));\n } else {\n parts.push(part);\n }\n });\n let currentLine = '';\n let currentLineLength = 0;\n let i = 0;\n let firstPart = '';\n while (currentLineLength <= startLineLength) {\n const nextLength = textMeasurer.getTextWidth(currentLine + parts[i]);\n if (nextLength < startLineLength) {\n currentLine += parts[i];\n firstPart = currentLine;\n i++;\n }\n currentLineLength = nextLength;\n }\n currentLine = '';\n currentLineLength = 0;\n const lines:string[] = [];\n for (i; i < parts.length; i++) {\n const nextLength = textMeasurer.getTextWidth(currentLine + parts[i]);\n if (nextLength < maxLength) {\n currentLine += parts[i];\n currentLineLength = nextLength;\n } else {\n lines.push(currentLine);\n currentLine = parts[i];\n currentLineLength = textMeasurer.getTextWidth(parts[i]);\n }\n }\n return {\n firstPart,\n lines,\n lastPart: currentLine,\n lastPartLength: currentLineLength\n };\n}\n\nexport function splitTextByWidth (text:string, maxWidth: number, fontSize: number) {\n const textMeasurer = new TextMeasurer(`600 ${fontSize}px Manrope`);\n if (text.trim() === '') {\n return [];\n }\n if (textMeasurer.getTextWidth(text) <= maxWidth) {\n return [text];\n }\n const words = text.split(/\\s+/);\n const result:string[] = [];\n let currentLine = '';\n let currentLineLength = 0;\n for (let i = 0; i < words.length; i++) {\n const tempLine = `${currentLine} ${words[i]}`;\n const tempLineLength = textMeasurer.getTextWidth(tempLine);\n if (tempLineLength <= maxWidth) {\n currentLine = tempLine;\n currentLineLength = tempLineLength;\n } else {\n const wordLength = textMeasurer.getTextWidth(words[i]);\n if (wordLength > maxWidth) {\n const {\n firstPart,\n lines,\n lastPart,\n lastPartLength\n } = splitWord(words[i], maxWidth - currentLineLength, maxWidth, fontSize);\n result.push(`${currentLine} ${firstPart}`);\n result.push(...lines);\n currentLine = lastPart;\n currentLineLength = lastPartLength;\n } else {\n result.push(currentLine);\n currentLine = words[i];\n currentLineLength = wordLength;\n }\n }\n }\n result.push(currentLine);\n return result.filter((line) => {\n return line.length > 0;\n });\n}\n"],"names":["splitWord","word","startLineLength","maxLength","fontSize","textMeasurer","TextMeasurer","parts","part","currentLine","currentLineLength","i","firstPart","nextLength","lines","splitTextByWidth","text","maxWidth","words","result","tempLine","tempLineLength","wordLength","lastPart","lastPartLength","line"],"mappings":";AAEA,SAASA,EAAUC,GAAaC,GAAwBC,GAAkBC,IAAW,IAAI;AACrF,QAAMC,IA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AAIV,IAAc,IACdC,IAAoB;AACxB,WAASC,IAAI,GAAGA,IAAIO,EAAM,QAAQP,KAAK;AACnC,UAAMS,IAAW,GAAGX,CAAW,IAAIS,EAAMP,CAAC,CAAC,IACrCU,IAAiBhB,EAAa,aAAae,CAAQ;AACzD,QAAIC,KAAkBJ;AAClBR,UAAcW,GACdV,IAAoBW;AAAAA,SACjB;AACH,YAAMC,IAAajB,EAAa,aAAaa,EAAMP,CAAC,CAAC;AACrD,UAAIW,IAAaL,GAAU;AACvB,cAAM;AAAA,UACF,WAAAL;AAAAA,UACA,OAAAE;AAAAA,UACA,UAAAS;AAAAA,UACA,gBAAAC;AAAAA,QAAA,IACAxB,EAAUkB,EAAMP,CAAC,GAAGM,IAAWP,GAAmBO,GAAUb,CAAQ;AACxEe,QAAAA,EAAO,KAAK,GAAGV,CAAW,IAAIG,CAAS,EAAE,GACzCO,EAAO,KAAK,GAAGL,CAAK,GACpBL,IAAcc,GACdb,IAAoBc;AAAAA,MACxB;AACIL,QAAAA,EAAO,KAAKV,CAAW,GACvBA,IAAcS,EAAMP,CAAC,GACrBD,IAAoBY;AAAAA,IAE5B;AAAA,EACJ;AACA,SAAAH,EAAO,KAAKV,CAAW,GAChBU,EAAO,OAAO,CAACM,MACXA,EAAK,SAAS,CACxB;AACL;","x_google_ignoreList":[0]}
|
|
@@ -29,7 +29,7 @@ class ne extends V {
|
|
|
29
29
|
{
|
|
30
30
|
x: new p({
|
|
31
31
|
componentName: "x",
|
|
32
|
-
allowedTypes: ["Int", "Long", "Double", "Float"],
|
|
32
|
+
allowedTypes: ["Int", "Long", "Double", "Float", "String"],
|
|
33
33
|
parentComponents: ["y"],
|
|
34
34
|
strictlyDependsOnParents: !1,
|
|
35
35
|
settings: {
|
|
@@ -41,7 +41,7 @@ class ne extends V {
|
|
|
41
41
|
}),
|
|
42
42
|
y: new p({
|
|
43
43
|
componentName: "y",
|
|
44
|
-
allowedTypes: ["Int", "Long", "Double", "Float"],
|
|
44
|
+
allowedTypes: ["Int", "Long", "Double", "Float", "String"],
|
|
45
45
|
parentComponents: ["x"],
|
|
46
46
|
strictlyDependsOnParents: !1,
|
|
47
47
|
settings: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scatterplot.js","sources":["../../../../../../../node_modules/@milaboratories/pf-plots/src/controllers/controllersByChartType/scatterplot.ts"],"sourcesContent":["import canonicalize from 'canonicalize';\nimport lodash from 'lodash';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n DataByColumns,\n InputStateParent,\n} from '../../common';\nimport {FORMAT} from '../../constants';\nimport {PValue} from '../../store';\nimport {ControllerBase, PlotDataAndSettings} from '../ControllerBase';\nimport {ComponentController} from '../ComponentController';\nimport {AxisId, ColumnId} from '../../spec';\nimport {columnOrAxisIdFromString, isColumnId} from '../../spec';\nimport type {DataStore} from '../../store';\nimport {\n checkSourceBySpecForFilters,\n createHighlightColumn,\n createLinkerMap,\n getAxesSpecsFromSources,\n getColumnOrAxisLabel, getColumnOrAxisSpec,\n getColumnOrAxisValueLabelsId,\n getFiltersFromStates,\n getLinkerColumnsForSource,\n} from '../../utils';\n\nexport interface ScatterplotUIState extends InputStateParent<'scatterplot'> {\n type: 'scatterplot';\n components: {\n x: ComponentStateSimple;\n y: ComponentStateSimple;\n filters: ComponentStateFilter;\n highlight: ComponentStateFilter;\n tabBy: ComponentStateFilter;\n facetBy: ComponentStateSimple;\n grouping: ComponentStateSimple;\n shape: ComponentStateSimple;\n size: ComponentStateSimple;\n label: ComponentStateSimple;\n tooltipContent: ComponentStateSimple;\n };\n}\n\nexport const InitialScatterplotState: ScatterplotUIState = {\n type: 'scatterplot',\n components: {\n x: {type: 'simple', selectorStates: []},\n y: {type: 'simple', selectorStates: []},\n filters: {type: 'filter', selectorStates: []},\n highlight: {type: 'filter', selectorStates: []},\n tabBy: {type: 'filter', selectorStates: []},\n facetBy: {type: 'simple', selectorStates: []},\n grouping: {type: 'simple', selectorStates: []},\n shape: {type: 'simple', selectorStates: []},\n size: {type: 'simple', selectorStates: []},\n label: {type: 'simple', selectorStates: []},\n tooltipContent: {type: 'simple', selectorStates: []}\n },\n dividedAxes: {},\n};\n\nexport class ScatterplotStateController extends ControllerBase<ScatterplotUIState> {\n dataInputs = ['x', 'y'];\n\n constructor() {\n super(\n {\n x: new ComponentController<ScatterplotUIState, 'x'>({\n componentName: 'x',\n allowedTypes: ['Int', 'Long', 'Double' , 'Float'],\n parentComponents: ['y'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n y: new ComponentController<ScatterplotUIState, 'y'>({\n componentName: 'y',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n parentComponents: ['x'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n facetBy: new ComponentController<ScatterplotUIState, 'facetBy'>({\n componentName: 'facetBy',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n grouping: new ComponentController<ScatterplotUIState, 'grouping'>({\n componentName: 'grouping',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n shape: new ComponentController<ScatterplotUIState, 'shape'>({\n componentName: 'shape',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n size: new ComponentController<ScatterplotUIState, 'size'>({\n componentName: 'size',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n tooltipContent: new ComponentController<ScatterplotUIState, 'tooltipContent'>({\n componentName: 'tooltipContent',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n columnsAllowed: true,\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n label: new ComponentController<ScatterplotUIState, 'label'>({\n componentName: 'label',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: false,\n },\n }),\n },\n {\n filters: new ComponentController<ScatterplotUIState, 'filters'>({\n componentName: 'filters',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n tabBy: new ComponentController<ScatterplotUIState, 'tabBy'>({\n componentName: 'tabBy',\n allowedTypes: ['String', 'Int'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n },\n }),\n highlight: new ComponentController<ScatterplotUIState, 'highlight'>({\n componentName: 'highlight',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n }\n );\n }\n\n async getMustBeConsumedAxes(store: DataStore, state: ScatterplotUIState):Promise<Set<string>> {\n if (!state.components.x.selectorStates.length || !state.components.y.selectorStates.length) {\n return new Set<string>();\n }\n const sourceIdX = state.components.x.selectorStates[0].selectedSource;\n const sourceIdY = state.components.y.selectorStates[0].selectedSource;\n const specX = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdX));\n const specY = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdY));\n if (!specX || !specY) {\n return new Set<string>();\n }\n const axesX = specX.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const axesY = specY.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const hangingX = axesX.filter(axisKey => !axesY.some(id => id === axisKey));\n const hangingY = axesY.filter(axisKey => !axesX.some(id => id === axisKey));\n\n return new Set<string>([...hangingX, ...hangingY])\n }\n\n async createDataByColumns(store: DataStore, state: ScatterplotUIState): Promise<PlotDataAndSettings['data']> {\n const xColumnIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yColumnIdString = state.components.y.selectorStates[0]?.selectedSource;\n if (!xColumnIdString || !yColumnIdString) {\n throw Error('X or Y column is not valid');\n }\n const xId = columnOrAxisIdFromString(xColumnIdString);\n const yId = columnOrAxisIdFromString(yColumnIdString);\n const dataByColumns: DataByColumns = {\n type: 'columns',\n id: canonicalize(state.components) ?? '',\n values: {},\n };\n\n const linkerMap = await createLinkerMap(store);\n\n const filterSelectedStates = [\n ...state.components.filters.selectorStates,\n ...state.components.tabBy.selectorStates\n ]\n // filters for column/axes data requests\n const filters = getFiltersFromStates(filterSelectedStates);\n const filterColumns = filterSelectedStates.map(s => columnOrAxisIdFromString(s.selectedSource)).filter(isColumnId);\n\n const parentSources = [xId, yId].filter(isColumnId).map(item => item.toCanonicalString());\n\n if (parentSources.length === 0) {\n throw Error('One of X and Y should be a column');\n }\n const parentAxesList = await getAxesSpecsFromSources(store, parentSources);\n\n const primarySources = [xId, yId, ...filterColumns];\n const secondarySources: (ColumnId | AxisId)[] = [];\n const primarySourcesFixedAxes:{idx: number, value: PValue}[][] = [[], []];\n const secondarySourcesFixedAxes:{idx: number, value: PValue}[][] = [];\n const linkerColumns:ColumnId[] = [];\n\n for (const {selectedSource, fixedAxes} of filterSelectedStates) {\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n primarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n }\n\n const inputs = [\n state.components.grouping,\n state.components.size,\n state.components.shape,\n state.components.tooltipContent,\n state.components.facetBy,\n state.components.label,\n state.components.highlight,\n ];\n for (const input of inputs) {\n for (const {selectedSource, fixedAxes} of input.selectorStates) {\n secondarySources.push(columnOrAxisIdFromString(selectedSource)!);\n secondarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n const labelsColumnId = await getColumnOrAxisValueLabelsId(store, selectedSource, parentSources);\n if (labelsColumnId) {\n secondarySources.push(labelsColumnId);\n }\n }\n }\n\n const data = await store.pFrameProvider.getTableOuterJoin(\n [xId, yId, ...linkerColumns, ...filterColumns],\n secondarySources,\n filters,\n false,\n primarySourcesFixedAxes,\n secondarySourcesFixedAxes\n );\n\n [...primarySources, ...secondarySources].forEach(item => {\n const key = item.toCanonicalString();\n dataByColumns.values[key] = isColumnId(item) ? data.columnsData[key] : data.axesData[key];\n });\n\n dataByColumns.values['key'] = new Array(dataByColumns.values[Object.keys(dataByColumns.values)[0]].length).fill(0).map((_v, idx) => idx);\n\n if (state.components.highlight.selectorStates.length) {\n dataByColumns.values['highlight'] = createHighlightColumn(state.components.highlight.selectorStates, data) as PValue[];\n }\n\n return {byColumns: dataByColumns};\n }\n\n async createChartSettings(store: DataStore, state: ScatterplotUIState): Promise<Record<string, unknown>> {\n const xIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yIdString = state.components.y.selectorStates[0]?.selectedSource;\n const xIdWithQ = xIdString ? columnOrAxisIdFromString(xIdString) : null;\n const yIdWithQ = yIdString ? columnOrAxisIdFromString(yIdString) : null;\n if (!xIdString || !yIdString || !xIdWithQ || !yIdWithQ || (!isColumnId(xIdWithQ) && !isColumnId(yIdWithQ))) {\n throw Error('Empty or invalid required data');\n }\n\n const parentSources = [xIdWithQ, yIdWithQ].filter(isColumnId).map(item => item.toCanonicalString());\n const x = {\n type: 'column',\n value: xIdString,\n label: await getColumnOrAxisLabel(store, xIdString, parentSources),\n };\n const y = {\n type: 'column',\n value: yIdString,\n label: await getColumnOrAxisLabel(store, yIdString, parentSources),\n };\n const keyColumn = {\n type: 'column',\n value: 'key',\n };\n const facetBy = await Promise.all(\n state.components.facetBy.selectorStates.map(async selectorState => ({\n type: 'column',\n value:\n (await getColumnOrAxisValueLabelsId(store, selectorState.selectedSource, parentSources))?.toCanonicalString() ??\n selectorState.selectedSource,\n }))\n );\n const allGroupingIds = lodash.uniq([\n ...state.components.grouping.selectorStates.map(s => s.selectedSource),\n ...state.components.size.selectorStates.map(s => s.selectedSource),\n ...state.components.shape.selectorStates.map(s => s.selectedSource),\n ]);\n const grouping = await Promise.all(\n allGroupingIds.map(async idString => {\n return {\n columnName: {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, idString, parentSources)) || idString,\n value: idString,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, idString, parentSources))?.toCanonicalString() ??\n idString,\n }\n };\n })\n );\n\n const tooltipContent = await Promise.all(\n state.components.tooltipContent.selectorStates.map(async selectorState => {\n const source = selectorState.selectedSource;\n const id = columnOrAxisIdFromString(source);\n const labelColumn = (await getColumnOrAxisValueLabelsId(store, source, parentSources)) ?? id;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n return {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, source, parentSources)) || source,\n value: source,\n valueLabels: labelColumn.toCanonicalString(),\n format: spec?.annotations?.[FORMAT]\n };\n })\n );\n\n let label;\n if (state.components.label.selectorStates.length) {\n const source = state.components.label.selectorStates[0].selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n label = {\n type: 'column',\n value: source,\n label: await getColumnOrAxisLabel(store, source, parentSources),\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: spec?.annotations?.[FORMAT]\n };\n }\n let highlight;\n if (state.components.highlight.selectorStates.length) {\n highlight = {\n type: 'column',\n value: 'highlight'\n }\n }\n return {\n type: 'scatterplot',\n x,\n y,\n keyColumn,\n facetBy,\n grouping,\n label,\n highlight,\n tooltips: {\n show: true,\n content: tooltipContent\n }\n };\n }\n}\n"],"names":["InitialScatterplotState","ScatterplotStateController","ControllerBase","ComponentController","checkSourceBySpecForFilters","__publicField","store","state","sourceIdX","sourceIdY","specX","columnOrAxisIdFromString","specY","axesX","s","AxisId","axesY","hangingX","axisKey","id","hangingY","xColumnIdString","_a","yColumnIdString","_b","xId","yId","dataByColumns","canonicalize","linkerMap","createLinkerMap","filterSelectedStates","filters","getFiltersFromStates","filterColumns","isColumnId","parentSources","item","parentAxesList","getAxesSpecsFromSources","primarySources","secondarySources","primarySourcesFixedAxes","secondarySourcesFixedAxes","linkerColumns","selectedSource","fixedAxes","getLinkerColumnsForSource","axisIdx","axisValue","inputs","input","labelsColumnId","getColumnOrAxisValueLabelsId","data","key","_v","idx","createHighlightColumn","xIdString","yIdString","xIdWithQ","yIdWithQ","x","getColumnOrAxisLabel","y","keyColumn","facetBy","selectorState","allGroupingIds","lodash","grouping","idString","tooltipContent","source","labelColumn","spec","getColumnOrAxisSpec","FORMAT","label","_c","_d","highlight"],"mappings":";;;;;;;;AA2CO,MAAMA,KAA8C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACR,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,GAAG,EAAC,M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KAAMsC;AAAAA,UACrE,OAAOA;AAAAA,UACP,aAAaC,EAAY,kBAAA;AAAA,UACzB,SAAQrD,IAAAsD,KAAA,gBAAAA,EAAM,gBAAN,gBAAAtD,EAAoBwD,CAAAA;AAAAA,QAAA;AAAA,MAEnC,CAAA;AAAA,IAAA;AAGD,QAAAC;AACJ,QAAIxE,EAAM,WAAW,MAAM,eAAe,QAAQ;AAC9C,YAAMmE,IAAUnE,EAAM,WAAW,MAAM,eAAe,CAAC,EAAE,gBACnDqE,IAAO,MAAMC,EAAoBvE,GAAOoE,GAAQtC,CAAa;AAC3D2C,MAAAA,IAAA;AAAA,QACJ,MAAM;AAAA,QACN,OAAOL;AAAAA,QACP,OAAO,MAAMV,EAAqB1D,GAAOoE,GAAQtC,CAAa;AAAA,QAC9D,eACK4C,IAAA,MAAM3B,EAA6B/C,GAAOoE,GAAQtC,CAAa,MAA/D,OAAA,SAAA4C,EAAmE,kBAAA,MACpEN;AAAAA,QACJ,SAAQO,IAAAL,KAAA,gBAAAA,EAAM,gBAAN,gBAAAK,EAAoBH,CAAAA;AAAAA,MAAA;AAAA,IAChC;AAEA,QAAAI;AACJ,WAAI3E,EAAM,WAAW,UAAU,eAAe,WAC9B2E,IAAA;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA,IAGR;AAAA,MACH,MAAM;AAAA,MACN,GAAAnB;AAAA,MACA,GAAAE;AAAAA,MACA,WAAAC;AAAAA,MACA,SAAAC;AAAAA,MACA,UAAAI;AAAAA,MACA,OAAAQ;AAAAA,MACA,WAAAG;AAAAA,MACA,UAAU;AAAA,QACN,MAAM;AAAA,QACN,SAAST;AAAAA,MAAA;AAAA,IAAA;AAAA,EAEjB;AAER;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"scatterplot.js","sources":["../../../../../../../node_modules/@milaboratories/pf-plots/src/controllers/controllersByChartType/scatterplot.ts"],"sourcesContent":["import canonicalize from 'canonicalize';\nimport lodash from 'lodash';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n DataByColumns,\n InputStateParent,\n} from '../../common';\nimport {FORMAT} from '../../constants';\nimport {PValue} from '../../store';\nimport {ControllerBase, PlotDataAndSettings} from '../ControllerBase';\nimport {ComponentController} from '../ComponentController';\nimport {AxisId, ColumnId} from '../../spec';\nimport {columnOrAxisIdFromString, isColumnId} from '../../spec';\nimport type {DataStore} from '../../store';\nimport {\n checkSourceBySpecForFilters,\n createHighlightColumn,\n createLinkerMap,\n getAxesSpecsFromSources,\n getColumnOrAxisLabel, getColumnOrAxisSpec,\n getColumnOrAxisValueLabelsId,\n getFiltersFromStates,\n getLinkerColumnsForSource,\n} from '../../utils';\n\nexport interface ScatterplotUIState extends InputStateParent<'scatterplot'> {\n type: 'scatterplot';\n components: {\n x: ComponentStateSimple;\n y: ComponentStateSimple;\n filters: ComponentStateFilter;\n highlight: ComponentStateFilter;\n tabBy: ComponentStateFilter;\n facetBy: ComponentStateSimple;\n grouping: ComponentStateSimple;\n shape: ComponentStateSimple;\n size: ComponentStateSimple;\n label: ComponentStateSimple;\n tooltipContent: ComponentStateSimple;\n };\n}\n\nexport const InitialScatterplotState: ScatterplotUIState = {\n type: 'scatterplot',\n components: {\n x: {type: 'simple', selectorStates: []},\n y: {type: 'simple', selectorStates: []},\n filters: {type: 'filter', selectorStates: []},\n highlight: {type: 'filter', selectorStates: []},\n tabBy: {type: 'filter', selectorStates: []},\n facetBy: {type: 'simple', selectorStates: []},\n grouping: {type: 'simple', selectorStates: []},\n shape: {type: 'simple', selectorStates: []},\n size: {type: 'simple', selectorStates: []},\n label: {type: 'simple', selectorStates: []},\n tooltipContent: {type: 'simple', selectorStates: []}\n },\n dividedAxes: {},\n};\n\nexport class ScatterplotStateController extends ControllerBase<ScatterplotUIState> {\n dataInputs = ['x', 'y'];\n\n constructor() {\n super(\n {\n x: new ComponentController<ScatterplotUIState, 'x'>({\n componentName: 'x',\n allowedTypes: ['Int', 'Long', 'Double' , 'Float', 'String'],\n parentComponents: ['y'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n y: new ComponentController<ScatterplotUIState, 'y'>({\n componentName: 'y',\n allowedTypes: ['Int', 'Long', 'Double', 'Float', 'String'],\n parentComponents: ['x'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n facetBy: new ComponentController<ScatterplotUIState, 'facetBy'>({\n componentName: 'facetBy',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n grouping: new ComponentController<ScatterplotUIState, 'grouping'>({\n componentName: 'grouping',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n shape: new ComponentController<ScatterplotUIState, 'shape'>({\n componentName: 'shape',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n size: new ComponentController<ScatterplotUIState, 'size'>({\n componentName: 'size',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n tooltipContent: new ComponentController<ScatterplotUIState, 'tooltipContent'>({\n componentName: 'tooltipContent',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n columnsAllowed: true,\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n label: new ComponentController<ScatterplotUIState, 'label'>({\n componentName: 'label',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: false,\n },\n }),\n },\n {\n filters: new ComponentController<ScatterplotUIState, 'filters'>({\n componentName: 'filters',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n tabBy: new ComponentController<ScatterplotUIState, 'tabBy'>({\n componentName: 'tabBy',\n allowedTypes: ['String', 'Int'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n },\n }),\n highlight: new ComponentController<ScatterplotUIState, 'highlight'>({\n componentName: 'highlight',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n }\n );\n }\n\n async getMustBeConsumedAxes(store: DataStore, state: ScatterplotUIState):Promise<Set<string>> {\n if (!state.components.x.selectorStates.length || !state.components.y.selectorStates.length) {\n return new Set<string>();\n }\n const sourceIdX = state.components.x.selectorStates[0].selectedSource;\n const sourceIdY = state.components.y.selectorStates[0].selectedSource;\n const specX = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdX));\n const specY = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdY));\n if (!specX || !specY) {\n return new Set<string>();\n }\n const axesX = specX.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const axesY = specY.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const hangingX = axesX.filter(axisKey => !axesY.some(id => id === axisKey));\n const hangingY = axesY.filter(axisKey => !axesX.some(id => id === axisKey));\n\n return new Set<string>([...hangingX, ...hangingY])\n }\n\n async createDataByColumns(store: DataStore, state: ScatterplotUIState): Promise<PlotDataAndSettings['data']> {\n const xColumnIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yColumnIdString = state.components.y.selectorStates[0]?.selectedSource;\n if (!xColumnIdString || !yColumnIdString) {\n throw Error('X or Y column is not valid');\n }\n const xId = columnOrAxisIdFromString(xColumnIdString);\n const yId = columnOrAxisIdFromString(yColumnIdString);\n const dataByColumns: DataByColumns = {\n type: 'columns',\n id: canonicalize(state.components) ?? '',\n values: {},\n };\n\n const linkerMap = await createLinkerMap(store);\n\n const filterSelectedStates = [\n ...state.components.filters.selectorStates,\n ...state.components.tabBy.selectorStates\n ]\n // filters for column/axes data requests\n const filters = getFiltersFromStates(filterSelectedStates);\n const filterColumns = filterSelectedStates.map(s => columnOrAxisIdFromString(s.selectedSource)).filter(isColumnId);\n\n const parentSources = [xId, yId].filter(isColumnId).map(item => item.toCanonicalString());\n\n if (parentSources.length === 0) {\n throw Error('One of X and Y should be a column');\n }\n const parentAxesList = await getAxesSpecsFromSources(store, parentSources);\n\n const primarySources = [xId, yId, ...filterColumns];\n const secondarySources: (ColumnId | AxisId)[] = [];\n const primarySourcesFixedAxes:{idx: number, value: PValue}[][] = [[], []];\n const secondarySourcesFixedAxes:{idx: number, value: PValue}[][] = [];\n const linkerColumns:ColumnId[] = [];\n\n for (const {selectedSource, fixedAxes} of filterSelectedStates) {\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n primarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n }\n\n const inputs = [\n state.components.grouping,\n state.components.size,\n state.components.shape,\n state.components.tooltipContent,\n state.components.facetBy,\n state.components.label,\n state.components.highlight,\n ];\n for (const input of inputs) {\n for (const {selectedSource, fixedAxes} of input.selectorStates) {\n secondarySources.push(columnOrAxisIdFromString(selectedSource)!);\n secondarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n const labelsColumnId = await getColumnOrAxisValueLabelsId(store, selectedSource, parentSources);\n if (labelsColumnId) {\n secondarySources.push(labelsColumnId);\n }\n }\n }\n\n const data = await store.pFrameProvider.getTableOuterJoin(\n [xId, yId, ...linkerColumns, ...filterColumns],\n secondarySources,\n filters,\n false,\n primarySourcesFixedAxes,\n secondarySourcesFixedAxes\n );\n\n [...primarySources, ...secondarySources].forEach(item => {\n const key = item.toCanonicalString();\n dataByColumns.values[key] = isColumnId(item) ? data.columnsData[key] : data.axesData[key];\n });\n\n dataByColumns.values['key'] = new Array(dataByColumns.values[Object.keys(dataByColumns.values)[0]].length).fill(0).map((_v, idx) => idx);\n\n if (state.components.highlight.selectorStates.length) {\n dataByColumns.values['highlight'] = createHighlightColumn(state.components.highlight.selectorStates, data) as PValue[];\n }\n\n return {byColumns: dataByColumns};\n }\n\n async createChartSettings(store: DataStore, state: ScatterplotUIState): Promise<Record<string, unknown>> {\n const xIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yIdString = state.components.y.selectorStates[0]?.selectedSource;\n const xIdWithQ = xIdString ? columnOrAxisIdFromString(xIdString) : null;\n const yIdWithQ = yIdString ? columnOrAxisIdFromString(yIdString) : null;\n if (!xIdString || !yIdString || !xIdWithQ || !yIdWithQ || (!isColumnId(xIdWithQ) && !isColumnId(yIdWithQ))) {\n throw Error('Empty or invalid required data');\n }\n\n const parentSources = [xIdWithQ, yIdWithQ].filter(isColumnId).map(item => item.toCanonicalString());\n const x = {\n type: 'column',\n value: xIdString,\n label: await getColumnOrAxisLabel(store, xIdString, parentSources),\n };\n const y = {\n type: 'column',\n value: yIdString,\n label: await getColumnOrAxisLabel(store, yIdString, parentSources),\n };\n const keyColumn = {\n type: 'column',\n value: 'key',\n };\n const facetBy = await Promise.all(\n state.components.facetBy.selectorStates.map(async selectorState => ({\n type: 'column',\n value:\n (await getColumnOrAxisValueLabelsId(store, selectorState.selectedSource, parentSources))?.toCanonicalString() ??\n selectorState.selectedSource,\n }))\n );\n const allGroupingIds = lodash.uniq([\n ...state.components.grouping.selectorStates.map(s => s.selectedSource),\n ...state.components.size.selectorStates.map(s => s.selectedSource),\n ...state.components.shape.selectorStates.map(s => s.selectedSource),\n ]);\n const grouping = await Promise.all(\n allGroupingIds.map(async idString => {\n return {\n columnName: {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, idString, parentSources)) || idString,\n value: idString,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, idString, parentSources))?.toCanonicalString() ??\n idString,\n }\n };\n })\n );\n\n const tooltipContent = await Promise.all(\n state.components.tooltipContent.selectorStates.map(async selectorState => {\n const source = selectorState.selectedSource;\n const id = columnOrAxisIdFromString(source);\n const labelColumn = (await getColumnOrAxisValueLabelsId(store, source, parentSources)) ?? id;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n return {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, source, parentSources)) || source,\n value: source,\n valueLabels: labelColumn.toCanonicalString(),\n format: spec?.annotations?.[FORMAT]\n };\n })\n );\n\n let label;\n if (state.components.label.selectorStates.length) {\n const source = state.components.label.selectorStates[0].selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n label = {\n type: 'column',\n value: source,\n label: await getColumnOrAxisLabel(store, source, parentSources),\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: spec?.annotations?.[FORMAT]\n };\n }\n let highlight;\n if (state.components.highlight.selectorStates.length) {\n highlight = {\n type: 'column',\n value: 'highlight'\n }\n }\n return {\n type: 'scatterplot',\n x,\n y,\n keyColumn,\n facetBy,\n grouping,\n label,\n highlight,\n tooltips: {\n show: true,\n content: tooltipContent\n }\n };\n }\n}\n"],"names":["InitialScatterplotState","ScatterplotStateController","ControllerBase","ComponentController","checkSourceBySpecForFilters","__publicField","store","state","sourceIdX","sourceIdY","specX","columnOrAxisIdFromString","specY","axesX","s","AxisId","axesY","hangingX","axisKey","id","hangingY","xColumnIdString","_a","yColumnIdString","_b","xId","yId","dataByColumns","canonicalize","linkerMap","createLinkerMap","filterSelectedStates","filters","getFiltersFromStates","filterColumns","isColumnId","parentSources","item","parentAxesList","getAxesSpecsFromSources","primarySources","secondarySources","primarySourcesFixedAxes","secondarySourcesFixedAxes","linkerColumns","selectedSource","fixedAxes","getLinkerColumnsForSource","axisIdx","axisValue","inputs","input","labelsColumnId","getColumnOrAxisValueLabelsId","data","key","_v","idx","createHighlightColumn","xIdString","yIdString","xIdWithQ","yIdWithQ","x","getColumnOrAxisLabel","y","keyColumn","facetBy","selectorState","allGroupingIds","lodash","grouping","idString","tooltipContent","source","labelColumn","spec","getColumnOrAxisSpec","FORMAT","label","_c","_d","highlight"],"mappings":";;;;;;;;AA2CO,MAAMA,KAA8C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACR,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,WAAW,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC5C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C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AMmE,IAAUnE,EAAM,WAAW,MAAM,eAAe,CAAC,EAAE,gBACnDqE,IAAO,MAAMC,EAAoBvE,GAAOoE,GAAQtC,CAAa;AAC3D2C,MAAAA,IAAA;AAAA,QACJ,MAAM;AAAA,QACN,OAAOL;AAAAA,QACP,OAAO,MAAMV,EAAqB1D,GAAOoE,GAAQtC,CAAa;AAAA,QAC9D,eACK4C,IAAA,MAAM3B,EAA6B/C,GAAOoE,GAAQtC,CAAa,MAA/D,OAAA,SAAA4C,EAAmE,kBAAA,MACpEN;AAAAA,QACJ,SAAQO,IAAAL,KAAA,gBAAAA,EAAM,gBAAN,gBAAAK,EAAoBH,CAAAA;AAAAA,MAAA;AAAA,IAChC;AAEA,QAAAI;AACJ,WAAI3E,EAAM,WAAW,UAAU,eAAe,WAC9B2E,IAAA;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA,IAGR;AAAA,MACH,MAAM;AAAA,MACN,GAAAnB;AAAA,MACA,GAAAE;AAAAA,MACA,WAAAC;AAAAA,MACA,SAAAC;AAAAA,MACA,UAAAI;AAAAA,MACA,OAAAQ;AAAAA,MACA,WAAAG;AAAAA,MACA,UAAU;AAAA,QACN,MAAM;AAAA,QACN,SAAST;AAAAA,MAAA;AAAA,IAAA;AAAA,EAEjB;AAER;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/graph-maker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.143",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/lib.js",
|
|
6
6
|
"types": "dist/lib.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ag-grid-community/core": "^32.3.3",
|
|
39
39
|
"@milaboratories/helpers": "^1.6.15",
|
|
40
|
-
"@milaboratories/miplots4": "^1.0.
|
|
41
|
-
"@milaboratories/pf-plots": "^1.1.
|
|
40
|
+
"@milaboratories/miplots4": "^1.0.135",
|
|
41
|
+
"@milaboratories/pf-plots": "^1.1.29",
|
|
42
42
|
"@platforma-sdk/model": "^1.39.8",
|
|
43
43
|
"@platforma-sdk/ui-vue": "^1.39.16",
|
|
44
44
|
"@types/d3-hierarchy": "^3.1.7",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BandAxis.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/discrete/components/BandAxis.tsx"],"sourcesContent":["import {BLACK} from '../../constants';\nimport {TICK_OFFSET} from '../constants';\nimport React from 'react';\nimport type {ScaleBand} from 'd3-scale';\n\ntype Scale = ScaleBand<string>;\ntype Orient = 'left' | 'bottom';\n\nfunction translateX(x: number) {\n return `translate(${x},0)`;\n}\n\nfunction translateY(y: number) {\n return `translate(0,${y})`;\n}\n\ntype LabelsPosition = 'center' | '45deg' | '90deg';\n\nconst FONT_HEIGHT = 21;\nfunction getRotationTransform(labelsPosition: LabelsPosition, orient: 'left' | 'bottom') {\n if (labelsPosition === '45deg') {\n const x = orient === 'left' ? -FONT_HEIGHT / 2 : 0;\n const y = orient === 'bottom' ? FONT_HEIGHT / 2 : -FONT_HEIGHT / 2;\n return `translate(${x},${y}) rotate(-45)`;\n }\n if (labelsPosition === '90deg' && orient === 'bottom') {\n return `translate(${-FONT_HEIGHT / 2},${TICK_OFFSET + FONT_HEIGHT / 2}) rotate(-90)`;\n }\n return orient === 'bottom' ? `translate(0,${TICK_OFFSET})` : `translate(${-TICK_OFFSET},0)`;\n}\n\nfunction getDominantBaseline(labelsPosition: LabelsPosition, orient: 'left' | 'bottom') {\n if (orient === 'left' || (orient === 'bottom' && labelsPosition === '90deg')) {\n return 'central';\n }\n if (labelsPosition === 'center') {\n return 'hanging';\n }\n return 'auto';\n}\n\nfunction getTextAnchor(labelsPosition: LabelsPosition, orient: 'left' | 'bottom') {\n if (orient === 'left' || (orient === 'bottom' && labelsPosition !== 'center')) {\n return 'end';\n }\n return 'middle';\n}\n\nexport const BandAxis = ({\n scale,\n tickSize = 6,\n tickPadding = TICK_OFFSET,\n orient = 'bottom',\n labelsPosition = 'center',\n labels = {},\n offset = typeof window !== 'undefined' && window.devicePixelRatio > 1 ? 0 : 0.5,\n}: {\n scale: Scale;\n tickSize?: number;\n tickPadding?: number;\n offset?: number;\n orient?: Orient;\n labels?: Record<string, string[]>;\n labelsPosition?: 'center' | '45deg' | '90deg';\n}) => {\n function center(scale: Scale, offset: number) {\n if (scale.bandwidth) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n }\n if (scale?.round()) {\n offset = Math.round(offset);\n }\n return (d: string) => {\n const value = scale(d);\n return value === undefined ? 0 : value + offset;\n };\n }\n\n const values = scale.domain();\n const getLabel = (tick: string) => labels[tick] ?? [];\n const spacing = Math.max(tickSize, 0) + tickPadding;\n const position = center(scale.copy(), offset);\n\n const transform = orient === 'bottom' ? translateX : translateY;\n const k = orient === 'left' ? -1 : 1;\n\n const lineProps = {\n [(orient === 'left' ? 'x' : 'y') + '2']: k * tickSize,\n };\n\n const textProps = {\n [orient === 'left' ? 'x' : 'y']: k * spacing,\n };\n\n return (\n <g>\n {values.map((tick: string, i: number) => (\n <g className=\"tick\" key={i} transform={transform(position(tick) + offset)}>\n <line stroke={BLACK} {...lineProps} />\n <g transform={getRotationTransform(labelsPosition, orient)}>\n {getLabel(tick).map((line, idx) => {\n return (\n <text\n key={`${line}_${idx}`}\n fill={BLACK}\n fontSize=\"14px\"\n fontWeight=\"500\"\n fontFamily=\"Manrope\"\n dominantBaseline={getDominantBaseline(labelsPosition, orient)}\n textAnchor={getTextAnchor(labelsPosition, orient)}\n dy={20 * idx}\n {...textProps}\n >\n {line}\n </text>\n );\n })}\n </g>\n </g>\n ))}\n </g>\n );\n};\n"],"names":["translateX","x","translateY","y","FONT_HEIGHT","getRotationTransform","labelsPosition","orient","TICK_OFFSET","getDominantBaseline","getTextAnchor","BandAxis","scale","tickSize","tickPadding","labels","offset","center","d","value","values","getLabel","tick","spacing","position","transform","k","lineProps","textProps","m","i","jsxs","jsx","BLACK","line","idx"],"mappings":";;;AAQA,SAASA,EAAWC,GAAW;AAC3B,SAAO,aAAaA,CAAC;AACzB;AAEA,SAASC,EAAWC,GAAW;AAC3B,SAAO,eAAeA,CAAC;AAC3B;AAIA,MAAMC,IAAc;AACpB,SAASC,EAAqBC,GAAgCC,GAA2B;AACrF,MAAID,MAAmB,SAAS;AAC5B,UAAML,IAAIM,MAAW,SAAS,CAACH,IAAc,IAAI,GAC3CD,IAAII,MAAW,WAAWH,IAAc,IAAI,CAACA,IAAc;AACjE,WAAO,aAAaH,CAAC,IAAIE,CAAC;AAAA,EAC9B;AACA,SAAIG,MAAmB,WAAWC,MAAW,WAClC,aAAa,CAACH,IAAc,CAAC,IAAII,IAAcJ,IAAc,CAAC,kBAElEG,MAAW,WAAW,eAAeC,CAAW,MAAM,aAAa,CAACA,CAAW;AAC1F;AAEA,SAASC,EAAoBH,GAAgCC,GAA2B;AACpF,SAAIA,MAAW,UAAWA,MAAW,YAAYD,MAAmB,UACzD,YAEPA,MAAmB,WACZ,YAEJ;AACX;AAEA,SAASI,EAAcJ,GAAgCC,GAA2B;AAC9E,SAAIA,MAAW,UAAWA,MAAW,YAAYD,MAAmB,WACzD,QAEJ;AACX;AAEO,MAAMK,IAAW,CAAC;AAAA,EACrB,OAAAC;AAAAA,EACA,UAAAC,IAAW;AAAA,EACX,aAAAC,IAAcN;AAAAA,EACd,QAAAD,IAAS;AAAA,EACT,gBAAAD,IAAiB;AAAA,EACjB,QAAAS,IAAS,CAAA;AAAA,EACT,QAAAC,IAAS,OAAO,SAAW,OAAe,OAAO,mBAAmB,IAAI,IAAI;AAChF,MAQM;AACF,WAASC,EAAOL,GAAcI,GAAgB;AAC1C,WAAIJ,EAAM,cACNI,IAAS,KAAK,IAAI,GAAGJ,EAAM,cAAcI,IAAS,CAAC,IAAI,IAEvDJ,KAAAA,QAAAA,EAAO,MAAA,MACPI,IA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AAAAA,MAAA;AAAA,MAVI,GAAGA,CAAI,IAAIC,CAAG;AAAA,IAAA,CAa9B,GACL;AAAA,EAAA,KApBqBL,CAqBzB,CACH,GACL;AAER;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"splitTextByWidth.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/discrete/utils/splitTextByWidth.ts"],"sourcesContent":["import { TextMeasurer } from '../../utils/TextMeasurer/TextMeasurer';\n\nfunction splitWord(word:string, startLineLength:number, maxLength:number, fontSize = 14) {\n const textMeasurer = new TextMeasurer(`600 ${fontSize}px Manrope`);\n // \"_\" and \"-\" symbols have priority as separation bounds, if this is not enough split by single symbols\n const parts:string[] = [];\n word\n .split(/(?=[_-])|(?<=[_-])/)\n .forEach((part) => {\n const length = textMeasurer.getTextWidth(part);\n if (length > maxLength) {\n parts.push(...part.split(''));\n } else {\n parts.push(part);\n }\n });\n let currentLine = '';\n let currentLineLength = 0;\n let i = 0;\n let firstPart = '';\n while (currentLineLength <= startLineLength) {\n const nextLength = textMeasurer.getTextWidth(currentLine + parts[i]);\n if (nextLength < startLineLength) {\n currentLine += parts[i];\n firstPart = currentLine;\n i++;\n }\n currentLineLength = nextLength;\n }\n currentLine = '';\n currentLineLength = 0;\n const lines:string[] = [];\n for (i; i < parts.length; i++) {\n const nextLength = textMeasurer.getTextWidth(currentLine + parts[i]);\n if (nextLength < maxLength) {\n currentLine += parts[i];\n currentLineLength = nextLength;\n } else {\n lines.push(currentLine);\n currentLine = parts[i];\n currentLineLength = textMeasurer.getTextWidth(parts[i]);\n }\n }\n return {\n firstPart,\n lines,\n lastPart: currentLine,\n lastPartLength: currentLineLength\n };\n}\n\nexport function splitTextByWidth (text:string, maxWidth: number, fontSize: number) {\n const textMeasurer = new TextMeasurer(`600 ${fontSize}px Manrope`);\n if (text.trim() === '') {\n return [];\n }\n if (textMeasurer.getTextWidth(text) <= maxWidth) {\n return [text];\n }\n const words = text.split(/\\s+/);\n const result:string[] = [];\n let currentLine = '';\n let currentLineLength = 0;\n for (let i = 0; i < words.length; i++) {\n const tempLine = `${currentLine} ${words[i]}`;\n const tempLineLength = textMeasurer.getTextWidth(tempLine);\n if (tempLineLength <= maxWidth) {\n currentLine = tempLine;\n currentLineLength = tempLineLength;\n } else {\n const wordLength = textMeasurer.getTextWidth(words[i]);\n if (wordLength > maxWidth) {\n const {\n firstPart,\n lines,\n lastPart,\n lastPartLength\n } = splitWord(words[i], maxWidth - currentLineLength, maxWidth, fontSize);\n result.push(`${currentLine} ${firstPart}`);\n result.push(...lines);\n currentLine = lastPart;\n currentLineLength = lastPartLength;\n } else {\n result.push(currentLine);\n currentLine = words[i];\n currentLineLength = wordLength;\n }\n }\n }\n result.push(currentLine);\n return result.filter((line) => {\n return line.length > 0;\n });\n}\n"],"names":["splitWord","word","startLineLength","maxLength","fontSize","textMeasurer","TextMeasurer","parts","part","currentLine","currentLineLength","i","firstPart","nextLength","lines","splitTextByWidth","text","maxWidth","words","result","tempLine","tempLineLength","wordLength","lastPart","lastPartLength","line"],"mappings":";AAEA,SAASA,EAAUC,GAAaC,GAAwBC,GAAkBC,IAAW,IAAI;AACrF,QAAMC,IAAe,IAAIC,EAAa,OAAOF,CAAQ,YAAY,GAE3DG,IAAiB,CAAA;AACvBN,EAAAA,EACK,MAAM,IAAA,OAAA,oBAAoB,CAAA,EAC1B,QAAQ,CAACO,MAAS;AACAH,MAAa,aAAaG,CAAI,IAChCL,IACTI,EAAM,KAAK,GAAGC,EAAK,MAAM,EAAE,CAAC,IAE5BD,EAAM,KAAKC,CAAI;AAAA,EAEvB,CAAC;AACL,MAAIC,IAAc,IACdC,IAAoB,GACpBC,IAAI,GACJC,IAAY;AAChB,SAAOF,KAAqBR,KAAiB;AACzC,UAAMW,IAAaR,EAAa,aAAaI,IAAcF,EAAMI,CAAC,CAAC;AAC/DE,IA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B,EAAUkB,EAAMP,CAAC,GAAGM,IAAWP,GAAmBO,GAAUb,CAAQ;AACxEe,QAAAA,EAAO,KAAK,GAAGV,CAAW,IAAIG,CAAS,EAAE,GACzCO,EAAO,KAAK,GAAGL,CAAK,GACpBL,IAAcc,GACdb,IAAoBc;AAAAA,MACxB;AACIL,QAAAA,EAAO,KAAKV,CAAW,GACvBA,IAAcS,EAAMP,CAAC,GACrBD,IAAoBY;AAAAA,IAE5B;AAAA,EACJ;AACA,SAAAH,EAAO,KAAKV,CAAW,GAChBU,EAAO,OAAO,CAACM,MACXA,EAAK,SAAS,CACxB;AACL;","x_google_ignoreList":[0]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { j as n } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { BLACK as c } from "../../constants.js";
|
|
3
|
-
import { TICK_OFFSET as i } from "../../discrete/constants.js";
|
|
4
|
-
import { getTicksAndFormat as k } from "../utils/getTicksAndFormat.js";
|
|
5
|
-
function w(t) {
|
|
6
|
-
return `translate(${t},0)`;
|
|
7
|
-
}
|
|
8
|
-
function F(t) {
|
|
9
|
-
return `translate(0,${t})`;
|
|
10
|
-
}
|
|
11
|
-
function $(t) {
|
|
12
|
-
return t === "bottom" ? `translate(0,${i})` : `translate(${-i},0)`;
|
|
13
|
-
}
|
|
14
|
-
function v(t) {
|
|
15
|
-
return t === "bottom" ? "hanging" : "central";
|
|
16
|
-
}
|
|
17
|
-
function A(t) {
|
|
18
|
-
return t === "bottom" ? "middle" : "end";
|
|
19
|
-
}
|
|
20
|
-
const z = ({
|
|
21
|
-
scale: t,
|
|
22
|
-
tickSize: a = 6,
|
|
23
|
-
tickPadding: f = i,
|
|
24
|
-
orient: o = "bottom",
|
|
25
|
-
onlyPositive: l = !1,
|
|
26
|
-
offset: d = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5
|
|
27
|
-
}) => {
|
|
28
|
-
function u(e) {
|
|
29
|
-
return (r) => {
|
|
30
|
-
const m = e(r);
|
|
31
|
-
return m === void 0 ? 0 : +m;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
const { ticks: x, format: p } = k(t, l, o === "bottom"), g = Math.max(a, 0) + f, h = u(t.copy()), b = o === "bottom" ? w : F, s = o === "left" ? -1 : 1, j = {
|
|
35
|
-
[(o === "left" ? "x" : "y") + "2"]: s * a
|
|
36
|
-
}, y = {
|
|
37
|
-
[o === "left" ? "x" : "y"]: s * g
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ n.jsx("g", { children: x.map((e, r) => /* @__PURE__ */ n.jsxs("g", { className: "tick", transform: b(h(e) + d), children: [
|
|
40
|
-
/* @__PURE__ */ n.jsx("line", { stroke: c, ...j }),
|
|
41
|
-
/* @__PURE__ */ n.jsx("g", { transform: $(o), children: /* @__PURE__ */ n.jsx(
|
|
42
|
-
"text",
|
|
43
|
-
{
|
|
44
|
-
fill: c,
|
|
45
|
-
fontSize: "14px",
|
|
46
|
-
fontWeight: "500",
|
|
47
|
-
fontFamily: "Manrope",
|
|
48
|
-
dominantBaseline: v(o),
|
|
49
|
-
textAnchor: A(o),
|
|
50
|
-
...y,
|
|
51
|
-
children: p(e)
|
|
52
|
-
}
|
|
53
|
-
) })
|
|
54
|
-
] }, r)) });
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
z as Axis
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=Axis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Axis.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/components/Axis.tsx"],"sourcesContent":["import {BLACK} from '../../constants';\nimport {TICK_OFFSET} from '../../discrete/constants';\nimport {getTicksAndFormat} from '../utils/getTicksAndFormat';\nimport React from 'react';\nimport type {ScaleLinear, ScaleLogarithmic} from 'd3-scale';\n\ntype Scale = ScaleLinear<number, number> | ScaleLogarithmic<number, number>;\ntype Orient = 'left' | 'bottom';\n\nfunction translateX(x: number) {\n return `translate(${x},0)`;\n}\n\nfunction translateY(y: number) {\n return `translate(0,${y})`;\n}\n\nfunction getRotationTransform(orient: 'left' | 'bottom') {\n return orient === 'bottom' ? `translate(0,${TICK_OFFSET})` : `translate(${-TICK_OFFSET},0)`;\n}\n\nfunction getDominantBaseline(orient: 'left' | 'bottom') {\n return orient === 'bottom' ? 'hanging' : 'central';\n}\n\nfunction getTextAnchor( orient: 'left' | 'bottom') {\n return orient === 'bottom' ? 'middle' : 'end';\n}\n\nexport const Axis = ({\n scale,\n tickSize = 6,\n tickPadding = TICK_OFFSET,\n orient = 'bottom',\n onlyPositive = false,\n offset = typeof window !== 'undefined' && window.devicePixelRatio > 1 ? 0 : 0.5,\n}: {\n scale: Scale;\n tickSize?: number;\n tickPadding?: number;\n offset?: number;\n orient?: Orient;\n onlyPositive?: boolean;\n}) => {\n function number(scale: Scale) {\n return (d: number) => {\n const value = scale(d);\n return value === undefined ? 0 : +value;\n };\n }\n const {ticks: values, format} = getTicksAndFormat(scale, onlyPositive, orient === 'bottom');\n const spacing = Math.max(tickSize, 0) + tickPadding,\n position = (number)(scale.copy());\n\n const transform = orient === 'bottom' ? translateX : translateY;\n const k = orient === 'left' ? -1 : 1;\n\n const lineProps = {\n [(orient === 'left' ? 'x' : 'y') + '2']: k * tickSize,\n };\n\n const textProps = {\n [orient === 'left' ? 'x' : 'y']: k * spacing,\n };\n\n return (\n <g>\n {values.map((tick: number, i: number) => (\n <g className=\"tick\" key={i} transform={transform(position(tick) + offset)}>\n <line stroke={BLACK} {...lineProps} />\n <g transform={getRotationTransform(orient)}>\n <text\n fill={BLACK}\n fontSize=\"14px\"\n fontWeight=\"500\"\n fontFamily=\"Manrope\"\n dominantBaseline={getDominantBaseline(orient)}\n textAnchor={getTextAnchor(orient)}\n {...textProps}\n >\n {format(tick)}\n </text>\n </g>\n </g>\n ))}\n </g>\n );\n};\n"],"names":["translateX","x","translateY","y","getRotationTransform","orient","TICK_OFFSET","getDominantBaseline","getTextAnchor","Axis","scale","tickSize","tickPadding","onlyPositive","offset","number","d","value","values","format","getTicksAndFormat","spacing","position","transform","k","lineProps","textProps","o","tick","i","jsxs","jsx","BLACK"],"mappings":";;;;AASA,SAASA,EAAWC,GAAW;AAC3B,SAAO,aAAaA,CAAC;AACzB;AAEA,SAASC,EAAWC,GAAW;AAC3B,SAAO,eAAeA,CAAC;AAC3B;AAEA,SAASC,EAAqBC,GAA2B;AACrD,SAAOA,MAAW,WAAW,eAAeC,CAAW,MAAM,aAAa,CAACA,CAAW;AAC1F;AAEA,SAASC,EAAoBF,GAA2B;AACpD,SAAOA,MAAW,WAAW,YAAY;AAC7C;AAEA,SAASG,EAAeH,GAA2B;AAC/C,SAAQA,MAAW,WAAW,WAAW;AAC7C;AAEO,MAAMI,IAAO,CAAC;AAAA,EAClB,OAAAC;AAAAA,EACA,UAAAC,IAAW;AAAA,EACX,aAAAC,IAAcN;AAAAA,EACd,QAAAD,IAAS;AAAA,EACT,cAAAQ,IAAe;AAAA,EACf,QAAAC,IAAS,OAAO,SAAW,OAAe,OAAO,mBAAmB,IAAI,IAAI;AAC/E,MAOM;AACF,WAASC,EAAOL,GAAc;AAC1B,WAAO,CAACM,MAAc;AAClB,YAAMC,IAAQP,EAAMM,CAAC;AACrB,aAAOC,MAAU,SAAY,IAAI,CAACA;AAAAA,IACtC;AAAA,EACJ;AACA,QAAM,EAAC,OAAOC,GAAQ,QAAAC,MAAUC,EAAkBV,GAAOG,GAAcR,MAAW,QAAQ,GACpFgB,IAAU,KAAK,IAAIV,GAAU,CAAC,IAAIC,GACpCU,IAAYP,EAAQL,EAAM,KAAA,CAAM,GAE9Ba,IAAYlB,MAAW,WAAWL,IAAaE,GAC/CsB,IAAInB,MAAW,SAAS,KAAK,GAE7BoB,IAAY;AAAA,IACd,EAAEpB,MAAW,SAAS,MAAM,OAAO,GAAG,GAAGmB,IAAIb;AAAAA,EAAA,GAG3Ce,IAAY;AAAA,IACd,CAACrB,MAAW,SAAS,MAAM,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