Bump react-redux-loading-bar from 4.0.8 to 5.0.4 (#18562)
parent
a44ea8af53
commit
d5ca204e89
|
@ -1,10 +1,10 @@
|
||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { PureComponent } from 'react';
|
||||||
import { LoadingBar } from 'react-redux-loading-bar';
|
import { LoadingBar } from 'react-redux-loading-bar';
|
||||||
import ZoomableImage from './zoomable_image';
|
import ZoomableImage from './zoomable_image';
|
||||||
|
|
||||||
export default class ImageLoader extends React.PureComponent {
|
export default class ImageLoader extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
alt: PropTypes.string,
|
alt: PropTypes.string,
|
||||||
|
@ -43,7 +43,7 @@ export default class ImageLoader extends React.PureComponent {
|
||||||
this.loadImage(this.props);
|
this.loadImage(this.props);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps (nextProps) {
|
UNSAFE_componentWillReceiveProps (nextProps) {
|
||||||
if (this.props.src !== nextProps.src) {
|
if (this.props.src !== nextProps.src) {
|
||||||
this.loadImage(nextProps);
|
this.loadImage(nextProps);
|
||||||
}
|
}
|
||||||
|
@ -139,14 +139,18 @@ export default class ImageLoader extends React.PureComponent {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
<LoadingBar loading={loading ? 1 : 0} className='loading-bar' style={{ width: this.state.width || width }} />
|
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<canvas
|
<>
|
||||||
className='image-loader__preview-canvas'
|
<div className='loading-bar__container' style={{ width: this.state.width || width }}>
|
||||||
ref={this.setCanvasRef}
|
<LoadingBar className='loading-bar' loading={1} />
|
||||||
width={width}
|
</div>
|
||||||
height={height}
|
<canvas
|
||||||
/>
|
className='image-loader__preview-canvas'
|
||||||
|
ref={this.setCanvasRef}
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<ZoomableImage
|
<ZoomableImage
|
||||||
alt={alt}
|
alt={alt}
|
||||||
|
|
|
@ -1783,10 +1783,14 @@ a.account__display-name {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-bar {
|
.loading-bar__container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loading-bar {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
&.image-loader--amorphous .image-loader__preview-canvas {
|
&.image-loader--amorphous .image-loader__preview-canvas {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
"react-notification": "^6.8.5",
|
"react-notification": "^6.8.5",
|
||||||
"react-overlays": "^0.9.3",
|
"react-overlays": "^0.9.3",
|
||||||
"react-redux": "^7.2.8",
|
"react-redux": "^7.2.8",
|
||||||
"react-redux-loading-bar": "^4.0.8",
|
"react-redux-loading-bar": "^5.0.4",
|
||||||
"react-router-dom": "^4.1.1",
|
"react-router-dom": "^4.1.1",
|
||||||
"react-router-scroll-4": "^1.0.0-beta.1",
|
"react-router-scroll-4": "^1.0.0-beta.1",
|
||||||
"react-select": "^5.4.0",
|
"react-select": "^5.4.0",
|
||||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -9136,7 +9136,7 @@ react-is@^18.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67"
|
||||||
integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==
|
integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==
|
||||||
|
|
||||||
react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4:
|
react-lifecycles-compat@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
||||||
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
|
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
|
||||||
|
@ -9178,13 +9178,13 @@ react-overlays@^0.9.3:
|
||||||
react-transition-group "^2.2.1"
|
react-transition-group "^2.2.1"
|
||||||
warning "^3.0.0"
|
warning "^3.0.0"
|
||||||
|
|
||||||
react-redux-loading-bar@^4.0.8:
|
react-redux-loading-bar@^5.0.4:
|
||||||
version "4.0.8"
|
version "5.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/react-redux-loading-bar/-/react-redux-loading-bar-4.0.8.tgz#e84d59d1517b79f53b0f39c8ddb40682af648c1b"
|
resolved "https://registry.yarnpkg.com/react-redux-loading-bar/-/react-redux-loading-bar-5.0.4.tgz#06dffcc53a447828dec1a26903e6b22807dd4254"
|
||||||
integrity sha512-BpR1tlYrYKFtGhxa7nAKc0dpcV33ZgXJ/jKNLpDDaxu2/cCxbkWQt9YlWT+VLw1x/7qyNYY4DH48bZdtmciSpg==
|
integrity sha512-ttLFYETh9zfyxJdTa5a1+KTWquxX3UN7F/XYslNTeCE8cpnWNpBbUOg8TcaZmOoWEWjCe/i5sV/Mvvr0xsGBBw==
|
||||||
dependencies:
|
dependencies:
|
||||||
prop-types "^15.6.2"
|
prop-types "^15.7.2"
|
||||||
react-lifecycles-compat "^3.0.2"
|
react-lifecycles-compat "^3.0.4"
|
||||||
|
|
||||||
react-redux@^7.2.8:
|
react-redux@^7.2.8:
|
||||||
version "7.2.8"
|
version "7.2.8"
|
||||||
|
|
Reference in New Issue