From bf60a92cf2c4197b54f4ec153bba0789795b15fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Thu, 31 Oct 2024 09:04:16 +0100 Subject: [PATCH] feat: Use Viewer from cozy-viewer instead of cozy-ui BREAKING CHANGE: you must now use `cozy-client >= 50.0.0`, `cozy-viewer >=2.3.0`, `cozy-intent >= 2.26.0` and `cozy-ui >= 112.2.0` --- packages/cozy-harvest-lib/package.json | 14 +++--- .../src/datacards/ViewerModal.jsx | 2 +- yarn.lock | 47 +------------------ 3 files changed, 10 insertions(+), 53 deletions(-) diff --git a/packages/cozy-harvest-lib/package.json b/packages/cozy-harvest-lib/package.json index 4bdecfa7ed..37a642bb90 100644 --- a/packages/cozy-harvest-lib/package.json +++ b/packages/cozy-harvest-lib/package.json @@ -65,15 +65,16 @@ "babel-jest": "26.6.3", "babel-plugin-inline-react-svg": "1.1.2", "babel-preset-cozy-app": "^2.5.0", - "cozy-client": "^48.8.0", + "cozy-client": "^50.0.0", + "cozy-intent": "^2.26.0", "cozy-device-helper": "^3.4.0", "cozy-flags": "^4.3.0", - "cozy-intent": "^2.26.0", "cozy-interapp": "^0.12.0", "cozy-keys-lib": "^6.1.1", "cozy-realtime": "^5.3.0", "cozy-tsconfig": "^1.5.0", - "cozy-ui": "^111.12.0", + "cozy-ui": "^112.2.0", + "cozy-viewer": "^2.3.0", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.6", "form-data": "4.0.0", @@ -95,14 +96,15 @@ "peerDependencies": { "@babel/runtime": ">=7.12.5", "@sentry/react": ">=7.118.0", - "cozy-client": ">=48.8.0", + "cozy-client": ">=50.0.0", + "cozy-intent": ">=2.26.0", "cozy-device-helper": ">=2.6.0", "cozy-flags": ">=2.3.5", - "cozy-intent": ">=1.14.1", "cozy-interapp": ">=0.9.0", "cozy-keys-lib": ">=6.1.1", "cozy-realtime": ">=4.2.8", - "cozy-ui": ">=111.12.0", + "cozy-ui": ">=112.2.0", + "cozy-viewer": ">=2.3.0", "leaflet": "^1.7.1", "react-router": "3.2.6", "react-router-dom": ">=4.3.1" diff --git a/packages/cozy-harvest-lib/src/datacards/ViewerModal.jsx b/packages/cozy-harvest-lib/src/datacards/ViewerModal.jsx index d7671c9f4b..6f671c5d21 100644 --- a/packages/cozy-harvest-lib/src/datacards/ViewerModal.jsx +++ b/packages/cozy-harvest-lib/src/datacards/ViewerModal.jsx @@ -2,8 +2,8 @@ import React, { useContext } from 'react' import { useParams } from 'react-router-dom' import { models, useQuery } from 'cozy-client' -import Viewer from 'cozy-ui/transpiled/react/Viewer' import Overlay from 'cozy-ui/transpiled/react/deprecated/Overlay' +import Viewer from 'cozy-viewer' import { useDataCardFiles } from './useDataCardFiles' import { MountPointContext } from '../components/MountPointContext' diff --git a/yarn.lock b/yarn.lock index d21b7bab1a..d8299841ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10598,7 +10598,7 @@ cozy-client@40.5.0: sift "^6.0.0" url-search-params-polyfill "^8.0.0" -cozy-client@50.0.0: +cozy-client@50.0.0, cozy-client@^50.0.0: version "50.0.0" resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-50.0.0.tgz#23708bffadc5fa96776021ac6a884a8a290453a9" integrity sha512-n0VQxnMBrHTPAlHRWR/Ty+nOG9VFNhiTdknKfMLmlrVExNKLN8N2yjVa24nBPaa7JVJYemxvR40XQzwZpx/rcQ== @@ -10698,31 +10698,6 @@ cozy-client@^48.25.0: sift "^6.0.0" url-search-params-polyfill "^8.0.0" -cozy-client@^48.8.0: - version "48.8.0" - resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-48.8.0.tgz#66bfe0d1866013080ca39083faf6dd0d59548c33" - integrity sha512-o/TmAlgn0xbdxrV928eVYtORE1g0Xykx32LeT83iQaRe26F4mnz4WVpcwizNH1zV7OTue8LNhLHPHZypCO23AQ== - dependencies: - "@cozy/minilog" "1.0.0" - "@types/jest" "^26.0.20" - "@types/lodash" "^4.14.170" - btoa "^1.2.1" - cozy-stack-client "^48.6.0" - date-fns "2.29.3" - json-stable-stringify "^1.0.1" - lodash "^4.17.13" - microee "^0.0.6" - node-fetch "^2.6.1" - node-polyglot "2.4.2" - open "7.4.2" - prop-types "^15.6.2" - react-redux "^7.2.0" - redux "3 || 4" - redux-thunk "^2.3.0" - server-destroy "^1.0.1" - sift "^6.0.0" - url-search-params-polyfill "^8.0.0" - cozy-device-helper@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/cozy-device-helper/-/cozy-device-helper-2.0.0.tgz#1d08b6cb74709ef941b4d8214f13a6dc7e3910ec" @@ -10864,15 +10839,6 @@ cozy-stack-client@^48.16.0: mime "^2.4.0" qs "^6.7.0" -cozy-stack-client@^48.6.0: - version "48.6.0" - resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-48.6.0.tgz#c2d2697fcc9061c87425a2f9abc69aff41a94882" - integrity sha512-pYrGc1ZWJPWZ2jshBb+IRvGHl8ByHcRCqkgSaAsEzcrlrZzxPWnkSAVekZrPbSDx+Pwg2UE/d8puCF+wEtk+6w== - dependencies: - detect-node "^2.0.4" - mime "^2.4.0" - qs "^6.7.0" - cozy-stack-client@^50.0.0: version "50.0.0" resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-50.0.0.tgz#fa86c3cb48b21d1a7f8d4d6d133a927c2404b846" @@ -19678,17 +19644,6 @@ msgpack5@^4.0.2: readable-stream "^2.3.6" safe-buffer "^5.1.2" -"mui-bottom-sheet@git+https://github.com/cozy/mui-bottom-sheet.git#v1.0.9": - version "1.0.8" - uid "3dc4c2a245ab39079bc2f73546bccf80847be14c" - resolved "git+https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c" - dependencies: - "@juggle/resize-observer" "^3.1.3" - jest-environment-jsdom-sixteen "^1.0.3" - react-spring "9.0.0-rc.3" - react-use-gesture "^7.0.8" - react-use-measure "^2.0.0" - "mui-bottom-sheet@https://github.com/cozy/mui-bottom-sheet.git#v1.0.9": version "1.0.8" resolved "https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c"