cozy-viewer 24.2.3 → 25.0.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 +14 -0
- package/dist/Footer/DownloadButton.js +3 -3
- package/dist/Footer/ForwardButton.js +3 -3
- package/dist/NoViewer/DownloadButton.js +3 -3
- package/dist/Panel/ActionMenuDesktop.js +3 -3
- package/dist/Panel/ActionMenuMobile.js +3 -3
- package/dist/Panel/ActionMenuWrapper.js +3 -3
- package/dist/Panel/Informations.js +9 -4
- package/dist/Panel/Qualifications/QualificationListItemContact.js +3 -3
- package/dist/Panel/Qualifications/QualificationListItemDate.js +3 -3
- package/dist/Panel/Qualifications/QualificationListItemInformation.js +3 -3
- package/dist/Panel/Qualifications/QualificationListItemOther.js +3 -3
- package/dist/Panel/Qualifications/QualificationListItemQualification.js +3 -3
- package/dist/ViewerContainer.js +3 -3
- package/dist/components/ExpirationAlert.js +3 -3
- package/dist/components/ExpirationAnnotation.js +3 -3
- package/dist/components/Toolbar.js +3 -3
- package/dist/hoc/withViewerLocales.js +2 -4
- package/dist/locales/index.d.ts +1 -1
- package/dist/locales/index.js +2 -2
- package/dist/providers/DemoProvider.js +3 -3
- package/package.json +10 -8
- package/src/Footer/DownloadButton.jsx +1 -1
- package/src/Footer/ForwardButton.jsx +1 -1
- package/src/NoViewer/DownloadButton.jsx +1 -1
- package/src/Panel/ActionMenuDesktop.jsx +1 -1
- package/src/Panel/ActionMenuMobile.jsx +1 -1
- package/src/Panel/ActionMenuWrapper.jsx +1 -1
- package/src/Panel/Informations.jsx +4 -2
- package/src/Panel/Qualifications/QualificationListItemContact.jsx +1 -1
- package/src/Panel/Qualifications/QualificationListItemDate.jsx +1 -1
- package/src/Panel/Qualifications/QualificationListItemInformation.jsx +1 -1
- package/src/Panel/Qualifications/QualificationListItemOther.jsx +1 -1
- package/src/Panel/Qualifications/QualificationListItemQualification.jsx +1 -1
- package/src/ViewerContainer.jsx +1 -1
- package/src/ViewersByFile/PdfMobileViewer.spec.jsx +1 -1
- package/src/ViewersByFile/ShortcutViewer.spec.jsx +1 -1
- package/src/components/ExpirationAlert.jsx +1 -1
- package/src/components/ExpirationAnnotation.jsx +1 -1
- package/src/components/Toolbar.jsx +1 -1
- package/src/hoc/withViewerLocales.jsx +1 -1
- package/src/locales/index.js +1 -1
- package/src/providers/DemoProvider.jsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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
|
+
# [25.0.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@24.2.4...cozy-viewer@25.0.0) (2025-12-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Add twake-i18n in packages ([f8689a9](https://github.com/cozy/cozy-libs/commit/f8689a9a58dc6384ccf494a19fd1afb595da39f0))
|
|
11
|
+
|
|
12
|
+
### BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
- You must have `twake-i18n >= 0.3.0` and `cozy-ui >= 135.0.0`
|
|
15
|
+
|
|
16
|
+
## [24.2.4](https://github.com/cozy/cozy-libs/compare/cozy-viewer@24.2.3...cozy-viewer@24.2.4) (2025-12-04)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package cozy-viewer
|
|
19
|
+
|
|
6
20
|
## [24.2.3](https://github.com/cozy/cozy-libs/compare/cozy-viewer@24.2.2...cozy-viewer@24.2.3) (2025-12-04)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package cozy-viewer
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _cozyClient = require("cozy-client");
|
|
19
21
|
|
|
20
22
|
var _Buttons = _interopRequireDefault(require("cozy-ui/transpiled/react/Buttons"));
|
|
@@ -27,14 +29,12 @@ var _Download = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/D
|
|
|
27
29
|
|
|
28
30
|
var _Alerter = _interopRequireDefault(require("cozy-ui/transpiled/react/deprecated/Alerter"));
|
|
29
31
|
|
|
30
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
31
|
-
|
|
32
32
|
var DownloadButton = function DownloadButton(_ref) {
|
|
33
33
|
var file = _ref.file,
|
|
34
34
|
variant = _ref.variant;
|
|
35
35
|
var client = (0, _cozyClient.useClient)();
|
|
36
36
|
|
|
37
|
-
var _useI18n = (0,
|
|
37
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
38
38
|
t = _useI18n.t;
|
|
39
39
|
|
|
40
40
|
var icon = /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _cozyClient = require("cozy-client");
|
|
19
21
|
|
|
20
22
|
var _sharing = require("cozy-client/dist/models/sharing");
|
|
@@ -33,8 +35,6 @@ var _ShareIos = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/S
|
|
|
33
35
|
|
|
34
36
|
var _Alerter = _interopRequireDefault(require("cozy-ui/transpiled/react/deprecated/Alerter"));
|
|
35
37
|
|
|
36
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
37
|
-
|
|
38
38
|
var ForwardIcon = (0, _cozyDeviceHelper.isIOS)() ? _ShareIos.default : _Reply.default;
|
|
39
39
|
|
|
40
40
|
var ForwardButton = function ForwardButton(_ref) {
|
|
@@ -42,7 +42,7 @@ var ForwardButton = function ForwardButton(_ref) {
|
|
|
42
42
|
variant = _ref.variant,
|
|
43
43
|
onClick = _ref.onClick;
|
|
44
44
|
|
|
45
|
-
var _useI18n = (0,
|
|
45
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
46
46
|
t = _useI18n.t;
|
|
47
47
|
|
|
48
48
|
var client = (0, _cozyClient.useClient)();
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
+
var _twakeI18n = require("twake-i18n");
|
|
15
|
+
|
|
14
16
|
var _cozyClient = require("cozy-client");
|
|
15
17
|
|
|
16
18
|
var _file = require("cozy-client/dist/models/file");
|
|
@@ -19,8 +21,6 @@ var _cozyIntent = require("cozy-intent");
|
|
|
19
21
|
|
|
20
22
|
var _Button = _interopRequireDefault(require("cozy-ui/transpiled/react/deprecated/Button"));
|
|
21
23
|
|
|
22
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
23
|
-
|
|
24
24
|
var _proptypes = require("cozy-ui-plus/dist/proptypes");
|
|
25
25
|
|
|
26
26
|
var DownloadButton = function DownloadButton(_ref) {
|
|
@@ -28,7 +28,7 @@ var DownloadButton = function DownloadButton(_ref) {
|
|
|
28
28
|
file = _ref.file,
|
|
29
29
|
url = _ref.url;
|
|
30
30
|
|
|
31
|
-
var _useI18n = (0,
|
|
31
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
32
32
|
t = _useI18n.t;
|
|
33
33
|
|
|
34
34
|
var webviewIntent = (0, _cozyIntent.useWebviewIntent)();
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
+
var _twakeI18n = require("twake-i18n");
|
|
15
|
+
|
|
14
16
|
var _Icon = _interopRequireDefault(require("cozy-ui/transpiled/react/Icon"));
|
|
15
17
|
|
|
16
18
|
var _Copy = _interopRequireDefault(require("cozy-ui/transpiled/react/Icons/Copy"));
|
|
@@ -21,8 +23,6 @@ var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typog
|
|
|
21
23
|
|
|
22
24
|
var _ActionMenu = _interopRequireWildcard(require("cozy-ui/transpiled/react/deprecated/ActionMenu"));
|
|
23
25
|
|
|
24
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
25
|
-
|
|
26
26
|
var _IntentOpener = _interopRequireDefault(require("../components/IntentOpener"));
|
|
27
27
|
|
|
28
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -38,7 +38,7 @@ var ActionMenuDesktop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
38
38
|
isEditable = _ref.isEditable,
|
|
39
39
|
onClose = _ref.onClose;
|
|
40
40
|
|
|
41
|
-
var _useI18n = (0,
|
|
41
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
42
42
|
t = _useI18n.t;
|
|
43
43
|
|
|
44
44
|
return /*#__PURE__*/_react.default.createElement(_ActionMenu.default, {
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
+
var _twakeI18n = require("twake-i18n");
|
|
15
|
+
|
|
14
16
|
var _BottomSheet = _interopRequireWildcard(require("cozy-ui/transpiled/react/BottomSheet"));
|
|
15
17
|
|
|
16
18
|
var _Icon = _interopRequireDefault(require("cozy-ui/transpiled/react/Icon"));
|
|
@@ -27,8 +29,6 @@ var _ListItemIcon = _interopRequireDefault(require("cozy-ui/transpiled/react/Lis
|
|
|
27
29
|
|
|
28
30
|
var _ListItemText = _interopRequireDefault(require("cozy-ui/transpiled/react/ListItemText"));
|
|
29
31
|
|
|
30
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
31
|
-
|
|
32
32
|
var _IntentOpener = _interopRequireDefault(require("../components/IntentOpener"));
|
|
33
33
|
|
|
34
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -40,7 +40,7 @@ var ActionMenuMobile = function ActionMenuMobile(_ref) {
|
|
|
40
40
|
isEditable = _ref.isEditable,
|
|
41
41
|
onClose = _ref.onClose;
|
|
42
42
|
|
|
43
|
-
var _useI18n = (0,
|
|
43
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
44
44
|
t = _useI18n.t;
|
|
45
45
|
|
|
46
46
|
return /*#__PURE__*/_react.default.createElement(_BottomSheet.default, {
|
|
@@ -15,12 +15,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _Alert = require("cozy-ui/transpiled/react/providers/Alert");
|
|
19
21
|
|
|
20
22
|
var _Breakpoints = _interopRequireDefault(require("cozy-ui/transpiled/react/providers/Breakpoints"));
|
|
21
23
|
|
|
22
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
23
|
-
|
|
24
24
|
var _ActionMenuDesktop = _interopRequireDefault(require("./ActionMenuDesktop"));
|
|
25
25
|
|
|
26
26
|
var _ActionMenuMobile = _interopRequireDefault(require("./ActionMenuMobile"));
|
|
@@ -46,7 +46,7 @@ var ActionMenuWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
46
46
|
var _useViewer = (0, _ViewerProvider.useViewer)(),
|
|
47
47
|
file = _useViewer.file;
|
|
48
48
|
|
|
49
|
-
var _useI18n = (0,
|
|
49
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
50
50
|
t = _useI18n.t;
|
|
51
51
|
|
|
52
52
|
var _useAlert = (0, _Alert.useAlert)(),
|
|
@@ -15,6 +15,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
20
|
+
var _cozyClient = require("cozy-client");
|
|
21
|
+
|
|
18
22
|
var _ActionsMenu = _interopRequireDefault(require("cozy-ui/transpiled/react/ActionsMenu"));
|
|
19
23
|
|
|
20
24
|
var _Actions = require("cozy-ui/transpiled/react/ActionsMenu/Actions");
|
|
@@ -49,8 +53,6 @@ var _ListItemSecondaryAction = _interopRequireDefault(require("cozy-ui/transpile
|
|
|
49
53
|
|
|
50
54
|
var _ListItemText = _interopRequireDefault(require("cozy-ui/transpiled/react/ListItemText"));
|
|
51
55
|
|
|
52
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
53
|
-
|
|
54
56
|
var _helpers = require("./helpers");
|
|
55
57
|
|
|
56
58
|
var _withViewerLocales = require("../hoc/withViewerLocales");
|
|
@@ -69,10 +71,11 @@ var Informations = function Informations(_ref) {
|
|
|
69
71
|
showMenu = _useState2[0],
|
|
70
72
|
setShowMenu = _useState2[1];
|
|
71
73
|
|
|
72
|
-
var _useI18n = (0,
|
|
74
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
73
75
|
f = _useI18n.f,
|
|
74
76
|
lang = _useI18n.lang;
|
|
75
77
|
|
|
78
|
+
var client = (0, _cozyClient.useClient)();
|
|
76
79
|
var format = (0, _helpers.makeFormat)(file);
|
|
77
80
|
var path = (0, _helpers.makePath)(file);
|
|
78
81
|
var size = (0, _helpers.makeSize)(file.size);
|
|
@@ -81,7 +84,9 @@ var Informations = function Informations(_ref) {
|
|
|
81
84
|
var hasCarbonCopy = (0, _has.default)(file, 'metadata.carbonCopy');
|
|
82
85
|
var hasElectronicSafe = (0, _has.default)(file, 'metadata.electronicSafe');
|
|
83
86
|
var anchorRef = (0, _react.useRef)();
|
|
84
|
-
var actions = (0, _Actions.makeActions)([_Actions.viewInDrive]
|
|
87
|
+
var actions = (0, _Actions.makeActions)([_Actions.viewInDrive], {
|
|
88
|
+
client: client
|
|
89
|
+
});
|
|
85
90
|
return /*#__PURE__*/_react.default.createElement(_List.default, null, /*#__PURE__*/_react.default.createElement(_ListItem.default, null, /*#__PURE__*/_react.default.createElement(_ListItemIcon.default, null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
86
91
|
icon: _FileOutline.default
|
|
87
92
|
})), /*#__PURE__*/_react.default.createElement(_ListItemText.default, {
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _paper = require("cozy-client/dist/models/paper");
|
|
19
21
|
|
|
20
22
|
var _Actions = require("cozy-ui/transpiled/react/ActionsMenu/Actions");
|
|
@@ -37,8 +39,6 @@ var _Spinner = _interopRequireDefault(require("cozy-ui/transpiled/react/Spinner"
|
|
|
37
39
|
|
|
38
40
|
var _Alert = require("cozy-ui/transpiled/react/providers/Alert");
|
|
39
41
|
|
|
40
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
41
|
-
|
|
42
42
|
var _QualificationListItemText = _interopRequireDefault(require("./QualificationListItemText"));
|
|
43
43
|
|
|
44
44
|
var _IntentOpener = _interopRequireDefault(require("../../components/IntentOpener"));
|
|
@@ -54,7 +54,7 @@ var QualificationListItemContact = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
54
54
|
isReadOnly = _ref.isReadOnly,
|
|
55
55
|
toggleActionsMenu = _ref.toggleActionsMenu;
|
|
56
56
|
|
|
57
|
-
var _useI18n = (0,
|
|
57
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
58
58
|
lang = _useI18n.lang;
|
|
59
59
|
|
|
60
60
|
var _useReferencedContact = (0, _useReferencedContactName.default)(file),
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _paper = require("cozy-client/dist/models/paper");
|
|
19
21
|
|
|
20
22
|
var _Actions = require("cozy-ui/transpiled/react/ActionsMenu/Actions");
|
|
@@ -39,8 +41,6 @@ var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typog
|
|
|
39
41
|
|
|
40
42
|
var _Alert = require("cozy-ui/transpiled/react/providers/Alert");
|
|
41
43
|
|
|
42
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
43
|
-
|
|
44
44
|
var _QualificationListItemText = _interopRequireDefault(require("./QualificationListItemText"));
|
|
45
45
|
|
|
46
46
|
var _ExpirationAnnotation = _interopRequireDefault(require("../../components/ExpirationAnnotation"));
|
|
@@ -57,7 +57,7 @@ var QualificationListItemDate = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
57
57
|
formattedMetadataQualification = _ref.formattedMetadataQualification,
|
|
58
58
|
toggleActionsMenu = _ref.toggleActionsMenu;
|
|
59
59
|
|
|
60
|
-
var _useI18n = (0,
|
|
60
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
61
61
|
f = _useI18n.f,
|
|
62
62
|
lang = _useI18n.lang;
|
|
63
63
|
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _paper = require("cozy-client/dist/models/paper");
|
|
19
21
|
|
|
20
22
|
var _Actions = require("cozy-ui/transpiled/react/ActionsMenu/Actions");
|
|
@@ -49,8 +51,6 @@ var _MidEllipsis = _interopRequireDefault(require("cozy-ui/transpiled/react/MidE
|
|
|
49
51
|
|
|
50
52
|
var _Alert = require("cozy-ui/transpiled/react/providers/Alert");
|
|
51
53
|
|
|
52
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
53
|
-
|
|
54
54
|
var _QualificationListItemText = _interopRequireDefault(require("./QualificationListItemText"));
|
|
55
55
|
|
|
56
56
|
var _IntentOpener = _interopRequireDefault(require("../../components/IntentOpener"));
|
|
@@ -73,7 +73,7 @@ var QualificationListItemInformation = /*#__PURE__*/(0, _react.forwardRef)(funct
|
|
|
73
73
|
isReadOnly = _ref.isReadOnly,
|
|
74
74
|
toggleActionsMenu = _ref.toggleActionsMenu;
|
|
75
75
|
|
|
76
|
-
var _useI18n = (0,
|
|
76
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
77
77
|
lang = _useI18n.lang;
|
|
78
78
|
|
|
79
79
|
var _useAlert = (0, _Alert.useAlert)(),
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _paper = require("cozy-client/dist/models/paper");
|
|
19
21
|
|
|
20
22
|
var _Actions = require("cozy-ui/transpiled/react/ActionsMenu/Actions");
|
|
@@ -39,8 +41,6 @@ var _MidEllipsis = _interopRequireDefault(require("cozy-ui/transpiled/react/MidE
|
|
|
39
41
|
|
|
40
42
|
var _Alert = require("cozy-ui/transpiled/react/providers/Alert");
|
|
41
43
|
|
|
42
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
43
|
-
|
|
44
44
|
var _QualificationListItemText = _interopRequireDefault(require("./QualificationListItemText"));
|
|
45
45
|
|
|
46
46
|
var _IntentOpener = _interopRequireDefault(require("../../components/IntentOpener"));
|
|
@@ -55,7 +55,7 @@ var QualificationListItemOther = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
55
55
|
formattedMetadataQualification = _ref.formattedMetadataQualification,
|
|
56
56
|
toggleActionsMenu = _ref.toggleActionsMenu;
|
|
57
57
|
|
|
58
|
-
var _useI18n = (0,
|
|
58
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
59
59
|
lang = _useI18n.lang;
|
|
60
60
|
|
|
61
61
|
var _useAlert = (0, _Alert.useAlert)(),
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
+
var _twakeI18n = require("twake-i18n");
|
|
15
|
+
|
|
14
16
|
var _paper = require("cozy-client/dist/models/paper");
|
|
15
17
|
|
|
16
18
|
var _Icon = _interopRequireDefault(require("cozy-ui/transpiled/react/Icon"));
|
|
@@ -25,8 +27,6 @@ var _ListItemText = _interopRequireDefault(require("cozy-ui/transpiled/react/Lis
|
|
|
25
27
|
|
|
26
28
|
var _MidEllipsis = _interopRequireDefault(require("cozy-ui/transpiled/react/MidEllipsis"));
|
|
27
29
|
|
|
28
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
29
|
-
|
|
30
30
|
var _QualificationIcon = _interopRequireDefault(require("cozy-ui-plus/dist/Qualification/QualificationIcon"));
|
|
31
31
|
|
|
32
32
|
var _helpers = require("../helpers");
|
|
@@ -36,7 +36,7 @@ var QualificationListItemQualification = function QualificationListItemQualifica
|
|
|
36
36
|
isReadOnly = _ref.isReadOnly,
|
|
37
37
|
onClick = _ref.onClick;
|
|
38
38
|
|
|
39
|
-
var _useI18n = (0,
|
|
39
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
40
40
|
lang = _useI18n.lang;
|
|
41
41
|
|
|
42
42
|
var value = file.metadata.qualification.label;
|
package/dist/ViewerContainer.js
CHANGED
|
@@ -25,6 +25,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
25
25
|
|
|
26
26
|
var _react = _interopRequireWildcard(require("react"));
|
|
27
27
|
|
|
28
|
+
var _twakeI18n = require("twake-i18n");
|
|
29
|
+
|
|
28
30
|
var _cozyClient = require("cozy-client");
|
|
29
31
|
|
|
30
32
|
var _permission = require("cozy-client/dist/models/permission");
|
|
@@ -39,8 +41,6 @@ var _Breakpoints = _interopRequireDefault(require("cozy-ui/transpiled/react/prov
|
|
|
39
41
|
|
|
40
42
|
var _Encrypted = _interopRequireDefault(require("cozy-ui/transpiled/react/providers/Encrypted"));
|
|
41
43
|
|
|
42
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
43
|
-
|
|
44
44
|
var _proptypes = require("cozy-ui-plus/dist/proptypes");
|
|
45
45
|
|
|
46
46
|
var _Viewer = _interopRequireDefault(require("./Viewer"));
|
|
@@ -93,7 +93,7 @@ var ViewerContainer = function ViewerContainer(props) {
|
|
|
93
93
|
setIsReadOnly = _useState2[1];
|
|
94
94
|
|
|
95
95
|
var client = (0, _cozyClient.useClient)();
|
|
96
|
-
(0,
|
|
96
|
+
(0, _twakeI18n.useExtendI18n)(_locales.locales);
|
|
97
97
|
|
|
98
98
|
var _useSharingContext = (0, _cozySharing.useSharingContext)(),
|
|
99
99
|
hasWriteAccess = _useSharingContext.hasWriteAccess,
|
|
@@ -17,6 +17,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
|
|
20
|
+
var _twakeI18n = require("twake-i18n");
|
|
21
|
+
|
|
20
22
|
var _cozyClient = require("cozy-client");
|
|
21
23
|
|
|
22
24
|
var _paper = require("cozy-client/dist/models/paper");
|
|
@@ -29,8 +31,6 @@ var _Link = _interopRequireDefault(require("cozy-ui/transpiled/react/Link"));
|
|
|
29
31
|
|
|
30
32
|
var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typography"));
|
|
31
33
|
|
|
32
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
33
|
-
|
|
34
34
|
var _withViewerLocales = require("../hoc/withViewerLocales");
|
|
35
35
|
|
|
36
36
|
var _ViewerProvider = require("../providers/ViewerProvider");
|
|
@@ -46,7 +46,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
46
46
|
var FILES_DOCTYPE = 'io.cozy.files';
|
|
47
47
|
|
|
48
48
|
var ExpirationAlert = function ExpirationAlert() {
|
|
49
|
-
var _useI18n = (0,
|
|
49
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
50
50
|
t = _useI18n.t,
|
|
51
51
|
lang = _useI18n.lang;
|
|
52
52
|
|
|
@@ -9,12 +9,12 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
var _twakeI18n = require("twake-i18n");
|
|
13
|
+
|
|
12
14
|
var _cozyClient = require("cozy-client");
|
|
13
15
|
|
|
14
16
|
var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typography"));
|
|
15
17
|
|
|
16
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
17
|
-
|
|
18
18
|
var _ViewerProvider = require("../providers/ViewerProvider");
|
|
19
19
|
|
|
20
20
|
var _models$paper = _cozyClient.models.paper,
|
|
@@ -24,7 +24,7 @@ var _models$paper = _cozyClient.models.paper,
|
|
|
24
24
|
makeExpiresInMessage = _models$paper.makeExpiresInMessage;
|
|
25
25
|
|
|
26
26
|
var ExpirationAnnotation = function ExpirationAnnotation() {
|
|
27
|
-
var _useI18n = (0,
|
|
27
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
28
28
|
lang = _useI18n.lang;
|
|
29
29
|
|
|
30
30
|
var _useViewer = (0, _ViewerProvider.useViewer)(),
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
|
|
18
|
+
var _twakeI18n = require("twake-i18n");
|
|
19
|
+
|
|
18
20
|
var _cozyClient = require("cozy-client");
|
|
19
21
|
|
|
20
22
|
var _file = require("cozy-client/dist/models/file");
|
|
@@ -43,8 +45,6 @@ var _withBreakpoints = _interopRequireDefault(require("cozy-ui/transpiled/react/
|
|
|
43
45
|
|
|
44
46
|
var _Encrypted = require("cozy-ui/transpiled/react/providers/Encrypted");
|
|
45
47
|
|
|
46
|
-
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
47
|
-
|
|
48
48
|
var _ToolbarFilePath = require("./ToolbarFilePath");
|
|
49
49
|
|
|
50
50
|
var _helpers = require("../Footer/helpers");
|
|
@@ -77,7 +77,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
77
77
|
showFilePath = _ref.showFilePath;
|
|
78
78
|
var client = (0, _cozyClient.useClient)();
|
|
79
79
|
|
|
80
|
-
var _useI18n = (0,
|
|
80
|
+
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
81
81
|
t = _useI18n.t;
|
|
82
82
|
|
|
83
83
|
var webviewIntent = (0, _cozyIntent.useWebviewIntent)();
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.withViewerLocales = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _twakeI18n = require("twake-i18n");
|
|
11
9
|
|
|
12
10
|
var _locales = require("../locales");
|
|
13
11
|
|
|
14
|
-
var withViewerLocales = (0,
|
|
12
|
+
var withViewerLocales = (0, _twakeI18n.withLocales)(_locales.locales);
|
|
15
13
|
exports.withViewerLocales = withViewerLocales;
|
package/dist/locales/index.d.ts
CHANGED
package/dist/locales/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.locales = exports.getViewerI18n = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _twakeI18n = require("twake-i18n");
|
|
9
9
|
|
|
10
10
|
var en = {
|
|
11
11
|
Viewer: {
|
|
@@ -352,7 +352,7 @@ var locales = {
|
|
|
352
352
|
exports.locales = locales;
|
|
353
353
|
|
|
354
354
|
var getViewerI18n = function getViewerI18n() {
|
|
355
|
-
return (0,
|
|
355
|
+
return (0, _twakeI18n.getI18n)(undefined, function (lang) {
|
|
356
356
|
return locales[lang];
|
|
357
357
|
});
|
|
358
358
|
};
|
|
@@ -9,6 +9,8 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _twakeI18n = _interopRequireDefault(require("twake-i18n"));
|
|
13
|
+
|
|
12
14
|
var _cozyClient = require("cozy-client");
|
|
13
15
|
|
|
14
16
|
var _cloudWallpaper = _interopRequireDefault(require("cozy-ui/docs/cloud-wallpaper.jpg"));
|
|
@@ -17,8 +19,6 @@ var _Alert = _interopRequireDefault(require("cozy-ui/transpiled/react/providers/
|
|
|
17
19
|
|
|
18
20
|
var _Breakpoints = require("cozy-ui/transpiled/react/providers/Breakpoints");
|
|
19
21
|
|
|
20
|
-
var _I18n = _interopRequireDefault(require("cozy-ui/transpiled/react/providers/I18n"));
|
|
21
|
-
|
|
22
22
|
var _ViewerProvider = _interopRequireDefault(require("./ViewerProvider"));
|
|
23
23
|
|
|
24
24
|
var _index = require("../locales/index");
|
|
@@ -155,7 +155,7 @@ var DemoProvider = function DemoProvider(_ref2) {
|
|
|
155
155
|
} : {};
|
|
156
156
|
return /*#__PURE__*/_react.default.createElement(_cozyClient.CozyProvider, {
|
|
157
157
|
client: mockClient
|
|
158
|
-
}, /*#__PURE__*/_react.default.createElement(_Breakpoints.BreakpointsProvider, null, /*#__PURE__*/_react.default.createElement(
|
|
158
|
+
}, /*#__PURE__*/_react.default.createElement(_Breakpoints.BreakpointsProvider, null, /*#__PURE__*/_react.default.createElement(_twakeI18n.default, {
|
|
159
159
|
dictRequire: function dictRequire(lang) {
|
|
160
160
|
return _index.locales[lang];
|
|
161
161
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-viewer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.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,12 +31,12 @@
|
|
|
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": "^
|
|
34
|
+
"cozy-harvest-lib": "^36.0.0",
|
|
35
35
|
"cozy-intent": "^2.30.1",
|
|
36
36
|
"cozy-logger": "^1.17.0",
|
|
37
|
-
"cozy-sharing": "^
|
|
38
|
-
"cozy-ui": "^
|
|
39
|
-
"cozy-ui-plus": "^
|
|
37
|
+
"cozy-sharing": "^28.0.0",
|
|
38
|
+
"cozy-ui": "^135.0.0",
|
|
39
|
+
"cozy-ui-plus": "^4.0.0",
|
|
40
40
|
"identity-obj-proxy": "3.0.0",
|
|
41
41
|
"jest": "26.6.3",
|
|
42
42
|
"jest-canvas-mock": "2.3.1",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"react-dom": "16.12.0",
|
|
46
46
|
"react-test-renderer": "16.12.0",
|
|
47
47
|
"stylus": "0.63.0",
|
|
48
|
+
"twake-i18n": "^0.3.0",
|
|
48
49
|
"typescript": "5.5.2"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
@@ -61,10 +62,11 @@
|
|
|
61
62
|
"cozy-intent": ">=2.30.0",
|
|
62
63
|
"cozy-logger": ">=1.17.0",
|
|
63
64
|
"cozy-sharing": ">=25.4.0",
|
|
64
|
-
"cozy-ui": ">=
|
|
65
|
+
"cozy-ui": ">=135.0.0",
|
|
65
66
|
"cozy-ui-plus": ">=1.2.0",
|
|
66
67
|
"react": ">=16.12.0",
|
|
67
|
-
"react-dom": ">=16.12.0"
|
|
68
|
+
"react-dom": ">=16.12.0",
|
|
69
|
+
"twake-i18n": ">=0.3.0"
|
|
68
70
|
},
|
|
69
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "b1d504a12eb88b8ecda4a53f82c400482d79452b"
|
|
70
72
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { useClient } from 'cozy-client'
|
|
5
6
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
@@ -7,7 +8,6 @@ import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
|
7
8
|
import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
8
9
|
import DownloadIcon from 'cozy-ui/transpiled/react/Icons/Download'
|
|
9
10
|
import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
|
|
10
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
11
11
|
|
|
12
12
|
const DownloadButton = ({ file, variant }) => {
|
|
13
13
|
const client = useClient()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { useClient } from 'cozy-client'
|
|
5
6
|
import { makeSharingLink } from 'cozy-client/dist/models/sharing'
|
|
@@ -10,7 +11,6 @@ import IconButton from 'cozy-ui/transpiled/react/IconButton'
|
|
|
10
11
|
import ReplyIcon from 'cozy-ui/transpiled/react/Icons/Reply'
|
|
11
12
|
import ShareIosIcon from 'cozy-ui/transpiled/react/Icons/ShareIos'
|
|
12
13
|
import Alerter from 'cozy-ui/transpiled/react/deprecated/Alerter'
|
|
13
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
14
14
|
|
|
15
15
|
const ForwardIcon = isIOS() ? ShareIosIcon : ReplyIcon
|
|
16
16
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { withClient } from 'cozy-client'
|
|
5
6
|
import { downloadFile } from 'cozy-client/dist/models/file'
|
|
6
7
|
import { useWebviewIntent } from 'cozy-intent'
|
|
7
8
|
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
8
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
9
9
|
import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
|
|
10
10
|
|
|
11
11
|
const DownloadButton = ({ client, file, url }) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
6
|
import Copy from 'cozy-ui/transpiled/react/Icons/Copy'
|
|
@@ -8,7 +9,6 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
|
8
9
|
import ActionMenu, {
|
|
9
10
|
ActionMenuItem
|
|
10
11
|
} from 'cozy-ui/transpiled/react/deprecated/ActionMenu'
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import styles from './styles.styl'
|
|
14
14
|
import IntentOpener from '../components/IntentOpener'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import BottomSheet, {
|
|
5
6
|
BottomSheetItem
|
|
@@ -11,7 +12,6 @@ import List from 'cozy-ui/transpiled/react/List'
|
|
|
11
12
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
12
13
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
13
14
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
14
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
15
15
|
|
|
16
16
|
import IntentOpener from '../components/IntentOpener'
|
|
17
17
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
|
|
5
6
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
7
|
|
|
8
8
|
import ActionMenuDesktop from './ActionMenuDesktop'
|
|
9
9
|
import ActionMenuMobile from './ActionMenuMobile'
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import has from 'lodash/has'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React, { useRef, useState } from 'react'
|
|
4
|
+
import { useI18n } from 'twake-i18n'
|
|
4
5
|
|
|
6
|
+
import { useClient } from 'cozy-client'
|
|
5
7
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
|
|
6
8
|
import {
|
|
7
9
|
makeActions,
|
|
@@ -22,7 +24,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
22
24
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
23
25
|
import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
|
|
24
26
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
25
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
26
27
|
|
|
27
28
|
import { makeFormat, makeSize, makeDate, makePath } from './helpers'
|
|
28
29
|
import { withViewerLocales } from '../hoc/withViewerLocales'
|
|
@@ -30,6 +31,7 @@ import { withViewerLocales } from '../hoc/withViewerLocales'
|
|
|
30
31
|
const Informations = ({ file, isPublic, t }) => {
|
|
31
32
|
const [showMenu, setShowMenu] = useState(false)
|
|
32
33
|
const { f, lang } = useI18n()
|
|
34
|
+
const client = useClient()
|
|
33
35
|
const format = makeFormat(file)
|
|
34
36
|
const path = makePath(file)
|
|
35
37
|
const size = makeSize(file.size)
|
|
@@ -39,7 +41,7 @@ const Informations = ({ file, isPublic, t }) => {
|
|
|
39
41
|
const hasElectronicSafe = has(file, 'metadata.electronicSafe')
|
|
40
42
|
const anchorRef = useRef()
|
|
41
43
|
|
|
42
|
-
const actions = makeActions([viewInDrive])
|
|
44
|
+
const actions = makeActions([viewInDrive], { client })
|
|
43
45
|
|
|
44
46
|
return (
|
|
45
47
|
<List>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
getTranslatedNameForContact,
|
|
@@ -15,7 +16,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
|
15
16
|
import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
|
|
16
17
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
17
18
|
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
|
|
18
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
19
19
|
|
|
20
20
|
import QualificationListItemText from './QualificationListItemText'
|
|
21
21
|
import IntentOpener from '../../components/IntentOpener'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
isExpired,
|
|
@@ -18,7 +19,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
|
18
19
|
import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
|
|
19
20
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
20
21
|
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
|
|
21
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
22
22
|
|
|
23
23
|
import QualificationListItemText from './QualificationListItemText'
|
|
24
24
|
import ExpirationAnnotation from '../../components/ExpirationAnnotation'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
getTranslatedNameForInformationMetadata,
|
|
@@ -22,7 +23,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
|
22
23
|
import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
|
|
23
24
|
import MidEllipsis from 'cozy-ui/transpiled/react/MidEllipsis'
|
|
24
25
|
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
|
|
25
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
26
26
|
|
|
27
27
|
import QualificationListItemText from './QualificationListItemText'
|
|
28
28
|
import IntentOpener from '../../components/IntentOpener'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
getTranslatedNameForOtherMetadata,
|
|
@@ -16,7 +17,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
|
16
17
|
import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
|
|
17
18
|
import MidEllipsis from 'cozy-ui/transpiled/react/MidEllipsis'
|
|
18
19
|
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
|
|
19
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
20
20
|
|
|
21
21
|
import QualificationListItemText from './QualificationListItemText'
|
|
22
22
|
import IntentOpener from '../../components/IntentOpener'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { formatOtherMetadataValue } from 'cozy-client/dist/models/paper'
|
|
5
6
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
@@ -8,7 +9,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
8
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
9
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
11
|
import MidEllipsis from 'cozy-ui/transpiled/react/MidEllipsis'
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
import QualificationIcon from 'cozy-ui-plus/dist/Qualification/QualificationIcon'
|
|
13
13
|
|
|
14
14
|
import { canEditQualification } from '../helpers'
|
package/src/ViewerContainer.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React, { createRef, useState, useEffect } from 'react'
|
|
4
|
+
import { useExtendI18n } from 'twake-i18n'
|
|
4
5
|
|
|
5
6
|
import { useClient } from 'cozy-client'
|
|
6
7
|
import { isDocumentReadOnly } from 'cozy-client/dist/models/permission'
|
|
@@ -10,7 +11,6 @@ import Dialog from 'cozy-ui/transpiled/react/Dialog'
|
|
|
10
11
|
import AlertProvider from 'cozy-ui/transpiled/react/providers/Alert'
|
|
11
12
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
12
13
|
import EncryptedProvider from 'cozy-ui/transpiled/react/providers/Encrypted'
|
|
13
|
-
import { useExtendI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
14
14
|
import { FileDoctype } from 'cozy-ui-plus/dist/proptypes'
|
|
15
15
|
|
|
16
16
|
import Viewer from './Viewer'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { render, waitFor } from '@testing-library/react'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import I18n from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { CozyProvider, createMockClient } from 'cozy-client'
|
|
5
6
|
import logger from 'cozy-logger'
|
|
6
7
|
import EncryptedProvider from 'cozy-ui/transpiled/react/providers/Encrypted'
|
|
7
|
-
import { I18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
8
8
|
|
|
9
9
|
import { PdfMobileViewer } from './PdfMobileViewer'
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { render, waitFor } from '@testing-library/react'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import I18n from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import CozyClient, { CozyProvider } from 'cozy-client'
|
|
5
|
-
import I18n from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import ShortcutViewer from './ShortcutViewer'
|
|
8
8
|
import en from '../locales/en.json'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { useClient } from 'cozy-client'
|
|
4
5
|
import {
|
|
@@ -11,7 +12,6 @@ import Alert from 'cozy-ui/transpiled/react/Alert'
|
|
|
11
12
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
12
13
|
import Link from 'cozy-ui/transpiled/react/Link'
|
|
13
14
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
14
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
15
15
|
|
|
16
16
|
import { withViewerLocales } from '../hoc/withViewerLocales'
|
|
17
17
|
import { useViewer } from '../providers/ViewerProvider'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { models } from 'cozy-client'
|
|
4
5
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
computeExpirationDate,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React from 'react'
|
|
4
|
+
import { useI18n } from 'twake-i18n'
|
|
4
5
|
|
|
5
6
|
import { useClient } from 'cozy-client'
|
|
6
7
|
import { downloadFile } from 'cozy-client/dist/models/file'
|
|
@@ -21,7 +22,6 @@ import MidEllipsis from 'cozy-ui/transpiled/react/MidEllipsis'
|
|
|
21
22
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
22
23
|
import withBreakpoints from 'cozy-ui/transpiled/react/helpers/withBreakpoints'
|
|
23
24
|
import { useEncrypted } from 'cozy-ui/transpiled/react/providers/Encrypted'
|
|
24
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
25
25
|
|
|
26
26
|
import { ToolbarFilePath } from './ToolbarFilePath'
|
|
27
27
|
import styles from './styles.styl'
|
package/src/locales/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Fragment } from 'react'
|
|
2
|
+
import I18n from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { CozyProvider } from 'cozy-client'
|
|
4
5
|
import CloudWallpaper from 'cozy-ui/docs/cloud-wallpaper.jpg'
|
|
5
6
|
import AlertProvider from 'cozy-ui/transpiled/react/providers/Alert'
|
|
6
7
|
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
7
|
-
import I18n from 'cozy-ui/transpiled/react/providers/I18n'
|
|
8
8
|
|
|
9
9
|
import ViewerProvider from './ViewerProvider'
|
|
10
10
|
import { locales } from '../locales/index'
|