Skip to content

Commit

Permalink
chore(#1137): update rc-slider from 9.7.2 to 10.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
d1mon1k committed Sep 11, 2022
1 parent e960319 commit 5e6f2f1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 94 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lodash": "4.17.21",
"mousetrap": "1.6.5",
"normalizr": "3.6.2",
"rc-slider": "9.7.2",
"rc-slider": "10.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-easy-crop": "4.5.0",
Expand Down
39 changes: 9 additions & 30 deletions src/components/photo-editor/photo-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const handleStyle: React.CSSProperties = {
bottom: '-6px',
boxSizing: 'border-box',
height: '20px',
left: '50%',
position: 'absolute',
transform: 'translateX(-50%)',
width: '20px',
Expand Down Expand Up @@ -60,11 +59,7 @@ interface ICrop {

const BLOCK_NAME = 'photo-editor';

const InitialPhotoEditor: React.FC<IInitialPhotoEditorProps & IModalChildrenProps> = ({
imageUrl,
onSubmit,
animatedClose,
}) => {
const InitialPhotoEditor: React.FC<IInitialPhotoEditorProps & IModalChildrenProps> = ({ imageUrl, onSubmit, animatedClose }) => {
const { t } = useTranslation();

const cancelAvatarUploading = useActionWithDispatch(cancelAvatarUploadingRequestAction);
Expand Down Expand Up @@ -164,12 +159,7 @@ const InitialPhotoEditor: React.FC<IInitialPhotoEditorProps & IModalChildrenProp
/>
</div>
<div className={`${BLOCK_NAME}__slider-section`}>
<PeisageSvg
className={classNames(
`${BLOCK_NAME}__slider-peisage`,
`${BLOCK_NAME}__slider-peisage--little`,
)}
/>
<PeisageSvg className={classNames(`${BLOCK_NAME}__slider-peisage`, `${BLOCK_NAME}__slider-peisage--little`)} />
<div className={`${BLOCK_NAME}__slider-container`}>
<Slider
handleStyle={handleStyle}
Expand All @@ -178,15 +168,12 @@ const InitialPhotoEditor: React.FC<IInitialPhotoEditorProps & IModalChildrenProp
min={1}
max={3}
step={0.1}
onChange={setZoom}
onChange={(value) => {
if (typeof value === 'number') setZoom(value);
}}
/>
</div>
<PeisageSvg
className={classNames(
`${BLOCK_NAME}__slider-peisage`,
`${BLOCK_NAME}__slider-peisage--big`,
)}
/>
<PeisageSvg className={classNames(`${BLOCK_NAME}__slider-peisage`, `${BLOCK_NAME}__slider-peisage--big`)} />
</div>
<div className={`${BLOCK_NAME}__btn-group`}>
<button onClick={rotateLeft} type="button" className={`${BLOCK_NAME}__modify-btn`}>
Expand All @@ -204,10 +191,7 @@ const InitialPhotoEditor: React.FC<IInitialPhotoEditorProps & IModalChildrenProp
</div>

<div className={`${BLOCK_NAME}__btn-block`}>
<Button
type="button"
className={classNames(`${BLOCK_NAME}__btn`, `${BLOCK_NAME}__btn--cancel`)}
onClick={animatedClose}>
<Button type="button" className={classNames(`${BLOCK_NAME}__btn`, `${BLOCK_NAME}__btn--cancel`)} onClick={animatedClose}>
{t('changePhoto.reject')}
</Button>
<Button
Expand All @@ -223,13 +207,8 @@ const InitialPhotoEditor: React.FC<IInitialPhotoEditorProps & IModalChildrenProp
);
};

const PhotoEditor: React.FC<IPhotoEditorProps & IInitialPhotoEditorProps> = ({
hideChangePhoto,
...props
}) => (
<Modal closeModal={hideChangePhoto}>
{(animatedClose: () => void) => <InitialPhotoEditor {...props} animatedClose={animatedClose} />}
</Modal>
const PhotoEditor: React.FC<IPhotoEditorProps & IInitialPhotoEditorProps> = ({ hideChangePhoto, ...props }) => (
<Modal closeModal={hideChangePhoto}>{(animatedClose: () => void) => <InitialPhotoEditor {...props} animatedClose={animatedClose} />}</Modal>
);

export default PhotoEditor;
74 changes: 11 additions & 63 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@
core-js-pure "^3.20.2"
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.5", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.5", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a"
integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==
Expand Down Expand Up @@ -4299,7 +4299,7 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

[email protected], classnames@2.x, classnames@^2.2.1, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1:
[email protected], classnames@^2.2.5:
version "2.3.1"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e"
integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==
Expand Down Expand Up @@ -5358,11 +5358,6 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"

dom-align@^1.7.0:
version "1.12.3"
resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.12.3.tgz#a36d02531dae0eefa2abb0c4db6595250526f103"
integrity sha512-Gj9hZN3a07cbR6zviMUBOMPdWxYhbMI+x+WS0NAIu2zFZmbK8ys9R79g+iG9qLnlCwpFoaB+fKy8Pdv470GsPA==

dom-converter@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768"
Expand Down Expand Up @@ -11224,62 +11219,20 @@ [email protected]:
iconv-lite "0.4.24"
unpipe "1.0.0"

rc-align@^4.0.0:
version "4.0.12"
resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-4.0.12.tgz#065b5c68a1cc92a00800c9239320d9fdf5f16207"
integrity sha512-3DuwSJp8iC/dgHzwreOQl52soj40LchlfUHtgACOUtwGuoFIOVh6n/sCpfqCU8kO5+iz6qR0YKvjgB8iPdE3aQ==
dependencies:
"@babel/runtime" "^7.10.1"
classnames "2.x"
dom-align "^1.7.0"
lodash "^4.17.21"
rc-util "^5.3.0"
resize-observer-polyfill "^1.5.1"

rc-motion@^2.0.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rc-motion/-/rc-motion-2.6.2.tgz#3d31f97e41fb8e4f91a4a4189b6a98ac63342869"
integrity sha512-4w1FaX3dtV749P8GwfS4fYnFG4Rb9pxvCYPc/b2fw1cmlHJWNNgOFIz7ysiD+eOrzJSvnLJWlNQQncpNMXwwpg==
dependencies:
"@babel/runtime" "^7.11.1"
classnames "^2.2.1"
rc-util "^5.21.0"

[email protected]:
version "9.7.2"
resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-9.7.2.tgz#282f571f7582752ebaa33964e441184f4e79ad74"
integrity sha512-mVaLRpDo6otasBs6yVnG02ykI3K6hIrLTNfT5eyaqduFv95UODI9PDS6fWuVVehVpdS4ENgOSwsTjrPVun+k9g==
[email protected]:
version "10.0.1"
resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-10.0.1.tgz#7058c68ff1e1aa4e7c3536e5e10128bdbccb87f9"
integrity sha512-igTKF3zBet7oS/3yNiIlmU8KnZ45npmrmHlUUio8PNbIhzMcsh+oE/r2UD42Y6YD2D/s+kzCQkzQrPD6RY435Q==
dependencies:
"@babel/runtime" "^7.10.1"
classnames "^2.2.5"
rc-tooltip "^5.0.1"
rc-util "^5.0.0"
rc-util "^5.18.1"
shallowequal "^1.1.0"

rc-tooltip@^5.0.1:
version "5.2.2"
resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-5.2.2.tgz#e5cafa8ecebf78108936a0bcb93c150fa81ac93b"
integrity sha512-jtQzU/18S6EI3lhSGoDYhPqNpWajMtS5VV/ld1LwyfrDByQpYmw/LW6U7oFXXLukjfDHQ7Ju705A82PRNFWYhg==
dependencies:
"@babel/runtime" "^7.11.2"
classnames "^2.3.1"
rc-trigger "^5.0.0"

rc-trigger@^5.0.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-5.3.1.tgz#acafadf3eaf384e7f466c303bfa0f34c8137d7b8"
integrity sha512-5gaFbDkYSefZ14j2AdzucXzlWgU2ri5uEjkHvsf1ynRhdJbKxNOnw4PBZ9+FVULNGFiDzzlVF8RJnR9P/xrnKQ==
dependencies:
"@babel/runtime" "^7.18.3"
classnames "^2.2.6"
rc-align "^4.0.0"
rc-motion "^2.0.0"
rc-util "^5.19.2"

rc-util@^5.0.0, rc-util@^5.19.2, rc-util@^5.21.0, rc-util@^5.3.0:
version "5.23.0"
resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.23.0.tgz#a583b1ec3e1832a80eced7a700a494af0b590743"
integrity sha512-lgm6diJ/pLgyfoZY59Vz7sW4mSoQCgozqbBye9IJ7/mb5w5h4T7h+i2JpXAx/UBQxscBZe68q0sP7EW+qfkKUg==
rc-util@^5.18.1:
version "5.24.2"
resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.24.2.tgz#b90057dd880e1ba2bea63028ef1892101a48bc0c"
integrity sha512-MWd0ZEV7xSwN4HM9jz9BwpnMzwCPjYJ7K90lePsrdgAkrmm8U7b4BOTIsv/84BQsaF7N3ejNkcrZ3AfEwc9HXA==
dependencies:
"@babel/runtime" "^7.18.3"
react-is "^16.12.0"
Expand Down Expand Up @@ -11801,11 +11754,6 @@ reselect@^4.1.5:
resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.6.tgz#19ca2d3d0b35373a74dc1c98692cdaffb6602656"
integrity sha512-ZovIuXqto7elwnxyXbBtCPo9YFEr3uJqj2rRbcOOog1bmu2Ag85M4hixSwFWyaBMKXNgvPaJ9OSu9SkBPIeJHQ==

resize-observer-polyfill@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==

resolve-cwd@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
Expand Down

0 comments on commit 5e6f2f1

Please sign in to comment.