@kepler.gl/reducers 3.2.6 → 3.3.0-alpha.1

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.
@@ -1,7 +1,7 @@
1
1
  import { ActionTypes, CreateNewDatasetSuccessPayload, MapStateActions, ReceiveMapConfigPayload, VisStateActions, SetLoadingIndicatorPayload } from '@kepler.gl/actions';
2
2
  import { Layer } from '@kepler.gl/layers';
3
- import { Merger, PostMergerPayload, VisState } from '@kepler.gl/schemas';
4
- import { Filter, InteractionConfig, AnimationConfig, FilterAnimationConfig, Editor } from '@kepler.gl/types';
3
+ import KeplerGLSchema, { Merger, PostMergerPayload, VisState } from '@kepler.gl/schemas';
4
+ import { Filter, InteractionConfig, AnimationConfig, FilterAnimationConfig, Editor, Annotation } from '@kepler.gl/types';
5
5
  import { Loader } from '@loaders.gl/loader-utils';
6
6
  import { Datasets } from '@kepler.gl/table';
7
7
  import { PayloadAction } from '@reduxjs/toolkit';
@@ -17,7 +17,7 @@ export declare const DEFAULT_EDITOR: Editor;
17
17
  export declare const INITIAL_VIS_STATE: VisState;
18
18
  export declare const ACTION_TASK_FIT_BOUNDS: any;
19
19
  export declare const ACTION_TASK_ADD_NOTIFICATION: any;
20
- declare type UpdateStateWithLayerAndDataType = {
20
+ type UpdateStateWithLayerAndDataType = {
21
21
  layers: Layer[];
22
22
  layerData: any[];
23
23
  };
@@ -194,86 +194,37 @@ export declare const setFilterViewUpdater: (state: VisState, action: VisStateAct
194
194
  layerOrder: string[];
195
195
  effects: import("@kepler.gl/types").Effect[];
196
196
  effectOrder: string[];
197
+ annotations: Annotation[];
198
+ annotationsToBeMerged: any[];
199
+ selectedAnnotationId: string | null;
200
+ isEditingAnnotationText: boolean;
197
201
  filterToBeMerged: any[];
198
202
  datasets: Datasets;
199
203
  editingDataset: string | undefined;
200
204
  interactionConfig: InteractionConfig;
201
205
  interactionToBeMerged: any;
202
206
  layerBlending: string;
203
- overlayBlending?: string | undefined;
207
+ overlayBlending?: string;
204
208
  hoverInfo: any;
205
209
  clicked: any;
206
210
  mousePos: any;
207
211
  maxDefaultTooltips: number;
208
- layerClasses: {
209
- point: typeof import("@kepler.gl/layers/dist/point-layer/point-layer").default;
210
- arc: typeof import("@kepler.gl/layers/dist/arc-layer/arc-layer").default;
211
- line: typeof import("@kepler.gl/layers/dist/line-layer/line-layer").default;
212
- grid: typeof import("@kepler.gl/layers/dist/grid-layer/grid-layer").default;
213
- hexagon: typeof import("@kepler.gl/layers/dist/hexagon-layer/hexagon-layer").default;
214
- geojson: typeof import("@kepler.gl/layers/dist/geojson-layer/geojson-layer").default;
215
- cluster: typeof import("@kepler.gl/layers/dist/cluster-layer/cluster-layer").default;
216
- /**
217
- * Updaters for `visState` reducer. Can be used in your root reducer to directly modify kepler.gl's state.
218
- * Read more about [Using updaters](../advanced-usage/using-updaters.md)
219
- *
220
- * @public
221
- * @example
222
- *
223
- * import keplerGlReducer, {visStateUpdaters} from '@kepler.gl/reducers';
224
- * // Root Reducer
225
- * const reducers = combineReducers({
226
- * keplerGl: keplerGlReducer,
227
- * app: appReducer
228
- * });
229
- *
230
- * const composedReducer = (state, action) => {
231
- * switch (action.type) {
232
- * case 'CLICK_BUTTON':
233
- * return {
234
- * ...state,
235
- * keplerGl: {
236
- * ...state.keplerGl,
237
- * foo: {
238
- * ...state.keplerGl.foo,
239
- * visState: visStateUpdaters.enlargeFilterUpdater(
240
- * state.keplerGl.foo.visState,
241
- * {idx: 0}
242
- * )
243
- * }
244
- * }
245
- * };
246
- * }
247
- * return reducers(state, action);
248
- * };
249
- *
250
- * export default composedReducer;
251
- */
252
- icon: typeof import("@kepler.gl/layers/dist/icon-layer/icon-layer").default;
253
- heatmap: typeof import("@kepler.gl/layers/dist/heatmap-layer/heatmap-layer").default;
254
- hexagonId: typeof import("@kepler.gl/layers/dist/h3-hexagon-layer/h3-hexagon-layer").default;
255
- "3D": typeof import("@kepler.gl/layers").ScenegraphLayer;
256
- trip: typeof import("@kepler.gl/layers/dist/trip-layer/trip-layer").default;
257
- s2: typeof import("@kepler.gl/layers/dist/s2-geometry-layer/s2-geometry-layer").default;
258
- vectorTile: typeof import("@kepler.gl/layers").VectorTileLayer;
259
- rasterTile: typeof import("@kepler.gl/layers").RasterTileLayer;
260
- wms: typeof import("@kepler.gl/layers/dist/wms-layer/wms-layer").default;
261
- };
212
+ layerClasses: import("@kepler.gl/layers").LayerClassesType;
262
213
  animationConfig: AnimationConfig;
263
214
  editor: Editor;
264
215
  splitMaps: import("@kepler.gl/types").SplitMap[];
265
216
  splitMapsToBeMerged: import("@kepler.gl/types").SplitMap[];
266
- fileLoading: false | import("@kepler.gl/types").FileLoading;
217
+ fileLoading: import("@kepler.gl/types").FileLoading | false;
267
218
  fileLoadingProgress: import("@kepler.gl/types").FileLoadingProgress;
268
219
  loadingIndicatorValue: number;
269
- loaders: Loader<any, any, import("@loaders.gl/loader-utils").LoaderOptions>[];
220
+ loaders: Loader[];
270
221
  loadOptions: object;
271
- initialState?: Partial<VisState> | undefined;
222
+ initialState?: Partial<VisState>;
272
223
  mergers: import("@kepler.gl/schemas").VisStateMergers<any>;
273
- schema: import("@kepler.gl/schemas").KeplerGLSchemaClass;
274
- preserveLayerOrder?: string[] | undefined;
275
- preserveFilterOrder?: string[] | undefined;
276
- preserveDatasetOrder?: string[] | undefined;
224
+ schema: typeof KeplerGLSchema;
225
+ preserveLayerOrder?: string[];
226
+ preserveFilterOrder?: string[];
227
+ preserveDatasetOrder?: string[];
277
228
  isMergingDatasets: {
278
229
  [datasetId: string]: boolean;
279
230
  };
@@ -337,6 +288,36 @@ export declare const reorderEffectUpdater: (state: VisState, { order }: VisState
337
288
  * @public
338
289
  */
339
290
  export declare const updateEffectUpdater: (state: VisState, { id, props }: VisStateActions.UpdateEffectUpdaterAction) => VisState;
291
+ /**
292
+ * Add a new annotation
293
+ * @memberof visStateUpdaters
294
+ * @public
295
+ */
296
+ export declare const addAnnotationUpdater: (state: VisState, action: VisStateActions.AddAnnotationUpdaterAction) => VisState;
297
+ /**
298
+ * Remove an annotation
299
+ * @memberof visStateUpdaters
300
+ * @public
301
+ */
302
+ export declare const removeAnnotationUpdater: (state: VisState, { id }: VisStateActions.RemoveAnnotationUpdaterAction) => VisState;
303
+ /**
304
+ * Update an annotation
305
+ * @memberof visStateUpdaters
306
+ * @public
307
+ */
308
+ export declare const updateAnnotationUpdater: (state: VisState, { id, config }: VisStateActions.UpdateAnnotationUpdaterAction) => VisState;
309
+ /**
310
+ * Duplicate an annotation
311
+ * @memberof visStateUpdaters
312
+ * @public
313
+ */
314
+ export declare const duplicateAnnotationUpdater: (state: VisState, { id }: VisStateActions.DuplicateAnnotationUpdaterAction) => VisState;
315
+ /**
316
+ * Set selected annotation
317
+ * @memberof visStateUpdaters
318
+ * @public
319
+ */
320
+ export declare const setSelectedAnnotationUpdater: (state: VisState, { id, isEditingText }: VisStateActions.SetSelectedAnnotationUpdaterAction) => VisState;
340
321
  /**
341
322
  * Remove a dataset and all layers, filters, tooltip configs that based on it
342
323
  * @memberof visStateUpdaters
@@ -570,6 +551,11 @@ export declare function deleteFeatureUpdater(state: VisState, { feature }: VisSt
570
551
  * @memberof visStateUpdaters
571
552
  */
572
553
  export declare function setPolygonFilterLayerUpdater(state: VisState, payload: VisStateActions.SetPolygonFilterLayerUpdaterAction): VisState;
554
+ /**
555
+ * Apply polygon filter to all visible layers
556
+ * @memberof visStateUpdaters
557
+ */
558
+ export declare function setPolygonFilterAllLayersUpdater(state: VisState, payload: VisStateActions.SetPolygonFilterAllLayersUpdaterAction): VisState;
573
559
  /**
574
560
  * @memberof visStateUpdaters
575
561
  * @public