mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-01-11 19:56:44 +00:00
remove ts-expect
This commit is contained in:
parent
93c0fcd010
commit
ab480a35bd
736 changed files with 20889 additions and 21263 deletions
|
|
@ -45,6 +45,7 @@
|
|||
"dev": "PORT=3003 react-scripts --openssl-legacy-provider start",
|
||||
"build": "react-scripts --openssl-legacy-provider build && npm run build-sw",
|
||||
"build-sw": "node ./src/sw-build.js",
|
||||
"compile": "tsc",
|
||||
"test": "jest --forceExit --runInBand ./src/test/*.test.js",
|
||||
"enterprise-test": "jest --forceExit --runInBand ./src/test/*.test.enterprise.js",
|
||||
"start": "node index.ts",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Suspense, useEffect } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Router, Route, Redirect, Switch } from 'react-router-dom';
|
||||
import { history, isServer } from './store';
|
||||
import { connect } from 'react-redux';
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
User,
|
||||
} from './config';
|
||||
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import queryString from 'query-string';
|
||||
import ReactGA from 'react-ga';
|
||||
import Cookies from 'universal-cookie';
|
||||
|
|
@ -45,10 +45,10 @@ if (userIsLoggedIn) {
|
|||
window.location = cookies.get('admin-data')
|
||||
? ADMIN_DASHBOARD_URL
|
||||
: isStatusPageLogin
|
||||
? `${statusPageURL}?userId=${userId}&accessToken=${jwtAccessToken}`
|
||||
: redirectTo
|
||||
? redirectTo
|
||||
: DASHBOARD_URL;
|
||||
? `${statusPageURL}?userId=${userId}&accessToken=${jwtAccessToken}`
|
||||
: redirectTo
|
||||
? redirectTo
|
||||
: DASHBOARD_URL;
|
||||
}
|
||||
|
||||
const App = ({
|
||||
|
|
@ -86,7 +86,7 @@ const App = ({
|
|||
.map((route, index) => {
|
||||
return (
|
||||
<Route
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'exact' does not exist on type '{ title: ... Remove this comment to see the full error message
|
||||
|
||||
exact={route.exact}
|
||||
path={route.path}
|
||||
key={index}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class NotFound extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
NotFound.displayName = 'NotFound';
|
||||
|
||||
export default NotFound;
|
||||
|
|
|
|||
|
|
@ -5,42 +5,42 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
class Modal extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
this.onClose = this.onClose.bind(this);
|
||||
this.onConfirm = this.onConfirm.bind(this);
|
||||
}
|
||||
onClose = (value: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.item.onClose) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
this.props.item.onClose(value);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.onClose(this.props.item);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.onClose(this.props.item);
|
||||
}
|
||||
};
|
||||
onConfirm = (value: $TSFixMe) => {
|
||||
const _this = this;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.item.onConfirm) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
this.props.item.onConfirm(value).then(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
() => _this.props.onClose(_this.props.item),
|
||||
() => {}
|
||||
() => { }
|
||||
);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.onClose(this.props.item);
|
||||
}
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'zIndex' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
const { zIndex } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
const { extraClasses } = this.props.item;
|
||||
|
||||
const mainClass = `${extraClasses || ''} modal-dialog-view`;
|
||||
|
|
@ -69,7 +69,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
>
|
||||
<div
|
||||
className="modal_container"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ overflowX: string; overflowY: string; disp... Remove this comment to see the full error message
|
||||
|
||||
style={modalContainerStyle}
|
||||
>
|
||||
<ComposedComponent
|
||||
|
|
@ -82,7 +82,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
);
|
||||
}
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
Modal.propTypes = {
|
||||
onConfirm: PropTypes.func,
|
||||
item: PropTypes.object.isRequired,
|
||||
|
|
@ -91,7 +91,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
zIndex: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
Modal.displayName = 'Modal';
|
||||
|
||||
return Modal;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import RenderCountrySelector from '../basic/CountrySelector';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import Fade from 'react-awesome-reveal/Fade';
|
||||
import { RenderField } from '../basic/RenderField';
|
||||
import { PricingPlan, Validate, env } from '../../config';
|
||||
|
|
@ -13,7 +13,7 @@ import { ButtonSpinner } from '../basic/Loader.js';
|
|||
import { openModal, closeModal } from '../../actions/modal';
|
||||
import ExtraCharge from '../modals/ExtraCharge';
|
||||
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import {
|
||||
CardNumberElement,
|
||||
|
|
@ -22,7 +22,7 @@ import {
|
|||
injectStripe,
|
||||
StripeProvider,
|
||||
Elements,
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
} from '@stripe/react-stripe-js';
|
||||
import {
|
||||
addCard,
|
||||
|
|
@ -91,7 +91,7 @@ class CardForm extends Component {
|
|||
|
||||
handleClick = () => {
|
||||
const { registerModal } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
id: registerModal,
|
||||
onClose: () => '',
|
||||
|
|
@ -101,20 +101,20 @@ class CardForm extends Component {
|
|||
|
||||
handleSubmit = (values: $TSFixMe) => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'stripe' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
stripe,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'addCard' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
addCard,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signUpRequest' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
signUpRequest,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signupUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
signupUser,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signupSuccess' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
signupSuccess,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signupError' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
signupError,
|
||||
} = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { user, planId } = this.props.register;
|
||||
const { email, companyName } = user;
|
||||
if (stripe) {
|
||||
|
|
@ -165,11 +165,11 @@ class CardForm extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'planId' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
this.plan = PricingPlan.getPlanById(this.props.planId);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { handleSubmit } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const registerError = this.props.register.error;
|
||||
let header;
|
||||
if (registerError) {
|
||||
|
|
@ -191,7 +191,7 @@ class CardForm extends Component {
|
|||
<p>
|
||||
Your card will be charged $1.00 to check its
|
||||
billability.{' '}
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '() => any' is not assignable to type 'Key | ... Remove this comment to see the full error message
|
||||
|
||||
<span key={() => uuidv4()}></span>
|
||||
<span
|
||||
style={{
|
||||
|
|
@ -520,17 +520,17 @@ class CardForm extends Component {
|
|||
className="button blue medium"
|
||||
id="create-account-button"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.requesting
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.register.requesting && (
|
||||
<span>
|
||||
Create OneUptime Account
|
||||
</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.requesting && (
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
|
|
@ -545,34 +545,34 @@ class CardForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CardForm.displayName = 'CardForm';
|
||||
|
||||
const validate = function (values: $TSFixMe) {
|
||||
const errors = {};
|
||||
|
||||
if (!Validate.text(values.cardName)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'cardName' does not exist on type '{}'.
|
||||
|
||||
errors.cardName = 'Name is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.city)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'city' does not exist on type '{}'.
|
||||
|
||||
errors.city = 'City is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.zipCode)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'zipCode' does not exist on type '{}'.
|
||||
|
||||
errors.zipCode = 'Zip Code or Postal Code is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.country)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'country' does not exist on type '{}'.
|
||||
|
||||
errors.country = 'Country is required.';
|
||||
}
|
||||
|
||||
if (!Validate.postalCode(values.zipCode)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'zipCode' does not exist on type '{}'.
|
||||
|
||||
errors.zipCode = 'Postal Code or Zip Code is invalid.';
|
||||
}
|
||||
|
||||
|
|
@ -613,7 +613,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
CardForm.propTypes = {
|
||||
openModal: PropTypes.func,
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
|
|
@ -646,5 +646,5 @@ export default class CardFormHOC extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CardFormHOC.displayName = 'CardFormHOC';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { Validate } from '../../config';
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
} from '../../actions/changePassword';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { RenderField } from '../basic/RenderField';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const errorStyle = {
|
||||
|
|
@ -21,14 +21,14 @@ const errorStyle = {
|
|||
};
|
||||
export class ChangePasswordForm extends Component {
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'token' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
values.token = this.props.token || '';
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePassword' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
this.props.changePassword(values);
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
const changePasswordStateError = this.props.changePasswordState.error;
|
||||
let header;
|
||||
if (changePasswordStateError) {
|
||||
|
|
@ -40,7 +40,7 @@ export class ChangePasswordForm extends Component {
|
|||
<div id="main-body" className="box css">
|
||||
<div className="inner">
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(this.submitForm)}
|
||||
className="request-reset"
|
||||
>
|
||||
|
|
@ -51,7 +51,7 @@ export class ChangePasswordForm extends Component {
|
|||
|
||||
<p className="error-message hidden" />
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
{this.props.changePasswordState.success && (
|
||||
<p className="message">
|
||||
{' '}
|
||||
|
|
@ -62,7 +62,7 @@ export class ChangePasswordForm extends Component {
|
|||
</Link>{' '}
|
||||
</p>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.changePasswordState.success && (
|
||||
<p className="message">
|
||||
{' '}
|
||||
|
|
@ -70,7 +70,7 @@ export class ChangePasswordForm extends Component {
|
|||
</p>
|
||||
)}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.changePasswordState.success && (
|
||||
<div>
|
||||
{' '}
|
||||
|
|
@ -109,21 +109,21 @@ export class ChangePasswordForm extends Component {
|
|||
type="submit"
|
||||
className="button blue medium"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
this.props.changePasswordState
|
||||
.requesting
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.changePasswordState
|
||||
.requesting && (
|
||||
<span>Change Password</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changePasswordState' does not exist on t... Remove this comment to see the full error message
|
||||
<span>Change Password</span>
|
||||
)}
|
||||
|
||||
{this.props.changePasswordState
|
||||
.requesting && (
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
</button>
|
||||
</p>{' '}
|
||||
</div>
|
||||
|
|
@ -136,28 +136,28 @@ export class ChangePasswordForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ChangePasswordForm.displayName = 'ChangePasswordForm';
|
||||
|
||||
function validate(values: $TSFixMe) {
|
||||
const errors = {};
|
||||
if (!Validate.text(values.password)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'.
|
||||
|
||||
errors.password = 'Password is required.';
|
||||
}
|
||||
if (
|
||||
Validate.text(values.password) &&
|
||||
!Validate.isStrongPassword(values.password)
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'.
|
||||
|
||||
errors.password = 'Password should be atleast 8 characters long';
|
||||
}
|
||||
if (!Validate.text(values.confirmPassword)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
errors.confirmPassword = 'Confirm Password is required.';
|
||||
}
|
||||
if (!Validate.compare(values.password, values.confirmPassword)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
errors.confirmPassword = 'Password and confirm password should match.';
|
||||
}
|
||||
return errors;
|
||||
|
|
@ -186,7 +186,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ChangePasswordForm.propTypes = {
|
||||
changePassword: PropTypes.func.isRequired,
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import CountrySelector from '../basic/CountrySelector';
|
||||
import CompanySizeSelector from '../basic/CompanySizeSelector';
|
||||
|
|
@ -22,11 +22,11 @@ class CompanyForm extends Component {
|
|||
<h2>
|
||||
<span>
|
||||
{' '}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.error ? (
|
||||
<span style={errorStyle}>
|
||||
{' '}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.error}
|
||||
</span>
|
||||
) : (
|
||||
|
|
@ -36,9 +36,9 @@ class CompanyForm extends Component {
|
|||
</h2>
|
||||
</div>
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'submitForm' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.submitForm
|
||||
)}
|
||||
>
|
||||
|
|
@ -142,14 +142,14 @@ class CompanyForm extends Component {
|
|||
type="submit"
|
||||
className="button blue medium"
|
||||
id="create-account-button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
disabled={this.props.register.requesting}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.register.requesting && (
|
||||
<span>Create OneUptime Account</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.requesting && (
|
||||
<FlatLoader />
|
||||
)}
|
||||
|
|
@ -163,34 +163,34 @@ class CompanyForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CompanyForm.displayName = 'CompanyForm';
|
||||
|
||||
const validate = function(values: $TSFixMe) {
|
||||
const validate = function (values: $TSFixMe) {
|
||||
const error = {};
|
||||
|
||||
if (!Validate.text(values.companyName)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'companyName' does not exist on type '{}'... Remove this comment to see the full error message
|
||||
|
||||
error.companyName = 'Company name is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.companyRole)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'companyRole' does not exist on type '{}'... Remove this comment to see the full error message
|
||||
|
||||
error.companyRole = 'Job Title is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.companyPhoneNumber)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'companyPhoneNumber' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
error.companyPhoneNumber = 'Phone Number is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.comapnySize)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'comapnySize' does not exist on type '{}'... Remove this comment to see the full error message
|
||||
|
||||
error.comapnySize = 'Phone Number is required.';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.reference)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'reference' does not exist on type '{}'.
|
||||
|
||||
error.reference = 'This is required.';
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
CompanyForm.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
register: PropTypes.object.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { RenderField } from '../basic/RenderField';
|
||||
import { connect } from 'react-redux';
|
||||
|
|
@ -14,7 +14,7 @@ import {
|
|||
} from '../../actions/login';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import queryString from 'query-string';
|
||||
import { removeQuery } from '../../store';
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ export class LoginForm extends Component {
|
|||
};
|
||||
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const query = queryString.parse(this.props.location.search).status;
|
||||
let serverResponse = '';
|
||||
if (query === 'already-verified') {
|
||||
|
|
@ -42,14 +42,14 @@ export class LoginForm extends Component {
|
|||
removeQuery('status');
|
||||
}
|
||||
handleClick(data: $TSFixMe) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changeLogin' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.changeLogin(data);
|
||||
}
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { handleSubmit } = this.props;
|
||||
const { serverResponse } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const loginError = this.props.login.error;
|
||||
let header;
|
||||
if (loginError) {
|
||||
|
|
@ -69,7 +69,7 @@ export class LoginForm extends Component {
|
|||
<div className="inner login">
|
||||
<div>
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onSubmit' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={handleSubmit(this.props.onSubmit)}
|
||||
id="login-form"
|
||||
>
|
||||
|
|
@ -91,7 +91,7 @@ export class LoginForm extends Component {
|
|||
/>
|
||||
</span>
|
||||
</p>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'loginMethod' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
{this.props.loginMethod === 'standard' ? (
|
||||
<p className="text">
|
||||
<span>
|
||||
|
|
@ -116,14 +116,14 @@ export class LoginForm extends Component {
|
|||
type="submit"
|
||||
className="button blue medium"
|
||||
id="login-button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
disabled={this.props.login.requesting}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.login.requesting && (
|
||||
<span>Sign in</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
{this.props.login.requesting && (
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
|
|
@ -131,7 +131,7 @@ export class LoginForm extends Component {
|
|||
</p>
|
||||
|
||||
<p className="text">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'loginMethod' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
{this.props.loginMethod === 'standard' ? (
|
||||
<span
|
||||
id="sso-login"
|
||||
|
|
@ -163,23 +163,23 @@ export class LoginForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
LoginForm.displayName = 'LoginForm';
|
||||
|
||||
const validate = function(values: $TSFixMe, props: $TSFixMe) {
|
||||
const validate = function (values: $TSFixMe, props: $TSFixMe) {
|
||||
const errors = {};
|
||||
if (!Validate.text(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is required.';
|
||||
} else {
|
||||
if (!Validate.email(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is invalid.';
|
||||
}
|
||||
}
|
||||
|
||||
if (!Validate.text(values.password) && props.loginMethod === 'standard') {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'.
|
||||
|
||||
errors.password = 'Password is required.';
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
LoginForm.propTypes = {
|
||||
onSubmit: PropTypes.func.isRequired,
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm } from 'redux-form';
|
||||
import UserForm from './UserForm';
|
||||
import CardForm from './CardForm';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import Fade from 'react-awesome-reveal/Fade';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import queryString from 'query-string';
|
||||
import {
|
||||
signupUser,
|
||||
|
|
@ -23,34 +23,34 @@ import { IS_SAAS_SERVICE } from '../../config';
|
|||
export class RegisterForm extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
userFormSubmitted = (values: $TSFixMe) => {
|
||||
const thisObj = this;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const token = queryString.parse(thisObj.props.location.search).token;
|
||||
values.token = token;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'saveUserState' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.saveUserState(values);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isUserInvited' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.isUserInvited(values).then(
|
||||
function (value: $TSFixMe) {
|
||||
if (value.data) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signupUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
thisObj.props.signupUser({
|
||||
...values,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'planId' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
planId: thisObj.props.planId,
|
||||
token,
|
||||
});
|
||||
} else {
|
||||
if (!IS_SAAS_SERVICE) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signupUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
thisObj.props.signupUser(values);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'incrementStep' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
thisObj.props.incrementStep();
|
||||
}
|
||||
}
|
||||
|
|
@ -62,26 +62,26 @@ export class RegisterForm extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { step } = this.props.register;
|
||||
return (
|
||||
<Fade>
|
||||
<div>
|
||||
{step === 1 && (
|
||||
<UserForm
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ submitForm: (values: any) => void; error: ... Remove this comment to see the full error message
|
||||
|
||||
submitForm={this.userFormSubmitted}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
error={this.props.register.error}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
location={this.props.location}
|
||||
/>
|
||||
)}
|
||||
{step === 2 && (
|
||||
<CardForm
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
planId={this.props.planId}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
error={this.props.register.error}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -91,7 +91,7 @@ export class RegisterForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
RegisterForm.displayName = 'RegisterForm';
|
||||
|
||||
const registerForm = reduxForm({
|
||||
|
|
@ -116,7 +116,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
register: state.register,
|
||||
};
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
RegisterForm.propTypes = {
|
||||
saveUserState: PropTypes.func.isRequired,
|
||||
isUserInvited: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import Fade from 'react-awesome-reveal/Fade';
|
||||
import { Validate } from '../../config';
|
||||
import { ButtonSpinner } from '../basic/Loader.js';
|
||||
|
|
@ -22,12 +22,12 @@ const errorStyle = {
|
|||
|
||||
export class ResetPasswordForm extends Component {
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPassword' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.resetPassword(values);
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
const resetPasswordError = this.props.resetPasswordState.error;
|
||||
let header;
|
||||
if (resetPasswordError) {
|
||||
|
|
@ -45,7 +45,7 @@ export class ResetPasswordForm extends Component {
|
|||
<div id="main-body" className="box css">
|
||||
<div className="inner">
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(this.submitForm)}
|
||||
className="request-reset"
|
||||
>
|
||||
|
|
@ -53,7 +53,7 @@ export class ResetPasswordForm extends Component {
|
|||
<div className="title">
|
||||
<h2>{header}</h2>
|
||||
</div>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
{this.props.resetPasswordState.success && (
|
||||
<p
|
||||
id="reset-password-success"
|
||||
|
|
@ -65,7 +65,7 @@ export class ResetPasswordForm extends Component {
|
|||
Please don't forget to check spam.{' '}
|
||||
</p>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.resetPasswordState.success && (
|
||||
<p className="message">
|
||||
{' '}
|
||||
|
|
@ -75,7 +75,7 @@ export class ResetPasswordForm extends Component {
|
|||
</p>
|
||||
)}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.resetPasswordState.success && (
|
||||
<div>
|
||||
{' '}
|
||||
|
|
@ -100,17 +100,17 @@ export class ResetPasswordForm extends Component {
|
|||
className="button blue medium"
|
||||
disabled={
|
||||
this.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
.resetPasswordState
|
||||
.requesting
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.resetPasswordState
|
||||
.requesting && (
|
||||
<span>Reset Password</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetPasswordState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
{this.props.resetPasswordState
|
||||
.requesting && (
|
||||
<ButtonSpinner />
|
||||
|
|
@ -128,16 +128,16 @@ export class ResetPasswordForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ResetPasswordForm.displayName = 'ResetPasswordForm';
|
||||
|
||||
function validate(values: $TSFixMe) {
|
||||
const errors = {};
|
||||
if (!Validate.text(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is required.';
|
||||
} else if (!Validate.email(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is invalid.';
|
||||
}
|
||||
return errors;
|
||||
|
|
@ -166,7 +166,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ResetPasswordForm.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
resetPasswordState: PropTypes.object.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
|
@ -8,7 +8,7 @@ import { Validate } from '../../config';
|
|||
import { RenderField } from '../basic/RenderField';
|
||||
import { ButtonSpinner } from '../basic/Loader.js';
|
||||
import { removeQuery } from '../../store';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import queryString from 'query-string';
|
||||
|
||||
import { getEmailFromToken } from '../../actions/register';
|
||||
|
|
@ -19,7 +19,7 @@ class UserForm extends Component {
|
|||
};
|
||||
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const query = queryString.parse(this.props.location.search);
|
||||
|
||||
if (query && query.status === 'user-not-found') {
|
||||
|
|
@ -28,9 +28,9 @@ class UserForm extends Component {
|
|||
});
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
|
||||
|
||||
removeQuery();
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'getEmailFromToken' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
this.props.getEmailFromToken(query.token);
|
||||
}
|
||||
|
||||
|
|
@ -46,10 +46,10 @@ class UserForm extends Component {
|
|||
) : (
|
||||
<span>
|
||||
{' '}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.error ? (
|
||||
<span id="error-msg" className="error">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.error}
|
||||
</span>
|
||||
) : (
|
||||
|
|
@ -60,9 +60,9 @@ class UserForm extends Component {
|
|||
</h2>
|
||||
</div>
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'submitForm' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.submitForm
|
||||
)}
|
||||
>
|
||||
|
|
@ -90,13 +90,13 @@ class UserForm extends Component {
|
|||
placeholder="jeff@example.com"
|
||||
required="required"
|
||||
value={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.user.email || ''
|
||||
}
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.initialValues &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'initialValues' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.initialValues.email
|
||||
}
|
||||
/>
|
||||
|
|
@ -120,7 +120,7 @@ class UserForm extends Component {
|
|||
placeholder="Jeff Smith"
|
||||
required="required"
|
||||
value={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.user.name || ''
|
||||
}
|
||||
/>
|
||||
|
|
@ -201,7 +201,7 @@ class UserForm extends Component {
|
|||
className="password-strength-input"
|
||||
required="required"
|
||||
value={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.user.password ||
|
||||
''
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ class UserForm extends Component {
|
|||
placeholder="Confirm Password"
|
||||
required="required"
|
||||
value={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.user
|
||||
.confirmPassword || ''
|
||||
}
|
||||
|
|
@ -247,26 +247,26 @@ class UserForm extends Component {
|
|||
className="button blue medium"
|
||||
id="create-account-button"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
((this.props.register.isUserInvited &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.isUserInvited
|
||||
.requesting) ||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.register.requesting)
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
((this.props.register.isUserInvited &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.register.isUserInvited
|
||||
.requesting) ||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.register.requesting) ? (
|
||||
|
||||
((this.props.register.isUserInvited &&
|
||||
|
||||
this.props.register.isUserInvited
|
||||
.requesting) ||
|
||||
|
||||
this.props.register.requesting) ? (
|
||||
<ButtonSpinner />
|
||||
) : (
|
||||
<span>Sign Up</span>
|
||||
|
|
@ -280,65 +280,65 @@ class UserForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
UserForm.displayName = 'UserForm';
|
||||
|
||||
const validate = function(values: $TSFixMe) {
|
||||
const validate = function (values: $TSFixMe) {
|
||||
const error = {};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'.
|
||||
|
||||
if (!Validate.text(values.name)) error.name = 'Name is required.';
|
||||
|
||||
if (Validate.text(values.name) && !Validate.isValidName(values.name))
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'.
|
||||
|
||||
error.name = 'Name is not valid.';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
if (!Validate.text(values.email)) error.email = 'Email is required.';
|
||||
|
||||
if (Validate.text(values.email) && !Validate.email(values.email))
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
error.email = 'Email is not valid.';
|
||||
|
||||
if (
|
||||
!Validate.isValidBusinessEmail(values.email) &&
|
||||
Validate.email(values.email)
|
||||
)
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
error.email = 'Please enter a business email address.';
|
||||
|
||||
if (!Validate.text(values.companyName))
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'companyName' does not exist on type '{}'... Remove this comment to see the full error message
|
||||
|
||||
error.companyName = 'Company name is required.';
|
||||
|
||||
if (!Validate.text(values.companyPhoneNumber))
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'companyPhoneNumber' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
error.companyPhoneNumber = 'Phone number is required.';
|
||||
|
||||
if (
|
||||
Validate.text(values.companyPhoneNumber) &&
|
||||
!Validate.isValidNumber(values.companyPhoneNumber)
|
||||
)
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'companyPhoneNumber' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
error.companyPhoneNumber = 'Phone number is invalid.';
|
||||
|
||||
if (!Validate.text(values.password))
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'.
|
||||
|
||||
error.password = 'Password is required.';
|
||||
if (
|
||||
Validate.text(values.password) &&
|
||||
!Validate.isStrongPassword(values.password)
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'password' does not exist on type '{}'.
|
||||
|
||||
error.password = 'Password should be atleast 8 characters long';
|
||||
}
|
||||
|
||||
if (!Validate.text(values.confirmPassword))
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
error.confirmPassword = 'Confirm Password is required.';
|
||||
|
||||
if (!Validate.compare(values.password, values.confirmPassword)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmPassword' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
error.confirmPassword = 'Password and confirm password should match.';
|
||||
}
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
UserForm.propTypes = {
|
||||
submitForm: PropTypes.func.isRequired,
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class ErrorBoundary extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hasError' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (this.state.hasError || this.state.error) {
|
||||
return (
|
||||
<div
|
||||
|
|
@ -43,10 +43,10 @@ class ErrorBoundary extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ErrorBoundary.displayName = 'ErrorBoundary';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ErrorBoundary.propTypes = {
|
||||
children: PropTypes.any,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message
|
||||
|
||||
import { PropTypes } from 'prop-types';
|
||||
|
||||
const loaderStyle = {
|
||||
|
|
@ -82,9 +82,8 @@ export const Spinner = () => (
|
|||
Spinner.displayName = 'Spinner';
|
||||
|
||||
export const ButtonSpinner = (props: $TSFixMe) => <div
|
||||
className={`Spinner bs-SpinnerLegacy Spinner--color--${
|
||||
props && props.color ? props.color : 'white'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Flex-justifyContent--center`}
|
||||
className={`Spinner bs-SpinnerLegacy Spinner--color--${props && props.color ? props.color : 'white'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Flex-justifyContent--center`}
|
||||
style={{ marginTop: 4 }}
|
||||
>
|
||||
<svg
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ class ExtraCharge extends React.Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.modalId,
|
||||
});
|
||||
default:
|
||||
|
|
@ -73,9 +73,9 @@ class ExtraCharge extends React.Component {
|
|||
className="bs-Button bs-DeprecatedButton bs-Button--grey"
|
||||
type="button"
|
||||
onClick={() =>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'modalId' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.modalId,
|
||||
})
|
||||
}
|
||||
|
|
@ -94,13 +94,13 @@ class ExtraCharge extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ExtraCharge.propTypes = {
|
||||
closeModal: PropTypes.func,
|
||||
modalId: PropTypes.string,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ExtraCharge.displayName = 'ExtraCharge';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import React from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'sane... Remove this comment to see the full error message
|
||||
|
||||
import isEmail from 'sane-email-validation';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'vali... Remove this comment to see the full error message
|
||||
|
||||
import validUrl from 'valid-url';
|
||||
import valid from 'card-validator';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'file... Remove this comment to see the full error message
|
||||
|
||||
import FileSaver from 'file-saver';
|
||||
// import { emaildomains } from './constants/emaildomains';
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ if (
|
|||
}
|
||||
|
||||
export const env = (value: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property '_env' does not exist on type 'Window & t... Remove this comment to see the full error message
|
||||
|
||||
const { _env } = window;
|
||||
return (
|
||||
(_env && _env[`REACT_APP_${value}`]) ||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { closeModal } from '../actions/modal';
|
|||
|
||||
export class Modals extends Component {
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'modals' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
const modals = this.props.modals.map((item: $TSFixMe, i: $TSFixMe) => {
|
||||
const ModalComponent = Modal(item.content);
|
||||
return (
|
||||
|
|
@ -18,11 +18,11 @@ export class Modals extends Component {
|
|||
// onClose: item => this.props.closeModal(item)
|
||||
// })
|
||||
<ModalComponent
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ item: any; key: any; zIndex: any; onClose:... Remove this comment to see the full error message
|
||||
|
||||
item={item}
|
||||
key={i}
|
||||
zIndex={i}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
onClose={(item: $TSFixMe) => this.props.closeModal(item)}
|
||||
/>
|
||||
);
|
||||
|
|
@ -31,18 +31,18 @@ export class Modals extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
Modals.propTypes = {
|
||||
modals: PropTypes.array.isRequired,
|
||||
closeModal: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
Modals.displayName = 'BlackBoneModals';
|
||||
|
||||
export default connect(
|
||||
(state) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'modal' does not exist on type 'DefaultRo... Remove this comment to see the full error message
|
||||
|
||||
return state.modal;
|
||||
},
|
||||
(dispatch) => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Frontload } from 'react-frontload';
|
||||
import ReactGA from 'react-ga';
|
||||
import ErrorBoundary from './components/basic/ErrorBoundary';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { render } from 'react-dom';
|
||||
import store, { history, isServer } from './store';
|
||||
import App from './App';
|
||||
|
|
@ -17,11 +17,11 @@ if (!isServer) {
|
|||
const target = document.getElementById('root');
|
||||
|
||||
render(
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
<Provider store={store} history={history}>
|
||||
<Frontload noServerRender={true}>
|
||||
<ErrorBoundary>
|
||||
// @ts-expect-error ts-migrate(2739) FIXME: Type '{}' is missing the following properties from... Remove this comment to see the full error message
|
||||
|
||||
<App />
|
||||
</ErrorBoundary>
|
||||
</Frontload>
|
||||
|
|
@ -30,5 +30,5 @@ render(
|
|||
);
|
||||
|
||||
// this will enable the app to work offline and load faster
|
||||
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
|
||||
|
||||
serviceWorker.register();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import ChangePasswordForm from '../components/auth/ChangePasswordForm';
|
||||
|
|
@ -10,9 +10,9 @@ class ChangePasswordPage extends React.Component {
|
|||
token: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
this.token = this.props.match.params.token;
|
||||
|
||||
//if token is not present. Redirect to login page.
|
||||
|
|
@ -27,7 +27,7 @@ class ChangePasswordPage extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
const { masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -39,7 +39,7 @@ class ChangePasswordPage extends React.Component {
|
|||
</h1>
|
||||
</div>
|
||||
{/* RESET PASSWORD BOX */}
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ token: any; }' is not assignable to type '... Remove this comment to see the full error message
|
||||
|
||||
<ChangePasswordForm token={this.token} />
|
||||
<div className="below-box">
|
||||
<p>
|
||||
|
|
@ -86,14 +86,14 @@ const mapDispatchToProps = () => {
|
|||
return null;
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ChangePasswordPage.propTypes = {
|
||||
match: PropTypes.object.isRequired,
|
||||
masterAdminExists: PropTypes.bool,
|
||||
requestingMasterAdmin: PropTypes.bool,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ChangePasswordPage.displayName = 'ChangePasswordPage';
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ChangePasswordPage);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import Fade from 'react-awesome-reveal/Fade';
|
||||
import LoginForm from '../components/auth/LoginForm';
|
||||
import { loginUser, loginUserSso, loginError } from '../actions/login';
|
||||
|
|
@ -19,7 +19,7 @@ import { changeLogin } from '../actions/login';
|
|||
class LoginPage extends React.Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
|
|
@ -27,26 +27,26 @@ class LoginPage extends React.Component {
|
|||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.location?.pathname?.includes('/sso/')) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changeLogin' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.changeLogin('sso');
|
||||
}
|
||||
}
|
||||
|
||||
submitHandler = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'loginMethod' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.loginMethod === 'sso') {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'loginUserSso' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
this.props.loginUserSso(values);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'loginUser' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.loginUser(values);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { login, masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
|
||||
if (login.success && !login.user.tokens) {
|
||||
|
|
@ -65,24 +65,22 @@ class LoginPage extends React.Component {
|
|||
</div>
|
||||
|
||||
{/* LOGIN BOX */}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.login.success &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
this.props.login.error &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
this.props.login.error === 'Verify your email first.' ? (
|
||||
<div>
|
||||
<MessageBox
|
||||
title="Your email is not verified."
|
||||
message={`${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenRequest' does not exist on ty... Remove this comment to see the full error message
|
||||
this.props.resendTokenRequest.requesting
|
||||
message={`${this.props.resendTokenRequest.requesting
|
||||
? 'Resending verification link...'
|
||||
: "An email is on its way to you with new verification link. Please don't forget to check spam."
|
||||
}`}
|
||||
>
|
||||
<div className="below-box">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenRequest' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
{this.props.resendTokenRequest
|
||||
.requesting ? (
|
||||
<ButtonSpinner color="black" />
|
||||
|
|
@ -100,12 +98,12 @@ class LoginPage extends React.Component {
|
|||
login.user &&
|
||||
login.user.email
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendToken' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.resendToken(
|
||||
login.user
|
||||
);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenReset' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
this.props.resendTokenReset();
|
||||
history.push(
|
||||
'/accounts/user-verify/resend'
|
||||
|
|
@ -124,7 +122,7 @@ class LoginPage extends React.Component {
|
|||
</div>
|
||||
) : (
|
||||
<LoginForm
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ children?: ReactNode; onSubmit: (values: a... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.submitHandler}
|
||||
{...this.props}
|
||||
/>
|
||||
|
|
@ -197,7 +195,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators(
|
|||
dispatch
|
||||
);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
LoginPage.propTypes = {
|
||||
loginUser: PropTypes.func.isRequired,
|
||||
loginUserSso: PropTypes.func.isRequired,
|
||||
|
|
@ -214,7 +212,7 @@ LoginPage.propTypes = {
|
|||
changeLogin: PropTypes.func,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
LoginPage.displayName = 'LoginPage';
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(LoginPage);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import RegisterForm from '../components/auth/RegisterForm';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import queryString from 'query-string';
|
||||
import { PricingPlan, IS_SAAS_SERVICE } from '../config';
|
||||
import MessageBox from '../components/MessageBox';
|
||||
|
|
@ -16,7 +16,7 @@ class RegisterPage extends React.Component {
|
|||
componentWillUnmount() {
|
||||
document.body.id = '';
|
||||
document.body.className = '';
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'signUpReset' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.signUpReset();
|
||||
}
|
||||
|
||||
|
|
@ -25,21 +25,21 @@ class RegisterPage extends React.Component {
|
|||
document.body.className = 'register-page';
|
||||
document.body.style.overflow = 'auto';
|
||||
this.planId =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
queryString.parse(this.props.location.search).planId || null;
|
||||
|
||||
if (!this.planId) {
|
||||
this.planId = PricingPlan.getPlans()[0].planId;
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'savePlanId' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.savePlanId(this.planId);
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
this.props.masterAdminExists &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
!this.props.register.success &&
|
||||
!IS_SAAS_SERVICE
|
||||
) {
|
||||
|
|
@ -48,7 +48,7 @@ class RegisterPage extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { register } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -61,21 +61,21 @@ class RegisterPage extends React.Component {
|
|||
</div>
|
||||
|
||||
{/* REGISTRATION BOX */}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.register.success &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message
|
||||
!this.props.masterAdminExists &&
|
||||
!register.user.cardRegistered &&
|
||||
!register.user.token ? (
|
||||
|
||||
!this.props.masterAdminExists &&
|
||||
!register.user.cardRegistered &&
|
||||
!register.user.token ? (
|
||||
<MessageBox
|
||||
title="Activate your OneUptime account"
|
||||
message="An email is on its way to you with a verification link. Please don't forget to check spam. "
|
||||
/>
|
||||
) : (
|
||||
<RegisterForm
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ planId: any; location: any; }' is not assi... Remove this comment to see the full error message
|
||||
|
||||
planId={this.planId}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
location={this.props.location}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -129,7 +129,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
|||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
RegisterPage.propTypes = {
|
||||
location: PropTypes.object.isRequired,
|
||||
register: PropTypes.object,
|
||||
|
|
@ -139,7 +139,7 @@ RegisterPage.propTypes = {
|
|||
masterAdminExists: PropTypes.bool,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
RegisterPage.displayName = 'RegisterPage';
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(RegisterPage);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { Validate } from '../config';
|
||||
|
|
@ -8,9 +8,9 @@ import { ButtonSpinner } from '../components/basic/Loader';
|
|||
import { resendToken } from '../actions/resendToken';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { RenderField } from '../components/basic/RenderField';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import queryString from 'query-string';
|
||||
import { removeQuery } from '../store';
|
||||
|
||||
|
|
@ -23,14 +23,14 @@ export class ResendTokenForm extends Component {
|
|||
};
|
||||
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendToken' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.resendToken(values);
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
document.body.id = 'login';
|
||||
document.body.style.overflow = 'auto';
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const query = queryString.parse(this.props.location.search).status;
|
||||
if (query === 'link-expired') {
|
||||
this.setState({
|
||||
|
|
@ -41,16 +41,16 @@ export class ResendTokenForm extends Component {
|
|||
serverResponse: 'Invalid Verification link.',
|
||||
});
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
|
||||
|
||||
removeQuery();
|
||||
}
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
const { masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
const { serverResponse } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
const { success } = this.props.resendTokenState;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
const resendTokenError = this.props.resendTokenState.error;
|
||||
|
||||
let header;
|
||||
|
|
@ -82,7 +82,7 @@ export class ResendTokenForm extends Component {
|
|||
<div id="main-body" className="box css">
|
||||
<div className="inner">
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(this.submitForm)}
|
||||
className="request-reset"
|
||||
>
|
||||
|
|
@ -91,7 +91,7 @@ export class ResendTokenForm extends Component {
|
|||
<h2>{header}</h2>
|
||||
</div>
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
{this.props.resendTokenState.success && (
|
||||
<p
|
||||
id="resend-verification-success"
|
||||
|
|
@ -103,7 +103,7 @@ export class ResendTokenForm extends Component {
|
|||
forget to check spam.{' '}
|
||||
</p>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.resendTokenState.success && (
|
||||
<p className="message">
|
||||
{' '}
|
||||
|
|
@ -113,7 +113,7 @@ export class ResendTokenForm extends Component {
|
|||
</p>
|
||||
)}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.resendTokenState.success && (
|
||||
<div>
|
||||
{' '}
|
||||
|
|
@ -136,23 +136,23 @@ export class ResendTokenForm extends Component {
|
|||
type="submit"
|
||||
className="button blue medium"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
this.props.resendTokenState
|
||||
.requesting
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.resendTokenState
|
||||
.requesting && (
|
||||
<span>
|
||||
Send Verification Link
|
||||
</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resendTokenState' does not exist on type... Remove this comment to see the full error message
|
||||
<span>
|
||||
Send Verification Link
|
||||
</span>
|
||||
)}
|
||||
|
||||
{this.props.resendTokenState
|
||||
.requesting && (
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
</button>
|
||||
</p>{' '}
|
||||
</div>
|
||||
|
|
@ -187,16 +187,16 @@ export class ResendTokenForm extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ResendTokenForm.displayName = 'ResendTokenForm';
|
||||
|
||||
function validate(values: $TSFixMe) {
|
||||
const errors = {};
|
||||
if (!Validate.text(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is required.';
|
||||
} else if (!Validate.email(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is invalid.';
|
||||
}
|
||||
return errors;
|
||||
|
|
@ -224,7 +224,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ResendTokenForm.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
resendTokenState: PropTypes.object.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import ResetPasswordForm from '../components/auth/ResetPasswordForm';
|
||||
|
|
@ -12,7 +12,7 @@ class ResetPasswordPage extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'masterAdminExists' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
const { masterAdminExists, requestingMasterAdmin } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -59,7 +59,7 @@ class ResetPasswordPage extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ResetPasswordPage.displayName = 'ResetPasswordPage';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -69,7 +69,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ResetPasswordPage.propTypes = {
|
||||
masterAdminExists: PropTypes.bool,
|
||||
requestingMasterAdmin: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'quer... Remove this comment to see the full error message
|
||||
|
||||
import qs from 'query-string';
|
||||
import PropTypes from 'prop-types';
|
||||
import store from '../store';
|
||||
|
|
@ -8,7 +8,7 @@ import { DASHBOARD_URL, ADMIN_DASHBOARD_URL } from '../config';
|
|||
|
||||
class SsoLoginPage extends React.Component {
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const query = qs.parse(this.props.location.search);
|
||||
const user = {
|
||||
id: query.id,
|
||||
|
|
@ -27,7 +27,7 @@ class SsoLoginPage extends React.Component {
|
|||
const { statusPageLogin, statusPageURL } = state.login;
|
||||
if (statusPageLogin) {
|
||||
const newURL = `${statusPageURL}?userId=${user.id}&accessToken=${user.tokens.jwtAccessToken}`;
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
return (window.location = newURL);
|
||||
}
|
||||
|
||||
|
|
@ -48,13 +48,13 @@ class SsoLoginPage extends React.Component {
|
|||
}
|
||||
|
||||
if (user.redirect) {
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
return (window.location = `${user.redirect}?accessToken=${user.tokens.jwtAccessToken}`);
|
||||
} else if (user.role === 'master-admin') {
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
window.location = ADMIN_DASHBOARD_URL;
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
window.location = DASHBOARD_URL;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,10 +63,10 @@ class SsoLoginPage extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
SsoLoginPage.displayName = 'SsoLoginPage';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
SsoLoginPage.propTypes = {
|
||||
location: PropTypes.object.isRequired,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { ButtonSpinner } from '../components/basic/Loader';
|
||||
import { verifyAuthToken } from '../actions/login';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { RenderField } from '../components/basic/RenderField';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { ACCOUNTS_URL } from '../config';
|
||||
|
|
@ -17,7 +17,7 @@ const errorStyle = { color: '#c23d4b' };
|
|||
export class VerifyAuthToken extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
|
|
@ -27,18 +27,18 @@ export class VerifyAuthToken extends Component {
|
|||
}
|
||||
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const email = this.props.login.user.email;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'verifyAuthToken' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
this.props.verifyAuthToken({ ...values, email });
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.login.user.email)
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
window.location = ACCOUNTS_URL + '/login';
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { error } = this.props.login.authToken;
|
||||
let header;
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ export class VerifyAuthToken extends Component {
|
|||
<div id="main-body" className="box css">
|
||||
<div className="inner">
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(this.submitForm)}
|
||||
className="request-reset"
|
||||
>
|
||||
|
|
@ -91,21 +91,21 @@ export class VerifyAuthToken extends Component {
|
|||
type="submit"
|
||||
className="button blue medium"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
this.props.login.authToken
|
||||
.requesting
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
{!this.props.login.authToken
|
||||
.requesting && (
|
||||
<span>Verify token</span>
|
||||
)}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
<span>Verify token</span>
|
||||
)}
|
||||
|
||||
{this.props.login.authToken
|
||||
.requesting && (
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
<ButtonSpinner />
|
||||
)}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -146,13 +146,13 @@ export class VerifyAuthToken extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
VerifyAuthToken.displayName = 'VerifyAuthToken';
|
||||
|
||||
function validate(values: $TSFixMe) {
|
||||
const errors = {};
|
||||
if (!values.token) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'token' does not exist on type '{}'.
|
||||
|
||||
errors.token = 'Please provide token.';
|
||||
}
|
||||
return errors;
|
||||
|
|
@ -169,7 +169,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ verifyAuthToken }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
VerifyAuthToken.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
verifyAuthToken: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { ButtonSpinner } from '../components/basic/Loader';
|
||||
import { verifyBackupCode } from '../actions/login';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { RenderField } from '../components/basic/RenderField';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link } from 'react-router-dom';
|
||||
import { ACCOUNTS_URL } from '../config';
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ const errorStyle = { color: '#c23d4b' };
|
|||
export class VerifyBackupCode extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
|
|
@ -26,18 +26,18 @@ export class VerifyBackupCode extends Component {
|
|||
}
|
||||
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const email = this.props.login.user.email;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'verifyBackupCode' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
this.props.verifyBackupCode({ ...values, email });
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.login.user.email)
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
window.location = ACCOUNTS_URL + '/login';
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'login' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { backupCode } = this.props.login;
|
||||
let header;
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ export class VerifyBackupCode extends Component {
|
|||
<div id="main-body" className="box css">
|
||||
<div className="inner">
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(this.submitForm)}
|
||||
className="request-reset"
|
||||
>
|
||||
|
|
@ -137,13 +137,13 @@ export class VerifyBackupCode extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
VerifyBackupCode.displayName = 'VerifyBackupCode';
|
||||
|
||||
function validate(values: $TSFixMe) {
|
||||
const errors = {};
|
||||
if (!values.code) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'code' does not exist on type '{}'.
|
||||
|
||||
errors.code = 'Please provide a backup code.';
|
||||
}
|
||||
return errors;
|
||||
|
|
@ -160,7 +160,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ verifyBackupCode }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
VerifyBackupCode.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
verifyBackupCode: PropTypes.func,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Suspense } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Router, Route, Redirect, Switch } from 'react-router-dom';
|
||||
import { history } from './store';
|
||||
import { connect } from 'react-redux';
|
||||
|
|
@ -20,7 +20,7 @@ if (userData !== undefined) {
|
|||
User.setEmail(userData.email);
|
||||
User.setName(userData.name);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
window.location = ACCOUNTS_URL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class NotFound extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
NotFound.displayName = 'NotFound';
|
||||
|
||||
export default NotFound;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class ClipboardWrap extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'value' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { value } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -56,10 +56,10 @@ class ClipboardWrap extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ClipboardWrap.displayName = 'ClipboardWrap';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ClipboardWrap.propTypes = {
|
||||
value: PropTypes.string,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import React from 'react';
|
||||
|
||||
export default function(Cm: $TSFixMe) {
|
||||
export default function (Cm: $TSFixMe) {
|
||||
return (props: $TSFixMe) => (
|
||||
<div className="bs-BIM">
|
||||
<div className="ContextualLayer-layer--topleft ContextualLayer-layer--anytop ContextualLayer-layer--anyleft ContextualLayer-context--topleft ContextualLayer-context--anytop ContextualLayer-context--anyleft ContextualLayer-container ContextualLayer--pointerEvents">
|
||||
<Cm {...props} />
|
||||
</div>
|
||||
<div className="bs-BIM">
|
||||
<div className="ContextualLayer-layer--topleft ContextualLayer-layer--anytop ContextualLayer-layer--anyleft ContextualLayer-context--topleft ContextualLayer-context--anytop ContextualLayer-context--anyleft ContextualLayer-container ContextualLayer--pointerEvents">
|
||||
<Cm {...props} />
|
||||
</div>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'Ele... Remove this comment to see the full error message
|
||||
).displayName = 'ContextModal';
|
||||
</div>
|
||||
|
||||
).displayName = 'ContextModal';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ import { bindActionCreators } from 'redux';
|
|||
import { connect } from 'react-redux';
|
||||
import SideNav from './nav/SideNav';
|
||||
import TopNav from './nav/TopNav';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link, withRouter } from 'react-router-dom';
|
||||
import ShouldRender from './basic/ShouldRender';
|
||||
import ProfileMenu from './profile/ProfileMenu';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { hideProfileMenu } from '../actions/profile';
|
||||
import NotificationMenu from './notification/NotificationMenu';
|
||||
|
|
@ -25,15 +25,15 @@ import { loadDashboard } from '../actions/dashboard';
|
|||
export class DashboardApp extends Component {
|
||||
componentDidMount = async () => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchLicense' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
fetchLicense,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'user' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
user,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'license' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
license,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchSettings' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
fetchSettings,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'loadDashboard' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
loadDashboard,
|
||||
} = this.props;
|
||||
if (
|
||||
|
|
@ -58,25 +58,25 @@ export class DashboardApp extends Component {
|
|||
};
|
||||
|
||||
showProjectForm = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'showForm' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.showForm();
|
||||
};
|
||||
|
||||
hideProfileMenu = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hideProfileMenu' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
this.props.hideProfileMenu();
|
||||
};
|
||||
closeNotificationMenu = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotificationMenu' does not exist on... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeNotificationMenu();
|
||||
};
|
||||
|
||||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeNotificationMenu' does not exist on... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeNotificationMenu();
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hideProfileMenu' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
this.props.hideProfileMenu();
|
||||
return true;
|
||||
default:
|
||||
|
|
@ -85,36 +85,36 @@ export class DashboardApp extends Component {
|
|||
};
|
||||
|
||||
closeModal = () =>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'currentModal' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.currentModal ? this.props.currentModal.id : '',
|
||||
});
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'license' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
license,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'settings' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
settings,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'twilio' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
twilio,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'smtp' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
smtp,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'dashboardLoadState' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
dashboardLoadState,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<ClickOutside onClickOutside={this.hideProfileMenu}>
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ visible: any; }' is not assignable to type... Remove this comment to see the full error message
|
||||
|
||||
<ProfileMenu visible={this.props.profile.menuVisible} />
|
||||
</ClickOutside>
|
||||
<ClickOutside onClickOutside={this.closeNotificationMenu}>
|
||||
<NotificationMenu
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ visible: any; }' is not assignable to type... Remove this comment to see the full error message
|
||||
|
||||
visible={this.props.notification.notificationsVisible}
|
||||
/>
|
||||
</ClickOutside>
|
||||
|
|
@ -149,7 +149,7 @@ export class DashboardApp extends Component {
|
|||
}
|
||||
>
|
||||
<AlertPanel
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
className="bs-ContentSection Card-root"
|
||||
message={
|
||||
<span>
|
||||
|
|
@ -176,7 +176,7 @@ export class DashboardApp extends Component {
|
|||
}
|
||||
>
|
||||
<AlertPanel
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
className="bs-ContentSection Card-root"
|
||||
message={
|
||||
<span>
|
||||
|
|
@ -263,10 +263,10 @@ export class DashboardApp extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
DashboardApp.displayName = 'DashboardApp';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
DashboardApp.propTypes = {
|
||||
profile: PropTypes.object.isRequired,
|
||||
notification: PropTypes.object.isRequired,
|
||||
|
|
@ -317,7 +317,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators(
|
|||
dispatch
|
||||
);
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
DashboardApp.contextTypes = {};
|
||||
|
||||
export default withRouter(
|
||||
|
|
|
|||
|
|
@ -5,42 +5,42 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
class Modal extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
this.onClose = this.onClose.bind(this);
|
||||
this.onConfirm = this.onConfirm.bind(this);
|
||||
}
|
||||
onClose = (value: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.item.onClose) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
this.props.item.onClose(value);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.onClose(this.props.item);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.onClose(this.props.item);
|
||||
}
|
||||
};
|
||||
onConfirm = (value: $TSFixMe) => {
|
||||
const _this = this;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.item.onConfirm) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
this.props.item.onConfirm(value).then(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
() => _this.props.onClose(_this.props.item),
|
||||
() => {}
|
||||
() => { }
|
||||
);
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClose' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.onClose(this.props.item);
|
||||
}
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'zIndex' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
const { zIndex } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'item' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
const { extraClasses } = this.props.item;
|
||||
|
||||
const mainClass = `${extraClasses || ''} modal-dialog-view`;
|
||||
|
|
@ -69,7 +69,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
>
|
||||
<div
|
||||
className="modal_container"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ overflowX: string; overflowY: string; disp... Remove this comment to see the full error message
|
||||
|
||||
style={modalContainerStyle}
|
||||
>
|
||||
<ComposedComponent
|
||||
|
|
@ -82,7 +82,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
);
|
||||
}
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
Modal.propTypes = {
|
||||
onConfirm: PropTypes.func,
|
||||
item: PropTypes.object.isRequired,
|
||||
|
|
@ -91,7 +91,7 @@ const composableComponent = (ComposedComponent: $TSFixMe) => {
|
|||
zIndex: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
Modal.displayName = 'Modal';
|
||||
|
||||
return Modal;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export function Modalize({
|
|||
<div className="ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
<div
|
||||
className="ModalLayer-contents"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
style={{ marginTop: 105 }}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ import { connect } from 'react-redux';
|
|||
import { User } from '../config';
|
||||
import { history } from '../store';
|
||||
|
||||
export default function(ComposedComponent: $TSFixMe) {
|
||||
export default function (ComposedComponent: $TSFixMe) {
|
||||
class NotAuthentication extends Component {
|
||||
isAuthenticated: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
|
||||
this.isAuthenticated = User.isLoggedIn();
|
||||
|
|
@ -35,7 +35,7 @@ export default function(ComposedComponent: $TSFixMe) {
|
|||
return {};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
NotAuthentication.displayName = 'NotAuthentication';
|
||||
|
||||
return connect(mapStateToProps)(NotAuthentication);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default (ComposedComponent: $TSFixMe, extras: $TSFixMe) => {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
OutsideCkick.displayName = 'OutsideCkick';
|
||||
|
||||
return OutsideCkick;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Route, Redirect, Switch } from 'react-router-dom';
|
||||
import routes from '../routes';
|
||||
|
||||
|
|
@ -8,12 +8,12 @@ const { allRoutes } = routes;
|
|||
const PublicPage = () => (
|
||||
<Switch>
|
||||
{allRoutes
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isPublic' does not exist on type '{ titl... Remove this comment to see the full error message
|
||||
|
||||
.filter(route => route.isPublic)
|
||||
.map((route, index) => (
|
||||
<Route
|
||||
component={route.component}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'exact' does not exist on type '{ title: ... Remove this comment to see the full error message
|
||||
|
||||
exact={route.exact}
|
||||
path={route.path}
|
||||
key={index}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import PropTypes from 'prop-types';
|
|||
import { User } from '../config';
|
||||
import { history } from '../store';
|
||||
|
||||
export default function(ComposedComponent: $TSFixMe) {
|
||||
export default function (ComposedComponent: $TSFixMe) {
|
||||
class Authentication extends Component {
|
||||
isAuthenticated: $TSFixMe;
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
|
||||
this.isAuthenticated = User.isLoggedIn();
|
||||
|
|
@ -18,7 +18,7 @@ export default function(ComposedComponent: $TSFixMe) {
|
|||
componentDidMount() {
|
||||
if (!this.isAuthenticated) {
|
||||
history.push('/login', {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
continue: this.props.location.pathname,
|
||||
});
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ export default function(ComposedComponent: $TSFixMe) {
|
|||
componentDidUpdate() {
|
||||
if (!this.isAuthenticated) {
|
||||
history.push('/login', {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'location' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
continue: this.props.location.pathname,
|
||||
});
|
||||
}
|
||||
|
|
@ -42,12 +42,12 @@ export default function(ComposedComponent: $TSFixMe) {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
Authentication.propTypes = {
|
||||
location: PropTypes.object,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
Authentication.displayName = 'RequireAuth';
|
||||
|
||||
function mapStateToProps() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field } from 'redux-form';
|
||||
|
||||
const AdminNote = ({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { bindActionCreators } from 'redux';
|
|||
import { connect } from 'react-redux';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm, FieldArray } from 'redux-form';
|
||||
import { AdminNote } from './AdminNote';
|
||||
import { Validate } from '../../config';
|
||||
|
|
@ -19,7 +19,7 @@ function validate(values: $TSFixMe) {
|
|||
const adminNotesErrors = {};
|
||||
if (values.adminNotes[i] && values.adminNotes[i].note) {
|
||||
if (!Validate.text(values.adminNotes[i].note)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'note' does not exist on type '{}'.
|
||||
|
||||
adminNotesErrors.note = 'Note is not in text format.';
|
||||
adminNotesArrayErrors[i] = adminNotesErrors;
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ function validate(values: $TSFixMe) {
|
|||
}
|
||||
|
||||
if (adminNotesArrayErrors.length) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'adminNotes' does not exist on type '{}'.
|
||||
|
||||
errors.adminNotes = adminNotesArrayErrors;
|
||||
}
|
||||
}
|
||||
|
|
@ -37,12 +37,12 @@ function validate(values: $TSFixMe) {
|
|||
|
||||
export class AdminNotes extends Component {
|
||||
submitForm = async (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'addNote' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
await this.props.addNote(this.props.id, values.adminNotes);
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { handleSubmit, requesting } = this.props;
|
||||
return (
|
||||
<div className="Box-root Margin-bottom--12">
|
||||
|
|
@ -98,7 +98,7 @@ export class AdminNotes extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
AdminNotes.displayName = 'AdminNotes';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({}, dispatch);
|
||||
|
|
@ -107,7 +107,7 @@ const mapStateToProps = () => {
|
|||
return {};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
AdminNotes.propTypes = {
|
||||
requesting: PropTypes.bool,
|
||||
addNote: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||
import { connect } from 'react-redux';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
import ReactJson from 'react-json-view';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
|
||||
class AuditLogsJsonViewModal extends Component {
|
||||
|
|
@ -18,7 +18,7 @@ class AuditLogsJsonViewModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -27,15 +27,15 @@ class AuditLogsJsonViewModal extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
isRequesting,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
error,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
closeThisDialog,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'reqLog' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
reqLog,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resLog' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
resLog,
|
||||
} = this.props;
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ class AuditLogsJsonViewModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
AuditLogsJsonViewModal.displayName = 'AuditLogsJsonViewModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -177,7 +177,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
AuditLogsJsonViewModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { ListLoader } from '../basic/Loader';
|
||||
import { openModal, closeModal } from '../../actions/modal';
|
||||
|
|
@ -17,9 +17,9 @@ export class AuditLogsList extends Component {
|
|||
}
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { openModal } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { deleteModalId } = this.state;
|
||||
openModal({
|
||||
id: deleteModalId,
|
||||
|
|
@ -30,7 +30,7 @@ export class AuditLogsList extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeModal({ id: this.state.deleteModalId });
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -39,64 +39,64 @@ export class AuditLogsList extends Component {
|
|||
|
||||
render() {
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.skip &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.auditLogs.skip === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.skip = parseInt(this.props.auditLogs.skip, 10);
|
||||
}
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.limit &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.auditLogs.limit === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.limit = parseInt(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.limit,
|
||||
10
|
||||
);
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.auditLogs.skip) this.props.auditLogs.skip = 0;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.auditLogs.limit) this.props.auditLogs.limit = 0;
|
||||
|
||||
let canNext =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.auditLogs.count &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.auditLogs.count >
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.count &&
|
||||
|
||||
this.props.auditLogs.count >
|
||||
|
||||
this.props.auditLogs.skip + this.props.auditLogs.limit
|
||||
? true
|
||||
: false;
|
||||
let canPrev =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs && this.props.auditLogs.skip <= 0
|
||||
? false
|
||||
: true;
|
||||
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
(this.props.requesting || !this.props.auditLogs.auditLogs)
|
||||
) {
|
||||
canNext = false;
|
||||
canPrev = false;
|
||||
}
|
||||
const numberOfPages = Math.ceil(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
parseInt(this.props.auditLogs && this.props.auditLogs.count) / 10
|
||||
);
|
||||
return (
|
||||
|
|
@ -148,7 +148,7 @@ export class AuditLogsList extends Component {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody className="Table-body">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
{this.props.requesting ? (
|
||||
<Fragment>
|
||||
<tr className="Table-row db-ListViewItem bs-ActionsParent db-ListViewItem--hasLink">
|
||||
|
|
@ -169,13 +169,13 @@ export class AuditLogsList extends Component {
|
|||
</td>
|
||||
</tr>
|
||||
</Fragment>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
) : this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.auditLogs.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.auditLogs.auditLogs.length > 0 ? (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.auditLogs &&
|
||||
|
||||
this.props.auditLogs.auditLogs.length > 0 ? (
|
||||
|
||||
this.props.auditLogs.auditLogs.map((auditLog: $TSFixMe) => {
|
||||
return (
|
||||
<tr
|
||||
|
|
@ -192,8 +192,8 @@ export class AuditLogsList extends Component {
|
|||
<span>
|
||||
{auditLog.projectId
|
||||
? auditLog
|
||||
.projectId
|
||||
.name
|
||||
.projectId
|
||||
.name
|
||||
: 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -211,8 +211,8 @@ export class AuditLogsList extends Component {
|
|||
<span>
|
||||
{auditLog.userId
|
||||
? auditLog
|
||||
.userId
|
||||
.name
|
||||
.userId
|
||||
.name
|
||||
: 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -230,12 +230,12 @@ export class AuditLogsList extends Component {
|
|||
<div className="Box-root Flex-flex">
|
||||
<span>
|
||||
{auditLog.request &&
|
||||
auditLog
|
||||
.request
|
||||
.apiSection
|
||||
auditLog
|
||||
.request
|
||||
.apiSection
|
||||
? auditLog
|
||||
.request
|
||||
.apiSection
|
||||
.request
|
||||
.apiSection
|
||||
: ''}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -255,7 +255,7 @@ export class AuditLogsList extends Component {
|
|||
<span>
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal(
|
||||
{
|
||||
id: uuidv4(),
|
||||
|
|
@ -300,21 +300,21 @@ export class AuditLogsList extends Component {
|
|||
id="logsStatus"
|
||||
style={{ textAlign: 'center', marginTop: '10px' }}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
{this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
(!this.props.auditLogs.auditLogs ||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
!this.props.auditLogs.auditLogs.length) &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
!this.props.requesting &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
!this.props.auditLogs.error
|
||||
|
||||
(!this.props.auditLogs.auditLogs ||
|
||||
|
||||
!this.props.auditLogs.auditLogs.length) &&
|
||||
|
||||
!this.props.requesting &&
|
||||
|
||||
!this.props.auditLogs.error
|
||||
? "We don't have any logs yet"
|
||||
: null}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
{this.props.auditLogs && this.props.auditLogs.error
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
? this.props.auditLogs.error
|
||||
: null}
|
||||
</div>
|
||||
|
|
@ -328,22 +328,22 @@ export class AuditLogsList extends Component {
|
|||
>
|
||||
<ShouldRender
|
||||
if={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.count
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
Page {this.props.page} of{' '}
|
||||
{numberOfPages} (
|
||||
<span id="audit-log-count">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
{this.props.auditLogs.count}
|
||||
</span>{' '}
|
||||
Log
|
||||
<ShouldRender
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if={this.props.auditLogs.count > 0}
|
||||
>
|
||||
s
|
||||
|
|
@ -360,11 +360,11 @@ export class AuditLogsList extends Component {
|
|||
<button
|
||||
id="btnPrev"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'prevClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.prevClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -387,11 +387,11 @@ export class AuditLogsList extends Component {
|
|||
<button
|
||||
id="btnNext"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'nextClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.nextClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogs.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -417,7 +417,7 @@ export class AuditLogsList extends Component {
|
|||
className={'Button bs-ButtonLegacy'}
|
||||
// data-db-analytics-name="list_view.pagination.next"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
disabled={this.props.requesting}
|
||||
>
|
||||
<div className="Button-fill bs-ButtonLegacy-fill Box-root Box-background--white Flex-inlineFlex Flex-alignItems--center Flex-direction--row Padding-horizontal--8 Padding-vertical--4">
|
||||
|
|
@ -446,10 +446,10 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
AuditLogsList.displayName = 'ProjectList';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
AuditLogsList.propTypes = {
|
||||
nextClicked: PropTypes.func.isRequired,
|
||||
prevClicked: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
|
|
@ -21,7 +21,7 @@ class DeleteConfirmationModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
return this.handleDelete();
|
||||
|
|
@ -31,7 +31,7 @@ class DeleteConfirmationModal extends Component {
|
|||
};
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { error, deleteAuditLogs, closeModal, modalId } = this.props;
|
||||
deleteAuditLogs().then(() => {
|
||||
if (!error) {
|
||||
|
|
@ -40,7 +40,7 @@ class DeleteConfirmationModal extends Component {
|
|||
});
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -148,10 +148,10 @@ const mapStateToProps = (state: $TSFixMe) => ({
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ closeModal, deleteAuditLogs }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
DeleteConfirmationModal.displayName = 'Delete Confirmation Modal';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
DeleteConfirmationModal.propTypes = {
|
||||
closeThisDialog: PropTypes.func,
|
||||
deleteRequest: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ class AlertPanel extends Component {
|
|||
return (
|
||||
<div className="Box-root Margin-vertical--12">
|
||||
<div
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'className' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
className={`db-Trends Card-shadow--small ${this.props.className}`}
|
||||
>
|
||||
<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">
|
||||
<span className="ContentHeader-title Text-color--white Text-fontSize--15 Text-fontWeight--regular Text-lineHeight--16">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'message' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
<span>{this.props.message}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -23,10 +23,10 @@ class AlertPanel extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
AlertPanel.displayName = 'AlertPanel';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
AlertPanel.propTypes = {
|
||||
message: PropTypes.object.isRequired,
|
||||
className: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class BeforeLoad extends React.Component {
|
|||
if (redirectTo) {
|
||||
sessionStorage.removeItem('initialUrl');
|
||||
const accessToken = User.getAccessToken();
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
window.location = `${redirectTo}?accessToken=${accessToken}&counter=${parseInt(
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string | 0' is not assignable to... Remove this comment to see the full error message
|
||||
|
||||
counter,
|
||||
10
|
||||
) + 1}`;
|
||||
|
|
@ -52,13 +52,13 @@ class BeforeLoad extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
BeforeLoad.displayName = 'BeforeLoad';
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
BeforeLoad.contextTypes = {};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
BeforeLoad.propTypes = {
|
||||
children: PropTypes.any,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useRef, useState } from 'react';
|
||||
// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message
|
||||
|
||||
import { PropTypes } from 'prop-types';
|
||||
import ShouldRender from './ShouldRender';
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ const DropDownMenu = ({
|
|||
const container = useRef(null);
|
||||
|
||||
const handleClickOutside = (event: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'.
|
||||
|
||||
if (container.current && !container.current.contains(event.target)) {
|
||||
setOpen(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class ErrorBoundary extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hasError' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (this.state.hasError || this.state.error) {
|
||||
return (
|
||||
<div
|
||||
|
|
@ -43,13 +43,13 @@ class ErrorBoundary extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ErrorBoundary.displayName = 'ErrorBoundary';
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ErrorBoundary.contextTypes = {};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ErrorBoundary.propTypes = {
|
||||
children: PropTypes.any,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@ const RenderSelect = ({
|
|||
autoFocus
|
||||
}: $TSFixMe) => {
|
||||
const filteredOpt = useRef();
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'opt' implicitly has an 'any' type.
|
||||
|
||||
filteredOpt.current = options.filter(opt => opt.value === input.value);
|
||||
|
||||
const [value, setValue] = useState({
|
||||
value: input.value,
|
||||
label:
|
||||
// @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
|
||||
|
||||
filteredOpt.current.length > 0
|
||||
// @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
|
||||
|
||||
? filteredOpt.current[0].label
|
||||
: placeholder,
|
||||
});
|
||||
|
|
@ -32,9 +32,9 @@ const RenderSelect = ({
|
|||
setValue({
|
||||
value: input.value,
|
||||
label:
|
||||
// @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
|
||||
|
||||
filteredOpt.current.length > 0
|
||||
// @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
|
||||
|
||||
? filteredOpt.current[0].label
|
||||
: placeholder,
|
||||
});
|
||||
|
|
@ -51,7 +51,7 @@ const RenderSelect = ({
|
|||
<span style={{ height: '28px', width: '250px', ...style }}>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<Select
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ name: any; value: { value: any; label: any... Remove this comment to see the full error message
|
||||
|
||||
name={input.name}
|
||||
value={value}
|
||||
onChange={handleChange}
|
||||
|
|
@ -59,7 +59,7 @@ const RenderSelect = ({
|
|||
className={className}
|
||||
id={id}
|
||||
isDisabled={disabled || false}
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'opt' implicitly has an 'any' type.
|
||||
|
||||
options={options.filter(opt =>
|
||||
opt.show !== undefined ? opt.show : true
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import Select from 'react-select';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ const ReactSelectOneUptime = (props: $TSFixMe) => <Select
|
|||
? props.style.height
|
||||
: '30px'
|
||||
}),
|
||||
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'provided' implicitly has an 'any' type.
|
||||
|
||||
option: (provided, state) => ({
|
||||
...provided,
|
||||
backgroundColor: state.isSelected ? 'black' : 'unset',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class CallLogsContentViewModal extends Component {
|
||||
|
|
@ -16,7 +16,7 @@ class CallLogsContentViewModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -24,7 +24,7 @@ class CallLogsContentViewModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -118,7 +118,7 @@ class CallLogsContentViewModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CallLogsContentViewModal.displayName = 'CallLogsContentViewModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -134,7 +134,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
CallLogsContentViewModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class CallLogsErrorViewModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -22,7 +22,7 @@ class CallLogsErrorViewModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
return (
|
||||
<div className="db-CallLogsContentViewModal ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
|
|
@ -96,7 +96,7 @@ class CallLogsErrorViewModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CallLogsErrorViewModal.displayName = 'CallLogsErrorViewModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -112,7 +112,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
CallLogsErrorViewModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import moment from 'moment';
|
||||
|
||||
|
|
@ -20,9 +20,9 @@ export class CallLogsList extends Component {
|
|||
}
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { openModal } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { deleteModalId } = this.state;
|
||||
openModal({
|
||||
id: deleteModalId,
|
||||
|
|
@ -33,7 +33,7 @@ export class CallLogsList extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeModal({ id: this.state.deleteModalId });
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -42,58 +42,58 @@ export class CallLogsList extends Component {
|
|||
|
||||
render() {
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.skip &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.callLogs.skip === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.skip = parseInt(this.props.callLogs.skip, 10);
|
||||
}
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.limit &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.callLogs.limit === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.limit = parseInt(this.props.callLogs.limit, 10);
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.callLogs.skip) this.props.callLogs.skip = 0;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.callLogs.limit) this.props.callLogs.limit = 0;
|
||||
|
||||
let canNext =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.count &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.count >
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.count &&
|
||||
|
||||
this.props.callLogs.count >
|
||||
|
||||
this.props.callLogs.skip + this.props.callLogs.limit
|
||||
? true
|
||||
: false;
|
||||
let canPrev =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs && this.props.callLogs.skip <= 0 ? false : true;
|
||||
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
(this.props.requesting || !this.props.callLogs.callLogs)
|
||||
) {
|
||||
canNext = false;
|
||||
canPrev = false;
|
||||
}
|
||||
const numberOfPages = Math.ceil(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
parseInt(this.props.callLogs && this.props.callLogs.count) / 10
|
||||
);
|
||||
return (
|
||||
|
|
@ -168,7 +168,7 @@ export class CallLogsList extends Component {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody className="Table-body">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
{this.props.requesting ? (
|
||||
<Fragment>
|
||||
<tr className="Table-row db-ListViewItem bs-ActionsParent db-ListViewItem--hasLink">
|
||||
|
|
@ -189,13 +189,13 @@ export class CallLogsList extends Component {
|
|||
</td>
|
||||
</tr>
|
||||
</Fragment>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
) : this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.callLogs.length > 0 ? (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.callLogs &&
|
||||
|
||||
this.props.callLogs.callLogs.length > 0 ? (
|
||||
|
||||
this.props.callLogs.callLogs.map((callLog: $TSFixMe) => {
|
||||
return (
|
||||
<tr
|
||||
|
|
@ -210,20 +210,18 @@ export class CallLogsList extends Component {
|
|||
<span className="db-ListViewItem-text Text-color--cyan Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap">
|
||||
<div className="Box-root Margin-right--16">
|
||||
<div
|
||||
className={`Badge Badge--color--${
|
||||
callLog.status ===
|
||||
'Success'
|
||||
className={`Badge Badge--color--${callLog.status ===
|
||||
'Success'
|
||||
? 'green'
|
||||
: 'red'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
>
|
||||
<span
|
||||
className={`Badge-text Text-color--${
|
||||
callLog.status ===
|
||||
'Success'
|
||||
className={`Badge-text Text-color--${callLog.status ===
|
||||
'Success'
|
||||
? 'green'
|
||||
: 'red'
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
>
|
||||
<span>
|
||||
{callLog.status
|
||||
|
|
@ -241,7 +239,7 @@ export class CallLogsList extends Component {
|
|||
style={{
|
||||
height: '1px',
|
||||
cursor: 'pointer',
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string | null' is not assignable to type 'Te... Remove this comment to see the full error message
|
||||
|
||||
textDecoration: callLog.projectId
|
||||
? 'underline'
|
||||
: null,
|
||||
|
|
@ -249,8 +247,8 @@ export class CallLogsList extends Component {
|
|||
onClick={() => {
|
||||
history.push(
|
||||
'/admin/projects/' +
|
||||
callLog.projectId
|
||||
._id
|
||||
callLog.projectId
|
||||
._id
|
||||
);
|
||||
}}
|
||||
>
|
||||
|
|
@ -261,8 +259,8 @@ export class CallLogsList extends Component {
|
|||
<span>
|
||||
{callLog.projectId
|
||||
? callLog
|
||||
.projectId
|
||||
.name
|
||||
.projectId
|
||||
.name
|
||||
: 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -317,13 +315,13 @@ export class CallLogsList extends Component {
|
|||
<span>
|
||||
{callLog.createdAt
|
||||
? moment
|
||||
.utc(
|
||||
callLog.createdAt
|
||||
)
|
||||
.local()
|
||||
.format(
|
||||
'ddd, YYYY/MM/DD, h:mm:ss'
|
||||
)
|
||||
.utc(
|
||||
callLog.createdAt
|
||||
)
|
||||
.local()
|
||||
.format(
|
||||
'ddd, YYYY/MM/DD, h:mm:ss'
|
||||
)
|
||||
: 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -347,7 +345,7 @@ export class CallLogsList extends Component {
|
|||
<span>
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal(
|
||||
{
|
||||
id: uuidv4(),
|
||||
|
|
@ -374,7 +372,7 @@ export class CallLogsList extends Component {
|
|||
{callLog.error ? (
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal(
|
||||
{
|
||||
id: uuidv4(),
|
||||
|
|
@ -418,21 +416,21 @@ export class CallLogsList extends Component {
|
|||
id="logsStatus"
|
||||
style={{ textAlign: 'center', marginTop: '10px' }}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
(!this.props.callLogs.callLogs ||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
!this.props.callLogs.callLogs.length) &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
!this.props.requesting &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
!this.props.callLogs.error
|
||||
|
||||
(!this.props.callLogs.callLogs ||
|
||||
|
||||
!this.props.callLogs.callLogs.length) &&
|
||||
|
||||
!this.props.requesting &&
|
||||
|
||||
!this.props.callLogs.error
|
||||
? "We don't have any logs yet"
|
||||
: null}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.callLogs && this.props.callLogs.error
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
? this.props.callLogs.error
|
||||
: null}
|
||||
</div>
|
||||
|
|
@ -444,25 +442,21 @@ export class CallLogsList extends Component {
|
|||
id="log-count"
|
||||
className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap"
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.count
|
||||
? `Page ${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
this.props.page
|
||||
} of ${numberOfPages} (${this.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.count} Log${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.callLogs.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
})`
|
||||
|
||||
this.props.callLogs.count
|
||||
? `Page ${this.props.page
|
||||
} of ${numberOfPages} (${this.props
|
||||
|
||||
.callLogs &&
|
||||
|
||||
this.props.callLogs.count} Log${this.props.callLogs &&
|
||||
|
||||
this.props.callLogs.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
})`
|
||||
: null}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -474,11 +468,11 @@ export class CallLogsList extends Component {
|
|||
<button
|
||||
id="btnPrev"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'prevClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.prevClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -501,11 +495,11 @@ export class CallLogsList extends Component {
|
|||
<button
|
||||
id="btnNext"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'nextClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.nextClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogs' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogs.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -531,7 +525,7 @@ export class CallLogsList extends Component {
|
|||
className={'Button bs-ButtonLegacy'}
|
||||
// data-db-analytics-name="list_view.pagination.next"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
disabled={this.props.requesting}
|
||||
>
|
||||
<div className="Button-fill bs-ButtonLegacy-fill Box-root Box-background--white Flex-inlineFlex Flex-alignItems--center Flex-direction--row Padding-horizontal--8 Padding-vertical--4">
|
||||
|
|
@ -560,10 +554,10 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CallLogsList.displayName = 'ProjectList';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
CallLogsList.propTypes = {
|
||||
nextClicked: PropTypes.func.isRequired,
|
||||
prevClicked: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
|
|
@ -21,7 +21,7 @@ class DeleteConfirmationModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
return this.handleDelete();
|
||||
|
|
@ -31,7 +31,7 @@ class DeleteConfirmationModal extends Component {
|
|||
};
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { error, deleteCallLogs, closeModal, modalId } = this.props;
|
||||
deleteCallLogs().then(() => {
|
||||
if (!error) {
|
||||
|
|
@ -40,7 +40,7 @@ class DeleteConfirmationModal extends Component {
|
|||
});
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -148,10 +148,10 @@ const mapStateToProps = (state: $TSFixMe) => ({
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ closeModal, deleteCallLogs }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
DeleteConfirmationModal.displayName = 'Delete Confirmation Modal';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
DeleteConfirmationModal.propTypes = {
|
||||
closeThisDialog: PropTypes.func,
|
||||
deleteRequest: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
|
|
@ -21,7 +21,7 @@ class DeleteConfirmationModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
return this.handleDelete();
|
||||
|
|
@ -31,7 +31,7 @@ class DeleteConfirmationModal extends Component {
|
|||
};
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { error, deleteEmailLogs, closeModal, modalId } = this.props;
|
||||
deleteEmailLogs().then(() => {
|
||||
if (!error) {
|
||||
|
|
@ -40,7 +40,7 @@ class DeleteConfirmationModal extends Component {
|
|||
});
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
const { closeThisDialog, deleteRequest, error } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -148,10 +148,10 @@ const mapStateToProps = (state: $TSFixMe) => ({
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ closeModal, deleteEmailLogs }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
DeleteConfirmationModal.displayName = 'Delete Confirmation Modal';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
DeleteConfirmationModal.propTypes = {
|
||||
closeThisDialog: PropTypes.func,
|
||||
deleteRequest: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
class EmailLogsContentViewModal extends Component {
|
||||
|
|
@ -16,7 +16,7 @@ class EmailLogsContentViewModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -24,7 +24,7 @@ class EmailLogsContentViewModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -118,7 +118,7 @@ class EmailLogsContentViewModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
EmailLogsContentViewModal.displayName = 'EmailLogsContentViewModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -134,7 +134,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
EmailLogsContentViewModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class EmailLogsErrorViewModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -22,7 +22,7 @@ class EmailLogsErrorViewModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting, error, closeThisDialog, content } = this.props;
|
||||
return (
|
||||
<div className="db-EmailLogsContentViewModal ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
|
|
@ -96,7 +96,7 @@ class EmailLogsErrorViewModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
EmailLogsErrorViewModal.displayName = 'EmailLogsErrorViewModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -112,7 +112,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
EmailLogsErrorViewModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
|
|
@ -19,9 +19,9 @@ export class EmailLogsList extends Component {
|
|||
}
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { openModal } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { deleteModalId } = this.state;
|
||||
openModal({
|
||||
id: deleteModalId,
|
||||
|
|
@ -32,7 +32,7 @@ export class EmailLogsList extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeModal({ id: this.state.deleteModalId });
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -41,64 +41,64 @@ export class EmailLogsList extends Component {
|
|||
|
||||
render() {
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.skip &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.emailLogs.skip === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.skip = parseInt(this.props.emailLogs.skip, 10);
|
||||
}
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.limit &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.emailLogs.limit === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.limit = parseInt(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.limit,
|
||||
10
|
||||
);
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.emailLogs.skip) this.props.emailLogs.skip = 0;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.emailLogs.limit) this.props.emailLogs.limit = 0;
|
||||
|
||||
let canNext =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.emailLogs.count &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.emailLogs.count >
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.count &&
|
||||
|
||||
this.props.emailLogs.count >
|
||||
|
||||
this.props.emailLogs.skip + this.props.emailLogs.limit
|
||||
? true
|
||||
: false;
|
||||
let canPrev =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs && this.props.emailLogs.skip <= 0
|
||||
? false
|
||||
: true;
|
||||
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
(this.props.requesting || !this.props.emailLogs.emailLogs)
|
||||
) {
|
||||
canNext = false;
|
||||
canPrev = false;
|
||||
}
|
||||
const numberOfPages = Math.ceil(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
parseInt(this.props.emailLogs && this.props.emailLogs.count) / 10
|
||||
);
|
||||
return (
|
||||
|
|
@ -178,7 +178,7 @@ export class EmailLogsList extends Component {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody className="Table-body">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
{this.props.requesting ? (
|
||||
<Fragment>
|
||||
<tr className="Table-row db-ListViewItem bs-ActionsParent db-ListViewItem--hasLink">
|
||||
|
|
@ -199,13 +199,13 @@ export class EmailLogsList extends Component {
|
|||
</td>
|
||||
</tr>
|
||||
</Fragment>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
) : this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.emailLogs.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
this.props.emailLogs.emailLogs.length > 0 ? (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.emailLogs &&
|
||||
|
||||
this.props.emailLogs.emailLogs.length > 0 ? (
|
||||
|
||||
this.props.emailLogs.emailLogs.map((emailLog: $TSFixMe) => {
|
||||
return (
|
||||
<tr
|
||||
|
|
@ -220,20 +220,18 @@ export class EmailLogsList extends Component {
|
|||
<span className="db-ListViewItem-text Text-color--cyan Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap">
|
||||
<div className="Box-root Margin-right--16">
|
||||
<div
|
||||
className={`Badge Badge--color--${
|
||||
emailLog.status ===
|
||||
'Success'
|
||||
className={`Badge Badge--color--${emailLog.status ===
|
||||
'Success'
|
||||
? 'green'
|
||||
: 'red'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
>
|
||||
<span
|
||||
className={`Badge-text Text-color--${
|
||||
emailLog.status ===
|
||||
'Success'
|
||||
className={`Badge-text Text-color--${emailLog.status ===
|
||||
'Success'
|
||||
? 'green'
|
||||
: 'red'
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
>
|
||||
<span>
|
||||
{emailLog.status
|
||||
|
|
@ -312,7 +310,7 @@ export class EmailLogsList extends Component {
|
|||
<span>
|
||||
{emailLog.smtpServer
|
||||
? emailLog.smtpServer ===
|
||||
'internal'
|
||||
'internal'
|
||||
? 'Internal'
|
||||
: emailLog.smtpServer
|
||||
: 'N/A'}
|
||||
|
|
@ -333,7 +331,7 @@ export class EmailLogsList extends Component {
|
|||
<span>
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal(
|
||||
{
|
||||
id: uuidv4(),
|
||||
|
|
@ -375,7 +373,7 @@ export class EmailLogsList extends Component {
|
|||
<span>
|
||||
<button
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal(
|
||||
{
|
||||
id: uuidv4(),
|
||||
|
|
@ -419,21 +417,21 @@ export class EmailLogsList extends Component {
|
|||
id="logsStatus"
|
||||
style={{ textAlign: 'center', marginTop: '10px' }}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
{this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
(!this.props.emailLogs.emailLogs ||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
!this.props.emailLogs.emailLogs.length) &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
!this.props.requesting &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
!this.props.emailLogs.error
|
||||
|
||||
(!this.props.emailLogs.emailLogs ||
|
||||
|
||||
!this.props.emailLogs.emailLogs.length) &&
|
||||
|
||||
!this.props.requesting &&
|
||||
|
||||
!this.props.emailLogs.error
|
||||
? "We don't have any logs yet"
|
||||
: null}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
{this.props.emailLogs && this.props.emailLogs.error
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
? this.props.emailLogs.error
|
||||
: null}
|
||||
</div>
|
||||
|
|
@ -447,22 +445,22 @@ export class EmailLogsList extends Component {
|
|||
>
|
||||
<ShouldRender
|
||||
if={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.count
|
||||
}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
Page {this.props.page} of{' '}
|
||||
{numberOfPages} (
|
||||
<span id="email-log-count">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
{this.props.emailLogs.count}
|
||||
</span>{' '}
|
||||
Log
|
||||
<ShouldRender
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if={this.props.emailLogs.count > 0}
|
||||
>
|
||||
s
|
||||
|
|
@ -479,11 +477,11 @@ export class EmailLogsList extends Component {
|
|||
<button
|
||||
id="btnPrev"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'prevClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.prevClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -506,11 +504,11 @@ export class EmailLogsList extends Component {
|
|||
<button
|
||||
id="btnNext"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'nextClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.nextClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogs' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogs.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -536,7 +534,7 @@ export class EmailLogsList extends Component {
|
|||
className={'Button bs-ButtonLegacy'}
|
||||
// data-db-analytics-name="list_view.pagination.next"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
disabled={this.props.requesting}
|
||||
>
|
||||
<div className="Button-fill bs-ButtonLegacy-fill Box-root Box-background--white Flex-inlineFlex Flex-alignItems--center Flex-direction--row Padding-horizontal--8 Padding-vertical--4">
|
||||
|
|
@ -565,10 +563,10 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
EmailLogsList.displayName = 'ProjectList';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
EmailLogsList.propTypes = {
|
||||
nextClicked: PropTypes.func.isRequired,
|
||||
prevClicked: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm, Field } from 'redux-form';
|
||||
import { RenderField } from '../basic/RenderField';
|
||||
import { Validate } from '../../config';
|
||||
|
|
@ -16,7 +16,7 @@ function validate(values: $TSFixMe) {
|
|||
|
||||
if (values.email) {
|
||||
if (!Validate.email(values.email)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Email is not valid.';
|
||||
}
|
||||
|
||||
|
|
@ -24,14 +24,14 @@ function validate(values: $TSFixMe) {
|
|||
!Validate.isValidBusinessEmail(values.email) &&
|
||||
Validate.email(values.email)
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'email' does not exist on type '{}'.
|
||||
|
||||
errors.email = 'Please enter a business email address.';
|
||||
}
|
||||
}
|
||||
|
||||
if (values.license) {
|
||||
if (!Validate.text(values.license)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'license' does not exist on type '{}'.
|
||||
|
||||
errors.license = 'License is not in valid format.';
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ function validate(values: $TSFixMe) {
|
|||
|
||||
export class LicenseSetting extends Component {
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmLicense' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
const { confirmLicense } = this.props;
|
||||
|
||||
confirmLicense(values);
|
||||
|
|
@ -49,11 +49,11 @@ export class LicenseSetting extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
handleSubmit,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'license' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
license: { data },
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirm' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
confirm: { requesting, error },
|
||||
} = this.props;
|
||||
const isLicensed = data && data.license;
|
||||
|
|
@ -68,14 +68,12 @@ export class LicenseSetting extends Component {
|
|||
<span>License Details</span>
|
||||
</span>
|
||||
<div
|
||||
className={`Badge Badge--color--${
|
||||
isLicensed ? 'green' : 'red'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
className={`Badge Badge--color--${isLicensed ? 'green' : 'red'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
>
|
||||
<span
|
||||
className={`Badge-text Text-color--${
|
||||
isLicensed ? 'green' : 'red'
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
className={`Badge-text Text-color--${isLicensed ? 'green' : 'red'
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
>
|
||||
<span>
|
||||
{isLicensed
|
||||
|
|
@ -179,7 +177,7 @@ export class LicenseSetting extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
LicenseSetting.displayName = 'LicenseSetting';
|
||||
|
||||
const LicenseSettingForm = reduxForm({
|
||||
|
|
@ -202,7 +200,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ confirmLicense }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
LicenseSetting.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
confirmLicense: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class UnLicensedAlert extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
UnLicensedAlert.displayName = 'UnLicensedAlert';
|
||||
|
||||
export default UnLicensedAlert;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
class About extends Component {
|
||||
componentDidMount() {
|
||||
|
|
@ -16,7 +16,7 @@ class About extends Component {
|
|||
switch (e.key) {
|
||||
case 'Escape':
|
||||
case 'Enter':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -24,7 +24,7 @@ class About extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'versions' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { versions, closeThisDialog, probes } = this.props;
|
||||
const currentYear = new Date().getFullYear();
|
||||
let probeVersion = null;
|
||||
|
|
@ -325,7 +325,7 @@ class About extends Component {
|
|||
<button
|
||||
className="bs-Button bs-DeprecatedButton bs-Button--grey btn__modal"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
onClick={this.props.closeThisDialog}
|
||||
autoFocus={true}
|
||||
>
|
||||
|
|
@ -345,7 +345,7 @@ class About extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
About.displayName = 'AboutModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -355,7 +355,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
About.propTypes = {
|
||||
closeThisDialog: PropTypes.func.isRequired,
|
||||
versions: PropTypes.object,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
|
||||
class ConfirmBalanceTopUp extends Component {
|
||||
|
|
@ -17,10 +17,10 @@ class ConfirmBalanceTopUp extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.confirmThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -29,7 +29,7 @@ class ConfirmBalanceTopUp extends Component {
|
|||
|
||||
render() {
|
||||
let recharging = false;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.isRequesting) {
|
||||
recharging = true;
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ class ConfirmBalanceTopUp extends Component {
|
|||
tabIndex={-1}
|
||||
style={{ marginTop: 40 }}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
<ClickOutside onClickOutside={this.props.closeThisDialog}>
|
||||
<div className="bs-BIM">
|
||||
<div className="bs-Modal bs-Modal--medium">
|
||||
|
|
@ -61,7 +61,7 @@ class ConfirmBalanceTopUp extends Component {
|
|||
style={{
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
>{`${this.props.data.amount}$`}</span>
|
||||
?
|
||||
</span>
|
||||
|
|
@ -72,7 +72,7 @@ class ConfirmBalanceTopUp extends Component {
|
|||
id="cancelBalanceTopUp"
|
||||
className="bs-Button bs-DeprecatedButton bs-Button--grey btn__modal"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
onClick={this.props.closeThisDialog}
|
||||
>
|
||||
<span>Cancel</span>
|
||||
|
|
@ -85,7 +85,7 @@ class ConfirmBalanceTopUp extends Component {
|
|||
className="bs-Button bs-DeprecatedButton bs-Button--blue btn__modal"
|
||||
type="button"
|
||||
onClick={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
this.props.confirmThisDialog
|
||||
}
|
||||
disabled={recharging}
|
||||
|
|
@ -114,12 +114,12 @@ class ConfirmBalanceTopUp extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ConfirmBalanceTopUp.displayName = 'ConfirmBalanceTopUpFormModal';
|
||||
const mapStateToProps = (state: $TSFixMe) => ({
|
||||
isRequesting: state.project.updateBalance.requesting
|
||||
});
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ConfirmBalanceTopUp.propTypes = {
|
||||
confirmThisDialog: PropTypes.func.isRequired,
|
||||
closeThisDialog: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import PropTypes, { string } from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
|
||||
|
|
@ -26,17 +26,17 @@ class MessageBox extends Component {
|
|||
};
|
||||
|
||||
handleCloseModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'messageBoxId' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.messageBoxId,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
const { data } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'title' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
let { title, message, messageBoxId } = this.props;
|
||||
if (data) {
|
||||
title = data.title;
|
||||
|
|
@ -78,7 +78,7 @@ class MessageBox extends Component {
|
|||
type="button"
|
||||
id="modal-ok"
|
||||
onClick={() =>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
id: messageBoxId,
|
||||
})
|
||||
|
|
@ -101,10 +101,10 @@ class MessageBox extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
MessageBox.displayName = 'MessageBoxModal';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
MessageBox.propTypes = {
|
||||
closeModal: PropTypes.func.isRequired,
|
||||
title: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class Dropdown extends React.Component {
|
|||
};
|
||||
|
||||
toggleExpanded = (value: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { isLoading } = this.props;
|
||||
const { expanded } = this.state;
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class Dropdown extends React.Component {
|
|||
};
|
||||
|
||||
handleHover = (toggleExpanded: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'shouldToggleOnHover' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
const { shouldToggleOnHover } = this.props;
|
||||
|
||||
if (shouldToggleOnHover) {
|
||||
|
|
@ -93,7 +93,7 @@ class Dropdown extends React.Component {
|
|||
};
|
||||
|
||||
renderPanel = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'ContentComponent' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
const { ContentComponent, contentProps } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -105,13 +105,13 @@ class Dropdown extends React.Component {
|
|||
|
||||
render() {
|
||||
const { expanded, hasFocus } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { children, isLoading, disabled } = this.props;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="dropdown db-MultiSelect-dropdown-container"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="0"
|
||||
role="combobox"
|
||||
aria-expanded={expanded}
|
||||
|
|
@ -130,9 +130,9 @@ class Dropdown extends React.Component {
|
|||
${disabled && 'db-MultiSelect-dropdown--disabled'}
|
||||
${hasFocus && 'db-MultiSelect-dropdown-header--focused'}
|
||||
${expanded &&
|
||||
'db-MultiSelect-dropdown-header--expanded'}
|
||||
'db-MultiSelect-dropdown-header--expanded'}
|
||||
`}
|
||||
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
|
||||
|
||||
onClick={() => this.toggleExpanded()}
|
||||
>
|
||||
<span
|
||||
|
|
@ -140,7 +140,7 @@ class Dropdown extends React.Component {
|
|||
db-MultiSelect-dropdown-heading--value
|
||||
db-MultiSelect-dropdown-children
|
||||
${hasFocus &&
|
||||
'db-MultiSelect-dropdown-header--focused'}
|
||||
'db-MultiSelect-dropdown-header--focused'}
|
||||
`}
|
||||
>
|
||||
{children}
|
||||
|
|
@ -157,13 +157,12 @@ class Dropdown extends React.Component {
|
|||
>
|
||||
<span
|
||||
className={`
|
||||
${
|
||||
expanded
|
||||
? 'db-MultiSelect-dropdown-arrow--up'
|
||||
: 'db-MultiSelect-dropdown-arrow--down'
|
||||
${expanded
|
||||
? 'db-MultiSelect-dropdown-arrow--up'
|
||||
: 'db-MultiSelect-dropdown-arrow--down'
|
||||
}
|
||||
${hasFocus &&
|
||||
'db-MultiSelect-dropdown-arrow-down--focused'}
|
||||
'db-MultiSelect-dropdown-arrow-down--focused'}
|
||||
`}
|
||||
/>
|
||||
</span>
|
||||
|
|
@ -174,10 +173,10 @@ class Dropdown extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
Dropdown.displayName = 'Dropdown';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
Dropdown.propTypes = {
|
||||
children: PropTypes.object,
|
||||
disabled: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import Multiselect from 'react-widgets/lib/Multiselect';
|
||||
|
||||
const errorStyle = {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(2307) FIXME: Cannot find module 'react-select-oneuptime' or its... Remove this comment to see the full error message
|
||||
|
||||
import Select from 'react-select-oneuptime';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const DefaultRenderer = ({
|
|||
onChange={onClick}
|
||||
checked={checked}
|
||||
disabled={disabled}
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
/>
|
||||
<span className="db-MultiSelect-renderer-label">{option.label}</span>
|
||||
|
|
@ -27,7 +27,7 @@ DefaultRenderer.displayName = 'DefaultRenderer';
|
|||
DefaultRenderer.propTypes = {
|
||||
checked: PropTypes.bool.isRequired,
|
||||
option: PropTypes.objectOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ label: PropTypes.Validator<str... Remove this comment to see the full error message
|
||||
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
}),
|
||||
|
|
@ -52,7 +52,7 @@ class SelectItem extends React.Component {
|
|||
}
|
||||
|
||||
onChecked = (e: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onSelectionChanged' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
const { onSelectionChanged } = this.props;
|
||||
const { checked } = e.target;
|
||||
|
||||
|
|
@ -60,13 +60,13 @@ class SelectItem extends React.Component {
|
|||
};
|
||||
|
||||
toggleChecked = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'checked' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { checked, onSelectionChanged } = this.props;
|
||||
onSelectionChanged(!checked);
|
||||
};
|
||||
|
||||
updateFocus() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'focused' does not exist on type '{ hover... Remove this comment to see the full error message
|
||||
|
||||
const { focused } = this.state;
|
||||
|
||||
if (focused && this.labelRef) {
|
||||
|
|
@ -88,7 +88,7 @@ class SelectItem extends React.Component {
|
|||
e.preventDefault();
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'option' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
const { option, checked, disabled, ItemRenderer, focused } = this.props;
|
||||
const { hovered } = this.state;
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ class SelectItem extends React.Component {
|
|||
aria-required="true"
|
||||
selected={checked}
|
||||
ref={ref => (this.labelRef = ref)}
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
className={`db-MultiSelect-select-container ${(hovered ||
|
||||
focused) &&
|
||||
|
|
@ -128,14 +128,14 @@ class SelectItem extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
SelectItem.displayName = 'SelectItem';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
SelectItem.propTypes = {
|
||||
checked: PropTypes.bool.isRequired,
|
||||
option: PropTypes.objectOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ label: PropTypes.Validator<str... Remove this comment to see the full error message
|
||||
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
key: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import SelectItem from './SelectItem';
|
|||
|
||||
class SelectList extends React.Component {
|
||||
handleSelectionChanged = (option: $TSFixMe, checked: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selected' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { selected, onSelectedChanged, disabled } = this.props;
|
||||
|
||||
if (disabled) return true;
|
||||
|
|
@ -24,17 +24,17 @@ class SelectList extends React.Component {
|
|||
|
||||
renderItems() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
options,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selected' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
selected,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'focusIndex' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
focusIndex,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onClick' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
onClick,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'ItemRenderer' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
ItemRenderer,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'disabled' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
disabled,
|
||||
} = this.props;
|
||||
return options.map((o: $TSFixMe, i: $TSFixMe) => (
|
||||
|
|
@ -43,7 +43,7 @@ class SelectList extends React.Component {
|
|||
style={{ listStyle: 'none' }}
|
||||
>
|
||||
<SelectItem
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
focused={focusIndex === 1}
|
||||
option={o}
|
||||
onSelectChanged={(c: $TSFixMe) => this.handleSelectionChanged(o, c)}
|
||||
|
|
@ -67,14 +67,14 @@ class SelectList extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
SelectList.displayName = 'SelectList';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
SelectList.propTypes = {
|
||||
selected: PropTypes.arrayOf(Object).isRequired,
|
||||
options: PropTypes.arrayOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ label: PropTypes.Validator<str... Remove this comment to see the full error message
|
||||
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
key: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'fuzz... Remove this comment to see the full error message
|
||||
|
||||
import { filterOptions as customFilterOptions } from 'fuzzy-match-utils';
|
||||
import SelectItem from './SelectItem';
|
||||
import SelectList from './SelectList';
|
||||
|
|
@ -14,9 +14,9 @@ class SelectPanel extends React.Component {
|
|||
focusIndex: 0,
|
||||
};
|
||||
|
||||
selectAll = () => {};
|
||||
selectAll = () => { };
|
||||
|
||||
selectNone = () => {};
|
||||
selectNone = () => { };
|
||||
|
||||
selectAllChanged = (checked: $TSFixMe) => {
|
||||
if (checked) this.selectAll();
|
||||
|
|
@ -66,14 +66,14 @@ class SelectPanel extends React.Component {
|
|||
};
|
||||
|
||||
allAreSelected() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { options, selected } = this.props;
|
||||
return options.length === selected.length;
|
||||
}
|
||||
|
||||
filteredOptions() {
|
||||
const { searchText } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { options, filterOptions } = this.props;
|
||||
|
||||
return customFilterOptions
|
||||
|
|
@ -83,7 +83,7 @@ class SelectPanel extends React.Component {
|
|||
|
||||
updateFocus(offset: $TSFixMe) {
|
||||
const { focusIndex } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { options } = this.props;
|
||||
|
||||
let tempFocus = focusIndex + offset;
|
||||
|
|
@ -95,15 +95,15 @@ class SelectPanel extends React.Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'ItemRenderer' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
ItemRenderer,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selectAllLabel' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
selectAllLabel,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'disabled' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
disabled,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'disableSearch' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
disableSearch,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hasSelectAll' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
hasSelectAll,
|
||||
} = this.props;
|
||||
const { focusIndex, searchHasFocus } = this.state;
|
||||
|
|
@ -134,7 +134,7 @@ class SelectPanel extends React.Component {
|
|||
)}
|
||||
{hasSelectAll && (
|
||||
<SelectItem
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
focused={focusIndex === 0}
|
||||
checked={this.allAreSelected}
|
||||
option={selectAllOption}
|
||||
|
|
@ -147,7 +147,7 @@ class SelectPanel extends React.Component {
|
|||
|
||||
<SelectList
|
||||
{...this.props}
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
options={this.filteredOptions()}
|
||||
focusIndex={focusIndex - 1}
|
||||
onClick={(e: $TSFixMe, index: $TSFixMe) => this.handleItemClicked(index + 1)}
|
||||
|
|
@ -159,14 +159,14 @@ class SelectPanel extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
SelectPanel.displayName = 'SelectPanel';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
SelectPanel.propTypes = {
|
||||
ItemRenderer: PropTypes.element,
|
||||
options: PropTypes.arrayOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ label: PropTypes.Validator<str... Remove this comment to see the full error message
|
||||
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
key: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class MultiSelect extends Component {
|
|||
state = {};
|
||||
|
||||
getSelectedText() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { options, selected } = this.props;
|
||||
const selectedOptions = selected.map((s: $TSFixMe) => options.find((o: $TSFixMe) => o.value === s)
|
||||
);
|
||||
|
|
@ -16,7 +16,7 @@ class MultiSelect extends Component {
|
|||
}
|
||||
|
||||
renderHeader() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { options, selected, valueRenderer } = this.props;
|
||||
|
||||
const noneSelected = selected.length === 0;
|
||||
|
|
@ -42,7 +42,7 @@ class MultiSelect extends Component {
|
|||
}
|
||||
|
||||
handleSelectedChange = (selected: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'onSelectedChanged' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
const { onSelectedChanged, disabled } = this.props;
|
||||
|
||||
if (disabled) {
|
||||
|
|
@ -55,32 +55,32 @@ class MultiSelect extends Component {
|
|||
};
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'ItemRenderer' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
ItemRenderer,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
options,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selected' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
selected,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selectAllLabel' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
selectAllLabel,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isLoading' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
isLoading,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'disabled' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
disabled,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'disableSearch' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
disableSearch,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'filterOptions' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
filterOptions,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'shouldToggleHover' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
shouldToggleHover,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hasSelectAll' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
hasSelectAll,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<div className="db-MultiSelect">
|
||||
<Dropdown
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
|
||||
isLoading={isLoading}
|
||||
ContentComponent={SelectPanel}
|
||||
shouldToggleHover={shouldToggleHover}
|
||||
|
|
@ -104,23 +104,23 @@ class MultiSelect extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
MultiSelect.displayName = 'MultiSelect';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'defaultProps' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
MultiSelect.defaultProps = {
|
||||
hasSelectAll: true,
|
||||
shouldToggleHover: false,
|
||||
selected: [],
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
MultiSelect.propTypes = {
|
||||
selected: PropTypes.arrayOf(Object),
|
||||
options: PropTypes.arrayOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ option: PropTypes.Requireable<... Remove this comment to see the full error message
|
||||
|
||||
option: PropTypes.objectOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ label: PropTypes.Validator<str... Remove this comment to see the full error message
|
||||
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
key: PropTypes.string,
|
||||
|
|
@ -129,7 +129,7 @@ MultiSelect.propTypes = {
|
|||
valueRenderer: {
|
||||
selected: PropTypes.any,
|
||||
options: PropTypes.arrayOf({
|
||||
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ label: PropTypes.Validator<str... Remove this comment to see the full error message
|
||||
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
key: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import NavItem from './SideNavItem';
|
|||
import { allRoutes, groups } from '../../routes';
|
||||
import { openModal, closeModal } from '../../actions/modal';
|
||||
import { closeSideNav } from '../../actions/page';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { withRouter, Switch, Route } from 'react-router-dom';
|
||||
|
||||
class SideNav extends Component {
|
||||
|
|
@ -23,20 +23,18 @@ class SideNav extends Component {
|
|||
|
||||
render() {
|
||||
return (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeSideNav' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
<ClickOutside onClickOutside={this.props.closeSideNav}>
|
||||
<div
|
||||
onKeyDown={this.handleKeyBoard}
|
||||
className={`db-World-sideNavContainer${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'sidenavopen' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
this.props.sidenavopen ? ' open' : ''
|
||||
}`}
|
||||
className={`db-World-sideNavContainer${this.props.sidenavopen ? ' open' : ''
|
||||
}`}
|
||||
>
|
||||
<div className="db-SideNav-container Box-root Box-background--surface Flex-flex Flex-direction--column Padding-top--20 Padding-right--2">
|
||||
<div className="Box-root Margin-bottom--20">
|
||||
<div>
|
||||
<div>
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
<div tabIndex="-1" id="AccountSwitcherId">
|
||||
<div className="db-AccountSwitcherX-button Box-root Flex-flex Flex-alignItems--center">
|
||||
<div className="Box-root Margin-right--8">
|
||||
|
|
@ -78,7 +76,7 @@ class SideNav extends Component {
|
|||
|
||||
<div className="db-SideNav-navSections Box-root Flex-flex Flex-alignItems--stretch Flex-direction--column Flex-justifyContent--flexStaIt">
|
||||
{groups
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isPublic' does not exist on type '{ grou... Remove this comment to see the full error message
|
||||
|
||||
.filter(group => !group.isPublic)
|
||||
.filter(group => group.visible)
|
||||
.map((group, index, array) => {
|
||||
|
|
@ -113,16 +111,16 @@ class SideNav extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
SideNav.displayName = 'SideNav';
|
||||
|
||||
const mapStateToProps = function(state: $TSFixMe) {
|
||||
const mapStateToProps = function (state: $TSFixMe) {
|
||||
return {
|
||||
sidenavopen: state.page.sidenavopen,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = function(dispatch: $TSFixMe) {
|
||||
const mapDispatchToProps = function (dispatch: $TSFixMe) {
|
||||
return bindActionCreators(
|
||||
{
|
||||
openModal,
|
||||
|
|
@ -133,12 +131,12 @@ const mapDispatchToProps = function(dispatch: $TSFixMe) {
|
|||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
SideNav.propTypes = {
|
||||
closeSideNav: PropTypes.func,
|
||||
sidenavopen: PropTypes.bool,
|
||||
};
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
SideNav.contextTypes = {};
|
||||
|
||||
// since sideNav is above page routes we have no access to the pages' props.match,
|
||||
|
|
@ -152,7 +150,7 @@ const WrappedSideNav = (props: $TSFixMe) => {
|
|||
.map((route, index) => {
|
||||
return (
|
||||
<Route
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'exact' does not exist on type '{ title: ... Remove this comment to see the full error message
|
||||
|
||||
exact={route.exact}
|
||||
path={route.path}
|
||||
key={index}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import { Link, withRouter } from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -16,7 +16,7 @@ export class SidebarNavItem extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'route' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { route } = this.props;
|
||||
navKeyBind(route);
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ export class SidebarNavItem extends Component {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'route' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { route } = this.props;
|
||||
cleanBind(route);
|
||||
|
||||
|
|
@ -52,13 +52,11 @@ export class SidebarNavItem extends Component {
|
|||
<div className="Box-root Flex-flex Flex-alignItems--center tooltip">
|
||||
<div className="Box-root Flex-flex Flex-alignItems--center Margin-right--12">
|
||||
<span
|
||||
className={`db-SideNav-icon db-SideNav-icon--${
|
||||
route.icon
|
||||
} ${
|
||||
isLinkActive
|
||||
className={`db-SideNav-icon db-SideNav-icon--${route.icon
|
||||
} ${isLinkActive
|
||||
? 'db-SideNav-icon--selected'
|
||||
: null
|
||||
}`}
|
||||
}`}
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
|
|
@ -86,7 +84,7 @@ export class SidebarNavItem extends Component {
|
|||
|
||||
render() {
|
||||
const { RenderListItems } = this;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'route' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { route, location, match, loadPage } = this.props;
|
||||
const path = route.path;
|
||||
const isLinkActive =
|
||||
|
|
@ -105,7 +103,7 @@ export class SidebarNavItem extends Component {
|
|||
};
|
||||
|
||||
return (
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ position: string; }' is not assignable to ... Remove this comment to see the full error message
|
||||
|
||||
<div id={this.camalize(route.title)} style={routeStyle}>
|
||||
<ShouldRender if={!route.invisible}>
|
||||
<ShouldRender if={route.external}>
|
||||
|
|
@ -144,7 +142,7 @@ export class SidebarNavItem extends Component {
|
|||
active,
|
||||
onLoad
|
||||
}: $TSFixMe) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'route' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
return this.props.route.subRoutes.map((child: $TSFixMe, index: $TSFixMe) => {
|
||||
const routes = child.shortcut && child.shortcut.split('+');
|
||||
|
||||
|
|
@ -154,7 +152,7 @@ export class SidebarNavItem extends Component {
|
|||
if (child.visible) {
|
||||
const link = child.path.replace(
|
||||
':userId',
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'match' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
this.props.match.params.userId
|
||||
);
|
||||
return (
|
||||
|
|
@ -199,14 +197,14 @@ export class SidebarNavItem extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
SidebarNavItem.displayName = 'SidebarNavItem';
|
||||
|
||||
const mapStateToProps = () => ({});
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ loadPage }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
SidebarNavItem.propTypes = {
|
||||
match: PropTypes.object.isRequired,
|
||||
location: PropTypes.object.isRequired,
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@ import { getProbes } from '../../actions/probe';
|
|||
|
||||
class TopContent extends Component {
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'getVersion' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { getVersion } = this.props;
|
||||
getVersion();
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'getProbes' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.getProbes(0, 10);
|
||||
}
|
||||
showProfileMenu = (e: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'showProfileMenu' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
this.props.showProfileMenu(e.clientX);
|
||||
};
|
||||
|
||||
showNotificationsMenu = (e: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openNotificationMenu' does not exist on ... Remove this comment to see the full error message
|
||||
|
||||
this.props.openNotificationMenu(e.clientX);
|
||||
};
|
||||
|
||||
|
|
@ -38,22 +38,22 @@ class TopContent extends Component {
|
|||
|
||||
render() {
|
||||
const IMG_URL =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'profilePic' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.profilePic && this.props.profilePic !== ''
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'profilePic' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
? `url(${API_URL}/file/${this.props.profilePic})`
|
||||
: 'url(https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y)';
|
||||
const userId = User.getUserId();
|
||||
let count = 0;
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.notifications &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.notifications.notifications &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.notifications.notifications.length
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.notifications.notifications.map((notification: $TSFixMe) => {
|
||||
if (notification.read.indexOf(userId) > -1) {
|
||||
return notification;
|
||||
|
|
@ -66,14 +66,14 @@ class TopContent extends Component {
|
|||
|
||||
return (
|
||||
<div
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="0"
|
||||
onKeyDown={this.handleKeyBoard}
|
||||
style={{ zIndex: '2' }}
|
||||
className="db-World-topContent Box-root Box-background--surface Padding-vertical--20"
|
||||
>
|
||||
<div className="Box-root Flex-flex Flex-alignItems--center Flex-justifyContent--spaceBetween">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openSideNav' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
<div className="Box-root" onClick={this.props.openSideNav}>
|
||||
<div className="db-MenuContainer">
|
||||
<div
|
||||
|
|
@ -89,7 +89,7 @@ class TopContent extends Component {
|
|||
<div className="Box-root Flex-flex">
|
||||
<div>
|
||||
<div
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
style={{ outline: 'none', marginRight: '15px' }}
|
||||
>
|
||||
|
|
@ -113,7 +113,7 @@ class TopContent extends Component {
|
|||
className="bs-Button bs-DeprecatedButton db-UserMenuX"
|
||||
id="profile-menu"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
onClick={this.showProfileMenu}
|
||||
>
|
||||
|
|
@ -135,7 +135,7 @@ class TopContent extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
TopContent.displayName = 'TopContent';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -155,7 +155,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators(
|
|||
dispatch
|
||||
);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
TopContent.propTypes = {
|
||||
getVersion: PropTypes.func,
|
||||
openSideNav: PropTypes.func,
|
||||
|
|
@ -174,7 +174,7 @@ TopContent.propTypes = {
|
|||
getProbes: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
TopContent.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TopContent);
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ import moment from 'moment';
|
|||
class NotificationMenu extends Component {
|
||||
render() {
|
||||
const userId = User.getUserId();
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'visible' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
return this.props.visible ? (
|
||||
<div
|
||||
className="notifications ContextualLayer-layer--topright ContextualLayer-layer--anytop ContextualLayer-layer--anyright ContextualLayer-context--bottom ContextualLayer-context--anybottom ContextualLayer-container ContextualLayer--pointerEvents"
|
||||
style={{
|
||||
top: '49px',
|
||||
width: '450px',
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'position' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
left: this.props.position
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'position' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
? `${this.props.position - 391.5}px`
|
||||
: 'unset',
|
||||
right: '40px',
|
||||
|
|
@ -65,14 +65,14 @@ class NotificationMenu extends Component {
|
|||
</div>
|
||||
</div>
|
||||
<div className="Box-root Padding-vertical--8">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
{this.props.notifications &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
this.props.notifications.notifications &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
this.props.notifications.notifications
|
||||
.length ? (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'notifications' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.notifications.notifications &&
|
||||
|
||||
this.props.notifications.notifications
|
||||
.length ? (
|
||||
|
||||
this.props.notifications.notifications.map(
|
||||
(notification: $TSFixMe, key: $TSFixMe) => {
|
||||
return (
|
||||
|
|
@ -97,11 +97,10 @@ class NotificationMenu extends Component {
|
|||
>
|
||||
<div className="Notify-oneuptime">
|
||||
<img
|
||||
src={`/dashboard/assets/img/${
|
||||
notification.icon
|
||||
src={`/dashboard/assets/img/${notification.icon
|
||||
? notification.icon
|
||||
: 'information'
|
||||
}.svg`}
|
||||
}.svg`}
|
||||
className="Notify-oneuptime-row-primary"
|
||||
style={{
|
||||
height:
|
||||
|
|
@ -157,7 +156,7 @@ class NotificationMenu extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
NotificationMenu.displayName = 'NotificationMenu';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -171,7 +170,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
|||
return bindActionCreators({}, dispatch);
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
NotificationMenu.propTypes = {
|
||||
visible: PropTypes.bool,
|
||||
notifications: PropTypes.oneOfType([
|
||||
|
|
@ -183,7 +182,7 @@ NotificationMenu.propTypes = {
|
|||
position: PropTypes.number,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
NotificationMenu.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(NotificationMenu);
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import React, { Component } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -22,16 +22,16 @@ class ProbeAddModal extends Component {
|
|||
}
|
||||
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'addProbe' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { addProbe, closeThisDialog, resetAddProbe } = this.props;
|
||||
addProbe(values.probe_key, values.probe_name).then(
|
||||
function(val: $TSFixMe) {
|
||||
function (val: $TSFixMe) {
|
||||
if (val === 'ok') {
|
||||
resetAddProbe();
|
||||
closeThisDialog();
|
||||
}
|
||||
},
|
||||
function() {
|
||||
function () {
|
||||
//do nothing.
|
||||
}
|
||||
);
|
||||
|
|
@ -40,9 +40,9 @@ class ProbeAddModal extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetAddProbe' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
this.props.resetAddProbe();
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -51,22 +51,22 @@ class ProbeAddModal extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
handleSubmit,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
closeThisDialog,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'addProbeState' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
addProbeState,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
probes,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetAddProbe' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
resetAddProbe,
|
||||
} = this.props;
|
||||
const disabled = addProbeState.requesting || probes.requesting;
|
||||
return (
|
||||
<div
|
||||
className="ModalLayer-contents"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
style={{ marginTop: '40px' }}
|
||||
>
|
||||
|
|
@ -228,7 +228,7 @@ class ProbeAddModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProbeAddModal.displayName = 'ProbeAddFormModal';
|
||||
|
||||
const ProbeAddModalForm = reduxForm({
|
||||
|
|
@ -246,7 +246,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProbeAddModal.propTypes = {
|
||||
addProbe: PropTypes.func,
|
||||
addProbeState: PropTypes.object,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { bindActionCreators } from 'redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { Spinner } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -21,7 +21,7 @@ class ProbeDeleteModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
return this.handleDelete();
|
||||
|
|
@ -31,7 +31,7 @@ class ProbeDeleteModal extends Component {
|
|||
};
|
||||
|
||||
handleDelete = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
const { error, modalId, closeModal, deleteProbe, probeId } = this.props;
|
||||
deleteProbe(probeId).then(() => {
|
||||
if (!error) {
|
||||
|
|
@ -41,7 +41,7 @@ class ProbeDeleteModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting, error, closeThisDialog } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -137,7 +137,7 @@ class ProbeDeleteModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProbeDeleteModal.displayName = 'ProbeDeleteModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -157,7 +157,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ closeModal, deleteProbe }, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProbeDeleteModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import ShouldRender from '../basic/ShouldRender';
|
|||
import { openModal, closeModal } from '../../actions/modal';
|
||||
import { updateProbe } from '../../actions/probe';
|
||||
import ProbeDeleteModal from './ProbeDeleteModal';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm, Field } from 'redux-form';
|
||||
import { UploadFile } from '../basic/UploadFile';
|
||||
import { API_URL } from '../../config';
|
||||
|
|
@ -19,15 +19,15 @@ import { API_URL } from '../../config';
|
|||
export class ProbeList extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
this.state = { deleteModalId: uuidv4(), selectedProbe: '' };
|
||||
}
|
||||
|
||||
handleClick = (probeId: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { deleteModalId } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
id: deleteModalId,
|
||||
content: ProbeDeleteModal,
|
||||
|
|
@ -48,7 +48,7 @@ export class ProbeList extends Component {
|
|||
try {
|
||||
reader.readAsDataURL(file);
|
||||
const data = { id: probe._id, probeImage: file };
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'updateProbe' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.updateProbe(data);
|
||||
} catch (error) {
|
||||
return;
|
||||
|
|
@ -56,18 +56,18 @@ export class ProbeList extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedProbe' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { selectedProbe } = this.state;
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'probes' does not exist on type 'Readonly... Remove this comment to see the full error message
|
||||
|
||||
probes,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteRequesting' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
deleteRequesting,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'probeRequesting' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
probeRequesting,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'addRequesting' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
addRequesting,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'updateRequesting' does not exist on type... Remove this comment to see the full error message
|
||||
|
||||
updateRequesting,
|
||||
} = this.props;
|
||||
if (probes && probes.skip && typeof probes.skip === 'string') {
|
||||
|
|
@ -174,8 +174,8 @@ export class ProbeList extends Component {
|
|||
</tr>
|
||||
</Fragment>
|
||||
) : probes &&
|
||||
probes.data &&
|
||||
probes.data.length > 0 ? (
|
||||
probes.data &&
|
||||
probes.data.length > 0 ? (
|
||||
probes.data.map((probe: $TSFixMe) => {
|
||||
const fileData =
|
||||
probe && probe.probeImage
|
||||
|
|
@ -190,7 +190,7 @@ export class ProbeList extends Component {
|
|||
style={{
|
||||
width: '25px',
|
||||
height: '25px',
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'false | "0.3"' is not assignable to type 'Op... Remove this comment to see the full error message
|
||||
|
||||
opacity:
|
||||
!probe.probeImage && '0.3',
|
||||
}}
|
||||
|
|
@ -245,10 +245,10 @@ export class ProbeList extends Component {
|
|||
<span>
|
||||
{probe.lastAlive
|
||||
? moment(
|
||||
probe.lastAlive
|
||||
).format(
|
||||
'dddd, MMMM Do YYYY, h:mm a'
|
||||
)
|
||||
probe.lastAlive
|
||||
).format(
|
||||
'dddd, MMMM Do YYYY, h:mm a'
|
||||
)
|
||||
: ''}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -301,7 +301,7 @@ export class ProbeList extends Component {
|
|||
'flex-end',
|
||||
}}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'true' is not assignable to type 'FormEventHa... Remove this comment to see the full error message
|
||||
|
||||
<form onSubmit>
|
||||
<div className="bs-Button bs-DeprecatedButton Margin-left--8">
|
||||
<ShouldRender
|
||||
|
|
@ -342,9 +342,9 @@ export class ProbeList extends Component {
|
|||
disabled={
|
||||
updateRequesting &&
|
||||
selectedProbe ===
|
||||
probe.id
|
||||
probe.id
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
|
||||
|
||||
fileInputKey={Math.round()}
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -395,9 +395,9 @@ export class ProbeList extends Component {
|
|||
</div>
|
||||
<div style={{ textAlign: 'center', marginTop: '10px' }}>
|
||||
{probes &&
|
||||
(!probes.data || !probes.data.length) &&
|
||||
!probes.requesting &&
|
||||
!probes.error
|
||||
(!probes.data || !probes.data.length) &&
|
||||
!probes.requesting &&
|
||||
!probes.error
|
||||
? "We don't have any probes yet"
|
||||
: null}
|
||||
{probes && probes.error ? probes.error : null}
|
||||
|
|
@ -408,15 +408,12 @@ export class ProbeList extends Component {
|
|||
<span>
|
||||
<span className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap">
|
||||
{probes && probes.count
|
||||
? `Page ${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
this.props.page
|
||||
} of ${numberOfPages} (${probes &&
|
||||
probes.count} Probe${
|
||||
probes && probes.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
})`
|
||||
? `Page ${this.props.page
|
||||
} of ${numberOfPages} (${probes &&
|
||||
probes.count} Probe${probes && probes.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
})`
|
||||
: null}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -428,7 +425,7 @@ export class ProbeList extends Component {
|
|||
<button
|
||||
id="btnPrev"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'prevClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.prevClicked(
|
||||
probes.skip,
|
||||
probes.limit
|
||||
|
|
@ -453,7 +450,7 @@ export class ProbeList extends Component {
|
|||
<button
|
||||
id="btnNext"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'nextClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.nextClicked(
|
||||
probes.skip,
|
||||
probes.limit
|
||||
|
|
@ -498,10 +495,10 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProbeList.displayName = 'ProbeList';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProbeList.propTypes = {
|
||||
addRequesting: PropTypes.bool,
|
||||
deleteRequesting: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
|||
import { User } from '../../config';
|
||||
import { hideProfileMenu } from '../../actions/profile';
|
||||
import { logoutUser } from '../../actions/logout';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import About from '../modals/About';
|
||||
import { openModal, closeModal } from '../../actions/modal';
|
||||
|
|
@ -17,17 +17,17 @@ export class ProfileMenu extends Component {
|
|||
}
|
||||
|
||||
logout() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'logoutUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { logoutUser } = this.props;
|
||||
logoutUser();
|
||||
}
|
||||
|
||||
showAboutModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'hideProfileMenu' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
this.props.hideProfileMenu();
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'aboutId' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
id: this.state.aboutId,
|
||||
onClose: () => '',
|
||||
content: About,
|
||||
|
|
@ -44,7 +44,7 @@ export class ProfileMenu extends Component {
|
|||
|
||||
handleShortcut = (event: $TSFixMe) => {
|
||||
// Only execute keyboard shortcut when profile menu is open
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'visible' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
if (this.props.visible) {
|
||||
if (event.key === 'a' || event.key === 'A') {
|
||||
this.showAboutModal();
|
||||
|
|
@ -56,16 +56,16 @@ export class ProfileMenu extends Component {
|
|||
const name = User.getName();
|
||||
const email = User.getEmail();
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'visible' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
return this.props.visible ? (
|
||||
<div
|
||||
className="ContextualLayer-layer--topright ContextualLayer-layer--anytop ContextualLayer-layer--anyright ContextualLayer-context--bottom ContextualLayer-context--anybottom ContextualLayer-container ContextualLayer--pointerEvents"
|
||||
style={{
|
||||
top: '49px',
|
||||
width: '232px',
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'position' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
left: this.props.position
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'position' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
? `${this.props.position - 214.25}px`
|
||||
: 'unset',
|
||||
right: '40px',
|
||||
|
|
@ -168,7 +168,7 @@ export class ProfileMenu extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProfileMenu.displayName = 'ProfileMenu';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -184,7 +184,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
|||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProfileMenu.propTypes = {
|
||||
visible: PropTypes.bool,
|
||||
logoutUser: PropTypes.func.isRequired,
|
||||
|
|
@ -193,7 +193,7 @@ ProfileMenu.propTypes = {
|
|||
hideProfileMenu: PropTypes.func,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProfileMenu.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ProfileMenu);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
|
|
@ -15,7 +15,7 @@ import ShouldRender from '../basic/ShouldRender';
|
|||
|
||||
class DeleteDomain extends Component {
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetDeleteProjectDomain' does not exist... Remove this comment to see the full error message
|
||||
|
||||
this.props.resetDeleteProjectDomain();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
|
@ -35,22 +35,22 @@ class DeleteDomain extends Component {
|
|||
}
|
||||
};
|
||||
handleCloseModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.domainId,
|
||||
});
|
||||
};
|
||||
|
||||
handleDelete = () => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteProjectDomain' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
deleteProjectDomain,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
data: { projectId, domainId },
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteError' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
deleteError,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
fetchProjectDomains,
|
||||
} = this.props;
|
||||
deleteProjectDomain({ projectId, domainId }).then(() => {
|
||||
|
|
@ -61,7 +61,7 @@ class DeleteDomain extends Component {
|
|||
});
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting, deleteError } = this.props;
|
||||
return (
|
||||
<div className="ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
|
|
@ -166,10 +166,10 @@ class DeleteDomain extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
DeleteDomain.displayName = 'DeleteDomain';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
DeleteDomain.propTypes = {
|
||||
closeModal: PropTypes.func,
|
||||
deleteProjectDomain: PropTypes.func,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { renewAlertLimit } from '../../actions/project';
|
|||
export class ProjectAlertLimitBox extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
this.state = {
|
||||
alertLimit:
|
||||
|
|
@ -25,15 +25,15 @@ export class ProjectAlertLimitBox extends Component {
|
|||
};
|
||||
|
||||
handleClick = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'renewAlertLimit' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
const { renewAlertLimit, project } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'alertLimit' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { alertLimit } = this.state;
|
||||
renewAlertLimit(project._id, alertLimit);
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { requesting } = this.props;
|
||||
return (
|
||||
<div className="Box-root Margin-bottom--12">
|
||||
|
|
@ -66,7 +66,7 @@ export class ProjectAlertLimitBox extends Component {
|
|||
placeholder="100"
|
||||
value={
|
||||
this.state
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'alertLimit' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
.alertLimit
|
||||
}
|
||||
onChange={this.onChange}
|
||||
|
|
@ -103,7 +103,7 @@ export class ProjectAlertLimitBox extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectAlertLimitBox.displayName = 'ProjectAlertLimitBox';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ renewAlertLimit }, dispatch);
|
||||
|
|
@ -119,14 +119,14 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectAlertLimitBox.propTypes = {
|
||||
project: PropTypes.object,
|
||||
renewAlertLimit: PropTypes.func,
|
||||
requesting: PropTypes.bool,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProjectAlertLimitBox.contextTypes = {};
|
||||
|
||||
export default connect(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm, Field, reset } from 'redux-form';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import { Validate } from '../../config';
|
||||
|
|
@ -11,7 +11,7 @@ import { RenderField } from '../basic/RenderField';
|
|||
import PropTypes from 'prop-types';
|
||||
import { openModal } from '../../actions/modal';
|
||||
import MessageBox from '../modals/MessageBox';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import ConfirmBalanceTopUp from '../modals/ConfirmBalanceTopUp';
|
||||
import DataPathHoC from '../DataPathHoC';
|
||||
|
|
@ -20,13 +20,13 @@ function validate(value: $TSFixMe) {
|
|||
const errors = {};
|
||||
|
||||
if (!Validate.text(value.rechargeBalanceAmount)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'rechargeBalanceAmount' does not exist on... Remove this comment to see the full error message
|
||||
|
||||
errors.rechargeBalanceAmount = 'Amount is required';
|
||||
} else if (!Validate.number(value.rechargeBalanceAmount)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'rechargeBalanceAmount' does not exist on... Remove this comment to see the full error message
|
||||
|
||||
errors.rechargeBalanceAmount = 'Enter a valid number';
|
||||
} else if (!Validate.numberGreaterThanZero(value.rechargeBalanceAmount)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'rechargeBalanceAmount' does not exist on... Remove this comment to see the full error message
|
||||
|
||||
errors.rechargeBalanceAmount = 'Enter a valid number greater than 0';
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class ProjectBalance extends Component {
|
|||
createTopUpModalId: uuidv4(),
|
||||
};
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { openModal } = this.props;
|
||||
|
||||
const { createTopUpModalId } = this.state;
|
||||
|
|
@ -51,14 +51,14 @@ class ProjectBalance extends Component {
|
|||
onConfirm: () => this.updateProjectBalance(values),
|
||||
content: DataPathHoC(ConfirmBalanceTopUp, {
|
||||
amount: values.rechargeBalanceAmount,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
isRequesting: this.props.isRequesting,
|
||||
}),
|
||||
});
|
||||
}
|
||||
};
|
||||
updateProjectBalance = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'updateBalance' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { updateBalance, projectId, openModal } = this.props;
|
||||
const { MessageBoxId } = this.state;
|
||||
return updateBalance(projectId, values.rechargeBalanceAmount)
|
||||
|
|
@ -84,7 +84,7 @@ class ProjectBalance extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'balance' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { balance } = this.props;
|
||||
return (
|
||||
<div className="Box-root Margin-vertical--12">
|
||||
|
|
@ -106,7 +106,7 @@ class ProjectBalance extends Component {
|
|||
</div>
|
||||
</div>
|
||||
<form
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
onSubmit={this.props.handleSubmit(
|
||||
this.submitForm
|
||||
)}
|
||||
|
|
@ -226,7 +226,7 @@ class ProjectBalance extends Component {
|
|||
required="required"
|
||||
disabled={
|
||||
this.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
.isRequesting
|
||||
}
|
||||
/>
|
||||
|
|
@ -241,21 +241,21 @@ class ProjectBalance extends Component {
|
|||
id="rechargeAccount"
|
||||
className="bs-Button bs-Button--blue"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
this.props.isRequesting
|
||||
}
|
||||
type="submit"
|
||||
>
|
||||
<ShouldRender
|
||||
if={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
!this.props.isRequesting
|
||||
}
|
||||
>
|
||||
<span>Update Balance</span>
|
||||
</ShouldRender>
|
||||
<ShouldRender
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
if={this.props.isRequesting}
|
||||
>
|
||||
<FormLoader />
|
||||
|
|
@ -273,10 +273,10 @@ class ProjectBalance extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectBalance.displayName = 'ProjectBalance';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectBalance.propTypes = {
|
||||
updateBalance: PropTypes.func.isRequired,
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
|
|
@ -13,18 +13,18 @@ import { openModal, closeModal } from '../../actions/modal';
|
|||
export class ProjectBlockBox extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
this.state = { blockModalId: uuidv4() };
|
||||
}
|
||||
|
||||
handleClick = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'blockProject' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { blockProject, project } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'blockModalId' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { blockModalId } = this.state;
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
id: blockModalId,
|
||||
onConfirm: () => {
|
||||
|
|
@ -37,7 +37,7 @@ export class ProjectBlockBox extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeModal({ id: this.state.blockModalId });
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -45,7 +45,7 @@ export class ProjectBlockBox extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -92,7 +92,7 @@ export class ProjectBlockBox extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectBlockBox.displayName = 'ProjectBlockBox';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ blockProject, openModal, closeModal }, dispatch);
|
||||
|
|
@ -108,7 +108,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectBlockBox.propTypes = {
|
||||
isRequesting: PropTypes.oneOf([null, undefined, true, false]),
|
||||
project: PropTypes.object.isRequired,
|
||||
|
|
@ -117,7 +117,7 @@ ProjectBlockBox.propTypes = {
|
|||
openModal: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProjectBlockBox.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ProjectBlockBox);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { Spinner } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -18,10 +18,10 @@ class ProjectBlockModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.confirmThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -30,13 +30,13 @@ class ProjectBlockModal extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
isRequesting,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
error,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
confirmThisDialog,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
closeThisDialog,
|
||||
} = this.props;
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ class ProjectBlockModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectBlockModal.displayName = 'ProjectBlockModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -149,7 +149,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectBlockModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
|
|
@ -13,18 +13,18 @@ import { openModal, closeModal } from '../../actions/modal';
|
|||
export class ProjectDeleteBox extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
this.state = { deleteModalId: uuidv4() };
|
||||
}
|
||||
|
||||
handleClick = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteProject' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { deleteProject, project } = this.props;
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteModalId' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
const { deleteModalId } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
id: deleteModalId,
|
||||
onConfirm: () => {
|
||||
|
|
@ -37,7 +37,7 @@ export class ProjectDeleteBox extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeModal({ id: this.state.deleteModalId });
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -45,7 +45,7 @@ export class ProjectDeleteBox extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -92,7 +92,7 @@ export class ProjectDeleteBox extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectDeleteBox.displayName = 'ProjectDeleteBox';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ deleteProject, openModal, closeModal }, dispatch);
|
||||
|
|
@ -108,7 +108,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectDeleteBox.propTypes = {
|
||||
isRequesting: PropTypes.oneOf([null, undefined, true, false]),
|
||||
project: PropTypes.object.isRequired,
|
||||
|
|
@ -117,7 +117,7 @@ ProjectDeleteBox.propTypes = {
|
|||
openModal: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProjectDeleteBox.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ProjectDeleteBox);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { Spinner } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -18,10 +18,10 @@ class ProjectDeleteModal extends Component {
|
|||
handleKeyboard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.closeThisDialog();
|
||||
case 'Enter':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
return this.props.confirmThisDialog();
|
||||
default:
|
||||
return false;
|
||||
|
|
@ -30,13 +30,13 @@ class ProjectDeleteModal extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
isRequesting,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
error,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'confirmThisDialog' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
confirmThisDialog,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
closeThisDialog,
|
||||
} = this.props;
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ class ProjectDeleteModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectDeleteModal.displayName = 'ProjectDeleteModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -149,7 +149,7 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectDeleteModal.propTypes = {
|
||||
isRequesting: PropTypes.oneOfType([
|
||||
PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export class ProjectDetails extends Component {
|
|||
type="submit"
|
||||
style={{ float: 'right' }}
|
||||
onClick={() =>
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'Location'... Remove this comment to see the full error message
|
||||
|
||||
(window.location = `${DASHBOARD_URL}/project/${this.props.project.slug}`)
|
||||
}
|
||||
>
|
||||
|
|
@ -68,14 +68,14 @@ export class ProjectDetails extends Component {
|
|||
marginTop: '6px',
|
||||
}}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
{this.props.project !==
|
||||
null &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
this.props.project.name
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.project.name
|
||||
|
||||
? this.props.project
|
||||
.name
|
||||
.name
|
||||
: 'LOADING...'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -108,14 +108,14 @@ export class ProjectDetails extends Component {
|
|||
marginTop: '6px',
|
||||
}}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
{this.props.project !==
|
||||
null &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
this.props.project._id
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.project._id
|
||||
|
||||
? this.props.project
|
||||
._id
|
||||
._id
|
||||
: 'LOADING...'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -148,15 +148,15 @@ export class ProjectDetails extends Component {
|
|||
marginTop: '6px',
|
||||
}}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
{this.props.project !==
|
||||
null &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
this.props.project
|
||||
.apiKey
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
this.props.project
|
||||
.apiKey
|
||||
|
||||
? this.props.project
|
||||
.apiKey
|
||||
.apiKey
|
||||
: 'LOADING...'}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -194,57 +194,55 @@ export class ProjectDetails extends Component {
|
|||
>
|
||||
{
|
||||
<div
|
||||
className={`Badge Badge--color--${
|
||||
this.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
className={`Badge Badge--color--${this.props
|
||||
|
||||
.project
|
||||
.deleted
|
||||
? 'red'
|
||||
: this
|
||||
.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
.project
|
||||
.isBlocked
|
||||
? 'yellow'
|
||||
: 'green'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
.props
|
||||
|
||||
.project
|
||||
.isBlocked
|
||||
? 'yellow'
|
||||
: 'green'
|
||||
} Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2`}
|
||||
>
|
||||
<span
|
||||
className={`Badge-text Text-color--${
|
||||
this
|
||||
className={`Badge-text Text-color--${this
|
||||
.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
.project
|
||||
.deleted
|
||||
? 'red'
|
||||
: this
|
||||
.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
.project
|
||||
.isBlocked
|
||||
? 'yellow'
|
||||
: 'green'
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
.props
|
||||
|
||||
.project
|
||||
.isBlocked
|
||||
? 'yellow'
|
||||
: 'green'
|
||||
} Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap`}
|
||||
>
|
||||
<span>
|
||||
{this
|
||||
.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
.project !==
|
||||
null
|
||||
null
|
||||
? this
|
||||
.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
.project
|
||||
.deleted
|
||||
.props
|
||||
|
||||
.project
|
||||
.deleted
|
||||
? 'Deleted'
|
||||
: this
|
||||
.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
.project
|
||||
.isBlocked
|
||||
? 'Blocked'
|
||||
: 'Active'
|
||||
.props
|
||||
|
||||
.project
|
||||
.isBlocked
|
||||
? 'Blocked'
|
||||
: 'Active'
|
||||
: 'LOADING...'}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -270,7 +268,7 @@ export class ProjectDetails extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectDetails.displayName = 'ProjectDetails';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => {
|
||||
|
|
@ -283,12 +281,12 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({}, dispatch);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectDetails.propTypes = {
|
||||
project: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProjectDetails.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ProjectDetails);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { bindActionCreators } from 'redux';
|
|||
import { openModal } from '../../actions/modal';
|
||||
import DeleteDomain from './DeleteDomain';
|
||||
import DataPathHoC from '../DataPathHoC';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { ListLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -17,7 +17,7 @@ import ProjectResetDomain from './ProjectResetDomain';
|
|||
class ProjectDomain extends Component {
|
||||
limit: $TSFixMe;
|
||||
constructor() {
|
||||
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0.
|
||||
|
||||
super();
|
||||
this.limit = 10;
|
||||
this.state = {
|
||||
|
|
@ -26,28 +26,28 @@ class ProjectDomain extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const projectId = this.props.projectId;
|
||||
if (projectId) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
this.props.fetchProjectDomains(this.props.projectId, 0, this.limit);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: $TSFixMe) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
if (prevProps.projectId !== this.props.projectId) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const projectId = this.props.projectId;
|
||||
if (projectId) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
this.props.fetchProjectDomains(projectId, 0, this.limit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prevClicked = (projectId: $TSFixMe, skip: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
const { fetchProjectDomains } = this.props;
|
||||
fetchProjectDomains(
|
||||
projectId,
|
||||
|
|
@ -57,7 +57,7 @@ class ProjectDomain extends Component {
|
|||
};
|
||||
|
||||
nextClicked = (projectId: $TSFixMe, skip: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
const { fetchProjectDomains } = this.props;
|
||||
fetchProjectDomains(
|
||||
projectId,
|
||||
|
|
@ -68,21 +68,21 @@ class ProjectDomain extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectDomain' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
projectDomain: { domains },
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
projectId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
openModal,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'limit' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
limit,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'skip' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
count,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'error' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
error,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
requesting,
|
||||
} = this.props;
|
||||
const footerBorderTopStyle = { margin: 0, padding: 0 };
|
||||
|
|
@ -284,7 +284,7 @@ class ProjectDomain extends Component {
|
|||
{
|
||||
removeUserModalId: this
|
||||
.state
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'removeUserModalId' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
.removeUserModalId,
|
||||
domainId:
|
||||
eachDomain._id,
|
||||
|
|
@ -335,8 +335,8 @@ class ProjectDomain extends Component {
|
|||
>
|
||||
<span>
|
||||
{(!domains || domains.length === 0) &&
|
||||
!requesting &&
|
||||
!error
|
||||
!requesting &&
|
||||
!error
|
||||
? 'You have no domain at this time'
|
||||
: null}
|
||||
</span>
|
||||
|
|
@ -354,14 +354,14 @@ class ProjectDomain extends Component {
|
|||
id="customFieldCount"
|
||||
className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap"
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
{this.props.count
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
? this.props.count +
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
(this.props.count > 1
|
||||
? ' Domains'
|
||||
: ' Domain')
|
||||
|
||||
(this.props.count > 1
|
||||
? ' Domains'
|
||||
: ' Domain')
|
||||
: '0 Domain'}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -427,7 +427,7 @@ class ProjectDomain extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectDomain.displayName = 'ProjectDomain';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => ({
|
||||
|
|
@ -439,7 +439,7 @@ const mapStateToProps = (state: $TSFixMe) => ({
|
|||
skip: state.project.projectDomain.skip
|
||||
});
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectDomain.propTypes = {
|
||||
projectId: PropTypes.string,
|
||||
fetchProjectDomains: PropTypes.func,
|
||||
|
|
|
|||
|
|
@ -9,58 +9,58 @@ import { history } from '../../store';
|
|||
export class ProjectList extends Component {
|
||||
render() {
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.skip &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.projects.skip === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.skip = parseInt(this.props.projects.skip, 10);
|
||||
}
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.limit &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
typeof this.props.projects.limit === 'string'
|
||||
) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.limit = parseInt(this.props.projects.limit, 10);
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.projects.skip) this.props.projects.skip = 0;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.projects.limit) this.props.projects.limit = 0;
|
||||
|
||||
let canNext =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.count &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.count >
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.count &&
|
||||
|
||||
this.props.projects.count >
|
||||
|
||||
this.props.projects.skip + this.props.projects.limit
|
||||
? true
|
||||
: false;
|
||||
let canPrev =
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects && this.props.projects.skip <= 0 ? false : true;
|
||||
|
||||
if (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
(this.props.requesting || !this.props.projects.projects)
|
||||
) {
|
||||
canNext = false;
|
||||
canPrev = false;
|
||||
}
|
||||
const numberOfPages = Math.ceil(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
parseInt(this.props.projects && this.props.projects.count) / 10
|
||||
);
|
||||
return (
|
||||
|
|
@ -149,7 +149,7 @@ export class ProjectList extends Component {
|
|||
</td>
|
||||
<td
|
||||
id="overflow"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element; id: string; type: strin... Remove this comment to see the full error message
|
||||
|
||||
type="action"
|
||||
className="Table-cell Table-cell--align--right Table-cell--verticalAlign--top Table-cell--width--minimized Table-cell--wrap--noWrap db-ListViewItem-cell"
|
||||
style={{ height: '1px' }}
|
||||
|
|
@ -161,7 +161,7 @@ export class ProjectList extends Component {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody className="Table-body">
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
{this.props.requesting ? (
|
||||
<Fragment>
|
||||
<tr className="Table-row db-ListViewItem bs-ActionsParent db-ListViewItem--hasLink">
|
||||
|
|
@ -182,13 +182,13 @@ export class ProjectList extends Component {
|
|||
</td>
|
||||
</tr>
|
||||
</Fragment>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
) : this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.projects.length > 0 ? (
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.projects &&
|
||||
|
||||
this.props.projects.projects.length > 0 ? (
|
||||
|
||||
this.props.projects.projects.map(
|
||||
(project: $TSFixMe, index: $TSFixMe) => {
|
||||
const projectOwner =
|
||||
|
|
@ -206,9 +206,8 @@ export class ProjectList extends Component {
|
|||
) {
|
||||
usersDetail = `${projectOwner.name} and 1 other`;
|
||||
} else {
|
||||
usersDetail = `${
|
||||
projectOwner.name
|
||||
} and ${project.users.length -
|
||||
usersDetail = `${projectOwner.name
|
||||
} and ${project.users.length -
|
||||
1} others`;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -223,7 +222,7 @@ export class ProjectList extends Component {
|
|||
onClick={() => {
|
||||
history.push(
|
||||
'/admin/projects/' +
|
||||
project.slug
|
||||
project.slug
|
||||
);
|
||||
}}
|
||||
>
|
||||
|
|
@ -389,21 +388,21 @@ export class ProjectList extends Component {
|
|||
</table>
|
||||
</div>
|
||||
<div style={{ textAlign: 'center', marginTop: '10px' }}>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
(!this.props.projects.projects ||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
!this.props.projects.projects.length) &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
!this.props.requesting &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
!this.props.projects.error
|
||||
|
||||
(!this.props.projects.projects ||
|
||||
|
||||
!this.props.projects.projects.length) &&
|
||||
|
||||
!this.props.requesting &&
|
||||
|
||||
!this.props.projects.error
|
||||
? "We don't have any projects yet"
|
||||
: null}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
{this.props.projects && this.props.projects.error
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
? this.props.projects.error
|
||||
: null}
|
||||
</div>
|
||||
|
|
@ -413,39 +412,33 @@ export class ProjectList extends Component {
|
|||
<span>
|
||||
<span className="Text-color--inherit Text-display--inline Text-fontSize--14 Text-fontWeight--medium Text-lineHeight--20 Text-typeface--base Text-wrap--wrap">
|
||||
{numberOfPages > 0
|
||||
? `Page ${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
this.props.page
|
||||
} of ${numberOfPages} (${this.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects
|
||||
.count} Project${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
})`
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
? `Page ${this.props.page
|
||||
} of ${numberOfPages} (${this.props
|
||||
|
||||
.projects &&
|
||||
|
||||
this.props.projects
|
||||
.count} Project${this.props.projects &&
|
||||
|
||||
this.props.projects.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
})`
|
||||
|
||||
: this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.count
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
? `${this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects
|
||||
.count} Project${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
this.props.projects.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
}`
|
||||
: null}
|
||||
|
||||
this.props.projects.count
|
||||
|
||||
? `${this.props.projects &&
|
||||
|
||||
this.props.projects
|
||||
.count} Project${this.props.projects &&
|
||||
|
||||
this.props.projects.count === 1
|
||||
? ''
|
||||
: 's'
|
||||
}`
|
||||
: null}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -456,11 +449,11 @@ export class ProjectList extends Component {
|
|||
<button
|
||||
id="btnPrev"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'prevClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.prevClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -483,11 +476,11 @@ export class ProjectList extends Component {
|
|||
<button
|
||||
id="btnNext"
|
||||
onClick={() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'nextClicked' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
this.props.nextClicked(
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.skip,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projects' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.props.projects.limit
|
||||
);
|
||||
}}
|
||||
|
|
@ -524,10 +517,10 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectList.displayName = 'ProjectList';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectList.propTypes = {
|
||||
nextClicked: PropTypes.func.isRequired,
|
||||
prevClicked: PropTypes.func.isRequired,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
import { resetTeamDelete } from '../../actions/project';
|
||||
|
|
@ -19,7 +19,7 @@ class ProjectRemoveUserModal extends Component {
|
|||
}
|
||||
|
||||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
const { data, resetTeamDelete } = this.props;
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
|
|
@ -33,24 +33,24 @@ class ProjectRemoveUserModal extends Component {
|
|||
};
|
||||
|
||||
handleCloseModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.data.removeUserModalId,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'teamUserDelete' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
teamUserDelete,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
closeModal,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
data,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetTeamDelete' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
resetTeamDelete,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleting' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
deleting,
|
||||
} = this.props;
|
||||
return (
|
||||
|
|
@ -139,7 +139,7 @@ class ProjectRemoveUserModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectRemoveUserModal.displayName = 'ProjectRemoveUserModal';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe, props: $TSFixMe) => {
|
||||
|
|
@ -157,7 +157,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
|||
return bindActionCreators({ closeModal, resetTeamDelete }, dispatch);
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectRemoveUserModal.propTypes = {
|
||||
closeModal: PropTypes.func,
|
||||
data: PropTypes.object,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -15,7 +15,7 @@ import {
|
|||
|
||||
class ProjectResetDomain extends Component {
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetProjectDomainOnMount' does not exis... Remove this comment to see the full error message
|
||||
|
||||
this.props.resetProjectDomainOnMount();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
|
@ -32,26 +32,26 @@ class ProjectResetDomain extends Component {
|
|||
};
|
||||
|
||||
handleCloseModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.domainId,
|
||||
});
|
||||
};
|
||||
|
||||
handleResetDomain = () => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetProjectDomain' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
resetProjectDomain,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
fetchProjectDomains,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
projectId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
domainId,
|
||||
} = this.props;
|
||||
resetProjectDomain(projectId, domainId).then(() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetError' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.resetError) {
|
||||
fetchProjectDomains(projectId, 0, 10);
|
||||
this.handleCloseModal();
|
||||
|
|
@ -60,7 +60,7 @@ class ProjectResetDomain extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { requesting, resetError } = this.props;
|
||||
return (
|
||||
<div className="ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
|
|
@ -183,10 +183,10 @@ class ProjectResetDomain extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectResetDomain.displayName = 'ProjectResetDomain';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectResetDomain.propTypes = {
|
||||
closeModal: PropTypes.func,
|
||||
resetProjectDomain: PropTypes.func,
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@ import { openModal, closeModal } from '../../actions/modal';
|
|||
export class ProjectRestoreBox extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
handleClick = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'restoreProject' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
const { restoreProject, project } = this.props;
|
||||
return restoreProject(project._id);
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -66,7 +66,7 @@ export class ProjectRestoreBox extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectRestoreBox.displayName = 'ProjectRestoreBox';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ restoreProject, openModal, closeModal }, dispatch);
|
||||
|
|
@ -82,14 +82,14 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectRestoreBox.propTypes = {
|
||||
isRequesting: PropTypes.oneOf([null, undefined, true, false]),
|
||||
project: PropTypes.object.isRequired,
|
||||
restoreProject: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProjectRestoreBox.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ProjectRestoreBox);
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@ import { openModal, closeModal } from '../../actions/modal';
|
|||
export class ProjectUnblockBox extends Component {
|
||||
constructor(props: $TSFixMe) {
|
||||
super(props);
|
||||
// @ts-expect-error ts-migrate(2540) FIXME: Cannot assign to 'props' because it is a read-only... Remove this comment to see the full error message
|
||||
|
||||
this.props = props;
|
||||
}
|
||||
|
||||
handleClick = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'unblockProject' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
const { unblockProject, project } = this.props;
|
||||
return unblockProject(project._id);
|
||||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isRequesting' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { isRequesting } = this.props;
|
||||
|
||||
return (
|
||||
|
|
@ -66,7 +66,7 @@ export class ProjectUnblockBox extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectUnblockBox.displayName = 'ProjectUnblockBox';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators({ unblockProject, openModal, closeModal }, dispatch);
|
||||
|
|
@ -82,14 +82,14 @@ const mapStateToProps = (state: $TSFixMe) => {
|
|||
};
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectUnblockBox.propTypes = {
|
||||
isRequesting: PropTypes.oneOf([null, undefined, true, false]),
|
||||
project: PropTypes.object.isRequired,
|
||||
unblockProject: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2551) FIXME: Property 'contextTypes' does not exist on type 'ty... Remove this comment to see the full error message
|
||||
|
||||
ProjectUnblockBox.contextTypes = {};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ProjectUnblockBox);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
import PropTypes from 'prop-types';
|
||||
|
|
@ -15,14 +15,14 @@ import {
|
|||
|
||||
class ProjectUnverifyDomain extends Component {
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetUnverifyProjectDomain' does not exi... Remove this comment to see the full error message
|
||||
|
||||
this.props.resetUnverifyProjectDomain();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
handleCloseModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.domainId,
|
||||
});
|
||||
};
|
||||
|
|
@ -40,15 +40,15 @@ class ProjectUnverifyDomain extends Component {
|
|||
|
||||
handleUnverifyDomain = async () => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
projectId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
domainId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'unVerifyProjectDomain' does not exist on... Remove this comment to see the full error message
|
||||
|
||||
unVerifyProjectDomain,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'unverifyError' does not exist on type 'R... Remove this comment to see the full error message
|
||||
|
||||
unverifyError,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
fetchProjectDomains,
|
||||
} = this.props;
|
||||
await unVerifyProjectDomain(projectId, domainId).then(() => {
|
||||
|
|
@ -60,7 +60,7 @@ class ProjectUnverifyDomain extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { requesting, unverifyError } = this.props;
|
||||
return (
|
||||
<div className="ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
|
|
@ -190,7 +190,7 @@ class ProjectUnverifyDomain extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectUnverifyDomain.displayName = 'ProjectUnverifyDomain';
|
||||
|
||||
const mapStateToProps = (state: $TSFixMe) => ({
|
||||
|
|
@ -210,7 +210,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators(
|
|||
dispatch
|
||||
);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectUnverifyDomain.propTypes = {
|
||||
closeModal: PropTypes.func,
|
||||
domainId: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm, Field } from 'redux-form';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
|
@ -14,7 +14,7 @@ function validate(values: $TSFixMe) {
|
|||
const errors = {};
|
||||
|
||||
if (!Validate.text(values.planId)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'name' does not exist on type '{}'.
|
||||
|
||||
errors.name = 'Stripe PlanID is required!';
|
||||
}
|
||||
|
||||
|
|
@ -47,9 +47,9 @@ class ProjectUpgrade extends Component {
|
|||
}
|
||||
|
||||
shouldTogglePlans = (prevState: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isAnnual' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (this.state.isAnnual !== prevState.isAnnual) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isAnnual' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
if (this.state.isAnnual) {
|
||||
this.setState({
|
||||
plans: this.getPlansFromToggle('annual', this.plansArr),
|
||||
|
|
@ -63,12 +63,12 @@ class ProjectUpgrade extends Component {
|
|||
};
|
||||
|
||||
handlePlanToggle = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isAnnual' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
this.setState(prevState => ({ isAnnual: !prevState.isAnnual }));
|
||||
};
|
||||
|
||||
submit = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'project' does not exist on type 'Readonl... Remove this comment to see the full error message
|
||||
|
||||
const { project, changePlan } = this.props;
|
||||
let oldPlan, newPlan;
|
||||
const { _id, name, stripePlanId } = project;
|
||||
|
|
@ -82,31 +82,31 @@ class ProjectUpgrade extends Component {
|
|||
oldPlan = this.enterprisePlan.category;
|
||||
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type '{ cate... Remove this comment to see the full error message
|
||||
|
||||
category: newCategory,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ category... Remove this comment to see the full error message
|
||||
|
||||
type: newType,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'details' does not exist on type '{ categ... Remove this comment to see the full error message
|
||||
|
||||
details: newDetails,
|
||||
} = PricingPlan.getPlanById(values.planId);
|
||||
newPlan = `${newCategory} ${newType}ly (${newDetails})`;
|
||||
} else {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type '{ cate... Remove this comment to see the full error message
|
||||
|
||||
category: oldCategory,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ category... Remove this comment to see the full error message
|
||||
|
||||
type: oldType,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'details' does not exist on type '{ categ... Remove this comment to see the full error message
|
||||
|
||||
details: oldDetails,
|
||||
} = PricingPlan.getPlanById(stripePlanId);
|
||||
oldPlan = `${oldCategory} ${oldType}ly (${oldDetails})`;
|
||||
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'category' does not exist on type '{ cate... Remove this comment to see the full error message
|
||||
|
||||
category: newCategory,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'type' does not exist on type '{ category... Remove this comment to see the full error message
|
||||
|
||||
type: newType,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'details' does not exist on type '{ categ... Remove this comment to see the full error message
|
||||
|
||||
details: newDetails,
|
||||
} = PricingPlan.getPlanById(values.planId);
|
||||
newPlan = `${newCategory} ${newType}ly (${newDetails})`;
|
||||
|
|
@ -117,9 +117,9 @@ class ProjectUpgrade extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { handleSubmit, isRequesting, error, activeForm } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'isAnnual' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
const { isAnnual, plans } = this.state;
|
||||
|
||||
return (
|
||||
|
|
@ -184,12 +184,11 @@ class ProjectUpgrade extends Component {
|
|||
}}
|
||||
>
|
||||
<div
|
||||
className={`bs-Fieldset-fields Flex-justifyContent--center price-list-item Box-background--white ${
|
||||
activeForm ===
|
||||
plan.planId
|
||||
className={`bs-Fieldset-fields Flex-justifyContent--center price-list-item Box-background--white ${activeForm ===
|
||||
plan.planId
|
||||
? 'price-list-item--active'
|
||||
: ''
|
||||
}`}
|
||||
}`}
|
||||
style={{
|
||||
flex: 1,
|
||||
padding: 0,
|
||||
|
|
@ -206,7 +205,7 @@ class ProjectUpgrade extends Component {
|
|||
plan.category
|
||||
}{' '}
|
||||
{plan.type ===
|
||||
'month'
|
||||
'month'
|
||||
? 'Monthly'
|
||||
: 'Yearly'}{' '}
|
||||
Plan
|
||||
|
|
@ -243,12 +242,11 @@ class ProjectUpgrade extends Component {
|
|||
}}
|
||||
>
|
||||
<div
|
||||
className={`bs-Fieldset-fields Flex-justifyContent--center price-list-item Box-background--white ${
|
||||
activeForm ===
|
||||
'enterprise'
|
||||
className={`bs-Fieldset-fields Flex-justifyContent--center price-list-item Box-background--white ${activeForm ===
|
||||
'enterprise'
|
||||
? 'price-list-item--active'
|
||||
: ''
|
||||
}`}
|
||||
}`}
|
||||
style={{
|
||||
flex: 1,
|
||||
padding: 0,
|
||||
|
|
@ -362,10 +360,10 @@ class ProjectUpgrade extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectUpgrade.displayName = 'Project Upgrade';
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectUpgrade.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
isRequesting: PropTypes.bool,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import {
|
||||
userCreate,
|
||||
|
|
@ -28,7 +28,7 @@ function validate(values: $TSFixMe) {
|
|||
values.emails = values.emails ? values.emails.replace(/\s/g, '') : '';
|
||||
const emails = values.emails ? values.emails.split(',') : [];
|
||||
if (!Validate.isValidBusinessEmails(emails)) {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emails' does not exist on type '{}'.
|
||||
|
||||
errors.emails = 'Please enter business emails of the members.';
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ export class FormModal extends Component {
|
|||
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
values.emails = formatEmails(values.emails);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'userCreate' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { userCreate, closeThisDialog, data } = this.props;
|
||||
values.projectId = data.projectId;
|
||||
|
||||
|
|
@ -63,10 +63,10 @@ export class FormModal extends Component {
|
|||
this.showMessageBox();
|
||||
}
|
||||
userCreate(data.projectId, values).then(
|
||||
function() {
|
||||
function () {
|
||||
closeThisDialog();
|
||||
},
|
||||
function() {
|
||||
function () {
|
||||
//do nothing.
|
||||
}
|
||||
);
|
||||
|
|
@ -75,13 +75,13 @@ export class FormModal extends Component {
|
|||
handleKeyBoard = (e: $TSFixMe) => {
|
||||
switch (e.key) {
|
||||
case 'Escape':
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeThisDialog' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeThisDialog();
|
||||
return true;
|
||||
case 'Enter':
|
||||
// @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'.
|
||||
|
||||
return document
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'data' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
|
||||
.getElementById(`btn_modal_${this.props.data.projectName}`)
|
||||
.click();
|
||||
default:
|
||||
|
|
@ -90,9 +90,9 @@ export class FormModal extends Component {
|
|||
};
|
||||
|
||||
showMessageBox = () =>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'messageModalId' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
id: this.state.messageModalId,
|
||||
content: DataPathHoC(MessageBox, {
|
||||
message: (
|
||||
|
|
@ -110,18 +110,18 @@ export class FormModal extends Component {
|
|||
</span>
|
||||
),
|
||||
title: 'You cannot add more than 100 members',
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'messageModalId' does not exist on type '... Remove this comment to see the full error message
|
||||
|
||||
messageBoxId: this.state.messageModalId,
|
||||
}),
|
||||
});
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { handleSubmit, closeThisDialog, data } = this.props;
|
||||
return (
|
||||
<div
|
||||
className="ModalLayer-contents"
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'number | ... Remove this comment to see the full error message
|
||||
|
||||
tabIndex="-1"
|
||||
style={{ marginTop: '40px' }}
|
||||
>
|
||||
|
|
@ -130,7 +130,7 @@ export class FormModal extends Component {
|
|||
<ClickOutside onClickOutside={closeThisDialog}>
|
||||
<form
|
||||
id={`frm_${data.projectName}`}
|
||||
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element[]; id: string; lpformnum... Remove this comment to see the full error message
|
||||
|
||||
lpformnum="2"
|
||||
onSubmit={handleSubmit(this.submitForm)}
|
||||
>
|
||||
|
|
@ -420,7 +420,7 @@ export class FormModal extends Component {
|
|||
style={{ width: '100%' }}
|
||||
>
|
||||
<ShouldRender
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'createUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
if={this.props.createUser.error}
|
||||
>
|
||||
<div className="bs-Tail-copy">
|
||||
|
|
@ -441,7 +441,7 @@ export class FormModal extends Component {
|
|||
>
|
||||
{
|
||||
this.props
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'createUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
.createUser
|
||||
.error
|
||||
}
|
||||
|
|
@ -470,13 +470,13 @@ export class FormModal extends Component {
|
|||
id={`btn_modal_${data.projectName}`}
|
||||
className="bs-Button bs-DeprecatedButton bs-Button--blue btn__modal"
|
||||
disabled={
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'createUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.createUser
|
||||
.requesting
|
||||
}
|
||||
type="submit"
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'createUser' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
{this.props.createUser
|
||||
.requesting ? (
|
||||
<FormLoader />
|
||||
|
|
@ -501,7 +501,7 @@ export class FormModal extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
FormModal.displayName = 'InviteMemberFormModal';
|
||||
|
||||
const ProjectUserAddModal = reduxForm({
|
||||
|
|
@ -522,7 +522,7 @@ function mapStateToProps(state: $TSFixMe) {
|
|||
};
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
FormModal.propTypes = {
|
||||
handleSubmit: PropTypes.func.isRequired,
|
||||
createUser: PropTypes.object.isRequired,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import moment from 'moment';
|
||||
import { history } from '../../store';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'uuid... Remove this comment to see the full error message
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { openModal, closeModal } from '../../actions/modal';
|
||||
import {
|
||||
|
|
@ -32,306 +32,303 @@ class ProjectUser extends Component {
|
|||
};
|
||||
}
|
||||
handleClick = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'addUserId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { addUserId } = this.state;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
this.props.openModal({
|
||||
id: addUserId,
|
||||
onConfirm: () => true,
|
||||
content: DataPathHoC(ProjectUserAddModal, {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
projectId: this.props.projectId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectName' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
projectName: this.props.projectName,
|
||||
}),
|
||||
});
|
||||
};
|
||||
updateTeamMemberRole = (values: $TSFixMe, to: $TSFixMe) => {
|
||||
const data = {};
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'teamMemberId' does not exist on type '{}... Remove this comment to see the full error message
|
||||
|
||||
data.teamMemberId = values.userId;
|
||||
if (values.role === to) {
|
||||
return;
|
||||
} else {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'role' does not exist on type '{}'.
|
||||
|
||||
data.role = to;
|
||||
}
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
const { projectId, changeUserProjectRole, userUpdateRole } = this.props;
|
||||
userUpdateRole(projectId, data).then((team: $TSFixMe) => changeUserProjectRole(team.data)
|
||||
);
|
||||
};
|
||||
removeTeamMember = (values: $TSFixMe) => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetTeamDelete' does not exist on type ... Remove this comment to see the full error message
|
||||
|
||||
resetTeamDelete,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'teamDelete' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
teamDelete,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
projectId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
closeModal,
|
||||
} = this.props;
|
||||
teamDelete(projectId, values.userId).then((value: $TSFixMe) => {
|
||||
if (!value.error) {
|
||||
resetTeamDelete();
|
||||
return closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'removeUserModalId' does not exist on typ... Remove this comment to see the full error message
|
||||
|
||||
id: this.state.removeUserModalId,
|
||||
});
|
||||
} else return null;
|
||||
});
|
||||
};
|
||||
renderTable = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'handleSubmit' does not exist on type 'Re... Remove this comment to see the full error message
|
||||
|
||||
const { handleSubmit, updateUsers, pages, membersPerPage } = this.props;
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'users' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
return this.props.users &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'users' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
this.props.users.teamMembers &&
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'users' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
this.props.users.teamMembers.map((user: $TSFixMe, i: $TSFixMe) => {
|
||||
if (
|
||||
i >= pages * membersPerPage - membersPerPage &&
|
||||
i < pages * membersPerPage
|
||||
) {
|
||||
return (
|
||||
<div className="bs-ObjectList-row db-UserListRow db-UserListRow--withName">
|
||||
<div
|
||||
className="bs-ObjectList-cell bs-u-v-middle"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
history.push('/admin/users/' + user.userId);
|
||||
}}
|
||||
>
|
||||
<div className="bs-ObjectList-cell-row bs-ObjectList-copy bs-is-highlighted">
|
||||
{user.name ? (
|
||||
<span>
|
||||
<span>
|
||||
{user.name ? user.name : ''}
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{!user.name && user.email ? (
|
||||
<span>
|
||||
<span>
|
||||
{user.email ? user.email : ''}
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="bs-ObjectList-cell bs-u-v-middle">
|
||||
|
||||
this.props.users.teamMembers &&
|
||||
|
||||
this.props.users.teamMembers.map((user: $TSFixMe, i: $TSFixMe) => {
|
||||
if (
|
||||
i >= pages * membersPerPage - membersPerPage &&
|
||||
i < pages * membersPerPage
|
||||
) {
|
||||
return (
|
||||
<div className="bs-ObjectList-row db-UserListRow db-UserListRow--withName">
|
||||
<div
|
||||
id={`${user.role}_${
|
||||
user.email.split('@')[0]
|
||||
}`}
|
||||
className="bs-ObjectList-cell-row"
|
||||
className="bs-ObjectList-cell bs-u-v-middle"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
history.push('/admin/users/' + user.userId);
|
||||
}}
|
||||
>
|
||||
{user.role}
|
||||
<div className="bs-ObjectList-cell-row bs-ObjectList-copy bs-is-highlighted">
|
||||
{user.name ? (
|
||||
<span>
|
||||
<span>
|
||||
{user.name ? user.name : ''}
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{!user.name && user.email ? (
|
||||
<span>
|
||||
<span>
|
||||
{user.email ? user.email : ''}
|
||||
</span>
|
||||
</span>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bs-ObjectList-cell bs-u-v-middle">
|
||||
<div className="Badge Badge--color--green Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2">
|
||||
<span className="Badge-text Text-color--green Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap">
|
||||
<span>
|
||||
{user && user.name
|
||||
? 'Online ' +
|
||||
moment(
|
||||
user && user.lastActive
|
||||
).fromNow()
|
||||
: 'Invitation Sent'}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bs-ObjectList-cell bs-u-v-middle"></div>
|
||||
<div className="bs-ObjectList-cell bs-u-right bs-u-shrink bs-u-v-middle Flex-alignContent--spaceBetween">
|
||||
<div>
|
||||
<ShouldRender
|
||||
if={
|
||||
!(
|
||||
User.getUserId() ===
|
||||
user.userId &&
|
||||
user.role === 'Owner'
|
||||
)
|
||||
}
|
||||
<div className="bs-ObjectList-cell bs-u-v-middle">
|
||||
<div
|
||||
id={`${user.role}_${user.email.split('@')[0]
|
||||
}`}
|
||||
className="bs-ObjectList-cell-row"
|
||||
>
|
||||
<div className="Flex-flex Flex-alignContent--spaceBetween">
|
||||
<ShouldRender
|
||||
if={
|
||||
!(
|
||||
updateUsers.requesting &&
|
||||
updateUsers.updating.includes(
|
||||
user.userId
|
||||
{user.role}
|
||||
</div>
|
||||
</div>
|
||||
<div className="bs-ObjectList-cell bs-u-v-middle">
|
||||
<div className="Badge Badge--color--green Box-root Flex-inlineFlex Flex-alignItems--center Padding-horizontal--8 Padding-vertical--2">
|
||||
<span className="Badge-text Text-color--green Text-display--inline Text-fontSize--12 Text-fontWeight--bold Text-lineHeight--16 Text-typeface--upper Text-wrap--noWrap">
|
||||
<span>
|
||||
{user && user.name
|
||||
? 'Online ' +
|
||||
moment(
|
||||
user && user.lastActive
|
||||
).fromNow()
|
||||
: 'Invitation Sent'}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bs-ObjectList-cell bs-u-v-middle"></div>
|
||||
<div className="bs-ObjectList-cell bs-u-right bs-u-shrink bs-u-v-middle Flex-alignContent--spaceBetween">
|
||||
<div>
|
||||
<ShouldRender
|
||||
if={
|
||||
!(
|
||||
User.getUserId() ===
|
||||
user.userId &&
|
||||
user.role === 'Owner'
|
||||
)
|
||||
}
|
||||
>
|
||||
<div className="Flex-flex Flex-alignContent--spaceBetween">
|
||||
<ShouldRender
|
||||
if={
|
||||
!(
|
||||
updateUsers.requesting &&
|
||||
updateUsers.updating.includes(
|
||||
user.userId
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
>
|
||||
<DropDownMenu
|
||||
options={[
|
||||
{
|
||||
value: 'Owner',
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
value:
|
||||
'Administrator',
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
value: 'Member',
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
value: 'Viewer',
|
||||
show: true,
|
||||
},
|
||||
]}
|
||||
value={'Change Role'}
|
||||
id={`changeRole_${
|
||||
user.email.split('@')[0]
|
||||
}`}
|
||||
title="Change Role"
|
||||
updateState={(val: $TSFixMe) => {
|
||||
switch (val) {
|
||||
case 'Owner':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Owner'
|
||||
);
|
||||
break;
|
||||
case 'Administrator':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Administrator'
|
||||
);
|
||||
break;
|
||||
case 'Member':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Member'
|
||||
);
|
||||
break;
|
||||
case 'Viewer':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Viewer'
|
||||
);
|
||||
break;
|
||||
default:
|
||||
null;
|
||||
break;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ShouldRender>
|
||||
<ShouldRender
|
||||
if={
|
||||
updateUsers.requesting &&
|
||||
updateUsers.updating.includes(
|
||||
user.userId
|
||||
)
|
||||
}
|
||||
>
|
||||
<button
|
||||
disabled={
|
||||
}
|
||||
>
|
||||
<DropDownMenu
|
||||
options={[
|
||||
{
|
||||
value: 'Owner',
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
value:
|
||||
'Administrator',
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
value: 'Member',
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
value: 'Viewer',
|
||||
show: true,
|
||||
},
|
||||
]}
|
||||
value={'Change Role'}
|
||||
id={`changeRole_${user.email.split('@')[0]
|
||||
}`}
|
||||
title="Change Role"
|
||||
updateState={(val: $TSFixMe) => {
|
||||
switch (val) {
|
||||
case 'Owner':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Owner'
|
||||
);
|
||||
break;
|
||||
case 'Administrator':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Administrator'
|
||||
);
|
||||
break;
|
||||
case 'Member':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Member'
|
||||
);
|
||||
break;
|
||||
case 'Viewer':
|
||||
this.updateTeamMemberRole(
|
||||
{
|
||||
role:
|
||||
user.role,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
'Viewer'
|
||||
);
|
||||
break;
|
||||
default:
|
||||
null;
|
||||
break;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ShouldRender>
|
||||
<ShouldRender
|
||||
if={
|
||||
updateUsers.requesting &&
|
||||
updateUsers.updating.includes(
|
||||
user.userId
|
||||
)
|
||||
}
|
||||
>
|
||||
<button
|
||||
disabled={
|
||||
updateUsers.requesting &&
|
||||
updateUsers.updating.includes(
|
||||
user.userId
|
||||
)
|
||||
}
|
||||
className="bs-Button bs-DeprecatedButton Margin-left--8"
|
||||
type="button"
|
||||
>
|
||||
<TeamListLoader />
|
||||
</button>
|
||||
</ShouldRender>
|
||||
<button
|
||||
id={`removeMember__${user.email.split('@')[0]
|
||||
}`}
|
||||
title="delete"
|
||||
disabled={false}
|
||||
className="bs-Button bs-DeprecatedButton Margin-left--8"
|
||||
type="button"
|
||||
|
||||
onClick={handleSubmit((values: $TSFixMe) => this.props.openModal({
|
||||
id: this.state
|
||||
|
||||
.removeUserModalId,
|
||||
content: DataPathHoC(
|
||||
ProjectRemoveUserModal,
|
||||
{
|
||||
removeUserModalId: this
|
||||
.state
|
||||
|
||||
.removeUserModalId,
|
||||
values: {
|
||||
...values,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
displayName:
|
||||
user.name ||
|
||||
user.email,
|
||||
removeTeamMember: this
|
||||
.removeTeamMember,
|
||||
}
|
||||
),
|
||||
})
|
||||
)}
|
||||
>
|
||||
<TeamListLoader />
|
||||
{!false && <span>Remove</span>}
|
||||
</button>
|
||||
</ShouldRender>
|
||||
<button
|
||||
id={`removeMember__${
|
||||
user.email.split('@')[0]
|
||||
}`}
|
||||
title="delete"
|
||||
disabled={false}
|
||||
className="bs-Button bs-DeprecatedButton Margin-left--8"
|
||||
type="button"
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'openModal' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
onClick={handleSubmit((values: $TSFixMe) => this.props.openModal({
|
||||
id: this.state
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'removeUserModalId' does not exist on typ... Remove this comment to see the full error message
|
||||
.removeUserModalId,
|
||||
content: DataPathHoC(
|
||||
ProjectRemoveUserModal,
|
||||
{
|
||||
removeUserModalId: this
|
||||
.state
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'removeUserModalId' does not exist on typ... Remove this comment to see the full error message
|
||||
.removeUserModalId,
|
||||
values: {
|
||||
...values,
|
||||
userId:
|
||||
user.userId,
|
||||
},
|
||||
displayName:
|
||||
user.name ||
|
||||
user.email,
|
||||
removeTeamMember: this
|
||||
.removeTeamMember,
|
||||
}
|
||||
),
|
||||
})
|
||||
)}
|
||||
>
|
||||
{!false && <span>Remove</span>}
|
||||
</button>
|
||||
</div>
|
||||
</ShouldRender>
|
||||
</div>
|
||||
</ShouldRender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
};
|
||||
render() {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'count' does not exist on type 'Readonly<... Remove this comment to see the full error message
|
||||
|
||||
count,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'updateUsers' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
updateUsers,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'deleteError' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
deleteError,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'canPaginateBackward' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
canPaginateBackward,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'canPaginateForward' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
canPaginateForward,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'paginate' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
paginate,
|
||||
} = this.props;
|
||||
const numberOfPages = Math.ceil(parseInt(count) / 10);
|
||||
|
|
@ -345,7 +342,7 @@ class ProjectUser extends Component {
|
|||
>
|
||||
<span className="ContentHeader-title Text-color--inherit Text-display--inline Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--28 Text-typeface--base Text-wrap--wrap">
|
||||
<span
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectName' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
id={`project_${this.props.projectName}`}
|
||||
style={{ textTransform: 'capitalize' }}
|
||||
>
|
||||
|
|
@ -358,7 +355,7 @@ class ProjectUser extends Component {
|
|||
<span
|
||||
style={{ textTransform: 'lowercase' }}
|
||||
>
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectName' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
{this.props.projectName}
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -370,7 +367,7 @@ class ProjectUser extends Component {
|
|||
>
|
||||
<div className="Box-root">
|
||||
<button
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectName' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
id={`btn_${this.props.projectName}`}
|
||||
onClick={this.handleClick}
|
||||
className="Button bs-ButtonLegacy ActionIconParent"
|
||||
|
|
@ -475,12 +472,9 @@ class ProjectUser extends Component {
|
|||
<div className="bs-Tail-copy">
|
||||
<span id={`count_kolawole`}>
|
||||
{count
|
||||
? `Page ${
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type 'Readonly<{... Remove this comment to see the full error message
|
||||
this.props.page
|
||||
} of ${numberOfPages} (${count} User${
|
||||
count === 1 ? '' : 's'
|
||||
})`
|
||||
? `Page ${this.props.page
|
||||
} of ${numberOfPages} (${count} User${count === 1 ? '' : 's'
|
||||
})`
|
||||
: null}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -490,11 +484,10 @@ class ProjectUser extends Component {
|
|||
<div className="Box-root Margin-right--8">
|
||||
<button
|
||||
data-test="TeamSettings-paginationButton"
|
||||
className={`Button bs-ButtonLegacy ${
|
||||
!canPaginateBackward
|
||||
className={`Button bs-ButtonLegacy ${!canPaginateBackward
|
||||
? 'Is--disabled'
|
||||
: ''
|
||||
}`}
|
||||
}`}
|
||||
disabled={!canPaginateBackward}
|
||||
type="button"
|
||||
onClick={() => paginate('prev')}
|
||||
|
|
@ -509,11 +502,10 @@ class ProjectUser extends Component {
|
|||
<div className="Box-root">
|
||||
<button
|
||||
data-test="TeamSettings-paginationButton"
|
||||
className={`Button bs-ButtonLegacy ${
|
||||
!canPaginateForward
|
||||
className={`Button bs-ButtonLegacy ${!canPaginateForward
|
||||
? 'Is--disabled'
|
||||
: ''
|
||||
}`}
|
||||
}`}
|
||||
disabled={!canPaginateForward}
|
||||
type="button"
|
||||
onClick={() => paginate('next')}
|
||||
|
|
@ -534,7 +526,7 @@ class ProjectUser extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectUser.displayName = 'ProjectUser';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
||||
|
|
@ -551,7 +543,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
|||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectUser.propTypes = {
|
||||
users: PropTypes.oneOfType([
|
||||
PropTypes.array,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import { closeModal } from '../../actions/modal';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
|
@ -15,7 +15,7 @@ import {
|
|||
|
||||
class ProjectVerifyDomain extends Component {
|
||||
componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'resetVerifyProjectDomain' does not exist... Remove this comment to see the full error message
|
||||
|
||||
this.props.resetVerifyProjectDomain();
|
||||
window.addEventListener('keydown', this.handleKeyBoard);
|
||||
}
|
||||
|
|
@ -36,26 +36,26 @@ class ProjectVerifyDomain extends Component {
|
|||
};
|
||||
|
||||
handleCloseModal = () => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'closeModal' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
this.props.closeModal({
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
id: this.props.domainId,
|
||||
});
|
||||
};
|
||||
|
||||
handleVerifyDomain = () => {
|
||||
const {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'domainId' does not exist on type 'Readon... Remove this comment to see the full error message
|
||||
|
||||
domainId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'projectId' does not exist on type 'Reado... Remove this comment to see the full error message
|
||||
|
||||
projectId,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'verifyProjectDomain' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
verifyProjectDomain,
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchProjectDomains' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
fetchProjectDomains,
|
||||
} = this.props;
|
||||
verifyProjectDomain({ projectId, domainId }).then(() => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'verifyError' does not exist on type 'Rea... Remove this comment to see the full error message
|
||||
|
||||
if (!this.props.verifyError) {
|
||||
fetchProjectDomains(projectId, 0, 10);
|
||||
this.handleCloseModal();
|
||||
|
|
@ -64,7 +64,7 @@ class ProjectVerifyDomain extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'requesting' does not exist on type 'Read... Remove this comment to see the full error message
|
||||
|
||||
const { requesting, verificationToken, verifyError } = this.props;
|
||||
return (
|
||||
<div className="ModalLayer-wash Box-root Flex-flex Flex-alignItems--flexStart Flex-justifyContent--center">
|
||||
|
|
@ -293,7 +293,7 @@ const mapStateToProps = (state: $TSFixMe) => ({
|
|||
projectId: state.modal.modals[0].projectId
|
||||
});
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
ProjectVerifyDomain.displayName = 'ProjectVerifyDomain';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators(
|
||||
|
|
@ -306,7 +306,7 @@ const mapDispatchToProps = (dispatch: $TSFixMe) => bindActionCreators(
|
|||
dispatch
|
||||
);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
ProjectVerifyDomain.propTypes = {
|
||||
closeModal: PropTypes.func,
|
||||
domainId: PropTypes.string,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field } from 'redux-form';
|
||||
|
||||
export function RadioInput({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { reduxForm, Field } from 'redux-form';
|
||||
|
||||
class Search extends Component {
|
||||
|
|
@ -33,7 +33,7 @@ class Search extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
Search.displayName = 'Search';
|
||||
|
||||
const mapStateToProps = () => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react';
|
||||
// @ts-expect-error ts-migrate(2305) FIXME: Module '"prop-types"' has no exported member 'Prop... Remove this comment to see the full error message
|
||||
|
||||
import { PropTypes } from 'prop-types';
|
||||
import { connect } from 'react-redux';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'reac... Remove this comment to see the full error message
|
||||
|
||||
import ClickOutside from 'react-click-outside';
|
||||
import ShouldRender from '../basic/ShouldRender';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
class AuditLog extends Component {
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchAuditLogStatus' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
await this.props.fetchAuditLogStatus();
|
||||
}
|
||||
toggleComponent = ({
|
||||
|
|
@ -32,11 +32,11 @@ class AuditLog extends Component {
|
|||
</label>
|
||||
);
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'auditLogStatusChange' does not exist on ... Remove this comment to see the full error message
|
||||
|
||||
this.props.auditLogStatusChange({ status: values.auditStatusToggler });
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAuditLogStatus' does not exist on ... Remove this comment to see the full error message
|
||||
|
||||
const { changeAuditLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
<div
|
||||
|
|
@ -152,7 +152,7 @@ class AuditLog extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
AuditLog.displayName = 'AuditLog';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
||||
|
|
@ -181,7 +181,7 @@ const ReduxFormComponent = reduxForm({
|
|||
enableReinitialize: true,
|
||||
})(AuditLog);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
AuditLog.propTypes = {
|
||||
changeAuditLogStatus: PropTypes.object,
|
||||
handleSubmit: PropTypes.func,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
class CallLog extends Component {
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchCallLogStatus' does not exist on ty... Remove this comment to see the full error message
|
||||
|
||||
await this.props.fetchCallLogStatus();
|
||||
}
|
||||
toggleComponent = ({
|
||||
|
|
@ -32,11 +32,11 @@ class CallLog extends Component {
|
|||
</label>
|
||||
);
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'callLogStatusChange' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
this.props.callLogStatusChange({ status: values.callStatusToggler });
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changeCallLogStatus' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
const { changeCallLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
<div
|
||||
|
|
@ -152,7 +152,7 @@ class CallLog extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
CallLog.displayName = 'CallLog';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
||||
|
|
@ -181,7 +181,7 @@ const ReduxFormComponent = reduxForm({
|
|||
enableReinitialize: true,
|
||||
})(CallLog);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
CallLog.propTypes = {
|
||||
changeCallLogStatus: PropTypes.object,
|
||||
handleSubmit: PropTypes.func,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { FormLoader } from '../basic/Loader';
|
||||
// @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module 'redu... Remove this comment to see the full error message
|
||||
|
||||
import { Field, reduxForm } from 'redux-form';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
class EmailLog extends Component {
|
||||
handleKeyBoard: $TSFixMe;
|
||||
async componentDidMount() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fetchEmailLogStatus' does not exist on t... Remove this comment to see the full error message
|
||||
|
||||
await this.props.fetchEmailLogStatus();
|
||||
}
|
||||
toggleComponent = ({
|
||||
|
|
@ -32,11 +32,11 @@ class EmailLog extends Component {
|
|||
</label>
|
||||
);
|
||||
submitForm = (values: $TSFixMe) => {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'emailLogStatusChange' does not exist on ... Remove this comment to see the full error message
|
||||
|
||||
this.props.emailLogStatusChange({ status: values.emailStatusToggler });
|
||||
};
|
||||
render() {
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'changeEmailLogStatus' does not exist on ... Remove this comment to see the full error message
|
||||
|
||||
const { changeEmailLogStatus, handleSubmit } = this.props;
|
||||
return (
|
||||
<div
|
||||
|
|
@ -152,7 +152,7 @@ class EmailLog extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'displayName' does not exist on type 'typ... Remove this comment to see the full error message
|
||||
|
||||
EmailLog.displayName = 'EmailLog';
|
||||
|
||||
const mapDispatchToProps = (dispatch: $TSFixMe) => {
|
||||
|
|
@ -181,7 +181,7 @@ const ReduxFormComponent = reduxForm({
|
|||
enableReinitialize: true,
|
||||
})(EmailLog);
|
||||
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
|
||||
|
||||
EmailLog.propTypes = {
|
||||
changeEmailLogStatus: PropTypes.object,
|
||||
handleSubmit: PropTypes.func,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue