kepler.gl 3.1.9 → 3.2.0
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/README.md +21 -21
- package/dist/src/components/src/common/link-renderer.d.ts +6 -2
- package/dist/src/components/src/index.d.ts +1 -0
- package/dist/src/components/src/map-container.d.ts +1 -0
- package/dist/src/components/src/plot-container.d.ts +1 -0
- package/dist/src/components/src/side-panel/layer-manager.d.ts +1 -0
- package/dist/src/duckdb/src/index.d.ts +1 -0
- package/dist/src/duckdb/src/processors/data-processor.d.ts +8 -0
- package/dist/src/utils/src/data-utils.d.ts +1 -0
- package/package.json +2 -2
- package/src/actions/package.json +8 -8
- package/src/ai-assistant/package.json +7 -7
- package/src/cloud-providers/package.json +2 -2
- package/src/common-utils/package.json +3 -3
- package/src/components/dist/common/link-renderer.d.ts +6 -2
- package/src/components/dist/common/link-renderer.js +1 -1
- package/src/components/dist/index.d.ts +1 -0
- package/src/components/dist/index.js +44 -1
- package/src/components/dist/map-container.d.ts +1 -0
- package/src/components/dist/map-container.js +2 -1
- package/src/components/dist/modal-container.js +3 -3
- package/src/components/dist/modals/tilesets-modals/tileset-raster-form.js +38 -9
- package/src/components/dist/plot-container.d.ts +1 -0
- package/src/components/dist/plot-container.js +7 -4
- package/src/components/dist/side-panel/layer-manager.d.ts +1 -0
- package/src/components/dist/side-panel/layer-manager.js +5 -3
- package/src/components/dist/side-panel/layer-panel/color-scale-selector.js +16 -9
- package/src/components/dist/side-panel/layer-panel/raster-tile-layer-configurator.js +3 -3
- package/src/components/package.json +16 -16
- package/src/components/src/common/link-renderer.tsx +7 -2
- package/src/components/src/index.ts +8 -0
- package/src/components/src/map-container.tsx +4 -0
- package/src/components/src/modal-container.tsx +6 -2
- package/src/components/src/modals/tilesets-modals/tileset-raster-form.tsx +60 -4
- package/src/components/src/plot-container.tsx +9 -3
- package/src/components/src/side-panel/layer-manager.tsx +4 -2
- package/src/components/src/side-panel/layer-panel/color-scale-selector.tsx +22 -9
- package/src/components/src/side-panel/layer-panel/raster-tile-layer-configurator.tsx +2 -1
- package/src/constants/dist/default-settings.js +1 -1
- package/src/constants/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/56/48/71c2c5381c01c063c164e15fa04b4b1f3faae02e6727f2f2daf483e15205feca68334bad721af0c6f31abb20b56d60504623838127764aab6883912e7f71 +1 -0
- package/src/constants/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/e4/a7/04d0f645deb094cab21e70c2457f3b87750bee1dfea9b3ad1d4f746ae10ff013d960af8a46b1f87a10409989d6a352c21e29a8784a161a84f83a310955e2 +1 -0
- package/src/constants/node_modules/.cache/terser-webpack-plugin/index-v5/b2/5f/6daa692cacd1234803d6a5abefef0c49aae2d1403e4d8e53140088950a04 +2 -0
- package/src/constants/node_modules/.cache/terser-webpack-plugin/index-v5/bf/88/ea60c7619185516464a4ae21f51394966047bfdf190a5463de651c61931c +2 -0
- package/src/constants/package.json +2 -2
- package/src/constants/umd/keplergl.min.js +1 -1
- package/src/deckgl-arrow-layers/package.json +2 -2
- package/src/deckgl-layers/package.json +4 -4
- package/src/duckdb/dist/index.d.ts +1 -0
- package/src/duckdb/dist/index.js +24 -2
- package/src/duckdb/dist/processors/data-processor.d.ts +8 -0
- package/src/duckdb/dist/processors/data-processor.js +23 -1
- package/src/duckdb/package.json +6 -6
- package/src/duckdb/src/index.ts +5 -0
- package/src/duckdb/src/processors/data-processor.ts +25 -1
- package/src/effects/package.json +5 -5
- package/src/layers/dist/raster-tile/gpu-utils.d.ts +11 -10
- package/src/layers/dist/raster-tile/gpu-utils.js +7 -6
- package/src/layers/dist/raster-tile/image.d.ts +4 -0
- package/src/layers/dist/raster-tile/image.js +30 -16
- package/src/layers/dist/raster-tile/raster-tile-layer.d.ts +4 -0
- package/src/layers/dist/raster-tile/raster-tile-layer.js +18 -6
- package/src/layers/dist/raster-tile/request-throttle.d.ts +1 -1
- package/src/layers/dist/raster-tile/request-throttle.js +17 -16
- package/src/layers/dist/raster-tile/types.d.ts +16 -0
- package/src/layers/dist/raster-tile/types.js +1 -1
- package/src/layers/dist/raster-tile/url.d.ts +1 -1
- package/src/layers/dist/raster-tile/url.js +5 -4
- package/src/layers/package.json +9 -9
- package/src/layers/src/raster-tile/gpu-utils.ts +96 -78
- package/src/layers/src/raster-tile/image.ts +35 -9
- package/src/layers/src/raster-tile/raster-tile-layer.ts +23 -5
- package/src/layers/src/raster-tile/request-throttle.ts +10 -5
- package/src/layers/src/raster-tile/types.ts +19 -1
- package/src/layers/src/raster-tile/url.ts +10 -3
- package/src/localization/package.json +1 -1
- package/src/processors/package.json +7 -7
- package/src/reducers/package.json +16 -16
- package/src/schemas/package.json +7 -7
- package/src/styles/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/21/4a/50f77069dbf70c6792dd82d4e149375a888e25ddddd3209e2db013be62091f79082291fa06eb518cccb111b09a778e2946c1fb7a27bb6e32f72da0ccf250 +1 -0
- package/src/styles/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/41/e3/d873c0efff87c4438d34d09be942ff6877947926c2309949e1eea8a58722c9ebf1e9451b44f62996d3590f398318e2fd17f19613445810226c8354b7d746 +1 -0
- package/src/styles/node_modules/.cache/terser-webpack-plugin/index-v5/9d/95/efc8c9f0bdd09b105646cf5e34b067e621726ceeb296771ff7da9e2e03b4 +2 -0
- package/src/styles/node_modules/.cache/terser-webpack-plugin/index-v5/c5/b6/9c4bdb089acc30ac8a16a6b9b93898757537f7017b2f725ddb832b4614d6 +2 -0
- package/src/styles/package.json +2 -2
- package/src/styles/umd/keplergl.min.js +1 -1
- package/src/table/dist/tileset/vector-tile-utils.js +9 -5
- package/src/table/package.json +5 -5
- package/src/table/src/tileset/vector-tile-utils.ts +9 -6
- package/src/tasks/package.json +2 -2
- package/src/types/package.json +1 -1
- package/src/utils/dist/application-config.js +5 -5
- package/src/utils/dist/data-scale-utils.js +35 -16
- package/src/utils/dist/data-utils.d.ts +1 -0
- package/src/utils/dist/data-utils.js +2 -1
- package/src/utils/package.json +4 -4
- package/src/utils/src/application-config.ts +4 -6
- package/src/utils/src/data-scale-utils.ts +34 -21
- package/src/utils/src/data-utils.ts +1 -0
- package/umd/keplergl.min.js +1240 -1220
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
getLegendOfScale,
|
|
14
14
|
initCustomPaletteByCustomScale,
|
|
15
15
|
histogramFromValues,
|
|
16
|
+
histogramFromOrdinal,
|
|
16
17
|
histogramFromThreshold,
|
|
17
18
|
getHistogramDomain,
|
|
18
19
|
hasColorMap
|
|
@@ -176,8 +177,17 @@ function ColorScaleSelectorFactory(
|
|
|
176
177
|
: idx => dataset.dataContainer.rowAsArray(idx);
|
|
177
178
|
}, [dataset, field]);
|
|
178
179
|
|
|
180
|
+
const ordinalDomain = useMemo(() => {
|
|
181
|
+
return layer.config[layer.visualChannels[channelKey].domain] || [];
|
|
182
|
+
}, [channelKey, layer.config, layer.visualChannels]);
|
|
183
|
+
|
|
179
184
|
// aggregatedBins should be the raw data
|
|
180
185
|
const allBins = useMemo(() => {
|
|
186
|
+
if (field?.type === ALL_FIELD_TYPES.string) {
|
|
187
|
+
// Use ordinal bins for string columns, as d3 could potentially generate invalid numeric bins, and crash
|
|
188
|
+
return histogramFromOrdinal(ordinalDomain, dataset.allIndexes, fieldValueAccessor);
|
|
189
|
+
}
|
|
190
|
+
|
|
181
191
|
if (aggregatedBins) {
|
|
182
192
|
return histogramFromValues(
|
|
183
193
|
Object.values(aggregatedBins).map(bin => bin.i),
|
|
@@ -188,16 +198,12 @@ function ColorScaleSelectorFactory(
|
|
|
188
198
|
return columnStats?.bins
|
|
189
199
|
? columnStats?.bins
|
|
190
200
|
: histogramFromValues(dataset.allIndexes, HISTOGRAM_BINS, fieldValueAccessor);
|
|
191
|
-
}, [aggregatedBins, columnStats, dataset, fieldValueAccessor]);
|
|
201
|
+
}, [aggregatedBins, columnStats, dataset, fieldValueAccessor, field?.type, ordinalDomain]);
|
|
192
202
|
|
|
193
203
|
const histogramDomain = useMemo(() => {
|
|
194
204
|
return getHistogramDomain({aggregatedBins, columnStats, dataset, fieldValueAccessor});
|
|
195
205
|
}, [dataset, fieldValueAccessor, aggregatedBins, columnStats]);
|
|
196
206
|
|
|
197
|
-
const ordinalDomain = useMemo(() => {
|
|
198
|
-
return layer.config[layer.visualChannels[channelKey].domain] || [];
|
|
199
|
-
}, [channelKey, layer.config, layer.visualChannels]);
|
|
200
|
-
|
|
201
207
|
const isFiltered = aggregatedBins
|
|
202
208
|
? false
|
|
203
209
|
: dataset.filteredIndexForDomain.length !== dataset.allIndexes.length;
|
|
@@ -207,16 +213,23 @@ function ColorScaleSelectorFactory(
|
|
|
207
213
|
if (!isFiltered) {
|
|
208
214
|
return allBins;
|
|
209
215
|
}
|
|
210
|
-
|
|
216
|
+
if (field?.type === ALL_FIELD_TYPES.string) {
|
|
217
|
+
return histogramFromOrdinal(
|
|
218
|
+
ordinalDomain as any,
|
|
219
|
+
dataset.filteredIndexForDomain,
|
|
220
|
+
fieldValueAccessor
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
// numeric thresholds
|
|
211
224
|
const filterEmptyBins = false;
|
|
212
|
-
const
|
|
225
|
+
const thresholds = allBins.map(b => b.x0);
|
|
213
226
|
return histogramFromThreshold(
|
|
214
|
-
|
|
227
|
+
thresholds,
|
|
215
228
|
dataset.filteredIndexForDomain,
|
|
216
229
|
fieldValueAccessor,
|
|
217
230
|
filterEmptyBins
|
|
218
231
|
);
|
|
219
|
-
}, [dataset, fieldValueAccessor, allBins, isFiltered]);
|
|
232
|
+
}, [dataset, fieldValueAccessor, allBins, isFiltered, field?.type, ordinalDomain]);
|
|
220
233
|
|
|
221
234
|
const onSelectScale = useCallback(
|
|
222
235
|
val => {
|
|
@@ -336,7 +336,8 @@ function RasterTileLayerConfiguratorFactory(
|
|
|
336
336
|
|
|
337
337
|
const elevationUI = (
|
|
338
338
|
<>
|
|
339
|
-
{
|
|
339
|
+
{(stac.rasterServerSupportsElevation ??
|
|
340
|
+
getApplicationConfig().rasterServerSupportsElevation) &&
|
|
340
341
|
stac.rasterTileServerUrls?.length && (
|
|
341
342
|
<LayerConfigGroup
|
|
342
343
|
{...(layer.visConfigSettings.enableTerrain || {label: 'layer.color'})}
|
|
@@ -101,7 +101,7 @@ var KEPLER_GL_NAME = exports.KEPLER_GL_NAME = 'kepler.gl';
|
|
|
101
101
|
// Since we are injecting this during the build process with babel
|
|
102
102
|
// while developing VERSION is not defined, we capture the exception and return
|
|
103
103
|
// an empty string which will allow us to retrieve the latest umd version
|
|
104
|
-
var KEPLER_GL_VERSION = exports.KEPLER_GL_VERSION = "3.
|
|
104
|
+
var KEPLER_GL_VERSION = exports.KEPLER_GL_VERSION = "3.2.0";
|
|
105
105
|
var KEPLER_GL_WEBSITE = exports.KEPLER_GL_WEBSITE = 'http://kepler.gl/';
|
|
106
106
|
var DIMENSIONS = exports.DIMENSIONS = {
|
|
107
107
|
sidePanel: {
|