@kepler.gl/actions 3.3.0-alpha.2 → 3.3.0-alpha.20
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/action-types.d.ts +101 -1
- package/dist/action-wrapper.d.ts +22 -17
- package/dist/actions.d.ts +13 -0
- package/dist/cjs/action-types.js +265 -0
- package/dist/cjs/action-wrapper.js +177 -0
- package/dist/cjs/actions.js +193 -0
- package/dist/cjs/identity-actions.js +86 -0
- package/dist/cjs/index.js +182 -0
- package/dist/cjs/map-state-actions.js +174 -0
- package/dist/cjs/map-style-actions.js +211 -0
- package/dist/cjs/provider-actions.js +99 -0
- package/dist/cjs/ui-state-actions.js +460 -0
- package/dist/cjs/vis-state-actions.js +1859 -0
- package/dist/esm/action-types.js +259 -0
- package/dist/esm/action-wrapper.js +171 -0
- package/dist/esm/actions.js +186 -0
- package/dist/esm/identity-actions.js +79 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/map-state-actions.js +167 -0
- package/dist/esm/map-style-actions.js +204 -0
- package/dist/esm/provider-actions.js +93 -0
- package/dist/esm/ui-state-actions.js +454 -0
- package/dist/esm/vis-state-actions.js +1728 -0
- package/dist/map-state-actions.d.ts +51 -3
- package/dist/ui-state-actions.d.ts +74 -1
- package/dist/vis-state-actions.d.ts +573 -21
- package/package.json +24 -21
- package/dist/action-types.js +0 -213
- package/dist/action-wrapper.js +0 -174
- package/dist/actions.js +0 -187
- package/dist/identity-actions.js +0 -86
- package/dist/index.js +0 -183
- package/dist/map-state-actions.js +0 -129
- package/dist/map-style-actions.js +0 -211
- package/dist/provider-actions.js +0 -99
- package/dist/ui-state-actions.js +0 -388
- package/dist/vis-state-actions.js +0 -1299
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as ActionTypes } from './action-types';
|
|
2
|
-
import { Bounds, Merge, Viewport } from '@kepler.gl/types';
|
|
3
|
-
import { MapSplitMode } from '@kepler.gl/constants';
|
|
2
|
+
import { Bounds, MapState, Merge, Viewport, ViewportPadding } from '@kepler.gl/types';
|
|
3
|
+
import { MapSplitMode, MapViewMode, GlobeConfig } from '@kepler.gl/constants';
|
|
4
4
|
export type TogglePerspectiveUpdaterAction = void;
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -16,17 +16,22 @@ export declare const togglePerspective: () => Merge<TogglePerspectiveUpdaterActi
|
|
|
16
16
|
}>;
|
|
17
17
|
export type FitBoundsUpdaterAction = {
|
|
18
18
|
payload: Bounds;
|
|
19
|
+
meta?: {
|
|
20
|
+
padding?: ViewportPadding;
|
|
21
|
+
};
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Fit map viewport to bounds
|
|
22
25
|
* @memberof mapStateActions
|
|
23
26
|
* @param {Array<Number>} bounds as `[lngMin, latMin, lngMax, latMax]`
|
|
27
|
+
* @param {Number|Object} [padding] padding in pixels around the bounds. Can be a number or `{top, bottom, left, right}`.
|
|
24
28
|
* @public
|
|
25
29
|
* @example
|
|
26
30
|
* import {fitBounds} from '@kepler.gl/actions';
|
|
27
31
|
* this.props.dispatch(fitBounds([-122.23, 37.127, -122.11, 37.456]));
|
|
32
|
+
* this.props.dispatch(fitBounds([-122.23, 37.127, -122.11, 37.456], {left: 300}));
|
|
28
33
|
*/
|
|
29
|
-
export declare const fitBounds: (
|
|
34
|
+
export declare const fitBounds: (bounds: Bounds, padding?: ViewportPadding) => Merge<FitBoundsUpdaterAction, {
|
|
30
35
|
type: typeof ActionTypes.FIT_BOUNDS;
|
|
31
36
|
}>;
|
|
32
37
|
export type UpdateMapUpdaterAction = {
|
|
@@ -56,6 +61,23 @@ export type UpdateMapUpdaterAction = {
|
|
|
56
61
|
export declare const updateMap: (viewport: Viewport, mapIndex?: number) => Merge<UpdateMapUpdaterAction, {
|
|
57
62
|
type: typeof ActionTypes.UPDATE_MAP;
|
|
58
63
|
}>;
|
|
64
|
+
export type ApplyMapStateUpdaterAction = {
|
|
65
|
+
payload: Partial<MapState>;
|
|
66
|
+
meta?: {
|
|
67
|
+
mapIndex?: number;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Apply a partial map state, as used by the viewport JSON editor.
|
|
72
|
+
* Width and height of the current viewport are preserved.
|
|
73
|
+
* @memberof mapStateActions
|
|
74
|
+
* @param mapState - Partial map state from saved JSON
|
|
75
|
+
* @param mapIndex - Split-map pane to apply camera fields to when viewports are unsynced
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export declare const applyMapState: (mapState: Partial<MapState>, mapIndex?: number) => Merge<ApplyMapStateUpdaterAction, {
|
|
79
|
+
type: typeof ActionTypes.APPLY_MAP_STATE;
|
|
80
|
+
}>;
|
|
59
81
|
export type ToggleSplitMapUpdaterAction = {
|
|
60
82
|
payload: number;
|
|
61
83
|
};
|
|
@@ -90,6 +112,32 @@ export declare const toggleSplitMapViewport: (payload: {
|
|
|
90
112
|
}) => Merge<ToggleSplitMapViewportUpdaterAction, {
|
|
91
113
|
type: typeof ActionTypes.TOGGLE_SPLIT_MAP_VIEWPORT;
|
|
92
114
|
}>;
|
|
115
|
+
export type SetMapViewModeUpdaterAction = {
|
|
116
|
+
payload: {
|
|
117
|
+
mapViewMode: MapViewMode;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Set map view mode (2D, 3D, or Globe)
|
|
122
|
+
* @memberof mapStateActions
|
|
123
|
+
* @param mapViewMode - One of MapViewMode values
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
export declare const setMapViewMode: (mapViewMode: MapViewMode) => Merge<SetMapViewModeUpdaterAction, {
|
|
127
|
+
type: typeof ActionTypes.SET_MAP_VIEW_MODE;
|
|
128
|
+
}>;
|
|
129
|
+
export type GlobeConfigChangeUpdaterAction = {
|
|
130
|
+
payload: Partial<GlobeConfig>;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Update globe configuration
|
|
134
|
+
* @memberof mapStateActions
|
|
135
|
+
* @param config - Partial globe config to merge
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
export declare const globeConfigChange: (config: Partial<GlobeConfig>) => Merge<GlobeConfigChangeUpdaterAction, {
|
|
139
|
+
type: typeof ActionTypes.GLOBE_CONFIG_CHANGE;
|
|
140
|
+
}>;
|
|
93
141
|
export type SetMapSplitModeUpdaterAction = {
|
|
94
142
|
payload: {
|
|
95
143
|
mapSplitMode: MapSplitMode;
|
|
@@ -129,6 +129,20 @@ export type OpenDeleteModalUpdaterAction = {
|
|
|
129
129
|
export declare const openDeleteModal: (datasetId: OpenDeleteModalUpdaterAction['payload']) => Merge<OpenDeleteModalUpdaterAction, {
|
|
130
130
|
type: typeof ActionTypes.OPEN_DELETE_MODAL;
|
|
131
131
|
}>;
|
|
132
|
+
/** OPEN_REPLACE_DATASET_MODAL */
|
|
133
|
+
export type OpenReplaceDatasetModalUpdaterAction = {
|
|
134
|
+
payload: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Open the add-data modal so the next confirmed upload replaces one dataset.
|
|
138
|
+
* Layers and filters are remapped onto the new table.
|
|
139
|
+
* @memberof uiStateActions
|
|
140
|
+
* @param datasetId - id of the dataset to replace
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
export declare const openReplaceDatasetModal: (datasetId: OpenReplaceDatasetModalUpdaterAction['payload']) => Merge<OpenReplaceDatasetModalUpdaterAction, {
|
|
144
|
+
type: typeof ActionTypes.OPEN_REPLACE_DATASET_MODAL;
|
|
145
|
+
}>;
|
|
132
146
|
/** ADD_NOTIFICATION */
|
|
133
147
|
export type AddNotificationUpdaterAction = {
|
|
134
148
|
payload: object;
|
|
@@ -161,7 +175,7 @@ export type SetExportImageSettingUpdaterAction = {
|
|
|
161
175
|
payload: Partial<ExportImage>;
|
|
162
176
|
};
|
|
163
177
|
/**
|
|
164
|
-
* Set `exportImage` settings: ratio, resolution, legend
|
|
178
|
+
* Set `exportImage` settings: ratio, resolution, legend, charts, transparent background
|
|
165
179
|
* @memberof uiStateActions
|
|
166
180
|
* @param newSetting - {ratio: '1x'}
|
|
167
181
|
* @public
|
|
@@ -178,6 +192,7 @@ export declare const startExportingImage: (options?: {
|
|
|
178
192
|
ratio?: string;
|
|
179
193
|
resolution?: string;
|
|
180
194
|
legend?: string;
|
|
195
|
+
transparentBackground?: boolean;
|
|
181
196
|
center?: boolean;
|
|
182
197
|
}) => Merge<SetExportImageSettingUpdaterAction, {
|
|
183
198
|
type: typeof ActionTypes.START_EXPORTING_IMAGE;
|
|
@@ -313,6 +328,49 @@ export type SetExportHTMLMapModeUpdaterAction = {
|
|
|
313
328
|
export declare const setExportHTMLMapMode: (mode: SetExportHTMLMapModeUpdaterAction['payload']) => Merge<SetExportHTMLMapModeUpdaterAction, {
|
|
314
329
|
type: typeof ActionTypes.SET_EXPORT_MAP_HTML_MODE;
|
|
315
330
|
}>;
|
|
331
|
+
/** SET_EXPORT_MAP_BRANDING */
|
|
332
|
+
export type SetExportMapBrandingUpdaterAction = {
|
|
333
|
+
payload: {
|
|
334
|
+
appName?: string;
|
|
335
|
+
appWebsite?: string;
|
|
336
|
+
appIcon?: string;
|
|
337
|
+
appNameColor?: string;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Set application branding overrides for exported maps
|
|
342
|
+
* @memberOf uiStateActions
|
|
343
|
+
* @param payload - application name, website, icon, and/or name color overrides
|
|
344
|
+
*/
|
|
345
|
+
export declare const setExportMapBranding: (payload: SetExportMapBrandingUpdaterAction['payload']) => Merge<SetExportMapBrandingUpdaterAction, {
|
|
346
|
+
type: typeof ActionTypes.SET_EXPORT_MAP_BRANDING;
|
|
347
|
+
}>;
|
|
348
|
+
/** SET_EXPORT_MAP_FILE_NAME */
|
|
349
|
+
export type SetExportMapFileNameUpdaterAction = {
|
|
350
|
+
payload: string;
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Set the filename used when exporting an HTML or JSON map
|
|
354
|
+
* @memberof uiStateActions
|
|
355
|
+
* @param fileName - download name without extension
|
|
356
|
+
* @public
|
|
357
|
+
*/
|
|
358
|
+
export declare const setExportMapFileName: (fileName: SetExportMapFileNameUpdaterAction['payload']) => Merge<SetExportMapFileNameUpdaterAction, {
|
|
359
|
+
type: typeof ActionTypes.SET_EXPORT_MAP_FILE_NAME;
|
|
360
|
+
}>;
|
|
361
|
+
/** SET_EXPORT_INCLUDE_LAYER_API_KEYS */
|
|
362
|
+
export type SetExportIncludeLayerApiKeysUpdaterAction = {
|
|
363
|
+
payload: boolean;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Whether exported HTML and JSON maps keep access tokens stored on layers.
|
|
367
|
+
* @memberof uiStateActions
|
|
368
|
+
* @param includeLayerApiKeys - include layer API keys in the export
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
371
|
+
export declare const setExportIncludeLayerApiKeys: (includeLayerApiKeys: SetExportIncludeLayerApiKeysUpdaterAction['payload']) => Merge<SetExportIncludeLayerApiKeysUpdaterAction, {
|
|
372
|
+
type: typeof ActionTypes.SET_EXPORT_INCLUDE_LAYER_API_KEYS;
|
|
373
|
+
}>;
|
|
316
374
|
/** SET_LOCALE */
|
|
317
375
|
export type SetLocaleUpdaterAction = {
|
|
318
376
|
payload: {
|
|
@@ -328,6 +386,21 @@ export type SetLocaleUpdaterAction = {
|
|
|
328
386
|
export declare const setLocale: (locale: SetLocaleUpdaterAction['payload']['locale']) => Merge<SetLocaleUpdaterAction, {
|
|
329
387
|
type: typeof ActionTypes.SET_LOCALE;
|
|
330
388
|
}>;
|
|
389
|
+
/** SET_THEME */
|
|
390
|
+
export type SetThemeUpdaterAction = {
|
|
391
|
+
payload: {
|
|
392
|
+
theme: string;
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Set UI `theme` value (`light`, `dark`, or `space`)
|
|
397
|
+
* @memberof uiStateActions
|
|
398
|
+
* @param theme - theme of the UI
|
|
399
|
+
* @public
|
|
400
|
+
*/
|
|
401
|
+
export declare const setTheme: (theme: SetThemeUpdaterAction['payload']['theme']) => Merge<SetThemeUpdaterAction, {
|
|
402
|
+
type: typeof ActionTypes.SET_THEME;
|
|
403
|
+
}>;
|
|
331
404
|
/** TOGGLE_PANEL_LIST_VIEW */
|
|
332
405
|
export type TogglePanelListViewAction = {
|
|
333
406
|
payload: {
|