@milaboratories/graph-maker 1.1.20 → 1.1.22

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,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: "string" | "number";
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: "string" | "number";
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: 'string' | 'number';
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;
@@ -164,7 +164,7 @@ export type LayersSettings = {
164
164
  };
165
165
  export declare const DEFAULT_LAYERS_SETTINGS: () => LayersSettings;
166
166
  export declare function getDefaultLayersSettings(): LayersSettings;
167
- export declare function getInitialLayersSettings(initialSettings?: LayersSettings): LayersSettings;
167
+ export declare function getInitialLayersSettings(initialSettings?: Partial<LayersSettings>): LayersSettings;
168
168
  export type AxesState = {
169
169
  title: {
170
170
  value: string;
@@ -198,7 +198,7 @@ export type AxesState = {
198
198
  facetColumns: number;
199
199
  };
200
200
  };
201
- export declare function getInitialAxesSettings(chartType: ChartType, restoredAxesSettings?: AxesState): AxesState;
201
+ export declare function getInitialAxesSettings(chartType: ChartType, initialAxesSettings?: Partial<AxesState>): AxesState;
202
202
  export declare const LAYER_ICONS: Record<LayersTemplate, Component>;
203
203
  type Option = {
204
204
  value: string;
@@ -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[]>>): Ref<string[]>;
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> = {
@@ -1,5 +1,5 @@
1
1
  import { ChartType, InputState, InputNamesByChartType } from '@milaboratories/pf-plots';
2
- import { AxesState, getDefaultLayersSettings, LayersSettings, StatisticsState } from './constant.ts';
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?: ReturnType<typeof getDefaultLayersSettings>;
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> = {