Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Chore]: Technical: fix linting errors of @types/styled-components plugin (#1834)

jagerts69f8534d33ad
diff --git a/package.json b/package.json
index f5c0a2c5c..adc481087 100644
--- a/package.json
+++ b/package.json
@@ -127,6 +127,7 @@
"@types/react-redux": "^7.1.23",
"@types/react-virtualized": "^9.21.20",
"@types/react-vis": "^1.8.0",
+ "@types/styled-components": "^5.1.25",
"classnames": "^2.2.1",
"colorbrewer": "^1.5.0",
"copy-to-clipboard": "^3.3.1",
diff --git a/src/components/common/animation-control/animation-control.tsx b/src/components/common/animation-control/animation-control.tsx
index 165c97503..bf95bb3ab 100644
--- a/src/components/common/animation-control/animation-control.tsx
+++ b/src/components/common/animation-control/animation-control.tsx
@@ -50,7 +50,7 @@ const AnimationWidgetInner = styled.div`
`;
const StyledDomain = styled.div.attrs(props => ({
- className: classnames('animation-control__time-domain', {[props.className]: props.className})
+ className: classnames('animation-control__time-domain', props.className)
}))`
color: ${props => props.theme.titleTextColor};
font-weight: 400;
diff --git a/src/components/common/animation-control/floating-time-display.tsx b/src/components/common/animation-control/floating-time-display.tsx
index 05d1e108c..456376eef 100644
--- a/src/components/common/animation-control/floating-time-display.tsx
+++ b/src/components/common/animation-control/floating-time-display.tsx
@@ -43,7 +43,7 @@ const StyledTimeDisplayWrapper = styled.div.attrs({
`;
const StyledTimeDisplay = styled.div.attrs(props => ({
- className: classnames('floating-time-display__inner', {[props.className]: props.className})
+ className: classnames('floating-time-display__inner', props.className)
}))`
background-color: ${props => props.theme.panelBackground};
border-radius: ${props => props.theme.timeDisplayBorderRadius}px;
diff --git a/src/components/common/animation-control/playback-controls.tsx b/src/components/common/animation-control/playback-controls.tsx
index 3cf7ae238..60602ee94 100644
--- a/src/components/common/animation-control/playback-controls.tsx
+++ b/src/components/common/animation-control/playback-controls.tsx
@@ -22,7 +22,7 @@ import React, {useState, useCallback} from 'react';
import styled from 'styled-components';
import classnames from 'classnames';
import {FormattedMessage} from 'localization';
-import {Button, Tooltip} from 'components/common/styled-components';
+import {Button, Tooltip, ButtonProps} from 'components/common/styled-components';
import AnimationSpeedSliderFactory from './animation-speed-slider';
import {Reset, Play, Pause, Rocket, AnchorWindow, FreeWindow} from 'components/common/icons';
import {ANIMATION_WINDOW} from 'constants/default-settings';
@@ -51,7 +51,7 @@ const StyledSpeedControl = styled.div`
}
`;
-interface IconButtonProps {
+interface IconButtonProps extends ButtonProps {
collapsed?: boolean;
}
diff --git a/src/components/common/dataset-label.tsx b/src/components/common/dataset-label.tsx
index 2ab0b69b6..684fc07b7 100644
--- a/src/components/common/dataset-label.tsx
+++ b/src/components/common/dataset-label.tsx
@@ -21,6 +21,7 @@
import React from 'react';
import styled from 'styled-components';
import {CenterFlexbox, DatasetSquare} from 'components/common/styled-components';
+import {RGBColor} from 'reducers';
const DatasetName = styled.div.attrs({
className: 'dataset-name'
@@ -32,14 +33,14 @@ const DatasetName = styled.div.attrs({
interface DatasetLabelType {
dataset: {
- color?: string;
- label?: string;
+ color: RGBColor;
+ label: string;
};
}
const DatasetLabel = ({dataset}: DatasetLabelType) => (
<CenterFlexbox>
- <DatasetSquare className="dataset-clolor" color={dataset.color} />
+ <DatasetSquare className="dataset-color" backgroundColor={dataset.color} />
<DatasetName>{dataset.label}</DatasetName>
</CenterFlexbox>
);
diff --git a/src/components/common/file-uploader/file-upload-progress.tsx b/src/components/common/file-uploader/file-upload-progress.tsx
index ba053b134..72f19c2e3 100644
--- a/src/components/common/file-uploader/file-upload-progress.tsx
+++ b/src/components/common/file-uploader/file-upload-progress.tsx
@@ -20,16 +20,15 @@
import React from 'react';
import styled, {withTheme} from 'styled-components';
+import classnames from 'classnames';
import ProgressBar from '../progress-bar';
import {TruncatedTitleText} from 'components/common/styled-components';
import {getError} from 'utils/utils';
import {FileLoadingProgress} from 'reducers/vis-state-updaters';
-/** @typedef {import('./file-upload-progress').FileUploadProgressProps} FileUploadProgressProps*/
-
-const StyledFileProgress = styled.div.attrs({
- className: 'file-upload__progress'
-})`
+const StyledFileProgress = styled.div.attrs(props => ({
+ className: classnames('file-upload__progress', props.className)
+}))`
color: ${props => props.theme.textColorLT};
font-size: 12px;
margin-top: 12px;
diff --git a/src/components/common/info-helper.tsx b/src/components/common/info-helper.tsx
index 548b7cd85..6e8c1c121 100644
--- a/src/components/common/info-helper.tsx
+++ b/src/components/common/info-helper.tsx
@@ -27,7 +27,7 @@ import styled from 'styled-components';
import {camelize} from 'utils/utils';
interface StyledInfoHelperProps {
- width: number;
+ width?: number;
}
const StyledInfoHelper = styled.div<StyledInfoHelperProps>`
diff --git a/src/components/common/item-selector/item-selector.tsx b/src/components/common/item-selector/item-selector.tsx
index 123b2ec12..e4dadf3b7 100644
--- a/src/components/common/item-selector/item-selector.tsx
+++ b/src/components/common/item-selector/item-selector.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {Component, ComponentType} from 'react';
+import React, {Component, ComponentType, MouseEventHandler} from 'react';
import classnames from 'classnames';
import uniqBy from 'lodash.uniqby';
import listensToClickOutside from 'react-onclickoutside';
@@ -232,12 +232,12 @@ class ItemSelector extends Component<ItemSelectorProps> {
}
};
- _onErase = e => {
+ _onErase: MouseEventHandler = e => {
e.stopPropagation();
this.props.onChange(null);
};
- _showTypeahead = e => {
+ _showTypeahead: MouseEventHandler = e => {
e.stopPropagation();
if (!this.props.disabled) {
this.setState({
diff --git a/src/components/common/line-chart.tsx b/src/components/common/line-chart.tsx
index c3dbdd056..0e8abad68 100644
--- a/src/components/common/line-chart.tsx
+++ b/src/components/common/line-chart.tsx
@@ -97,12 +97,12 @@ interface LineChartProps {
height: number;
hoveredDP?: HoverDP | null;
isEnlarged?: boolean;
- lineChart: LineChart;
+ lineChart?: LineChart;
margin: {top?: number; bottom?: number; left?: number; right?: number};
onMouseMove: (datapoint: LineSeriesPoint | null, data?: RVNearestXData<LineSeriesPoint>) => void;
width: number;
timezone?: string | null;
- timeFormat: string;
+ timeFormat?: string;
}
const MARGIN = {top: 0, bottom: 0, left: 0, right: 0};
@@ -122,10 +122,12 @@ function LineChartFactory() {
timezone,
timeFormat
}: LineChartProps) => {
- const {series, yDomain} = lineChart;
+ const {series, yDomain} = lineChart || {};
const brushData = useMemo(() => {
- return [{x: series[0].x, y: yDomain[1], customComponent: () => brushComponent}];
+ return series && series[0] && series[0].x && yDomain && yDomain[1]
+ ? [{x: series[0].x, y: yDomain[1], customComponent: () => brushComponent}]
+ : [];
}, [series, yDomain, brushComponent]);
const hintFormatter = useMemo(() => datetimeFormatter(timezone)(timeFormat), [
timezone,
diff --git a/src/components/common/portaled.tsx b/src/components/common/portaled.tsx
index 847da34c7..b411df811 100644
--- a/src/components/common/portaled.tsx
+++ b/src/components/common/portaled.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {Component, createRef, ElementType} from 'react';
+import React, {Component, createRef, ElementType, PropsWithChildren} from 'react';
import debounce from 'lodash.debounce';
import isEqual from 'lodash.isequal';
@@ -51,11 +51,11 @@ const addEventListeners = () => {
};
interface GetChildPosProps {
- offsets: {
+ offsets: Partial<{
topOffset: number;
leftOffset: number;
rightOffset: number;
- };
+ }>;
rect: DOMRect;
childRect: DOMRect;
pageOffset: {
@@ -72,7 +72,7 @@ export const getChildPos = ({offsets, rect, childRect, pageOffset, padding}: Get
const pos = {
top: pageOffset.y + rect.top + (topOffset || 0),
...(anchorLeft
- ? {left: pageOffset.x + rect.left + leftOffset}
+ ? {left: pageOffset.x + rect.left + leftOffset!}
: {right: window.innerWidth - rect.right - pageOffset.x + (rightOffset || 0)})
};
@@ -131,7 +131,7 @@ const WINDOW_PAD = 40;
const noop = () => {};
-interface PortaledProps {
+type PortaledProps = PropsWithChildren<{
component: ElementType;
onClose?: (
event: React.MouseEvent<Element, globalThis.MouseEvent> | React.KeyboardEvent<Element>
@@ -140,11 +140,11 @@ interface PortaledProps {
isOpened?: boolean;
top: number;
left?: number;
- right: number;
+ right?: number;
overlayZIndex?: number;
modalProps?: Partial<ReactModal.Props>;
modalStyle?: Partial<typeof defaultModalStyle>;
-}
+}>;
interface PortaledState {
pos:
diff --git a/src/components/common/range-brush.tsx b/src/components/common/range-brush.tsx
index 2f9ad1ca9..50b992a84 100644
--- a/src/components/common/range-brush.tsx
+++ b/src/components/common/range-brush.tsx
@@ -64,7 +64,7 @@ export type OnBrush = (val0: number, val1: number) => void;
export interface RangeBrushProps {
isRanged?: boolean;
- theme: any;
+ theme?: any;
range: number[];
value: number[];
onBrushStart: () => void;
@@ -78,7 +78,7 @@ export interface RangeBrushProps {
onMouseoutHandle: () => void;
}
-function RangeBrushFactory() {
+function RangeBrushFactory(): React.ComponentType<RangeBrushProps> {
class RangeBrush extends Component<RangeBrushProps> {
static defaultProps = {
isRanged: true
diff --git a/src/components/common/range-plot.tsx b/src/components/common/range-plot.tsx
index bdbd38a03..bbd1c4762 100644
--- a/src/components/common/range-plot.tsx
+++ b/src/components/common/range-plot.tsx
@@ -38,13 +38,13 @@ interface RangePlotProps {
value: number[];
width: number;
plotType?: string;
- lineChart: LineChart;
+ lineChart?: LineChart;
histogram?: {x0: number; x1: number}[];
isEnlarged?: boolean;
isRanged?: boolean;
theme: any;
- timeFormat: string;
- timezone?: string;
+ timeFormat?: string;
+ timezone?: string | null;
playbackControlWidth?: number;
}
diff --git a/src/components/common/slider/slider-handle.tsx b/src/components/common/slider/slider-handle.tsx
index 4c1f1d64b..f1def0bc7 100644
--- a/src/components/common/slider/slider-handle.tsx
+++ b/src/components/common/slider/slider-handle.tsx
@@ -31,7 +31,7 @@ interface StyledSliderHandleProps {
}
const StyledSliderHandle = styled.span.attrs(props => ({
- className: classnames('kg-range-slider__handle', {[props.className]: props.className})
+ className: classnames('kg-range-slider__handle', props.className)
}))<StyledSliderHandleProps>`
position: absolute;
z-index: 10;
@@ -174,7 +174,7 @@ export default class SliderHandle extends Component {
}
state = {mouseOver: false};
- ref = createRef<typeof StyledSliderHandle & HTMLSpanElement>(); // Set correct type
+ ref = createRef<HTMLSpanElement>();
toggleMouseOver = () => {
this.setState({mouseOver: !this.state.mouseOver});
diff --git a/src/components/common/styled-components.tsx b/src/components/common/styled-components.tsx
index e53e5c298..424889184 100644
--- a/src/components/common/styled-components.tsx
+++ b/src/components/common/styled-components.tsx
@@ -22,6 +22,7 @@ import styled from 'styled-components';
import ReactTooltip from 'react-tooltip';
import {media} from 'styles/media-breakpoints';
import classnames from 'classnames';
+import {RGBColor} from 'reducers';
export const SelectText = styled.span`
color: ${props => props.theme.labelColor};
@@ -104,9 +105,9 @@ export const PanelLabelBold = styled(PanelLabel)`
font-weight: 500;
`;
-export const PanelHeaderTitle = styled.span.attrs({
- className: 'side-panel-panel__header__title'
-})`
+export const PanelHeaderTitle = styled.span.attrs(props => ({
+ className: classnames('side-panel-panel__header__title', props.className)
+}))`
color: ${props => props.theme.textColor};
font-size: 13px;
letter-spacing: 0.43px;
@@ -127,9 +128,9 @@ export const PanelHeaderContent = styled.div`
}
`;
-export const PanelContent = styled.div.attrs({
- className: 'side-panel-panel__content'
-})`
+export const PanelContent = styled.div.attrs(props => ({
+ className: classnames('side-panel-panel__content', props.className)
+}))`
background-color: ${props => props.theme.panelContentBackground};
padding: 12px;
`;
@@ -193,7 +194,7 @@ export const Tooltip = styled(ReactTooltip)`
}
`;
-interface ButtonProps {
+export interface ButtonProps {
negative?: boolean;
secondary?: boolean;
link?: boolean;
@@ -203,6 +204,7 @@ interface ButtonProps {
small?: boolean;
disabled?: boolean;
width?: string;
+ inactive?: boolean;
}
export const Button = styled.div.attrs(props => ({
@@ -324,9 +326,9 @@ export const InlineInput = styled(Input)`
${props => props.theme.inlineInput};
`;
-interface StyledPanelHeaderProps {
+export interface StyledPanelHeaderProps {
active?: boolean;
- labelRCGColorValues?: string[];
+ labelRCGColorValues?: RGBColor | null;
}
export const StyledPanelHeader = styled.div<StyledPanelHeaderProps>`
@@ -378,15 +380,15 @@ export const ButtonGroup = styled.div`
}
`;
-interface StyledPanelHeaderProps {
- color: string[];
+interface DatasetSquareProps {
+ backgroundColor: RGBColor;
}
-export const DatasetSquare = styled.div<StyledPanelHeaderProps>`
+export const DatasetSquare = styled.div<DatasetSquareProps>`
display: inline-block;
width: 10px;
height: 10px;
- background-color: rgb(${props => props.color.join(',')});
+ background-color: rgb(${props => props.backgroundColor.join(',')});
margin-right: 12px;
`;
diff --git a/src/components/common/toolbar-item.tsx b/src/components/common/toolbar-item.tsx
index 64ab80237..13f8bdfc1 100644
--- a/src/components/common/toolbar-item.tsx
+++ b/src/components/common/toolbar-item.tsx
@@ -20,6 +20,7 @@
import React from 'react';
import styled from 'styled-components';
+import classnames from 'classnames';
import {FormattedMessage} from 'localization';
import {ComponentType, MouseEvent} from 'react';
@@ -27,9 +28,9 @@ interface StyledDivProps {
active?: boolean;
}
-const StyledDiv = styled.div.attrs({
- className: 'toolbar-item'
-})<StyledDivProps>`
+const StyledDiv = styled.div.attrs(props => ({
+ className: classnames('toolbar-item', props.className)
+}))<StyledDivProps>`
color: ${props =>
props.active ? props.theme.toolbarItemIconHover : props.theme.panelHeaderIcon};
padding: 12px 20px;
@@ -72,7 +73,6 @@ export type ToolbarItemProps = {
icon?: ComponentType<any>;
};
-/** @type {typeof import('./toolbar-item').ToolbarItem} */
const ToolbarItem = React.memo((props: ToolbarItemProps) => (
<StyledDiv
id={props.id}
diff --git a/src/components/common/toolbar.tsx b/src/components/common/toolbar.tsx
index ddcbb5ec4..55e84d8dc 100644
--- a/src/components/common/toolbar.tsx
+++ b/src/components/common/toolbar.tsx
@@ -20,7 +20,7 @@
import styled from 'styled-components';
-interface ToolbarProps {
+export interface ToolbarProps {
show?: boolean;
}
diff --git a/src/components/common/vertical-toolbar.tsx b/src/components/common/vertical-toolbar.tsx
index a9ef3bff2..0f5615418 100644
--- a/src/components/common/vertical-toolbar.tsx
+++ b/src/components/common/vertical-toolbar.tsx
@@ -19,9 +19,9 @@
// THE SOFTWARE.
import styled from 'styled-components';
-import Toolbar from './toolbar';
+import Toolbar, {ToolbarProps} from './toolbar';
-const VerticalToolbar = styled(Toolbar)`
+const VerticalToolbar = styled(Toolbar)<ToolbarProps>`
flex-direction: column;
.toolbar-item {
diff --git a/src/components/geocoder/geocoder.tsx b/src/components/geocoder/geocoder.tsx
index 58172b28e..4744c47d1 100644
--- a/src/components/geocoder/geocoder.tsx
+++ b/src/components/geocoder/geocoder.tsx
@@ -29,6 +29,10 @@ import {Input} from 'components/common/styled-components';
import {Search, Delete} from 'components/common/icons';
import {Viewport} from 'reducers/map-state-updaters';
+type StyledContainerProps = {
+ width?: number;
+};
+
// matches only valid coordinates
const COORDINATE_REGEX_STRING =
'^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?),\\s*[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)';
@@ -50,7 +54,7 @@ export const testForCoordinates = (query: string): [true, number, number] | [fal
return [isValid, Number(tokens[0]), Number(tokens[1])];
};
-const StyledContainer = styled.div`
+const StyledContainer = styled.div<StyledContainerProps>`
position: relative;
color: ${props => props.theme.textColor};
diff --git a/src/components/modal-container.tsx b/src/components/modal-container.tsx
index ef490b84e..4a80dbe6c 100644
--- a/src/components/modal-container.tsx
+++ b/src/components/modal-container.tsx
@@ -148,7 +148,6 @@ export default function ModalContainerFactory(
SaveMapModal: ReturnType<typeof SaveMapModalFactory>,
ShareMapModal: ReturnType<typeof ShareMapModalFactory>
): React.ElementType<ModalContainerProps> {
- /** @typedef {import('./modal-container').ModalContainerProps} ModalContainerProps */
/** @augments React.Component<ModalContainerProps> */
class ModalContainer extends Component<ModalContainerProps> {
// TODO - remove when prop types are fully exported
@@ -313,6 +312,7 @@ export default function ModalContainerFactory(
);
// TODO: we need to make this width consistent with the css rule defined modal.js:32 max-width: 70vw
+ // @ts-ignore // TODO fix this after add types to Theme
modalProps.cssStyle = css`
${DataTableModalStyle};
${media.palm`
diff --git a/src/components/side-panel/common/dataset-tag.tsx b/src/components/side-panel/common/dataset-tag.tsx
index 45a1040f8..6ad0fd232 100644
--- a/src/components/side-panel/common/dataset-tag.tsx
+++ b/src/components/side-panel/common/dataset-tag.tsx
@@ -63,7 +63,7 @@ export default function DatasetTagFactory() {
<UpdateTableColor id={dataset.id}>
<DatasetSquare
className="dataset-color"
- color={dataset.color}
+ backgroundColor={dataset.color}
onClick={onClickSquare}
data-tip
data-for={`update-color-${id}`}
diff --git a/src/components/side-panel/filter-panel/filter-panel-header.tsx b/src/components/side-panel/filter-panel/filter-panel-header.tsx
index 557586e83..201a151a4 100644
--- a/src/components/side-panel/filter-panel/filter-panel-header.tsx
+++ b/src/components/side-panel/filter-panel/filter-panel-header.tsx
@@ -23,13 +23,15 @@ import styled from 'styled-components';
import PanelHeaderActionFactory from 'components/side-panel/panel-header-action';
import {Trash} from 'components/common/icons';
import {createLinearGradient} from 'utils/color-utils';
-import {StyledPanelHeader} from 'components/common/styled-components';
+import {StyledPanelHeader, StyledPanelHeaderProps} from 'components/common/styled-components';
import {Filter, RGBColor} from 'reducers';
import KeplerTable from 'utils/table-utils/kepler-table';
-export const StyledFilterHeader = styled(StyledPanelHeader)<{
- labelRCGColorValues: RGBColor[];
-}>`
+interface StyledFilterHeaderProps extends StyledPanelHeaderProps {
+ $labelRCGColorValues: RGBColor[];
+}
+
+export const StyledFilterHeader = styled(StyledPanelHeader)<StyledFilterHeaderProps>`
cursor: pointer;
padding: 10px 12px;
@@ -38,9 +40,9 @@ export const StyledFilterHeader = styled(StyledPanelHeader)<{
}
border-left: 3px solid;
- ${(props: {labelRCGColorValues: KeplerTable['color'][]}) =>
- props.labelRCGColorValues && props.labelRCGColorValues.length > 0
- ? `border-image: ${createLinearGradient('bottom', props.labelRCGColorValues)} 3;`
+ ${props =>
+ props.$labelRCGColorValues && props.$labelRCGColorValues.length > 0
+ ? `border-image: ${createLinearGradient('bottom', props.$labelRCGColorValues)} 3;`
: 'border-color: transparent;'};
`;
@@ -74,7 +76,7 @@ function FilterPanelHeaderFactory(
}: FilterPanelHeaderProps) => (
<StyledFilterHeader
className="filter-panel__header"
- labelRCGColorValues={datasets.map((d: KeplerTable) => d.color)}
+ $labelRCGColorValues={datasets.map((d: KeplerTable) => d.color)}
>
<StyledChildrenContainer>{children}</StyledChildrenContainer>
<PanelHeaderAction
diff --git a/src/components/side-panel/interaction-panel/tooltip-config/tooltip-chicklet.tsx b/src/components/side-panel/interaction-panel/tooltip-config/tooltip-chicklet.tsx
index c685f1b8c..d0bed8289 100644
--- a/src/components/side-panel/interaction-panel/tooltip-config/tooltip-chicklet.tsx
+++ b/src/components/side-panel/interaction-panel/tooltip-config/tooltip-chicklet.tsx
@@ -60,6 +60,10 @@ type TimeLabelFormat = {
label: string;
};
+type IconDivProps = {
+ status: string | null;
+};
+
const TIME_DISPLAY = '2020-05-11 14:00';
const getValue = fmt => fmt[TOOLTIP_KEY];
@@ -104,7 +108,7 @@ const hashStyles = {
const IconDiv = styled.div.attrs({
className: 'tooltip-chicklet__icon'
-})`
+})<IconDivProps>`
color: ${props =>
props.status === hashStyles.SHOW
? props.theme.subtextColorActive
@@ -134,7 +138,7 @@ function TooltipChickletFactory(
state = {
show: false
};
- private node!: HTMLElement;
+ private node!: HTMLDivElement;
componentDidMount() {
document.addEventListener('mousedown', this.handleClickOutside, false);
@@ -165,7 +169,7 @@ function TooltipChickletFactory(
const hashStyle = show ? hashStyles.SHOW : hasFormat ? hashStyles.ACTIVE : null;
return (
- <ChickletButton ref={(node: HTMLElement) => (this.node = node)}>
+ <ChickletButton ref={(node: HTMLDivElement) => (this.node = node)}>
<ChickletTag>{displayOption(item)}</ChickletTag>
{formatLabels.length > 1 && (
<ChickletAddonWrapper>
diff --git a/src/components/side-panel/layer-manager.tsx b/src/components/side-panel/layer-manager.tsx
index fd192920f..22f4afefb 100644
--- a/src/components/side-panel/layer-manager.tsx
+++ b/src/components/side-panel/layer-manager.tsx
@@ -56,7 +56,7 @@ type LayerManagerProps = {
layerBlending: string;
uiStateActions: typeof UiStateActions;
visStateActions: typeof VisStateActions;
- showAddDataModal: ActionHandler<typeof UiStateActions.toggleModal>;
+ showAddDataModal: () => void;
removeDataset: ActionHandler<typeof UiStateActions.openDeleteModal>;
showDatasetTable: ActionHandler<typeof VisStateActions.showDatasetTable>;
updateTableColor: ActionHandler<typeof VisStateActions.updateTableColor>;
diff --git a/src/components/side-panel/layer-panel/add-layer-button.tsx b/src/components/side-panel/layer-panel/add-layer-button.tsx
index 6b5a8a31a..b09b73bf7 100644
--- a/src/components/side-panel/layer-panel/add-layer-button.tsx
+++ b/src/components/side-panel/layer-panel/add-layer-button.tsx
@@ -100,7 +100,7 @@ const TYPEAHEAD_INPUT_CLASS = 'typeahead__input';
function AddLayerButtonFactory() {
const ListItem = ({value}) => (
<ListItemWrapper>
- <DatasetSquare className="dataset-color" color={value.color} />
+ <DatasetSquare className="dataset-color" backgroundColor={value.color} />
<div className="dataset-name" title={value.label}>
{value.label}
</div>
diff --git a/src/components/side-panel/layer-panel/color-palette.tsx b/src/components/side-panel/layer-panel/color-palette.tsx
index a4b07e9b5..5b383b753 100644
--- a/src/components/side-panel/layer-panel/color-palette.tsx
+++ b/src/components/side-panel/layer-panel/color-palette.tsx
@@ -52,7 +52,7 @@ const PaletteWrapper = styled.div.attrs({
const PaletteContainer = styled.div.attrs(props => ({
className: classnames('color-range-palette', props.className)
-}))<{isSelected: boolean}>`
+}))<{isSelected?: boolean}>`
display: flex;
flex-grow: 1;
border-width: 1px;
@@ -78,7 +78,7 @@ const ColorPalette: React.FC<ColorPaletteProps> = ({
<PaletteContainer className={className} isSelected={isSelected}>
<PaletteWrapper style={{height, transform: `scale(${isReversed ? -1 : 1}, 1)`}}>
{colors.map((color: number | string, index: number) => (
- <StyledColorBlock key={`${color}-${index}`} style={{backgroundColor: color}} />
+ <StyledColorBlock key={`${color}-${index}`} style={{backgroundColor: String(color)}} />
))}
</PaletteWrapper>
</PaletteContainer>
diff --git a/src/components/side-panel/layer-panel/color-range-selector.tsx b/src/components/side-panel/layer-panel/color-range-selector.tsx
index 8a2d3f238..83c65ddf5 100644
--- a/src/components/side-panel/layer-panel/color-range-selector.tsx
+++ b/src/components/side-panel/layer-panel/color-range-selector.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {Component} from 'react';
+import React, {Component, MouseEvent} from 'react';
import uniq from 'lodash.uniq';
import styled from 'styled-components';
import {createSelector} from 'reselect';
@@ -220,7 +220,7 @@ export const PaletteConfig: React.FC<PaletteConfigProps> = ({
}) => (
<StyledPaletteConfig
className="color-palette__config"
- onClick={(e: Event) => e.stopPropagation()}
+ onClick={(e) => e.stopPropagation()}
>
<div className="color-palette__config__label">
<PanelLabel>
diff --git a/src/components/side-panel/layer-panel/color-selector.tsx b/src/components/side-panel/layer-panel/color-selector.tsx
index a8839d7ab..213d4f078 100644
--- a/src/components/side-panel/layer-panel/color-selector.tsx
+++ b/src/components/side-panel/layer-panel/color-selector.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {Component, createRef} from 'react';
+import React, {Component, createRef, MouseEvent} from 'react';
import styled from 'styled-components';
import {rgbToHex} from 'utils/color-utils';
import SingleColorPalette from './single-color-palette';
@@ -30,6 +30,12 @@ import {ColorUI} from 'layers/layer-factory';
import {ColorRange} from 'constants/color-ranges';
import {NestedPartial, RGBColor} from 'reducers';
+type ColorSelectorInputProps = {
+ active: boolean;
+ disabled?: boolean;
+ inputTheme?: string;
+};
+
type ColorSelectorProps = {
colorSets: {
selectedColor: RGBColor | ColorRange;
@@ -43,14 +49,14 @@ type ColorSelectorProps = {
setColorUI?: (newConfig: NestedPartial<ColorUI>) => void;
};
-export const ColorBlock = styled.div<{color: string}>`
+export const ColorBlock = styled.div<{backgroundcolor: RGBColor}>`
width: 32px;
height: 18px;
border-radius: 1px;
- background-color: ${props => `rgb(${props.color.slice(0, 3).join(',')})`};
+ background-color: ${props => `rgb(${props.backgroundcolor.slice(0, 3).join(',')})`};
`;
-export const ColorSelectorInput = styled.div`
+export const ColorSelectorInput = styled.div<ColorSelectorInputProps>`
${props => (props.inputTheme === 'secondary' ? props.theme.secondaryInput : props.theme.input)};
height: ${props => props.theme.inputBoxHeight};
@@ -156,7 +162,7 @@ class ColorSelector extends Component<ColorSelectorProps> {
) : (
<ColorBlock
className="color-selector__selector__block"
- color={cSet.selectedColor}
+ backgroundcolor={cSet.selectedColor as RGBColor}
/>
)}
{cSet.label ? (
diff --git a/src/components/side-panel/layer-panel/custom-palette.tsx b/src/components/side-panel/layer-panel/custom-palette.tsx
index af35a3779..4766fac8e 100644
--- a/src/components/side-panel/layer-panel/custom-palette.tsx
+++ b/src/components/side-panel/layer-panel/custom-palette.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {Component, createRef} from 'react';
+import React, {Component, createRef, MouseEventHandler, MouseEvent} from 'react';
import classnames from 'classnames';
import styled, {css} from 'styled-components';
import {SortableContainer, SortableElement, SortableHandle} from 'react-sortable-hoc';
@@ -194,7 +194,7 @@ class CustomPalette extends Component<CustomPaletteProps> {
this.props.onToggleSketcher(false);
};
- _onApply = (event: MouseEvent) => {
+ _onApply: MouseEventHandler = event => {
event.stopPropagation();
event.preventDefault();
diff --git a/src/components/side-panel/layer-panel/custom-picker.tsx b/src/components/side-panel/layer-panel/custom-picker.tsx
index b95cd1712..703bf0c47 100644
--- a/src/components/side-panel/layer-panel/custom-picker.tsx
+++ b/src/components/side-panel/layer-panel/custom-picker.tsx
@@ -26,12 +26,21 @@ import {createSelector} from 'reselect';
// This was put in because 3rd party library react-color doesn't yet cater for customized color of child component <SketchField> which contains HEX/RGB input text box
// Issue raised: https://github.com/casesandberg/react-color/issues/631
+type SketchPickerValue = {
+ hsl: {h: number; s: number; l: number; a: number};
+ hex: string;
+ rgb: {r: number; g: number; b: number; a: number};
+ hsv: {h: number; s: number; v: number; a: number};
+ oldHue: number;
+ source: string;
+};
+
type CustomPickerProps = {
color: string;
theme: {
panelBackground: string;
};
- onChange: (v: {r: number; g: number; b: number; a: number; source: string; hex: string}) => void;
+ onChange: (v: SketchPickerValue) => void;
onSwatchClose: () => void;
};
diff --git a/src/components/side-panel/layer-panel/dataset-section.tsx b/src/components/side-panel/layer-panel/dataset-section.tsx
index 6f6f54131..979e7e461 100644
--- a/src/components/side-panel/layer-panel/dataset-section.tsx
+++ b/src/components/side-panel/layer-panel/dataset-section.tsx
@@ -31,7 +31,7 @@ import * as VisStateActions from 'actions/vis-state-actions';
import {ActionHandler} from 'actions';
type AddDataButtonProps = {
- onClick: ActionHandler<typeof UiStateActions.toggleModal>;
+ onClick: () => void;
isInactive: boolean;
};
@@ -43,7 +43,7 @@ type DatasetSectionProps = {
showDatasetTable: ActionHandler<typeof VisStateActions.showDatasetTable>;
updateTableColor: ActionHandler<typeof VisStateActions.updateTableColor>;
removeDataset: ActionHandler<typeof UiStateActions.openDeleteModal>;
- showAddDataModal: ActionHandler<typeof UiStateActions.toggleModal>;
+ showAddDataModal: () => void;
};
const StyledDatasetTitle = styled.div<{showDatasetList: boolean}>`
@@ -69,7 +69,7 @@ export function AddDataButtonFactory() {
<Button
className="add-data-button"
onClick={onClick}
- isInactive={!isInactive}
+ inactive={!isInactive}
width="105px"
secondary
>
diff --git a/src/components/side-panel/layer-panel/layer-configurator.tsx b/src/components/side-panel/layer-panel/layer-configurator.tsx
index 3bd41bb4a..a4947de33 100644
--- a/src/components/side-panel/layer-panel/layer-configurator.tsx
+++ b/src/components/side-panel/layer-panel/layer-configurator.tsx
@@ -54,7 +54,7 @@ import {ActionHandler} from 'actions';
type LayerConfiguratorProps = {
layer: Layer;
datasets: Datasets;
- layerTypeOptions?: {
+ layerTypeOptions: {
id: string;
label: string;
icon: any; //
@@ -1023,6 +1023,7 @@ export default function LayerConfiguratorFactory(
datasets={datasets}
layer={layer}
layerTypeOptions={layerTypeOptions}
+ // @ts-ignore
onSelect={updateLayerType}
/>
{Object.keys(datasets).length > 1 && (
diff --git a/src/components/side-panel/layer-panel/layer-panel-header.tsx b/src/components/side-panel/layer-panel/layer-panel-header.tsx
index b70661478..10ea959c5 100644
--- a/src/components/side-panel/layer-panel/layer-panel-header.tsx
+++ b/src/components/side-panel/layer-panel/layer-panel-header.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {useState, ComponentType, MouseEventHandler} from 'react';
+import React, {useState, ComponentType, MouseEventHandler, MouseEvent, ChangeEventHandler} from 'react';
import classnames from 'classnames';
import styled from 'styled-components';
import {SortableHandle} from 'react-sortable-hoc';
@@ -33,21 +33,21 @@ import {BaseProps} from 'components/common/icons/base';
type LayerLabelEditorProps = {
layerId: string;
label?: string;
- onEdit: (e) => void;
+ onEdit: ChangeEventHandler;
};
type LayerTitleSectionProps = {
layerType?: string | null;
layerId: string;
label?: string;
- onUpdateLayerLabel: (e) => void;
+ onUpdateLayerLabel: ChangeEventHandler;
};
type LayerPanelHeaderProps = {
layerId: string;
isVisible: boolean;
onToggleVisibility: MouseEventHandler;
- onUpdateLayerLabel: (e) => void; //
+ onUpdateLayerLabel: ChangeEventHandler;
onToggleEnableConfig: MouseEventHandler;
onRemoveLayer: MouseEventHandler;
onDuplicateLayer: MouseEventHandler;
diff --git a/src/components/side-panel/layer-panel/layer-panel.tsx b/src/components/side-panel/layer-panel/layer-panel.tsx
index 377e9de0a..aaab3948f 100644
--- a/src/components/side-panel/layer-panel/layer-panel.tsx
+++ b/src/components/side-panel/layer-panel/layer-panel.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {Component, MouseEventHandler, TouchEventHandler} from 'react';
+import React, {Component, MouseEventHandler, TouchEventHandler, CSSProperties, ChangeEventHandler} from 'react';
import styled from 'styled-components';
import LayerConfiguratorFactory from './layer-configurator';
@@ -32,13 +32,13 @@ import {ActionHandler} from 'actions';
type LayerPanelProps = {
className?: string;
- style?: string;
+ style?: CSSProperties;
onMouseDown?: MouseEventHandler;
onTouchStart?: TouchEventHandler;
layer: Layer;
datasets: Datasets;
idx: number;
- layerTypeOptions?: {
+ layerTypeOptions: {
id: string;
label: string;
icon: any; //
@@ -58,7 +58,7 @@ type LayerPanelProps = {
duplicateLayer: ActionHandler<typeof VisStateActions.duplicateLayer>;
};
-const PanelWrapper = styled.div`
+const PanelWrapper = styled.div<{active: boolean}>`
font-size: 12px;
border-radius: 1px;
margin-bottom: 8px;
@@ -100,17 +100,17 @@ function LayerPanelFactory(
this.props.layerVisualChannelConfigChange(this.props.layer, newConfig, channel);
};
- _updateLayerLabel = ({target: {value}}) => {
+ _updateLayerLabel: ChangeEventHandler<HTMLInputElement> = ({target: {value}}) => {
this.updateLayerConfig({label: value});
};
- _toggleVisibility = e => {
+ _toggleVisibility: MouseEventHandler = e => {
e.stopPropagation();
const isVisible = !this.props.layer.config.isVisible;
this.updateLayerConfig({isVisible});
};
- _toggleEnableConfig = e => {
+ _toggleEnableConfig: MouseEventHandler = e => {
e.stopPropagation();
const {
layer: {
@@ -120,12 +120,12 @@ function LayerPanelFactory(
this.updateLayerConfig({isConfigActive: !isConfigActive});
};
- _removeLayer = e => {
+ _removeLayer: MouseEventHandler = e => {
e.stopPropagation();
this.props.removeLayer(this.props.idx);
};
- _duplicateLayer = e => {
+ _duplicateLayer: MouseEventHandler = e => {
e.stopPropagation();
this.props.duplicateLayer(this.props.idx);
};
diff --git a/src/components/side-panel/layer-panel/layer-type-dropdown-list.tsx b/src/components/side-panel/layer-panel/layer-type-dropdown-list.tsx
index 1dbb96b1a..600d042e6 100644
--- a/src/components/side-panel/layer-panel/layer-type-dropdown-list.tsx
+++ b/src/components/side-panel/layer-panel/layer-type-dropdown-list.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React, {ComponentType, useCallback} from 'react';
+import React, {ComponentType, useCallback, MouseEvent} from 'react';
import styled from 'styled-components';
import classNames from 'classnames';
import {classList} from '../../common/item-selector/dropdown-list';
diff --git a/src/components/side-panel/layer-panel/layer-type-selector.tsx b/src/components/side-panel/layer-panel/layer-type-selector.tsx
index 218c675d9..875ec3c99 100644
--- a/src/components/side-panel/layer-panel/layer-type-selector.tsx
+++ b/src/components/side-panel/layer-panel/layer-type-selector.tsx
@@ -49,6 +49,8 @@ type LayerTypeSelectorProps = {
| object
| null
) => void;
+ // TODO add correct type after Theme typing
+ theme: Record<string, string>;
};
const StyledLayerTypeSelector = styled.div`
diff --git a/src/components/side-panel/layer-panel/panel-view-list-toggle.tsx b/src/components/side-panel/layer-panel/panel-view-list-toggle.tsx
index 7f4608a7c..922aa6b6e 100644
--- a/src/components/side-panel/layer-panel/panel-view-list-toggle.tsx
+++ b/src/components/side-panel/layer-panel/panel-view-list-toggle.tsx
@@ -26,6 +26,12 @@ import {Tooltip} from 'components/common/styled-components';
import {FormattedMessage} from 'localization';
import {LayerPanelListView} from 'reducers/ui-state-updaters';
+type ToggleOptionProps = {
+ isActive: boolean;
+ onClick: () => void;
+ option: typeof TOGGLE_OPTIONS[0];
+};
+
type PanelViewListToggleProps = {
layerPanelListViewMode: LayerPanelListView;
toggleLayerPanelListView: (view: string) => void;
@@ -46,7 +52,7 @@ const PanelViewListToggleWrapper = styled.div.attrs({
export const StyledToggleOption = styled.div.attrs({
className: 'layer-panel-toggle-option'
-})`
+})<{active: boolean}>`
color: ${props =>
props.active
? props.theme.layerPanelToggleOptionColorActive
@@ -58,7 +64,7 @@ export const StyledToggleOption = styled.div.attrs({
`;
function ToggleOptionFactory() {
- const ToggleOption = ({isActive, onClick, option}) => (
+ const ToggleOption: React.FC<ToggleOptionProps> = ({isActive, onClick, option}) => (
<StyledToggleOption
data-tip
data-for={`${option.id}-toggle-option`}
diff --git a/src/components/side-panel/layer-panel/single-color-palette.tsx b/src/components/side-panel/layer-panel/single-color-palette.tsx
index 2ec6d6c75..d9c22c387 100644
--- a/src/components/side-panel/layer-panel/single-color-palette.tsx
+++ b/src/components/side-panel/layer-panel/single-color-palette.tsx
@@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import React from 'react';
+import React, {MouseEvent} from 'react';
import {range} from 'd3-array';
import styled from 'styled-components';
import {hexToRgb} from 'utils/color-utils';
@@ -54,7 +54,7 @@ const StyledColorColumn = styled.div`
justify-content: space-between;
`;
-const StyledColorBlock = styled.div`
+const StyledColorBlock = styled.div<{selected: boolean}>`
flex-grow: 1;
height: ${PALETTE_HEIGHT};
border-width: 1px;
diff --git a/src/components/side-panel/map-style-panel/map-layer-selector.tsx b/src/components/side-panel/map-style-panel/map-layer-selector.tsx
index 88bb80020..10ef01905 100644
--- a/src/components/side-panel/map-style-panel/map-layer-selector.tsx
+++ b/src/components/side-panel/map-style-panel/map-layer-selector.tsx
@@ -57,7 +57,7 @@ interface LayerLabelProps {
active: boolean;
}
-const LayerLabel = styled<LayerLabelProps>(PanelLabelBold)`
+const LayerLabel = styled(PanelLabelBold)<LayerLabelProps>`
color: ${props => (props.active ? props.theme.textColor : props.theme.labelColor)};
`;
diff --git a/src/components/side-panel/panel-header-action.tsx b/src/components/side-panel/panel-header-action.tsx
index c2aadcfd6..363b69782 100644
--- a/src/components/side-panel/panel-header-action.tsx
+++ b/src/components/side-panel/panel-header-action.tsx
@@ -19,29 +19,30 @@
// THE SOFTWARE.
import React, {Component, ComponentType, MouseEventHandler} from 'react';
+import {TooltipProps} from 'react-tooltip';
import classnames from 'classnames';
import styled from 'styled-components';
import {FormattedMessage} from 'localization';
import {Tooltip} from 'components/common/styled-components';
import {BaseProps} from 'components/common/icons/base';
-type PanelHeaderActionProps = {
- id: string;
+interface PanelHeaderActionProps {
+ id?: string;
tooltip?: string;
hoverColor?: string;
- tooltipType?: string;
className?: string;
active?: boolean;
flush?: boolean;
disabled?: boolean;
- onClick: MouseEventHandler;
+ onClick?: MouseEventHandler;
+ tooltipType?: TooltipProps['type'];
IconComponent: ComponentType<Partial<BaseProps>>;
-};
+}
type HeaderActionWrapperProps = {
flush?: boolean;
active?: boolean;
- hoverColor?: boolean;
+ hoverColor?: string | null;
};
const HeaderActionWrapper = styled.div<HeaderActionWrapperProps>`
@@ -63,6 +64,7 @@ const HeaderActionWrapper = styled.div<HeaderActionWrapperProps>`
}
`;
+PanelHeaderActionFactory.deps = [];
// Need to use react class to access props.component
export default function PanelHeaderActionFactory(): React.ComponentType<PanelHeaderActionProps> {
class PanelHeaderAction extends Component<PanelHeaderActionProps> {
diff --git a/src/components/side-panel/panel-header.tsx b/src/components/side-panel/panel-header.tsx
index ae226e231..f7f134876 100644
--- a/src/components/side-panel/panel-header.tsx
+++ b/src/components/side-panel/panel-header.tsx
@@ -20,6 +20,7 @@
import React, {Component} from 'react';
import styled from 'styled-components';
+import classnames from 'classnames';
import {createSelector} from 'reselect';
import {Tooltip} from 'components/common/styled-components';
import KeplerGlLogo from 'components/common/logo';
@@ -98,16 +99,16 @@ type PanelHeaderProps = {
hideExportDropdown: () => void;
} & DropdownCallbacks;
-const StyledPanelHeader = styled.div.attrs({
- className: 'side-side-panel__header'
-})`
+const StyledPanelHeader = styled.div.attrs(props => ({
+ className: classnames('side-side-panel__header', props.className)
+}))`
background-color: ${props => props.theme.sidePanelHeaderBg};
padding: 12px 16px 0 16px;
`;
-const StyledPanelHeaderTop = styled.div.attrs({
- className: 'side-panel__header__top'
-})`
+const StyledPanelHeaderTop = styled.div.attrs(props => ({
+ className: classnames('side-panel__header__top', props.className)
+}))`
display: flex;
justify-content: space-between;
margin-bottom: 16px;
diff --git a/src/components/side-panel/panel-title.tsx b/src/components/side-panel/panel-title.tsx
index d03fc36ff..79ae510ec 100644
--- a/src/components/side-panel/panel-title.tsx
+++ b/src/components/side-panel/panel-title.tsx
@@ -19,10 +19,11 @@
// THE SOFTWARE.
import styled from 'styled-components';
+import classnames from 'classnames';
-const PanelTitleFactory = () => styled.div.attrs({
- className: 'panel-title'
-})`
+const PanelTitleFactory = () => styled.div.attrs(props => ({
+ className: classnames('panel-title', props.className)
+}))`
color: ${props => props.theme.titleTextColor};
font-size: ${props => props.theme.sidePanelTitleFontsize};
line-height: ${props => props.theme.sidePanelTitleLineHeight};
diff --git a/src/components/side-panel/side-bar.tsx b/src/components/side-panel/side-bar.tsx
index 5fe9f48cf..1fcf1013c 100644
--- a/src/components/side-panel/side-bar.tsx
+++ b/src/components/side-panel/side-bar.tsx
@@ -34,7 +34,7 @@ type SideBarProps = {
onOpenOrClose: (v: {isOpen: boolean}) => void;
};
-const StyledSidePanelContainer = styled.div`
+const StyledSidePanelContainer = styled.div<{width: number}>`
z-index: 99;
height: 100%;
width: ${props => props.width + 2 * props.theme.sidePanel.margin.left}px;
@@ -52,7 +52,7 @@ const StyledSidePanelContainer = styled.div`
}
`;
-const SideBarContainer = styled.div`
+const SideBarContainer = styled.div<{left: number}>`
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
transition: left 250ms, right 250ms;
left: ${props => props.left}px;
diff --git a/src/utils/data-utils.ts b/src/utils/data-utils.ts
index fb6833b69..6b9514255 100644
--- a/src/utils/data-utils.ts
+++ b/src/utils/data-utils.ts
@@ -414,7 +414,7 @@ export function applyCustomFormat(format, field): FieldFormatter {
*/
export function datetimeFormatter(
timezone?: string | null
-): (format: string) => (ts: number) => string {
+): (format?: string) => (ts: number) => string {
return timezone
? format => ts =>
moment
diff --git a/yarn.lock b/yarn.lock
index c7fa91d81..8eab4d0c0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3230,7 +3230,7 @@
resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa"
integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==
-"@types/hoist-non-react-statics@^3.3.0", "@types/hoist-non-react-statics@^3.3.1":
+"@types/hoist-non-react-statics@*", "@types/hoist-non-react-statics@^3.3.0", "@types/hoist-non-react-statics@^3.3.1":
version "3.3.1"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==
@@ -3512,6 +3512,15 @@
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"
integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==
+"@types/styled-components@^5.1.25":
+ version "5.1.25"
+ resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.25.tgz#0177c4ab5fa7c6ed0565d36f597393dae3f380ad"
+ integrity sha512-fgwl+0Pa8pdkwXRoVPP9JbqF0Ivo9llnmsm+7TCI330kbPIFd9qv1Lrhr37shf4tnxCOSu+/IgqM7uJXLWZZNQ==
+ dependencies:
+ "@types/hoist-non-react-statics" "*"
+ "@types/react" "*"
+ csstype "^3.0.2"
+
"@types/tapable@*", "@types/tapable@^1.0.5":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.6.tgz#a9ca4b70a18b270ccb2bc0aaafefd1d486b7ea74"