@kepler.gl/schemas 3.2.5 → 3.3.0-alpha.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/dataset-schema.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ProtoDataset, RGBColor, JsonObject } from '@kepler.gl/types';
|
|
2
2
|
import { KeplerTable } from '@kepler.gl/table';
|
|
3
3
|
import Schema from './schema';
|
|
4
|
-
export
|
|
4
|
+
export type SavedField = {
|
|
5
5
|
name: string;
|
|
6
6
|
type: string;
|
|
7
7
|
format?: string;
|
|
8
8
|
analyzerType?: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ParsedField = {
|
|
11
11
|
name: string;
|
|
12
12
|
type: string;
|
|
13
13
|
format: string;
|
|
14
14
|
analyzerType: string;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type SavedDatasetV1 = {
|
|
17
17
|
version: 'v1';
|
|
18
18
|
data: {
|
|
19
19
|
id: string;
|
|
@@ -26,7 +26,7 @@ export declare type SavedDatasetV1 = {
|
|
|
26
26
|
disableDataOperation?: boolean;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type ParsedDataset = {
|
|
30
30
|
data: {
|
|
31
31
|
fields: ParsedField[];
|
|
32
32
|
rows: any[][];
|
package/dist/schema-manager.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { SavedDatasetV1, ParsedDataset } from './dataset-schema';
|
|
|
5
5
|
import { visStateSchema } from './vis-state-schema';
|
|
6
6
|
import { VERSIONS } from './versions';
|
|
7
7
|
import { MapInfo, SavedVisState, SavedMapStyle, ParsedConfig, BaseMapStyle } from '@kepler.gl/types';
|
|
8
|
-
export
|
|
8
|
+
export type SavedMapState = {
|
|
9
9
|
bearing: number;
|
|
10
10
|
dragRotate: boolean;
|
|
11
11
|
latitude: number;
|
|
@@ -17,10 +17,10 @@ export declare type SavedMapState = {
|
|
|
17
17
|
isZoomLocked?: false;
|
|
18
18
|
splitMapViewports?: [];
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type SavedLayerGroups = {
|
|
21
21
|
[key: string]: boolean;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type SavedCustomMapStyle = {
|
|
24
24
|
[key: string]: {
|
|
25
25
|
accessToken?: string;
|
|
26
26
|
custom: BaseMapStyle['custom'];
|
|
@@ -31,7 +31,7 @@ export declare type SavedCustomMapStyle = {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
/** Schema for v1 saved configuration */
|
|
34
|
-
export
|
|
34
|
+
export type SavedConfigV1 = {
|
|
35
35
|
version: 'v1';
|
|
36
36
|
config: {
|
|
37
37
|
visState: SavedVisState;
|
|
@@ -39,7 +39,7 @@ export declare type SavedConfigV1 = {
|
|
|
39
39
|
mapStyle: SavedMapStyle;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type SavedMap = {
|
|
43
43
|
datasets: SavedDatasetV1[];
|
|
44
44
|
config: SavedConfigV1;
|
|
45
45
|
info: {
|
|
@@ -49,7 +49,7 @@ export declare type SavedMap = {
|
|
|
49
49
|
description: string;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type LoadedMap = {
|
|
53
53
|
datasets?: ParsedDataset[] | null;
|
|
54
54
|
config?: ParsedConfig | null;
|
|
55
55
|
};
|
|
@@ -60,7 +60,7 @@ export interface ComposedReducerSchema {
|
|
|
60
60
|
save(state: any): any;
|
|
61
61
|
load(config: SavedMap): SavedMap;
|
|
62
62
|
}
|
|
63
|
-
export
|
|
63
|
+
export type KeplerGLSchemaProps = {
|
|
64
64
|
reducers?: typeof reducerSchema;
|
|
65
65
|
datasets?: typeof datasetSchema;
|
|
66
66
|
validVersions?: typeof VERSIONS;
|
|
@@ -8,7 +8,7 @@ import KeplerGLSchema from './schema-manager';
|
|
|
8
8
|
* V0 Schema
|
|
9
9
|
*/
|
|
10
10
|
export declare const dimensionPropsV0: string[];
|
|
11
|
-
export
|
|
11
|
+
export type modifiedType = {
|
|
12
12
|
strokeColor?: any;
|
|
13
13
|
strokeColorRange?: any;
|
|
14
14
|
filled?: boolean;
|
|
@@ -54,18 +54,18 @@ export interface VisState {
|
|
|
54
54
|
[datasetId: string]: boolean;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
export
|
|
57
|
+
export type PostMergerPayload = {
|
|
58
58
|
newDataIds: string[];
|
|
59
59
|
options?: AddDataToMapOptions;
|
|
60
60
|
layerMergers?: Merger<any>[];
|
|
61
61
|
};
|
|
62
|
-
export
|
|
62
|
+
export type MergerActionPayload<S extends object> = {
|
|
63
63
|
mergers: Merger<S>[];
|
|
64
64
|
postMergerPayload: PostMergerPayload;
|
|
65
65
|
};
|
|
66
|
-
export
|
|
67
|
-
export
|
|
68
|
-
export
|
|
66
|
+
export type MergerMergeFunc<S extends object> = (state: S, config: any, fromConfig: boolean, mergerActionPayload?: MergerActionPayload<S>) => S;
|
|
67
|
+
export type ReplaceParentDatasetIdsFunc<T> = (item: T, dataId: string, dataIdToReplace: string) => T | null;
|
|
68
|
+
export type Merger<S extends object> = {
|
|
69
69
|
merge: MergerMergeFunc<S>;
|
|
70
70
|
prop: string | string[];
|
|
71
71
|
toMergeProp?: string | string[];
|
|
@@ -77,7 +77,7 @@ export declare type Merger<S extends object> = {
|
|
|
77
77
|
combineConfigs?: (configs: S[]) => S;
|
|
78
78
|
getChildDatasetIds?: any;
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type VisStateMergers<S extends object> = Merger<S>[];
|
|
81
81
|
declare class DimensionFieldSchemaV0 extends Schema {
|
|
82
82
|
version: "v0";
|
|
83
83
|
save(field: any): {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kepler.gl/schemas",
|
|
3
3
|
"author": "Shan He <shan@uber.com>",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0-alpha.0",
|
|
5
5
|
"description": "kepler.gl schemas used by kepler.gl components, actions and reducers",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"umd"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@kepler.gl/common-utils": "3.
|
|
34
|
-
"@kepler.gl/constants": "3.
|
|
35
|
-
"@kepler.gl/layers": "3.
|
|
36
|
-
"@kepler.gl/table": "3.
|
|
37
|
-
"@kepler.gl/types": "3.
|
|
38
|
-
"@kepler.gl/utils": "3.
|
|
39
|
-
"@loaders.gl/loader-utils": "^4.3.
|
|
33
|
+
"@kepler.gl/common-utils": "3.3.0-alpha.0",
|
|
34
|
+
"@kepler.gl/constants": "3.3.0-alpha.0",
|
|
35
|
+
"@kepler.gl/layers": "3.3.0-alpha.0",
|
|
36
|
+
"@kepler.gl/table": "3.3.0-alpha.0",
|
|
37
|
+
"@kepler.gl/types": "3.3.0-alpha.0",
|
|
38
|
+
"@kepler.gl/utils": "3.3.0-alpha.0",
|
|
39
|
+
"@loaders.gl/loader-utils": "^4.3.4",
|
|
40
40
|
"@types/keymirror": "^0.1.1",
|
|
41
41
|
"@types/lodash": "4.17.5",
|
|
42
42
|
"apache-arrow": ">=15.0.0",
|