Remove prop-types (#1557)

This commit is contained in:
Nathan Bierema 2023-12-10 00:50:15 -05:00 committed by GitHub
parent 37fee5574a
commit b54bc75cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 4 additions and 642 deletions

View File

@ -41,9 +41,7 @@
"dependencies": {
"@babel/runtime": "^7.23.5",
"@types/lodash": "^4.14.202",
"@types/prop-types": "^15.7.11",
"lodash.debounce": "^4.0.8",
"prop-types": "^15.8.1"
"lodash.debounce": "^4.0.8"
},
"devDependencies": {
"@babel/cli": "^7.23.4",

View File

@ -1,5 +1,4 @@
import React, { Component, ReactNode } from 'react';
import PropTypes from 'prop-types';
import debounce from 'lodash.debounce';
import type { DebouncedFunc } from 'lodash';
import autoprefix from './autoprefix';
@ -260,21 +259,6 @@ export default class Dock extends Component<Props, State> {
isWindowResizing: false,
};
static propTypes = {
position: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),
zIndex: PropTypes.number,
fluid: PropTypes.bool,
size: PropTypes.number,
defaultSize: PropTypes.number,
dimMode: PropTypes.oneOf(['none', 'transparent', 'opaque']),
isVisible: PropTypes.bool,
onVisibleChange: PropTypes.func,
onSizeChange: PropTypes.func,
dimStyle: PropTypes.object,
dockStyle: PropTypes.object,
duration: PropTypes.number,
};
static defaultProps = {
position: 'left',
zIndex: 99999999,

View File

@ -51,14 +51,12 @@
"@redux-devtools/slider-monitor": "^4.1.0",
"@redux-devtools/ui": "^1.3.1",
"@reduxjs/toolkit": "^1.9.7",
"@types/prop-types": "^15.7.11",
"d3-state-visualizer": "^2.0.0",
"javascript-stringify": "^2.1.0",
"jsan": "^3.1.14",
"jsondiffpatch": "^0.5.0",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"prop-types": "^15.8.1",
"react-icons": "^4.12.0",
"react-is": "^18.2.0",
"react-redux": "^8.1.3",

View File

@ -1,7 +1,5 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button, Toolbar, Divider } from '@redux-devtools/ui';
import { MdSave } from 'react-icons/md';
import { Toolbar, Divider } from '@redux-devtools/ui';
import ExportButton from './buttons/ExportButton';
import ImportButton from './buttons/ImportButton';
import PrintButton from './buttons/PrintButton';
@ -17,12 +15,6 @@ interface Props {
}
export default class BottomButtons extends Component<Props> {
static propTypes = {
dispatcherIsOpen: PropTypes.bool,
sliderIsOpen: PropTypes.bool,
options: PropTypes.object.isRequired,
};
shouldComponentUpdate(nextProps: Props) {
return (
nextProps.dispatcherIsOpen !== this.props.dispatcherIsOpen ||

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ActionCreators, LiftedAction } from '@redux-devtools/core';
import { Button, Toolbar, Divider } from '@redux-devtools/ui';
import { Action } from 'redux';
@ -20,13 +19,6 @@ interface Props {
}
export default class TopButtons extends Component<Props> {
static propTypes = {
// shouldSync: PropTypes.bool,
liftedState: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
options: PropTypes.object.isRequired,
};
shouldComponentUpdate(nextProps: Props) {
return (
nextProps.options !== this.props.options ||

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect, ResolveThunks } from 'react-redux';
import { Button } from '@redux-devtools/ui';
import { FaThumbtack } from 'react-icons/fa';

View File

@ -42,9 +42,7 @@
},
"dependencies": {
"@babel/runtime": "^7.23.5",
"@types/prop-types": "^15.7.11",
"parse-key": "^0.2.1",
"prop-types": "^15.8.1",
"react-dock": "^0.6.0"
},
"devDependencies": {

View File

@ -1,9 +1,7 @@
import React, { cloneElement, Children, Component } from 'react';
import PropTypes from 'prop-types';
import { Dock } from 'react-dock';
import { Action, Dispatch } from 'redux';
import { LiftedState, Monitor } from '@redux-devtools/core';
import { POSITIONS } from './constants';
import {
toggleVisibility,
changeMonitor,
@ -68,24 +66,6 @@ class DockMonitor<S, A extends Action<string>> extends Component<
> {
static update = reducer;
static propTypes = {
defaultPosition: PropTypes.oneOf(POSITIONS),
defaultIsVisible: PropTypes.bool.isRequired,
defaultSize: PropTypes.number.isRequired,
toggleVisibilityKey: PropTypes.string.isRequired,
changePositionKey: PropTypes.string.isRequired,
changeMonitorKey: PropTypes.string,
fluid: PropTypes.bool,
dispatch: PropTypes.func,
monitorState: PropTypes.shape({
position: PropTypes.oneOf(POSITIONS).isRequired,
size: PropTypes.number.isRequired,
isVisible: PropTypes.bool.isRequired,
childMonitorState: PropTypes.any,
}),
};
static defaultProps: DefaultProps = {
defaultIsVisible: true,
defaultPosition: 'right',

View File

@ -45,12 +45,10 @@
"dependencies": {
"@babel/runtime": "^7.23.5",
"@redux-devtools/ui": "^1.3.1",
"@types/prop-types": "^15.7.11",
"es6template": "^1.0.5",
"javascript-stringify": "^2.1.0",
"jsan": "^3.1.14",
"object-path": "^0.11.8",
"prop-types": "^15.8.1",
"react-icons": "^4.12.0",
"simple-diff": "^1.7.2"
},

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Toolbar,
Container,
@ -185,22 +184,6 @@ export class TestTab<S, A extends Action<string>> extends Component<
</Container>
);
}
static propTypes = {
monitorState: PropTypes.shape({
testGenerator: PropTypes.shape({
templates: PropTypes.array,
selected: PropTypes.number,
hideTip: PropTypes.bool,
}),
}).isRequired,
/*
options: PropTypes.shape({
lib: PropTypes.string
}).isRequired,
*/
updateMonitorState: PropTypes.func.isRequired,
};
}
export { default as reduxAvaTemplate } from './redux/ava';

View File

@ -41,7 +41,6 @@
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@types/lodash": "^4.14.202",
"@types/prop-types": "^15.7.11",
"@types/redux-devtools-themes": "^1.0.3",
"dateformat": "^5.0.3",
"hex-rgba": "^1.0.2",
@ -51,7 +50,6 @@
"jss": "^10.10.0",
"jss-preset-default": "^10.10.0",
"lodash.debounce": "^4.0.8",
"prop-types": "^15.8.1",
"react-base16-styling": "^0.9.1",
"react-json-tree": "^0.18.0",
"redux-devtools-themes": "^1.0.0"

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { StylingFunction } from 'react-base16-styling';
import RightSlider from './RightSlider';
@ -65,14 +64,4 @@ const ActionListHeader: FunctionComponent<Props> = ({
</div>
);
ActionListHeader.propTypes = {
styling: PropTypes.func.isRequired,
onSearch: PropTypes.func.isRequired,
onCommit: PropTypes.func.isRequired,
onSweep: PropTypes.func.isRequired,
hideMainButtons: PropTypes.bool,
hasSkippedActions: PropTypes.bool.isRequired,
hasStagedActions: PropTypes.bool.isRequired,
};
export default ActionListHeader;

View File

@ -1,5 +1,4 @@
import React, { MouseEvent, MouseEventHandler, PureComponent } from 'react';
import PropTypes from 'prop-types';
import dateformat from 'dateformat';
import type { DebouncedFunc } from 'lodash';
import debounce from 'lodash.debounce';
@ -37,20 +36,6 @@ export default class ActionListRow<
> extends PureComponent<Props<A>, State> {
state: State = { hover: false };
static propTypes = {
styling: PropTypes.func.isRequired,
isSelected: PropTypes.bool.isRequired,
action: PropTypes.object.isRequired,
isInFuture: PropTypes.bool.isRequired,
isInitAction: PropTypes.bool.isRequired,
onSelect: PropTypes.func.isRequired,
timestamps: PropTypes.shape({
current: PropTypes.number.isRequired,
previous: PropTypes.number.isRequired,
}).isRequired,
isSkipped: PropTypes.bool.isRequired,
};
render() {
const {
styling,

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { Action } from 'redux';
import { StylingFunction } from 'react-base16-styling';
import { Tab } from './ActionPreview';
@ -65,13 +64,4 @@ const ActionPreviewHeader: FunctionComponent<
</div>
);
ActionPreviewHeader.propTypes = {
tabs: PropTypes.array.isRequired,
styling: PropTypes.func.isRequired,
inspectedPath: PropTypes.array.isRequired,
onInspectPath: PropTypes.func.isRequired,
tabName: PropTypes.string.isRequired,
onSelectTab: PropTypes.func.isRequired,
};
export default ActionPreviewHeader;

View File

@ -1,5 +1,4 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Base16Theme } from 'redux-devtools-themes';
import {
getBase16Theme,
@ -205,32 +204,6 @@ class DevtoolsInspector<S, A extends Action<string>> extends PureComponent<
themeState: createThemeState(this.props),
};
static propTypes = {
dispatch: PropTypes.func,
computedStates: PropTypes.array,
stagedActionIds: PropTypes.array,
actionsById: PropTypes.object,
currentStateIndex: PropTypes.number,
monitorState: PropTypes.shape({
initialScrollTop: PropTypes.number,
}),
preserveScrollTop: PropTypes.bool,
draggableActions: PropTypes.bool,
select: PropTypes.func.isRequired,
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
supportImmutable: PropTypes.bool,
diffObjectHash: PropTypes.func,
diffPropertyFilter: PropTypes.func,
hideMainButtons: PropTypes.bool,
hideActionButtons: PropTypes.bool,
invertTheme: PropTypes.bool,
sortStateTreeAlphabetically: PropTypes.bool,
disableStateTreeCollection: PropTypes.bool,
skippedActionIds: PropTypes.array,
dataTypeKey: PropTypes.any,
tabs: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
};
static update = reducer;
static defaultProps = {

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { StylingFunction } from 'react-base16-styling';
interface Props {
@ -27,11 +26,4 @@ const RightSlider: FunctionComponent<Props> = ({
</div>
);
RightSlider.propTypes = {
styling: PropTypes.func.isRequired,
shown: PropTypes.bool,
children: PropTypes.any.isRequired,
rotate: PropTypes.bool,
};
export default RightSlider;

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { JSONTree } from 'react-json-tree';
import { Action } from 'redux';
import getItemString from './getItemString';
@ -29,14 +28,4 @@ const ActionTab: FunctionComponent<
/>
);
ActionTab.propTypes = {
action: PropTypes.any.isRequired,
styling: PropTypes.func.isRequired,
base16Theme: PropTypes.any.isRequired,
invertTheme: PropTypes.bool.isRequired,
labelRenderer: PropTypes.func.isRequired,
dataTypeKey: PropTypes.string,
isWideLayout: PropTypes.bool.isRequired,
};
export default ActionTab;

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import JSONDiff from './JSONDiff';
import { TabComponentProps } from '../ActionPreview';
import { Action } from 'redux';
@ -28,14 +27,4 @@ const DiffTab: FunctionComponent<
/>
);
DiffTab.propTypes = {
delta: PropTypes.any,
styling: PropTypes.func.isRequired,
base16Theme: PropTypes.any.isRequired,
invertTheme: PropTypes.bool.isRequired,
labelRenderer: PropTypes.func.isRequired,
isWideLayout: PropTypes.bool.isRequired,
dataTypeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.symbol]),
};
export default DiffTab;

View File

@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import { JSONTree } from 'react-json-tree';
import { Action } from 'redux';
import getItemString from './getItemString';
@ -33,14 +32,4 @@ const StateTab: React.FunctionComponent<
/>
);
StateTab.propTypes = {
nextState: PropTypes.any.isRequired,
styling: PropTypes.func.isRequired,
base16Theme: PropTypes.any.isRequired,
invertTheme: PropTypes.bool.isRequired,
labelRenderer: PropTypes.func.isRequired,
dataTypeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.symbol]),
isWideLayout: PropTypes.bool.isRequired,
};
export default StateTab;

View File

@ -43,10 +43,8 @@
"dependencies": {
"@babel/runtime": "^7.23.5",
"@types/lodash.debounce": "^4.0.9",
"@types/prop-types": "^15.7.11",
"@types/redux-devtools-themes": "^1.0.3",
"lodash.debounce": "^4.0.8",
"prop-types": "^15.8.1",
"react-json-tree": "^0.18.0",
"redux-devtools-themes": "^1.0.0"
},

View File

@ -1,5 +1,4 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Action, Dispatch } from 'redux';
import * as themes from 'redux-devtools-themes';
import { Base16Theme } from 'redux-devtools-themes';
@ -84,26 +83,6 @@ class LogMonitor<S, A extends Action<string>> extends PureComponent<
> {
static update = reducer;
static propTypes = {
dispatch: PropTypes.func,
computedStates: PropTypes.array,
actionsById: PropTypes.object,
stagedActionIds: PropTypes.array,
skippedActionIds: PropTypes.array,
monitorState: PropTypes.shape({
initialScrollTop: PropTypes.number,
consecutiveToggleStartId: PropTypes.number,
}),
preserveScrollTop: PropTypes.bool,
select: PropTypes.func,
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
expandActionRoot: PropTypes.bool,
expandStateRoot: PropTypes.bool,
markStateDiff: PropTypes.bool,
hideMainButtons: PropTypes.bool,
};
static defaultProps: DefaultProps<unknown> = {
select: (state: unknown) => state,
theme: 'nicinabox',

View File

@ -1,5 +1,4 @@
import React, { CSSProperties, PureComponent } from 'react';
import PropTypes from 'prop-types';
import { ActionCreators, LiftedAction } from '@redux-devtools/core';
import { Base16Theme } from 'redux-devtools-themes';
import { Action, Dispatch } from 'redux';
@ -31,11 +30,6 @@ export default class LogMonitorButtonBar<
S,
A extends Action<string>,
> extends PureComponent<Props<S, A>> {
static propTypes = {
dispatch: PropTypes.func,
theme: PropTypes.object,
};
handleRollback = () => {
this.props.dispatch(rollback());
};

View File

@ -1,5 +1,4 @@
import React, { CSSProperties, MouseEventHandler, PureComponent } from 'react';
import PropTypes from 'prop-types';
import { JSONTree } from 'react-json-tree';
import type { ShouldExpandNodeInitially, StylingValue } from 'react-json-tree';
import { Base16Theme } from 'redux-devtools-themes';
@ -51,22 +50,6 @@ export default class LogMonitorEntry<
S,
A extends Action<string>,
> extends PureComponent<Props<S, A>> {
static propTypes = {
state: PropTypes.object.isRequired,
action: PropTypes.object.isRequired,
actionId: PropTypes.number.isRequired,
select: PropTypes.func.isRequired,
inFuture: PropTypes.bool,
error: PropTypes.string,
onActionClick: PropTypes.func.isRequired,
onActionShiftClick: PropTypes.func.isRequired,
collapsed: PropTypes.bool,
selected: PropTypes.bool,
expandActionRoot: PropTypes.bool,
expandStateRoot: PropTypes.bool,
previousState: PropTypes.object,
};
printState(state: S, error: string | undefined) {
let errorText = error;
if (!errorText) {

View File

@ -1,5 +1,4 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Action } from 'redux';
import { PerformAction } from '@redux-devtools/core';
import { Base16Theme } from 'redux-devtools-themes';
@ -26,21 +25,6 @@ export default class LogMonitorEntryList<
S,
A extends Action<string>,
> extends PureComponent<Props<S, A>> {
static propTypes = {
actionsById: PropTypes.object,
computedStates: PropTypes.array,
stagedActionIds: PropTypes.array,
skippedActionIds: PropTypes.array,
currentStateIndex: PropTypes.number,
consecutiveToggleStartId: PropTypes.number,
select: PropTypes.func.isRequired,
onActionClick: PropTypes.func.isRequired,
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
expandActionRoot: PropTypes.bool,
expandStateRoot: PropTypes.bool,
};
render() {
const elements = [];
const {

View File

@ -47,14 +47,12 @@
"@babel/runtime": "^7.23.5",
"@redux-devtools/ui": "^1.3.1",
"@types/lodash": "^4.14.202",
"@types/prop-types": "^15.7.11",
"@types/redux-devtools-themes": "^1.0.3",
"hex-rgba": "^1.0.2",
"immutable": "^4.3.4",
"jss": "^10.10.0",
"jss-preset-default": "^10.10.0",
"lodash.debounce": "^4.0.8",
"prop-types": "^15.8.1",
"react-base16-styling": "^0.9.1",
"react-json-tree": "^0.18.0",
"redux-devtools-themes": "^1.0.0"

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Action, AnyAction } from 'redux';
import RtkQueryInspector from './RtkQueryInspector';
import { reducer } from '../reducers';
@ -29,18 +28,6 @@ class RtkQueryMonitor<S, A extends Action<string>> extends Component<
> {
static update = reducer;
static propTypes = {
dispatch: PropTypes.func,
computedStates: PropTypes.array,
currentStateIndex: PropTypes.number,
actionsById: PropTypes.object,
stagedActionIds: PropTypes.array,
skippedActionIds: PropTypes.array,
monitorState: PropTypes.object,
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
invertTheme: PropTypes.bool,
};
static defaultProps: DefaultProps = {
theme: 'nicinabox',
invertTheme: false,

View File

@ -20,7 +20,6 @@
"@redux-devtools/log-monitor": "^4.0.0",
"@redux-devtools/slider-monitor": "^4.0.0",
"classnames": "^2.3.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
@ -36,7 +35,6 @@
"@babel/preset-typescript": "^7.23.3",
"@types/classnames": "^2.3.1",
"@types/node": "^20.10.4",
"@types/prop-types": "^15.7.11",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/styled-components": "^5.1.34",

View File

@ -1,5 +1,4 @@
import React, { Component, MouseEventHandler } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import {
SHOW_ALL,
@ -23,14 +22,6 @@ interface Props {
}
export default class Footer extends Component<Props> {
static propTypes = {
markedCount: PropTypes.number.isRequired,
unmarkedCount: PropTypes.number.isRequired,
filter: PropTypes.string.isRequired,
onClearMarked: PropTypes.func.isRequired,
onShow: PropTypes.func.isRequired,
};
render() {
return (
<footer className="footer">

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import TodoTextInput from './TodoTextInput';
interface Props {
@ -7,10 +6,6 @@ interface Props {
}
export default class Header extends Component<Props> {
static propTypes = {
addTodo: PropTypes.func.isRequired,
};
handleSave = (text: string) => {
if (text.length !== 0) {
this.props.addTodo(text);

View File

@ -1,5 +1,4 @@
import React, { Component, MouseEventHandler } from 'react';
import PropTypes from 'prop-types';
import TodoItem from './TodoItem';
import Footer from './Footer';
import {
@ -27,11 +26,6 @@ interface Props {
}
export default class MainSection extends Component<Props, State> {
static propTypes = {
todos: PropTypes.array.isRequired,
actions: PropTypes.object.isRequired,
};
state: State = { filter: SHOW_ALL };
handleClearMarked: MouseEventHandler<HTMLButtonElement> = () => {

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import TodoTextInput from './TodoTextInput';
import { Todo } from '../reducers/todos';
@ -19,13 +18,6 @@ interface Props {
}
export default class TodoItem extends Component<Props, State> {
static propTypes = {
todo: PropTypes.object.isRequired,
editTodo: PropTypes.func.isRequired,
deleteTodo: PropTypes.func.isRequired,
markTodo: PropTypes.func.isRequired,
};
state: State = {
editing: false,
};

View File

@ -4,7 +4,6 @@ import React, {
FocusEventHandler,
KeyboardEventHandler,
} from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
interface State {
@ -20,14 +19,6 @@ interface Props {
}
export default class TodoTextInput extends Component<Props, State> {
static propTypes = {
onSave: PropTypes.func.isRequired,
text: PropTypes.string,
placeholder: PropTypes.string,
editing: PropTypes.bool,
newTodo: PropTypes.bool,
};
static defaultProps = {
text: '',
placeholder: '',

View File

@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { Store } from 'redux';
import TodoApp from './TodoApp';
@ -20,8 +19,4 @@ const Root: React.FunctionComponent<Props> = ({ store }) => (
</Provider>
);
Root.propTypes = {
store: PropTypes.any.isRequired,
};
export default Root;

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import TodoApp from './TodoApp';
import { Store } from 'redux';
@ -18,8 +17,4 @@ const Root: FunctionComponent<Props> = ({ store }) => (
</Provider>
);
Root.propTypes = {
store: PropTypes.any.isRequired,
};
export default Root;

View File

@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';
import Header from '../components/Header';
@ -25,11 +24,6 @@ const TodoApp: FunctionComponent<Props> = ({ todos, actions }) => (
</div>
);
TodoApp.propTypes = {
todos: PropTypes.array.isRequired,
actions: PropTypes.any.isRequired,
};
function mapState(state: TodoState) {
return {
todos: state.todos,

View File

@ -34,9 +34,7 @@
"dependencies": {
"@babel/runtime": "^7.23.5",
"@redux-devtools/ui": "^1.3.1",
"@types/prop-types": "^15.7.11",
"@types/redux-devtools-themes": "^1.0.3",
"prop-types": "^15.8.1",
"redux-devtools-themes": "^1.0.0"
},
"devDependencies": {

View File

@ -1,5 +1,4 @@
import React, { Component, PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Base16Theme } from 'redux-devtools-themes';
import { Button } from '@redux-devtools/ui';
@ -11,13 +10,6 @@ interface Props {
}
export default class SliderButton extends (PureComponent || Component)<Props> {
static propTypes = {
theme: PropTypes.object,
type: PropTypes.string,
disabled: PropTypes.bool,
onClick: PropTypes.func,
};
iconStyle() {
return {
cursor: 'hand',

View File

@ -1,5 +1,4 @@
import React, { Component, PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Action, Dispatch } from 'redux';
import * as themes from 'redux-devtools-themes';
import { Base16Theme } from 'redux-devtools-themes';
@ -59,23 +58,6 @@ class SliderMonitor<S, A extends Action<string>> extends (PureComponent ||
Component)<SliderMonitorProps<S, A>, State> {
static update = reducer;
static propTypes = {
dispatch: PropTypes.func,
computedStates: PropTypes.array,
stagedActionIds: PropTypes.array,
actionsById: PropTypes.object,
currentStateIndex: PropTypes.number,
monitorState: PropTypes.shape({
initialScrollTop: PropTypes.number,
}),
preserveScrollTop: PropTypes.bool,
// stagedActions: PropTypes.array,
select: PropTypes.func.isRequired,
hideResetButton: PropTypes.bool,
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
keyboardEnabled: PropTypes.bool,
};
static defaultProps = {
select: (state: unknown) => state,
theme: 'nicinabox',

View File

@ -47,13 +47,11 @@
"@types/base16": "^1.0.5",
"@types/codemirror": "^5.60.15",
"@types/json-schema": "^7.0.15",
"@types/prop-types": "^15.7.11",
"@types/redux-devtools-themes": "^1.0.3",
"@types/simple-element-resize-detector": "^1.3.3",
"base16": "^1.0.0",
"codemirror": "^5.65.16",
"color": "^4.2.3",
"prop-types": "^15.8.1",
"react-icons": "^4.12.0",
"react-select": "^5.8.0",
"redux-devtools-themes": "^1.0.0",

View File

@ -1,5 +1,4 @@
import React, { Component, ReactNode } from 'react';
import PropTypes from 'prop-types';
import { Base16Theme } from 'base16';
import createStyledComponent from '../utils/createStyledComponent';
import * as styles from './styles';
@ -90,38 +89,6 @@ export default class Button extends Component<ButtonProps> {
);
}
static propTypes = {
children: PropTypes.any.isRequired,
title: PropTypes.string,
tooltipPosition: PropTypes.oneOf([
'top',
'bottom',
'left',
'right',
'bottom-left',
'bottom-right',
'top-left',
'top-right',
]),
onClick: PropTypes.func,
type: PropTypes.string,
disabled: PropTypes.bool,
primary: PropTypes.bool,
size: PropTypes.oneOf(['big', 'normal', 'small']),
mark: PropTypes.oneOf([
false,
'base08',
'base09',
'base0A',
'base0B',
'base0C',
'base0D',
'base0E',
'base0F',
]),
theme: PropTypes.object,
};
static defaultProps = {
tooltipPosition: 'top',
};

View File

@ -1,5 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import { ThemeProvider } from 'styled-components';
import { useTheme, ThemeData } from '../utils/theme';
import { MainContainerWrapper, ContainerWrapper } from './styles';
@ -52,11 +51,4 @@ const Container: React.FunctionComponent<Props> = ({
);
};
Container.propTypes = {
children: PropTypes.node,
themeData: PropTypes.any,
theme: PropTypes.any,
className: PropTypes.string,
};
export default Container;

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import createStyledComponent from '../utils/createStyledComponent';
import styles from './styles/index';
@ -102,12 +101,4 @@ export default class ContextMenu extends Component<ContextMenuProps> {
</ContextMenuWrapper>
);
}
static propTypes = {
items: PropTypes.array.isRequired,
onClick: PropTypes.func.isRequired,
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired,
visible: PropTypes.bool,
};
}

View File

@ -1,5 +1,4 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Base16Theme } from 'base16';
import createStyledComponent from '../utils/createStyledComponent';
import * as styles from './styles';
@ -137,19 +136,4 @@ export default class Dialog<P> extends PureComponent<
</DialogWrapper>
);
}
static propTypes = {
open: PropTypes.bool,
title: PropTypes.string,
children: PropTypes.any,
actions: PropTypes.node,
submitText: PropTypes.string,
fullWidth: PropTypes.bool,
noHeader: PropTypes.bool,
noFooter: PropTypes.bool,
modal: PropTypes.bool,
onDismiss: PropTypes.func,
onSubmit: PropTypes.func,
theme: PropTypes.object,
};
}

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import CodeMirror, { EditorChange } from 'codemirror';
import { Base16Theme } from 'base16';
@ -97,18 +96,6 @@ export default class Editor extends Component<EditorProps> {
return <EditorContainer ref={this.getRef} theme={this.props.theme} />;
}
static propTypes = {
value: PropTypes.string,
mode: PropTypes.string,
lineNumbers: PropTypes.bool,
lineWrapping: PropTypes.bool,
readOnly: PropTypes.bool,
theme: PropTypes.object,
foldGutter: PropTypes.bool,
autofocus: PropTypes.bool,
onChange: PropTypes.func,
};
static defaultProps = {
value: '',
mode: 'javascript',

View File

@ -1,5 +1,4 @@
import React, { PureComponent, Component } from 'react';
import PropTypes from 'prop-types';
import JSONSchemaForm, { FormProps } from '@rjsf/core';
import { Base16Theme } from 'base16';
import createStyledComponent from '../utils/createStyledComponent';
@ -46,17 +45,4 @@ export default class Form<T> extends (PureComponent || Component)<Props<T>> {
</FormContainer>
);
}
static propTypes = {
children: PropTypes.any,
submitText: PropTypes.string,
primaryButton: PropTypes.bool,
noSubmit: PropTypes.bool,
schema: PropTypes.object.isRequired,
uiSchema: PropTypes.object,
formData: PropTypes.any,
widgets: PropTypes.objectOf(
PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
),
};
}

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { MdClose } from 'react-icons/md';
import { MdWarning } from 'react-icons/md';
import { MdError } from 'react-icons/md';
@ -54,13 +53,6 @@ export default class Notification extends Component<NotificationProps> {
);
}
static propTypes = {
children: PropTypes.any.isRequired,
type: PropTypes.oneOf(['info', 'success', 'warning', 'error']),
onClose: PropTypes.func,
theme: PropTypes.object,
};
static defaultProps = {
type: 'info',
};

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Base16Theme } from 'base16';
import createStyledComponent from '../utils/createStyledComponent';
import styles from './styles';
@ -48,12 +47,4 @@ export default class SegmentedControl extends Component<SegmentedControlProps> {
</SegmentedWrapper>
);
}
static propTypes = {
values: PropTypes.array.isRequired,
selected: PropTypes.string,
onClick: PropTypes.func,
disabled: PropTypes.bool,
theme: PropTypes.object,
};
}

View File

@ -1,5 +1,4 @@
import React, { PureComponent, Component, ReactElement } from 'react';
import PropTypes from 'prop-types';
import ReactSelect, {
GroupBase,
Props as ReactSelectProps,
@ -80,17 +79,6 @@ export class Select<
/>
);
}
static propTypes = {
isClearable: PropTypes.bool, // should it be possible to reset value
isDisabled: PropTypes.bool, // whether the Select is disabled or not
isLoading: PropTypes.bool, // whether the Select is loading externally or not
maxMenuHeight: PropTypes.number, // maximum css height for the opened menu of options
isMulti: PropTypes.bool, // multi-value input
isSearchable: PropTypes.bool, // whether to enable searching feature or not
value: PropTypes.any, // initial field value
menuPlacement: PropTypes.oneOf(['auto', 'bottom', 'top']), // value to control the opening direction
};
}
export interface ExternalSelectProps<

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Base16Theme } from 'base16';
import createStyledComponent from '../utils/createStyledComponent';
import * as styles from './styles';
@ -67,17 +66,5 @@ export default class Slider extends Component<SliderProps> {
);
}
static propTypes = {
value: PropTypes.number,
min: PropTypes.number,
max: PropTypes.number,
label: PropTypes.string,
sublabel: PropTypes.string,
withValue: PropTypes.bool,
disabled: PropTypes.bool,
onChange: PropTypes.func,
theme: PropTypes.object,
};
static defaultProps = { value: 0, min: 0, max: 100 };
}

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import TabsHeader, { ReactButtonElement, Tab } from './TabsHeader';
import { TabsContainer } from './styles/common';
@ -85,14 +84,5 @@ export default class Tabs<P extends object> extends Component<TabsProps<P>> {
);
}
static propTypes = {
tabs: PropTypes.array.isRequired,
selected: PropTypes.string,
main: PropTypes.bool,
onClick: PropTypes.func.isRequired,
collapsible: PropTypes.bool,
position: PropTypes.oneOf(['left', 'right', 'center']),
};
static defaultProps = { position: 'left' };
}

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import observeResize from 'simple-element-resize-detector';
import { FaAngleDoubleRight } from 'react-icons/fa';
import ContextMenu from '../ContextMenu';
@ -234,14 +233,4 @@ export default class TabsHeader<P> extends Component<Props<P>, State> {
</TabsWrapper>
);
}
static propTypes = {
tabs: PropTypes.array.isRequired,
items: PropTypes.array.isRequired,
main: PropTypes.bool,
onClick: PropTypes.func,
position: PropTypes.string,
collapsible: PropTypes.bool,
selected: PropTypes.string,
};
}

View File

@ -22,7 +22,6 @@
"@redux-devtools/core": "^3.13.0",
"@redux-devtools/dock-monitor": "^3.0.0",
"@redux-devtools/log-monitor": "^4.0.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.1.3",
@ -35,7 +34,6 @@
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@types/node": "^20.10.4",
"@types/prop-types": "^15.7.11",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/webpack-env": "^1.18.4",

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
interface Props {
increment: () => void;
@ -9,13 +8,6 @@ interface Props {
}
export default class Counter extends Component<Props> {
static propTypes = {
increment: PropTypes.func.isRequired,
incrementIfOdd: PropTypes.func.isRequired,
decrement: PropTypes.func.isRequired,
counter: PropTypes.number.isRequired,
};
render() {
const { increment, incrementIfOdd, decrement, counter } = this.props;
return (

View File

@ -35,7 +35,6 @@
"@redux-devtools/dock-monitor": "^3.0.0",
"@redux-devtools/log-monitor": "^4.0.0",
"classnames": "^2.3.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.1.3",
@ -49,7 +48,6 @@
"@babel/preset-typescript": "^7.23.3",
"@types/classnames": "^2.3.1",
"@types/node": "^20.10.4",
"@types/prop-types": "^15.7.11",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/webpack-env": "^1.18.4",

View File

@ -1,5 +1,4 @@
import React, { Component, MouseEventHandler } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import {
SHOW_ALL,
@ -23,14 +22,6 @@ interface Props {
}
export default class Footer extends Component<Props> {
static propTypes = {
markedCount: PropTypes.number.isRequired,
unmarkedCount: PropTypes.number.isRequired,
filter: PropTypes.string.isRequired,
onClearMarked: PropTypes.func.isRequired,
onShow: PropTypes.func.isRequired,
};
render() {
return (
<footer className="footer">

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import TodoTextInput from './TodoTextInput';
interface Props {
@ -7,10 +6,6 @@ interface Props {
}
export default class Header extends Component<Props> {
static propTypes = {
addTodo: PropTypes.func.isRequired,
};
handleSave = (text: string) => {
if (text.length !== 0) {
this.props.addTodo(text);

View File

@ -1,5 +1,4 @@
import React, { Component, MouseEventHandler } from 'react';
import PropTypes from 'prop-types';
import TodoItem from './TodoItem';
import Footer from './Footer';
import {
@ -27,10 +26,6 @@ interface Props {
}
export default class MainSection extends Component<Props, State> {
static propTypes = {
todos: PropTypes.array.isRequired,
actions: PropTypes.object.isRequired,
};
// Keep a counter that can be used to create an html `id` attribute.
static mountCount = 0;

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import TodoTextInput from './TodoTextInput';
import { Todo } from '../reducers/todos';
@ -19,13 +18,6 @@ interface Props {
}
export default class TodoItem extends Component<Props, State> {
static propTypes = {
todo: PropTypes.object.isRequired,
editTodo: PropTypes.func.isRequired,
deleteTodo: PropTypes.func.isRequired,
markTodo: PropTypes.func.isRequired,
};
state: State = {
editing: false,
};

View File

@ -4,7 +4,6 @@ import React, {
FocusEventHandler,
KeyboardEventHandler,
} from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
interface State {
@ -20,14 +19,6 @@ interface Props {
}
export default class TodoTextInput extends Component<Props, State> {
static propTypes = {
onSave: PropTypes.func.isRequired,
text: PropTypes.string,
placeholder: PropTypes.string,
editing: PropTypes.bool,
newTodo: PropTypes.bool,
};
state = {
text: this.props.text || '',
};

View File

@ -43,9 +43,7 @@
"dependencies": {
"@babel/runtime": "^7.23.5",
"@redux-devtools/instrument": "^2.2.0",
"@types/prop-types": "^15.7.11",
"lodash": "^4.17.21",
"prop-types": "^15.8.1"
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/cli": "^7.23.4",

View File

@ -1,5 +1,4 @@
import React, { Children, Component } from 'react';
import PropTypes from 'prop-types';
import { connect, Provider, ReactReduxContext } from 'react-redux';
import {
instrument,
@ -69,14 +68,6 @@ export default function createDevTools<
return class DevTools extends Component<
Props<S, A, MonitorState, MonitorAction>
> {
static contextTypes = {
store: PropTypes.object,
};
static propTypes = {
store: PropTypes.object,
};
liftedStore?: LiftedStore<S, A, MonitorState>;
static instrument = (

View File

@ -539,15 +539,9 @@ importers:
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
lodash.debounce:
specifier: ^4.0.8
version: 4.0.8
prop-types:
specifier: ^15.8.1
version: 15.8.1
devDependencies:
'@babel/cli':
specifier: ^7.23.4
@ -918,15 +912,9 @@ importers:
'@redux-devtools/instrument':
specifier: ^2.2.0
version: link:../redux-devtools-instrument
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
lodash:
specifier: ^4.17.21
version: 4.17.21
prop-types:
specifier: ^15.8.1
version: 15.8.1
devDependencies:
'@babel/cli':
specifier: ^7.23.4
@ -1042,9 +1030,6 @@ importers:
'@reduxjs/toolkit':
specifier: ^1.9.7
version: 1.9.7(react-redux@8.1.3)(react@18.2.0)
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
d3-state-visualizer:
specifier: ^2.0.0
version: link:../d3-state-visualizer
@ -1063,9 +1048,6 @@ importers:
lodash:
specifier: ^4.17.21
version: 4.17.21
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-icons:
specifier: ^4.12.0
version: 4.12.0(react@18.2.0)
@ -1468,15 +1450,9 @@ importers:
'@babel/runtime':
specifier: ^7.23.5
version: 7.23.5
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
parse-key:
specifier: ^0.2.1
version: 0.2.1
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-dock:
specifier: ^0.6.0
version: link:../react-dock
@ -1611,9 +1587,6 @@ importers:
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/redux-devtools-themes':
specifier: ^1.0.3
version: 1.0.3
@ -1641,9 +1614,6 @@ importers:
lodash.debounce:
specifier: ^4.0.8
version: 4.0.8
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-base16-styling:
specifier: ^0.9.1
version: link:../react-base16-styling
@ -1735,9 +1705,6 @@ importers:
'@redux-devtools/ui':
specifier: ^1.3.1
version: link:../redux-devtools-ui
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/styled-components':
specifier: ^5.1.34
version: 5.1.34
@ -1753,9 +1720,6 @@ importers:
object-path:
specifier: ^0.11.8
version: 0.11.8
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-icons:
specifier: ^4.12.0
version: 4.12.0(react@18.2.0)
@ -2319,18 +2283,12 @@ importers:
'@types/lodash.debounce':
specifier: ^4.0.9
version: 4.0.9
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/redux-devtools-themes':
specifier: ^1.0.3
version: 1.0.3
lodash.debounce:
specifier: ^4.0.8
version: 4.0.8
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-json-tree:
specifier: ^0.18.0
version: link:../react-json-tree
@ -2483,9 +2441,6 @@ importers:
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/redux-devtools-themes':
specifier: ^1.0.3
version: 1.0.3
@ -2507,9 +2462,6 @@ importers:
lodash.debounce:
specifier: ^4.0.8
version: 4.0.8
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-base16-styling:
specifier: ^0.9.1
version: link:../react-base16-styling
@ -2831,18 +2783,12 @@ importers:
'@redux-devtools/ui':
specifier: ^1.3.1
version: link:../redux-devtools-ui
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/redux-devtools-themes':
specifier: ^1.0.3
version: 1.0.3
'@types/styled-components':
specifier: ^5.1.34
version: 5.1.34
prop-types:
specifier: ^15.8.1
version: 15.8.1
redux-devtools-themes:
specifier: ^1.0.0
version: 1.0.0
@ -2925,9 +2871,6 @@ importers:
classnames:
specifier: ^2.3.2
version: 2.3.2
prop-types:
specifier: ^15.8.1
version: 15.8.1
react:
specifier: ^18.2.0
version: 18.2.0
@ -2968,9 +2911,6 @@ importers:
'@types/node':
specifier: ^20.10.4
version: 20.10.4
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/react':
specifier: ^18.2.43
version: 18.2.43
@ -3052,9 +2992,6 @@ importers:
'@types/json-schema':
specifier: ^7.0.15
version: 7.0.15
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/redux-devtools-themes':
specifier: ^1.0.3
version: 1.0.3
@ -3070,9 +3007,6 @@ importers:
color:
specifier: ^4.2.3
version: 4.2.3
prop-types:
specifier: ^15.8.1
version: 15.8.1
react-icons:
specifier: ^4.12.0
version: 4.12.0(react@18.2.0)
@ -3309,9 +3243,6 @@ importers:
'@redux-devtools/log-monitor':
specifier: ^4.0.0
version: link:../../../redux-devtools-log-monitor
prop-types:
specifier: ^15.8.1
version: 15.8.1
react:
specifier: ^18.2.0
version: 18.2.0
@ -3343,9 +3274,6 @@ importers:
'@types/node':
specifier: ^20.10.4
version: 20.10.4
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/react':
specifier: ^18.2.43
version: 18.2.43
@ -3415,9 +3343,6 @@ importers:
classnames:
specifier: ^2.3.2
version: 2.3.2
prop-types:
specifier: ^15.8.1
version: 15.8.1
react:
specifier: ^18.2.0
version: 18.2.0
@ -3452,9 +3377,6 @@ importers:
'@types/node':
specifier: ^20.10.4
version: 20.10.4
'@types/prop-types':
specifier: ^15.7.11
version: 15.7.11
'@types/react':
specifier: ^18.2.43
version: 18.2.43
@ -16517,6 +16439,7 @@ packages:
chalk: 3.0.0
diff-match-patch: 1.0.5
dev: false
bundledDependencies: []
/jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}