@kepler.gl/reducers 3.0.0-alpha.0 → 3.0.0-alpha.2
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/combined-updaters.d.ts +30 -1
- package/dist/combined-updaters.js +235 -24
- package/dist/composer-helpers.d.ts +7 -4
- package/dist/composer-helpers.js +17 -28
- package/dist/composers.d.ts +6 -0
- package/dist/composers.js +2 -22
- package/dist/core.d.ts +1 -1
- package/dist/core.js +15 -25
- package/dist/data-utils.js +5 -23
- package/dist/export-utils.js +1 -21
- package/dist/index.d.ts +2 -3
- package/dist/index.js +36 -35
- package/dist/interaction-utils.d.ts +1 -5
- package/dist/interaction-utils.js +11 -31
- package/dist/layer-utils.d.ts +39 -10
- package/dist/layer-utils.js +112 -57
- package/dist/map-state-updaters.d.ts +33 -2
- package/dist/map-state-updaters.js +277 -38
- package/dist/map-state.d.ts +74 -2
- package/dist/map-state.js +2 -22
- package/dist/map-style-updaters.d.ts +30 -17
- package/dist/map-style-updaters.js +303 -104
- package/dist/map-style.js +2 -22
- package/dist/merger-handler.d.ts +10 -0
- package/dist/merger-handler.js +123 -0
- package/dist/middleware.js +6 -22
- package/dist/provider-state-updaters.d.ts +0 -7
- package/dist/provider-state-updaters.js +2 -92
- package/dist/provider-state.js +2 -22
- package/dist/root.d.ts +1 -8
- package/dist/root.js +24 -30
- package/dist/ui-state-updaters.d.ts +9 -2
- package/dist/ui-state-updaters.js +87 -82
- package/dist/ui-state.js +2 -22
- package/dist/vis-state-merger.d.ts +51 -13
- package/dist/vis-state-merger.js +411 -131
- package/dist/vis-state-selectors.js +8 -24
- package/dist/vis-state-updaters.d.ts +136 -10
- package/dist/vis-state-updaters.js +965 -283
- package/dist/vis-state.d.ts +210 -2
- package/dist/vis-state.js +2 -22
- package/package.json +23 -20
|
@@ -11,10 +11,14 @@ export declare type MapStyle = {
|
|
|
11
11
|
mapStylesReplaceDefault: boolean;
|
|
12
12
|
inputStyle: InputStyle;
|
|
13
13
|
threeDBuildingColor: RGBColor;
|
|
14
|
+
backgroundColor: RGBColor;
|
|
14
15
|
custom3DBuildingColor: boolean;
|
|
15
16
|
bottomMapStyle: any;
|
|
16
17
|
topMapStyle: any;
|
|
17
18
|
initialState?: MapStyle;
|
|
19
|
+
isLoading: {
|
|
20
|
+
[key: string]: boolean;
|
|
21
|
+
};
|
|
18
22
|
};
|
|
19
23
|
/**
|
|
20
24
|
* Default initial `mapStyle`
|
|
@@ -29,6 +33,7 @@ export declare type MapStyle = {
|
|
|
29
33
|
* @Property mapStylesReplaceDefault - Default: `false`
|
|
30
34
|
* @property inputStyle - Default: `{}`
|
|
31
35
|
* @property threeDBuildingColor - Default: `[r, g, b]`
|
|
36
|
+
* @property backgroundColor - Default: `[r, g, b]`
|
|
32
37
|
* @public
|
|
33
38
|
*/
|
|
34
39
|
export declare const INITIAL_MAP_STYLE: MapStyle;
|
|
@@ -71,6 +76,11 @@ export declare function getMapStyles({ styleType, visibleLayerGroups, topLayerGr
|
|
|
71
76
|
} | null;
|
|
72
77
|
editable: number;
|
|
73
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* @memberof mapStyleUpdaters
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare const requestMapStylesUpdater: (state: MapStyle, { payload: { mapStyles, onSuccess } }: MapStyleActions.RequestMapStylesUpdaterAction) => MapStyle;
|
|
74
84
|
/**
|
|
75
85
|
* Propagate `mapStyle` reducer with `mapboxApiAccessToken` and `mapStylesReplaceDefault`.
|
|
76
86
|
* if mapStylesReplaceDefault is true mapStyles is emptied; loadMapStylesUpdater() will
|
|
@@ -94,7 +104,7 @@ export declare const mapConfigChangeUpdater: (state: MapStyle, action: MapStyleA
|
|
|
94
104
|
* @memberof mapStyleUpdaters
|
|
95
105
|
* @public
|
|
96
106
|
*/
|
|
97
|
-
export declare const mapStyleChangeUpdater: (state: MapStyle, { payload: styleType }: MapStyleActions.MapStyleChangeUpdaterAction) => MapStyle;
|
|
107
|
+
export declare const mapStyleChangeUpdater: (state: MapStyle, { payload: { styleType, onSuccess } }: MapStyleActions.MapStyleChangeUpdaterAction) => MapStyle;
|
|
98
108
|
/**
|
|
99
109
|
* Callback when load map style success
|
|
100
110
|
* @memberof mapStyleUpdaters
|
|
@@ -106,12 +116,7 @@ export declare const loadMapStylesUpdater: (state: MapStyle, action: MapStyleAct
|
|
|
106
116
|
* @memberof mapStyleUpdaters
|
|
107
117
|
* @public
|
|
108
118
|
*/
|
|
109
|
-
export declare const loadMapStyleErrUpdater: (state: MapStyle,
|
|
110
|
-
/**
|
|
111
|
-
* @memberof mapStyleUpdaters
|
|
112
|
-
* @public
|
|
113
|
-
*/
|
|
114
|
-
export declare const requestMapStylesUpdater: (state: MapStyle, { payload: mapStyles }: MapStyleActions.RequestMapStylesUpdaterAction) => MapStyle;
|
|
119
|
+
export declare const loadMapStyleErrUpdater: (state: MapStyle, { payload: { ids, error } }: MapStyleActions.LoadMapStyleErrUpdaterAction) => MapStyle;
|
|
115
120
|
/**
|
|
116
121
|
* Load map style object when pass in saved map config
|
|
117
122
|
* @memberof mapStyleUpdaters
|
|
@@ -151,23 +156,31 @@ export declare const inputMapStyleUpdater: (state: MapStyle, { payload: { inputS
|
|
|
151
156
|
* @memberof mapStyleUpdaters
|
|
152
157
|
*/
|
|
153
158
|
export declare const addCustomMapStyleUpdater: (state: MapStyle) => MapStyle;
|
|
159
|
+
/**
|
|
160
|
+
* Edit map style from user input to reducer.
|
|
161
|
+
* This action is called when user clicks confirm after editing an existing custom style in the custom map style dialog.
|
|
162
|
+
* It should not be called from outside kepler.gl without a valid `inputStyle` in the `mapStyle` reducer.
|
|
163
|
+
* @memberof mapStyleUpdaters
|
|
164
|
+
*/
|
|
165
|
+
export declare const editCustomMapStyleUpdater: (state: MapStyle) => MapStyle;
|
|
166
|
+
/**
|
|
167
|
+
* Remove a custom map style from `state.mapStyle.mapStyles`.
|
|
168
|
+
* @memberof mapStyleUpdaters
|
|
169
|
+
*/
|
|
170
|
+
export declare const removeCustomMapStyleUpdater: (state: MapStyle, action: MapStyleActions.RemoveCustomMapStyleUpdaterAction) => MapStyle;
|
|
154
171
|
/**
|
|
155
172
|
* Updates 3d building color
|
|
156
173
|
* @memberof mapStyleUpdaters
|
|
157
174
|
*/
|
|
158
175
|
export declare const set3dBuildingColorUpdater: (state: MapStyle, { payload: color }: MapStyleActions.Set3dBuildingColorUpdaterAction) => MapStyle;
|
|
176
|
+
/**
|
|
177
|
+
* Updates background color
|
|
178
|
+
* @memberof mapStyleUpdaters
|
|
179
|
+
*/
|
|
180
|
+
export declare const setBackgroundColorUpdater: (state: MapStyle, { payload: color }: MapStyleActions.SetBackgroundColorUpdaterAction) => MapStyle;
|
|
159
181
|
/**
|
|
160
182
|
* Return the initial input style
|
|
161
183
|
* @return Object
|
|
162
184
|
*/
|
|
163
|
-
export declare function getInitialInputStyle():
|
|
164
|
-
accessToken: null;
|
|
165
|
-
error: boolean;
|
|
166
|
-
isValid: boolean;
|
|
167
|
-
label: null;
|
|
168
|
-
style: null;
|
|
169
|
-
url: null;
|
|
170
|
-
icon: null;
|
|
171
|
-
custom: boolean;
|
|
172
|
-
};
|
|
185
|
+
export declare function getInitialInputStyle(): InputStyle;
|
|
173
186
|
export {};
|