mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 02:25:18 +00:00
IS-549: Bump packages (#308)
This commit is contained in:
parent
9b5d0e88c5
commit
5c65d93c24
@ -41,7 +41,7 @@ module.exports = {
|
||||
{ from: './src/appConfig.json', to: '..' },
|
||||
{ from: './src/locale/*.json', to: './locale', flatten: true }
|
||||
],
|
||||
{ debug: 'warning' }
|
||||
{ logLevel: 'warn' }
|
||||
)
|
||||
]
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ module.exports = {
|
||||
}),
|
||||
new CopyWebpackPlugin(
|
||||
[{ from: './src/samsung-pay-interaction/assets/js', to: './assets/samsung-pay-interaction/js' }],
|
||||
{ debug: 'warning' }
|
||||
{ logLevel: 'warn' }
|
||||
)
|
||||
]
|
||||
};
|
||||
|
2
lgtm.yml
Normal file
2
lgtm.yml
Normal file
@ -0,0 +1,2 @@
|
||||
queries:
|
||||
- exclude: src/app/samsung-pay-interaction/assets
|
969
package-lock.json
generated
969
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -50,7 +50,7 @@
|
||||
"fingerprintjs2": "~1.6.1",
|
||||
"ismobilejs": "~0.4.1",
|
||||
"libphonenumber-js": "1.1.4",
|
||||
"lodash-es": "~4.17.5",
|
||||
"lodash-es": "~4.17.15",
|
||||
"react": "~16.6.3",
|
||||
"react-dom": "~16.6.3",
|
||||
"react-redux": "~5.1.1",
|
||||
@ -83,8 +83,8 @@
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "~6.26.2",
|
||||
"babel-preset-env": "~1.7.0",
|
||||
"cache-loader": "~2.0.1",
|
||||
"compression-webpack-plugin": "~2.0.0",
|
||||
"copy-webpack-plugin": "~4.6.0",
|
||||
"compression-webpack-plugin": "~3.1.0",
|
||||
"copy-webpack-plugin": "~5.1.1",
|
||||
"cross-origin-communicator": "git+ssh://git@github.com/rbkmoney/cross-origin-communicator.git#dc3209dab12fb5d745c21b72d10ebe567270a836",
|
||||
"css-loader": "~1.0.1",
|
||||
"file-loader": "~2.0.0",
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import styled from 'checkout/styled-components';
|
||||
import { css } from 'checkout/styled-components';
|
||||
|
||||
|
@ -37,7 +37,7 @@ export const SecureCodeDef: React.FC<SecureCodeProps> = (props) => (
|
||||
name="secureCode"
|
||||
component={getCustomInput.bind(null, props)}
|
||||
validate={validateSecureCode}
|
||||
normalize={(value, p, { cardNumber }) => formatCVC(value, cardNumber)}
|
||||
normalize={(value, _p, { cardNumber }) => formatCVC(value, cardNumber)}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import { Omit } from 'react-redux';
|
||||
|
||||
import { ChevronLeft } from 'checkout/components';
|
||||
import styled from 'checkout/styled-components';
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import styled from 'checkout/styled-components';
|
||||
|
||||
export const NumerableList = styled.ul`
|
||||
|
@ -44,21 +44,19 @@ class PaymentMethodsDef extends React.Component<PaymentMethodsProps, PaymentMeth
|
||||
componentWillMount() {
|
||||
const { methods } = this.props;
|
||||
const visibilityThreshold = 3;
|
||||
const visibleMethods = methods.filter((m, i) => i < visibilityThreshold);
|
||||
const visibleMethods = methods.filter((_m, i) => i < visibilityThreshold);
|
||||
this.setState({ visibleMethods });
|
||||
this.showAllMethods = this.showAllMethods.bind(this);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: PaymentMethodsProps, prevState: PaymentMethodsState) {
|
||||
componentDidUpdate(_prevProps: PaymentMethodsProps, prevState: PaymentMethodsState) {
|
||||
if (prevState.visibleMethods !== this.state.visibleMethods) {
|
||||
this.props.setViewInfoHeight(this.formElement.clientHeight);
|
||||
}
|
||||
}
|
||||
|
||||
showAllMethods() {
|
||||
this.setState({
|
||||
visibleMethods: this.props.methods
|
||||
});
|
||||
this.setState((_state, { methods }) => ({ visibleMethods: methods }));
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import * as React from 'react';
|
||||
import { InvoiceEvent, InvoiceStatusChanged, InvoiceStatuses, LogicError, LogicErrorCode } from 'checkout/backend';
|
||||
import { Locale } from 'checkout/locale';
|
||||
import { ResultFormContent, ResultFormType } from './result-form-content';
|
||||
|
@ -1,4 +1,3 @@
|
||||
import * as React from 'react';
|
||||
import { Locale } from 'checkout/locale';
|
||||
import { InvoiceEvent, LogicError, PaymentError, PaymentStatusChanged, PaymentStatuses } from 'checkout/backend';
|
||||
import { ResultFormContent } from './result-form-content';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Locale } from 'checkout/locale';
|
||||
import { ModelState, ResultState, ResultFormInfo, FormInfo, EventsState } from 'checkout/state';
|
||||
import { ResultState, ResultFormInfo, FormInfo, EventsState } from 'checkout/state';
|
||||
import { LogicError } from 'checkout/backend';
|
||||
import { IntegrationType } from 'checkout/config';
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import styled from 'checkout/styled-components';
|
||||
|
||||
export const Link = styled.a`
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { InvoiceTemplateLineCostFixed } from 'checkout/backend';
|
||||
import { getAmountFromSingleLine } from './get-amount-from-single-line';
|
||||
import { AmountInfoStatus } from 'checkout/state';
|
||||
|
||||
|
@ -15,9 +15,6 @@ const checkForInvoiceAndTemplate = (paymentMethods: PaymentMethod[]): CheckResul
|
||||
|
||||
export const checkBankCard = (initConfig: InitConfig, paymentMethods: PaymentMethod[]): CheckResult => {
|
||||
const { bankCard, googlePay, applePay, samsungPay, wallets, terminals, integrationType } = initConfig;
|
||||
if (bankCard) {
|
||||
return { available: true };
|
||||
}
|
||||
if (!(bankCard || wallets || terminals || googlePay || samsungPay || applePay)) {
|
||||
return {
|
||||
available: false,
|
||||
@ -25,6 +22,9 @@ export const checkBankCard = (initConfig: InitConfig, paymentMethods: PaymentMet
|
||||
message: 'You can not disable all payment methods.'
|
||||
};
|
||||
}
|
||||
if (bankCard) {
|
||||
return { available: true };
|
||||
}
|
||||
switch (integrationType) {
|
||||
case IntegrationType.invoiceTemplate:
|
||||
case IntegrationType.invoice:
|
||||
|
@ -18,7 +18,7 @@ async function isReadyToPay(): Promise<boolean> {
|
||||
*/
|
||||
const { result } = (await Promise.race([
|
||||
paymentsClient.isReadyToPay({ allowedPaymentMethods }),
|
||||
new Promise((res, rej) => setTimeout(() => rej(new Error('timeout')), 3000))
|
||||
new Promise((_res, rej) => setTimeout(() => rej(new Error('timeout')), 3000))
|
||||
])) as ReadyToPayResponse;
|
||||
return result;
|
||||
} catch (e) {
|
||||
@ -27,7 +27,7 @@ async function isReadyToPay(): Promise<boolean> {
|
||||
}
|
||||
}
|
||||
|
||||
export function* isReadyToGooglePay(amountInfo: AmountInfoState): Iterator<CallEffect | boolean> {
|
||||
export function* isReadyToGooglePay(_amountInfo: AmountInfoState): Iterator<CallEffect | boolean> {
|
||||
if (yield call(loadThirdPartLib, 'https://pay.google.com/gp/p/js/pay.js')) {
|
||||
return yield call(isReadyToPay);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { call, CallEffect, put, PutEffect } from 'redux-saga/effects';
|
||||
import { PaymentMethod, ModelState, EventsState } from 'checkout/state';
|
||||
import { PaymentMethod, EventsState } from 'checkout/state';
|
||||
import { InitializeModalCompleted, TypeKeys } from 'checkout/actions';
|
||||
import { InitConfig, IntegrationType } from 'checkout/config';
|
||||
import { toInitialState } from './to-initial-state';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Transport } from 'cross-origin-communicator';
|
||||
|
||||
export class StubTransport implements Transport {
|
||||
emit(eventName: string, data?: object) {
|
||||
emit(_eventName: string, data?: object) {
|
||||
console.info('transport stub emit: ', name, data);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ const getOuterForm = (element: HTMLScriptElement) => {
|
||||
};
|
||||
|
||||
const prepareUserConfig = (element: HTMLScriptElement): object => ({
|
||||
...mapKeys(element.dataset, (value, key) => key.replace('Id', 'ID')),
|
||||
...mapKeys(element.dataset, (_value, key) => key.replace('Id', 'ID')),
|
||||
finished: () => {
|
||||
const outerForm = getOuterForm(element);
|
||||
if (outerForm) {
|
||||
|
@ -1 +1,2 @@
|
||||
// lgtm[js/conditional-comment]
|
||||
export const isIE: boolean = /*@cc_on!@*/ false || (!!document as any).documentMode;
|
||||
|
@ -12,7 +12,9 @@
|
||||
"paths": {
|
||||
"checkout/*": ["./src/app/*", "./src/locale/*"]
|
||||
},
|
||||
"pretty": true
|
||||
"pretty": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true
|
||||
},
|
||||
"include": ["./src/**/*", "./types/**/*"]
|
||||
}
|
||||
|
11
tslint.json
11
tslint.json
@ -11,6 +11,15 @@
|
||||
"no-namespace": false,
|
||||
"jsx-alignment": false,
|
||||
"jsx-no-multiline-js": false,
|
||||
"jsx-no-lambda": false
|
||||
"jsx-no-lambda": false,
|
||||
"variable-name": {
|
||||
"options": [
|
||||
"ban-keywords",
|
||||
"check-format",
|
||||
"allow-leading-underscore",
|
||||
"allow-pascal-case",
|
||||
"require-const-for-all-caps"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user