mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-28 19:43:43 +03:00
chore: remove unused imports after fix in TS@2.9.1
This commit is contained in:
parent
58284b3d99
commit
c7b3e47366
|
@ -1,11 +1,8 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import Dropdown from 'react-dropdown';
|
import Dropdown from 'react-dropdown';
|
||||||
|
|
||||||
import styled, {
|
import { StyledComponentClass } from 'styled-components';
|
||||||
ResolvedThemeInterface,
|
import styled, { withProps } from '../styled-components';
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../styled-components';
|
|
||||||
|
|
||||||
export interface DropdownOption {
|
export interface DropdownOption {
|
||||||
label: string;
|
label: string;
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
import { transparentize } from 'polished';
|
import { transparentize } from 'polished';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import styled, {
|
import styled, { extensionsHook, withProps } from '../styled-components';
|
||||||
extensionsHook,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../styled-components';
|
|
||||||
import { deprecatedCss } from './mixins';
|
import { deprecatedCss } from './mixins';
|
||||||
|
|
||||||
export const PropertiesTableCaption = styled.caption`
|
export const PropertiesTableCaption = styled.caption`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { transparentize } from 'polished';
|
import { transparentize } from 'polished';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../styled-components';
|
import styled from '../styled-components';
|
||||||
import { PropertyNameCell } from './fields-layout';
|
import { PropertyNameCell } from './fields-layout';
|
||||||
|
|
||||||
export const ClickablePropertyNameCell = PropertyNameCell.extend`
|
export const ClickablePropertyNameCell = PropertyNameCell.extend`
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { InterpolationFunction, Styles, ThemeProps } from 'styled-components';
|
|
||||||
|
|
||||||
import styled, {
|
import styled, { css, extensionsHook } from '../styled-components';
|
||||||
css,
|
|
||||||
extensionsHook,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
} from '../styled-components';
|
|
||||||
|
|
||||||
const headerFontSize = {
|
const headerFontSize = {
|
||||||
1: '1.85714em',
|
1: '1.85714em',
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { InterpolationFunction, Styles, ThemeProps } from 'styled-components';
|
|
||||||
|
|
||||||
import styled, { css, ResolvedThemeInterface, StyledComponentClass } from '../styled-components';
|
import styled, { css } from '../styled-components';
|
||||||
|
|
||||||
// tslint:disable-next-line
|
// tslint:disable-next-line
|
||||||
export const linkifyMixin = className => css`
|
export const linkifyMixin = className => css`
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import { InterpolationFunction, Styles, ThemeProps } from 'styled-components';
|
import { css } from '../styled-components';
|
||||||
|
|
||||||
import { css, StyledComponentClass } from '../styled-components';
|
|
||||||
|
|
||||||
export const deprecatedCss = css`
|
export const deprecatedCss = css`
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, { media, ResolvedThemeInterface, StyledComponentClass } from '../styled-components';
|
import styled, { media } from '../styled-components';
|
||||||
|
|
||||||
export const MiddlePanel = styled.div`
|
export const MiddlePanel = styled.div`
|
||||||
width: calc(100% - ${props => props.theme.rightPanel.width});
|
width: calc(100% - ${props => props.theme.rightPanel.width});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../styled-components';
|
import styled from '../styled-components';
|
||||||
|
|
||||||
export const SampleControls = styled.div`
|
export const SampleControls = styled.div`
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, {
|
import styled, { withProps } from '../styled-components';
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../styled-components';
|
|
||||||
|
|
||||||
export const OneOfList = styled.ul`
|
export const OneOfList = styled.ul`
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, {
|
import styled, { withProps } from '../styled-components';
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../styled-components';
|
|
||||||
|
|
||||||
const directionMap = {
|
const directionMap = {
|
||||||
left: '90deg',
|
left: '90deg',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Tabs as ReactTabs, TabsProps } from 'react-tabs';
|
import { Tabs as ReactTabs, TabsProps } from 'react-tabs';
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../styled-components';
|
import styled from '../styled-components';
|
||||||
|
|
||||||
export { Tab, TabList, TabPanel } from 'react-tabs';
|
export { Tab, TabList, TabPanel } from 'react-tabs';
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ import * as React from 'react';
|
||||||
import { AppStore } from '../../services/AppStore';
|
import { AppStore } from '../../services/AppStore';
|
||||||
|
|
||||||
import { MiddlePanel, Row } from '../../common-elements/';
|
import { MiddlePanel, Row } from '../../common-elements/';
|
||||||
import { Markdown } from '../Markdown/Markdown';
|
|
||||||
import { SecurityDefs } from '../SecuritySchemes/SecuritySchemes';
|
|
||||||
|
|
||||||
import { StyledMarkdownBlock } from '../Markdown/styled.elements';
|
import { StyledMarkdownBlock } from '../Markdown/styled.elements';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
import { AnchorHTMLAttributes, ClassAttributes, HTMLAttributes } from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { H1, MiddlePanel } from '../../common-elements';
|
import { H1, MiddlePanel } from '../../common-elements';
|
||||||
import styled, {
|
import styled, { extensionsHook } from '../../styled-components';
|
||||||
extensionsHook,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
const delimiterWidth = 15;
|
const delimiterWidth = 15;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
|
|
||||||
export const LogoImgEl = styled.img`
|
export const LogoImgEl = styled.img`
|
||||||
max-height: ${props => props.theme.logo.maxHeight};
|
max-height: ${props => props.theme.logo.maxHeight};
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import { ClassAttributes, HTMLAttributes, HTMLProps } from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import styled, {
|
import styled, { withProps } from '../../styled-components';
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
export const OperationEndpointWrap = styled.div`
|
export const OperationEndpointWrap = styled.div`
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
|
|
||||||
import { SampleControls } from '../../common-elements';
|
import { SampleControls } from '../../common-elements';
|
||||||
import { CopyButtonWrapper } from '../../common-elements/CopyButtonWrapper';
|
import { CopyButtonWrapper } from '../../common-elements/CopyButtonWrapper';
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { InterpolationFunction, Styles, ThemeProps } from 'styled-components';
|
import { css } from '../../styled-components';
|
||||||
import { css, ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
|
||||||
|
|
||||||
export const jsonStyles = css`
|
export const jsonStyles = css`
|
||||||
.redoc-json > .collapser {
|
.redoc-json > .collapser {
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, {
|
import styled, { keyframes } from '../../styled-components';
|
||||||
keyframes,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
const _Spinner = (props: { className?: string; color: string }) => (
|
const _Spinner = (props: { className?: string; color: string }) => (
|
||||||
<svg className={props.className} version="1.1" width="512" height="512" viewBox="0 0 512 512">
|
<svg className={props.className} version="1.1" width="512" height="512" viewBox="0 0 512 512">
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
|
||||||
|
|
||||||
import * as DOMPurify from 'dompurify';
|
import * as DOMPurify from 'dompurify';
|
||||||
import { AppStore, MarkdownRenderer, MDXComponentMeta } from '../../services';
|
import { AppStore, MarkdownRenderer, MDXComponentMeta } from '../../services';
|
||||||
|
|
|
@ -1,14 +1,7 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { InterpolationFunction, Styles, ThemeProps } from 'styled-components';
|
|
||||||
|
|
||||||
import { headerCommonMixin, linkifyMixin } from '../../common-elements';
|
import { headerCommonMixin, linkifyMixin } from '../../common-elements';
|
||||||
import styled, {
|
import styled, { css, extensionsHook, withProps } from '../../styled-components';
|
||||||
css,
|
|
||||||
extensionsHook,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
export const linksCss = css`
|
export const linksCss = css`
|
||||||
a {
|
a {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled from '../../styled-components';
|
|
||||||
import { SecurityRequirements } from '../SecurityRequirement/SecuirityRequirement';
|
import { SecurityRequirements } from '../SecurityRequirement/SecuirityRequirement';
|
||||||
|
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import * as PropTypes from 'prop-types';
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { RedocNormalizedOptions } from '../services/RedocNormalizedOptions';
|
import { RedocNormalizedOptions } from '../services/RedocNormalizedOptions';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ClassAttributes, HTMLAttributes } from 'react';
|
import * as React from 'react';
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
|
|
||||||
import { DropdownProps, StyledDropdown } from '../../common-elements';
|
import { DropdownProps, StyledDropdown } from '../../common-elements';
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import { ClassAttributes, HTMLAttributes } from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import styled, {
|
import styled, { media } from '../../styled-components';
|
||||||
media,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
export const RedocWrap = styled.div`
|
export const RedocWrap = styled.div`
|
||||||
font-family: ${props => props.theme.baseFont.family};
|
font-family: ${props => props.theme.baseFont.family};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { MediaContentModel, OperationModel } from '../../services/models';
|
import { OperationModel } from '../../services/models';
|
||||||
|
|
||||||
import { RightPanelHeader, Tab, TabList, TabPanel, Tabs } from '../../common-elements';
|
import { RightPanelHeader, Tab, TabList, TabPanel, Tabs } from '../../common-elements';
|
||||||
import { PayloadSamples } from '../PayloadSamples/PayloadSamples';
|
import { PayloadSamples } from '../PayloadSamples/PayloadSamples';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { transparentize } from 'polished';
|
import { transparentize } from 'polished';
|
||||||
import { ClassAttributes, HTMLAttributes } from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { UnderlinedHeader } from '../../common-elements';
|
import { UnderlinedHeader } from '../../common-elements';
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
import { ResponseTitle, ResponseTitleProps } from './ResponseTitle';
|
import { ResponseTitle } from './ResponseTitle';
|
||||||
|
|
||||||
export const StyledResponseTitle = styled(ResponseTitle)`
|
export const StyledResponseTitle = styled(ResponseTitle)`
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import styled, { ResolvedThemeInterface, StyledComponentClass } from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
import { MenuItemLabel } from '../SideMenu/styled.elements';
|
import { MenuItemLabel } from '../SideMenu/styled.elements';
|
||||||
|
|
||||||
export const SearchWrap = styled.div`
|
export const SearchWrap = styled.div`
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
import * as classnames from 'classnames';
|
import * as classnames from 'classnames';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { InterpolationFunction, Styles, ThemeProps } from 'styled-components';
|
|
||||||
|
|
||||||
import { deprecatedCss } from '../../common-elements';
|
import { deprecatedCss } from '../../common-elements';
|
||||||
import styled, {
|
import styled, { css, withProps } from '../../styled-components';
|
||||||
css,
|
|
||||||
ResolvedThemeInterface,
|
|
||||||
StyledComponentClass,
|
|
||||||
withProps,
|
|
||||||
} from '../../styled-components';
|
|
||||||
|
|
||||||
export const OperationBadge = withProps<{ type: string }>(styled.span).attrs({
|
export const OperationBadge = withProps<{ type: string }>(styled.span).attrs({
|
||||||
className: props => `operation-type ${props.type}`,
|
className: props => `operation-type ${props.type}`,
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { Component } from 'react';
|
||||||
|
|
||||||
import { AppStore } from '../services/';
|
import { AppStore } from '../services/';
|
||||||
import { RedocRawOptions } from '../services/RedocNormalizedOptions';
|
import { RedocRawOptions } from '../services/RedocNormalizedOptions';
|
||||||
import { OpenAPISpec } from '../types';
|
|
||||||
import { loadAndBundleSpec } from '../utils';
|
import { loadAndBundleSpec } from '../utils';
|
||||||
|
|
||||||
export interface StoreProviderProps {
|
export interface StoreProviderProps {
|
||||||
|
|
|
@ -9,7 +9,6 @@ function isSameHash(a: string, b: string): boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class IntHistoryService {
|
export class IntHistoryService {
|
||||||
private causedHashChange: boolean = false;
|
|
||||||
private _emiter;
|
private _emiter;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -40,7 +39,6 @@ export class IntHistoryService {
|
||||||
if (IS_BROWSER) {
|
if (IS_BROWSER) {
|
||||||
window.removeEventListener('hashchange', this.emit);
|
window.removeEventListener('hashchange', this.emit);
|
||||||
}
|
}
|
||||||
this.causedHashChange = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@bind
|
@bind
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { IS_BROWSER } from '../utils/';
|
||||||
import { IMenuItem } from './MenuStore';
|
import { IMenuItem } from './MenuStore';
|
||||||
import { OperationModel } from './models';
|
import { OperationModel } from './models';
|
||||||
|
|
||||||
import Worker, { SearchDocument, SearchResult } from './SearchWorker.worker';
|
import Worker from './SearchWorker.worker';
|
||||||
|
|
||||||
let worker: new () => Worker;
|
let worker: new () => Worker;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { computed, observable } from 'mobx';
|
import { computed, observable } from 'mobx';
|
||||||
import { OpenAPIExternalDocumentation, OpenAPISpec } from '../types';
|
import { OpenAPISpec } from '../types';
|
||||||
|
|
||||||
import { MenuBuilder } from './MenuBuilder';
|
import { MenuBuilder } from './MenuBuilder';
|
||||||
import { GroupModel, OperationModel } from './models/';
|
|
||||||
import { ApiInfoModel } from './models/ApiInfo';
|
import { ApiInfoModel } from './models/ApiInfo';
|
||||||
import { SecuritySchemesModel } from './models/SecuritySchemes';
|
import { SecuritySchemesModel } from './models/SecuritySchemes';
|
||||||
import { OpenAPIParser } from './OpenAPIParser';
|
import { OpenAPIParser } from './OpenAPIParser';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'raf/polyfill';
|
|
||||||
import * as Enzyme from 'enzyme';
|
import * as Enzyme from 'enzyme';
|
||||||
import * as Adapter from 'enzyme-adapter-react-16';
|
import * as Adapter from 'enzyme-adapter-react-16';
|
||||||
|
import 'raf/polyfill';
|
||||||
|
|
||||||
Enzyme.configure({ adapter: new Adapter() });
|
Enzyme.configure({ adapter: new Adapter() });
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ComponentClass, StatelessComponent } from 'react';
|
import * as React from 'react';
|
||||||
import * as styledComponents from 'styled-components';
|
import * as styledComponents from 'styled-components';
|
||||||
|
|
||||||
import { ResolvedThemeInterface, ThemeInterface } from './theme';
|
import { ResolvedThemeInterface } from './theme';
|
||||||
|
|
||||||
export { ResolvedThemeInterface };
|
export { ResolvedThemeInterface };
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ export const media = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export { css, injectGlobal, keyframes, ThemeProvider, withProps };
|
export { css, injectGlobal, keyframes, ThemeProvider, withProps };
|
||||||
export { StyledComponentClass } from 'styled-components';
|
|
||||||
export default styled;
|
export default styled;
|
||||||
|
|
||||||
export function extensionsHook(styledName: string) {
|
export function extensionsHook(styledName: string) {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/* tslint:disable:no-implicit-dependencies */
|
/* tslint:disable:no-implicit-dependencies */
|
||||||
|
|
||||||
import { has, set } from 'lodash';
|
import { has, set } from 'lodash';
|
||||||
import { instanceOf } from 'prop-types';
|
|
||||||
import { RedocNormalizedOptions } from '../services/RedocNormalizedOptions';
|
|
||||||
|
|
||||||
function traverseComponent(root, fn) {
|
function traverseComponent(root, fn) {
|
||||||
if (!root) {
|
if (!root) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user