@kepler.gl/actions 3.3.0-alpha.15 → 3.3.0-alpha.17
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 +52 -0
- package/dist/actions.d.ts +6 -0
- package/dist/cjs/action-types.js +27 -1
- package/dist/cjs/actions.js +1 -1
- package/dist/cjs/ui-state-actions.js +45 -3
- package/dist/cjs/vis-state-actions.js +290 -33
- package/dist/esm/action-types.js +27 -1
- package/dist/esm/actions.js +1 -1
- package/dist/esm/ui-state-actions.js +44 -2
- package/dist/esm/vis-state-actions.js +267 -33
- package/dist/ui-state-actions.d.ts +44 -1
- package/dist/vis-state-actions.d.ts +275 -22
- package/package.json +9 -9
|
@@ -129,6 +129,20 @@ export type OpenDeleteModalUpdaterAction = {
|
|
|
129
129
|
export declare const openDeleteModal: (datasetId: OpenDeleteModalUpdaterAction['payload']) => Merge<OpenDeleteModalUpdaterAction, {
|
|
130
130
|
type: typeof ActionTypes.OPEN_DELETE_MODAL;
|
|
131
131
|
}>;
|
|
132
|
+
/** OPEN_REPLACE_DATASET_MODAL */
|
|
133
|
+
export type OpenReplaceDatasetModalUpdaterAction = {
|
|
134
|
+
payload: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Open the add-data modal so the next confirmed upload replaces one dataset.
|
|
138
|
+
* Layers and filters are remapped onto the new table.
|
|
139
|
+
* @memberof uiStateActions
|
|
140
|
+
* @param datasetId - id of the dataset to replace
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
export declare const openReplaceDatasetModal: (datasetId: OpenReplaceDatasetModalUpdaterAction['payload']) => Merge<OpenReplaceDatasetModalUpdaterAction, {
|
|
144
|
+
type: typeof ActionTypes.OPEN_REPLACE_DATASET_MODAL;
|
|
145
|
+
}>;
|
|
132
146
|
/** ADD_NOTIFICATION */
|
|
133
147
|
export type AddNotificationUpdaterAction = {
|
|
134
148
|
payload: object;
|
|
@@ -161,7 +175,7 @@ export type SetExportImageSettingUpdaterAction = {
|
|
|
161
175
|
payload: Partial<ExportImage>;
|
|
162
176
|
};
|
|
163
177
|
/**
|
|
164
|
-
* Set `exportImage` settings: ratio, resolution, legend, charts
|
|
178
|
+
* Set `exportImage` settings: ratio, resolution, legend, charts, transparent background
|
|
165
179
|
* @memberof uiStateActions
|
|
166
180
|
* @param newSetting - {ratio: '1x'}
|
|
167
181
|
* @public
|
|
@@ -178,6 +192,7 @@ export declare const startExportingImage: (options?: {
|
|
|
178
192
|
ratio?: string;
|
|
179
193
|
resolution?: string;
|
|
180
194
|
legend?: string;
|
|
195
|
+
transparentBackground?: boolean;
|
|
181
196
|
center?: boolean;
|
|
182
197
|
}) => Merge<SetExportImageSettingUpdaterAction, {
|
|
183
198
|
type: typeof ActionTypes.START_EXPORTING_IMAGE;
|
|
@@ -313,6 +328,21 @@ export type SetExportHTMLMapModeUpdaterAction = {
|
|
|
313
328
|
export declare const setExportHTMLMapMode: (mode: SetExportHTMLMapModeUpdaterAction['payload']) => Merge<SetExportHTMLMapModeUpdaterAction, {
|
|
314
329
|
type: typeof ActionTypes.SET_EXPORT_MAP_HTML_MODE;
|
|
315
330
|
}>;
|
|
331
|
+
/** SET_EXPORT_MAP_BRANDING */
|
|
332
|
+
export type SetExportMapBrandingUpdaterAction = {
|
|
333
|
+
payload: {
|
|
334
|
+
appName?: string;
|
|
335
|
+
appWebsite?: string;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Set application branding overrides for exported maps
|
|
340
|
+
* @memberOf uiStateActions
|
|
341
|
+
* @param payload - application name and/or website overrides
|
|
342
|
+
*/
|
|
343
|
+
export declare const setExportMapBranding: (payload: SetExportMapBrandingUpdaterAction['payload']) => Merge<SetExportMapBrandingUpdaterAction, {
|
|
344
|
+
type: typeof ActionTypes.SET_EXPORT_MAP_BRANDING;
|
|
345
|
+
}>;
|
|
316
346
|
/** SET_EXPORT_MAP_FILE_NAME */
|
|
317
347
|
export type SetExportMapFileNameUpdaterAction = {
|
|
318
348
|
payload: string;
|
|
@@ -326,6 +356,19 @@ export type SetExportMapFileNameUpdaterAction = {
|
|
|
326
356
|
export declare const setExportMapFileName: (fileName: SetExportMapFileNameUpdaterAction['payload']) => Merge<SetExportMapFileNameUpdaterAction, {
|
|
327
357
|
type: typeof ActionTypes.SET_EXPORT_MAP_FILE_NAME;
|
|
328
358
|
}>;
|
|
359
|
+
/** SET_EXPORT_INCLUDE_LAYER_API_KEYS */
|
|
360
|
+
export type SetExportIncludeLayerApiKeysUpdaterAction = {
|
|
361
|
+
payload: boolean;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Whether exported HTML and JSON maps keep access tokens stored on layers.
|
|
365
|
+
* @memberof uiStateActions
|
|
366
|
+
* @param includeLayerApiKeys - include layer API keys in the export
|
|
367
|
+
* @public
|
|
368
|
+
*/
|
|
369
|
+
export declare const setExportIncludeLayerApiKeys: (includeLayerApiKeys: SetExportIncludeLayerApiKeysUpdaterAction['payload']) => Merge<SetExportIncludeLayerApiKeysUpdaterAction, {
|
|
370
|
+
type: typeof ActionTypes.SET_EXPORT_INCLUDE_LAYER_API_KEYS;
|
|
371
|
+
}>;
|
|
329
372
|
/** SET_LOCALE */
|
|
330
373
|
export type SetLocaleUpdaterAction = {
|
|
331
374
|
payload: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as ActionTypes } from './action-types';
|
|
2
|
-
import { FileCacheItem } from '@kepler.gl/processors';
|
|
2
|
+
import { FileCacheItem, ZipArchiveExpansion } from '@kepler.gl/processors';
|
|
3
3
|
import { Layer, LayerBaseConfig } from '@kepler.gl/layers';
|
|
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, ChartConfig } from '@kepler.gl/types';
|
|
4
|
+
import { GroupByOp, JoinOp, KeplerTable, SuitabilityOp } from '@kepler.gl/table';
|
|
5
|
+
import { AddDataToMapOptions, 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;
|
|
@@ -86,15 +86,23 @@ export declare function layerSetIsValid(oldLayer: Layer, isValid: boolean): Merg
|
|
|
86
86
|
export type LayerTypeChangeUpdaterAction = {
|
|
87
87
|
oldLayer: Layer;
|
|
88
88
|
newType: string;
|
|
89
|
+
/**
|
|
90
|
+
* Fit the map when this is the layer type dropdown assigning a type to an
|
|
91
|
+
* empty layer. Omitted for programmatic calls and saved-config applies.
|
|
92
|
+
*/
|
|
93
|
+
fitBounds?: boolean;
|
|
89
94
|
};
|
|
90
95
|
/**
|
|
91
96
|
* Update layer type. Previews layer config will be copied if applicable.
|
|
92
97
|
* @param oldLayer - layer to be updated
|
|
93
98
|
* @param newType - new type
|
|
99
|
+
* @param options.fitBounds fit the map when the layer type dropdown gives an empty layer its first type
|
|
94
100
|
* @returns action
|
|
95
101
|
* @public
|
|
96
102
|
*/
|
|
97
|
-
export declare function layerTypeChange(oldLayer: Layer, newType: string
|
|
103
|
+
export declare function layerTypeChange(oldLayer: Layer, newType: string, options?: {
|
|
104
|
+
fitBounds?: boolean;
|
|
105
|
+
}): Merge<LayerTypeChangeUpdaterAction, {
|
|
98
106
|
type: typeof ActionTypes.LAYER_TYPE_CHANGE;
|
|
99
107
|
}>;
|
|
100
108
|
export type LayerVisualChannelConfigChangeUpdaterAction = {
|
|
@@ -753,6 +761,32 @@ export type PinTableColumnUpdaterAction = {
|
|
|
753
761
|
export declare function pinTableColumn(dataId: string, column: string): Merge<PinTableColumnUpdaterAction, {
|
|
754
762
|
type: typeof ActionTypes.PIN_TABLE_COLUMN;
|
|
755
763
|
}>;
|
|
764
|
+
export type ToggleTableColumnHiddenUpdaterAction = {
|
|
765
|
+
dataId: string;
|
|
766
|
+
column: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Hide or show a dataset column in the attribute table and in data export.
|
|
770
|
+
* @param dataId
|
|
771
|
+
* @param column
|
|
772
|
+
* @returns action
|
|
773
|
+
* @public
|
|
774
|
+
*/
|
|
775
|
+
export declare function toggleTableColumnHidden(dataId: string, column: string): Merge<ToggleTableColumnHiddenUpdaterAction, {
|
|
776
|
+
type: typeof ActionTypes.TOGGLE_TABLE_COLUMN_HIDDEN;
|
|
777
|
+
}>;
|
|
778
|
+
export type ShowAllTableColumnsUpdaterAction = {
|
|
779
|
+
dataId: string;
|
|
780
|
+
};
|
|
781
|
+
/**
|
|
782
|
+
* Show every attribute-table column that was hidden.
|
|
783
|
+
* @param dataId
|
|
784
|
+
* @returns action
|
|
785
|
+
* @public
|
|
786
|
+
*/
|
|
787
|
+
export declare function showAllTableColumns(dataId: string): Merge<ShowAllTableColumnsUpdaterAction, {
|
|
788
|
+
type: typeof ActionTypes.SHOW_ALL_TABLE_COLUMNS;
|
|
789
|
+
}>;
|
|
756
790
|
export type CopyTableColumnUpdaterAction = {
|
|
757
791
|
dataId: string;
|
|
758
792
|
column: string;
|
|
@@ -802,26 +836,32 @@ export type LoadColumnStatsSuccessUpdaterAction = {
|
|
|
802
836
|
fieldName: string;
|
|
803
837
|
result: any;
|
|
804
838
|
filterProps?: any;
|
|
839
|
+
fieldType?: string;
|
|
805
840
|
};
|
|
806
841
|
/**
|
|
807
842
|
* Column statistics finished loading
|
|
808
843
|
* @returns action
|
|
809
844
|
* @public
|
|
810
845
|
*/
|
|
811
|
-
export declare function loadColumnStatsSuccess(dataId: string, fieldName: string, result: any, filterProps?: any
|
|
846
|
+
export declare function loadColumnStatsSuccess(dataId: string, fieldName: string, result: any, filterProps?: any, request?: {
|
|
847
|
+
fieldType: string;
|
|
848
|
+
}): Merge<LoadColumnStatsSuccessUpdaterAction, {
|
|
812
849
|
type: typeof ActionTypes.LOAD_COLUMN_STATS_SUCCESS;
|
|
813
850
|
}>;
|
|
814
851
|
export type LoadColumnStatsErrorUpdaterAction = {
|
|
815
852
|
dataId: string;
|
|
816
853
|
fieldName: string;
|
|
817
854
|
error: Error;
|
|
855
|
+
fieldType?: string;
|
|
818
856
|
};
|
|
819
857
|
/**
|
|
820
858
|
* Column statistics failed to load
|
|
821
859
|
* @returns action
|
|
822
860
|
* @public
|
|
823
861
|
*/
|
|
824
|
-
export declare function loadColumnStatsError(dataId: string, fieldName: string, error: Error
|
|
862
|
+
export declare function loadColumnStatsError(dataId: string, fieldName: string, error: Error, request?: {
|
|
863
|
+
fieldType: string;
|
|
864
|
+
}): Merge<LoadColumnStatsErrorUpdaterAction, {
|
|
825
865
|
type: typeof ActionTypes.LOAD_COLUMN_STATS_ERROR;
|
|
826
866
|
}>;
|
|
827
867
|
export type AddDataToMapUpdaterOptions = {
|
|
@@ -914,6 +954,54 @@ export type UpdateDatasetUpdaterAction = {
|
|
|
914
954
|
export declare function updateDataset(dataId: string, data: ProtoDataset['data'], renames?: Record<string, string>): Merge<UpdateDatasetUpdaterAction, {
|
|
915
955
|
type: typeof ActionTypes.UPDATE_DATASET;
|
|
916
956
|
}>;
|
|
957
|
+
export type RenameTableColumnUpdaterAction = {
|
|
958
|
+
dataId: string;
|
|
959
|
+
fieldName: string;
|
|
960
|
+
newName: string;
|
|
961
|
+
};
|
|
962
|
+
/**
|
|
963
|
+
* Rename a dataset column. The new name becomes the field identity stored in
|
|
964
|
+
* layers, filters, charts, dataset operations, and saved maps.
|
|
965
|
+
* @param dataId - dataset id
|
|
966
|
+
* @param fieldName - current column name
|
|
967
|
+
* @param newName - next column name
|
|
968
|
+
* @returns action
|
|
969
|
+
* @public
|
|
970
|
+
*/
|
|
971
|
+
export declare function renameTableColumn(dataId: string, fieldName: string, newName: string): Merge<RenameTableColumnUpdaterAction, {
|
|
972
|
+
type: typeof ActionTypes.RENAME_TABLE_COLUMN;
|
|
973
|
+
}>;
|
|
974
|
+
export type ChangeTableColumnTypeUpdaterAction = {
|
|
975
|
+
dataId: string;
|
|
976
|
+
fieldName: string;
|
|
977
|
+
newType: string;
|
|
978
|
+
};
|
|
979
|
+
/**
|
|
980
|
+
* Convert every value in a dataset column and update its field type atomically.
|
|
981
|
+
* Invalid values leave the dataset unchanged and produce an error notification.
|
|
982
|
+
* @param dataId - dataset id
|
|
983
|
+
* @param fieldName - column name
|
|
984
|
+
* @param newType - target kepler.gl field type
|
|
985
|
+
* @returns action
|
|
986
|
+
* @public
|
|
987
|
+
*/
|
|
988
|
+
export declare function changeTableColumnType(dataId: string, fieldName: string, newType: string): Merge<ChangeTableColumnTypeUpdaterAction, {
|
|
989
|
+
type: typeof ActionTypes.CHANGE_TABLE_COLUMN_TYPE;
|
|
990
|
+
}>;
|
|
991
|
+
export type DeleteTableColumnUpdaterAction = {
|
|
992
|
+
dataId: string;
|
|
993
|
+
fieldName: string;
|
|
994
|
+
};
|
|
995
|
+
/**
|
|
996
|
+
* Delete a dataset column and drop references that required it.
|
|
997
|
+
* @param dataId - dataset id
|
|
998
|
+
* @param fieldName - column name
|
|
999
|
+
* @returns action
|
|
1000
|
+
* @public
|
|
1001
|
+
*/
|
|
1002
|
+
export declare function deleteTableColumn(dataId: string, fieldName: string): Merge<DeleteTableColumnUpdaterAction, {
|
|
1003
|
+
type: typeof ActionTypes.DELETE_TABLE_COLUMN;
|
|
1004
|
+
}>;
|
|
917
1005
|
export type ToggleFilterAnimationUpdaterAction = {
|
|
918
1006
|
idx: number;
|
|
919
1007
|
};
|
|
@@ -1098,7 +1186,8 @@ export declare function toggleLayerForMap(mapIndex: number, layerId: string): Me
|
|
|
1098
1186
|
type FilterPlotNewProp = {
|
|
1099
1187
|
yAxis?: null | Record<string, any>;
|
|
1100
1188
|
plotType?: {
|
|
1101
|
-
type
|
|
1189
|
+
type?: string;
|
|
1190
|
+
[key: string]: any;
|
|
1102
1191
|
};
|
|
1103
1192
|
};
|
|
1104
1193
|
export type SetFilterPlotUpdaterAction = {
|
|
@@ -1131,18 +1220,26 @@ export type SetMapInfoUpdaterAction = {
|
|
|
1131
1220
|
export declare function setMapInfo(info: any): Merge<SetMapInfoUpdaterAction, {
|
|
1132
1221
|
type: typeof ActionTypes.SET_MAP_INFO;
|
|
1133
1222
|
}>;
|
|
1223
|
+
export type LoadFilesOptions = AddDataToMapOptions & {
|
|
1224
|
+
/** Parse the files, then wait for an explicit add instead of calling `addDataToMap`. */
|
|
1225
|
+
deferAddToMap?: boolean;
|
|
1226
|
+
};
|
|
1134
1227
|
export type LoadFilesUpdaterAction = {
|
|
1135
1228
|
files: File[];
|
|
1136
|
-
onFinish?(result: any): any;
|
|
1229
|
+
onFinish?(result: any, options?: LoadFilesOptions): any;
|
|
1230
|
+
/** Forwarded to `addDataToMap` when loading finishes. Omitted options keep their defaults. */
|
|
1231
|
+
options?: LoadFilesOptions;
|
|
1137
1232
|
};
|
|
1138
1233
|
/**
|
|
1139
1234
|
* Trigger file loading dispatch `addDataToMap` if succeed, or `loadFilesErr` if failed
|
|
1140
1235
|
* @memberof visStateActions
|
|
1141
1236
|
* @param files array of fileblob
|
|
1237
|
+
* @param onFinish called with the processed file cache. Defaults to `loadFilesSuccess`
|
|
1238
|
+
* @param options forwarded to `addDataToMap`. `autoCreateLayers` defaults to true when omitted
|
|
1142
1239
|
* @returns action
|
|
1143
1240
|
* @public
|
|
1144
1241
|
*/
|
|
1145
|
-
export declare function loadFiles(files: File[], onFinish?: (result: any) => any): Merge<LoadFilesUpdaterAction, {
|
|
1242
|
+
export declare function loadFiles(files: File[], onFinish?: (result: any, options?: LoadFilesOptions) => any, options?: LoadFilesOptions): Merge<LoadFilesUpdaterAction, {
|
|
1146
1243
|
type: typeof ActionTypes.LOAD_FILES;
|
|
1147
1244
|
}>;
|
|
1148
1245
|
/**
|
|
@@ -1151,21 +1248,94 @@ export declare function loadFiles(files: File[], onFinish?: (result: any) => any
|
|
|
1151
1248
|
* @returns action
|
|
1152
1249
|
* @public
|
|
1153
1250
|
*/
|
|
1154
|
-
export declare function loadNextFile(): {
|
|
1251
|
+
export declare function loadNextFile(loadId?: number): {
|
|
1155
1252
|
type: typeof ActionTypes.LOAD_NEXT_FILE;
|
|
1253
|
+
loadId?: number;
|
|
1156
1254
|
};
|
|
1255
|
+
export type ExpandZipArchiveSuccessAction = {
|
|
1256
|
+
loadId: number;
|
|
1257
|
+
archiveName: string;
|
|
1258
|
+
expansion: ZipArchiveExpansion;
|
|
1259
|
+
};
|
|
1260
|
+
/**
|
|
1261
|
+
* A zip in the load queue has been unpacked. The updater either parses a
|
|
1262
|
+
* single shapefile archive or enqueues one dataset per supported member.
|
|
1263
|
+
* @memberof visStateActions
|
|
1264
|
+
*/
|
|
1265
|
+
export declare function expandZipArchiveSuccess(payload: ExpandZipArchiveSuccessAction): Merge<ExpandZipArchiveSuccessAction, {
|
|
1266
|
+
type: typeof ActionTypes.EXPAND_ZIP_ARCHIVE_SUCCESS;
|
|
1267
|
+
}>;
|
|
1157
1268
|
export type loadFilesSuccessUpdaterAction = {
|
|
1158
1269
|
result: FileCacheItem[];
|
|
1270
|
+
options?: AddDataToMapOptions;
|
|
1271
|
+
/** Set when a file-load pause finishes, so a canceled load can be ignored. */
|
|
1272
|
+
loadId?: number;
|
|
1159
1273
|
};
|
|
1160
1274
|
/**
|
|
1161
1275
|
* called when all files are processed and loaded
|
|
1162
1276
|
* @memberof visStateActions
|
|
1163
1277
|
* @param result
|
|
1278
|
+
* @param options forwarded to `addDataToMap`
|
|
1164
1279
|
* @returns action
|
|
1165
1280
|
*/
|
|
1166
|
-
export declare function loadFilesSuccess(result: FileCacheItem[]): Merge<loadFilesSuccessUpdaterAction, {
|
|
1281
|
+
export declare function loadFilesSuccess(result: FileCacheItem[], options?: AddDataToMapOptions): Merge<loadFilesSuccessUpdaterAction, {
|
|
1167
1282
|
type: typeof ActionTypes.LOAD_FILES_SUCCESS;
|
|
1168
1283
|
}>;
|
|
1284
|
+
export type ConfirmReplaceDatasetUpdaterAction = {
|
|
1285
|
+
result: FileCacheItem[];
|
|
1286
|
+
datasetToReplaceId: string;
|
|
1287
|
+
deleteOriginalDataset?: boolean;
|
|
1288
|
+
};
|
|
1289
|
+
/**
|
|
1290
|
+
* Confirm a staged upload as a replacement for one dataset.
|
|
1291
|
+
* The first dataset remaps that dataset's layers and filters. Further datasets are added.
|
|
1292
|
+
* @memberof visStateActions
|
|
1293
|
+
* @param payload.result staged file cache the user left checked
|
|
1294
|
+
* @param payload.datasetToReplaceId dataset the menu action selected
|
|
1295
|
+
* @param payload.deleteOriginalDataset drop the original table. Defaults to true
|
|
1296
|
+
* @public
|
|
1297
|
+
*/
|
|
1298
|
+
export declare function confirmReplaceDataset(payload: {
|
|
1299
|
+
result: FileCacheItem[];
|
|
1300
|
+
datasetToReplaceId: string;
|
|
1301
|
+
deleteOriginalDataset?: boolean;
|
|
1302
|
+
}): Merge<ConfirmReplaceDatasetUpdaterAction, {
|
|
1303
|
+
type: typeof ActionTypes.CONFIRM_REPLACE_DATASET;
|
|
1304
|
+
}>;
|
|
1305
|
+
export type StageLoadedFilesUpdaterAction = {
|
|
1306
|
+
result: FileCacheItem[];
|
|
1307
|
+
/** Set when a file-load pause finishes, so a canceled load can be ignored. */
|
|
1308
|
+
loadId?: number;
|
|
1309
|
+
};
|
|
1310
|
+
/**
|
|
1311
|
+
* Store processed files without adding them to the map or closing the modal.
|
|
1312
|
+
* @memberof visStateActions
|
|
1313
|
+
* @param result processed file cache
|
|
1314
|
+
* @returns action
|
|
1315
|
+
* @public
|
|
1316
|
+
*/
|
|
1317
|
+
export declare function stageLoadedFiles(result: FileCacheItem[]): Merge<StageLoadedFilesUpdaterAction, {
|
|
1318
|
+
type: typeof ActionTypes.STAGE_LOADED_FILES;
|
|
1319
|
+
}>;
|
|
1320
|
+
/**
|
|
1321
|
+
* Add already-parsed or remote datasets to the Add Data list without starting a file load.
|
|
1322
|
+
* @memberof visStateActions
|
|
1323
|
+
* @param result datasets to keep until Add Data
|
|
1324
|
+
* @returns action
|
|
1325
|
+
* @public
|
|
1326
|
+
*/
|
|
1327
|
+
export declare function appendStagedLoadedFiles(result: FileCacheItem[]): Merge<StageLoadedFilesUpdaterAction, {
|
|
1328
|
+
type: typeof ActionTypes.APPEND_STAGED_LOADED_FILES;
|
|
1329
|
+
}>;
|
|
1330
|
+
/**
|
|
1331
|
+
* Drop files staged for the Add Data button and stop an in-progress modal load.
|
|
1332
|
+
* @memberof visStateActions
|
|
1333
|
+
* @returns action
|
|
1334
|
+
* @public
|
|
1335
|
+
*/
|
|
1336
|
+
export declare function clearStagedLoadedFiles(): {
|
|
1337
|
+
type: typeof ActionTypes.CLEAR_STAGED_LOADED_FILES;
|
|
1338
|
+
};
|
|
1169
1339
|
export type LoadFileStepSuccessAction = {
|
|
1170
1340
|
fileName: string;
|
|
1171
1341
|
fileCache: FileCacheItem[];
|
|
@@ -1185,6 +1355,8 @@ export declare function loadFileStepSuccess({ fileName, fileCache }: {
|
|
|
1185
1355
|
export type LoadFilesErrUpdaterAction = {
|
|
1186
1356
|
fileName: string;
|
|
1187
1357
|
error: any;
|
|
1358
|
+
/** Set when the failure belongs to one load, so a newer load can ignore it. */
|
|
1359
|
+
loadId?: number;
|
|
1188
1360
|
};
|
|
1189
1361
|
/**
|
|
1190
1362
|
* Trigger loading file error
|
|
@@ -1193,7 +1365,7 @@ export type LoadFilesErrUpdaterAction = {
|
|
|
1193
1365
|
* @returns action
|
|
1194
1366
|
* @public
|
|
1195
1367
|
*/
|
|
1196
|
-
export declare function loadFilesErr(fileName: string, error: any): Merge<LoadFilesErrUpdaterAction, {
|
|
1368
|
+
export declare function loadFilesErr(fileName: string, error: any, loadId?: number): Merge<LoadFilesErrUpdaterAction, {
|
|
1197
1369
|
type: typeof ActionTypes.LOAD_FILES_ERR;
|
|
1198
1370
|
}>;
|
|
1199
1371
|
export type SetFeaturesUpdaterAction = {
|
|
@@ -1338,8 +1510,9 @@ export type ExtractDataFromFeatureUpdaterAction = {
|
|
|
1338
1510
|
/**
|
|
1339
1511
|
* Copy in-memory rows that fall inside the currently selected Draw on Map polygon
|
|
1340
1512
|
* into a new local dataset. Vector tile layers extract a snapshot of features
|
|
1341
|
-
* already loaded in the current view.
|
|
1342
|
-
*
|
|
1513
|
+
* already loaded in the current view. Raster tile layers download a PNG clip and
|
|
1514
|
+
* a GeoJSON file with the export rectangle and zonal stats. No-ops for WMS/3D/bitmap tiles, unsupported layer types,
|
|
1515
|
+
* and non-polygon drawings.
|
|
1343
1516
|
* @memberof visStateActions
|
|
1344
1517
|
* @param layerId Layer whose dataset should be extracted
|
|
1345
1518
|
* @return action
|
|
@@ -1364,6 +1537,8 @@ export type NextFileBatchUpdaterAction = {
|
|
|
1364
1537
|
progress?: any;
|
|
1365
1538
|
accumulated?: any;
|
|
1366
1539
|
onFinish: (result: any) => any;
|
|
1540
|
+
/** Carried across batches so progressive loads keep the original add-data options. */
|
|
1541
|
+
options?: LoadFilesOptions;
|
|
1367
1542
|
};
|
|
1368
1543
|
};
|
|
1369
1544
|
/**
|
|
@@ -1492,13 +1667,89 @@ export type CreateNewDatasetSuccessPayload = {
|
|
|
1492
1667
|
/** Dataset ids whose hydrate download progress should be cleared. */
|
|
1493
1668
|
progressIds?: string[];
|
|
1494
1669
|
};
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1670
|
+
export type AddGroupByUpdaterAction = {
|
|
1671
|
+
dataId: string;
|
|
1672
|
+
};
|
|
1673
|
+
export declare function addGroupBy(dataId: string): Merge<AddGroupByUpdaterAction, {
|
|
1674
|
+
type: typeof ActionTypes.ADD_GROUP_BY;
|
|
1675
|
+
}>;
|
|
1676
|
+
export type SetGroupByConfigUpdaterAction = {
|
|
1677
|
+
id: string;
|
|
1678
|
+
config: Partial<GroupByOp>;
|
|
1679
|
+
};
|
|
1680
|
+
export declare function setGroupByConfig(id: string, config: Partial<GroupByOp>): Merge<SetGroupByConfigUpdaterAction, {
|
|
1681
|
+
type: typeof ActionTypes.SET_GROUP_BY_CONFIG;
|
|
1682
|
+
}>;
|
|
1683
|
+
export type RunGroupByUpdaterAction = {
|
|
1684
|
+
id: string;
|
|
1685
|
+
};
|
|
1686
|
+
export declare function runGroupBy(id: string): Merge<RunGroupByUpdaterAction, {
|
|
1687
|
+
type: typeof ActionTypes.RUN_GROUP_BY;
|
|
1688
|
+
}>;
|
|
1689
|
+
export type AddJoinUpdaterAction = {
|
|
1690
|
+
dataId: string;
|
|
1691
|
+
implementation?: JoinOp['implementation'];
|
|
1692
|
+
};
|
|
1693
|
+
export declare function addJoin(dataId: string, implementation?: JoinOp['implementation']): Merge<AddJoinUpdaterAction, {
|
|
1694
|
+
type: typeof ActionTypes.ADD_JOIN;
|
|
1695
|
+
}>;
|
|
1696
|
+
export type SetJoinConfigUpdaterAction = {
|
|
1697
|
+
id: string;
|
|
1698
|
+
config: Partial<JoinOp>;
|
|
1699
|
+
};
|
|
1700
|
+
export declare function setJoinConfig(id: string, config: Partial<JoinOp>): Merge<SetJoinConfigUpdaterAction, {
|
|
1701
|
+
type: typeof ActionTypes.SET_JOIN_CONFIG;
|
|
1702
|
+
}>;
|
|
1703
|
+
export type RunJoinUpdaterAction = {
|
|
1704
|
+
id: string;
|
|
1705
|
+
};
|
|
1706
|
+
export declare function runJoin(id: string): Merge<RunJoinUpdaterAction, {
|
|
1707
|
+
type: typeof ActionTypes.RUN_JOIN;
|
|
1708
|
+
}>;
|
|
1709
|
+
export type AddSpatialJoinUpdaterAction = {
|
|
1710
|
+
dataId: string;
|
|
1711
|
+
};
|
|
1712
|
+
export declare function addSpatialJoin(dataId: string): Merge<AddSpatialJoinUpdaterAction, {
|
|
1713
|
+
type: typeof ActionTypes.ADD_SPATIAL_JOIN;
|
|
1714
|
+
}>;
|
|
1715
|
+
export type SetSpatialJoinConfigUpdaterAction = {
|
|
1716
|
+
id: string;
|
|
1717
|
+
config: Partial<JoinOp>;
|
|
1718
|
+
};
|
|
1719
|
+
export declare function setSpatialJoinConfig(id: string, config: Partial<JoinOp>): Merge<SetSpatialJoinConfigUpdaterAction, {
|
|
1720
|
+
type: typeof ActionTypes.SET_SPATIAL_JOIN_CONFIG;
|
|
1721
|
+
}>;
|
|
1722
|
+
export type RunSpatialJoinUpdaterAction = {
|
|
1723
|
+
id: string;
|
|
1724
|
+
};
|
|
1725
|
+
export declare function runSpatialJoin(id: string): Merge<RunSpatialJoinUpdaterAction, {
|
|
1726
|
+
type: typeof ActionTypes.RUN_SPATIAL_JOIN;
|
|
1727
|
+
}>;
|
|
1728
|
+
export type AddSuitabilityUpdaterAction = {
|
|
1729
|
+
dataId: string;
|
|
1730
|
+
};
|
|
1731
|
+
export declare function addSuitability(dataId: string): Merge<AddSuitabilityUpdaterAction, {
|
|
1732
|
+
type: typeof ActionTypes.ADD_SUITABILITY;
|
|
1733
|
+
}>;
|
|
1734
|
+
export type SetSuitabilityConfigUpdaterAction = {
|
|
1735
|
+
id: string;
|
|
1736
|
+
config: Partial<SuitabilityOp>;
|
|
1737
|
+
};
|
|
1738
|
+
export declare function setSuitabilityConfig(id: string, config: Partial<SuitabilityOp>): Merge<SetSuitabilityConfigUpdaterAction, {
|
|
1739
|
+
type: typeof ActionTypes.SET_SUITABILITY_CONFIG;
|
|
1740
|
+
}>;
|
|
1741
|
+
export type RunSuitabilityUpdaterAction = {
|
|
1742
|
+
id: string;
|
|
1743
|
+
};
|
|
1744
|
+
export declare function runSuitability(id: string): Merge<RunSuitabilityUpdaterAction, {
|
|
1745
|
+
type: typeof ActionTypes.RUN_SUITABILITY;
|
|
1746
|
+
}>;
|
|
1747
|
+
export type RemoveDatasetOpUpdaterAction = {
|
|
1748
|
+
id: string;
|
|
1749
|
+
};
|
|
1750
|
+
export declare function removeDatasetOp(id: string): Merge<RemoveDatasetOpUpdaterAction, {
|
|
1751
|
+
type: typeof ActionTypes.REMOVE_DATASET_OP;
|
|
1752
|
+
}>;
|
|
1502
1753
|
export declare const createNewDatasetSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<CreateNewDatasetSuccessPayload, string>;
|
|
1503
1754
|
export type SetLoadingIndicatorPayload = {
|
|
1504
1755
|
change: number;
|
|
@@ -1514,6 +1765,8 @@ export declare const setLoadingIndicator: import("@reduxjs/toolkit").ActionCreat
|
|
|
1514
1765
|
export type SetLoadingProgressUpdaterAction = {
|
|
1515
1766
|
id: string;
|
|
1516
1767
|
percent: number;
|
|
1768
|
+
/** Download is finished and the file is being parsed into a dataset. */
|
|
1769
|
+
phase?: 'processing';
|
|
1517
1770
|
};
|
|
1518
1771
|
/**
|
|
1519
1772
|
* Update download progress for an in-flight dataset load shown on the map
|
|
@@ -1521,7 +1774,7 @@ export type SetLoadingProgressUpdaterAction = {
|
|
|
1521
1774
|
* @memberof visStateActions
|
|
1522
1775
|
* @returns action
|
|
1523
1776
|
*/
|
|
1524
|
-
export declare function setLoadingProgress(id: string, percent: number): Merge<SetLoadingProgressUpdaterAction, {
|
|
1777
|
+
export declare function setLoadingProgress(id: string, percent: number, phase?: 'processing'): Merge<SetLoadingProgressUpdaterAction, {
|
|
1525
1778
|
type: typeof ActionTypes.SET_LOADING_PROGRESS;
|
|
1526
1779
|
}>;
|
|
1527
1780
|
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.
|
|
4
|
+
"version": "3.3.0-alpha.17",
|
|
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.
|
|
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.17",
|
|
33
|
+
"@kepler.gl/constants": "3.3.0-alpha.17",
|
|
34
|
+
"@kepler.gl/layers": "3.3.0-alpha.17",
|
|
35
|
+
"@kepler.gl/processors": "3.3.0-alpha.17",
|
|
36
|
+
"@kepler.gl/table": "3.3.0-alpha.17",
|
|
37
|
+
"@kepler.gl/types": "3.3.0-alpha.17",
|
|
38
|
+
"@kepler.gl/utils": "3.3.0-alpha.17",
|
|
39
39
|
"@reduxjs/toolkit": "^1.7.2",
|
|
40
40
|
"@types/react-redux": "^7.1.23",
|
|
41
41
|
"@types/redux-actions": "^2.6.2",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"node": ">=20"
|
|
59
59
|
},
|
|
60
60
|
"volta": {
|
|
61
|
-
"node": "
|
|
61
|
+
"node": "24.21.0",
|
|
62
62
|
"yarn": "4.4.0"
|
|
63
63
|
},
|
|
64
64
|
"packageManager": "yarn@4.4.0",
|