-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chore]: Technical: Isolate reducers (#1961)
* Reducers isolation Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com> * Imports cleaning Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com> Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
- Loading branch information
1 parent
28578e7
commit 57dea6a
Showing
74 changed files
with
272 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Upgrade Guide (Data Containers) | ||
|
||
### Major changes | ||
- `KeplerTable.allData: any[][]` is substituted with `KeplerTable.dataContainer: DataContainerInterface`. | ||
|
||
### Step by step upgrade | ||
| File | Function | Change | | ||
| ---- | --- | --- | | ||
| base-layer.js & extended layers | accessors | Accessors in default Kepler layers now expect a data container as one of parameters: ```const pointPosAccessor = config => dc => d => {return ...}``` where `dc` is an instance of `DataContainerInterface`, and `d` is an object that is expected to contain an index of a row in the data container. | | ||
| | updateLayerMeta() | 1st parameter has to be an instance of `DataContainerInterface`. | | ||
| | getPointsBounds() | 1st parameter has to be an instance of `DataContainerInterface`. | | ||
| | calculateDataAttribute() | 1st parameter has to be an instance of `KeplerTable`. | | ||
| | getAttributeAccessors() | 1st parameter is now an object that to contains `dataContainer: : DataContainerInterface`. | | ||
| | getHoverData() | New 2nd parameter, an instance of `DataContainerInterface`. | | ||
| | getPositionAccessor() | 1st parameter has to be an instance of `DataContainerInterface`. | | ||
| | setInitialLayerConfig() | 1st parameter is now object expected to contain `dataContainer: : DataContainerInterface`. | | ||
| | findDefaultLayerProps() | 2nd parameter has to be an instance of `DataContainerInterface`. | | ||
| cell-size.js | renderedSize() | `text.rows` is substituted with `text.dataContainer: DataContainerInterface`. | | ||
| data-table/index.js | | `DataTable.props.rows` is substituted with `DataTable.props.dataContainer: DataContainerInterface`. | | ||
| layer-text-label.js | formatTextLabelData() | `dataContainer: DataContainerInterface` is expected as part of the 1st parameter. | | ||
| geojson-utils.js | getGeojsonDataMaps() | 1st parameter has to be an instance of `DataContainerInterface`. | | ||
| h3-utils.js | isHexField() | 3rd parameter has to be an instance of `DataContainerInterface`. | | ||
| | getHexFields() | 2nd parameter has to be an instance of `DataContainerInterface`. | | ||
| mapbox-utils.js | geoJsonFromData() | `allData` is removed from the parameter list. `getGeometry`, `getProperties` parameters expect `{index}` object as input parameter. | | ||
| trip-utils.js | isTripGeoJsonField() | 1st parameter has to be an instance of `DataContainerInterface`. | | ||
| data-processor.js | formatCsv() | `data` parameter has to be an instance of `DataContainerInterface`. | | ||
| data-scale-utils.js | getOrdinalDomain() | 1st parameter has to be an instance of `DataContainerInterface`. | | ||
| filter-utils.js | getFilterFunction() | New 5th parameter, an instance of `DataContainerInterface`. Returned function expects `{index}` object as 1st parameter. | | ||
| | filterDataByFilterTypes() | 2nd parameter has to be an instance of `DataContainerInterface`. | | ||
| | getTimestampFieldDomain() | 1st parameter has to be an instance of `DataContainerInterface`. valueAccessor parameter expects a function that accepts `{index}` object as 1st parameter. | | ||
| | getNumericFieldDomain() | 1st parameter has to be an instance of `DataContainerInterface`. valueAccessor parameter expects a function that accepts `{index}` object as 1st parameter. | | ||
| | getPolygonFilterFunctor() | New 3rd parameter, an instance of `DataContainerInterface`. | | ||
| interaction-utils.js | getTooltipDisplayDeltaValue() | data and primaryData parameters are now of `DataRow` type. | | ||
| | getTooltipDisplayValue() | data parameter is now of `DataRow` type. | | ||
| comparison-utils.js | cmpGpuFilterProp() | New 4th parameter, an instance of `DataContainerInterface`. | | ||
| gpu-filter-utils.js | getGpuFilterProps() | Returned function now expects a data container. ```dc => (getIndex, getData) => d => {...}``` as parameter to the first call. | | ||
| data-utils.js | maybeToDate() | New 4th parameter, an instance of `DataContainerInterface`. | | ||
| kepler-table.js | Field.valueAccessor() | 1st parameter is expected to be an object that contain index property. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// 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. | ||
|
||
const KeplerPackage = require('./package'); | ||
|
||
const PRESETS = ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript']; | ||
const PLUGINS = [ | ||
['@babel/plugin-transform-typescript', {isTSX: true, allowDeclareFields: true}], | ||
'@babel/plugin-transform-modules-commonjs', | ||
'@babel/plugin-proposal-class-properties', | ||
'@babel/plugin-proposal-export-namespace-from', | ||
'@babel/plugin-proposal-optional-chaining', | ||
[ | ||
'@babel/transform-runtime', | ||
{ | ||
regenerator: true | ||
} | ||
], | ||
[ | ||
'search-and-replace', | ||
{ | ||
rules: [ | ||
{ | ||
search: '__PACKAGE_VERSION__', | ||
replace: KeplerPackage.version | ||
} | ||
] | ||
} | ||
] | ||
]; | ||
const ENV = { | ||
test: { | ||
plugins: ['istanbul'] | ||
}, | ||
debug: { | ||
sourceMaps: 'inline', | ||
retainLines: true | ||
} | ||
}; | ||
|
||
module.exports = function babel(api) { | ||
api.cache(true); | ||
|
||
return { | ||
presets: PRESETS, | ||
plugins: PLUGINS, | ||
env: ENV | ||
}; | ||
}; |
Oops, something went wrong.