@milaboratories/graph-maker 1.1.50 → 1.1.52

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.
@@ -0,0 +1,23 @@
1
+ import { AestheticMappingContinuous } from '../../dataBindAes.ts';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ dataColumnLabel: string;
5
+ modelValue: AestheticMappingContinuous;
6
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:modelValue": (...args: any[]) => void;
8
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ dataColumnLabel: string;
10
+ modelValue: AestheticMappingContinuous;
11
+ }>>> & Readonly<{
12
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
14
+ export default _default;
15
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
+ type __VLS_TypePropsToRuntimeProps<T> = {
17
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
18
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
+ } : {
20
+ type: import('vue').PropType<T[K]>;
21
+ required: true;
22
+ };
23
+ };
@@ -1,5 +1,5 @@
1
1
  import { ColumnOrAxisData } from '@milaboratories/pf-plots';
2
- import { AestheticMappingCategorical } from '../../dataBindAes.ts';
2
+ import { AestheticMappingCategorical, AestheticMappingContinuous } from '../../dataBindAes.ts';
3
3
 
4
4
  export type PaletteData = string[];
5
5
  export type PaletteInfo = {
@@ -11,8 +11,8 @@ export type SequentialPalette = "viridis" | "magma" | "density" | "salinity" | "
11
11
  export type DivergingPalette = "spectrum" | "teal_red" | "blue_red" | "lime_rose" | "viridis_magma";
12
12
  export type ContinuousPalette = SequentialPalette | DivergingPalette;
13
13
  export type Palette = CategoricalPalette | ContinuousPalette;
14
- export type AesMappingOption = {
15
- type: "data";
14
+ export type AesMappingOptionCategorical = {
15
+ type: "dataCategorical";
16
16
  value: string;
17
17
  initialData: AestheticMappingCategorical;
18
18
  inputName: string;
@@ -21,6 +21,16 @@ export type AesMappingOption = {
21
21
  selectedSourceInfo: ColumnOrAxisData | null;
22
22
  labels: Record<string, string>;
23
23
  };
24
+ export type AesMappingOptionContinuous = {
25
+ type: "dataContinuous";
26
+ value: string;
27
+ initialData: AestheticMappingContinuous;
28
+ inputName: string;
29
+ selectedSource: string;
30
+ selectedSourceValues: string[];
31
+ selectedSourceInfo: ColumnOrAxisData | null;
32
+ };
33
+ export type AesMappingOption = AesMappingOptionCategorical | AesMappingOptionContinuous;
24
34
  export type AesFixedOption = {
25
35
  type: "fix";
26
36
  value: "fix";
@@ -76,10 +76,16 @@ export type DotShapeAes = DotShape | MappingLink;
76
76
  export type DotSizeAes = number | NumberRange;
77
77
  export type LineTypeAes = LineType | MappingLink;
78
78
  export type FixedOrMappedAes = ColorAes | DotShapeAes | LineTypeAes;
79
- export type ContinuousDataMapping = {
79
+ export type ContinuousDataMappingSize = {
80
80
  column: string;
81
81
  range: NumberRange;
82
82
  };
83
+ export type ContinuousDataMappingForGraph<T extends string | number> = {
84
+ columnName: ColumnNameSchema;
85
+ domain: number[];
86
+ range: T[];
87
+ type: 'linear' | 'log';
88
+ };
83
89
  export type ColumnNameSchema = {
84
90
  type: 'column';
85
91
  value: string;
@@ -88,7 +94,7 @@ export type ColumnNameSchema = {
88
94
  };
89
95
  export declare function isNumberRange(v: number | NumberRange | null | undefined): v is NumberRange;
90
96
  export declare function isMappedAes(item: FixedOrMappedAes | null | string | number | boolean | unknown): item is MappingLink;
91
- export declare function isContinuousDataMapping(v: ContinuousDataMapping | number | null | undefined): v is ContinuousDataMapping;
97
+ export declare function isContinuousDataMapping(v: ContinuousDataMappingSize | MappingLink | number | string | null | undefined): v is ContinuousDataMappingSize;
92
98
  export type LayersSettings = {
93
99
  bubble: {
94
100
  NAValueAs: number | null;
@@ -129,7 +135,7 @@ export type LayersSettings = {
129
135
  dots: {
130
136
  dotFill: ColorAes | null;
131
137
  dotShape: DotShapeAes | null;
132
- dotSize: ContinuousDataMapping | number | null;
138
+ dotSize: ContinuousDataMappingSize | number | null;
133
139
  };
134
140
  curve: {
135
141
  smoothing: boolean;
@@ -1,21 +1,23 @@
1
1
  import { ContinuousPalette, DotShape, LineType, Palette } from './components/AesSettings/types.ts';
2
- import { AesType, ContinuousDataMapping, NumberRange } from './constant.ts';
2
+ import { AesType, ContinuousDataMappingSize, NumberRange } from './constant.ts';
3
3
  import { UniqueValuesData } from './types.ts';
4
4
 
5
5
  export type AestheticMappingState = Record<string, AestheticMapping>;
6
6
  export type AestheticMapping = AestheticMappingContinuous | AestheticMappingCategorical;
7
7
  interface MappingRange {
8
- maxValue: number;
9
- minValue: number;
8
+ maxValue: number | null;
9
+ minValue: number | null;
10
10
  }
11
11
  /** Mapping for continuous axes (numerical axes) */
12
12
  export interface AestheticMappingContinuous {
13
13
  type: 'continuous';
14
14
  palette: ContinuousPalette;
15
15
  range: MappingRange | null;
16
+ midPoint: number | null;
16
17
  log: boolean;
17
18
  naAes: AestheticValues;
18
19
  }
20
+ export declare function isAestheticMappingContinuous(v: unknown | AestheticMappingContinuous): v is AestheticMappingContinuous;
19
21
  /** Mapping for categorical axes (string axes) */
20
22
  export interface AestheticMappingCategorical {
21
23
  type: 'categorical';
@@ -24,6 +26,8 @@ export interface AestheticMappingCategorical {
24
26
  order: (string | number)[];
25
27
  mapping: AestheticMappingRecord;
26
28
  }
29
+ export declare function isAestheticMappingCategorical(v: unknown | AestheticMappingCategorical): v is AestheticMappingCategorical;
30
+ export declare function isAestheticMapping(v: unknown | AestheticMappingContinuous | AestheticMappingCategorical): v is AestheticMapping;
27
31
  type AestheticMappingRecord = Record<string | number, {
28
32
  aes: Partial<AestheticValues>;
29
33
  colorIdx: number;
@@ -44,7 +48,7 @@ export declare function updateAestheticMapping(values: (string | number)[], curr
44
48
  export declare function createCategoricalMappingFromPalette(palette: Palette, values: (string | number)[]): AestheticMappingCategorical;
45
49
  export declare function createContinuousMappingFromPalette(palette: ContinuousPalette): AestheticMappingContinuous;
46
50
  export declare function createDefaultMapping(values: (string | number)[]): AestheticMappingCategorical;
47
- export declare function createDefaultContinuousMapping(columnId: string): ContinuousDataMapping;
51
+ export declare function createDefaultContinuousMapping(columnId: string): ContinuousDataMappingSize;
48
52
  export declare function getChartSettingsInheritedAes(uniqueValuesData: Record<string, UniqueValuesData>, maybeMapping: AestheticMapping | undefined, sourceId: string | null, usedAesInMapping: Record<AesType, boolean>): {
49
53
  inheritedAes: {};
50
54
  order?: undefined;
@@ -1,13 +1,13 @@
1
- import { ContinuousDataMapping } from '../../constant.ts';
1
+ import { ContinuousDataMappingSize } from '../../constant.ts';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
- selected?: number | ContinuousDataMapping;
4
+ selected?: number | ContinuousDataMappingSize;
5
5
  possibleAesSourceInputs?: string[];
6
6
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
7
  "aes-update": (...args: any[]) => void;
8
8
  "aes-selector-close": (...args: any[]) => void;
9
9
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
- selected?: number | ContinuousDataMapping;
10
+ selected?: number | ContinuousDataMappingSize;
11
11
  possibleAesSourceInputs?: string[];
12
12
  }>>> & Readonly<{
13
13
  "onAes-update"?: ((...args: any[]) => any) | undefined;
@@ -1,8 +1,7 @@
1
1
  import { DiscreteSettings } from '@milaboratories/miplots4';
2
2
  import { ReactiveState, UniqueValuesData } from '../../types.ts';
3
- import { PlotDataAndSettings } from '@milaboratories/pf-plots';
4
3
 
5
- export declare function composeDiscreteSettings(settings: DiscreteSettings, reactiveState: ReactiveState, uniqueValuesData: Record<string, UniqueValuesData>, dataByColumns: PlotDataAndSettings['dataByColumns']): {
4
+ export declare function composeDiscreteSettings(settings: DiscreteSettings, reactiveState: ReactiveState, uniqueValuesData: Record<string, UniqueValuesData>): {
6
5
  type: "discrete";
7
6
  title: {
8
7
  name: string;
@@ -33,6 +33,16 @@ export declare function composeScatterplotSettings(settings: ScatterplotSettings
33
33
  dotFill?: string | {
34
34
  type: "grouping";
35
35
  value: string;
36
+ } | {
37
+ columnName: {
38
+ type: "column";
39
+ value: string;
40
+ label?: string | undefined;
41
+ valueLabels?: string | undefined;
42
+ };
43
+ domain: number[];
44
+ range: string[];
45
+ type?: "linear" | "log" | undefined;
36
46
  } | undefined;
37
47
  dotShape?: "0" | {
38
48
  type: "grouping";
@@ -47,6 +57,7 @@ export declare function composeScatterplotSettings(settings: ScatterplotSettings
47
57
  };
48
58
  domain: number[];
49
59
  range: number[];
60
+ type?: "linear" | "log" | undefined;
50
61
  } | undefined;
51
62
  } | undefined;
52
63
  } | {
@@ -57,6 +68,16 @@ export declare function composeScatterplotSettings(settings: ScatterplotSettings
57
68
  lineColor?: string | {
58
69
  type: "grouping";
59
70
  value: string;
71
+ } | {
72
+ columnName: {
73
+ type: "column";
74
+ value: string;
75
+ label?: string | undefined;
76
+ valueLabels?: string | undefined;
77
+ };
78
+ domain: number[];
79
+ range: string[];
80
+ type?: "linear" | "log" | undefined;
60
81
  } | undefined;
61
82
  opacity?: number | undefined;
62
83
  } | undefined;
@@ -84,6 +105,7 @@ export declare function composeScatterplotSettings(settings: ScatterplotSettings
84
105
  };
85
106
  domain: number[];
86
107
  range: number[];
108
+ type?: "linear" | "log" | undefined;
87
109
  } | {
88
110
  columnName: {
89
111
  type: "column";
@@ -193,6 +215,16 @@ export declare function composeScatterplotSettings(settings: ScatterplotSettings
193
215
  color?: string | {
194
216
  type: "grouping";
195
217
  value: string;
218
+ } | {
219
+ columnName: {
220
+ type: "column";
221
+ value: string;
222
+ label?: string | undefined;
223
+ valueLabels?: string | undefined;
224
+ };
225
+ domain: number[];
226
+ range: string[];
227
+ type?: "linear" | "log" | undefined;
196
228
  } | undefined;
197
229
  bounded?: boolean | undefined;
198
230
  } | undefined;
@@ -33,6 +33,16 @@ export declare function composeScatterplotUmapSettings(settings: ScatterplotSett
33
33
  dotFill?: string | {
34
34
  type: "grouping";
35
35
  value: string;
36
+ } | {
37
+ columnName: {
38
+ type: "column";
39
+ value: string;
40
+ label?: string | undefined;
41
+ valueLabels?: string | undefined;
42
+ };
43
+ domain: number[];
44
+ range: string[];
45
+ type?: "linear" | "log" | undefined;
36
46
  } | undefined;
37
47
  dotShape?: "0" | {
38
48
  type: "grouping";
@@ -47,6 +57,7 @@ export declare function composeScatterplotUmapSettings(settings: ScatterplotSett
47
57
  };
48
58
  domain: number[];
49
59
  range: number[];
60
+ type?: "linear" | "log" | undefined;
50
61
  } | undefined;
51
62
  } | undefined;
52
63
  } | {
@@ -57,6 +68,16 @@ export declare function composeScatterplotUmapSettings(settings: ScatterplotSett
57
68
  lineColor?: string | {
58
69
  type: "grouping";
59
70
  value: string;
71
+ } | {
72
+ columnName: {
73
+ type: "column";
74
+ value: string;
75
+ label?: string | undefined;
76
+ valueLabels?: string | undefined;
77
+ };
78
+ domain: number[];
79
+ range: string[];
80
+ type?: "linear" | "log" | undefined;
60
81
  } | undefined;
61
82
  opacity?: number | undefined;
62
83
  } | undefined;
@@ -84,6 +105,7 @@ export declare function composeScatterplotUmapSettings(settings: ScatterplotSett
84
105
  };
85
106
  domain: number[];
86
107
  range: number[];
108
+ type?: "linear" | "log" | undefined;
87
109
  } | {
88
110
  columnName: {
89
111
  type: "column";
@@ -193,6 +215,16 @@ export declare function composeScatterplotUmapSettings(settings: ScatterplotSett
193
215
  color?: string | {
194
216
  type: "grouping";
195
217
  value: string;
218
+ } | {
219
+ columnName: {
220
+ type: "column";
221
+ value: string;
222
+ label?: string | undefined;
223
+ valueLabels?: string | undefined;
224
+ };
225
+ domain: number[];
226
+ range: string[];
227
+ type?: "linear" | "log" | undefined;
196
228
  } | undefined;
197
229
  bounded?: boolean | undefined;
198
230
  } | undefined;
@@ -1,11 +1,11 @@
1
1
  import { getDefaultLayersSettings, NumberRange, LayersSettings, MappingLink, DiscreteStatisticsState, ColumnNameSchema, StatisticsState } from '../../constant.ts';
2
- import { Layer, LayersTemplate } from '../../types.ts';
3
- import { ChartType, InputState, PlotDataAndSettings, ScatterplotUIState } from '@milaboratories/pf-plots';
2
+ import { Layer, LayersTemplate, ReactiveState } from '../../types.ts';
3
+ import { ChartType, InputGuide, InputState, PlotDataAndSettings, ScatterplotUIState } from '@milaboratories/pf-plots';
4
4
  import { DotShape, LineType } from '../../components/AesSettings/types.ts';
5
5
  import { ScatterplotSettings } from '@milaboratories/miplots4';
6
6
 
7
7
  export declare function getStatLayers(statisticsSettings: DiscreteStatisticsState): ChartLayerSettings[];
8
- export declare function getScatterplotLayersSettings(layers: Layer[], layerSettings: ReturnType<typeof getDefaultLayersSettings>, dataByColumns: PlotDataAndSettings['dataByColumns'], optionsState: ScatterplotUIState, groupingSchema?: ColumnNameSchema[]): ScatterplotSettings['layers'];
8
+ export declare function getScatterplotLayersSettings(layers: Layer[], layerSettings: ReturnType<typeof getDefaultLayersSettings>, dataByColumns: PlotDataAndSettings['dataByColumns'], optionsState: ScatterplotUIState, dataBindAes: ReactiveState['dataBindAes'], inputGuide: InputGuide<InputState>, groupingSchema?: ColumnNameSchema[]): ScatterplotSettings['layers'];
9
9
  export type ChartLayerSettings = {
10
10
  [key: string]: string | boolean | null | Record<string, string | DotShape | NumberRange | {
11
11
  domain: number[];
@@ -17,4 +17,4 @@ export type ChartLayerSettings = {
17
17
  range: number[];
18
18
  } | LineType | boolean | number | MappingLink>;
19
19
  };
20
- export declare function getChartLayersSettings(chartType: ChartType, template: LayersTemplate, layerSettings: LayersSettings, statisticsSettings: StatisticsState, optionsState: InputState, settings: Record<string, unknown>, dataByColumns: PlotDataAndSettings['dataByColumns']): ChartLayerSettings[];
20
+ export declare function getChartLayersSettings(chartType: ChartType, template: LayersTemplate, layerSettings: LayersSettings, statisticsSettings: StatisticsState, optionsState: InputState): ChartLayerSettings[];