@milaboratories/graph-maker 1.1.19 → 1.1.21
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/DragAndDrop/DnDRangeChip.vue.d.ts +40 -0
- package/dist/GraphMaker/components/DragAndDrop/DndBasket.vue.d.ts +2 -0
- package/dist/GraphMaker/components/DragAndDrop/DndDoubleChip.vue.d.ts +3 -2
- package/dist/GraphMaker/components/DragAndDrop/types.d.ts +9 -1
- package/dist/GraphMaker/constant.d.ts +17 -5
- package/dist/GraphMaker/dataBindAes.d.ts +2 -1
- package/dist/GraphMaker/forms/DataMappingForm/utils.d.ts +1 -1
- package/dist/GraphMaker/forms/LayersForm/DotSizeSelector.vue.d.ts +25 -0
- package/dist/GraphMaker/store.d.ts +21 -0
- package/dist/GraphMaker/types.d.ts +4 -4
- package/dist/GraphMaker/utils/getLayersDataFromForms.d.ts +11 -5
- package/dist/graph-maker.js +26204 -25847
- package/dist/graph-maker.umd.cjs +977 -977
- package/dist/style.css +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ChipInfo } from './types.ts';
|
|
2
|
+
import { ValueType } from '@platforma-sdk/model';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
id: ChipInfo["id"];
|
|
6
|
+
title: string;
|
|
7
|
+
type: ValueType;
|
|
8
|
+
range: {
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
};
|
|
12
|
+
modelValue: unknown;
|
|
13
|
+
error: boolean;
|
|
14
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"close-chip": (id: string) => void;
|
|
16
|
+
"update:modelValue": (id: unknown) => void;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
18
|
+
id: ChipInfo["id"];
|
|
19
|
+
title: string;
|
|
20
|
+
type: ValueType;
|
|
21
|
+
range: {
|
|
22
|
+
min: number;
|
|
23
|
+
max: number;
|
|
24
|
+
};
|
|
25
|
+
modelValue: unknown;
|
|
26
|
+
error: boolean;
|
|
27
|
+
}>>> & Readonly<{
|
|
28
|
+
"onClose-chip"?: ((id: string) => any) | undefined;
|
|
29
|
+
"onUpdate:modelValue"?: ((id: unknown) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -4,11 +4,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
4
4
|
"drop-item": (data: import('./types.ts').DropItemEvent<any>) => void;
|
|
5
5
|
"remove-item": (data: import('./types.ts').RemoveItemEvent<any>) => void;
|
|
6
6
|
"select-filter-value": (data: import('./types.ts').SelectFilterValueEvent) => void;
|
|
7
|
+
"select-filter-range": (data: import('./types.ts').SelectFilterValueEvent) => void;
|
|
7
8
|
reorder: (data: string[]) => void;
|
|
8
9
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DndBasketProps>>> & Readonly<{
|
|
9
10
|
"onDrop-item"?: ((data: import('./types.ts').DropItemEvent<any>) => any) | undefined;
|
|
10
11
|
"onRemove-item"?: ((data: import('./types.ts').RemoveItemEvent<any>) => any) | undefined;
|
|
11
12
|
"onSelect-filter-value"?: ((data: import('./types.ts').SelectFilterValueEvent) => any) | undefined;
|
|
13
|
+
"onSelect-filter-range"?: ((data: import('./types.ts').SelectFilterValueEvent) => any) | undefined;
|
|
12
14
|
onReorder?: ((data: string[]) => any) | undefined;
|
|
13
15
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
16
|
export default _default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ChipInfo } from './types.ts';
|
|
2
2
|
import { ListOption } from '@platforma-sdk/ui-vue';
|
|
3
|
+
import { ValueType } from '@platforma-sdk/model';
|
|
3
4
|
|
|
4
5
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
6
|
id: ChipInfo["id"];
|
|
6
7
|
title: string;
|
|
7
8
|
options: ListOption[];
|
|
8
|
-
type:
|
|
9
|
+
type: ValueType;
|
|
9
10
|
modelValue: unknown;
|
|
10
11
|
error: boolean;
|
|
11
12
|
sortable?: boolean;
|
|
@@ -16,7 +17,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
16
17
|
id: ChipInfo["id"];
|
|
17
18
|
title: string;
|
|
18
19
|
options: ListOption[];
|
|
19
|
-
type:
|
|
20
|
+
type: ValueType;
|
|
20
21
|
modelValue: unknown;
|
|
21
22
|
error: boolean;
|
|
22
23
|
sortable?: boolean;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { ValueType } from '@platforma-sdk/model';
|
|
2
3
|
|
|
3
4
|
export type ChipInfo = {
|
|
4
5
|
id: string;
|
|
5
6
|
title: string;
|
|
6
|
-
type:
|
|
7
|
+
type: ValueType;
|
|
7
8
|
nonHomogenous: boolean;
|
|
8
9
|
availableBasketIds: Set<string>;
|
|
9
10
|
uniqueValues: string[];
|
|
11
|
+
range: {
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
};
|
|
10
15
|
valueLabels: Record<string, string>;
|
|
11
16
|
};
|
|
12
17
|
export type DndBasketProps<T = any> = {
|
|
@@ -20,6 +25,7 @@ export type DndBasketProps<T = any> = {
|
|
|
20
25
|
droppedIds: string[];
|
|
21
26
|
availableIds: Set<string>;
|
|
22
27
|
selectedFilters?: Record<string, string>;
|
|
28
|
+
selectedRanges?: Record<string, [number, number]>;
|
|
23
29
|
info: Record<string, ChipInfo>;
|
|
24
30
|
draggedId: string | null;
|
|
25
31
|
sortable?: boolean;
|
|
@@ -40,6 +46,7 @@ export type DndBasketEmits = {
|
|
|
40
46
|
(e: 'drop-item', data: DropItemEvent): void;
|
|
41
47
|
(e: 'remove-item', data: RemoveItemEvent): void;
|
|
42
48
|
(e: 'select-filter-value', data: SelectFilterValueEvent): void;
|
|
49
|
+
(e: 'select-filter-range', data: SelectFilterValueEvent): void;
|
|
43
50
|
(e: 'reorder', data: ChipInfo['id'][]): void;
|
|
44
51
|
};
|
|
45
52
|
export type BasketProps<T extends Ref = Ref, Q = keyof T['value']> = DndBasketProps<Q> & {
|
|
@@ -47,6 +54,7 @@ export type BasketProps<T extends Ref = Ref, Q = keyof T['value']> = DndBasketPr
|
|
|
47
54
|
'drop-item': (data: DropItemEvent) => void;
|
|
48
55
|
'remove-item': (data: RemoveItemEvent) => void;
|
|
49
56
|
'select-filter-value'?: (data: SelectFilterValueEvent) => void;
|
|
57
|
+
'select-filter-range'?: (data: SelectFilterValueEvent) => void;
|
|
50
58
|
'reorder'?: (data: ChipInfo['id'][]) => void;
|
|
51
59
|
};
|
|
52
60
|
};
|
|
@@ -42,7 +42,7 @@ export type StatisticsState = {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
export declare function getInitialStatisticsState(initialData?: StatisticsState): StatisticsState;
|
|
45
|
+
export declare function getInitialStatisticsState(initialData?: Partial<StatisticsState>): StatisticsState;
|
|
46
46
|
export type Range = {
|
|
47
47
|
min: number;
|
|
48
48
|
max: number;
|
|
@@ -56,8 +56,19 @@ export type DotShapeAes = DotShape | MappingLink;
|
|
|
56
56
|
export type DotSizeAes = number | Range;
|
|
57
57
|
export type LineTypeAes = LineType | MappingLink;
|
|
58
58
|
export type FixedOrMappedAes = ColorAes | DotShapeAes | LineTypeAes;
|
|
59
|
-
export
|
|
60
|
-
|
|
59
|
+
export type ContinuousDataMapping = {
|
|
60
|
+
column: string;
|
|
61
|
+
range: Range;
|
|
62
|
+
};
|
|
63
|
+
export type ColumnNameSchema = {
|
|
64
|
+
type: 'column';
|
|
65
|
+
value: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
valueLabels?: string;
|
|
68
|
+
};
|
|
69
|
+
export declare function isRange(v: number | Range | null | undefined): v is Range;
|
|
70
|
+
export declare function isMappedAes(item: FixedOrMappedAes | null | string | number | boolean | unknown): item is MappingLink;
|
|
71
|
+
export declare function isContinuousDataMapping(v: ContinuousDataMapping | number | null | undefined): v is ContinuousDataMapping;
|
|
61
72
|
export type LayersSettings = {
|
|
62
73
|
dendro: {
|
|
63
74
|
dotFill: ColorAes;
|
|
@@ -76,6 +87,7 @@ export type LayersSettings = {
|
|
|
76
87
|
dots: {
|
|
77
88
|
dotFill: ColorAes | null;
|
|
78
89
|
dotShape: DotShapeAes | null;
|
|
90
|
+
dotSize: ContinuousDataMapping | number | null;
|
|
79
91
|
};
|
|
80
92
|
curve: {
|
|
81
93
|
smoothing: boolean;
|
|
@@ -152,7 +164,7 @@ export type LayersSettings = {
|
|
|
152
164
|
};
|
|
153
165
|
export declare const DEFAULT_LAYERS_SETTINGS: () => LayersSettings;
|
|
154
166
|
export declare function getDefaultLayersSettings(): LayersSettings;
|
|
155
|
-
export declare function getInitialLayersSettings(initialSettings?: LayersSettings): LayersSettings;
|
|
167
|
+
export declare function getInitialLayersSettings(initialSettings?: Partial<LayersSettings>): LayersSettings;
|
|
156
168
|
export type AxesState = {
|
|
157
169
|
title: {
|
|
158
170
|
value: string;
|
|
@@ -186,7 +198,7 @@ export type AxesState = {
|
|
|
186
198
|
facetColumns: number;
|
|
187
199
|
};
|
|
188
200
|
};
|
|
189
|
-
export declare function getInitialAxesSettings(chartType: ChartType,
|
|
201
|
+
export declare function getInitialAxesSettings(chartType: ChartType, initialAxesSettings?: Partial<AxesState>): AxesState;
|
|
190
202
|
export declare const LAYER_ICONS: Record<LayersTemplate, Component>;
|
|
191
203
|
type Option = {
|
|
192
204
|
value: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContinuousPalette, DotShape, LineType, Palette } from './components/AesSettings/types.ts';
|
|
2
2
|
import { InputGuide, InputState } from '@milaboratories/pf-plots';
|
|
3
|
-
import { AesType, Range } from './constant.ts';
|
|
3
|
+
import { AesType, ContinuousDataMapping, Range } from './constant.ts';
|
|
4
4
|
|
|
5
5
|
export type AestheticMapping = AestheticMappingContinuous | AestheticMappingCategorical;
|
|
6
6
|
interface MappingRange {
|
|
@@ -42,6 +42,7 @@ export declare const DEFAULT_DOT_RANGE: Range;
|
|
|
42
42
|
export declare function updateAestheticMapping(values: (string | number)[], currentMapping?: AestheticMappingCategorical): AestheticMappingCategorical;
|
|
43
43
|
export declare function createMappingFromPalette(palette: Palette, values: (string | number)[]): AestheticMappingCategorical;
|
|
44
44
|
export declare function createDefaultMapping(values: (string | number)[]): AestheticMappingCategorical;
|
|
45
|
+
export declare function createDefaultContinuousMapping(columnId: string): ContinuousDataMapping;
|
|
45
46
|
export declare function getChartSettingsInheritedAes(inputGuide: InputGuide<InputState>, maybeMapping: AestheticMapping | undefined, sourceId: string | null, usedAesInMapping: Record<AesType, boolean>): {
|
|
46
47
|
inheritedAes: {};
|
|
47
48
|
order?: undefined;
|
|
@@ -8,7 +8,7 @@ type Option = {
|
|
|
8
8
|
};
|
|
9
9
|
/** Bidirectionally extracts selectedSource from the filter state,
|
|
10
10
|
* and preserve selectedFilterValue in unmodified items on write. */
|
|
11
|
-
export declare function toFiltersMulti(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null, refToFilterOptions: Ref<Record<string, PValue[]
|
|
11
|
+
export declare function toFiltersMulti(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null, refToFilterOptions: Ref<Record<string, PValue[]>>, getSourceInfo: (id: string) => ColumnData | AxisData): Ref<string[]>;
|
|
12
12
|
export declare function toSimpleMulti(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null): Ref<string[]>;
|
|
13
13
|
export declare function toSimpleSingle(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null): Ref<string | undefined>;
|
|
14
14
|
export type AllStateOptions<State extends InputState> = {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ContinuousDataMapping } from '../../constant.ts';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
selected?: number | ContinuousDataMapping;
|
|
5
|
+
possibleAesSourceInputs?: string[];
|
|
6
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"aes-update": (...args: any[]) => void;
|
|
8
|
+
"aes-selector-close": (...args: any[]) => void;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
selected?: number | ContinuousDataMapping;
|
|
11
|
+
possibleAesSourceInputs?: string[];
|
|
12
|
+
}>>> & Readonly<{
|
|
13
|
+
"onAes-update"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
"onAes-selector-close"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -49,6 +49,13 @@ export declare function createReactiveState(initialData: GraphMakerState, chartT
|
|
|
49
49
|
type: string;
|
|
50
50
|
value?: string | undefined;
|
|
51
51
|
} | null;
|
|
52
|
+
dotSize: number | {
|
|
53
|
+
column: string;
|
|
54
|
+
range: {
|
|
55
|
+
min: number;
|
|
56
|
+
max: number;
|
|
57
|
+
};
|
|
58
|
+
} | null;
|
|
52
59
|
};
|
|
53
60
|
curve: {
|
|
54
61
|
smoothing: boolean;
|
|
@@ -324,6 +331,13 @@ export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dat
|
|
|
324
331
|
type: string;
|
|
325
332
|
value?: string | undefined;
|
|
326
333
|
} | null;
|
|
334
|
+
dotSize: number | {
|
|
335
|
+
column: string;
|
|
336
|
+
range: {
|
|
337
|
+
min: number;
|
|
338
|
+
max: number;
|
|
339
|
+
};
|
|
340
|
+
} | null;
|
|
327
341
|
};
|
|
328
342
|
curve: {
|
|
329
343
|
smoothing: boolean;
|
|
@@ -626,6 +640,13 @@ export declare function provideStore(initialState: GraphMakerState, dataStoreRef
|
|
|
626
640
|
type: string;
|
|
627
641
|
value?: string | undefined;
|
|
628
642
|
} | null;
|
|
643
|
+
dotSize: number | {
|
|
644
|
+
column: string;
|
|
645
|
+
range: {
|
|
646
|
+
min: number;
|
|
647
|
+
max: number;
|
|
648
|
+
};
|
|
649
|
+
} | null;
|
|
629
650
|
};
|
|
630
651
|
curve: {
|
|
631
652
|
smoothing: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartType, InputState, InputNamesByChartType } from '@milaboratories/pf-plots';
|
|
2
|
-
import { AxesState,
|
|
2
|
+
import { AxesState, LayersSettings, StatisticsState } from './constant.ts';
|
|
3
3
|
import { AestheticMappingCategorical } from './dataBindAes.ts';
|
|
4
4
|
import { AxisSpec, PColumnSpec, PFrameDriver, PFrameHandle } from '@platforma-sdk/model';
|
|
5
5
|
import { FormKey } from './forms';
|
|
@@ -9,9 +9,9 @@ export type GraphMakerState = {
|
|
|
9
9
|
template: LayersTemplate;
|
|
10
10
|
currentTab?: FormKey | null;
|
|
11
11
|
optionsState?: InputState;
|
|
12
|
-
statisticsSettings?: StatisticsState
|
|
13
|
-
axesSettings?: AxesState
|
|
14
|
-
layersSettings?:
|
|
12
|
+
statisticsSettings?: Partial<StatisticsState>;
|
|
13
|
+
axesSettings?: Partial<AxesState>;
|
|
14
|
+
layersSettings?: Partial<LayersSettings>;
|
|
15
15
|
dataBindAes?: Record<string, AestheticMappingCategorical>;
|
|
16
16
|
};
|
|
17
17
|
export type PredefinedGraphOption<T extends ChartType> = {
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { LayersSettings, MappingLink, StatisticsState } from '../constant.ts';
|
|
1
|
+
import { Range, LayersSettings, MappingLink, StatisticsState } from '../constant.ts';
|
|
2
2
|
import { LayersTemplate } from '../types.ts';
|
|
3
|
-
import { ChartType, InputState } from '@milaboratories/pf-plots';
|
|
3
|
+
import { ChartType, InputState, PlotDataAndSettings } from '@milaboratories/pf-plots';
|
|
4
4
|
import { DotShape, LineType } from '../components/AesSettings/types.ts';
|
|
5
5
|
|
|
6
6
|
export declare function getStatLayers(statisticsSettings: StatisticsState): ChartLayerSettings[];
|
|
7
7
|
export type ChartLayerSettings = {
|
|
8
|
-
[key: string]: string | boolean | null | Record<string, string | DotShape |
|
|
8
|
+
[key: string]: string | boolean | null | Record<string, string | DotShape | Range | {
|
|
9
|
+
domain: number[];
|
|
10
|
+
range: number[];
|
|
11
|
+
} | LineType | boolean | number | MappingLink> | undefined;
|
|
9
12
|
type: string;
|
|
10
|
-
aes?: Record<string, string | DotShape |
|
|
13
|
+
aes?: Record<string, string | DotShape | Range | {
|
|
14
|
+
domain: number[];
|
|
15
|
+
range: number[];
|
|
16
|
+
} | LineType | boolean | number | MappingLink>;
|
|
11
17
|
};
|
|
12
|
-
export declare function getChartLayersSettings(chartType: ChartType, template: LayersTemplate, layerSettings: LayersSettings, statisticsSettings: StatisticsState, optionsState: InputState): ChartLayerSettings[];
|
|
18
|
+
export declare function getChartLayersSettings(chartType: ChartType, template: LayersTemplate, layerSettings: LayersSettings, statisticsSettings: StatisticsState, optionsState: InputState, settings: Record<string, unknown>, dataByColumns: PlotDataAndSettings['dataByColumns']): ChartLayerSettings[];
|