@kepler.gl/reducers 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.
- package/dist/combined-updaters.d.ts +50 -0
- package/dist/combined-updaters.js +212 -0
- package/dist/composer-helpers.d.ts +21 -0
- package/dist/composer-helpers.js +133 -0
- package/dist/composers.d.ts +12 -0
- package/dist/composers.js +47 -0
- package/dist/core.d.ts +64 -0
- package/dist/core.js +149 -0
- package/dist/data-utils.d.ts +8 -0
- package/dist/data-utils.js +60 -0
- package/dist/export-utils.d.ts +21 -0
- package/dist/export-utils.js +124 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +372 -0
- package/dist/interaction-utils.d.ts +35 -0
- package/dist/interaction-utils.js +149 -0
- package/dist/layer-utils.d.ts +66 -0
- package/dist/layer-utils.js +289 -0
- package/dist/map-state-updaters.d.ts +62 -0
- package/dist/map-state-updaters.js +250 -0
- package/dist/map-state.d.ts +3 -0
- package/dist/map-state.js +67 -0
- package/dist/map-style-updaters.d.ts +173 -0
- package/dist/map-style-updaters.js +538 -0
- package/dist/map-style.d.ts +4 -0
- package/dist/map-style.js +66 -0
- package/dist/middleware.d.ts +8 -0
- package/dist/middleware.js +46 -0
- package/dist/provider-state-updaters.d.ts +42 -0
- package/dist/provider-state-updaters.js +512 -0
- package/dist/provider-state.d.ts +4 -0
- package/dist/provider-state.js +66 -0
- package/dist/root.d.ts +31 -0
- package/dist/root.js +235 -0
- package/dist/ui-state-updaters.d.ts +355 -0
- package/dist/ui-state-updaters.js +866 -0
- package/dist/ui-state.d.ts +3 -0
- package/dist/ui-state.js +68 -0
- package/dist/vis-state-merger.d.ts +102 -0
- package/dist/vis-state-merger.js +635 -0
- package/dist/vis-state-selectors.d.ts +2 -0
- package/dist/vis-state-selectors.js +53 -0
- package/dist/vis-state-updaters.d.ts +419 -0
- package/dist/vis-state-updaters.js +2472 -0
- package/dist/vis-state.d.ts +3 -0
- package/dist/vis-state.js +66 -0
- package/package.json +83 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright (c) 2022 Uber Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
// in the Software without restriction, including without limitation the rights
|
|
6
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
// furnished to do so, subject to the following conditions:
|
|
9
|
+
//
|
|
10
|
+
// The above copyright notice and this permission notice shall be included in
|
|
11
|
+
// all copies or substantial portions of the Software.
|
|
12
|
+
//
|
|
13
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
// THE SOFTWARE.
|
|
20
|
+
|
|
21
|
+
"use strict";
|
|
22
|
+
|
|
23
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, "__esModule", {
|
|
26
|
+
value: true
|
|
27
|
+
});
|
|
28
|
+
exports.getFileExtensions = exports.getFileFormatNames = void 0;
|
|
29
|
+
|
|
30
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
31
|
+
|
|
32
|
+
var _reselect = require("reselect");// NOTE: default formats must match file-handler-test.js
|
|
33
|
+
var DEFAULT_FILE_EXTENSIONS = ['csv', 'json', 'geojson'];
|
|
34
|
+
var DEFAULT_FILE_FORMATS = ['CSV', 'Json', 'GeoJSON'];
|
|
35
|
+
var getFileFormatNames = (0, _reselect.createSelector)( // @ts-expect-error
|
|
36
|
+
function (state) {
|
|
37
|
+
return state.loaders;
|
|
38
|
+
}, function (loaders) {
|
|
39
|
+
return [].concat(DEFAULT_FILE_FORMATS, (0, _toConsumableArray2["default"])(loaders.map(function (loader) {
|
|
40
|
+
return loader.name;
|
|
41
|
+
})));
|
|
42
|
+
});
|
|
43
|
+
exports.getFileFormatNames = getFileFormatNames;
|
|
44
|
+
var getFileExtensions = (0, _reselect.createSelector)( // @ts-expect-error
|
|
45
|
+
function (state) {
|
|
46
|
+
return state.loaders;
|
|
47
|
+
}, function (loaders) {
|
|
48
|
+
return [].concat(DEFAULT_FILE_EXTENSIONS, (0, _toConsumableArray2["default"])(loaders.flatMap(function (loader) {
|
|
49
|
+
return loader.extensions;
|
|
50
|
+
})));
|
|
51
|
+
});
|
|
52
|
+
exports.getFileExtensions = getFileExtensions;
|
|
53
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92aXMtc3RhdGUtc2VsZWN0b3JzLnRzIl0sIm5hbWVzIjpbIkRFRkFVTFRfRklMRV9FWFRFTlNJT05TIiwiREVGQVVMVF9GSUxFX0ZPUk1BVFMiLCJnZXRGaWxlRm9ybWF0TmFtZXMiLCJzdGF0ZSIsImxvYWRlcnMiLCJtYXAiLCJsb2FkZXIiLCJuYW1lIiwiZ2V0RmlsZUV4dGVuc2lvbnMiLCJmbGF0TWFwIiwiZXh0ZW5zaW9ucyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFvQkE7O0FBcEJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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cnMuZmxhdE1hcChsb2FkZXIgPT4gbG9hZGVyLmV4dGVuc2lvbnMpXVxuKTtcbiJdfQ==
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { ReceiveMapConfigPayload, VisStateActions, MapStateActions, ActionTypes } from '@kepler.gl/actions';
|
|
2
|
+
import { Layer } from '@kepler.gl/layers';
|
|
3
|
+
import { VisState } from '@kepler.gl/schemas';
|
|
4
|
+
import { Filter, InteractionConfig, AnimationConfig, Editor } from '@kepler.gl/types';
|
|
5
|
+
import { Loader } from '@loaders.gl/loader-utils';
|
|
6
|
+
import { Datasets } from '@kepler.gl/table';
|
|
7
|
+
export declare const defaultInteractionConfig: InteractionConfig;
|
|
8
|
+
export declare const DEFAULT_ANIMATION_CONFIG: AnimationConfig;
|
|
9
|
+
export declare const DEFAULT_EDITOR: Editor;
|
|
10
|
+
/**
|
|
11
|
+
* Default initial `visState`
|
|
12
|
+
* @memberof visStateUpdaters
|
|
13
|
+
* @constant
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare const INITIAL_VIS_STATE: VisState;
|
|
17
|
+
/**
|
|
18
|
+
* Update state with updated layer and layerData
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare function updateStateWithLayerAndData(state: VisState, { layerData, layer, idx }: {
|
|
22
|
+
layerData?: any;
|
|
23
|
+
layer: Layer;
|
|
24
|
+
idx: number;
|
|
25
|
+
}): VisState;
|
|
26
|
+
export declare function updateStateOnLayerVisibilityChange<S extends VisState>(state: S, layer: Layer): S;
|
|
27
|
+
/**
|
|
28
|
+
* Update layer base config: dataId, label, column, isVisible
|
|
29
|
+
* @memberof visStateUpdaters
|
|
30
|
+
* @returns nextState
|
|
31
|
+
*/
|
|
32
|
+
export declare function layerConfigChangeUpdater(state: VisState, action: VisStateActions.LayerConfigChangeUpdaterAction): VisState;
|
|
33
|
+
/**
|
|
34
|
+
* Update layer base config: dataId, label, column, isVisible
|
|
35
|
+
* @memberof visStateUpdaters
|
|
36
|
+
* @returns nextState
|
|
37
|
+
*/
|
|
38
|
+
export declare function layerTextLabelChangeUpdater(state: VisState, action: VisStateActions.LayerTextLabelChangeUpdaterAction): VisState;
|
|
39
|
+
/**
|
|
40
|
+
* Update layer config dataId
|
|
41
|
+
* @memberof visStateUpdaters
|
|
42
|
+
* @returns nextState
|
|
43
|
+
*/
|
|
44
|
+
export declare function layerDataIdChangeUpdater(state: VisState, action: {
|
|
45
|
+
oldLayer: Layer;
|
|
46
|
+
newConfig: {
|
|
47
|
+
dataId: string;
|
|
48
|
+
};
|
|
49
|
+
}): VisState;
|
|
50
|
+
/**
|
|
51
|
+
* Update layer type. Previews layer config will be copied if applicable.
|
|
52
|
+
* @memberof visStateUpdaters
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export declare function layerTypeChangeUpdater(state: VisState, action: VisStateActions.LayerTypeChangeUpdaterAction): VisState;
|
|
56
|
+
/**
|
|
57
|
+
* Update layer visual channel
|
|
58
|
+
* @memberof visStateUpdaters
|
|
59
|
+
* @returns {Object} nextState
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export declare function layerVisualChannelChangeUpdater(state: VisState, action: VisStateActions.LayerVisualChannelConfigChangeUpdaterAction): VisState;
|
|
63
|
+
/**
|
|
64
|
+
* Update layer `visConfig`
|
|
65
|
+
* @memberof visStateUpdaters
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export declare function layerVisConfigChangeUpdater(state: VisState, action: VisStateActions.LayerVisConfigChangeUpdaterAction): VisState;
|
|
69
|
+
/**
|
|
70
|
+
* Update filter property
|
|
71
|
+
* @memberof visStateUpdaters
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export declare function setFilterAnimationTimeUpdater(state: VisState, action: VisStateActions.SetFilterAnimationTimeUpdaterAction): VisState;
|
|
75
|
+
/**
|
|
76
|
+
* Update filter animation window
|
|
77
|
+
* @memberof visStateUpdaters
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
export declare function setFilterAnimationWindowUpdater(state: VisState, { id, animationWindow }: VisStateActions.SetFilterAnimationWindowUpdaterAction): VisState;
|
|
81
|
+
/**
|
|
82
|
+
* Update filter property
|
|
83
|
+
* @memberof visStateUpdaters
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export declare function setFilterUpdater(state: VisState, action: VisStateActions.SetFilterUpdaterAction): VisState;
|
|
87
|
+
/**
|
|
88
|
+
* Set the property of a filter plot
|
|
89
|
+
* @memberof visStateUpdaters
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
export declare const setFilterPlotUpdater: (state: VisState, { idx, newProp, valueIndex }: VisStateActions.SetFilterPlotUpdaterAction) => VisState;
|
|
93
|
+
/**
|
|
94
|
+
* Add a new filter
|
|
95
|
+
* @memberof visStateUpdaters
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export declare const addFilterUpdater: (state: VisState, action: VisStateActions.AddFilterUpdaterAction) => VisState;
|
|
99
|
+
/**
|
|
100
|
+
* Set layer color palette ui state
|
|
101
|
+
* @memberof visStateUpdaters
|
|
102
|
+
*/
|
|
103
|
+
export declare const layerColorUIChangeUpdater: (state: VisState, { oldLayer, prop, newConfig }: VisStateActions.LayerColorUIChangeUpdaterAction) => VisState;
|
|
104
|
+
/**
|
|
105
|
+
* Start and end filter animation
|
|
106
|
+
* @memberof visStateUpdaters
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
export declare const toggleFilterAnimationUpdater: (state: VisState, action: VisStateActions.ToggleFilterAnimationUpdaterAction) => VisState;
|
|
110
|
+
/**
|
|
111
|
+
* @memberof visStateUpdaters
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export declare const toggleLayerAnimationUpdater: (state: VisState, action: VisStateActions.ToggleLayerAnimationUpdaterAction) => VisState;
|
|
115
|
+
/**
|
|
116
|
+
* Hide and show layer animation control
|
|
117
|
+
* @memberof visStateUpdaters
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
export declare const toggleLayerAnimationControlUpdater: (state: VisState, action: VisStateActions.ToggleLayerAnimationControlUpdaterAction) => VisState;
|
|
121
|
+
/**
|
|
122
|
+
* Change filter animation speed
|
|
123
|
+
* @memberof visStateUpdaters
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
export declare const updateFilterAnimationSpeedUpdater: (state: VisState, action: VisStateActions.UpdateFilterAnimationSpeedUpdaterAction) => VisState;
|
|
127
|
+
/**
|
|
128
|
+
* Reset animation config current time to a specified value
|
|
129
|
+
* @memberof visStateUpdaters
|
|
130
|
+
* @public
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
export declare const setLayerAnimationTimeUpdater: (state: VisState, { value }: VisStateActions.SetLayerAnimationTimeUpdaterAction) => VisState;
|
|
134
|
+
/**
|
|
135
|
+
* Update animation speed with the vertical speed slider
|
|
136
|
+
* @memberof visStateUpdaters
|
|
137
|
+
* @public
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
export declare const updateLayerAnimationSpeedUpdater: (state: VisState, { speed }: VisStateActions.UpdateLayerAnimationSpeedUpdaterAction) => VisState;
|
|
141
|
+
/**
|
|
142
|
+
* Show larger time filter at bottom for time playback (apply to time filter only)
|
|
143
|
+
* @memberof visStateUpdaters
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
export declare const enlargeFilterUpdater: (state: VisState, action: VisStateActions.EnlargeFilterUpdaterAction) => VisState;
|
|
147
|
+
/**
|
|
148
|
+
* Toggles filter feature visibility
|
|
149
|
+
* @memberof visStateUpdaters
|
|
150
|
+
*/
|
|
151
|
+
export declare const toggleFilterFeatureUpdater: (state: VisState, action: VisStateActions.ToggleFilterFeatureUpdaterAction) => VisState;
|
|
152
|
+
/**
|
|
153
|
+
* Remove a filter
|
|
154
|
+
* @memberof visStateUpdaters
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export declare const removeFilterUpdater: (state: VisState, action: VisStateActions.RemoveFilterUpdaterAction) => VisState;
|
|
158
|
+
/**
|
|
159
|
+
* Add a new layer
|
|
160
|
+
* @memberof visStateUpdaters
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
export declare const addLayerUpdater: (state: VisState, action: VisStateActions.AddLayerUpdaterAction) => VisState;
|
|
164
|
+
/**
|
|
165
|
+
* remove layer
|
|
166
|
+
* @memberof visStateUpdaters
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export declare const removeLayerUpdater: (state: VisState, { idx }: VisStateActions.RemoveLayerUpdaterAction) => VisState;
|
|
170
|
+
/**
|
|
171
|
+
* duplicate layer
|
|
172
|
+
* @memberof visStateUpdaters
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
export declare const duplicateLayerUpdater: (state: VisState, { idx }: VisStateActions.DuplicateLayerUpdaterAction) => VisState;
|
|
176
|
+
/**
|
|
177
|
+
* Reorder layer
|
|
178
|
+
* @memberof visStateUpdaters
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
export declare const reorderLayerUpdater: (state: VisState, { order }: VisStateActions.ReorderLayerUpdaterAction) => VisState;
|
|
182
|
+
/**
|
|
183
|
+
* Remove a dataset and all layers, filters, tooltip configs that based on it
|
|
184
|
+
* @memberof visStateUpdaters
|
|
185
|
+
* @public
|
|
186
|
+
*/
|
|
187
|
+
export declare const removeDatasetUpdater: (state: VisState, action: VisStateActions.RemoveDatasetUpdaterAction) => VisState;
|
|
188
|
+
/**
|
|
189
|
+
* update layer blending mode
|
|
190
|
+
* @memberof visStateUpdaters
|
|
191
|
+
* @public
|
|
192
|
+
*/
|
|
193
|
+
export declare const updateLayerBlendingUpdater: (state: VisState, action: VisStateActions.UpdateLayerBlendingUpdaterAction) => VisState;
|
|
194
|
+
/**
|
|
195
|
+
* Display dataset table in a modal
|
|
196
|
+
* @memberof visStateUpdaters
|
|
197
|
+
* @public
|
|
198
|
+
*/
|
|
199
|
+
export declare const showDatasetTableUpdater: (state: VisState, action: VisStateActions.ShowDatasetTableUpdaterAction) => VisState;
|
|
200
|
+
/**
|
|
201
|
+
* Add custom color for datasets and layers
|
|
202
|
+
* @memberof visStateUpdaters
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
export declare const updateTableColorUpdater: (state: VisState, action: VisStateActions.UpdateDatasetColorUpdater) => VisState;
|
|
206
|
+
/**
|
|
207
|
+
* reset visState to initial State
|
|
208
|
+
* @memberof visStateUpdaters
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
export declare const resetMapConfigUpdater: (state: VisState) => VisState;
|
|
212
|
+
/**
|
|
213
|
+
* Propagate `visState` reducer with a new configuration. Current config will be override.
|
|
214
|
+
* @memberof visStateUpdaters
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
export declare const receiveMapConfigUpdater: (state: VisState, { payload: { config, options } }: {
|
|
218
|
+
type?: typeof ActionTypes.RECEIVE_MAP_CONFIG;
|
|
219
|
+
payload: ReceiveMapConfigPayload;
|
|
220
|
+
}) => VisState;
|
|
221
|
+
/**
|
|
222
|
+
* Trigger layer hover event with hovered object
|
|
223
|
+
* @memberof visStateUpdaters
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
export declare const layerHoverUpdater: (state: VisState, action: VisStateActions.OnLayerHoverUpdaterAction) => VisState;
|
|
227
|
+
/**
|
|
228
|
+
* Update `interactionConfig`
|
|
229
|
+
* @memberof visStateUpdaters
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
232
|
+
export declare function interactionConfigChangeUpdater(state: VisState, action: VisStateActions.InteractionConfigChangeUpdaterAction): VisState;
|
|
233
|
+
/**
|
|
234
|
+
* Trigger layer click event with clicked object
|
|
235
|
+
* @memberof visStateUpdaters
|
|
236
|
+
* @public
|
|
237
|
+
*/
|
|
238
|
+
export declare const layerClickUpdater: (state: VisState, action: VisStateActions.OnLayerClickUpdaterAction) => VisState;
|
|
239
|
+
/**
|
|
240
|
+
* Trigger map click event, unselect clicked object
|
|
241
|
+
* @memberof visStateUpdaters
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
export declare const mapClickUpdater: (state: VisState, action: VisStateActions.OnMapClickUpdaterAction) => VisState;
|
|
245
|
+
/**
|
|
246
|
+
* Trigger map move event
|
|
247
|
+
* @memberof visStateUpdaters
|
|
248
|
+
* @public
|
|
249
|
+
*/
|
|
250
|
+
export declare const mouseMoveUpdater: (state: VisState, { evt }: VisStateActions.OnMouseMoveUpdaterAction) => VisState;
|
|
251
|
+
/**
|
|
252
|
+
* Toggle visibility of a layer for a split map
|
|
253
|
+
* @memberof visStateUpdaters
|
|
254
|
+
* @public
|
|
255
|
+
*/
|
|
256
|
+
export declare const toggleSplitMapUpdater: (state: VisState, action: MapStateActions.ToggleSplitMapUpdaterAction) => VisState;
|
|
257
|
+
/**
|
|
258
|
+
* Toggle visibility of a layer in a split map
|
|
259
|
+
* @memberof visStateUpdaters
|
|
260
|
+
* @public
|
|
261
|
+
*/
|
|
262
|
+
export declare const toggleLayerForMapUpdater: (state: VisState, { mapIndex, layerId }: VisStateActions.ToggleLayerForMapUpdaterAction) => VisState;
|
|
263
|
+
/**
|
|
264
|
+
* Add new dataset to `visState`, with option to load a map config along with the datasets
|
|
265
|
+
* @memberof visStateUpdaters
|
|
266
|
+
* @public
|
|
267
|
+
*/
|
|
268
|
+
export declare const updateVisDataUpdater: (state: VisState, action: VisStateActions.UpdateVisDataUpdaterAction) => VisState;
|
|
269
|
+
/**
|
|
270
|
+
* Rename an existing dataset in `visState`
|
|
271
|
+
* @memberof visStateUpdaters
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
export declare function renameDatasetUpdater(state: VisState, action: VisStateActions.RenameDatasetUpdaterAction): VisState;
|
|
275
|
+
/**
|
|
276
|
+
* When a user clicks on the specific map closing icon
|
|
277
|
+
* the application will close the selected map
|
|
278
|
+
* and will merge the remaining one with the global state
|
|
279
|
+
* TODO: i think in the future this action should be called merge map layers with global settings
|
|
280
|
+
* @param {Object} state `visState`
|
|
281
|
+
* @param {Object} action action
|
|
282
|
+
* @returns {Object} nextState
|
|
283
|
+
*/
|
|
284
|
+
export declare function closeSpecificMapAtIndex<S extends VisState>(state: S, action: MapStateActions.ToggleSplitMapUpdaterAction): S;
|
|
285
|
+
/**
|
|
286
|
+
* Trigger file loading dispatch `addDataToMap` if succeed, or `loadFilesErr` if failed
|
|
287
|
+
* @memberof visStateUpdaters
|
|
288
|
+
* @public
|
|
289
|
+
*/
|
|
290
|
+
export declare const loadFilesUpdater: (state: VisState, action: VisStateActions.LoadFilesUpdaterAction) => VisState;
|
|
291
|
+
/**
|
|
292
|
+
* Sucessfully loaded one file, move on to the next one
|
|
293
|
+
* @memberof visStateUpdaters
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
296
|
+
export declare function loadFileStepSuccessUpdater(state: VisState, action: VisStateActions.LoadFileStepSuccessAction): VisState;
|
|
297
|
+
/**
|
|
298
|
+
*
|
|
299
|
+
* @memberof visStateUpdaters
|
|
300
|
+
* @public
|
|
301
|
+
*/
|
|
302
|
+
export declare function loadNextFileUpdater(state: VisState): VisState;
|
|
303
|
+
export declare function makeLoadFileTask(file: any, fileCache: any, loaders?: Loader[], loadOptions?: {}): any;
|
|
304
|
+
/**
|
|
305
|
+
*
|
|
306
|
+
* @memberof visStateUpdaters
|
|
307
|
+
* @public
|
|
308
|
+
*/
|
|
309
|
+
export declare function processFileContentUpdater(state: VisState, action: VisStateActions.ProcessFileContentUpdaterAction): VisState;
|
|
310
|
+
export declare function parseProgress(prevProgress: {} | undefined, progress: any): {
|
|
311
|
+
percent?: undefined;
|
|
312
|
+
} | {
|
|
313
|
+
percent: any;
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* gets called with payload = AsyncGenerator<???>
|
|
317
|
+
* @memberof visStateUpdaters
|
|
318
|
+
* @public
|
|
319
|
+
*/
|
|
320
|
+
export declare const nextFileBatchUpdater: (state: VisState, { payload: { gen, fileName, progress, accumulated, onFinish } }: VisStateActions.NextFileBatchUpdaterAction) => VisState;
|
|
321
|
+
/**
|
|
322
|
+
* Trigger loading file error
|
|
323
|
+
* @memberof visStateUpdaters
|
|
324
|
+
* @public
|
|
325
|
+
*/
|
|
326
|
+
export declare const loadFilesErrUpdater: (state: VisState, { error, fileName }: VisStateActions.LoadFilesErrUpdaterAction) => VisState;
|
|
327
|
+
/**
|
|
328
|
+
* When select dataset for export, apply cpu filter to selected dataset
|
|
329
|
+
* @memberof visStateUpdaters
|
|
330
|
+
* @public
|
|
331
|
+
*/
|
|
332
|
+
export declare const applyCPUFilterUpdater: (state: VisState, { dataId }: VisStateActions.ApplyCPUFilterUpdaterAction) => VisState;
|
|
333
|
+
/**
|
|
334
|
+
* User input to update the info of the map
|
|
335
|
+
* @memberof visStateUpdaters
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
338
|
+
export declare const setMapInfoUpdater: (state: VisState, action: VisStateActions.SetMapInfoUpdaterAction) => VisState;
|
|
339
|
+
/**
|
|
340
|
+
* Helper function to update All layer domain and layer data of state
|
|
341
|
+
*/
|
|
342
|
+
export declare function addDefaultLayers(state: VisState, datasets: Datasets): {
|
|
343
|
+
state: VisState;
|
|
344
|
+
newLayers: Layer[];
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* helper function to find default tooltips
|
|
348
|
+
* @param {Object} state
|
|
349
|
+
* @param {Object} dataset
|
|
350
|
+
* @returns {Object} nextState
|
|
351
|
+
*/
|
|
352
|
+
export declare function addDefaultTooltips(state: any, dataset: any): any;
|
|
353
|
+
export declare function initialFileLoadingProgress(file: any, index: any): {
|
|
354
|
+
[x: number]: {
|
|
355
|
+
percent: number;
|
|
356
|
+
message: string;
|
|
357
|
+
fileName: any;
|
|
358
|
+
error: null;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
export declare function updateFileLoadingProgressUpdater(state: any, { fileName, progress }: {
|
|
362
|
+
fileName: any;
|
|
363
|
+
progress: any;
|
|
364
|
+
}): any;
|
|
365
|
+
/**
|
|
366
|
+
* Helper function to update layer domains for an array of datasets
|
|
367
|
+
*/
|
|
368
|
+
export declare function updateAllLayerDomainData(state: VisState, dataId: string | string[], updatedFilter?: Filter): VisState;
|
|
369
|
+
export declare function updateAnimationDomain<S extends VisState>(state: S): S;
|
|
370
|
+
/**
|
|
371
|
+
* Update the status of the editor
|
|
372
|
+
* @memberof visStateUpdaters
|
|
373
|
+
*/
|
|
374
|
+
export declare const setEditorModeUpdater: (state: VisState, { mode }: VisStateActions.SetEditorModeUpdaterAction) => VisState;
|
|
375
|
+
/**
|
|
376
|
+
* Update editor features
|
|
377
|
+
* @memberof visStateUpdaters
|
|
378
|
+
*/
|
|
379
|
+
export declare function setFeaturesUpdater(state: VisState, { features }: VisStateActions.SetFeaturesUpdaterAction): VisState;
|
|
380
|
+
/**
|
|
381
|
+
* Set the current selected feature
|
|
382
|
+
* @memberof uiStateUpdaters
|
|
383
|
+
*/
|
|
384
|
+
export declare const setSelectedFeatureUpdater: (state: VisState, { feature }: VisStateActions.SetSelectedFeatureUpdaterAction) => VisState;
|
|
385
|
+
/**
|
|
386
|
+
* Delete existing feature from filters
|
|
387
|
+
* @memberof visStateUpdaters
|
|
388
|
+
*/
|
|
389
|
+
export declare function deleteFeatureUpdater(state: VisState, { feature }: VisStateActions.DeleteFeatureUpdaterAction): VisState;
|
|
390
|
+
/**
|
|
391
|
+
* Toggle feature as layer filter
|
|
392
|
+
* @memberof visStateUpdaters
|
|
393
|
+
*/
|
|
394
|
+
export declare function setPolygonFilterLayerUpdater(state: VisState, payload: VisStateActions.SetPolygonFilterLayerUpdaterAction): VisState;
|
|
395
|
+
/**
|
|
396
|
+
* @memberof visStateUpdaters
|
|
397
|
+
* @public
|
|
398
|
+
*/
|
|
399
|
+
export declare function sortTableColumnUpdater(state: VisState, { dataId, column, mode }: VisStateActions.SortTableColumnUpdaterAction): VisState;
|
|
400
|
+
/**
|
|
401
|
+
* @memberof visStateUpdaters
|
|
402
|
+
* @public
|
|
403
|
+
*/
|
|
404
|
+
export declare function pinTableColumnUpdater(state: VisState, { dataId, column }: VisStateActions.PinTableColumnUpdaterAction): VisState;
|
|
405
|
+
/**
|
|
406
|
+
* Copy column content as strings
|
|
407
|
+
* @memberof visStateUpdaters
|
|
408
|
+
* @public
|
|
409
|
+
*/
|
|
410
|
+
export declare function copyTableColumnUpdater(state: VisState, { dataId, column }: VisStateActions.CopyTableColumnUpdaterAction): VisState;
|
|
411
|
+
/**
|
|
412
|
+
* Update editor
|
|
413
|
+
*/
|
|
414
|
+
export declare function toggleEditorVisibilityUpdater(state: VisState, action: VisStateActions.ToggleEditorVisibilityUpdaterAction): VisState;
|
|
415
|
+
export declare function setFilterAnimationTimeConfigUpdater(state: VisState, { idx, config }: VisStateActions.SetFilterAnimationTimeConfigAction): VisState;
|
|
416
|
+
/**
|
|
417
|
+
* Update editor
|
|
418
|
+
*/
|
|
419
|
+
export declare function setLayerAnimationTimeConfigUpdater(state: VisState, { config }: VisStateActions.SetLayerAnimationTimeConfigAction): VisState;
|