@kepler.gl/actions 3.3.0-alpha.6 → 3.3.0-alpha.8
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 +12 -0
- package/dist/action-wrapper.d.ts +22 -17
- package/dist/actions.d.ts +6 -0
- package/dist/cjs/action-types.js +7 -1
- package/dist/cjs/action-wrapper.js +22 -19
- package/dist/cjs/actions.js +6 -1
- package/dist/cjs/map-state-actions.js +8 -3
- package/dist/cjs/ui-state-actions.js +18 -2
- package/dist/cjs/vis-state-actions.js +85 -5
- package/dist/esm/action-types.js +7 -1
- package/dist/esm/action-wrapper.js +22 -19
- package/dist/esm/actions.js +6 -1
- package/dist/esm/map-state-actions.js +8 -3
- package/dist/esm/ui-state-actions.js +17 -1
- package/dist/esm/vis-state-actions.js +80 -5
- package/dist/map-state-actions.d.ts +7 -2
- package/dist/ui-state-actions.d.ts +15 -0
- package/dist/vis-state-actions.d.ts +80 -5
- package/package.json +9 -10
|
@@ -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, ValueOf, Merge, PickInfo, RGBColor, NestedPartial, LayerVisConfig, ColorUI, Feature, FeatureSelectionContext, InteractionConfig, Filter, ParsedConfig, ParsedLayer, EffectPropsPartial, AnnotationPropsPartial, SyncTimelineMode, AnimationConfig, FilterAnimationConfig, LayerOrder, LayerOrderGroup } 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 } from '@kepler.gl/types';
|
|
6
6
|
export type ApplyLayerConfigUpdaterAction = {
|
|
7
7
|
oldLayerId: string;
|
|
8
8
|
newLayerConfig: ParsedLayer;
|
|
@@ -625,8 +625,50 @@ export type SetColumnDisplayFormatUpdaterAction = {
|
|
|
625
625
|
export declare function setColumnDisplayFormat(dataId: SetColumnDisplayFormatUpdaterAction['dataId'], formats: SetColumnDisplayFormatUpdaterAction['formats']): Merge<SetColumnDisplayFormatUpdaterAction, {
|
|
626
626
|
type: typeof ActionTypes.SET_COLUMN_DISPLAY_FORMAT;
|
|
627
627
|
}>;
|
|
628
|
+
export type LoadColumnStatsUpdaterAction = {
|
|
629
|
+
dataId: string;
|
|
630
|
+
fieldName: string | string[];
|
|
631
|
+
};
|
|
632
|
+
/**
|
|
633
|
+
* Lazily compute column statistics for the data table header.
|
|
634
|
+
* @param dataId
|
|
635
|
+
* @param fieldName one or more field names
|
|
636
|
+
* @returns action
|
|
637
|
+
* @public
|
|
638
|
+
*/
|
|
639
|
+
export declare function loadColumnStats(dataId: string, fieldName: string | string[]): Merge<LoadColumnStatsUpdaterAction, {
|
|
640
|
+
type: typeof ActionTypes.LOAD_COLUMN_STATS;
|
|
641
|
+
}>;
|
|
642
|
+
export type LoadColumnStatsSuccessUpdaterAction = {
|
|
643
|
+
dataId: string;
|
|
644
|
+
fieldName: string;
|
|
645
|
+
result: any;
|
|
646
|
+
filterProps?: any;
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* Column statistics finished loading
|
|
650
|
+
* @returns action
|
|
651
|
+
* @public
|
|
652
|
+
*/
|
|
653
|
+
export declare function loadColumnStatsSuccess(dataId: string, fieldName: string, result: any, filterProps?: any): Merge<LoadColumnStatsSuccessUpdaterAction, {
|
|
654
|
+
type: typeof ActionTypes.LOAD_COLUMN_STATS_SUCCESS;
|
|
655
|
+
}>;
|
|
656
|
+
export type LoadColumnStatsErrorUpdaterAction = {
|
|
657
|
+
dataId: string;
|
|
658
|
+
fieldName: string;
|
|
659
|
+
error: Error;
|
|
660
|
+
};
|
|
661
|
+
/**
|
|
662
|
+
* Column statistics failed to load
|
|
663
|
+
* @returns action
|
|
664
|
+
* @public
|
|
665
|
+
*/
|
|
666
|
+
export declare function loadColumnStatsError(dataId: string, fieldName: string, error: Error): Merge<LoadColumnStatsErrorUpdaterAction, {
|
|
667
|
+
type: typeof ActionTypes.LOAD_COLUMN_STATS_ERROR;
|
|
668
|
+
}>;
|
|
628
669
|
export type AddDataToMapUpdaterOptions = {
|
|
629
670
|
centerMap?: boolean;
|
|
671
|
+
padding?: ViewportPadding;
|
|
630
672
|
readOnly?: boolean;
|
|
631
673
|
keepExistingConfig?: boolean;
|
|
632
674
|
};
|
|
@@ -643,6 +685,8 @@ export type UpdateVisDataUpdaterAction = {
|
|
|
643
685
|
* @param {object} options
|
|
644
686
|
* @param options.centerMap `default: true` if `centerMap` is set to `true` kepler.gl will
|
|
645
687
|
* place the map view within the data points boundaries
|
|
688
|
+
* @param options.padding padding in pixels applied when `centerMap` is true so data is not hidden
|
|
689
|
+
* under the side panel or other UI. Can be a number or `{top, bottom, left, right}`.
|
|
646
690
|
* @param options.readOnly `default: false` if `readOnly` is set to `true`
|
|
647
691
|
* the left setting panel will be hidden
|
|
648
692
|
* @param config this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}
|
|
@@ -973,6 +1017,21 @@ export declare function loadFilesErr(fileName: string, error: any): Merge<LoadFi
|
|
|
973
1017
|
export type SetFeaturesUpdaterAction = {
|
|
974
1018
|
features: Feature[];
|
|
975
1019
|
};
|
|
1020
|
+
export type SetEditorFeaturePropertiesUpdaterAction = {
|
|
1021
|
+
feature: Feature;
|
|
1022
|
+
properties: Record<string, unknown>;
|
|
1023
|
+
};
|
|
1024
|
+
/**
|
|
1025
|
+
* Set user-facing GeoJSON properties on a Draw on Map sketch.
|
|
1026
|
+
* Editor-only keys such as `filterId` and `isClosed` are preserved.
|
|
1027
|
+
* @memberof visStateActions
|
|
1028
|
+
* @param feature
|
|
1029
|
+
* @param properties
|
|
1030
|
+
* @returns action
|
|
1031
|
+
*/
|
|
1032
|
+
export declare function setEditorFeatureProperties(feature: Feature, properties: Record<string, unknown>): Merge<SetEditorFeaturePropertiesUpdaterAction, {
|
|
1033
|
+
type: typeof ActionTypes.SET_EDITOR_FEATURE_PROPERTIES;
|
|
1034
|
+
}>;
|
|
976
1035
|
/**
|
|
977
1036
|
* Store features to state
|
|
978
1037
|
* @memberof visStateActions
|
|
@@ -1039,16 +1098,16 @@ export declare function deleteFeature(feature: Feature): Merge<DeleteFeatureUpda
|
|
|
1039
1098
|
export type SetEditorModeUpdaterAction = {
|
|
1040
1099
|
mode: string;
|
|
1041
1100
|
};
|
|
1042
|
-
/** Set the
|
|
1101
|
+
/** Set the Draw on Map editor mode.
|
|
1043
1102
|
* @memberof visStateActions
|
|
1044
|
-
* @param mode one of EDITOR_MODES
|
|
1103
|
+
* @param mode one of `EDITOR_MODES`: `EDIT`, `DRAW_POINT`, `DRAW_LINESTRING`, `DRAW_POLYGON`, `DRAW_RECTANGLE`, `DRAW_CIRCLE`
|
|
1045
1104
|
* @returns action
|
|
1046
1105
|
* @public
|
|
1047
1106
|
* @example
|
|
1048
|
-
* import {
|
|
1107
|
+
* import {setEditorMode} from '@kepler.gl/actions';
|
|
1049
1108
|
* import {EDITOR_MODES} from '@kepler.gl/constants';
|
|
1050
1109
|
*
|
|
1051
|
-
* this.props.dispatch(
|
|
1110
|
+
* this.props.dispatch(setEditorMode(EDITOR_MODES.DRAW_LINESTRING));
|
|
1052
1111
|
*/
|
|
1053
1112
|
export declare function setEditorMode(mode: string): Merge<SetEditorModeUpdaterAction, {
|
|
1054
1113
|
type: typeof ActionTypes.SET_EDITOR_MODE;
|
|
@@ -1075,6 +1134,22 @@ export type ToggleEditorVisibilityUpdaterAction = void;
|
|
|
1075
1134
|
export declare function toggleEditorVisibility(): Merge<ToggleEditorVisibilityUpdaterAction, {
|
|
1076
1135
|
type: typeof ActionTypes.TOGGLE_EDITOR_VISIBILITY;
|
|
1077
1136
|
}>;
|
|
1137
|
+
export type ConvertEditorFeaturesToLayerUpdaterAction = void;
|
|
1138
|
+
/**
|
|
1139
|
+
* Convert editor sketch features into a GeoJSON dataset and layer, then clear the sketches.
|
|
1140
|
+
* The new dataset/layer is labeled `Drawn Geometry` plus a two-digit number.
|
|
1141
|
+
* No-ops when `enableDrawOnMapSketches` is false in application config.
|
|
1142
|
+
* @memberof visStateActions
|
|
1143
|
+
* @return action
|
|
1144
|
+
* @public
|
|
1145
|
+
* @example
|
|
1146
|
+
* import {convertEditorFeaturesToLayer} from '@kepler.gl/actions';
|
|
1147
|
+
*
|
|
1148
|
+
* this.props.dispatch(convertEditorFeaturesToLayer());
|
|
1149
|
+
*/
|
|
1150
|
+
export declare function convertEditorFeaturesToLayer(): Merge<ConvertEditorFeaturesToLayerUpdaterAction, {
|
|
1151
|
+
type: typeof ActionTypes.CONVERT_EDITOR_FEATURES_TO_LAYER;
|
|
1152
|
+
}>;
|
|
1078
1153
|
type FileContent = {
|
|
1079
1154
|
fileName: string;
|
|
1080
1155
|
header: string[];
|
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.
|
|
4
|
+
"version": "3.3.0-alpha.8",
|
|
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,18 +29,17 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@deck.gl/core": "^9.3.1",
|
|
32
|
-
"@kepler.gl/cloud-providers": "3.3.0-alpha.
|
|
33
|
-
"@kepler.gl/constants": "3.3.0-alpha.
|
|
34
|
-
"@kepler.gl/layers": "3.3.0-alpha.
|
|
35
|
-
"@kepler.gl/processors": "3.3.0-alpha.
|
|
36
|
-
"@kepler.gl/table": "3.3.0-alpha.
|
|
37
|
-
"@kepler.gl/types": "3.3.0-alpha.
|
|
38
|
-
"@kepler.gl/utils": "3.3.0-alpha.
|
|
32
|
+
"@kepler.gl/cloud-providers": "3.3.0-alpha.8",
|
|
33
|
+
"@kepler.gl/constants": "3.3.0-alpha.8",
|
|
34
|
+
"@kepler.gl/layers": "3.3.0-alpha.8",
|
|
35
|
+
"@kepler.gl/processors": "3.3.0-alpha.8",
|
|
36
|
+
"@kepler.gl/table": "3.3.0-alpha.8",
|
|
37
|
+
"@kepler.gl/types": "3.3.0-alpha.8",
|
|
38
|
+
"@kepler.gl/utils": "3.3.0-alpha.8",
|
|
39
39
|
"@reduxjs/toolkit": "^1.7.2",
|
|
40
|
-
"@types/lodash": "4.17.5",
|
|
41
40
|
"@types/react-redux": "^7.1.23",
|
|
42
41
|
"@types/redux-actions": "^2.6.2",
|
|
43
|
-
"
|
|
42
|
+
"es-toolkit": "^1.39.10",
|
|
44
43
|
"react-palm": "^3.3.8",
|
|
45
44
|
"react-redux": "^8.0.5",
|
|
46
45
|
"redux": "^5.0.0",
|