@milaboratories/graph-maker 1.0.27 → 1.1.0
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/Chart.vue.d.ts +10 -1
- package/dist/GraphMaker/index.vue.d.ts +58 -7
- package/dist/GraphMaker/store.d.ts +17 -12
- package/dist/GraphMaker/types.d.ts +16 -11
- package/dist/GraphMaker/utils/addFixedOptionsToState.d.ts +2 -2
- package/dist/GraphMaker/utils/composeChartSettings.d.ts +2 -2
- package/dist/graph-maker.js +13943 -13895
- package/dist/graph-maker.umd.cjs +951 -951
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
5
|
empty: boolean;
|
|
3
6
|
graphTitle: string;
|
|
4
7
|
chartData: Record<string, unknown> | null;
|
|
@@ -13,6 +16,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
13
16
|
"onGraph-title-update"?: ((...args: any[]) => any) | undefined;
|
|
14
17
|
"onDendro-node-select"?: ((...args: any[]) => any) | undefined;
|
|
15
18
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
16
20
|
export default _default;
|
|
17
21
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
22
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -23,3 +27,8 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
23
27
|
required: true;
|
|
24
28
|
};
|
|
25
29
|
};
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PFrameDriver
|
|
1
|
+
import { GraphMakerState } from './types.ts';
|
|
2
|
+
import { PFrameDriver } from '@platforma-sdk/model';
|
|
3
3
|
|
|
4
|
-
declare
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
titleLineSlot?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
8
|
modelValue: {
|
|
6
9
|
required: true;
|
|
7
|
-
type: import('vue').PropType<
|
|
10
|
+
type: import('vue').PropType<GraphMakerState>;
|
|
8
11
|
};
|
|
9
12
|
pFrame: {
|
|
10
|
-
type: import('vue').PropType<PFrameHandle | undefined>;
|
|
13
|
+
type: import('vue').PropType<import('@platforma-sdk/model').PFrameHandle | undefined>;
|
|
11
14
|
required: true;
|
|
12
15
|
};
|
|
16
|
+
chartType: {
|
|
17
|
+
type: import('vue').PropType<import('@milaboratories/pf-plots').ChartType>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
defaultOptions: {
|
|
21
|
+
type: import('vue').PropType<{
|
|
22
|
+
inputName: keyof import('@milaboratories/pf-plots').InputStateParent<import('@milaboratories/pf-plots').ChartType>["components"];
|
|
23
|
+
selectedSource: import('@milaboratories/pf-plots').AxisSpec | import('@milaboratories/pf-plots').PColumnSpec;
|
|
24
|
+
selectedFilterValue?: string | number;
|
|
25
|
+
}[]>;
|
|
26
|
+
};
|
|
27
|
+
fixedOptions: {
|
|
28
|
+
type: import('vue').PropType<{
|
|
29
|
+
inputName: keyof import('@milaboratories/pf-plots').InputStateParent<import('@milaboratories/pf-plots').ChartType>["components"];
|
|
30
|
+
selectedSource: import('@platforma-sdk/model').PTableRecordSingleValueFilter["column"];
|
|
31
|
+
selectedFilterValue?: string | number;
|
|
32
|
+
}[]>;
|
|
33
|
+
};
|
|
34
|
+
allowChartDeleting: {
|
|
35
|
+
type: import('vue').PropType<boolean>;
|
|
36
|
+
};
|
|
13
37
|
driver: {
|
|
14
38
|
type: import('vue').PropType<PFrameDriver>;
|
|
15
39
|
};
|
|
@@ -21,12 +45,33 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
21
45
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
22
46
|
modelValue: {
|
|
23
47
|
required: true;
|
|
24
|
-
type: import('vue').PropType<
|
|
48
|
+
type: import('vue').PropType<GraphMakerState>;
|
|
25
49
|
};
|
|
26
50
|
pFrame: {
|
|
27
|
-
type: import('vue').PropType<PFrameHandle | undefined>;
|
|
51
|
+
type: import('vue').PropType<import('@platforma-sdk/model').PFrameHandle | undefined>;
|
|
28
52
|
required: true;
|
|
29
53
|
};
|
|
54
|
+
chartType: {
|
|
55
|
+
type: import('vue').PropType<import('@milaboratories/pf-plots').ChartType>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
defaultOptions: {
|
|
59
|
+
type: import('vue').PropType<{
|
|
60
|
+
inputName: keyof import('@milaboratories/pf-plots').InputStateParent<import('@milaboratories/pf-plots').ChartType>["components"];
|
|
61
|
+
selectedSource: import('@milaboratories/pf-plots').AxisSpec | import('@milaboratories/pf-plots').PColumnSpec;
|
|
62
|
+
selectedFilterValue?: string | number;
|
|
63
|
+
}[]>;
|
|
64
|
+
};
|
|
65
|
+
fixedOptions: {
|
|
66
|
+
type: import('vue').PropType<{
|
|
67
|
+
inputName: keyof import('@milaboratories/pf-plots').InputStateParent<import('@milaboratories/pf-plots').ChartType>["components"];
|
|
68
|
+
selectedSource: import('@platforma-sdk/model').PTableRecordSingleValueFilter["column"];
|
|
69
|
+
selectedFilterValue?: string | number;
|
|
70
|
+
}[]>;
|
|
71
|
+
};
|
|
72
|
+
allowChartDeleting: {
|
|
73
|
+
type: import('vue').PropType<boolean>;
|
|
74
|
+
};
|
|
30
75
|
driver: {
|
|
31
76
|
type: import('vue').PropType<PFrameDriver>;
|
|
32
77
|
};
|
|
@@ -36,4 +81,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
36
81
|
}>> & Readonly<{
|
|
37
82
|
"onDelete-this-graph"?: ((...args: any[]) => any) | undefined;
|
|
38
83
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
84
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
39
85
|
export default _default;
|
|
86
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
87
|
+
new (): {
|
|
88
|
+
$slots: S;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Ref, ComputedRef, Reactive } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { DemoDataStore, InputGuide, InputState, PlotDataAndSettings, DendroStateController } from '@milaboratories/pf-plots';
|
|
2
|
+
import { GraphMakerProps, GraphMakerState, ReactiveState } from './types.ts';
|
|
3
|
+
import { DemoDataStore, InputGuide, InputState, PlotDataAndSettings, DendroStateController, ChartType } from '@milaboratories/pf-plots';
|
|
4
4
|
import { AesType } from './constant.ts';
|
|
5
|
+
import { AxisSpec, PColumnSpec } from '@platforma-sdk/model';
|
|
5
6
|
|
|
6
|
-
export declare function createReactiveState(initialData:
|
|
7
|
-
chartType:
|
|
7
|
+
export declare function createReactiveState(initialData: GraphMakerState, chartType: ChartType): {
|
|
8
|
+
chartType: ChartType;
|
|
8
9
|
template: import('./types.ts').LayersTemplate;
|
|
9
10
|
optionsState: {
|
|
10
|
-
type:
|
|
11
|
+
type: ChartType;
|
|
11
12
|
components: {
|
|
12
13
|
[x: string]: import('@milaboratories/pf-plots').ComponentStateSimple | import('@milaboratories/pf-plots').ComponentStateFilter;
|
|
13
14
|
};
|
|
@@ -274,10 +275,10 @@ export declare function createReactiveState(initialData: GraphMakerSettings): {
|
|
|
274
275
|
};
|
|
275
276
|
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>): {
|
|
276
277
|
reactive: {
|
|
277
|
-
chartType:
|
|
278
|
+
chartType: ChartType;
|
|
278
279
|
template: import('./types.ts').LayersTemplate;
|
|
279
280
|
optionsState: {
|
|
280
|
-
type:
|
|
281
|
+
type: ChartType;
|
|
281
282
|
components: {
|
|
282
283
|
[x: string]: import('@milaboratories/pf-plots').ComponentStateSimple | import('@milaboratories/pf-plots').ComponentStateFilter;
|
|
283
284
|
};
|
|
@@ -554,24 +555,26 @@ export declare function factoryStore(reactiveState: Reactive<ReactiveState>, dat
|
|
|
554
555
|
usedAesInMapping: ComputedRef<Record<string, Record<AesType, boolean>>>;
|
|
555
556
|
dendroTableData: Ref<Record<string, {
|
|
556
557
|
label: string;
|
|
558
|
+
spec: PColumnSpec | AxisSpec;
|
|
557
559
|
data: import('@milaboratories/pf-plots').PValue[];
|
|
558
560
|
}> | null, Record<string, {
|
|
559
561
|
label: string;
|
|
562
|
+
spec: PColumnSpec | AxisSpec;
|
|
560
563
|
data: import('@milaboratories/pf-plots').PValue[];
|
|
561
564
|
}> | null>;
|
|
562
565
|
};
|
|
563
|
-
controller: import('@milaboratories/pf-plots').Controller<import('@milaboratories/pf-plots').InputStateParent<
|
|
566
|
+
controller: import('@milaboratories/pf-plots').Controller<import('@milaboratories/pf-plots').InputStateParent<ChartType>>;
|
|
564
567
|
columnsDataStore: DemoDataStore | null;
|
|
565
568
|
inputGuide: Ref<InputGuide<InputState>, InputGuide<InputState>>;
|
|
566
569
|
chartData: Ref<PlotDataAndSettings | null, PlotDataAndSettings | null>;
|
|
567
570
|
};
|
|
568
571
|
export type Store = ComputedRef<ReturnType<typeof factoryStore>>;
|
|
569
|
-
export declare function provideStore(
|
|
572
|
+
export declare function provideStore(initialState: GraphMakerState, dataStoreRef: Ref<DemoDataStore | null>, chartType: ChartType, defaultOptions: GraphMakerProps['defaultOptions'], fixedOptionsRef: Ref<GraphMakerProps['fixedOptions']>): ComputedRef<{
|
|
570
573
|
reactive: {
|
|
571
|
-
chartType:
|
|
574
|
+
chartType: ChartType;
|
|
572
575
|
template: import('./types.ts').LayersTemplate;
|
|
573
576
|
optionsState: {
|
|
574
|
-
type:
|
|
577
|
+
type: ChartType;
|
|
575
578
|
components: {
|
|
576
579
|
[x: string]: import('@milaboratories/pf-plots').ComponentStateSimple | import('@milaboratories/pf-plots').ComponentStateFilter;
|
|
577
580
|
};
|
|
@@ -848,13 +851,15 @@ export declare function provideStore(settings: GraphMakerSettings, dataStoreRef:
|
|
|
848
851
|
usedAesInMapping: ComputedRef<Record<string, Record<AesType, boolean>>>;
|
|
849
852
|
dendroTableData: Ref<Record<string, {
|
|
850
853
|
label: string;
|
|
854
|
+
spec: PColumnSpec | AxisSpec;
|
|
851
855
|
data: import('@milaboratories/pf-plots').PValue[];
|
|
852
856
|
}> | null, Record<string, {
|
|
853
857
|
label: string;
|
|
858
|
+
spec: PColumnSpec | AxisSpec;
|
|
854
859
|
data: import('@milaboratories/pf-plots').PValue[];
|
|
855
860
|
}> | null>;
|
|
856
861
|
};
|
|
857
|
-
controller: import('@milaboratories/pf-plots').Controller<import('@milaboratories/pf-plots').InputStateParent<
|
|
862
|
+
controller: import('@milaboratories/pf-plots').Controller<import('@milaboratories/pf-plots').InputStateParent<ChartType>>;
|
|
858
863
|
columnsDataStore: DemoDataStore | null;
|
|
859
864
|
inputGuide: Ref<InputGuide<InputState>, InputGuide<InputState>>;
|
|
860
865
|
chartData: Ref<PlotDataAndSettings | null, PlotDataAndSettings | null>;
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import { ChartType, InputState } from '@milaboratories/pf-plots';
|
|
1
|
+
import { ChartType, InputState, InputStateParent } from '@milaboratories/pf-plots';
|
|
2
2
|
import { AxesState, getDefaultLayersSettings, LayersSettings, StatisticsState } from './constant.ts';
|
|
3
3
|
import { AestheticMappingCategorical } from './dataBindAes.ts';
|
|
4
|
-
import { AxisSpec, PColumnSpec, PTableRecordSingleValueFilter } from '@platforma-sdk/model';
|
|
4
|
+
import { AxisSpec, PColumnSpec, PTableRecordSingleValueFilter, PFrameDriver, PFrameHandle } from '@platforma-sdk/model';
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type GraphMakerState = {
|
|
7
7
|
title: string;
|
|
8
|
-
chartType: ChartType;
|
|
9
8
|
template: LayersTemplate;
|
|
9
|
+
optionsState?: InputState;
|
|
10
|
+
statisticsSettings?: StatisticsState;
|
|
11
|
+
axesSettings?: AxesState;
|
|
12
|
+
layersSettings?: ReturnType<typeof getDefaultLayersSettings>;
|
|
13
|
+
dataBindAes?: Record<string, AestheticMappingCategorical>;
|
|
14
|
+
};
|
|
15
|
+
export type GraphMakerProps = {
|
|
16
|
+
pFrame: PFrameHandle | undefined;
|
|
17
|
+
chartType: ChartType;
|
|
10
18
|
defaultOptions?: {
|
|
11
|
-
inputName:
|
|
19
|
+
inputName: keyof InputStateParent<ChartType>['components'];
|
|
12
20
|
selectedSource: AxisSpec | PColumnSpec;
|
|
13
21
|
selectedFilterValue?: string | number;
|
|
14
22
|
}[];
|
|
15
23
|
fixedOptions?: {
|
|
16
|
-
inputName:
|
|
24
|
+
inputName: keyof InputStateParent<ChartType>['components'];
|
|
17
25
|
selectedSource: PTableRecordSingleValueFilter['column'];
|
|
18
26
|
selectedFilterValue?: string | number;
|
|
19
27
|
}[];
|
|
20
28
|
allowChartDeleting?: boolean;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
axesSettings?: AxesState;
|
|
24
|
-
layersSettings?: ReturnType<typeof getDefaultLayersSettings>;
|
|
25
|
-
dataBindAes?: Record<string, AestheticMappingCategorical>;
|
|
29
|
+
driver?: PFrameDriver;
|
|
30
|
+
labelsModifier?: (id: string, label: string) => string;
|
|
26
31
|
};
|
|
27
32
|
export type ReactiveState = {
|
|
28
33
|
chartType: ChartType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphMakerProps } from '../types.ts';
|
|
2
2
|
import { DemoDataStore, InputState } from '@milaboratories/pf-plots';
|
|
3
3
|
|
|
4
|
-
export declare function addFixedOptionsToState(state: InputState, dataStore: DemoDataStore, fixedOptions:
|
|
4
|
+
export declare function addFixedOptionsToState(state: InputState, dataStore: DemoDataStore, fixedOptions: GraphMakerProps['fixedOptions']): Promise<InputState>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DemoDataStore, InputGuide, InputState } from '@milaboratories/pf-plots';
|
|
2
|
-
import {
|
|
2
|
+
import { GraphMakerProps, ReactiveState } from '../types.ts';
|
|
3
3
|
|
|
4
|
-
export declare function composeChartSettings(inputGuide: InputGuide<InputState>, reactiveState: ReactiveState, dataStore: DemoDataStore | null, fixedOptions?:
|
|
4
|
+
export declare function composeChartSettings(inputGuide: InputGuide<InputState>, reactiveState: ReactiveState, dataStore: DemoDataStore | null, fixedOptions?: GraphMakerProps['fixedOptions']): Promise<{
|
|
5
5
|
settings: Record<string, unknown>;
|
|
6
6
|
dataByColumns: {
|
|
7
7
|
type: "columns";
|