Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Li <[email protected]>
  • Loading branch information
lixun910 committed Nov 2, 2023
1 parent a4ae70a commit 27d0043
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 495 deletions.
10 changes: 3 additions & 7 deletions examples/webpack.config.local.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ function makeLocalDevConfig(env, EXAMPLE_DIR = LIB_DIR, externals = {}) {
enforce: 'pre',
exclude: [/node_modules\/react-palm/, /node_modules\/react-data-grid/]
},
// for compiling apache-arrow ESM module
{
test: /\.mjs$/,
include: /node_modules/,
include: /node_modules\/apache-arrow/,
type: 'javascript/auto'
}
]
Expand Down Expand Up @@ -255,12 +256,7 @@ function addBabelSettings(env, config, exampleDir) {
...config.module,
rules: [
...config.module.rules.filter(r => r.loader !== 'babel-loader'),
makeBabelRule(env, exampleDir),
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
}
makeBabelRule(env, exampleDir)
]
}
};
Expand Down
12 changes: 1 addition & 11 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import '@testing-library/jest-dom';
import * as Utils from '@kepler.gl/utils';
require('@loaders.gl/polyfills');

jest.mock('mapbox-gl/dist/mapbox-gl', () => ({
Map: () => ({})
Expand All @@ -30,14 +31,3 @@ jest.mock('@kepler.gl/utils', () => ({
hasPortableWidth: jest.fn(),
hasMobileWidth: jest.fn()
}));

// TextEncoder / TextDecoder APIs are used by arrow, but are not provided by
// jsdom, all node versions supported provide these via the util module
if (
typeof globalThis.TextEncoder === "undefined" ||
typeof globalThis.TextDecoder === "undefined"
) {
const utils = require("util");
globalThis.TextEncoder = utils.TextEncoder;
globalThis.TextDecoder = utils.TextDecoder;
}
2 changes: 1 addition & 1 deletion src/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"@types/lodash.throttle": "^4.1.7",
"@types/lodash.uniq": "^4.5.7",
"@types/lodash.uniqby": "^4.7.7",
"@types/react": "^18.0.28",
"@types/react-copy-to-clipboard": "^5.0.2",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@types/react-lifecycles-compat": "^3.0.1",
"@types/react-map-gl": "^6.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,15 @@ export default function LayerConfiguratorFactory(
);
}

/**
* Render layer configurator for GeoArrow layer (reuse the Geojson layer configurator)
* @param props - LayerConfiguratorProps
* @param props.layer - Layer
* @param props.visConfiguratorProps - VisConfiguratorProps
* @param props.layerConfiguratorProps - LayerConfiguratorProps
* @param props.layerChannelConfigProps - LayerChannelConfigProps
* @returns {JSX.Element} - Layer configurator for GeoArrow layer
*/
_renderGeoarrowLayerConfig(props) {
return this._renderGeojsonLayerConfig(props);
}
Expand Down
2 changes: 1 addition & 1 deletion src/deckgl-layers/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PRESETS = ['@babel/preset-env', '@babel/preset-react', '@babel/preset-type
const PLUGINS = [
['@babel/plugin-transform-typescript', {isTSX: true, allowDeclareFields: true}],
'@babel/plugin-transform-modules-commonjs',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-class-properties', // for static class properties
'@babel/plugin-proposal-optional-chaining',
[
'@babel/transform-runtime',
Expand Down
54 changes: 0 additions & 54 deletions src/deckgl-layers/src/geojson-layer/filter-arrow-layer.ts

This file was deleted.

39 changes: 0 additions & 39 deletions src/deckgl-layers/src/geojson-layer/filter-shader-module.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/deckgl-layers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export {default as EnhancedGridLayer} from './grid-layer/enhanced-cpu-grid-layer
export {default as EnhancedHexagonLayer} from './hexagon-layer/enhanced-hexagon-layer';
export {default as EnhancedLineLayer} from './line-layer/line-layer';
export {default as SvgIconLayer} from './svg-icon-layer/svg-icon-layer';
export {default as FilterArrowExtension} from './geojson-layer/filter-arrow-layer';
export {default as FilterArrowExtension} from './deckgl-extensions/filter-arrow-layer';

export * from './layer-utils/shader-utils';

Expand Down
Loading

0 comments on commit 27d0043

Please sign in to comment.