cozy-viewer 30.0.30 → 30.0.32

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,14 @@
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
+ ## [30.0.32](https://github.com/cozy/cozy-libs/compare/cozy-viewer@30.0.31...cozy-viewer@30.0.32) (2026-08-24)
7
+
8
+ **Note:** Version bump only for package cozy-viewer
9
+
10
+ ## [30.0.31](https://github.com/cozy/cozy-libs/compare/cozy-viewer@30.0.30...cozy-viewer@30.0.31) (2026-08-24)
11
+
12
+ **Note:** Version bump only for package cozy-viewer
13
+
6
14
  ## [30.0.30](https://github.com/cozy/cozy-libs/compare/cozy-viewer@30.0.29...cozy-viewer@30.0.30) (2026-07-30)
7
15
 
8
16
  **Note:** Version bump only for package cozy-viewer
package/Readme.md CHANGED
@@ -8,7 +8,6 @@ Cozy-Viewer provides a component to show files in a viewer.
8
8
  - You must have [WebviewIntent Provider](https://github.com/cozy/cozy-libs/blob/b1ad6f5933b463878f641d9fbb63eddd4c45b0d0/packages/cozy-intent/src/view/components/WebviewIntentProvider.tsx#L89)
9
9
  - You must have [CozySharing Provider](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-sharing)
10
10
  - In order to download and display the files, it will need a `cozy-client` instance in the React context.
11
- - To have the panels, the app need to have [cozy-harvest-lib](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-harvest-lib) installed
12
11
  - See peer dependencies to be sure to not miss anything
13
12
 
14
13
  ## Usage
@@ -7,12 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.getPanelBlocksSpecs = exports.default = void 0;
9
9
 
10
- var _file = require("cozy-client/dist/models/file");
11
-
12
10
  var _cozyFlags = _interopRequireDefault(require("cozy-flags"));
13
11
 
14
- var _KonnectorBlock = _interopRequireDefault(require("cozy-harvest-lib/dist/components/KonnectorBlock"));
15
-
16
12
  var _Antivirus = _interopRequireDefault(require("./Antivirus"));
17
13
 
18
14
  var _Informations = _interopRequireDefault(require("./Informations"));
@@ -72,14 +68,6 @@ var getPanelBlocksSpecs = function getPanelBlocksSpecs() {
72
68
  },
73
69
  component: _Summary.default
74
70
  },
75
- konnector: {
76
- condition: function condition(file) {
77
- var _panelProps$konnector;
78
-
79
- return !(panelProps !== null && panelProps !== void 0 && (_panelProps$konnector = panelProps.konnector) !== null && _panelProps$konnector !== void 0 && _panelProps$konnector.disabled) && (0, _file.isFromKonnector)(file) && !isPublic;
80
- },
81
- component: _KonnectorBlock.default
82
- },
83
71
  informations: {
84
72
  condition: function condition() {
85
73
  var _panelProps$informati;
@@ -125,14 +113,6 @@ var getPanelBlocksSpecs = function getPanelBlocksSpecs() {
125
113
  },
126
114
  component: _Summary.default
127
115
  },
128
- konnector: {
129
- condition: function condition(file) {
130
- var _panelProps$konnector2;
131
-
132
- return !(panelProps !== null && panelProps !== void 0 && (_panelProps$konnector2 = panelProps.konnector) !== null && _panelProps$konnector2 !== void 0 && _panelProps$konnector2.disabled) && (0, _file.isFromKonnector)(file) && !isPublic;
133
- },
134
- component: _KonnectorBlock.default
135
- },
136
116
  informations: {
137
117
  condition: function condition() {
138
118
  var _panelProps$informati2;
@@ -254,10 +254,6 @@ ViewerContainer.propTypes = {
254
254
  /** Whether the summary panel is disabled */
255
255
  disabled: _propTypes.default.bool
256
256
  }),
257
- konnector: _propTypes.default.shape({
258
- /** Whether the konnector panel is disabled */
259
- disabled: _propTypes.default.bool
260
- }),
261
257
  informations: _propTypes.default.shape({
262
258
  /** Whether the informations panel is disabled */
263
259
  disabled: _propTypes.default.bool
package/jest.config.js CHANGED
@@ -20,13 +20,9 @@ module.exports = {
20
20
  '^cozy-flags$': '<rootDir>/test/__mocks__/cozyFlagsMock.js',
21
21
  '^cozy-intent$': '<rootDir>/test/__mocks__/cozy-intent.js',
22
22
  '^cozy-sharing$': '<rootDir>/test/__mocks__/cozy-sharing.js',
23
- '^twake-i18n$': '<rootDir>/test/__mocks__/twake-i18n.js',
24
- '^cozy-harvest-lib/dist/components/KonnectorBlock$':
25
- '<rootDir>/test/__mocks__/cozy-harvest-lib.js'
23
+ '^twake-i18n$': '<rootDir>/test/__mocks__/twake-i18n.js'
26
24
  },
27
- transformIgnorePatterns: [
28
- 'node_modules/(?!(cozy-ui|cozy-harvest-lib|cozy-ui-plus))'
29
- ],
25
+ transformIgnorePatterns: ['node_modules/(?!(cozy-ui|cozy-ui-plus))'],
30
26
  transform: {
31
27
  '^.+\\.(ts|tsx|js|jsx)?$': 'babel-jest'
32
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-viewer",
3
- "version": "30.0.30",
3
+ "version": "30.0.32",
4
4
  "description": "Cozy-Viewer provides a component to show files in a viewer.",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -32,12 +32,11 @@
32
32
  "babel-preset-cozy-app": "^2.8.4",
33
33
  "cozy-client": "^60.20.0",
34
34
  "cozy-device-helper": "2.0.0",
35
- "cozy-harvest-lib": "^39.0.30",
36
35
  "cozy-intent": "^2.31.1",
37
36
  "cozy-logger": "^1.18.1",
38
- "cozy-sharing": "^37.2.12",
37
+ "cozy-sharing": "^37.3.0",
39
38
  "cozy-ui": "^138.1.0",
40
- "cozy-ui-plus": "^12.3.6",
39
+ "cozy-ui-plus": "^12.3.7",
41
40
  "identity-obj-proxy": "3.0.0",
42
41
  "jest": "30.3.0",
43
42
  "jest-canvas-mock": "2.3.1",
@@ -62,7 +61,6 @@
62
61
  "cozy-client": ">=57.0.0",
63
62
  "cozy-device-helper": ">=2.0.0",
64
63
  "cozy-flags": ">=4.8.1",
65
- "cozy-harvest-lib": ">=32.2.12",
66
64
  "cozy-intent": ">=2.30.0",
67
65
  "cozy-logger": ">=1.17.0",
68
66
  "cozy-sharing": ">=30.0.0",
@@ -73,5 +71,5 @@
73
71
  "react-router-dom": ">=6.14.2",
74
72
  "twake-i18n": ">=0.3.0"
75
73
  },
76
- "gitHead": "8dbc03f6ef437764cfec18a0b2a6e1b44102f7c3"
74
+ "gitHead": "77fc4a18e95c9f170bfab99672db9c4ee6a852b6"
77
75
  }
@@ -1,6 +1,4 @@
1
- import { isFromKonnector } from 'cozy-client/dist/models/file'
2
1
  import flag from 'cozy-flags'
3
- import KonnectorBlock from 'cozy-harvest-lib/dist/components/KonnectorBlock'
4
2
 
5
3
  import Antivirus from './Antivirus'
6
4
  import Informations from './Informations'
@@ -42,13 +40,6 @@ export const getPanelBlocksSpecs = (isPublic = false, panelProps) =>
42
40
  condition: () => !panelProps?.summary?.disabled,
43
41
  component: Summary
44
42
  },
45
- konnector: {
46
- condition: file =>
47
- !panelProps?.konnector?.disabled &&
48
- isFromKonnector(file) &&
49
- !isPublic,
50
- component: KonnectorBlock
51
- },
52
43
  informations: {
53
44
  condition: () => !panelProps?.informations?.disabled,
54
45
  component: Informations
@@ -74,13 +65,6 @@ export const getPanelBlocksSpecs = (isPublic = false, panelProps) =>
74
65
  condition: () => !panelProps?.summary?.disabled,
75
66
  component: Summary
76
67
  },
77
- konnector: {
78
- condition: file =>
79
- !panelProps?.konnector?.disabled &&
80
- isFromKonnector(file) &&
81
- !isPublic,
82
- component: KonnectorBlock
83
- },
84
68
  informations: {
85
69
  condition: () => !panelProps?.informations?.disabled,
86
70
  component: Informations
@@ -4,7 +4,6 @@ import getPanelBlocks, { getPanelBlocksSpecs } from './getPanelBlocks'
4
4
 
5
5
  jest.mock('./Sharing', () => () => <div data-testid="SharingBlock" />)
6
6
 
7
- jest.mock('cozy-harvest-lib/dist/components/KonnectorBlock', () => jest.fn())
8
7
  const block1Component = jest.fn()
9
8
  const block2Component = jest.fn()
10
9
 
@@ -78,10 +77,6 @@ describe('getPanelBlocksSpecs', () => {
78
77
  condition: expect.any(Function),
79
78
  component: expect.anything()
80
79
  },
81
- konnector: {
82
- condition: expect.any(Function),
83
- component: expect.anything()
84
- },
85
80
  informations: {
86
81
  condition: expect.any(Function),
87
82
  component: expect.anything()
package/src/Readme.md CHANGED
@@ -8,7 +8,6 @@ The `Viewer` can display an **information panel** to show additional information
8
8
 
9
9
  - You must have [WebviewIntent Provider](https://github.com/cozy/cozy-libs/blob/b1ad6f5933b463878f641d9fbb63eddd4c45b0d0/packages/cozy-intent/src/view/components/WebviewIntentProvider.tsx#L89) & [CozySharing Provider](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-sharing)
10
10
  - In order to download and display the files, it will need a `cozy-client` instance in the React context.
11
- - To have the panels, the app need to have [cozy-harvest-lib](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-harvest-lib) installed
12
11
 
13
12
  ### Props
14
13
 
@@ -183,10 +183,6 @@ ViewerContainer.propTypes = {
183
183
  /** Whether the summary panel is disabled */
184
184
  disabled: PropTypes.bool
185
185
  }),
186
- konnector: PropTypes.shape({
187
- /** Whether the konnector panel is disabled */
188
- disabled: PropTypes.bool
189
- }),
190
186
  informations: PropTypes.shape({
191
187
  /** Whether the informations panel is disabled */
192
188
  disabled: PropTypes.bool
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- KonnectorBlock: jest.fn(() => null)
3
- }