@kepler.gl/actions 3.1.0-alpha.0 → 3.1.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/action-types.d.ts +294 -0
- package/dist/action-types.js +192 -0
- package/dist/action-wrapper.d.ts +115 -0
- package/dist/action-wrapper.js +173 -0
- package/dist/actions.d.ts +185 -0
- package/dist/actions.js +187 -0
- package/dist/identity-actions.d.ts +61 -0
- package/dist/identity-actions.js +84 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +183 -0
- package/dist/map-state-actions.d.ts +91 -0
- package/dist/map-state-actions.js +105 -0
- package/dist/map-style-actions.d.ts +200 -0
- package/dist/map-style-actions.js +211 -0
- package/dist/provider-actions.d.ts +96 -0
- package/dist/provider-actions.js +90 -0
- package/dist/ui-state-actions.d.ts +320 -0
- package/dist/ui-state-actions.js +357 -0
- package/dist/vis-state-actions.d.ts +1024 -0
- package/dist/vis-state-actions.js +1088 -0
- package/package.json +7 -7
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { default as ActionTypes } from './action-types';
|
|
2
|
+
import { Merge } from '@kepler.gl/types';
|
|
3
|
+
import { ExportImage } from '@kepler.gl/constants';
|
|
4
|
+
/** TOGGLE_SIDE_PANEL */
|
|
5
|
+
export declare type ToggleSidePanelUpdaterAction = {
|
|
6
|
+
payload: string | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Toggle active side panel
|
|
10
|
+
* @memberof uiStateActions
|
|
11
|
+
* @param id id of side panel to be shown, one of `layer`, `filter`, `interaction`, `map`
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare const toggleSidePanel: (id: string | null) => Merge<ToggleSidePanelUpdaterAction, {
|
|
15
|
+
type: typeof ActionTypes.TOGGLE_SIDE_PANEL;
|
|
16
|
+
}>;
|
|
17
|
+
/** TOGGLE_MODAL */
|
|
18
|
+
export declare type ToggleModalUpdaterAction = {
|
|
19
|
+
payload: string | null;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Show and hide modal dialog
|
|
23
|
+
* @memberof uiStateActions
|
|
24
|
+
* @param id - id of modal to be shown, null to hide modals. One of:
|
|
25
|
+
* - [`DATA_TABLE_ID`](../constants/default-settings.md#data_table_id)
|
|
26
|
+
* - [`DELETE_DATA_ID`](../constants/default-settings.md#delete_data_id)
|
|
27
|
+
* - [`ADD_DATA_ID`](../constants/default-settings.md#add_data_id)
|
|
28
|
+
* - [`EXPORT_IMAGE_ID`](../constants/default-settings.md#export_image_id)
|
|
29
|
+
* - [`EXPORT_DATA_ID`](../constants/default-settings.md#export_data_id)
|
|
30
|
+
* - [`ADD_MAP_STYLE_ID`](../constants/default-settings.md#add_map_style_id)
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
export declare const toggleModal: (id: ToggleModalUpdaterAction['payload']) => Merge<ToggleModalUpdaterAction, {
|
|
34
|
+
type: typeof ActionTypes.TOGGLE_MODAL;
|
|
35
|
+
}>;
|
|
36
|
+
/** SHOW_EXPORT_DROPDOWN */
|
|
37
|
+
export declare type ShowExportDropdownUpdaterAction = {
|
|
38
|
+
payload: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Hide and show side panel header dropdown, activated by clicking the share link on top of the side panel
|
|
42
|
+
* @memberof uiStateActions
|
|
43
|
+
* @param id - id of the dropdown
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare const showExportDropdown: (id: ShowExportDropdownUpdaterAction['payload']) => Merge<ShowExportDropdownUpdaterAction, {
|
|
47
|
+
type: typeof ActionTypes.SHOW_EXPORT_DROPDOWN;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Hide side panel header dropdown, activated by clicking the share link on top of the side panel
|
|
51
|
+
* @memberof uiStateActions
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export declare const hideExportDropdown: () => {
|
|
55
|
+
type: typeof ActionTypes.HIDE_EXPORT_DROPDOWN;
|
|
56
|
+
};
|
|
57
|
+
/** TOGGLE_SIDE_PANEL_CLOSE_BUTTON*/
|
|
58
|
+
export declare type ToggleSidePanelCloseButtonUpdaterAction = {
|
|
59
|
+
payload: {
|
|
60
|
+
show: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Toggle side panel close button
|
|
65
|
+
* @memberof uiStateActions
|
|
66
|
+
* @param show - if side panel button visible
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export declare const toggleSidePanelCloseButton: (show: boolean) => Merge<ToggleSidePanelCloseButtonUpdaterAction, {
|
|
70
|
+
type: typeof ActionTypes.TOGGLE_SIDE_PANEL_CLOSE_BUTTON;
|
|
71
|
+
}>;
|
|
72
|
+
/** TOGGLE_MAP_CONTROL */
|
|
73
|
+
export declare type ToggleMapControlUpdaterAction = {
|
|
74
|
+
payload: {
|
|
75
|
+
panelId: string;
|
|
76
|
+
index: number;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Toggle active map control panel
|
|
81
|
+
* @memberof uiStateActions
|
|
82
|
+
* @param panelId - map control panel id, one of the keys of: [`DEFAULT_MAP_CONTROLS`](#default_map_controls)
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export declare const toggleMapControl: (panelId: ToggleMapControlUpdaterAction['payload']['panelId'], index: ToggleMapControlUpdaterAction['payload']['index']) => Merge<ToggleMapControlUpdaterAction, {
|
|
86
|
+
type: typeof ActionTypes.TOGGLE_MAP_CONTROL;
|
|
87
|
+
}>;
|
|
88
|
+
/** SET_MAP_CONTROL_VISIBILITY */
|
|
89
|
+
export declare type setMapControlVisibilityUpdaterAction = {
|
|
90
|
+
payload: {
|
|
91
|
+
panelId: string;
|
|
92
|
+
show: boolean;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Toggle active map control panel
|
|
97
|
+
* @memberof uiStateActions
|
|
98
|
+
* @param panelId - map control panel id, one of the keys of: [`DEFAULT_MAP_CONTROLS`](#default_map_controls)
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
export declare const setMapControlVisibility: (panelId: setMapControlVisibilityUpdaterAction['payload']['panelId'], show: setMapControlVisibilityUpdaterAction['payload']['show']) => Merge<setMapControlVisibilityUpdaterAction, {
|
|
102
|
+
type: typeof ActionTypes.SET_MAP_CONTROL_VISIBILITY;
|
|
103
|
+
}>;
|
|
104
|
+
/** OPEN_DELETE_MODAL */
|
|
105
|
+
export declare type OpenDeleteModalUpdaterAction = {
|
|
106
|
+
payload: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Toggle active map control panel
|
|
110
|
+
* @memberof uiStateActions
|
|
111
|
+
* @param datasetId - `id` of the dataset to be deleted
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export declare const openDeleteModal: (datasetId: OpenDeleteModalUpdaterAction['payload']) => Merge<OpenDeleteModalUpdaterAction, {
|
|
115
|
+
type: typeof ActionTypes.OPEN_DELETE_MODAL;
|
|
116
|
+
}>;
|
|
117
|
+
/** ADD_NOTIFICATION */
|
|
118
|
+
export declare type AddNotificationUpdaterAction = {
|
|
119
|
+
payload: object;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Add a notification to be displayed.
|
|
123
|
+
* Existing notification will be updated in case of matching id.
|
|
124
|
+
* @memberof uiStateActions
|
|
125
|
+
* @param notification - The `notification` object to be added or updated
|
|
126
|
+
* @public
|
|
127
|
+
*/
|
|
128
|
+
export declare const addNotification: (notification: AddNotificationUpdaterAction['payload']) => Merge<AddNotificationUpdaterAction, {
|
|
129
|
+
type: typeof ActionTypes.ADD_NOTIFICATION;
|
|
130
|
+
}>;
|
|
131
|
+
/** REMOVE_NOTIFICATION */
|
|
132
|
+
export declare type RemoveNotificationUpdaterAction = {
|
|
133
|
+
payload: string;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Remove a notification
|
|
137
|
+
* @memberof uiStateActions
|
|
138
|
+
* @param id - `id` of the notification to be removed
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export declare const removeNotification: (id: RemoveNotificationUpdaterAction['payload']) => Merge<RemoveNotificationUpdaterAction, {
|
|
142
|
+
type: typeof ActionTypes.REMOVE_NOTIFICATION;
|
|
143
|
+
}>;
|
|
144
|
+
/** SET_EXPORT_IMAGE_SETTING */
|
|
145
|
+
export declare type SetExportImageSettingUpdaterAction = {
|
|
146
|
+
payload: Partial<ExportImage>;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Set `exportImage` settings: ratio, resolution, legend
|
|
150
|
+
* @memberof uiStateActions
|
|
151
|
+
* @param newSetting - {ratio: '1x'}
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
export declare const setExportImageSetting: (newSetting: SetExportImageSettingUpdaterAction['payload']) => Merge<SetExportImageSettingUpdaterAction, {
|
|
155
|
+
type: typeof ActionTypes.SET_EXPORT_IMAGE_SETTING;
|
|
156
|
+
}>;
|
|
157
|
+
/**
|
|
158
|
+
* Start exporting image flow
|
|
159
|
+
* @memberof uiStateActions
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
export declare const startExportingImage: (options?: {
|
|
163
|
+
ratio?: string;
|
|
164
|
+
resolution?: string;
|
|
165
|
+
legend?: string;
|
|
166
|
+
center?: boolean;
|
|
167
|
+
}) => Merge<SetExportImageSettingUpdaterAction, {
|
|
168
|
+
type: typeof ActionTypes.START_EXPORTING_IMAGE;
|
|
169
|
+
}>;
|
|
170
|
+
/** SET_EXPORT_IMAGE_DATA_URI */
|
|
171
|
+
export declare type SetExportImageDataUriUpdaterAction = {
|
|
172
|
+
payload: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Set `exportImage.setExportImageDataUri` to a dataUri
|
|
176
|
+
* @memberof uiStateActions
|
|
177
|
+
* @param dataUri - export image data uri
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
export declare const setExportImageDataUri: (dataUri: SetExportImageDataUriUpdaterAction['payload']) => Merge<SetExportImageDataUriUpdaterAction, {
|
|
181
|
+
type: typeof ActionTypes.SET_EXPORT_IMAGE_DATA_URI;
|
|
182
|
+
}>;
|
|
183
|
+
/** SET_EXPORT_IMAGE_ERROR */
|
|
184
|
+
export declare type SetExportImageErrorUpdaterAction = {
|
|
185
|
+
payload: Error;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Set Export image error
|
|
189
|
+
* @memberof uiStateActions
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
export declare const setExportImageError: (error: SetExportImageErrorUpdaterAction['payload']) => Merge<SetExportImageErrorUpdaterAction, {
|
|
193
|
+
type: typeof ActionTypes.SET_EXPORT_IMAGE_ERROR;
|
|
194
|
+
}>;
|
|
195
|
+
/**
|
|
196
|
+
* Delete cached export image
|
|
197
|
+
* @memberof uiStateActions
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
export declare const cleanupExportImage: () => {
|
|
201
|
+
type: typeof ActionTypes.CLEANUP_EXPORT_IMAGE;
|
|
202
|
+
};
|
|
203
|
+
/** SET_EXPORT_SELECTED_DATASET */
|
|
204
|
+
export declare type SetExportSelectedDatasetUpdaterAction = {
|
|
205
|
+
payload: string;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Set selected dataset for export
|
|
209
|
+
* @memberof uiStateActions
|
|
210
|
+
* @param datasetId - dataset id
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
213
|
+
export declare const setExportSelectedDataset: (datasetId: SetExportSelectedDatasetUpdaterAction['payload']) => Merge<SetExportSelectedDatasetUpdaterAction, {
|
|
214
|
+
type: typeof ActionTypes.SET_EXPORT_SELECTED_DATASET;
|
|
215
|
+
}>;
|
|
216
|
+
/** SET_EXPORT_DATA_TYPE */
|
|
217
|
+
export declare type SetExportDataTypeUpdaterAction = {
|
|
218
|
+
payload: string;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Set data format for exporting data
|
|
222
|
+
* @memberof uiStateActions
|
|
223
|
+
* @param dataType - one of `'text/csv'`
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
export declare const setExportDataType: (dataType: SetExportDataTypeUpdaterAction['payload']) => Merge<SetExportDataTypeUpdaterAction, {
|
|
227
|
+
type: typeof ActionTypes.SET_EXPORT_DATA_TYPE;
|
|
228
|
+
}>;
|
|
229
|
+
/** SET_EXPORT_FILTERED */
|
|
230
|
+
export declare type SetExportFilteredUpdaterAction = {
|
|
231
|
+
payload: boolean;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Whether to export filtered data, `true` or `false`
|
|
235
|
+
* @memberof uiStateActions
|
|
236
|
+
* @param payload - set `true` to ony export filtered data
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
export declare const setExportFiltered: (exportFiltered: SetExportFilteredUpdaterAction['payload']) => Merge<SetExportFilteredUpdaterAction, {
|
|
240
|
+
type: typeof ActionTypes.SET_EXPORT_FILTERED;
|
|
241
|
+
}>;
|
|
242
|
+
/**
|
|
243
|
+
* Whether to including data in map config, toggle between `true` or `false`
|
|
244
|
+
* @memberof uiStateActions
|
|
245
|
+
* @public
|
|
246
|
+
*/
|
|
247
|
+
export declare const setExportData: () => {
|
|
248
|
+
type: typeof ActionTypes.SET_EXPORT_DATA;
|
|
249
|
+
};
|
|
250
|
+
/** SET_USER_MAPBOX_ACCESS_TOKEN */
|
|
251
|
+
export declare type SetUserMapboxAccessTokenUpdaterAction = {
|
|
252
|
+
payload: string;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Whether we export a mapbox access token used to create a single map html file
|
|
256
|
+
* @memberof uiStateActions
|
|
257
|
+
* @param payload - mapbox access token
|
|
258
|
+
* @public
|
|
259
|
+
*/
|
|
260
|
+
export declare const setUserMapboxAccessToken: (payload: SetUserMapboxAccessTokenUpdaterAction['payload']) => Merge<SetUserMapboxAccessTokenUpdaterAction, {
|
|
261
|
+
type: typeof ActionTypes.SET_USER_MAPBOX_ACCESS_TOKEN;
|
|
262
|
+
}>;
|
|
263
|
+
/** SET_EXPORT_MAP_FORMAT */
|
|
264
|
+
export declare type SetExportMapFormatUpdaterAction = {
|
|
265
|
+
payload: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Set the export map format (html, json)
|
|
269
|
+
* @memberOf uiStateActions
|
|
270
|
+
* @param payload - map format
|
|
271
|
+
* @public
|
|
272
|
+
*/
|
|
273
|
+
export declare const setExportMapFormat: (mapFormat: SetExportMapFormatUpdaterAction['payload']) => Merge<SetExportMapFormatUpdaterAction, {
|
|
274
|
+
type: typeof ActionTypes.SET_EXPORT_MAP_FORMAT;
|
|
275
|
+
}>;
|
|
276
|
+
/** SET_EXPORT_MAP_HTML_MODE */
|
|
277
|
+
export declare type SetExportHTMLMapModeUpdaterAction = {
|
|
278
|
+
payload: string;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Set the HTML mode to use to export HTML mode
|
|
282
|
+
* @memberOf uiStateActions
|
|
283
|
+
* @param payload - map mode
|
|
284
|
+
*/
|
|
285
|
+
export declare const setExportHTMLMapMode: (mode: SetExportHTMLMapModeUpdaterAction['payload']) => Merge<SetExportHTMLMapModeUpdaterAction, {
|
|
286
|
+
type: typeof ActionTypes.SET_EXPORT_MAP_HTML_MODE;
|
|
287
|
+
}>;
|
|
288
|
+
/** SET_LOCALE */
|
|
289
|
+
export declare type SetLocaleUpdaterAction = {
|
|
290
|
+
payload: {
|
|
291
|
+
locale: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Set `locale` value
|
|
296
|
+
* @memberof uiStateActions
|
|
297
|
+
* @param locale - locale of the UI
|
|
298
|
+
* @public
|
|
299
|
+
*/
|
|
300
|
+
export declare const setLocale: (locale: SetLocaleUpdaterAction['payload']['locale']) => Merge<SetLocaleUpdaterAction, {
|
|
301
|
+
type: typeof ActionTypes.SET_LOCALE;
|
|
302
|
+
}>;
|
|
303
|
+
/** TOGGLE_PANEL_LIST_VIEW */
|
|
304
|
+
export declare type TogglePanelListViewAction = {
|
|
305
|
+
payload: {
|
|
306
|
+
panelId: string;
|
|
307
|
+
listView: string;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* Toggle layer panel list view
|
|
312
|
+
* @memberof uiStateActions
|
|
313
|
+
* @param payload
|
|
314
|
+
* @param payload.panelId panel id.
|
|
315
|
+
* @param payload.listView layer panel listView value. Can be 'list' or 'sortByDataset'
|
|
316
|
+
* @public
|
|
317
|
+
*/
|
|
318
|
+
export declare const togglePanelListView: (payload: TogglePanelListViewAction['payload']) => Merge<TogglePanelListViewAction, {
|
|
319
|
+
type: typeof ActionTypes.TOGGLE_PANEL_LIST_VIEW;
|
|
320
|
+
}>;
|