cozy-ui 74.3.0 → 74.4.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 +13 -0
- package/package.json +1 -1
- package/react/Viewer/Footer/ForwardOrDownloadButton.jsx +1 -5
- package/react/Viewer/Panel/Qualification.jsx +8 -3
- package/react/Viewer/Readme.md +9 -2
- package/react/Viewer/styles.styl +1 -0
- package/transpiled/react/Viewer/Footer/ForwardOrDownloadButton.js +2 -6
- package/transpiled/react/Viewer/Panel/Qualification.js +4 -1
- package/transpiled/react/stylesheet.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# [74.4.0](https://github.com/cozy/cozy-ui/compare/v74.3.0...v74.4.0) (2022-09-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Add a mid ellipsis to the filename in the qualification list ([4f30229](https://github.com/cozy/cozy-ui/commit/4f30229))
|
|
7
|
+
* Add a missing `overflow: hidden;` property to the viewer filename ([6d9b5c2](https://github.com/cozy/cozy-ui/commit/6d9b5c2))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Display Viewer's Download button on iOS Flagship app ([b21726c](https://github.com/cozy/cozy-ui/commit/b21726c)), closes [cozy/cozy-ui#2215](https://github.com/cozy/cozy-ui/issues/2215)
|
|
13
|
+
|
|
1
14
|
# [74.3.0](https://github.com/cozy/cozy-ui/compare/v74.2.0...v74.3.0) (2022-09-02)
|
|
2
15
|
|
|
3
16
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
|
|
4
4
|
import { useClient } from 'cozy-client'
|
|
5
|
-
import { isFlagshipApp, isIOS } from 'cozy-device-helper'
|
|
6
5
|
|
|
7
6
|
import ForwardButton from './ForwardButton'
|
|
8
7
|
import DownloadButton from './DownloadButton'
|
|
@@ -15,10 +14,7 @@ const ForwardOrDownloadButton = ({ file }) => {
|
|
|
15
14
|
? ForwardButton
|
|
16
15
|
: DownloadButton
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
// the download feature is fixed on this platform
|
|
20
|
-
// When fixed on this platform, revert this commit from PR #2215
|
|
21
|
-
return isFlagshipApp() && isIOS() ? null : <FileActionButton file={file} />
|
|
17
|
+
return <FileActionButton file={file} />
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
ForwardOrDownloadButton.propTypes = {
|
|
@@ -7,6 +7,7 @@ import List from '../../MuiCozyTheme/List'
|
|
|
7
7
|
import ListItem from '../../MuiCozyTheme/ListItem'
|
|
8
8
|
import QualificationListItemText from './QualificationListItemText'
|
|
9
9
|
import { withViewerLocales } from '../withViewerLocales'
|
|
10
|
+
import MidEllipsis from '../../MidEllipsis'
|
|
10
11
|
|
|
11
12
|
const {
|
|
12
13
|
document: {
|
|
@@ -53,9 +54,13 @@ const Qualification = ({ file = {}, contactsFullname, t, f, lang }) => {
|
|
|
53
54
|
<QualificationListItemText
|
|
54
55
|
primary={t('Viewer.panel.qualification.label.title')}
|
|
55
56
|
secondary={
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
<MidEllipsis
|
|
58
|
+
text={
|
|
59
|
+
pageLabel
|
|
60
|
+
? t(`Viewer.panel.qualification.label.${pageLabel}`)
|
|
61
|
+
: filename
|
|
62
|
+
}
|
|
63
|
+
/>
|
|
59
64
|
}
|
|
60
65
|
/>
|
|
61
66
|
</ListItem>
|
package/react/Viewer/Readme.md
CHANGED
|
@@ -73,8 +73,15 @@ const files = [
|
|
|
73
73
|
{
|
|
74
74
|
_id: 'text',
|
|
75
75
|
class: 'text',
|
|
76
|
-
name: '
|
|
77
|
-
mime: 'text/plain'
|
|
76
|
+
name: 'LoremipsumdolorsitametconsecteturadipiscingelitSednonrisusSuspendisselectustortordignissimsitametadipiscingnecultriciesseddolorCraselementumultricesdiamMaecenasligulamassavariusasempercongueeuismodnonmiProinporttitororcinecnonummymolestieenimesteleifendminonfermentumdiamnislsitameteratDuissemperDuisarcumassascelerisquevitaeconsequatinpretiumaenimPellentesquecongueUtinrisusvolutpatliberopharetratemporCrasvestibulumbibendumauguePraesentegestasleoinpedePraesentblanditodioeuenimPellentesquesedduiutaugueblanditsodalesVestibulumanteipsumprimisinfaucibusorciluctusetultricesposuerecubiliaCuraeAliquamnibhMaurisacmaurissedpedepellentesquefermentumMaecenasadipiscingantenondiamsodaleshendrerit.txt',
|
|
77
|
+
mime: 'text/plain',
|
|
78
|
+
metadata: {
|
|
79
|
+
datetime: "2022-01-01T12:00:00.000Z",
|
|
80
|
+
datetimeLabel: "datetime",
|
|
81
|
+
qualification: {
|
|
82
|
+
label: 'tax_notice'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
78
85
|
},
|
|
79
86
|
{
|
|
80
87
|
_id: 'text',
|
package/react/Viewer/styles.styl
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useClient } from 'cozy-client';
|
|
4
|
-
import { isFlagshipApp, isIOS } from 'cozy-device-helper';
|
|
5
4
|
import ForwardButton from "cozy-ui/transpiled/react/Viewer/Footer/ForwardButton";
|
|
6
5
|
import DownloadButton from "cozy-ui/transpiled/react/Viewer/Footer/DownloadButton";
|
|
7
6
|
import { shouldBeForwardButton } from "cozy-ui/transpiled/react/Viewer/Footer/helpers";
|
|
@@ -9,11 +8,8 @@ import { shouldBeForwardButton } from "cozy-ui/transpiled/react/Viewer/Footer/he
|
|
|
9
8
|
var ForwardOrDownloadButton = function ForwardOrDownloadButton(_ref) {
|
|
10
9
|
var file = _ref.file;
|
|
11
10
|
var client = useClient();
|
|
12
|
-
var FileActionButton = shouldBeForwardButton(client) ? ForwardButton : DownloadButton;
|
|
13
|
-
|
|
14
|
-
// When fixed on this platform, revert this commit from PR #2215
|
|
15
|
-
|
|
16
|
-
return isFlagshipApp() && isIOS() ? null : /*#__PURE__*/React.createElement(FileActionButton, {
|
|
11
|
+
var FileActionButton = shouldBeForwardButton(client) ? ForwardButton : DownloadButton;
|
|
12
|
+
return /*#__PURE__*/React.createElement(FileActionButton, {
|
|
17
13
|
file: file
|
|
18
14
|
});
|
|
19
15
|
};
|
|
@@ -5,6 +5,7 @@ import List from "cozy-ui/transpiled/react/MuiCozyTheme/List";
|
|
|
5
5
|
import ListItem from "cozy-ui/transpiled/react/MuiCozyTheme/ListItem";
|
|
6
6
|
import QualificationListItemText from "cozy-ui/transpiled/react/Viewer/Panel/QualificationListItemText";
|
|
7
7
|
import { withViewerLocales } from "cozy-ui/transpiled/react/Viewer/withViewerLocales";
|
|
8
|
+
import MidEllipsis from "cozy-ui/transpiled/react/MidEllipsis";
|
|
8
9
|
var getBoundT = models.document.locales.getBoundT;
|
|
9
10
|
|
|
10
11
|
var Qualification = function Qualification(_ref) {
|
|
@@ -39,7 +40,9 @@ var Qualification = function Qualification(_ref) {
|
|
|
39
40
|
className: 'u-ph-2'
|
|
40
41
|
}, /*#__PURE__*/React.createElement(QualificationListItemText, {
|
|
41
42
|
primary: t('Viewer.panel.qualification.label.title'),
|
|
42
|
-
secondary:
|
|
43
|
+
secondary: /*#__PURE__*/React.createElement(MidEllipsis, {
|
|
44
|
+
text: pageLabel ? t("Viewer.panel.qualification.label.".concat(pageLabel)) : filename
|
|
45
|
+
})
|
|
43
46
|
})), /*#__PURE__*/React.createElement(ListItem, {
|
|
44
47
|
className: 'u-ph-2'
|
|
45
48
|
}, /*#__PURE__*/React.createElement(QualificationListItemText, {
|