Skip to content

Commit

Permalink
[Feat]: Technical: Translate constants to typescript (#1697)
Browse files Browse the repository at this point in the history
* Constants updated

Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>

* Test configuration fix

Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
  • Loading branch information
dariaterekhova-actionengine committed Feb 8, 2022
1 parent 283586d commit 11c5b4c
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 552 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"@turf/bbox": "^6.0.1",
"@turf/boolean-within": "^6.0.1",
"@turf/helpers": "^6.1.4",
"@types/keymirror": "^0.1.1",
"classnames": "^2.2.1",
"colorbrewer": "^1.5.0",
"copy-to-clipboard": "^3.3.1",
Expand Down
137 changes: 0 additions & 137 deletions src/constants/action-types.d.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {VizColorPalette} from './custom-color-ranges';
// See http://colorbrewer2.org/

const colorBrewerMap = Object.entries(colorbrewer.schemeGroups).reduce(
(accu, [type, palettes]) => ({
(accu, [type, palettes]: [string, any]) => ({
...accu,
...palettes.reduce(
(group, name) => ({
Expand All @@ -42,12 +42,12 @@ const colorRanges = [...VizColorPalette];

for (const [keyName, colorScheme] of Object.entries(colorbrewer)) {
if (keyName !== 'schemeGroups') {
for (const [lenKey, colors] of Object.entries(colorScheme)) {
for (const [lenKey, colors] of Object.entries(colorScheme as any)) {
colorRanges.push({
name: `ColorBrewer ${keyName}-${lenKey}`,
type: colorBrewerMap[keyName],
category: 'ColorBrewer',
colors
colors: colors as any
});
}
}
Expand Down
File renamed without changes.

0 comments on commit 11c5b4c

Please sign in to comment.