@milaboratories/graph-maker 1.1.32 → 1.1.34

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.
@@ -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;
@@ -95,6 +95,8 @@ export type LayersSettings = {
95
95
  heatmapClustered: {
96
96
  dendrogramX: boolean;
97
97
  dendrogramY: boolean;
98
+ disableClusteringX: boolean;
99
+ disableClusteringY: boolean;
98
100
  };
99
101
  dots: {
100
102
  dotFill: ColorAes | 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(inputGuide: InputGuide<InputState>, maybeMapping: AestheticMapping | undefined, sourceId: string | null, usedAesInMapping: Record<AesType, boolean>): {
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, inputGuide: InputGuide<InputState>, dataBindAes: Record<string, AestheticMappingCategorical>): Record<string, any>;
54
- export declare function getDendroAes(selectedStr: string, inputGuide: InputGuide<InputState>, dataBindAes: Record<string, AestheticMappingCategorical>, field: keyof AestheticValues): Record<string, AestheticValues[keyof AestheticValues]>;
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, PValue } from '@milaboratories/pf-plots';
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, refToFilterOptions: Ref<Record<string, PValue[]>>, getSourceInfo: (id: string) => ColumnData | AxisData): Ref<string[]>;
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
 
@@ -40,6 +40,8 @@ export declare function createReactiveState(initialData: GraphMakerState, chartT
40
40
  heatmapClustered: {
41
41
  dendrogramX: boolean;
42
42
  dendrogramY: boolean;
43
+ disableClusteringX: boolean;
44
+ disableClusteringY: boolean;
43
45
  };
44
46
  dots: {
45
47
  dotFill: string | {
@@ -288,7 +290,7 @@ export declare function createReactiveState(initialData: GraphMakerState, chartT
288
290
  } | null;
289
291
  dendroSelectedNodeId: null | number;
290
292
  };
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>): {
293
+ 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
294
  reactive: {
293
295
  chartType: ChartType;
294
296
  template: import('./types.ts').LayersTemplate;
@@ -326,6 +328,8 @@ export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dat
326
328
  heatmapClustered: {
327
329
  dendrogramX: boolean;
328
330
  dendrogramY: boolean;
331
+ disableClusteringX: boolean;
332
+ disableClusteringY: boolean;
329
333
  };
330
334
  dots: {
331
335
  dotFill: string | {
@@ -599,6 +603,7 @@ export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dat
599
603
  columnsDataStore: DemoDataStore | null;
600
604
  inputGuide: Ref<InputGuide<InputState>, InputGuide<InputState>>;
601
605
  chartData: Ref<PlotDataAndSettings | null, PlotDataAndSettings | null>;
606
+ uniqueValuesData: Ref<Record<string, UniqueValuesData>, Record<string, UniqueValuesData>>;
602
607
  };
603
608
  export type Store = ComputedRef<ReturnType<typeof factoryStore>>;
604
609
  export declare function provideStore(initialState: GraphMakerState, dataStoreRef: Ref<DemoDataStore | null>, chartType: ChartType, defaultOptions: GraphMakerProps['defaultOptions'], fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>): ComputedRef<{
@@ -639,6 +644,8 @@ export declare function provideStore(initialState: GraphMakerState, dataStoreRef
639
644
  heatmapClustered: {
640
645
  dendrogramX: boolean;
641
646
  dendrogramY: boolean;
647
+ disableClusteringX: boolean;
648
+ disableClusteringY: boolean;
642
649
  };
643
650
  dots: {
644
651
  dotFill: string | {
@@ -912,5 +919,6 @@ export declare function provideStore(initialState: GraphMakerState, dataStoreRef
912
919
  columnsDataStore: DemoDataStore | null;
913
920
  inputGuide: Ref<InputGuide<InputState>, InputGuide<InputState>>;
914
921
  chartData: Ref<PlotDataAndSettings | null, PlotDataAndSettings | null>;
922
+ uniqueValuesData: Ref<Record<string, UniqueValuesData>, Record<string, UniqueValuesData>>;
915
923
  }>;
916
924
  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 | number;
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 { InputGuide, InputState } from '@milaboratories/pf-plots';
1
+ import { InputState } from '@milaboratories/pf-plots';
2
+ import { UniqueValuesData } from '../types.ts';
2
3
 
3
- export declare function calculateDiscreteGroups(optionsState: InputState, inputGuide: InputGuide<InputState>, field: 'primaryGrouping' | 'secondaryGrouping'): string[];
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";