cozy-viewer 24.0.0 → 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [24.1.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@24.0.0...cozy-viewer@24.1.0) (2025-11-03)
7
+
8
+ ### Features
9
+
10
+ - **Viewer:** Replace some components by cozy-ui-plus ([8877be0](https://github.com/cozy/cozy-libs/commit/8877be073a4de80c9de3f6f8afb2f736b8851879))
11
+
6
12
  # [24.0.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@23.6.1...cozy-viewer@24.0.0) (2025-10-30)
7
13
 
8
14
  ### Features
@@ -19,10 +19,10 @@ var _cozyIntent = require("cozy-intent");
19
19
 
20
20
  var _Button = _interopRequireDefault(require("cozy-ui/transpiled/react/deprecated/Button"));
21
21
 
22
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
23
-
24
22
  var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
25
23
 
24
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
25
+
26
26
  var DownloadButton = function DownloadButton(_ref) {
27
27
  var client = _ref.client,
28
28
  file = _ref.file,
@@ -6,12 +6,7 @@ declare function NoViewer({ file, url, renderFallbackExtraContent }: {
6
6
  }): JSX.Element;
7
7
  declare namespace NoViewer {
8
8
  namespace propTypes {
9
- let file: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
10
- _id: PropTypes.Requireable<string>;
11
- class: PropTypes.Requireable<string>;
12
- mime: PropTypes.Requireable<string>;
13
- name: PropTypes.Requireable<string>;
14
- }>>>;
9
+ let file: any;
15
10
  let renderFallbackExtraContent: PropTypes.Requireable<(...args: any[]) => any>;
16
11
  let url: PropTypes.Requireable<string>;
17
12
  }
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
 
14
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
14
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
15
15
 
16
16
  var _DownloadButton = _interopRequireDefault(require("./DownloadButton"));
17
17
 
@@ -33,8 +33,6 @@ var _cozySharing = _interopRequireWildcard(require("cozy-sharing"));
33
33
 
34
34
  var _Dialog = _interopRequireDefault(require("cozy-ui/transpiled/react/Dialog"));
35
35
 
36
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
37
-
38
36
  var _Alert = _interopRequireDefault(require("cozy-ui/transpiled/react/providers/Alert"));
39
37
 
40
38
  var _Breakpoints = _interopRequireDefault(require("cozy-ui/transpiled/react/providers/Breakpoints"));
@@ -43,6 +41,8 @@ var _Encrypted = _interopRequireDefault(require("cozy-ui/transpiled/react/provid
43
41
 
44
42
  var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
45
43
 
44
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
45
+
46
46
  var _Viewer = _interopRequireDefault(require("./Viewer"));
47
47
 
48
48
  var _ViewerInformationsWrapper = _interopRequireDefault(require("./ViewerInformationsWrapper"));
@@ -13,7 +13,7 @@ var _react = _interopRequireDefault(require("react"));
13
13
 
14
14
  var _Button = _interopRequireDefault(require("cozy-ui/transpiled/react/deprecated/Button"));
15
15
 
16
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
16
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
17
17
 
18
18
  var _NoViewer = _interopRequireDefault(require("../NoViewer"));
19
19
 
@@ -27,12 +27,12 @@ var _cozyIntent = require("cozy-intent");
27
27
 
28
28
  var _Spinner = _interopRequireDefault(require("cozy-ui/transpiled/react/Spinner"));
29
29
 
30
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
31
-
32
30
  var _Alert = require("cozy-ui/transpiled/react/providers/Alert");
33
31
 
34
32
  var _FileImageLoader = _interopRequireDefault(require("cozy-ui-plus/dist/FileImageLoader"));
35
33
 
34
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
35
+
36
36
  var _NoViewer = _interopRequireDefault(require("../NoViewer"));
37
37
 
38
38
  var _DownloadButton = _interopRequireDefault(require("../NoViewer/DownloadButton"));
@@ -17,7 +17,7 @@ var _Openwith = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/O
17
17
 
18
18
  var _Button = require("cozy-ui/transpiled/react/deprecated/Button");
19
19
 
20
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
20
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
21
21
 
22
22
  var _NoViewer = _interopRequireDefault(require("../NoViewer"));
23
23
 
@@ -18,12 +18,7 @@ export namespace TextViewer {
18
18
  namespace propTypes {
19
19
  let client: PropTypes.Validator<object>;
20
20
  let url: PropTypes.Validator<string>;
21
- let file: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
22
- _id: PropTypes.Requireable<string>;
23
- class: PropTypes.Requireable<string>;
24
- mime: PropTypes.Requireable<string>;
25
- name: PropTypes.Requireable<string>;
26
- }>>>;
21
+ let file: any;
27
22
  let renderFallbackExtraContent: PropTypes.Requireable<(...args: any[]) => any>;
28
23
  }
29
24
  }
@@ -35,7 +35,7 @@ var _reactMarkdown = _interopRequireDefault(require("react-markdown"));
35
35
 
36
36
  var _cozyClient = require("cozy-client");
37
37
 
38
- var _proptypes = require("cozy-ui/transpiled/react/proptypes");
38
+ var _proptypes = require("cozy-ui-plus/dist/proptypes");
39
39
 
40
40
  var _NoViewer = _interopRequireDefault(require("../NoViewer"));
41
41
 
@@ -15,7 +15,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
15
15
 
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
 
18
- var _IntentDialogOpener = _interopRequireDefault(require("cozy-ui/transpiled/react/IntentDialogOpener"));
18
+ var _IntentDialogOpener = _interopRequireDefault(require("cozy-ui-plus/dist/Intent/IntentDialogOpener"));
19
19
 
20
20
  var _excluded = ["action", "doctype", "options", "disabled", "children"];
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-viewer",
3
- "version": "24.0.0",
3
+ "version": "24.1.0",
4
4
  "description": "Cozy-Viewer provides a component to show files in a viewer.",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "babel-preset-cozy-app": "^2.8.2",
32
32
  "cozy-client": "^57.0.0",
33
33
  "cozy-device-helper": "2.0.0",
34
- "cozy-harvest-lib": "^35.0.0",
34
+ "cozy-harvest-lib": "^35.1.0",
35
35
  "cozy-intent": "^2.30.1",
36
36
  "cozy-logger": "^1.17.0",
37
37
  "cozy-sharing": "^27.0.0",
@@ -66,5 +66,5 @@
66
66
  "react": ">=16.12.0",
67
67
  "react-dom": ">=16.12.0"
68
68
  },
69
- "gitHead": "125a4190ed00ae5009dc8ddfb9f2926b5ce20f5a"
69
+ "gitHead": "fc29c5612cd7e4bcd91eeec3851a1d95f254e5a3"
70
70
  }
@@ -5,8 +5,8 @@ import { withClient } from 'cozy-client'
5
5
  import { downloadFile } from 'cozy-client/dist/models/file'
6
6
  import { useWebviewIntent } from 'cozy-intent'
7
7
  import Button from 'cozy-ui/transpiled/react/deprecated/Button'
8
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
9
8
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
9
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
10
10
 
11
11
  const DownloadButton = ({ client, file, url }) => {
12
12
  const { t } = useI18n()
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
3
 
4
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
4
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
5
5
 
6
6
  import DownloadButton from './DownloadButton'
7
7
  import FileIcon from './FileIcon'
@@ -7,11 +7,11 @@ import { isDocumentReadOnly } from 'cozy-client/dist/models/permission'
7
7
  import SharingProvider from 'cozy-sharing'
8
8
  import { useSharingContext } from 'cozy-sharing'
9
9
  import Dialog from 'cozy-ui/transpiled/react/Dialog'
10
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
11
10
  import AlertProvider from 'cozy-ui/transpiled/react/providers/Alert'
12
11
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
13
12
  import EncryptedProvider from 'cozy-ui/transpiled/react/providers/Encrypted'
14
13
  import { useExtendI18n } from 'cozy-ui/transpiled/react/providers/I18n'
14
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
15
15
 
16
16
  import Viewer from './Viewer'
17
17
  import ViewerInformationsWrapper from './ViewerInformationsWrapper'
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
3
 
4
4
  import Button from 'cozy-ui/transpiled/react/deprecated/Button'
5
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
5
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
6
6
 
7
7
  import NoViewer from '../NoViewer'
8
8
  import { withViewerLocales } from '../hoc/withViewerLocales'
@@ -6,9 +6,9 @@ import { useClient } from 'cozy-client'
6
6
  import { downloadFile } from 'cozy-client/dist/models/file'
7
7
  import { useWebviewIntent } from 'cozy-intent'
8
8
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
9
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
10
9
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
11
10
  import FileImageLoader from 'cozy-ui-plus/dist/FileImageLoader'
11
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
12
12
 
13
13
  import styles from './styles.styl'
14
14
  import NoViewer from '../NoViewer'
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import { useClient, useFetchShortcut } from 'cozy-client'
5
5
  import OpenwithIcon from 'cozy-ui/transpiled/react/Icons/Openwith'
6
6
  import { ButtonLink } from 'cozy-ui/transpiled/react/deprecated/Button'
7
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
7
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
8
8
 
9
9
  import NoViewer from '../NoViewer'
10
10
  import { withViewerLocales } from '../hoc/withViewerLocales'
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import ReactMarkdown from 'react-markdown'
5
5
 
6
6
  import { withClient, models } from 'cozy-client'
7
- import { FileDoctype } from 'cozy-ui/transpiled/react/proptypes'
7
+ import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
8
8
 
9
9
  import styles from './styles.styl'
10
10
  import NoViewer from '../NoViewer'
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types'
2
2
  import React from 'react'
3
3
 
4
- import IntentDialogOpener from 'cozy-ui/transpiled/react/IntentDialogOpener'
4
+ import IntentDialogOpener from 'cozy-ui-plus/dist/Intent/IntentDialogOpener'
5
5
 
6
6
  const IntentOpener = ({
7
7
  action,