@kepler.gl/actions 3.3.0-alpha.13 → 3.3.0-alpha.15

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,5 +1,5 @@
1
1
  import { default as ActionTypes } from './action-types';
2
- import { Bounds, Merge, Viewport, ViewportPadding } from '@kepler.gl/types';
2
+ import { Bounds, MapState, Merge, Viewport, ViewportPadding } from '@kepler.gl/types';
3
3
  import { MapSplitMode, MapViewMode, GlobeConfig } from '@kepler.gl/constants';
4
4
  export type TogglePerspectiveUpdaterAction = void;
5
5
  /**
@@ -61,6 +61,23 @@ export type UpdateMapUpdaterAction = {
61
61
  export declare const updateMap: (viewport: Viewport, mapIndex?: number) => Merge<UpdateMapUpdaterAction, {
62
62
  type: typeof ActionTypes.UPDATE_MAP;
63
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
+ }>;
64
81
  export type ToggleSplitMapUpdaterAction = {
65
82
  payload: number;
66
83
  };
@@ -161,7 +161,7 @@ export type SetExportImageSettingUpdaterAction = {
161
161
  payload: Partial<ExportImage>;
162
162
  };
163
163
  /**
164
- * Set `exportImage` settings: ratio, resolution, legend
164
+ * Set `exportImage` settings: ratio, resolution, legend, charts
165
165
  * @memberof uiStateActions
166
166
  * @param newSetting - {ratio: '1x'}
167
167
  * @public
@@ -313,6 +313,19 @@ export type SetExportHTMLMapModeUpdaterAction = {
313
313
  export declare const setExportHTMLMapMode: (mode: SetExportHTMLMapModeUpdaterAction['payload']) => Merge<SetExportHTMLMapModeUpdaterAction, {
314
314
  type: typeof ActionTypes.SET_EXPORT_MAP_HTML_MODE;
315
315
  }>;
316
+ /** SET_EXPORT_MAP_FILE_NAME */
317
+ export type SetExportMapFileNameUpdaterAction = {
318
+ payload: string;
319
+ };
320
+ /**
321
+ * Set the filename used when exporting an HTML or JSON map
322
+ * @memberof uiStateActions
323
+ * @param fileName - download name without extension
324
+ * @public
325
+ */
326
+ export declare const setExportMapFileName: (fileName: SetExportMapFileNameUpdaterAction['payload']) => Merge<SetExportMapFileNameUpdaterAction, {
327
+ type: typeof ActionTypes.SET_EXPORT_MAP_FILE_NAME;
328
+ }>;
316
329
  /** SET_LOCALE */
317
330
  export type SetLocaleUpdaterAction = {
318
331
  payload: {
@@ -335,7 +348,7 @@ export type SetThemeUpdaterAction = {
335
348
  };
336
349
  };
337
350
  /**
338
- * Set UI `theme` value (`light` or `dark`)
351
+ * Set UI `theme` value (`light`, `dark`, or `space`)
339
352
  * @memberof uiStateActions
340
353
  * @param theme - theme of the UI
341
354
  * @public
@@ -2,7 +2,7 @@ import { default as ActionTypes } from './action-types';
2
2
  import { FileCacheItem } from '@kepler.gl/processors';
3
3
  import { Layer, LayerBaseConfig } from '@kepler.gl/layers';
4
4
  import { KeplerTable } from '@kepler.gl/table';
5
- import { AddDataToMapPayload, ViewportPadding, ValueOf, Merge, PickInfo, RGBColor, NestedPartial, LayerVisConfig, ColorUI, Feature, FeatureSelectionContext, InteractionConfig, Filter, ParsedConfig, ParsedLayer, EffectPropsPartial, AnnotationPropsPartial, SyncTimelineMode, AnimationConfig, FilterAnimationConfig, LayerOrder, LayerOrderGroup, ProtoDataset } from '@kepler.gl/types';
5
+ import { AddDataToMapPayload, ViewportPadding, ValueOf, Merge, PickInfo, RGBColor, NestedPartial, LayerVisConfig, ColorUI, Feature, FeatureSelectionContext, InteractionConfig, Filter, ParsedConfig, ParsedLayer, EffectPropsPartial, AnnotationPropsPartial, SyncTimelineMode, AnimationConfig, FilterAnimationConfig, LayerOrder, LayerOrderGroup, ProtoDataset, ChartConfig } from '@kepler.gl/types';
6
6
  export type ApplyLayerConfigUpdaterAction = {
7
7
  oldLayerId: string;
8
8
  newLayerConfig: ParsedLayer;
@@ -454,6 +454,47 @@ export type UpdateEffectUpdaterAction = {
454
454
  export declare function updateEffect(id: string, props: EffectPropsPartial): Merge<UpdateEffectUpdaterAction, {
455
455
  type: typeof ActionTypes.UPDATE_EFFECT;
456
456
  }>;
457
+ export type AddChartUpdaterAction = {
458
+ chart: ChartConfig;
459
+ };
460
+ /**
461
+ * Add a chart to the charts panel
462
+ * @memberof visStateActions
463
+ * @param chart - chart config
464
+ * @returns action
465
+ * @public
466
+ */
467
+ export declare function addChart(chart: ChartConfig): Merge<AddChartUpdaterAction, {
468
+ type: typeof ActionTypes.ADD_CHART;
469
+ }>;
470
+ export type UpdateChartUpdaterAction = {
471
+ id: string;
472
+ props: Partial<ChartConfig>;
473
+ };
474
+ /**
475
+ * Update a chart
476
+ * @memberof visStateActions
477
+ * @param id - chart id
478
+ * @param props - partial chart config
479
+ * @returns action
480
+ * @public
481
+ */
482
+ export declare function updateChart(id: string, props: Partial<ChartConfig>): Merge<UpdateChartUpdaterAction, {
483
+ type: typeof ActionTypes.UPDATE_CHART;
484
+ }>;
485
+ export type RemoveChartUpdaterAction = {
486
+ id: string;
487
+ };
488
+ /**
489
+ * Remove a chart
490
+ * @memberof visStateActions
491
+ * @param id - chart id
492
+ * @returns action
493
+ * @public
494
+ */
495
+ export declare function removeChart(id: string): Merge<RemoveChartUpdaterAction, {
496
+ type: typeof ActionTypes.REMOVE_CHART;
497
+ }>;
457
498
  export type AddAnnotationUpdaterAction = {
458
499
  config?: AnnotationPropsPartial;
459
500
  };
@@ -1448,6 +1489,8 @@ export declare function setTimeFilterSyncTimelineMode({ id, mode }: setTimeFilte
1448
1489
  export type CreateNewDatasetSuccessPayload = {
1449
1490
  results: (PromiseFulfilledResult<KeplerTable> | PromiseRejectedResult)[];
1450
1491
  addToMapOptions: AddDataToMapPayload['options'];
1492
+ /** Dataset ids whose hydrate download progress should be cleared. */
1493
+ progressIds?: string[];
1451
1494
  };
1452
1495
  /**
1453
1496
  * Called when a new dataset is created successfully via async table methods
@@ -1468,4 +1511,17 @@ export type SetLoadingIndicatorPayload = {
1468
1511
  * @public
1469
1512
  */
1470
1513
  export declare const setLoadingIndicator: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetLoadingIndicatorPayload, string>;
1514
+ export type SetLoadingProgressUpdaterAction = {
1515
+ id: string;
1516
+ percent: number;
1517
+ };
1518
+ /**
1519
+ * Update download progress for an in-flight dataset load shown on the map
1520
+ * loading indicator (0–100).
1521
+ * @memberof visStateActions
1522
+ * @returns action
1523
+ */
1524
+ export declare function setLoadingProgress(id: string, percent: number): Merge<SetLoadingProgressUpdaterAction, {
1525
+ type: typeof ActionTypes.SET_LOADING_PROGRESS;
1526
+ }>;
1471
1527
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kepler.gl/actions",
3
3
  "author": "Shan He <shan@uber.com>",
4
- "version": "3.3.0-alpha.13",
4
+ "version": "3.3.0-alpha.15",
5
5
  "description": "kepler.gl constants used by kepler.gl components, actions and reducers",
6
6
  "license": "MIT",
7
7
  "main": "dist/cjs/index.js",
@@ -29,13 +29,13 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@deck.gl/core": "^9.3.1",
32
- "@kepler.gl/cloud-providers": "3.3.0-alpha.13",
33
- "@kepler.gl/constants": "3.3.0-alpha.13",
34
- "@kepler.gl/layers": "3.3.0-alpha.13",
35
- "@kepler.gl/processors": "3.3.0-alpha.13",
36
- "@kepler.gl/table": "3.3.0-alpha.13",
37
- "@kepler.gl/types": "3.3.0-alpha.13",
38
- "@kepler.gl/utils": "3.3.0-alpha.13",
32
+ "@kepler.gl/cloud-providers": "3.3.0-alpha.15",
33
+ "@kepler.gl/constants": "3.3.0-alpha.15",
34
+ "@kepler.gl/layers": "3.3.0-alpha.15",
35
+ "@kepler.gl/processors": "3.3.0-alpha.15",
36
+ "@kepler.gl/table": "3.3.0-alpha.15",
37
+ "@kepler.gl/types": "3.3.0-alpha.15",
38
+ "@kepler.gl/utils": "3.3.0-alpha.15",
39
39
  "@reduxjs/toolkit": "^1.7.2",
40
40
  "@types/react-redux": "^7.1.23",
41
41
  "@types/redux-actions": "^2.6.2",