@milaboratories/graph-maker 1.1.32 → 1.1.33
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/DndDoubleChip.vue.d.ts +0 -3
- package/dist/GraphMaker/components/DragAndDrop/types.d.ts +1 -2
- package/dist/GraphMaker/dataBindAes.d.ts +4 -4
- package/dist/GraphMaker/forms/DataMappingForm/utils.d.ts +4 -3
- package/dist/GraphMaker/store.d.ts +4 -2
- package/dist/GraphMaker/types.d.ts +9 -1
- package/dist/GraphMaker/utils/calculateDiscreteGroups.d.ts +3 -2
- package/dist/GraphMaker/utils/composeChartSettings.d.ts +2 -2
- package/dist/graph-maker.js +17379 -17400
- package/dist/graph-maker.umd.cjs +953 -953
- package/package.json +2 -2
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { ChipInfo } from './types.ts';
|
|
2
|
-
import { ListOption } from '@platforma-sdk/ui-vue';
|
|
3
2
|
import { ValueType } from '@platforma-sdk/model';
|
|
4
3
|
|
|
5
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
5
|
id: ChipInfo["id"];
|
|
7
6
|
title: string;
|
|
8
|
-
options: ListOption[];
|
|
9
7
|
type: ValueType;
|
|
10
8
|
modelValue: unknown;
|
|
11
9
|
error: boolean;
|
|
@@ -16,7 +14,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
16
14
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
17
15
|
id: ChipInfo["id"];
|
|
18
16
|
title: string;
|
|
19
|
-
options: ListOption[];
|
|
20
17
|
type: ValueType;
|
|
21
18
|
modelValue: unknown;
|
|
22
19
|
error: boolean;
|
|
@@ -11,7 +11,6 @@ export type ChipInfo = {
|
|
|
11
11
|
availableBasketIds: Set<string>;
|
|
12
12
|
uniqueValues: string[];
|
|
13
13
|
range: NumberRange | null;
|
|
14
|
-
valueLabels: Record<string, string> | null;
|
|
15
14
|
};
|
|
16
15
|
export type DndBasketProps<T = any> = {
|
|
17
16
|
id: T;
|
|
@@ -23,7 +22,7 @@ export type DndBasketProps<T = any> = {
|
|
|
23
22
|
consistency: Record<string, boolean>;
|
|
24
23
|
droppedIds: string[];
|
|
25
24
|
availableIds: Set<string>;
|
|
26
|
-
selectedFilters?: Record<string, string>;
|
|
25
|
+
selectedFilters?: Record<string, string | undefined>;
|
|
27
26
|
selectedRanges?: Record<string, [number, number]>;
|
|
28
27
|
info: Record<string, ChipInfo>;
|
|
29
28
|
draggedId: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContinuousPalette, DotShape, LineType, Palette } from './components/AesSettings/types.ts';
|
|
2
|
-
import { InputGuide, InputState } from '@milaboratories/pf-plots';
|
|
3
2
|
import { AesType, ContinuousDataMapping, NumberRange } from './constant.ts';
|
|
3
|
+
import { UniqueValuesData } from './types.ts';
|
|
4
4
|
|
|
5
5
|
export type AestheticMapping = AestheticMappingContinuous | AestheticMappingCategorical;
|
|
6
6
|
interface MappingRange {
|
|
@@ -43,13 +43,13 @@ export declare function updateAestheticMapping(values: (string | number)[], curr
|
|
|
43
43
|
export declare function createMappingFromPalette(palette: Palette, values: (string | number)[]): AestheticMappingCategorical;
|
|
44
44
|
export declare function createDefaultMapping(values: (string | number)[]): AestheticMappingCategorical;
|
|
45
45
|
export declare function createDefaultContinuousMapping(columnId: string): ContinuousDataMapping;
|
|
46
|
-
export declare function getChartSettingsInheritedAes(
|
|
46
|
+
export declare function getChartSettingsInheritedAes(uniqueValuesData: Record<string, UniqueValuesData>, maybeMapping: AestheticMapping | undefined, sourceId: string | null, usedAesInMapping: Record<AesType, boolean>): {
|
|
47
47
|
inheritedAes: {};
|
|
48
48
|
order?: undefined;
|
|
49
49
|
} | {
|
|
50
50
|
order: (string | number)[];
|
|
51
51
|
inheritedAes: Record<string, any>;
|
|
52
52
|
};
|
|
53
|
-
export declare function getScatterplotAes(selectedStr: string,
|
|
54
|
-
export declare function getDendroAes(selectedStr: string,
|
|
53
|
+
export declare function getScatterplotAes(selectedStr: string, uniqueValuesData: Record<string, UniqueValuesData>, dataBindAes: Record<string, AestheticMappingCategorical>): Record<string, any>;
|
|
54
|
+
export declare function getDendroAes(selectedStr: string, uniqueValuesData: Record<string, UniqueValuesData>, dataBindAes: Record<string, AestheticMappingCategorical>, field: keyof AestheticValues): Record<string, AestheticValues[keyof AestheticValues]>;
|
|
55
55
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AxisData, ColumnData, Controller, DemoDataStore, InputGuide, InputState
|
|
1
|
+
import { AxisData, ColumnData, Controller, DemoDataStore, InputGuide, InputState } from '@milaboratories/pf-plots';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { ChipInfo } from '../../components/DragAndDrop/types.ts';
|
|
4
|
+
import { UniqueValuesData } from '../../types.ts';
|
|
4
5
|
|
|
5
6
|
type Option = {
|
|
6
7
|
text: string;
|
|
@@ -8,7 +9,7 @@ type Option = {
|
|
|
8
9
|
};
|
|
9
10
|
/** Bidirectionally extracts selectedSource from the filter state,
|
|
10
11
|
* 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,
|
|
12
|
+
export declare function toFiltersMulti(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null, getSourceInfo: (id: string) => ColumnData | AxisData): Ref<string[]>;
|
|
12
13
|
export declare function toSimpleMulti(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null): Ref<string[]>;
|
|
13
14
|
export declare function toSimpleSingle(refToState: Ref<InputState>, inputName: keyof InputState['components'], controller: Controller<InputState>, store: DemoDataStore | null): Ref<string | undefined>;
|
|
14
15
|
export type AllStateOptions<State extends InputState> = {
|
|
@@ -29,5 +30,5 @@ export declare function getFreeMandatoryOptions<T extends InputState>(inputGuide
|
|
|
29
30
|
}[];
|
|
30
31
|
export declare function hasInputError<T extends InputState>(name: keyof T['components'], inputGuide: InputGuide<T>): boolean;
|
|
31
32
|
export declare function getErrorForPlDropdown<T extends InputState>(name: keyof T['components'], inputGuide: InputGuide<T>): "" | " ";
|
|
32
|
-
export declare function getChipInfo(inputGuide: InputGuide<InputState>, sourceIds: string[]): Record<string, ChipInfo>;
|
|
33
|
+
export declare function getChipInfo(inputGuide: InputGuide<InputState>, labelsInfo: Record<string, UniqueValuesData>, sourceIds: string[]): Record<string, ChipInfo>;
|
|
33
34
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref, ComputedRef, Reactive } from 'vue';
|
|
2
|
-
import { GraphMakerProps, GraphMakerState, ReactiveState } from './types.ts';
|
|
2
|
+
import { GraphMakerProps, GraphMakerState, ReactiveState, UniqueValuesData } from './types.ts';
|
|
3
3
|
import { DemoDataStore, InputGuide, InputState, PlotDataAndSettings, DendroStateController, ChartType } from '@milaboratories/pf-plots';
|
|
4
4
|
import { AesType } from './constant.ts';
|
|
5
5
|
|
|
@@ -288,7 +288,7 @@ export declare function createReactiveState(initialData: GraphMakerState, chartT
|
|
|
288
288
|
} | null;
|
|
289
289
|
dendroSelectedNodeId: null | number;
|
|
290
290
|
};
|
|
291
|
-
export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dataStore: DemoDataStore | null, inputGuide: Ref<InputGuide<InputState>>, chartData: Ref<PlotDataAndSettings | null>, dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null
|
|
291
|
+
export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dataStore: DemoDataStore | null, inputGuide: Ref<InputGuide<InputState>>, chartData: Ref<PlotDataAndSettings | null>, dendroTableData: Ref<Awaited<ReturnType<DendroStateController['createTableData']>> | null>, uniqueValuesData: Ref<Record<string, UniqueValuesData>>): {
|
|
292
292
|
reactive: {
|
|
293
293
|
chartType: ChartType;
|
|
294
294
|
template: import('./types.ts').LayersTemplate;
|
|
@@ -599,6 +599,7 @@ export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dat
|
|
|
599
599
|
columnsDataStore: DemoDataStore | null;
|
|
600
600
|
inputGuide: Ref<InputGuide<InputState>, InputGuide<InputState>>;
|
|
601
601
|
chartData: Ref<PlotDataAndSettings | null, PlotDataAndSettings | null>;
|
|
602
|
+
uniqueValuesData: Ref<Record<string, UniqueValuesData>, Record<string, UniqueValuesData>>;
|
|
602
603
|
};
|
|
603
604
|
export type Store = ComputedRef<ReturnType<typeof factoryStore>>;
|
|
604
605
|
export declare function provideStore(initialState: GraphMakerState, dataStoreRef: Ref<DemoDataStore | null>, chartType: ChartType, defaultOptions: GraphMakerProps['defaultOptions'], fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>): ComputedRef<{
|
|
@@ -912,5 +913,6 @@ export declare function provideStore(initialState: GraphMakerState, dataStoreRef
|
|
|
912
913
|
columnsDataStore: DemoDataStore | null;
|
|
913
914
|
inputGuide: Ref<InputGuide<InputState>, InputGuide<InputState>>;
|
|
914
915
|
chartData: Ref<PlotDataAndSettings | null, PlotDataAndSettings | null>;
|
|
916
|
+
uniqueValuesData: Ref<Record<string, UniqueValuesData>, Record<string, UniqueValuesData>>;
|
|
915
917
|
}>;
|
|
916
918
|
export declare function useStore(): Store;
|
|
@@ -22,7 +22,7 @@ export type PredefinedGraphOption<T extends ChartType> = {
|
|
|
22
22
|
selectedSource: AxisSpec | PColumnSpec;
|
|
23
23
|
filterType?: SelectorStateFilter['type'];
|
|
24
24
|
selectedFilterRange?: NumberRange;
|
|
25
|
-
selectedFilterValue?: string
|
|
25
|
+
selectedFilterValue?: string;
|
|
26
26
|
};
|
|
27
27
|
export interface GraphMakerPropsTyped<T extends ChartType> {
|
|
28
28
|
pFrame: PFrameHandle | undefined;
|
|
@@ -69,3 +69,11 @@ export type AxisTitleMode = 'auto' | 'custom' | 'hidden';
|
|
|
69
69
|
export type Scale = 'linear' | 'log';
|
|
70
70
|
export type Frame = 'full' | 'empty' | 'left' | 'bottom' | 'left-bottom';
|
|
71
71
|
export type HeatmapFrame = 'full' | 'none';
|
|
72
|
+
export type UniqueValuesData = {
|
|
73
|
+
list: string[];
|
|
74
|
+
options: {
|
|
75
|
+
value: string;
|
|
76
|
+
label: string;
|
|
77
|
+
}[];
|
|
78
|
+
labels: Record<string, string>;
|
|
79
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputState } from '@milaboratories/pf-plots';
|
|
2
|
+
import { UniqueValuesData } from '../types.ts';
|
|
2
3
|
|
|
3
|
-
export declare function calculateDiscreteGroups(optionsState: InputState,
|
|
4
|
+
export declare function calculateDiscreteGroups(optionsState: InputState, uniqueValuesInfo: Record<string, UniqueValuesData>, field: 'primaryGrouping' | 'secondaryGrouping'): string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DemoDataStore, InputGuide, InputState } from '@milaboratories/pf-plots';
|
|
2
|
-
import { GraphMakerProps, ReactiveState } from '../types.ts';
|
|
2
|
+
import { GraphMakerProps, ReactiveState, UniqueValuesData } from '../types.ts';
|
|
3
3
|
|
|
4
|
-
export declare function composeChartSettings(inputGuide: InputGuide<InputState>, reactiveState: ReactiveState, dataStore: DemoDataStore | null, fixedOptions?: GraphMakerProps['fixedOptions']): Promise<{
|
|
4
|
+
export declare function composeChartSettings(inputGuide: InputGuide<InputState>, labelsInfo: Record<string, UniqueValuesData>, reactiveState: ReactiveState, dataStore: DemoDataStore | null, fixedOptions?: GraphMakerProps['fixedOptions']): Promise<{
|
|
5
5
|
settings: Record<string, unknown>;
|
|
6
6
|
dataByColumns: {
|
|
7
7
|
type: "columns";
|