mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix lint.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"react",
|
||||
"jsx-a11y",
|
||||
"progress",
|
||||
"unused-imports"
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
@@ -55,16 +55,7 @@
|
||||
"unix"
|
||||
],
|
||||
"no-unused-vars": "off",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"varsIgnorePattern": "^_",
|
||||
"args": "after-used",
|
||||
"argsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"no-console": "error",
|
||||
"no-undef": "error",
|
||||
"no-empty": "error",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
|
||||
class NotFound extends Component {
|
||||
render() {
|
||||
class NotFound extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<Fragment>
|
||||
<div className="db-World-root">
|
||||
@@ -30,7 +33,7 @@ class NotFound extends Component {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
</Fragment >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
function DataPathHoC(WrappedComponent: $TSFixMe, data: $TSFixMe) {
|
||||
return class extends React.Component {
|
||||
return class extends Component<ComponentProps> {
|
||||
static displayName = 'HocCom';
|
||||
render() {
|
||||
override render() {
|
||||
// Wraps the input component in a container, without mutating it. Good!
|
||||
return (
|
||||
<WrappedComponent {...this.props} webhook={data} data={data} />
|
||||
|
||||
@@ -45,7 +45,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
||||
this.props.onClose(this.props.item);
|
||||
}
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { zIndex } = this.props;
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ class CardForm extends Component<CardFormProps> {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
this.plan = PricingPlan.getPlanById(this.props.planId);
|
||||
|
||||
@@ -649,10 +649,13 @@ const CardFormWithCheckOut = injectStripe(
|
||||
);
|
||||
CardFormWithCheckOut.displayName = 'CardFormWithCheckOut';
|
||||
|
||||
export default class CardFormHOC extends Component {
|
||||
render() {
|
||||
export default class CardFormHOC extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<StripeProvider apiKey={env('STRIPE_PUBLIC_KEY')}>
|
||||
<StripeProvider apiKey={env('STRIPE_PUBLIC_KEY')} >
|
||||
<Elements>
|
||||
<CardFormWithCheckOut />
|
||||
</Elements>
|
||||
|
||||
@@ -35,7 +35,7 @@ export class ChangePasswordForm extends Component<ChangePasswordFormProps> {
|
||||
this.props.changePassword(values);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const changePasswordStateError = this.props.changePasswordState.error;
|
||||
let header;
|
||||
|
||||
@@ -20,9 +20,9 @@ interface CompanyFormProps {
|
||||
}
|
||||
|
||||
class CompanyForm extends Component<CompanyFormProps> {
|
||||
render() {
|
||||
override render() {
|
||||
return (
|
||||
<div id="main-body" className="box css">
|
||||
<div id="main-body" className="box css" >
|
||||
<div className="inner">
|
||||
<div className="title extra">
|
||||
<h2>
|
||||
|
||||
@@ -36,7 +36,7 @@ export class LoginForm extends Component<LoginFormProps> {
|
||||
serverResponse: '',
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
|
||||
const query = queryString.parse(this.props.location.search).status;
|
||||
let serverResponse = '';
|
||||
@@ -55,7 +55,7 @@ export class LoginForm extends Component<LoginFormProps> {
|
||||
|
||||
this.props.changeLogin(data);
|
||||
}
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { handleSubmit } = this.props;
|
||||
const { serverResponse } = this.state;
|
||||
|
||||
@@ -69,7 +69,7 @@ export class RegisterForm extends Component<RegisterFormProps> {
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { step } = this.props.register;
|
||||
return (
|
||||
|
||||
@@ -32,7 +32,7 @@ export class ResetPasswordForm extends Component<ResetPasswordFormProps> {
|
||||
this.props.resetPassword(values);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const resetPasswordError = this.props.resetPasswordState.error;
|
||||
let header;
|
||||
|
||||
@@ -27,7 +27,7 @@ class UserForm extends Component<UserFormProps> {
|
||||
serverResponse: '',
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
|
||||
const query = queryString.parse(this.props.location.search);
|
||||
|
||||
@@ -43,7 +43,7 @@ class UserForm extends Component<UserFormProps> {
|
||||
this.props.getEmailFromToken(query.token);
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const { serverResponse } = this.state;
|
||||
return (
|
||||
<div id="main-body" className="box css" style={{ width: 500 }}>
|
||||
|
||||
@@ -16,7 +16,7 @@ class ErrorBoundary extends Component<ErrorBoundaryProps> {
|
||||
return { hasError: true, error };
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
if (this.state.hasError || this.state.error) {
|
||||
return (
|
||||
|
||||
@@ -10,11 +10,11 @@ interface ExtraChargeProps {
|
||||
}
|
||||
|
||||
class ExtraCharge extends React.Component<ExtraChargeProps> {
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
@@ -29,7 +29,7 @@ class ExtraCharge extends React.Component<ExtraChargeProps> {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
@@ -94,7 +94,7 @@ class ExtraCharge extends React.Component<ExtraChargeProps> {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ interface ModalsProps {
|
||||
}
|
||||
|
||||
export class Modals extends Component<ModalsProps> {
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const modals = this.props.modals.map((item: $TSFixMe, i: $TSFixMe) => {
|
||||
const ModalComponent = Modal(item.content);
|
||||
|
||||
@@ -27,12 +27,12 @@ class ChangePasswordPage extends React.Component<ChangePasswordPageProps> {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class LoginPage extends React.Component<LoginPageProps> {
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
|
||||
@@ -60,7 +60,7 @@ class LoginPage extends React.Component<LoginPageProps> {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { login, masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ interface RegisterPageProps {
|
||||
|
||||
class RegisterPage extends React.Component<RegisterPageProps> {
|
||||
planId: $TSFixMe;
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
document.body.id = '';
|
||||
document.body.className = '';
|
||||
|
||||
this.props.signUpReset();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.className = 'register-page';
|
||||
document.body.style.overflow = 'auto';
|
||||
@@ -56,7 +56,7 @@ class RegisterPage extends React.Component<RegisterPageProps> {
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { register } = this.props;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ export class ResendTokenForm extends Component<ResendTokenFormProps> {
|
||||
this.props.resendToken(values);
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
|
||||
@@ -54,7 +54,7 @@ export class ResendTokenForm extends Component<ResendTokenFormProps> {
|
||||
|
||||
removeQuery();
|
||||
}
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
const { serverResponse } = this.state;
|
||||
|
||||
@@ -11,12 +11,12 @@ interface ResetPasswordPageProps {
|
||||
}
|
||||
|
||||
class ResetPasswordPage extends React.Component<ResetPasswordPageProps> {
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ interface SsoLoginPageProps {
|
||||
}
|
||||
|
||||
class SsoLoginPage extends React.Component<SsoLoginPageProps> {
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
|
||||
const query = qs.parse(this.props.location.search);
|
||||
const user = {
|
||||
@@ -62,7 +62,7 @@ class SsoLoginPage extends React.Component<SsoLoginPageProps> {
|
||||
window.location = DASHBOARD_URL;
|
||||
}
|
||||
}
|
||||
render() {
|
||||
override render() {
|
||||
return <div />;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export class VerifyAuthToken extends Component<VerifyAuthTokenProps> {
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
}
|
||||
@@ -39,7 +39,7 @@ export class VerifyAuthToken extends Component<VerifyAuthTokenProps> {
|
||||
this.props.verifyAuthToken({ ...values, email });
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
if (!this.props.login.user.email)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export class VerifyBackupCode extends Component<VerifyBackupCodeProps> {
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export class VerifyBackupCode extends Component<VerifyBackupCodeProps> {
|
||||
this.props.verifyBackupCode({ ...values, email });
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
if (!this.props.login.user.email)
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
|
||||
class NotFound extends Component {
|
||||
render() {
|
||||
class NotFound extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<Fragment>
|
||||
<div className="db-World-root">
|
||||
@@ -30,7 +33,7 @@ class NotFound extends Component {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
</Fragment >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ import React from 'react';
|
||||
import Clipboard from 'clipboard';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class ClipboardWrap extends React.Component {
|
||||
class ClipboardWrap extends Component<ComponentProps> {
|
||||
button: $TSFixMe;
|
||||
clipboard: $TSFixMe;
|
||||
input: $TSFixMe;
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
const button = this.button;
|
||||
const input = this.input;
|
||||
|
||||
@@ -15,11 +15,11 @@ class ClipboardWrap extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
this.clipboard.destroy();
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { value } = this.props;
|
||||
|
||||
|
||||
@@ -22,7 +22,10 @@ import AlertPanel from './basic/AlertPanel';
|
||||
import { closeModal } from '../actions/modal';
|
||||
import { loadDashboard } from '../actions/dashboard';
|
||||
|
||||
export class DashboardApp extends Component {
|
||||
export class DashboardApp extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
componentDidMount = async () => {
|
||||
const {
|
||||
|
||||
@@ -91,7 +94,7 @@ export class DashboardApp extends Component {
|
||||
id: this.props.currentModal ? this.props.currentModal.id : '',
|
||||
});
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
children,
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
function DataPathHoC(WrappedComponent: $TSFixMe, data: $TSFixMe) {
|
||||
return class extends React.Component {
|
||||
return class extends Component<ComponentProps> {
|
||||
static displayName = 'HocCom';
|
||||
render() {
|
||||
override render() {
|
||||
// Wraps the input component in a container, without mutating it. Good!
|
||||
return (
|
||||
<WrappedComponent {...this.props} webhook={data} data={data} />
|
||||
|
||||
@@ -2,7 +2,10 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const composableComponent = (ComposedComponent: $TSFixMe) => {
|
||||
class Modal extends Component {
|
||||
class Modal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -37,7 +40,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
||||
this.props.onClose(this.props.item);
|
||||
}
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { zIndex } = this.props;
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ import { User } from '../config';
|
||||
import { history } from '../store';
|
||||
|
||||
export default function (ComposedComponent: $TSFixMe) {
|
||||
class NotAuthentication extends Component {
|
||||
class NotAuthentication extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
isAuthenticated: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
@@ -14,7 +17,7 @@ export default function (ComposedComponent: $TSFixMe) {
|
||||
this.isAuthenticated = User.isLoggedIn();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
if (this.isAuthenticated) {
|
||||
history.push('/admin/project/project/monitoring');
|
||||
}
|
||||
@@ -26,7 +29,7 @@ export default function (ComposedComponent: $TSFixMe) {
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
return <ComposedComponent {...this.props} />;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import React, { Component } from 'react';
|
||||
*/
|
||||
|
||||
export default (ComposedComponent: $TSFixMe, extras: $TSFixMe) => {
|
||||
class OutsideCkick extends Component {
|
||||
class OutsideCkick extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
wrapperRef: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
@@ -14,11 +17,11 @@ export default (ComposedComponent: $TSFixMe, extras: $TSFixMe) => {
|
||||
this.handleClickOutside = this.handleClickOutside.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.addEventListener('mousedown', this.handleClickOutside);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
document.removeEventListener('mousedown', this.handleClickOutside);
|
||||
}
|
||||
|
||||
@@ -38,12 +41,12 @@ export default (ComposedComponent: $TSFixMe, extras: $TSFixMe) => {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
return (
|
||||
<div ref={this.setWrapperRef}>
|
||||
<div ref={this.setWrapperRef} >
|
||||
{' '}
|
||||
<ComposedComponent {...this.props} />{' '}
|
||||
</div>
|
||||
< ComposedComponent {...this.props} />{' '}
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import { User } from '../config';
|
||||
import { history } from '../store';
|
||||
|
||||
export default function (ComposedComponent: $TSFixMe) {
|
||||
class Authentication extends Component {
|
||||
class Authentication extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
isAuthenticated: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
@@ -15,7 +18,7 @@ export default function (ComposedComponent: $TSFixMe) {
|
||||
this.isAuthenticated = User.isLoggedIn();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
if (!this.isAuthenticated) {
|
||||
history.push('/login', {
|
||||
|
||||
@@ -37,7 +40,7 @@ export default function (ComposedComponent: $TSFixMe) {
|
||||
router: PropTypes.object,
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
return <ComposedComponent {...this.props} />;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,13 +35,16 @@ function validate(values: $TSFixMe) {
|
||||
return errors;
|
||||
}
|
||||
|
||||
export class AdminNotes extends Component {
|
||||
export class AdminNotes extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
submitForm = async (values: $TSFixMe) => {
|
||||
|
||||
await this.props.addNote(this.props.id, values.adminNotes);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { handleSubmit, requesting } = this.props;
|
||||
return (
|
||||
|
||||
@@ -6,12 +6,15 @@ import ReactJson from 'react-json-view';
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
|
||||
class AuditLogsJsonViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class AuditLogsJsonViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -25,7 +28,7 @@ class AuditLogsJsonViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
isRequesting,
|
||||
|
||||
@@ -10,7 +10,10 @@ import AuditLogsJsonViewModal from './AuditLogsJsonViewModal';
|
||||
import DeleteConfirmationModal from './DeleteConfirmationModal';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
export class AuditLogsList extends Component {
|
||||
export class AuditLogsList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = { deleteModalId: uuidv4() };
|
||||
@@ -37,7 +40,7 @@ export class AuditLogsList extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
if (
|
||||
|
||||
this.props.auditLogs &&
|
||||
|
||||
@@ -9,12 +9,15 @@ import { closeModal } from 'common-ui/actions/modal';
|
||||
import { deleteAuditLogs } from '../../actions/auditLogs';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
|
||||
class DeleteConfirmationModal extends Component {
|
||||
componentDidMount() {
|
||||
class DeleteConfirmationModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ class DeleteConfirmationModal extends Component {
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class AlertPanel extends Component {
|
||||
render() {
|
||||
class AlertPanel extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<div className="Box-root Margin-vertical--12">
|
||||
<div className="Box-root Margin-vertical--12" >
|
||||
<div
|
||||
|
||||
className={`db-Trends Card-shadow--small ${this.props.className}`}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { User, getQueryVar } from '../../config';
|
||||
|
||||
class BeforeLoad extends React.Component {
|
||||
class BeforeLoad extends Component<ComponentProps> {
|
||||
isAuthenticated: $TSFixMe;
|
||||
redirect: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
@@ -26,7 +26,7 @@ class BeforeLoad extends React.Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
override render() {
|
||||
if (this.isAuthenticated && this.redirect) {
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class ErrorBoundary extends Component {
|
||||
class ErrorBoundary extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = { error: null, hasError: false };
|
||||
@@ -12,7 +15,7 @@ class ErrorBoundary extends Component {
|
||||
return { hasError: true, error };
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
if (this.state.hasError || this.state.error) {
|
||||
return (
|
||||
|
||||
@@ -4,12 +4,15 @@ import { connect } from 'react-redux';
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class CallLogsContentViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class CallLogsContentViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -23,7 +26,7 @@ class CallLogsContentViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class CallLogsErrorViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class CallLogsErrorViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -21,7 +24,7 @@ class CallLogsErrorViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
return (
|
||||
|
||||
@@ -13,7 +13,10 @@ import CallLogsErrorViewModal from './CallLogsErrorViewModal';
|
||||
import DeleteConfirmationModal from './DeleteConfirmationModal';
|
||||
import { history } from '../../store';
|
||||
|
||||
export class CallLogsList extends Component {
|
||||
export class CallLogsList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = { deleteModalId: uuidv4() };
|
||||
@@ -40,7 +43,7 @@ export class CallLogsList extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
if (
|
||||
|
||||
this.props.callLogs &&
|
||||
|
||||
@@ -9,12 +9,15 @@ import { closeModal } from 'common-ui/actions/modal';
|
||||
import { deleteCallLogs } from '../../actions/callLogs';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
|
||||
class DeleteConfirmationModal extends Component {
|
||||
componentDidMount() {
|
||||
class DeleteConfirmationModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ class DeleteConfirmationModal extends Component {
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
|
||||
@@ -9,12 +9,15 @@ import { closeModal } from 'common-ui/actions/modal';
|
||||
import { deleteEmailLogs } from '../../actions/emailLogs';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
|
||||
class DeleteConfirmationModal extends Component {
|
||||
componentDidMount() {
|
||||
class DeleteConfirmationModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ class DeleteConfirmationModal extends Component {
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
|
||||
@@ -4,12 +4,15 @@ import { connect } from 'react-redux';
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class EmailLogsContentViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class EmailLogsContentViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -23,7 +26,7 @@ class EmailLogsContentViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class EmailLogsErrorViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class EmailLogsErrorViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -21,7 +24,7 @@ class EmailLogsErrorViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
return (
|
||||
|
||||
@@ -12,7 +12,10 @@ import EmailLogsContentViewModal from './EmailLogsContentViewModal';
|
||||
import EmailLogsErrorViewModal from './EmailLogsErrorViewModal';
|
||||
import DeleteConfirmationModal from './DeleteConfirmationModal';
|
||||
|
||||
export class EmailLogsList extends Component {
|
||||
export class EmailLogsList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = { deleteModalId: uuidv4() };
|
||||
@@ -39,7 +42,7 @@ export class EmailLogsList extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
if (
|
||||
|
||||
this.props.emailLogs &&
|
||||
|
||||
@@ -39,7 +39,10 @@ function validate(values: $TSFixMe) {
|
||||
return errors;
|
||||
}
|
||||
|
||||
export class LicenseSetting extends Component {
|
||||
export class LicenseSetting extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
|
||||
const { confirmLicense } = this.props;
|
||||
@@ -47,7 +50,7 @@ export class LicenseSetting extends Component {
|
||||
confirmLicense(values);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
handleSubmit,
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
/* eslint-disable */
|
||||
import React, { Component } from 'react';
|
||||
|
||||
class UnLicensedAlert extends Component {
|
||||
render() {
|
||||
class UnLicensedAlert extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<div className="Box-root Margin-vertical--12">
|
||||
<div className="Box-root Margin-vertical--12" >
|
||||
<div className="db-Trends bs-ContentSection Card-root Card-shadow--small">
|
||||
<div className="Box-root Box-background--red4">
|
||||
<div className="bs-ContentSection-content Box-root Flex-flex Flex-alignItems--center Flex-justifyContent--spaceBetween Padding-horizontal--20 Padding-vertical--12">
|
||||
|
||||
@@ -3,12 +3,15 @@ import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
class About extends Component {
|
||||
componentDidMount() {
|
||||
class About extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -23,7 +26,7 @@ class About extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { versions, closeThisDialog, probes } = this.props;
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
@@ -5,12 +5,15 @@ import { connect } from 'react-redux';
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
|
||||
class ConfirmBalanceTopUp extends Component {
|
||||
componentDidMount() {
|
||||
class ConfirmBalanceTopUp extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -27,7 +30,7 @@ class ConfirmBalanceTopUp extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
let recharging = false;
|
||||
|
||||
if (this.props.isRequesting) {
|
||||
|
||||
@@ -6,12 +6,15 @@ import PropTypes, { string } from 'prop-types';
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { closeModal } from 'common-ui/actions/modal';
|
||||
|
||||
class MessageBox extends Component {
|
||||
componentDidMount() {
|
||||
class MessageBox extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -33,7 +36,7 @@ class MessageBox extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { data } = this.props;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import LoadingIndicator from './LoadingIndicator';
|
||||
|
||||
class Dropdown extends React.Component {
|
||||
class Dropdown extends Component<ComponentProps> {
|
||||
wrapper: $TSFixMe;
|
||||
state = {
|
||||
hasFocus: false,
|
||||
@@ -14,7 +14,7 @@ class Dropdown extends React.Component {
|
||||
document.addEventListener('mousedown', this.handleDocumentClick);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
document.addEventListener('touchstart', this.handleDocumentClick);
|
||||
document.addEventListener('mousedown', this.handleDocumentClick);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ class Dropdown extends React.Component {
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const { expanded, hasFocus } = this.state;
|
||||
|
||||
const { children, isLoading, disabled } = this.props;
|
||||
|
||||
@@ -36,14 +36,14 @@ DefaultRenderer.propTypes = {
|
||||
};
|
||||
//#endregion
|
||||
|
||||
class SelectItem extends React.Component {
|
||||
class SelectItem extends Component<ComponentProps> {
|
||||
handleClick: $TSFixMe;
|
||||
labelRef: $TSFixMe;
|
||||
state = {
|
||||
hovered: false,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
this.updateFocus();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class SelectItem extends React.Component {
|
||||
|
||||
e.preventDefault();
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { option, checked, disabled, ItemRenderer, focused } = this.props;
|
||||
const { hovered } = this.state;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import SelectItem from './SelectItem';
|
||||
|
||||
class SelectList extends React.Component {
|
||||
class SelectList extends Component<ComponentProps> {
|
||||
handleSelectionChanged = (option: $TSFixMe, checked: $TSFixMe) => {
|
||||
|
||||
const { selected, onSelectedChanged, disabled } = this.props;
|
||||
@@ -55,14 +55,14 @@ class SelectList extends React.Component {
|
||||
</li>
|
||||
));
|
||||
}
|
||||
render() {
|
||||
override render() {
|
||||
return (
|
||||
<ul
|
||||
className="db-MultiSelect-select-list"
|
||||
style={{ margin: 0, paddingLeft: 0 }}
|
||||
>
|
||||
{this.renderItems()}
|
||||
</ul>
|
||||
</ul >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { filterOptions as customFilterOptions } from 'fuzzy-match-utils';
|
||||
import SelectItem from './SelectItem';
|
||||
import SelectList from './SelectList';
|
||||
|
||||
class SelectPanel extends React.Component {
|
||||
class SelectPanel extends Component<ComponentProps> {
|
||||
onBlur: $TSFixMe;
|
||||
onFocus: $TSFixMe;
|
||||
state = {
|
||||
@@ -93,7 +93,7 @@ class SelectPanel extends React.Component {
|
||||
this.setState({ focusIndex: tempFocus });
|
||||
}
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
ItemRenderer,
|
||||
|
||||
@@ -3,7 +3,10 @@ import PropTypes from 'prop-types';
|
||||
import Dropdown from './DropDown';
|
||||
import SelectPanel from './SelectPanel';
|
||||
|
||||
class MultiSelect extends Component {
|
||||
class MultiSelect extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
state = {};
|
||||
|
||||
getSelectedText() {
|
||||
@@ -53,7 +56,7 @@ class MultiSelect extends Component {
|
||||
onSelectedChanged(selected);
|
||||
}
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
ItemRenderer,
|
||||
|
||||
@@ -11,7 +11,10 @@ import ClickOutside from 'react-click-outside';
|
||||
|
||||
import { withRouter, Switch, Route } from 'react-router-dom';
|
||||
|
||||
class SideNav extends Component {
|
||||
class SideNav extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
@@ -21,10 +24,10 @@ class SideNav extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
return (
|
||||
|
||||
<ClickOutside onClickOutside={this.props.closeSideNav}>
|
||||
<ClickOutside onClickOutside={this.props.closeSideNav} >
|
||||
<div
|
||||
onKeyDown={this.handleKeyBoard}
|
||||
className={`db-World-sideNavContainer${this.props.sidenavopen ? ' open' : ''
|
||||
|
||||
@@ -8,14 +8,17 @@ import ShouldRender from '../basic/ShouldRender';
|
||||
import { loadPage } from '../../actions/page';
|
||||
import { navKeyBind, cleanBind } from '../../utils/keybinding';
|
||||
|
||||
export class SidebarNavItem extends Component {
|
||||
export class SidebarNavItem extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
this.RenderListItems = this.RenderListItems.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
|
||||
const { route } = this.props;
|
||||
navKeyBind(route);
|
||||
@@ -26,7 +29,7 @@ export class SidebarNavItem extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
|
||||
const { route } = this.props;
|
||||
cleanBind(route);
|
||||
@@ -82,7 +85,7 @@ export class SidebarNavItem extends Component {
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const { RenderListItems } = this;
|
||||
|
||||
const { route, location, match, loadPage } = this.props;
|
||||
|
||||
@@ -9,8 +9,11 @@ import { openSideNav } from '../../actions/page';
|
||||
import { getVersion } from '../../actions/version';
|
||||
import { getProbes } from '../../actions/probe';
|
||||
|
||||
class TopContent extends Component {
|
||||
componentDidMount() {
|
||||
class TopContent extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
|
||||
const { getVersion } = this.props;
|
||||
getVersion();
|
||||
@@ -36,7 +39,7 @@ class TopContent extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const IMG_URL =
|
||||
|
||||
this.props.profilePic && this.props.profilePic !== ''
|
||||
|
||||
@@ -5,8 +5,11 @@ import { connect } from 'react-redux';
|
||||
import { User } from '../../config';
|
||||
import moment from 'moment';
|
||||
|
||||
class NotificationMenu extends Component {
|
||||
render() {
|
||||
class NotificationMenu extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
const userId = User.getUserId();
|
||||
|
||||
return this.props.visible ? (
|
||||
|
||||
@@ -12,12 +12,15 @@ import { RenderField } from '../basic/RenderField';
|
||||
import { ValidateField } from '../../config';
|
||||
import { addProbe, resetAddProbe } from '../../actions/probe';
|
||||
|
||||
class ProbeAddModal extends Component {
|
||||
componentDidMount() {
|
||||
class ProbeAddModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -49,7 +52,7 @@ class ProbeAddModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
handleSubmit,
|
||||
|
||||
@@ -9,12 +9,15 @@ import ShouldRender from '../basic/ShouldRender';
|
||||
import { closeModal } from 'common-ui/actions/modal';
|
||||
import { deleteProbe } from '../../actions/probe';
|
||||
|
||||
class ProbeDeleteModal extends Component {
|
||||
componentDidMount() {
|
||||
class ProbeDeleteModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -40,7 +43,7 @@ class ProbeDeleteModal extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog } = this.props;
|
||||
|
||||
|
||||
@@ -16,7 +16,10 @@ import { reduxForm, Field } from 'redux-form';
|
||||
import { UploadFile } from '../basic/UploadFile';
|
||||
import { API_URL } from '../../config';
|
||||
|
||||
export class ProbeList extends Component {
|
||||
export class ProbeList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -55,7 +58,7 @@ export class ProbeList extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { selectedProbe } = this.state;
|
||||
const {
|
||||
|
||||
@@ -10,7 +10,10 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import About from '../modals/About';
|
||||
import { openModal, closeModal } from 'common-ui/actions/modal';
|
||||
|
||||
export class ProfileMenu extends Component {
|
||||
export class ProfileMenu extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = { aboutId: uuidv4() };
|
||||
@@ -34,11 +37,11 @@ export class ProfileMenu extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleShortcut);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleShortcut);
|
||||
}
|
||||
|
||||
@@ -52,7 +55,7 @@ export class ProfileMenu extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const name = User.getName();
|
||||
const email = User.getEmail();
|
||||
|
||||
|
||||
@@ -13,14 +13,17 @@ import {
|
||||
} from '../../actions/project';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
class DeleteDomain extends Component {
|
||||
componentDidMount() {
|
||||
class DeleteDomain extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
|
||||
this.props.resetDeleteProjectDomain();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -60,7 +63,7 @@ class DeleteDomain extends Component {
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, deleteError } = this.props;
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,10 @@ import { FormLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
import { renewAlertLimit } from '../../actions/project';
|
||||
|
||||
export class ProjectAlertLimitBox extends Component {
|
||||
export class ProjectAlertLimitBox extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -32,7 +35,7 @@ export class ProjectAlertLimitBox extends Component {
|
||||
renewAlertLimit(project._id, alertLimit);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { requesting } = this.props;
|
||||
return (
|
||||
|
||||
@@ -33,7 +33,10 @@ function validate(value: $TSFixMe) {
|
||||
return errors;
|
||||
}
|
||||
|
||||
class ProjectBalance extends Component {
|
||||
class ProjectBalance extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
state = {
|
||||
MessageBoxId: uuidv4(),
|
||||
createTopUpModalId: uuidv4(),
|
||||
@@ -83,7 +86,7 @@ class ProjectBalance extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { balance } = this.props;
|
||||
return (
|
||||
|
||||
@@ -10,7 +10,10 @@ import { blockProject } from '../../actions/project';
|
||||
import ProjectBlockModal from './ProjectBlockModal';
|
||||
import { openModal, closeModal } from 'common-ui/actions/modal';
|
||||
|
||||
export class ProjectBlockBox extends Component {
|
||||
export class ProjectBlockBox extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -44,7 +47,7 @@ export class ProjectBlockBox extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ import ClickOutside from 'react-click-outside';
|
||||
import { Spinner } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
class ProjectBlockModal extends Component {
|
||||
componentDidMount() {
|
||||
class ProjectBlockModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -28,7 +31,7 @@ class ProjectBlockModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
isRequesting,
|
||||
|
||||
@@ -10,7 +10,10 @@ import { deleteProject } from '../../actions/project';
|
||||
import ProjectDeleteModal from './ProjectDeleteModal';
|
||||
import { openModal, closeModal } from 'common-ui/actions/modal';
|
||||
|
||||
export class ProjectDeleteBox extends Component {
|
||||
export class ProjectDeleteBox extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -44,7 +47,7 @@ export class ProjectDeleteBox extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ import ClickOutside from 'react-click-outside';
|
||||
import { Spinner } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
class ProjectDeleteModal extends Component {
|
||||
componentDidMount() {
|
||||
class ProjectDeleteModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -28,7 +31,7 @@ class ProjectDeleteModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
isRequesting,
|
||||
|
||||
@@ -4,10 +4,13 @@ import { bindActionCreators, Dispatch } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import { DASHBOARD_URL } from '../../config';
|
||||
|
||||
export class ProjectDetails extends Component {
|
||||
render() {
|
||||
export class ProjectDetails extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<div className="Box-root Margin-bottom--12">
|
||||
<div className="Box-root Margin-bottom--12" >
|
||||
<div className="bs-ContentSection Card-root Card-shadow--medium">
|
||||
<div className="Box-root">
|
||||
<div className="bs-ContentSection-content Box-root Box-divider--surface-bottom-1 Flex-flex Flex-alignItems--center Flex-justifyContent--spaceBetween Padding-horizontal--20 Padding-vertical--16">
|
||||
|
||||
@@ -14,7 +14,10 @@ import ProjectVerifyDomain from './ProjectVerifyDomain';
|
||||
import ProjectUnverifyDomain from './ProjectUnverifyDomain';
|
||||
import ProjectResetDomain from './ProjectResetDomain';
|
||||
|
||||
class ProjectDomain extends Component {
|
||||
class ProjectDomain extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
limit: $TSFixMe;
|
||||
constructor() {
|
||||
|
||||
@@ -25,7 +28,7 @@ class ProjectDomain extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
|
||||
const projectId = this.props.projectId;
|
||||
if (projectId) {
|
||||
@@ -66,7 +69,7 @@ class ProjectDomain extends Component {
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
projectDomain: { domains },
|
||||
|
||||
@@ -6,8 +6,11 @@ import moment from 'moment';
|
||||
import { ListLoader } from '../basic/Loader';
|
||||
import { history } from '../../store';
|
||||
|
||||
export class ProjectList extends Component {
|
||||
render() {
|
||||
export class ProjectList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
if (
|
||||
|
||||
this.props.projects &&
|
||||
|
||||
@@ -9,12 +9,15 @@ import { resetTeamDelete } from '../../actions/project';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
|
||||
class ProjectRemoveUserModal extends Component {
|
||||
componentDidMount() {
|
||||
class ProjectRemoveUserModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -40,7 +43,7 @@ class ProjectRemoveUserModal extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
teamUserDelete,
|
||||
|
||||
@@ -13,8 +13,11 @@ import {
|
||||
resetProjectDomainOnMount,
|
||||
} from '../../actions/project';
|
||||
|
||||
class ProjectResetDomain extends Component {
|
||||
componentDidMount() {
|
||||
class ProjectResetDomain extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
|
||||
this.props.resetProjectDomainOnMount();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
@@ -59,7 +62,7 @@ class ProjectResetDomain extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { requesting, resetError } = this.props;
|
||||
return (
|
||||
|
||||
@@ -7,7 +7,10 @@ import ShouldRender from '../basic/ShouldRender';
|
||||
import { restoreProject } from '../../actions/project';
|
||||
import { openModal, closeModal } from 'common-ui/actions/modal';
|
||||
|
||||
export class ProjectRestoreBox extends Component {
|
||||
export class ProjectRestoreBox extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -20,7 +23,7 @@ export class ProjectRestoreBox extends Component {
|
||||
return restoreProject(project._id);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ import ShouldRender from '../basic/ShouldRender';
|
||||
import { unblockProject } from '../../actions/project';
|
||||
import { openModal, closeModal } from 'common-ui/actions/modal';
|
||||
|
||||
export class ProjectUnblockBox extends Component {
|
||||
export class ProjectUnblockBox extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
|
||||
@@ -20,7 +23,7 @@ export class ProjectUnblockBox extends Component {
|
||||
return unblockProject(project._id);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
|
||||
@@ -13,8 +13,11 @@ import {
|
||||
resetUnverifyProjectDomain,
|
||||
} from '../../actions/project';
|
||||
|
||||
class ProjectUnverifyDomain extends Component {
|
||||
componentDidMount() {
|
||||
class ProjectUnverifyDomain extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
|
||||
this.props.resetUnverifyProjectDomain();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
@@ -59,7 +62,7 @@ class ProjectUnverifyDomain extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { requesting, unverifyError } = this.props;
|
||||
return (
|
||||
|
||||
@@ -21,7 +21,10 @@ function validate(values: $TSFixMe) {
|
||||
return errors;
|
||||
}
|
||||
|
||||
class ProjectUpgrade extends Component {
|
||||
class ProjectUpgrade extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
enterprisePlan: $TSFixMe;
|
||||
getPlansFromToggle: $TSFixMe;
|
||||
plansArr: $TSFixMe;
|
||||
@@ -116,7 +119,7 @@ class ProjectUpgrade extends Component {
|
||||
changePlan(_id, values.planId, name, oldPlan, newPlan);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { handleSubmit, isRequesting, error, activeForm } = this.props;
|
||||
|
||||
|
||||
@@ -35,18 +35,21 @@ function validate(values: $TSFixMe) {
|
||||
return errors;
|
||||
}
|
||||
|
||||
export class FormModal extends Component {
|
||||
export class FormModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = {
|
||||
messageModalId: uuidv4(),
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -115,7 +118,7 @@ export class FormModal extends Component {
|
||||
}),
|
||||
});
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { handleSubmit, closeThisDialog, data } = this.props;
|
||||
return (
|
||||
|
||||
@@ -23,7 +23,10 @@ import DataPathHoC from '../DataPathHoC';
|
||||
import { TeamListLoader } from '../basic/Loader';
|
||||
import DropDownMenu from '../basic/DropDownMenu';
|
||||
|
||||
class ProjectUser extends Component {
|
||||
class ProjectUser extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -316,7 +319,7 @@ class ProjectUser extends Component {
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
count,
|
||||
|
||||
@@ -13,14 +13,17 @@ import {
|
||||
resetVerifyProjectDomain,
|
||||
} from '../../actions/project';
|
||||
|
||||
class ProjectVerifyDomain extends Component {
|
||||
componentDidMount() {
|
||||
class ProjectVerifyDomain extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
|
||||
this.props.resetVerifyProjectDomain();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -63,7 +66,7 @@ class ProjectVerifyDomain extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { requesting, verificationToken, verifyError } = this.props;
|
||||
return (
|
||||
|
||||
@@ -3,8 +3,11 @@ import { connect } from 'react-redux';
|
||||
|
||||
import { reduxForm, Field } from 'redux-form';
|
||||
|
||||
class Search extends Component {
|
||||
render() {
|
||||
class Search extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
return (
|
||||
<div style={{ width: 300 }}>
|
||||
<div
|
||||
@@ -28,7 +31,7 @@ class Search extends Component {
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,12 @@ import {
|
||||
auditLogStatusChange,
|
||||
} from '../../actions/auditLogs';
|
||||
|
||||
class AuditLog extends Component {
|
||||
class AuditLog extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchAuditLogStatus();
|
||||
}
|
||||
@@ -35,7 +38,7 @@ class AuditLog extends Component {
|
||||
|
||||
this.props.auditLogStatusChange({ status: values.auditStatusToggler });
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { changeAuditLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
|
||||
@@ -10,9 +10,12 @@ import {
|
||||
callLogStatusChange,
|
||||
} from '../../actions/callLogs';
|
||||
|
||||
class CallLog extends Component {
|
||||
class CallLog extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchCallLogStatus();
|
||||
}
|
||||
@@ -35,7 +38,7 @@ class CallLog extends Component {
|
||||
|
||||
this.props.callLogStatusChange({ status: values.callStatusToggler });
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { changeCallLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
|
||||
@@ -10,9 +10,12 @@ import {
|
||||
emailLogStatusChange,
|
||||
} from '../../actions/emailLogs';
|
||||
|
||||
class EmailLog extends Component {
|
||||
class EmailLog extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchEmailLogStatus();
|
||||
}
|
||||
@@ -35,7 +38,7 @@ class EmailLog extends Component {
|
||||
|
||||
this.props.emailLogStatusChange({ status: values.emailStatusToggler });
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { changeEmailLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
|
||||
@@ -7,9 +7,12 @@ import { bindActionCreators, Dispatch } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import { fetchSmsLogStatus, smsLogStatusChange } from '../../actions/smsLogs';
|
||||
|
||||
class SmsLog extends Component {
|
||||
class SmsLog extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchSmsLogStatus();
|
||||
}
|
||||
@@ -32,7 +35,7 @@ class SmsLog extends Component {
|
||||
|
||||
this.props.smsLogStatusChange({ status: values.smsStatusToggler });
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { changeSmsLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
|
||||
@@ -186,7 +186,7 @@ const smtpOptions = [
|
||||
},
|
||||
];
|
||||
|
||||
export class Component extends React.Component {
|
||||
export class Component extends Component<ComponentProps> {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -195,7 +195,7 @@ export class Component extends React.Component {
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchSettings(settingsType);
|
||||
}
|
||||
@@ -284,7 +284,7 @@ export class Component extends React.Component {
|
||||
this.props.saveSettings(settingsType, values);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { settings, handleSubmit, smtpForm } = this.props;
|
||||
return (
|
||||
|
||||
@@ -12,20 +12,20 @@ import SsoDeleteModal from './sso/SsoDeleteModal';
|
||||
import { SsoAddModal, SsoUpdateModal } from './sso/SsoModal';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
export class Component extends React.Component {
|
||||
export class Component extends Component<ComponentProps> {
|
||||
state = {
|
||||
ssoModalId: uuidv4(),
|
||||
page: 1,
|
||||
};
|
||||
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchSsos();
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ export class Component extends React.Component {
|
||||
this.setState({ page: this.state.page + 1 });
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { ssos } = this.props;
|
||||
const { count, skip, limit } = ssos;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class SsoDeleteModal extends Component {
|
||||
componentDidMount() {
|
||||
class SsoDeleteModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -23,7 +26,7 @@ class SsoDeleteModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { confirmThisDialog, closeThisDialog } = this.props;
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ const fields = [
|
||||
},
|
||||
];
|
||||
|
||||
class Component extends React.Component {
|
||||
class Component extends Component<ComponentProps> {
|
||||
state = {
|
||||
copied: false,
|
||||
};
|
||||
@@ -139,11 +139,11 @@ class Component extends React.Component {
|
||||
// reset it after 0.5 secs
|
||||
setTimeout(() => this.setState({ copied: false }), 500);
|
||||
};
|
||||
componentDidMount() {
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ class Component extends React.Component {
|
||||
closeThisDialog();
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
handleSubmit,
|
||||
|
||||
@@ -11,7 +11,7 @@ import Table from './ssoDefaultRoles/Table';
|
||||
import { openModal } from 'common-ui/actions/modal';
|
||||
import { CreateDefaultRoleModal } from './ssoDefaultRoles/DefaultRoleModal';
|
||||
|
||||
class Box extends React.Component {
|
||||
class Box extends Component<ComponentProps> {
|
||||
async previousClicked() {
|
||||
|
||||
const { skip, limit } = this.props.ssoPaginate;
|
||||
@@ -33,13 +33,13 @@ class Box extends React.Component {
|
||||
paginate('next');
|
||||
}
|
||||
}
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
this.props.fetchProjects(0, 0);
|
||||
|
||||
await this.props.fetchSsoDefaultRoles(0, 10);
|
||||
}
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { ssoDefaultRoles, openModal, count } = this.props;
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class RoleDeleteModal extends Component {
|
||||
componentDidMount() {
|
||||
class RoleDeleteModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -23,7 +26,7 @@ class RoleDeleteModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { confirmThisDialog, closeThisDialog } = this.props;
|
||||
|
||||
|
||||
@@ -106,9 +106,9 @@ const fields = [
|
||||
},
|
||||
];
|
||||
|
||||
export class Component extends React.Component {
|
||||
export class Component extends Component<ComponentProps> {
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
async override componentDidMount() {
|
||||
|
||||
await this.props.fetchSettings(settingsType);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ export class Component extends React.Component {
|
||||
this.props.saveSettings(settingsType, values);
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { settings, handleSubmit } = this.props;
|
||||
return (
|
||||
|
||||
@@ -9,12 +9,15 @@ import { closeModal } from 'common-ui/actions/modal';
|
||||
import { deleteSmsLogs } from '../../actions/smsLogs';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
|
||||
class DeleteConfirmationModal extends Component {
|
||||
componentDidMount() {
|
||||
class DeleteConfirmationModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ class DeleteConfirmationModal extends Component {
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
|
||||
@@ -4,12 +4,15 @@ import { connect } from 'react-redux';
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class SmsLogsContentViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class SmsLogsContentViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -23,7 +26,7 @@ class SmsLogsContentViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class SmsLogsErrorViewModal extends Component {
|
||||
componentDidMount() {
|
||||
class SmsLogsErrorViewModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyboard);
|
||||
}
|
||||
|
||||
@@ -21,7 +24,7 @@ class SmsLogsErrorViewModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
return (
|
||||
|
||||
@@ -15,7 +15,10 @@ import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
import { history } from '../../store';
|
||||
|
||||
export class SmsLogsList extends Component {
|
||||
export class SmsLogsList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
this.state = { deleteModalId: uuidv4() };
|
||||
@@ -42,7 +45,7 @@ export class SmsLogsList extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
if (
|
||||
|
||||
this.props.smsLogs &&
|
||||
|
||||
@@ -5,8 +5,11 @@ import { connect } from 'react-redux';
|
||||
import moment from 'moment';
|
||||
import { ListLoader } from '../basic/Loader';
|
||||
|
||||
export class HistoryList extends Component {
|
||||
render() {
|
||||
export class HistoryList extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override render() {
|
||||
if (
|
||||
|
||||
this.props.history &&
|
||||
|
||||
@@ -12,12 +12,15 @@ import { RenderField } from '../basic/RenderField';
|
||||
import { Validate } from '../../config';
|
||||
import { addUser, resetAddUser } from '../../actions/user';
|
||||
|
||||
class UserAddModal extends Component {
|
||||
componentDidMount() {
|
||||
class UserAddModal extends Component<ComponentProps> {
|
||||
|
||||
public static propTypes = {};
|
||||
|
||||
override componentDidMount() {
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
override componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
||||
@@ -50,7 +53,7 @@ class UserAddModal extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
override render() {
|
||||
const {
|
||||
|
||||
handleSubmit,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user