Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

Added deckgl-typings from community repo (#1787)

Maksim Suslov24e3549c4e6e
diff --git a/package.json b/package.json
index 1d4a3e0c1..311b56fc8 100644
--- a/package.json
+++ b/package.json
@@ -200,6 +200,7 @@
"@babel/register": "^7.12.1",
"@babel/runtime": "^7.12.1",
"@babel/traverse": "^7.12.1",
+ "@danmarshall/deckgl-typings": "^4.9.21",
"@deck.gl/test-utils": "8.2.0",
"@luma.gl/test-utils": "^8.2.0",
"@probe.gl/test-utils": "^3.0.1",
diff --git a/src/layers/base-layer.ts b/src/layers/base-layer.ts
index c8eef2f99..50bcaabcd 100644
--- a/src/layers/base-layer.ts
+++ b/src/layers/base-layer.ts
@@ -59,7 +59,7 @@ import {hexToRgb, getColorGroupByName, reverseColorRange} from 'utils/color-util
import {RGBColor, RGBAColor, MapState, Filter, Datasets, ValueOf} from 'reducers';
import {LayerTextLabel, ColorUI} from './layer-factory';
-import {KeplerTable} from 'utils';
+import {KeplerTable} from '../utils';
import {DataContainerInterface} from 'utils/table-utils/data-container-interface';
import {Field, GpuFilter} from 'utils/table-utils/kepler-table';
diff --git a/src/reducers/vis-state-merger.ts b/src/reducers/vis-state-merger.ts
index abc25294e..b89d31d93 100644
--- a/src/reducers/vis-state-merger.ts
+++ b/src/reducers/vis-state-merger.ts
@@ -30,7 +30,7 @@ import {LAYER_BLENDINGS} from 'constants/default-settings';
import {CURRENT_VERSION, visStateSchema} from 'schemas';
import {VisState, Datasets} from './vis-state-updaters';
-import {KeplerTable} from 'utils';
+import {KeplerTable} from '../utils';
import {ParsedConfig, ParsedLayer} from 'schemas';
import {Layer, LayerColumns, LayerColumn} from 'layers';
import {TooltipInfo} from './vis-state-updaters';
diff --git a/src/reducers/vis-state-updaters.ts b/src/reducers/vis-state-updaters.ts
index 7ed649380..19bf334df 100644
--- a/src/reducers/vis-state-updaters.ts
+++ b/src/reducers/vis-state-updaters.ts
@@ -101,7 +101,7 @@ import * as VisStateActions from 'actions/vis-state-actions';
import * as MapStateActions from 'actions/map-state-actions';
import ActionTypes from 'constants/action-types';
import {LoaderObject} from '@loaders.gl/loader-utils';
-import {KeplerTable} from 'utils';
+import {KeplerTable} from '../utils';
export type HistogramBin = {
x0: number | undefined;
diff --git a/src/typedefs/deckgl.d.ts b/src/typedefs/deckgl.d.ts
new file mode 100644
index 000000000..bdfd40579
--- /dev/null
+++ b/src/typedefs/deckgl.d.ts
@@ -0,0 +1,25 @@
+// Copyright (c) 2022 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+import * as DeckTypings from '@danmarshall/deckgl-typings';
+
+declare module 'deck.gl' {
+ export namespace DeckTypings {}
+}
diff --git a/yarn.lock b/yarn.lock
index 389c51c69..4ea797def 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2174,6 +2174,15 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
+"@danmarshall/deckgl-typings@^4.9.21":
+ version "4.9.21"
+ resolved "https://registry.yarnpkg.com/@danmarshall/deckgl-typings/-/deckgl-typings-4.9.21.tgz#45fefa22fe136368155d6c63f9caeff1511124cc"
+ integrity sha512-s6q9YlDKo1EWtwvI22hHHRv8xX/N8wrODMx9VUxQOr9SQ1yHch6aZHBn3957Mqsy7MAb0p5bG3lZYuDjescOlw==
+ dependencies:
+ "@types/hammerjs" "^2.0.36"
+ "@types/react" "*"
+ indefinitely-typed "^1.1.0"
+
"@deck.gl/[email protected]":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@deck.gl/aggregation-layers/-/aggregation-layers-8.2.0.tgz#344972ae9ec6ec6d66137ebdad768c789c4150aa"
@@ -3211,6 +3220,11 @@
dependencies:
"@types/node" "*"
+"@types/hammerjs@^2.0.36":
+ version "2.0.41"
+ resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa"
+ integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==
+
"@types/hoist-non-react-statics@^3.3.1":
version "3.3.1"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
@@ -7607,6 +7621,15 @@ fs-exists-sync@^0.1.0:
resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"
integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=
+fs-extra@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
+ integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
fs-extra@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
@@ -8639,6 +8662,14 @@ imurmurhash@^0.1.4:
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+indefinitely-typed@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/indefinitely-typed/-/indefinitely-typed-1.1.0.tgz#d0acd3645445e89ae1c70129be21609a0aa5a114"
+ integrity sha512-giaI0hCj+wWZIZZLsmWHI+LrM4Hwc+rEZ/VrgCafKePcnE42fLnQTFt4xspqLin8fCjI5WnQr2fep/0EFqjaxw==
+ dependencies:
+ fs-extra "^7.0.0"
+ minimist "^1.2.5"
+
indent-string@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
@@ -9888,6 +9919,13 @@ json5@^2.1.2:
dependencies:
minimist "^1.2.5"
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
+ integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
@@ -15364,7 +15402,7 @@ unist-util-visit@^2.0.0:
unist-util-is "^4.0.0"
unist-util-visit-parents "^3.0.0"
-universalify@^0.1.2:
+universalify@^0.1.0, universalify@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==