@kepler.gl/actions 3.0.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.
@@ -0,0 +1,818 @@
1
+ import { default as ActionTypes } from './action-types';
2
+ import { FileCacheItem } from '@kepler.gl/processors';
3
+ import { Layer, LayerBaseConfig } from '@kepler.gl/layers';
4
+ import { AddDataToMapPayload, ValueOf, Merge, RGBColor, NestedPartial, LayerVisConfig, ColorUI, Feature, InteractionConfig } from '@kepler.gl/types';
5
+ export declare type LayerConfigChangeUpdaterAction = {
6
+ oldLayer: Layer;
7
+ newConfig: Partial<LayerBaseConfig>;
8
+ };
9
+ /**
10
+ * Update layer base config: dataId, label, column, isVisible
11
+ * @param oldLayer - layer to be updated
12
+ * @param newConfig - new config to be merged with old config
13
+ * @returns action
14
+ * @public
15
+ */
16
+ export declare function layerConfigChange(oldLayer: Layer, newConfig: Partial<LayerBaseConfig>): Merge<LayerConfigChangeUpdaterAction, {
17
+ type: typeof ActionTypes.LAYER_CONFIG_CHANGE;
18
+ }>;
19
+ export declare type LayerTextLabelChangeUpdaterAction = {
20
+ oldLayer: Layer;
21
+ idx: number | 'all';
22
+ prop: string;
23
+ value: any;
24
+ };
25
+ /**
26
+ * Update layer text label
27
+ * @param oldLayer - layer to be updated
28
+ * @param idx -`idx` of text label to be updated
29
+ * @param prop - `prop` of text label, e,g, `anchor`, `alignment`, `color`, `size`, `field`
30
+ * @param value - new value
31
+ * @returns action
32
+ * @public
33
+ */
34
+ export declare function layerTextLabelChange(oldLayer: Layer, idx: number | 'all', prop: string, value: any): Merge<LayerTextLabelChangeUpdaterAction, {
35
+ type: typeof ActionTypes.LAYER_TEXT_LABEL_CHANGE;
36
+ }>;
37
+ export declare type LayerTypeChangeUpdaterAction = {
38
+ oldLayer: Layer;
39
+ newType: string;
40
+ };
41
+ /**
42
+ * Update layer type. Previews layer config will be copied if applicable.
43
+ * @param oldLayer - layer to be updated
44
+ * @param newType - new type
45
+ * @returns action
46
+ * @public
47
+ */
48
+ export declare function layerTypeChange(oldLayer: Layer, newType: string): Merge<LayerTypeChangeUpdaterAction, {
49
+ type: typeof ActionTypes.LAYER_TYPE_CHANGE;
50
+ }>;
51
+ export declare type LayerVisualChannelConfigChangeUpdaterAction = {
52
+ oldLayer: Layer;
53
+ newConfig: Partial<LayerBaseConfig>;
54
+ channel: string;
55
+ };
56
+ /**
57
+ * Update layer visual channel
58
+ * @memberof visStateActions
59
+ * @param oldLayer - layer to be updated
60
+ * @param newConfig - new visual channel config
61
+ * @param channel - channel to be updated
62
+ * @returns action
63
+ * @public
64
+ */
65
+ export declare function layerVisualChannelConfigChange(oldLayer: Layer, newConfig: Partial<LayerBaseConfig>, channel: string): Merge<LayerVisualChannelConfigChangeUpdaterAction, {
66
+ type: typeof ActionTypes.LAYER_VISUAL_CHANNEL_CHANGE;
67
+ }>;
68
+ export declare type LayerVisConfigChangeUpdaterAction = {
69
+ oldLayer: Layer;
70
+ newVisConfig: Partial<LayerVisConfig>;
71
+ };
72
+ /**
73
+ * Update layer `visConfig`
74
+ * @memberof visStateActions
75
+ * @param oldLayer - layer to be updated
76
+ * @param newVisConfig - new visConfig as a key value map: e.g. `{opacity: 0.8}`
77
+ * @returns action
78
+ * @public
79
+ */
80
+ export declare function layerVisConfigChange(oldLayer: Layer, newVisConfig: Partial<LayerVisConfig>): Merge<LayerVisConfigChangeUpdaterAction, {
81
+ type: typeof ActionTypes.LAYER_VIS_CONFIG_CHANGE;
82
+ }>;
83
+ export declare type LayerColorUIChangeUpdaterAction = {
84
+ oldLayer: Layer;
85
+ prop: string;
86
+ newConfig: NestedPartial<ColorUI>;
87
+ };
88
+ /**
89
+ * Set the color palette ui for layer color
90
+ * @memberof visStateActions
91
+ * @param oldLayer - layer to be updated
92
+ * @param prop - which color prop
93
+ * @param newConfig - to be merged
94
+ * @returns action
95
+ * @public
96
+ */
97
+ export declare function layerColorUIChange(oldLayer: Layer, prop: string, newConfig: NestedPartial<ColorUI>): Merge<LayerColorUIChangeUpdaterAction, {
98
+ type: typeof ActionTypes.LAYER_COLOR_UI_CHANGE;
99
+ }>;
100
+ export declare type UpdateLayerBlendingUpdaterAction = {
101
+ mode: 'additive' | 'normal' | 'subtractive';
102
+ };
103
+ /**
104
+ * Update layer blending mode
105
+ * @memberof visStateActions
106
+ * @param mode one of `additive`, `normal` and `subtractive`
107
+ * @returns action
108
+ * @public
109
+ */
110
+ export declare function updateLayerBlending(mode: 'additive' | 'normal' | 'subtractive'): Merge<UpdateLayerBlendingUpdaterAction, {
111
+ type: typeof ActionTypes.UPDATE_LAYER_BLENDING;
112
+ }>;
113
+ export declare type InteractionConfigChangeUpdaterAction = {
114
+ config: ValueOf<InteractionConfig>;
115
+ };
116
+ /**
117
+ * Update `interactionConfig`
118
+ * @memberof visStateActions
119
+ * @param config - new config as key value map: `{tooltip: {enabled: true}}`
120
+ * @returns action
121
+ * @public
122
+ */
123
+ export declare function interactionConfigChange(config: ValueOf<InteractionConfig>): Merge<InteractionConfigChangeUpdaterAction, {
124
+ type: typeof ActionTypes.INTERACTION_CONFIG_CHANGE;
125
+ }>;
126
+ export declare type SetFilterUpdaterAction = {
127
+ idx: number;
128
+ prop: string;
129
+ value: any;
130
+ valueIndex?: number;
131
+ };
132
+ /**
133
+ * Update filter property
134
+ * @memberof visStateActions
135
+ * @param idx -`idx` of filter to be updated
136
+ * @param prop - `prop` of filter, e,g, `dataId`, `name`, `value`
137
+ * @param value - new value
138
+ * @param valueIndex - dataId index
139
+ * @returns action
140
+ * @public
141
+ */
142
+ export declare function setFilter(idx: number, prop: string, value: any, valueIndex?: number): Merge<SetFilterUpdaterAction, {
143
+ type: typeof ActionTypes.SET_FILTER;
144
+ }>;
145
+ export declare type SetFilterAnimationTimeUpdaterAction = {
146
+ idx: number;
147
+ prop: string;
148
+ value: any;
149
+ valueIndex?: number;
150
+ };
151
+ /**
152
+ * Same as Update filter
153
+ * @memberof visStateActions
154
+ * @param idx -`idx` of filter to be updated
155
+ * @param prop - `prop` of filter, e,g, `dataId`, `name`, `value`
156
+ * @param value - new value
157
+ * @param valueIndex - dataId index
158
+ * @returns action
159
+ * @public
160
+ */
161
+ export declare function setFilterAnimationTime(idx: number, prop: string, value: any, valueIndex?: number): Merge<SetFilterAnimationTimeUpdaterAction, {
162
+ type: typeof ActionTypes.SET_FILTER_ANIMATION_TIME;
163
+ }>;
164
+ export declare type SetFilterAnimationWindowUpdaterAction = {
165
+ id: string;
166
+ animationWindow: string;
167
+ };
168
+ /**
169
+ * Same as Update filter
170
+ * @memberof visStateActions
171
+ * @public
172
+ */
173
+ export declare function setFilterAnimationWindow({ id, animationWindow }: SetFilterAnimationWindowUpdaterAction): Merge<SetFilterAnimationWindowUpdaterAction, {
174
+ type: typeof ActionTypes.SET_FILTER_ANIMATION_WINDOW;
175
+ }>;
176
+ export declare type AddFilterUpdaterAction = {
177
+ dataId?: string | null;
178
+ };
179
+ /**
180
+ * Add a new filter
181
+ * @memberof visStateActions
182
+ * @param dataId - dataset `id` this new filter is associated with
183
+ * @returns action
184
+ * @public
185
+ */
186
+ export declare function addFilter(dataId: string | null): Merge<AddFilterUpdaterAction, {
187
+ type: typeof ActionTypes.ADD_FILTER;
188
+ }>;
189
+ export declare type AddLayerUpdaterAction = {
190
+ config?: object;
191
+ datasetId?: string;
192
+ };
193
+ /**
194
+ * Add a new layer
195
+ * @memberof visStateActions
196
+ * @param config - new layer config
197
+ * @param datasetId - dataset id used for creating an empty layer
198
+ * @returns action
199
+ * @public
200
+ */
201
+ export declare function addLayer(config?: object, datasetId?: string): Merge<AddLayerUpdaterAction, {
202
+ type: typeof ActionTypes.ADD_LAYER;
203
+ }>;
204
+ export declare type ReorderLayerUpdaterAction = {
205
+ order: number[];
206
+ };
207
+ /**
208
+ * Reorder layer, order is an array of layer indexes, index 0 will be the one at the bottom
209
+ * @memberof visStateActions
210
+ * @param order an array of layer indexes
211
+ * @returns action
212
+ * @public
213
+ * @example
214
+ *
215
+ * // bring `layers[1]` below `layers[0]`, the sequence layers will be rendered is `1`, `0`, `2`, `3`.
216
+ * // `1` will be at the bottom, `3` will be at the top.
217
+ * this.props.dispatch(reorderLayer([1, 0, 2, 3]));
218
+ */
219
+ export declare function reorderLayer(order: number[]): Merge<ReorderLayerUpdaterAction, {
220
+ type: typeof ActionTypes.REORDER_LAYER;
221
+ }>;
222
+ export declare type RemoveFilterUpdaterAction = {
223
+ idx: number;
224
+ };
225
+ /**
226
+ * Remove a filter from `visState.filters`, once a filter is removed, data will be re-filtered and layer will be updated
227
+ * @memberof visStateActions
228
+ * @param idx idx of filter to be removed
229
+ * @returns action
230
+ * @public
231
+ */
232
+ export declare function removeFilter(idx: number): Merge<RemoveFilterUpdaterAction, {
233
+ type: typeof ActionTypes.REMOVE_FILTER;
234
+ }>;
235
+ export declare type RemoveLayerUpdaterAction = {
236
+ idx: number;
237
+ };
238
+ /**
239
+ * Remove a layer
240
+ * @memberof visStateActions
241
+ * @param idx idx of layer to be removed
242
+ * @returns action
243
+ * @public
244
+ */
245
+ export declare function removeLayer(idx: number): Merge<RemoveLayerUpdaterAction, {
246
+ type: typeof ActionTypes.REMOVE_LAYER;
247
+ }>;
248
+ export declare type DuplicateLayerUpdaterAction = {
249
+ idx: number;
250
+ };
251
+ /**
252
+ * Duplicate a layer
253
+ * @memberof visStateActions
254
+ * @param idx idx of layer to be duplicated
255
+ * @returns action
256
+ * @public
257
+ */
258
+ export declare function duplicateLayer(idx: number): Merge<DuplicateLayerUpdaterAction, {
259
+ type: typeof ActionTypes.DUPLICATE_LAYER;
260
+ }>;
261
+ export declare type RemoveDatasetUpdaterAction = {
262
+ dataId: string;
263
+ };
264
+ /**
265
+ * Remove a dataset and all layers, filters, tooltip configs that based on it
266
+ * @memberof visStateActions
267
+ * @param dataId dataset id
268
+ * @returns action
269
+ * @public
270
+ */
271
+ export declare function removeDataset(dataId: string): Merge<RemoveDatasetUpdaterAction, {
272
+ type: typeof ActionTypes.REMOVE_DATASET;
273
+ }>;
274
+ export declare type ShowDatasetTableUpdaterAction = {
275
+ dataId: string;
276
+ };
277
+ /**
278
+ * Display dataset table in a modal
279
+ * @memberof visStateActions
280
+ * @param dataId dataset id to show in table
281
+ * @returns action
282
+ * @public
283
+ */
284
+ export declare function showDatasetTable(dataId: string): Merge<ShowDatasetTableUpdaterAction, {
285
+ type: typeof ActionTypes.SHOW_DATASET_TABLE;
286
+ }>;
287
+ export declare type UpdateDatasetColorUpdater = {
288
+ dataId: string;
289
+ newColor: RGBColor;
290
+ };
291
+ /**
292
+ * Update dataset color to custom by means of color picker
293
+ * @memberof visStateActions
294
+ * @param dataId dataset `id` this custom color is associated with
295
+ * @param newColor custom color in RGBformat
296
+ * @returns action
297
+ * @public
298
+ */
299
+ export declare function updateTableColor(dataId: string, newColor: RGBColor): Merge<UpdateDatasetColorUpdater, {
300
+ type: typeof ActionTypes.UPDATE_TABLE_COLOR;
301
+ }>;
302
+ export declare type SortTableColumnUpdaterAction = {
303
+ dataId: string;
304
+ column: string;
305
+ mode?: string;
306
+ };
307
+ /**
308
+ * Sort dataset column, for table display
309
+ * @memberof visStateActions
310
+ * @param dataId
311
+ * @param column
312
+ * @param mode
313
+ * @returns action
314
+ * @public
315
+ */
316
+ export declare function sortTableColumn(dataId: string, column: string, mode?: string): Merge<SortTableColumnUpdaterAction, {
317
+ type: typeof ActionTypes.SORT_TABLE_COLUMN;
318
+ }>;
319
+ export declare type PinTableColumnUpdaterAction = {
320
+ dataId: string;
321
+ column: string;
322
+ };
323
+ /**
324
+ * Pin dataset column, for table display
325
+ * @param dataId
326
+ * @param column
327
+ * @returns action
328
+ * @public
329
+ */
330
+ export declare function pinTableColumn(dataId: string, column: string): Merge<PinTableColumnUpdaterAction, {
331
+ type: typeof ActionTypes.PIN_TABLE_COLUMN;
332
+ }>;
333
+ export declare type CopyTableColumnUpdaterAction = {
334
+ dataId: string;
335
+ column: string;
336
+ };
337
+ /**
338
+ * Copy column, for table display
339
+ * @param dataId
340
+ * @param column
341
+ * @returns action
342
+ * @public
343
+ */
344
+ export declare function copyTableColumn(dataId: string, column: string): Merge<CopyTableColumnUpdaterAction, {
345
+ type: typeof ActionTypes.COPY_TABLE_COLUMN;
346
+ }>;
347
+ export declare type AddDataToMapUpdaterOptions = {
348
+ centrMap?: boolean;
349
+ readOnly?: boolean;
350
+ keepExistingConfig?: boolean;
351
+ };
352
+ export declare type UpdateVisDataUpdaterAction = {
353
+ datasets: AddDataToMapPayload['datasets'];
354
+ options: AddDataToMapPayload['options'];
355
+ config?: AddDataToMapPayload['config'];
356
+ } & AddDataToMapPayload;
357
+ /**
358
+ * Add new dataset to `visState`, with option to load a map config along with the datasets
359
+ * @memberof visStateActions
360
+ * @param datasets - ***required** datasets can be a dataset or an array of datasets
361
+ * Each dataset object needs to have `info` and `data` property.
362
+ * @param {object} options
363
+ * @param options.centerMap `default: true` if `centerMap` is set to `true` kepler.gl will
364
+ * place the map view within the data points boundaries
365
+ * @param options.readOnly `default: false` if `readOnly` is set to `true`
366
+ * the left setting panel will be hidden
367
+ * @param config this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}
368
+ * @returns action
369
+ * @public
370
+ */
371
+ export declare function updateVisData(datasets: AddDataToMapPayload['datasets'], options: AddDataToMapPayload['options'], config?: AddDataToMapPayload['config']): Merge<UpdateVisDataUpdaterAction, {
372
+ type: typeof ActionTypes.UPDATE_VIS_DATA;
373
+ }>;
374
+ export declare type RenameDatasetUpdaterAction = {
375
+ dataId: string;
376
+ label: string;
377
+ };
378
+ /**
379
+ * Rename an existing dataset in `visState`
380
+ * @memberof visStateActions
381
+ * @param dataId - ***required** Id of the dataset to update
382
+ * @param label - ***required** New name for the dataset
383
+ * @returns action
384
+ * @public
385
+ */
386
+ export declare function renameDataset(dataId: string, label: string): Merge<RenameDatasetUpdaterAction, {
387
+ type: typeof ActionTypes.RENAME_DATASET;
388
+ }>;
389
+ export declare type ToggleFilterAnimationUpdaterAction = {
390
+ idx: number;
391
+ };
392
+ /**
393
+ * Start and end filter animation
394
+ * @memberof visStateActions
395
+ * @param {Number} idx of filter
396
+ * @returns action
397
+ * @public
398
+ */
399
+ export declare function toggleFilterAnimation(idx: number): Merge<ToggleFilterAnimationUpdaterAction, {
400
+ type: typeof ActionTypes.TOGGLE_FILTER_ANIMATION;
401
+ }>;
402
+ export declare type UpdateFilterAnimationSpeedUpdaterAction = {
403
+ idx: number;
404
+ speed: number;
405
+ };
406
+ /**
407
+ * Change filter animation speed
408
+ * @memberof visStateActions
409
+ * @param idx - `idx` of filter
410
+ * @param speed - `speed` to change it to. `speed` is a multiplier
411
+ * @returns action
412
+ * @public
413
+ */
414
+ export declare function updateFilterAnimationSpeed(idx: number, speed: number): Merge<UpdateFilterAnimationSpeedUpdaterAction, {
415
+ type: typeof ActionTypes.UPDATE_FILTER_ANIMATION_SPEED;
416
+ }>;
417
+ export declare type SetLayerAnimationTimeUpdaterAction = {
418
+ value: number;
419
+ };
420
+ /**
421
+ * Reset animation
422
+ * @memberof visStateActions
423
+ * @param value - Current value of the slider
424
+ * @returns action
425
+ * @public
426
+ */
427
+ export declare function setLayerAnimationTime(value: number): Merge<SetLayerAnimationTimeUpdaterAction, {
428
+ type: typeof ActionTypes.SET_LAYER_ANIMATION_TIME;
429
+ }>;
430
+ export declare type UpdateLayerAnimationSpeedUpdaterAction = {
431
+ speed: number;
432
+ };
433
+ /**
434
+ * update trip layer animation speed
435
+ * @memberof visStateActions
436
+ * @param speed - `speed` to change it to. `speed` is a multiplier
437
+ * @returns action
438
+ * @public
439
+ */
440
+ export declare function updateLayerAnimationSpeed(speed: number): Merge<UpdateLayerAnimationSpeedUpdaterAction, {
441
+ type: typeof ActionTypes.UPDATE_LAYER_ANIMATION_SPEED;
442
+ }>;
443
+ export declare type ToggleLayerAnimationUpdaterAction = {};
444
+ /**
445
+ * start end end layer animation
446
+ * @memberof visStateActions
447
+ * @returns action
448
+ * @public
449
+ */
450
+ export declare function toggleLayerAnimation(): Merge<ToggleLayerAnimationUpdaterAction, {
451
+ type: typeof ActionTypes.TOGGLE_LAYER_ANIMATION;
452
+ }>;
453
+ export declare type ToggleLayerAnimationControlUpdaterAction = {};
454
+ /**
455
+ * hide and show layer animation control
456
+ * @memberof visStateActions
457
+ * @returns action
458
+ * @public
459
+ */
460
+ export declare function toggleLayerAnimationControl(): Merge<ToggleLayerAnimationControlUpdaterAction, {
461
+ type: typeof ActionTypes.TOGGLE_LAYER_ANIMATION_CONTROL;
462
+ }>;
463
+ export declare type EnlargeFilterUpdaterAction = {
464
+ idx: number;
465
+ };
466
+ /**
467
+ * Show larger time filter at bottom for time playback (apply to time filter only)
468
+ * @memberof visStateActions
469
+ * @param idx - index of filter to enlarge
470
+ * @returns action
471
+ * @public
472
+ */
473
+ export declare function enlargeFilter(idx: number): Merge<EnlargeFilterUpdaterAction, {
474
+ type: typeof ActionTypes.ENLARGE_FILTER;
475
+ }>;
476
+ export declare type ToggleFilterFeatureUpdaterAction = {
477
+ idx: number;
478
+ };
479
+ /**
480
+ * Show/hide filter feature on map
481
+ * @memberof visStateActions
482
+ * @param idx - index of filter feature to show/hide
483
+ * @return action
484
+ */
485
+ export declare function toggleFilterFeature(idx: number): Merge<ToggleFilterFeatureUpdaterAction, {
486
+ type: typeof ActionTypes.TOGGLE_FILTER_FEATURE;
487
+ }>;
488
+ export declare type OnLayerHoverUpdaterAction = {
489
+ info: {
490
+ picked?: boolean;
491
+ } | null;
492
+ };
493
+ /**
494
+ * Trigger layer hover event with hovered object
495
+ * @memberof visStateActions
496
+ * @param info - Object hovered, returned by deck.gl
497
+ * @returns action
498
+ * @public
499
+ */
500
+ export declare function onLayerHover(info: {
501
+ picked?: boolean;
502
+ } | null): Merge<OnLayerHoverUpdaterAction, {
503
+ type: typeof ActionTypes.LAYER_HOVER;
504
+ }>;
505
+ export declare type OnLayerClickUpdaterAction = {
506
+ info: {
507
+ picked?: boolean;
508
+ } | null;
509
+ };
510
+ /**
511
+ * Trigger layer click event with clicked object
512
+ * @memberof visStateActions
513
+ * @param info - Object clicked, returned by deck.gl
514
+ * @returns action
515
+ * @public
516
+ */
517
+ export declare function onLayerClick(info: {
518
+ picked?: boolean;
519
+ } | null): Merge<OnLayerClickUpdaterAction, {
520
+ type: typeof ActionTypes.LAYER_CLICK;
521
+ }>;
522
+ export declare type OnMapClickUpdaterAction = {};
523
+ /**
524
+ * Trigger map click event, unselect clicked object
525
+ * @memberof visStateActions
526
+ * @returns action
527
+ * @public
528
+ */
529
+ export declare function onMapClick(): Merge<OnMapClickUpdaterAction, {
530
+ type: typeof ActionTypes.MAP_CLICK;
531
+ }>;
532
+ export declare type OnMouseMoveUpdaterAction = {
533
+ evt: any;
534
+ };
535
+ /**
536
+ * Trigger map mouse moveevent, payload would be
537
+ * React-map-gl PointerEvent
538
+ * https://uber.github.io/react-map-gl/#/documentation/api-reference/pointer-event
539
+ *
540
+ * @memberof visStateActions
541
+ * @param evt - PointerEvent
542
+ * @returns action
543
+ * @public
544
+ */
545
+ export declare function onMouseMove(evt: any): Merge<OnMouseMoveUpdaterAction, {
546
+ type: typeof ActionTypes.MOUSE_MOVE;
547
+ }>;
548
+ export declare type ToggleLayerForMapUpdaterAction = {
549
+ mapIndex: number;
550
+ layerId: string;
551
+ };
552
+ /**
553
+ * Toggle visibility of a layer in a split map
554
+ * @memberof visStateActions
555
+ * @param mapIndex - index of the split map
556
+ * @param layerId - id of the layer
557
+ * @returns action
558
+ * @public
559
+ */
560
+ export declare function toggleLayerForMap(mapIndex: number, layerId: string): Merge<ToggleLayerForMapUpdaterAction, {
561
+ type: typeof ActionTypes.TOGGLE_LAYER_FOR_MAP;
562
+ }>;
563
+ export declare type SetFilterPlotUpdaterAction = {
564
+ idx: number;
565
+ newProp: object;
566
+ valueIndex?: number;
567
+ };
568
+ /**
569
+ * Set the property of a filter plot
570
+ * @memberof visStateActions
571
+ * @param idx
572
+ * @param newProp key value mapping of new prop `{yAxis: 'histogram'}`
573
+ * @param valueIndex dataId index
574
+ * @returns action
575
+ * @public
576
+ */
577
+ export declare function setFilterPlot(idx: number, newProp: object, valueIndex?: number): Merge<SetFilterPlotUpdaterAction, {
578
+ type: typeof ActionTypes.SET_FILTER_PLOT;
579
+ }>;
580
+ export declare type SetMapInfoUpdaterAction = {
581
+ info: any;
582
+ };
583
+ /**
584
+ * Set the property of a filter plot
585
+ * @memberof visStateActions
586
+ * @param info
587
+ * @returns action
588
+ * @public
589
+ */
590
+ export declare function setMapInfo(info: any): Merge<SetMapInfoUpdaterAction, {
591
+ type: typeof ActionTypes.SET_MAP_INFO;
592
+ }>;
593
+ export declare type LoadFilesUpdaterAction = {
594
+ files: File[];
595
+ onFinish?(result: any): any;
596
+ };
597
+ /**
598
+ * Trigger file loading dispatch `addDataToMap` if succeed, or `loadFilesErr` if failed
599
+ * @memberof visStateActions
600
+ * @param files array of fileblob
601
+ * @returns action
602
+ * @public
603
+ */
604
+ export declare function loadFiles(files: File[], onFinish?: (result: any) => any): Merge<LoadFilesUpdaterAction, {
605
+ type: typeof ActionTypes.LOAD_FILES;
606
+ }>;
607
+ /**
608
+ * Called with next file to load
609
+ * @memberof visStateActions
610
+ * @returns action
611
+ * @public
612
+ */
613
+ export declare function loadNextFile(): {
614
+ type: typeof ActionTypes.LOAD_NEXT_FILE;
615
+ };
616
+ export declare type loadFilesSuccessUpdaterAction = {
617
+ result: FileCacheItem[];
618
+ };
619
+ /**
620
+ * called when all files are processed and loaded
621
+ * @memberof visStateActions
622
+ * @param result
623
+ * @returns action
624
+ */
625
+ export declare function loadFilesSuccess(result: FileCacheItem[]): Merge<loadFilesSuccessUpdaterAction, {
626
+ type: typeof ActionTypes.LOAD_FILES_SUCCESS;
627
+ }>;
628
+ export declare type LoadFileStepSuccessAction = {
629
+ fileName: string;
630
+ fileCache: FileCacheItem[];
631
+ };
632
+ /**
633
+ * called when successfully loaded one file, ready to move on to the next one
634
+ * @memberof visStateActions
635
+ * @param result
636
+ * @returns action
637
+ */
638
+ export declare function loadFileStepSuccess({ fileName, fileCache }: {
639
+ fileName: string;
640
+ fileCache: FileCacheItem[];
641
+ }): Merge<LoadFileStepSuccessAction, {
642
+ type: typeof ActionTypes.LOAD_FILE_STEP_SUCCESS;
643
+ }>;
644
+ export declare type LoadFilesErrUpdaterAction = {
645
+ fileName: string;
646
+ error: any;
647
+ };
648
+ /**
649
+ * Trigger loading file error
650
+ * @memberof visStateActions
651
+ * @param error
652
+ * @returns action
653
+ * @public
654
+ */
655
+ export declare function loadFilesErr(fileName: string, error: any): Merge<LoadFilesErrUpdaterAction, {
656
+ type: typeof ActionTypes.LOAD_FILES_ERR;
657
+ }>;
658
+ export declare type SetFeaturesUpdaterAction = {
659
+ features: Feature[];
660
+ };
661
+ /**
662
+ * Store features to state
663
+ * @memberof visStateActions
664
+ * @param features
665
+ * @returns action
666
+ */
667
+ export declare function setFeatures(features: Feature[]): Merge<SetFeaturesUpdaterAction, {
668
+ type: typeof ActionTypes.SET_FEATURES;
669
+ }>;
670
+ export declare type SetPolygonFilterLayerUpdaterAction = {
671
+ layer: Layer;
672
+ feature: Feature;
673
+ };
674
+ /**
675
+ * It will apply the provide feature as filter to the given layer.
676
+ * If the given feature is already applied as filter to the layer, it will remove the layer from the filter
677
+ * @memberof visStateActions
678
+ * @param layer
679
+ * @param feature
680
+ * @returns action
681
+ */
682
+ export declare function setPolygonFilterLayer(layer: Layer, feature: Feature): Merge<SetPolygonFilterLayerUpdaterAction, {
683
+ type: typeof ActionTypes.SET_POLYGON_FILTER_LAYER;
684
+ }>;
685
+ export declare type SetSelectedFeatureUpdaterAction = {
686
+ feature: Feature;
687
+ };
688
+ /**
689
+ * Set the current feature to be edited/deleted
690
+ * @memberof visStateActions
691
+ * @param feature
692
+ * @returns action
693
+ */
694
+ export declare function setSelectedFeature(feature: Feature): Merge<SetSelectedFeatureUpdaterAction, {
695
+ type: typeof ActionTypes.SET_SELECTED_FEATURE;
696
+ }>;
697
+ export declare type DeleteFeatureUpdaterAction = {
698
+ feature: Feature;
699
+ };
700
+ /**
701
+ * Delete the given feature
702
+ * @memberof visStateActions
703
+ * @param feature
704
+ * @returns action
705
+ */
706
+ export declare function deleteFeature(feature: Feature): Merge<DeleteFeatureUpdaterAction, {
707
+ type: typeof ActionTypes.DELETE_FEATURE;
708
+ }>;
709
+ export declare type SetEditorModeUpdaterAction = {
710
+ mode: string;
711
+ };
712
+ /** Set the map mode
713
+ * @memberof visStateActions
714
+ * @param mode one of EDITOR_MODES
715
+ * @returns action
716
+ * @public
717
+ * @example
718
+ * import {setMapMode} from 'kepler.gl/actions';
719
+ * import {EDITOR_MODES} from 'kepler.gl/constants';
720
+ *
721
+ * this.props.dispatch(setMapMode(EDITOR_MODES.DRAW_POLYGON));
722
+ */
723
+ export declare function setEditorMode(mode: string): Merge<SetEditorModeUpdaterAction, {
724
+ type: typeof ActionTypes.SET_EDITOR_MODE;
725
+ }>;
726
+ export declare type ApplyCPUFilterUpdaterAction = {
727
+ dataId: string | string[];
728
+ };
729
+ /**
730
+ * Trigger CPU filter of selected dataset
731
+ * @memberof visStateActions
732
+ * @param dataId - single dataId or an array of dataIds
733
+ * @returns action
734
+ * @public
735
+ */
736
+ export declare function applyCPUFilter(dataId: string | string[]): Merge<ApplyCPUFilterUpdaterAction, {
737
+ type: typeof ActionTypes.APPLY_CPU_FILTER;
738
+ }>;
739
+ export declare type ToggleEditorVisibilityUpdaterAction = {};
740
+ /**
741
+ * Toggle editor layer visibility
742
+ * @memberof visStateActions
743
+ * @return action
744
+ */
745
+ export declare function toggleEditorVisibility(): Merge<ToggleEditorVisibilityUpdaterAction, {
746
+ type: typeof ActionTypes.TOGGLE_EDITOR_VISIBILITY;
747
+ }>;
748
+ declare type FileContent = {
749
+ fileName: string;
750
+ header: string[];
751
+ data: any;
752
+ };
753
+ export declare type NextFileBatchUpdaterAction = {
754
+ payload: {
755
+ gen: AsyncGenerator<FileContent>;
756
+ fileName: string;
757
+ progress?: any;
758
+ accumulated?: any;
759
+ onFinish: (result: any) => any;
760
+ };
761
+ };
762
+ /**
763
+ * Process the next file batch
764
+ * @memberof visStateActions
765
+ * @param payload - batch payload
766
+ * @return action
767
+ */
768
+ export declare function nextFileBatch(payload: NextFileBatchUpdaterAction['payload']): Merge<NextFileBatchUpdaterAction, {
769
+ type: typeof ActionTypes.NEXT_FILE_BATCH;
770
+ }>;
771
+ export declare type ProcessFileContentUpdaterAction = {
772
+ payload: {
773
+ content: FileContent;
774
+ fileCache: FileCacheItem[];
775
+ };
776
+ };
777
+ /**
778
+ * Process the file content
779
+ * @memberof visStateActions
780
+ * @param payload - the file content
781
+ * @return action
782
+ */
783
+ export declare function processFileContent(payload: ProcessFileContentUpdaterAction['payload']): Merge<ProcessFileContentUpdaterAction, {
784
+ type: typeof ActionTypes.PROCESS_FILE_CONTENT;
785
+ }>;
786
+ export declare type SetLayerAnimationTimeConfigAction = {
787
+ config: {
788
+ timezone?: string;
789
+ timeFormat?: string;
790
+ };
791
+ };
792
+ /**
793
+ * Set layer animation time format and timezone
794
+ * @memberof visStateActions
795
+ * @param config - {timeFormat: string, timezone: string}
796
+ * @return action
797
+ */
798
+ export declare function setLayerAnimationTimeConfig(config: SetLayerAnimationTimeConfigAction['config']): Merge<SetLayerAnimationTimeConfigAction, {
799
+ type: typeof ActionTypes.SET_LAYER_ANIMATION_TIME_CONFIG;
800
+ }>;
801
+ export declare type SetFilterAnimationTimeConfigAction = {
802
+ idx: number;
803
+ config: {
804
+ timezone?: string;
805
+ timeFormat?: string;
806
+ };
807
+ };
808
+ /**
809
+ * Set Filter animation time format and timezone
810
+ * @memberof visStateActions
811
+ * @param idx
812
+ * @param config
813
+ * @return action
814
+ */
815
+ export declare function setFilterAnimationTimeConfig(idx: SetFilterAnimationTimeConfigAction['idx'], config: SetFilterAnimationTimeConfigAction['config']): Merge<SetFilterAnimationTimeConfigAction, {
816
+ type: typeof ActionTypes.SET_FILTER_ANIMATION_TIME_CONFIG;
817
+ }>;
818
+ export {};