cozy-viewer 30.0.37 → 30.0.38

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
+ ## [30.0.38](https://github.com/cozy/cozy-libs/compare/cozy-viewer@30.0.37...cozy-viewer@30.0.38) (2026-08-31)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **cozy-viewer:** Render the PDF toolbar icons ([49efb42](https://github.com/cozy/cozy-libs/commit/49efb42ee26ed5b1c3ea80b51ebba93f30dcf29d))
11
+
6
12
  ## [30.0.37](https://github.com/cozy/cozy-libs/compare/cozy-viewer@30.0.36...cozy-viewer@30.0.37) (2026-08-31)
7
13
 
8
14
  **Note:** Version bump only for package cozy-viewer
@@ -363,7 +363,7 @@ var PdfJsViewer = /*#__PURE__*/function (_Component) {
363
363
  }), !renderAllPages && /*#__PURE__*/_react.default.createElement("span", {
364
364
  className: "u-mh-half"
365
365
  }, /*#__PURE__*/_react.default.createElement(_PdfToolbarButton.default, {
366
- icon: "top",
366
+ icon: _twakeIcons.Top,
367
367
  onClick: this.previousPage,
368
368
  disabled: currentPage === 1,
369
369
  label: t('Viewer.previous')
@@ -382,19 +382,19 @@ var PdfJsViewer = /*#__PURE__*/function (_Component) {
382
382
  onFocus: this.handleInputPageFocus,
383
383
  onBlur: this.handleInputPageBlur
384
384
  }), "/", totalPages), /*#__PURE__*/_react.default.createElement(_PdfToolbarButton.default, {
385
- icon: "bottom",
385
+ icon: _twakeIcons.Bottom,
386
386
  onClick: this.nextPage,
387
387
  disabled: currentPage === totalPages,
388
388
  label: t('Viewer.next')
389
389
  })), /*#__PURE__*/_react.default.createElement("span", {
390
390
  className: "u-mh-half"
391
391
  }, /*#__PURE__*/_react.default.createElement(_PdfToolbarButton.default, {
392
- icon: "dash",
392
+ icon: _twakeIcons.Dash,
393
393
  onClick: this.scaleDown,
394
394
  disabled: scale === MIN_SCALE,
395
395
  label: t('Viewer.scaledown')
396
396
  }), /*#__PURE__*/_react.default.createElement(_PdfToolbarButton.default, {
397
- icon: "plus",
397
+ icon: _twakeIcons.Plus,
398
398
  onClick: this.scaleUp,
399
399
  disabled: scale === MAX_SCALE,
400
400
  label: t('Viewer.scaleup')
@@ -7,7 +7,7 @@ declare function PdfToolbarButton({ icon, onClick, disabled, label }: {
7
7
  }): JSX.Element;
8
8
  declare namespace PdfToolbarButton {
9
9
  namespace propTypes {
10
- let icon: PropTypes.Validator<string>;
10
+ let icon: PropTypes.Validator<NonNullable<PropTypes.ReactComponentLike>>;
11
11
  let onClick: PropTypes.Validator<(...args: any[]) => any>;
12
12
  let disabled: PropTypes.Requireable<boolean>;
13
13
  let label: PropTypes.Validator<string>;
@@ -24,7 +24,6 @@ var PdfToolbarButton = function PdfToolbarButton(_ref) {
24
24
  variant: "text",
25
25
  color: "secondary",
26
26
  className: "u-p-half u-m-half u-mah-2",
27
- icon: icon,
28
27
  onClick: onClick,
29
28
  disabled: disabled,
30
29
  label: /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
@@ -37,7 +36,7 @@ var PdfToolbarButton = function PdfToolbarButton(_ref) {
37
36
  };
38
37
 
39
38
  PdfToolbarButton.propTypes = {
40
- icon: _propTypes.default.string.isRequired,
39
+ icon: _propTypes.default.elementType.isRequired,
41
40
  onClick: _propTypes.default.func.isRequired,
42
41
  disabled: _propTypes.default.bool,
43
42
  label: _propTypes.default.string.isRequired
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-viewer",
3
- "version": "30.0.37",
3
+ "version": "30.0.38",
4
4
  "description": "Cozy-Viewer provides a component to show files in a viewer.",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -34,9 +34,9 @@
34
34
  "cozy-device-helper": "2.0.0",
35
35
  "cozy-intent": "^2.31.1",
36
36
  "cozy-logger": "^1.18.1",
37
- "cozy-sharing": "^37.5.3",
37
+ "cozy-sharing": "^37.5.4",
38
38
  "cozy-ui": "^138.1.0",
39
- "cozy-ui-plus": "^12.3.12",
39
+ "cozy-ui-plus": "^12.3.13",
40
40
  "identity-obj-proxy": "3.0.0",
41
41
  "jest": "30.3.0",
42
42
  "jest-canvas-mock": "2.3.1",
@@ -71,5 +71,5 @@
71
71
  "react-router-dom": ">=6.14.2",
72
72
  "twake-i18n": ">=0.3.0"
73
73
  },
74
- "gitHead": "9a29fb9929ba6bc8203172785e5d803a2b04f7db"
74
+ "gitHead": "0257cf0ecb129fec4b9d3f99e3a3fbb318429112"
75
75
  }
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
5
5
  import React, { Component } from 'react'
6
6
  import { Document, Page } from 'react-pdf'
7
7
 
8
- import { Icon, Pen } from '@linagora/twake-icons'
8
+ import { Bottom, Dash, Icon, Pen, Plus, Top } from '@linagora/twake-icons'
9
9
  import Button from 'cozy-ui/transpiled/react/Buttons'
10
10
 
11
11
  import styles from './styles.styl'
@@ -298,7 +298,7 @@ export class PdfJsViewer extends Component {
298
298
  {!renderAllPages && (
299
299
  <span className="u-mh-half">
300
300
  <ToolbarButton
301
- icon="top"
301
+ icon={Top}
302
302
  onClick={this.previousPage}
303
303
  disabled={currentPage === 1}
304
304
  label={t('Viewer.previous')}
@@ -320,7 +320,7 @@ export class PdfJsViewer extends Component {
320
320
  /{totalPages}
321
321
  </label>
322
322
  <ToolbarButton
323
- icon="bottom"
323
+ icon={Bottom}
324
324
  onClick={this.nextPage}
325
325
  disabled={currentPage === totalPages}
326
326
  label={t('Viewer.next')}
@@ -330,13 +330,13 @@ export class PdfJsViewer extends Component {
330
330
 
331
331
  <span className="u-mh-half">
332
332
  <ToolbarButton
333
- icon="dash"
333
+ icon={Dash}
334
334
  onClick={this.scaleDown}
335
335
  disabled={scale === MIN_SCALE}
336
336
  label={t('Viewer.scaledown')}
337
337
  />
338
338
  <ToolbarButton
339
- icon="plus"
339
+ icon={Plus}
340
340
  onClick={this.scaleUp}
341
341
  disabled={scale === MAX_SCALE}
342
342
  label={t('Viewer.scaleup')}
@@ -9,7 +9,6 @@ const PdfToolbarButton = ({ icon, onClick, disabled, label }) => (
9
9
  variant="text"
10
10
  color="secondary"
11
11
  className="u-p-half u-m-half u-mah-2"
12
- icon={icon}
13
12
  onClick={onClick}
14
13
  disabled={disabled}
15
14
  label={<Icon icon={icon} size={16} />}
@@ -19,7 +18,7 @@ const PdfToolbarButton = ({ icon, onClick, disabled, label }) => (
19
18
  )
20
19
 
21
20
  PdfToolbarButton.propTypes = {
22
- icon: PropTypes.string.isRequired,
21
+ icon: PropTypes.elementType.isRequired,
23
22
  onClick: PropTypes.func.isRequired,
24
23
  disabled: PropTypes.bool,
25
24
  label: PropTypes.string.isRequired