Skip to content

Commit 2f93794

Browse files
committed
feat: Remove Viewer
BREAKING CHANGE: if you want to use the Viewer, you must import components from `cozy-viewer`. So replace `import Something from 'cozy-ui/transpiled/react/Viewer/...'` by `import Something from 'cozy-viewer/...'`
1 parent 9471b03 commit 2f93794

File tree

97 files changed

+4
-6391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+4
-6391
lines changed

docs/styleguide.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ module.exports = {
9595
'../react/SquareAppIcon',
9696
'../react/QualificationGrid',
9797
'../react/QualificationItem',
98-
'../react/UploadQueue',
99-
'../react/Viewer'
98+
'../react/UploadQueue'
10099
]
101100
},
102101
{

react/FileImageLoader/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types'
22
import { Component } from 'react'
33

44
import { withClient } from 'cozy-client'
5+
import { isEncrypted } from 'cozy-client/dist/models/file'
56
import logger from 'cozy-logger'
67

78
const PENDING = 'PENDING'
@@ -12,8 +13,7 @@ const FAILED = 'FAILED'
1213
const GET_LINK = 'GET_LINK'
1314

1415
import { checkImageSource } from './checkImageSource'
15-
import { isFileEncrypted } from '../Viewer/helpers'
16-
import { EncryptedContext } from '../Viewer/providers/EncryptedProvider'
16+
import { EncryptedContext } from '../providers/EncryptedProvider'
1717

1818
export class FileImageLoader extends Component {
1919
state = {
@@ -60,7 +60,7 @@ export class FileImageLoader extends Component {
6060

6161
loadNextSrc(lastError = null) {
6262
const { file } = this.props
63-
if (isFileEncrypted(file)) {
63+
if (isEncrypted(file)) {
6464
// No link available for encrypted files
6565
return
6666
}

react/Viewer/Footer/BottomSheetContent.jsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

react/Viewer/Footer/DownloadButton.jsx

Lines changed: 0 additions & 67 deletions
This file was deleted.

react/Viewer/Footer/FooterActionButtons.jsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

react/Viewer/Footer/FooterActionButtons.spec.jsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

react/Viewer/Footer/FooterContent.jsx

Lines changed: 0 additions & 99 deletions
This file was deleted.

react/Viewer/Footer/ForwardButton.jsx

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)