cozy-viewer 26.4.2 → 26.5.1

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,18 @@
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
+ ## [26.5.1](https://github.com/cozy/cozy-libs/compare/cozy-viewer@26.5.0...cozy-viewer@26.5.1) (2026-01-16)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **cozy-viewer:** Shorten antivirus locales ([3ee10b0](https://github.com/cozy/cozy-libs/commit/3ee10b00d022cc7f9af9020b268239d59afd6af1))
11
+
12
+ # [26.5.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@26.4.2...cozy-viewer@26.5.0) (2026-01-16)
13
+
14
+ ### Features
15
+
16
+ - Display antivirus popover on hover ([078dc88](https://github.com/cozy/cozy-libs/commit/078dc88281776c88ad9794882f865b7b46ae9aa1))
17
+
6
18
  ## [26.4.2](https://github.com/cozy/cozy-libs/compare/cozy-viewer@26.4.1...cozy-viewer@26.4.2) (2026-01-15)
7
19
 
8
20
  **Note:** Version bump only for package cozy-viewer
@@ -52,11 +52,11 @@ var Antivirus = function Antivirus(_ref) {
52
52
  anchorEl = _useState2[0],
53
53
  setAnchorEl = _useState2[1];
54
54
 
55
- var handleInfoClick = function handleInfoClick(event) {
55
+ var handlePopoverOpen = function handlePopoverOpen(event) {
56
56
  setAnchorEl(event.currentTarget);
57
57
  };
58
58
 
59
- var handleClose = function handleClose() {
59
+ var handlePopoverClose = function handlePopoverClose() {
60
60
  setAnchorEl(null);
61
61
  };
62
62
 
@@ -77,20 +77,28 @@ var Antivirus = function Antivirus(_ref) {
77
77
  })), /*#__PURE__*/_react.default.createElement(_ListItemText.default, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
78
78
  color: isError ? 'error' : 'default'
79
79
  }, text)), /*#__PURE__*/_react.default.createElement(_ListItemIcon.default, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
80
- onClick: handleInfoClick,
81
- size: "small"
80
+ onClick: handlePopoverOpen,
81
+ onFocus: handlePopoverOpen,
82
+ onBlur: handlePopoverClose,
83
+ onMouseEnter: handlePopoverOpen,
84
+ onMouseLeave: handlePopoverClose,
85
+ size: "small",
86
+ "aria-label": t('Viewer.panel.antivirus.info.title'),
87
+ "aria-describedby": open ? 'antivirus-popover' : undefined
82
88
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
83
89
  icon: _InfoOutlined.default
84
90
  })))), /*#__PURE__*/_react.default.createElement(_Popover.default, {
91
+ id: "antivirus-popover",
85
92
  open: open,
86
93
  anchorEl: anchorEl,
87
- onClose: handleClose,
94
+ onClose: handlePopoverClose,
88
95
  anchorOrigin: {
89
96
  vertical: 'bottom',
90
97
  horizontal: 'right'
91
98
  }
92
99
  }, /*#__PURE__*/_react.default.createElement("div", {
93
- className: "u-p-1 u-flex u-maw-5"
100
+ className: "u-p-1 u-flex u-maw-5",
101
+ onMouseLeave: handlePopoverClose
94
102
  }, /*#__PURE__*/_react.default.createElement("div", {
95
103
  className: "u-mr-half u-flex-shrink-0"
96
104
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
@@ -69,9 +69,9 @@ var en = {
69
69
  }
70
70
  },
71
71
  antivirus: {
72
- scanning: "Scanning by Twake system",
73
- scanned: "Scanned by Twake system",
74
- infected: "Virus detected by Twake system",
72
+ scanning: "Scanning by Twake",
73
+ scanned: "Scanned by Twake",
74
+ infected: "Virus detected by Twake",
75
75
  info: {
76
76
  title: "Attachment Scanning in Twake",
77
77
  description: "To safeguard your workspace, Twake automatically blocks attachments identified as malicious. Always ensure you download files only from trusted sources.",
@@ -176,9 +176,9 @@ var fr = {
176
176
  }
177
177
  },
178
178
  antivirus: {
179
- scanning: "Analyse par le syst\xE8me Twake",
180
- scanned: "Analys\xE9 par le syst\xE8me Twake",
181
- infected: "Virus d\xE9tect\xE9 par le syst\xE8me Twake",
179
+ scanning: "Analyse par Twake",
180
+ scanned: "Analys\xE9 par Twake",
181
+ infected: "Virus d\xE9tect\xE9 par Twake",
182
182
  info: {
183
183
  title: "Analyse des pi\xE8ces jointes dans Twake",
184
184
  description: "Pour prot\xE9ger votre espace de travail, Twake bloque automatiquement les pi\xE8ces jointes identifi\xE9es comme malveillantes. Assurez-vous toujours de t\xE9l\xE9charger des fichiers uniquement \xE0 partir de sources fiables.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-viewer",
3
- "version": "26.4.2",
3
+ "version": "26.5.1",
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": "^60.20.0",
33
33
  "cozy-device-helper": "2.0.0",
34
- "cozy-harvest-lib": "^36.0.18",
34
+ "cozy-harvest-lib": "^36.0.20",
35
35
  "cozy-intent": "^2.30.1",
36
36
  "cozy-logger": "^1.17.0",
37
37
  "cozy-sharing": "^28.2.1",
@@ -70,5 +70,5 @@
70
70
  "react-router-dom": ">=6.14.2",
71
71
  "twake-i18n": ">=0.3.0"
72
72
  },
73
- "gitHead": "053df29f6dfe606ecadd3f6668f0461bb1bd6021"
73
+ "gitHead": "8e7c0ba5f8facac27a766f11f32127d6021c489d"
74
74
  }
@@ -19,11 +19,11 @@ import { withViewerLocales } from '../hoc/withViewerLocales'
19
19
  const Antivirus = ({ file, t }) => {
20
20
  const [anchorEl, setAnchorEl] = useState(null)
21
21
 
22
- const handleInfoClick = event => {
22
+ const handlePopoverOpen = event => {
23
23
  setAnchorEl(event.currentTarget)
24
24
  }
25
25
 
26
- const handleClose = () => {
26
+ const handlePopoverClose = () => {
27
27
  setAnchorEl(null)
28
28
  }
29
29
 
@@ -44,21 +44,31 @@ const Antivirus = ({ file, t }) => {
44
44
  <Typography color={isError ? 'error' : 'default'}>{text}</Typography>
45
45
  </ListItemText>
46
46
  <ListItemIcon>
47
- <IconButton onClick={handleInfoClick} size="small">
47
+ <IconButton
48
+ onClick={handlePopoverOpen}
49
+ onFocus={handlePopoverOpen}
50
+ onBlur={handlePopoverClose}
51
+ onMouseEnter={handlePopoverOpen}
52
+ onMouseLeave={handlePopoverClose}
53
+ size="small"
54
+ aria-label={t('Viewer.panel.antivirus.info.title')}
55
+ aria-describedby={open ? 'antivirus-popover' : undefined}
56
+ >
48
57
  <Icon icon={InfoIcon} />
49
58
  </IconButton>
50
59
  </ListItemIcon>
51
60
  </ListItem>
52
61
  <Popover
62
+ id="antivirus-popover"
53
63
  open={open}
54
64
  anchorEl={anchorEl}
55
- onClose={handleClose}
65
+ onClose={handlePopoverClose}
56
66
  anchorOrigin={{
57
67
  vertical: 'bottom',
58
68
  horizontal: 'right'
59
69
  }}
60
70
  >
61
- <div className="u-p-1 u-flex u-maw-5">
71
+ <div className="u-p-1 u-flex u-maw-5" onMouseLeave={handlePopoverClose}>
62
72
  <div className="u-mr-half u-flex-shrink-0">
63
73
  <Icon icon={ShieldIcon} color="var(--primaryColor)" />
64
74
  </div>
@@ -60,9 +60,9 @@
60
60
  }
61
61
  },
62
62
  "antivirus": {
63
- "scanning": "Scanning by Twake system",
64
- "scanned": "Scanned by Twake system",
65
- "infected": "Virus detected by Twake system",
63
+ "scanning": "Scanning by Twake",
64
+ "scanned": "Scanned by Twake",
65
+ "infected": "Virus detected by Twake",
66
66
  "info": {
67
67
  "title": "Attachment Scanning in Twake",
68
68
  "description": "To safeguard your workspace, Twake automatically blocks attachments identified as malicious. Always ensure you download files only from trusted sources.",
@@ -60,9 +60,9 @@
60
60
  }
61
61
  },
62
62
  "antivirus": {
63
- "scanning": "Analyse par le système Twake",
64
- "scanned": "Analysé par le système Twake",
65
- "infected": "Virus détecté par le système Twake",
63
+ "scanning": "Analyse par Twake",
64
+ "scanned": "Analysé par Twake",
65
+ "infected": "Virus détecté par Twake",
66
66
  "info": {
67
67
  "title": "Analyse des pièces jointes dans Twake",
68
68
  "description": "Pour protéger votre espace de travail, Twake bloque automatiquement les pièces jointes identifiées comme malveillantes. Assurez-vous toujours de télécharger des fichiers uniquement à partir de sources fiables.",