Skip to content

Commit 2cd7a85

Browse files
authored
[chore] fix missing dependencies in workspaces (#2856)
- fix missing dependencies in workspaces - fix circular dependencies - fix types - fixes for release Signed-off-by: Ihor Dykhta <[email protected]>
1 parent 6804129 commit 2cd7a85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+204
-91
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"analyze:bundle": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack/bundle.js --progress --env.prod",
8181
"check-licence": "babel-node ./scripts/license-header/bin --license ./FILE-HEADER --dry",
8282
"add-licence": "babel-node ./scripts/license-header/bin --license ./FILE-HEADER",
83-
"prepublishOnly": "yarn workspaces foreach -A run stab && yarn workspaces foreach -A run prepublish && yarn add-licence && yarn build:umd && yarn build:types",
83+
"prepublishOnly": "yarn workspaces foreach -At run stab && yarn workspaces foreach -At run prepublishOnly && yarn add-licence && yarn build:umd && yarn build:types",
8484
"docs": "babel-node ./scripts/documentation.js",
8585
"typedoc": "typedoc --theme markdown --out typedoc --inputFiles ./src/reducers --inputFiles ./src/actions --excludeExternals --excludeNotExported --excludePrivate",
8686
"example-version": "babel-node ./scripts/edit-version.js",

src/actions/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
"@kepler.gl/constants": "3.1.0-alpha.2",
3636
"@kepler.gl/layers": "3.1.0-alpha.2",
3737
"@kepler.gl/processors": "3.1.0-alpha.2",
38+
"@kepler.gl/table": "3.1.0-alpha.2",
3839
"@kepler.gl/types": "3.1.0-alpha.2",
40+
"@kepler.gl/utils": "3.1.0-alpha.2",
3941
"@reduxjs/toolkit": "^1.7.2",
4042
"@types/lodash.curry": "^4.1.7",
4143
"@types/react-redux": "^7.1.23",

src/actions/src/vis-state-actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {PickInfo} from '@deck.gl/core/lib/deck';
66
import {default as ActionTypes} from './action-types';
77
import {FileCacheItem} from '@kepler.gl/processors';
88
import {Layer, LayerBaseConfig} from '@kepler.gl/layers';
9+
import {KeplerTable} from '@kepler.gl/table';
910
import {
1011
AddDataToMapPayload,
1112
ValueOf,
@@ -25,7 +26,6 @@ import {
2526
} from '@kepler.gl/types';
2627
import {createAction} from '@reduxjs/toolkit';
2728

28-
import {KeplerTable} from '@kepler.gl/table';
2929
// TODO - import LoaderObject type from @loaders.gl/core when supported
3030
// TODO - import LoadOptions type from @loaders.gl/core when supported
3131

@@ -1598,7 +1598,7 @@ export function setTimeFilterSyncTimelineMode({
15981598
}
15991599

16001600
export type CreateNewDatasetSuccessPayload = {
1601-
results: (PromiseFulfilledResult<KeplerTable<any>> | PromiseRejectedResult)[];
1601+
results: (PromiseFulfilledResult<KeplerTable> | PromiseRejectedResult)[];
16021602
addToMapOptions: AddDataToMapPayload['options'];
16031603
};
16041604

src/ai-assistant/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"color-interpolate": "^1.0.5",
4040
"echarts": "^5.5.1",
4141
"global": "^4.3.0",
42-
"react-ai-assist": "0.0.20"
42+
"react-ai-assist": "0.0.20",
43+
"react-intl": "^6.3.0"
4344
},
4445
"nyc": {
4546
"sourceMap": false,

src/common-utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@kepler.gl/types": "3.1.0-alpha.2",
3535
"d3-array": "^2.8.0",
3636
"global": "^4.3.0",
37+
"h3-js": "^3.1.0",
3738
"type-analyzer": "0.4.0"
3839
},
3940
"nyc": {

src/components/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
"@kepler.gl/table": "3.1.0-alpha.2",
5252
"@kepler.gl/types": "3.1.0-alpha.2",
5353
"@kepler.gl/utils": "3.1.0-alpha.2",
54+
"@loaders.gl/mvt": "^4.3.2",
55+
"@loaders.gl/pmtiles": "^4.3.2",
5456
"@mapbox/mapbox-sdk": "^0.15.3",
5557
"@nebula.gl/edit-modes": "1.0.2-alpha.1",
5658
"@tippyjs/react": "^4.2.0",
@@ -124,6 +126,7 @@
124126
"redux": "^4.2.1",
125127
"reselect": "^4.0.0",
126128
"styled-components": "^4.1.3",
129+
"suncalc": "^1.9.0",
127130
"viewport-mercator-project": "^6.0.0"
128131
},
129132
"nyc": {

src/components/src/common/color-legend.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
// Copyright contributors to the kepler.gl project
33

4-
import {ColorRange} from '@kepler.gl/constants';
4+
import {ColorRange} from '@kepler.gl/types';
55
import {Layer} from '@kepler.gl/layers';
66
import {HexColor, MapState} from '@kepler.gl/types';
77
import {

src/components/src/map/layer-hover-info.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const Row: React.FC<RowProps> = ({name, value, deltaValue, url}) => {
8989
{notNullorUndefined(deltaValue) ? (
9090
<span
9191
className={`row__delta-value ${
92-
deltaValue.toString().charAt(0) === '+' ? 'positive' : 'negative'
92+
deltaValue?.toString().charAt(0) === '+' ? 'positive' : 'negative'
9393
}`}
9494
>
9595
{deltaValue}

src/components/src/side-panel/layer-panel/color-range-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
import React, {MouseEvent, useCallback, useMemo} from 'react';
55
import styled from 'styled-components';
6-
import {KEPLER_COLOR_PALETTES, PALETTE_TYPES, ColorRange, ColorPalette} from '@kepler.gl/constants';
6+
import {KEPLER_COLOR_PALETTES, PALETTE_TYPES, ColorPalette} from '@kepler.gl/constants';
77
import {FormattedMessage} from '@kepler.gl/localization';
8-
import {ColorUI, NestedPartial} from '@kepler.gl/types';
8+
import {ColorRange, ColorUI, NestedPartial} from '@kepler.gl/types';
99
import {
1010
hasColorMap,
1111
updateColorRangeBySelectedPalette,

src/components/src/side-panel/layer-panel/color-scale-selector.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,26 @@
44
import React, {useCallback, useMemo, useState} from 'react';
55
import styled from 'styled-components';
66

7-
import {Accessor, DropdownList, LazyTippy, Typeahead} from '@kepler.gl/components';
8-
import {ColorRange, SCALE_TYPES} from '@kepler.gl/constants';
7+
import {SCALE_TYPES} from '@kepler.gl/constants';
98
import {Layer, VisualChannelDomain} from '@kepler.gl/layers';
10-
import {ColorUI, Field, NestedPartial} from '@kepler.gl/types';
11-
import {colorBreaksToColorMap, getLayerColorScale, getLegendOfScale, hasColorMap} from '@kepler.gl/utils';
9+
import {KeplerTable} from '@kepler.gl/table';
10+
import {ColorRange, ColorUI, Field, NestedPartial} from '@kepler.gl/types';
11+
import {
12+
colorBreaksToColorMap,
13+
getLayerColorScale,
14+
getLegendOfScale,
15+
hasColorMap
16+
} from '@kepler.gl/utils';
17+
1218
import ColorBreaksPanelFactory, {ColorBreaksPanelProps} from './color-breaks-panel';
1319
import {SetColorUIFunc} from './custom-palette';
1420
import DropdownSelect from '../../common/item-selector/dropdown-select';
15-
import {KeplerTable} from '@kepler.gl/table';
16-
import type {Instance as TippyInstance} from 'tippy.js';
21+
import Accessor from '../../common/item-selector/accessor';
22+
import DropdownList from '../../common/item-selector/dropdown-list';
23+
import LazyTippy from '../../map/lazy-tippy';
24+
import Typeahead from '../../common/item-selector/typeahead';
25+
26+
type TippyInstance = any; // 'tippy-js'
1727

1828
export type ScaleOption = {
1929
label: string;

src/components/src/side-panel/layer-panel/color-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
// Copyright contributors to the kepler.gl project
33

4-
import {ColorRange} from '@kepler.gl/constants';
4+
import {ColorRange} from '@kepler.gl/types';
55
import {ColorUI, NestedPartial, RGBAColor, RGBColor} from '@kepler.gl/types';
66
import {rgbToHex} from '@kepler.gl/utils';
77
import React, {MouseEvent, ComponentType, useState, useCallback} from 'react';

src/components/src/side-panel/layer-panel/custom-palette.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import {
2121
import styled, {StyledComponent, css} from 'styled-components';
2222
import Portaled from '../../common/portaled';
2323

24-
import {ColorMap, KeyEvent} from '@kepler.gl/constants';
25-
import {ColorUI, HexColor, NestedPartial} from '@kepler.gl/types';
24+
import {KeyEvent} from '@kepler.gl/constants';
25+
import {ColorMap, ColorUI, HexColor, NestedPartial} from '@kepler.gl/types';
2626
import {colorMapToColorBreaks, isNumericColorBreaks} from '@kepler.gl/utils';
2727
import {
2828
addCustomPaletteColor,
@@ -435,9 +435,10 @@ function CustomPaletteFactory(): React.FC<CustomPaletteProps> {
435435
}) => {
436436
const [isSorting, setIsSorting] = useState(false);
437437
const {colors, colorMap} = customPalette;
438-
const colorBreaks = useMemo(() => (colorMap ? colorMapToColorBreaks(colorMap) : null), [
439-
colorMap
440-
]);
438+
const colorBreaks = useMemo(
439+
() => (colorMap ? colorMapToColorBreaks(colorMap) : null),
440+
[colorMap]
441+
);
441442

442443
const onPickerUpdate = useCallback(
443444
color => {

src/components/src/side-panel/layer-panel/layer-color-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import React, {useCallback} from 'react';
55

6-
import {ColorRange} from '@kepler.gl/constants';
6+
import {ColorRange} from '@kepler.gl/types';
77
import {Layer} from '@kepler.gl/layers';
88
import {NestedPartial, RGBColor, ColorUI} from '@kepler.gl/types';
99

src/components/src/side-panel/layer-panel/single-color-palette.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import classnames from 'classnames';
77

88
import {hexToRgb} from '@kepler.gl/utils';
99
import {FormattedMessage} from '@kepler.gl/localization';
10-
import {Themes, ColorRange} from '@kepler.gl/constants';
11-
import {RGBColor, HexColor} from '@kepler.gl/types';
10+
import {Themes} from '@kepler.gl/constants';
11+
import {ColorRange, HexColor, RGBColor} from '@kepler.gl/types';
1212

1313
import CustomPicker from './custom-picker';
1414
import PresetColorPalette from './color-palette-preset';

src/components/src/side-panel/layer-panel/text-label-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
// Copyright contributors to the kepler.gl project
33

4-
import {ColorRange} from '@kepler.gl/constants';
4+
import {ColorRange} from '@kepler.gl/types';
55
import {FormattedMessage} from '@kepler.gl/localization';
66
import React, {Component} from 'react';
77
import styled from 'styled-components';

src/constants/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@
3030
"umd"
3131
],
3232
"dependencies": {
33+
"@dnd-kit/core": "^6.0.8",
34+
"@dnd-kit/modifiers": "^6.0.1",
3335
"@kepler.gl/types": "3.1.0-alpha.2",
3436
"@types/d3-scale": "^3.2.2",
3537
"@types/keymirror": "^0.1.1",
3638
"chroma-js": "2.1.2",
3739
"colorbrewer": "^1.5.0",
40+
"d3-array": "^2.8.0",
41+
"d3-color": "^2.0.0",
3842
"d3-scale": "^3.2.3",
3943
"d3-scale-chromatic": "2.0.0",
44+
"d3-time": "^2.0.0",
4045
"global": "^4.3.0",
4146
"keymirror": "^0.1.1"
4247
},
@@ -55,5 +60,8 @@
5560
"node": "18.18.2",
5661
"yarn": "4.4.0"
5762
},
58-
"packageManager": "[email protected]"
63+
"packageManager": "[email protected]",
64+
"devDependencies": {
65+
"@types/d3-time": "^2"
66+
}
5967
}

src/constants/src/color-palettes.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import {range} from 'd3-array';
66
import chroma from 'chroma-js';
77
import Console from 'global/console';
88
import {color as d3Color} from 'd3-color';
9-
import {HexColor, ValueOf} from '@kepler.gl/types';
10-
import {MiniColorRange} from './layers';
9+
import {HexColor, MiniColorRange, ValueOf} from '@kepler.gl/types';
1110

1211
type GetColors = (steps: number) => HexColor[];
1312
// linear interpolator

src/constants/src/layers.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,15 @@ import {
99
DEFAULT_LAYER_COLOR_PALETTE_STEPS
1010
} from './default-settings';
1111
import {
12+
ColorRange,
1213
ColorUI,
13-
HexColor,
1414
LayerTextConfig,
1515
LayerTextLabel,
1616
LayerVisConfigSettings,
1717
RGBAColor
1818
} from '@kepler.gl/types';
1919
import {ColorPalette, KEPLER_COLOR_PALETTES, colorPaletteToColorRange} from './color-palettes';
2020

21-
export type ColorMap = [string[] | string | number | null, HexColor][];
22-
// Key is HexColor but as key we can use only string
23-
export type ColorLegends = {[key: HexColor]: string};
24-
25-
export type ColorRange = {
26-
name?: string;
27-
type?: string;
28-
category?: string;
29-
colors: HexColor[];
30-
reversed?: boolean;
31-
colorMap?: ColorMap;
32-
colorLegends?: ColorLegends;
33-
};
34-
35-
export type MiniColorRange = {
36-
name: string;
37-
type: string;
38-
category: string;
39-
colors: HexColor[];
40-
};
41-
4221
export type AggregationTypes = keyof typeof AGGREGATION_TYPES;
4322

4423
export const PROPERTY_GROUPS = keyMirror({

src/deckgl-layers/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@types/supercluster": "^7.1.0",
4949
"d3-array": "^2.8.0",
5050
"global": "^4.3.0",
51+
"lodash": "4.17.19",
5152
"lodash.memoize": "^4.1.2",
5253
"pbf": "^3.1.0",
5354
"supercluster": "^7.1.0",

src/deckgl-layers/src/svg-icon-layer/svg-icon-layer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// SPDX-License-Identifier: MIT
22
// Copyright contributors to the kepler.gl project
33

4-
import {CompositeLayer} from '@deck.gl/core';
4+
import {CompositeLayer, Position} from '@deck.gl/core';
55
import {CompositeLayerProps} from '@deck.gl/core/lib/composite-layer';
6-
import {Position, RGBAColor} from 'deck.gl';
7-
import {RGBColor} from '@kepler.gl/types';
6+
7+
import {RGBColor, RGBAColor} from '@kepler.gl/types';
88
import ScatterplotIconLayer from './scatterplot-icon-layer';
99

1010
// default icon geometry is a square

src/effects/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@
3131
],
3232
"dependencies": {
3333
"@deck.gl/core": "^8.9.27",
34+
"@kepler.gl/common-utils": "3.1.0-alpha.2",
3435
"@kepler.gl/constants": "3.1.0-alpha.2",
3536
"@kepler.gl/types": "3.1.0-alpha.2",
3637
"@kepler.gl/utils": "3.1.0-alpha.2",
3738
"@luma.gl/core": "^8.5.20",
3839
"@luma.gl/shadertools": "^8.5.20",
40+
"moment-timezone": "^0.5.35",
3941
"suncalc": "^1.9.0"
4042
},
4143
"nyc": {

src/effects/src/custom-deck-lighting-effect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// @ts-nocheck This is a hack, don't check types
55

6-
import {console as Console} from 'global/window';
6+
// import {console as Console} from 'global/window';
77
import {LightingEffect, shadow} from '@deck.gl/core';
88
import {Texture2D, ProgramManager} from '@luma.gl/core';
99

@@ -18,7 +18,7 @@ import {Texture2D, ProgramManager} from '@luma.gl/core';
1818
export function insertBefore(vs, type, insertBeforeText, textToInsert) {
1919
const at = vs.indexOf(insertBeforeText);
2020
if (at < 0) {
21-
Console.error(`Cannot edit ${type} layer shader`);
21+
// Console.error(`Cannot edit ${type} layer shader`);
2222
return vs;
2323
}
2424

src/layers/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,19 @@
6666
"@types/lodash.memoize": "^4.1.7",
6767
"@types/lodash.uniq": "^4.5.7",
6868
"@types/styled-components": "^5.1.25",
69+
"apache-arrow": ">=15.0.0",
70+
"d3-array": "^2.8.0",
6971
"d3-shape": "^1.2.0",
7072
"global": "^4.3.0",
7173
"keymirror": "^0.1.1",
7274
"lodash.memoize": "^4.1.2",
75+
"lodash.throttle": "^4.1.1",
7376
"lodash.uniq": "^4.0.1",
7477
"long": "^4.0.0",
7578
"prop-types": "^15.6.0",
7679
"react": "^18.2.0",
80+
"react-intl": "^6.3.0",
81+
"react-markdown": "^6.0.3",
7782
"reselect": "^4.0.0",
7883
"s2-geometry": "^1.2.10",
7984
"styled-components": "^4.1.3",

src/layers/src/aggregation-layer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import {
1515
HIGHLIGH_COLOR_3D,
1616
CHANNEL_SCALES,
1717
FIELD_OPTS,
18-
DEFAULT_AGGREGATION,
19-
ColorRange
18+
DEFAULT_AGGREGATION
2019
} from '@kepler.gl/constants';
21-
import {Field, LayerColumn, Merge} from '@kepler.gl/types';
20+
import {ColorRange, Field, LayerColumn, Merge} from '@kepler.gl/types';
2221
import {KeplerTable, Datasets} from '@kepler.gl/table';
2322

2423
type AggregationLayerColumns = {

src/layers/src/arc-layer/arc-layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ import ArcLayerIcon from './arc-layer-icon';
2626
import {isLayerHoveredFromArrow, createGeoArrowPointVector, getFilteredIndex} from '../layer-utils';
2727
import {
2828
DEFAULT_LAYER_COLOR,
29-
ColorRange,
3029
PROJECTED_PIXEL_SIZE_MULTIPLIER,
3130
ALL_FIELD_TYPES
3231
} from '@kepler.gl/constants';
3332

3433
import {
34+
ColorRange,
3535
RGBColor,
3636
Merge,
3737
VisConfigColorRange,

src/layers/src/base-layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
ALL_FIELD_TYPES,
1717
CHANNEL_SCALES,
1818
CHANNEL_SCALE_SUPPORTED_FIELDS,
19-
ColorRange,
2019
DEFAULT_COLOR_UI,
2120
DEFAULT_HIGHLIGHT_COLOR,
2221
DEFAULT_LAYER_LABEL,
@@ -46,6 +45,7 @@ import {
4645
import {generateHashId, toArray, notNullorUndefined} from '@kepler.gl/common-utils';
4746
import {Datasets, GpuFilter, KeplerTable} from '@kepler.gl/table';
4847
import {
48+
ColorRange,
4949
ColorUI,
5050
Field,
5151
Filter,

0 commit comments

Comments
 (0)