cozy-ui 72.0.0 → 73.0.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 +26 -0
- package/package.json +8 -5
- package/react/Viewer/Footer/ForwardButton.jsx +1 -1
- package/react/Viewer/ViewerControls.jsx +12 -13
- package/react/index.js +0 -3
- package/transpiled/react/Viewer/Footer/ForwardButton.js +2 -3
- package/transpiled/react/Viewer/ViewerControls.js +6 -11
- package/transpiled/react/index.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## [73.0.1](https://github.com/cozy/cozy-ui/compare/v73.0.0...v73.0.1) (2022-08-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Remove useless exports already processed ([1c7d283](https://github.com/cozy/cozy-ui/commit/1c7d283))
|
|
7
|
+
|
|
8
|
+
# [73.0.0](https://github.com/cozy/cozy-ui/compare/v72.1.0...v73.0.0) (2022-08-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Upgrade cozy-client to 33.0.0 ([e449adc](https://github.com/cozy/cozy-ui/commit/e449adc)), closes [cozy/cozy-client#1227](https://github.com/cozy/cozy-client/issues/1227)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### BREAKING CHANGES
|
|
17
|
+
|
|
18
|
+
* You need to update `cozy-client` to `>33.0.0`.
|
|
19
|
+
|
|
20
|
+
# [72.1.0](https://github.com/cozy/cozy-ui/compare/v72.0.0...v72.1.0) (2022-08-25)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* Let the user able to select content ([7efff3d](https://github.com/cozy/cozy-ui/commit/7efff3d))
|
|
26
|
+
|
|
1
27
|
# [72.0.0](https://github.com/cozy/cozy-ui/compare/v71.0.0...v72.0.0) (2022-08-24)
|
|
2
28
|
|
|
3
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "73.0.1",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -71,14 +71,15 @@
|
|
|
71
71
|
"@babel/helper-define-map": "7.16.7",
|
|
72
72
|
"@babel/helper-regex": "7.10.5",
|
|
73
73
|
"@cozy/codemods": "^1.9.0",
|
|
74
|
+
"@cozy/minilog": "^1.0.0",
|
|
74
75
|
"@semantic-release/changelog": "5.0.1",
|
|
75
76
|
"@semantic-release/git": "7.0.18",
|
|
76
77
|
"@semantic-release/npm": "9.0.1",
|
|
77
78
|
"@svgr/cli": "^5.4.0",
|
|
78
79
|
"@testing-library/jest-dom": "^5.14.1",
|
|
79
|
-
"@testing-library/user-event": "^14.4.2",
|
|
80
80
|
"@testing-library/react": "11.2.7",
|
|
81
81
|
"@testing-library/react-hooks": "^3.2.1",
|
|
82
|
+
"@testing-library/user-event": "^14.4.2",
|
|
82
83
|
"argos-cli": "^0.3.3",
|
|
83
84
|
"autoprefixer-stylus": "1.0.0",
|
|
84
85
|
"babel-loader": "8.2.4",
|
|
@@ -87,13 +88,15 @@
|
|
|
87
88
|
"babel-preset-cozy-app": "2.0.2",
|
|
88
89
|
"browserslist-config-cozy": "0.4.0",
|
|
89
90
|
"copyfiles": "2.4.1",
|
|
90
|
-
"cozy-client": "
|
|
91
|
+
"cozy-client": "^33.0.0",
|
|
91
92
|
"cozy-device-helper": "2.0.0",
|
|
92
93
|
"cozy-doctypes": "^1.69.0",
|
|
94
|
+
"cozy-flags": "^2.10.1",
|
|
93
95
|
"cozy-harvest-lib": "^6.7.3",
|
|
94
96
|
"cozy-intent": "1.16.1",
|
|
97
|
+
"cozy-logger": "^1.9.0",
|
|
95
98
|
"cozy-sharing": "^3.10.0",
|
|
96
|
-
"cozy-stack-client": "
|
|
99
|
+
"cozy-stack-client": "^33.0.0",
|
|
97
100
|
"css-loader": "0.28.11",
|
|
98
101
|
"cssnano": "4.1.11",
|
|
99
102
|
"cssnano-preset-advanced": "4.0.8",
|
|
@@ -175,7 +178,7 @@
|
|
|
175
178
|
"rooks": "^5.11.2"
|
|
176
179
|
},
|
|
177
180
|
"peerDependencies": {
|
|
178
|
-
"cozy-client": ">=
|
|
181
|
+
"cozy-client": ">=33.0.0",
|
|
179
182
|
"cozy-device-helper": "^2.0.0",
|
|
180
183
|
"cozy-doctypes": "^1.69.0",
|
|
181
184
|
"cozy-harvest-lib": "^6.7.3",
|
|
@@ -33,7 +33,7 @@ const ForwardButton = ({ file }) => {
|
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
35
|
try {
|
|
36
|
-
const isFlatDomain = capabilities?.
|
|
36
|
+
const isFlatDomain = capabilities?.flat_subdomains
|
|
37
37
|
const url = await getSharingLink(client, [file.id], isFlatDomain)
|
|
38
38
|
const shareData = {
|
|
39
39
|
title: t('Viewer.share.title', { name: file.name }),
|
|
@@ -47,11 +47,6 @@ class ViewerControls extends Component {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
onTap = () => {
|
|
51
|
-
if (this.state.hidden) this.showControls()
|
|
52
|
-
else this.hideAfterDelay()
|
|
53
|
-
}
|
|
54
|
-
|
|
55
50
|
hideAfterDelay = () => {
|
|
56
51
|
clearTimeout(this.hideTimeout)
|
|
57
52
|
this.hideTimeout = setTimeout(() => {
|
|
@@ -65,13 +60,18 @@ class ViewerControls extends Component {
|
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
initGestures = () => {
|
|
68
|
-
const gestures = new Hammer(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
const gestures = new Hammer(
|
|
64
|
+
this.wrapped,
|
|
65
|
+
this.props.breakpoints.isDesktop
|
|
66
|
+
? {
|
|
67
|
+
cssProps: {
|
|
68
|
+
userSelect: 'auto'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
: {}
|
|
72
|
+
)
|
|
73
|
+
if (!this.props.breakpoints.isDesktop) gestures.on('swipe', this.onSwipe)
|
|
74
|
+
|
|
75
75
|
return gestures
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -116,7 +116,6 @@ class ViewerControls extends Component {
|
|
|
116
116
|
} = this.props
|
|
117
117
|
const { showToolbar, showClose, toolbarRef } = toolbarProps
|
|
118
118
|
const { hidden } = this.state
|
|
119
|
-
|
|
120
119
|
return (
|
|
121
120
|
<div
|
|
122
121
|
className={cx(styles['viewer-controls'], {
|
package/react/index.js
CHANGED
|
@@ -28,9 +28,6 @@ export { default as AccordionSummary } from './MuiCozyTheme/AccordionSummary'
|
|
|
28
28
|
export { default as AccordionDetails } from './MuiCozyTheme/AccordionDetails'
|
|
29
29
|
export { default as Toggle } from './Toggle'
|
|
30
30
|
export { default as withBreakpoints } from './helpers/withBreakpoints'
|
|
31
|
-
export { default as makeStyles } from './helpers/makeStyles'
|
|
32
|
-
export { default as withStyles } from './helpers/withStyles'
|
|
33
|
-
export { default as useTheme } from './helpers/useTheme'
|
|
34
31
|
export { default as useBreakpoints } from './hooks/useBreakpoints'
|
|
35
32
|
export { default as useBrowserOffline } from './hooks/useBrowserOffline'
|
|
36
33
|
export { Media, Img, Bd } from './Media'
|
|
@@ -28,8 +28,7 @@ var ForwardButton = function ForwardButton(_ref) {
|
|
|
28
28
|
|
|
29
29
|
var onFileOpen = /*#__PURE__*/function () {
|
|
30
30
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file) {
|
|
31
|
-
var
|
|
32
|
-
|
|
31
|
+
var isFlatDomain, url, shareData;
|
|
33
32
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34
33
|
while (1) {
|
|
35
34
|
switch (_context.prev = _context.next) {
|
|
@@ -60,7 +59,7 @@ var ForwardButton = function ForwardButton(_ref) {
|
|
|
60
59
|
|
|
61
60
|
case 11:
|
|
62
61
|
_context.prev = 11;
|
|
63
|
-
isFlatDomain = capabilities === null || capabilities === void 0 ? void 0 :
|
|
62
|
+
isFlatDomain = capabilities === null || capabilities === void 0 ? void 0 : capabilities.flat_subdomains;
|
|
64
63
|
_context.next = 15;
|
|
65
64
|
return getSharingLink(client, [file.id], isFlatDomain);
|
|
66
65
|
|
|
@@ -108,10 +108,6 @@ var ViewerControls = /*#__PURE__*/function (_Component) {
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
_defineProperty(_assertThisInitialized(_this), "onTap", function () {
|
|
112
|
-
if (_this.state.hidden) _this.showControls();else _this.hideAfterDelay();
|
|
113
|
-
});
|
|
114
|
-
|
|
115
111
|
_defineProperty(_assertThisInitialized(_this), "hideAfterDelay", function () {
|
|
116
112
|
clearTimeout(_this.hideTimeout);
|
|
117
113
|
_this.hideTimeout = setTimeout(function () {
|
|
@@ -124,13 +120,12 @@ var ViewerControls = /*#__PURE__*/function (_Component) {
|
|
|
124
120
|
});
|
|
125
121
|
|
|
126
122
|
_defineProperty(_assertThisInitialized(_this), "initGestures", function () {
|
|
127
|
-
var gestures = new Hammer(_this.wrapped
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
tap.requireFailure(doubleTap);
|
|
123
|
+
var gestures = new Hammer(_this.wrapped, _this.props.breakpoints.isDesktop ? {
|
|
124
|
+
cssProps: {
|
|
125
|
+
userSelect: 'auto'
|
|
126
|
+
}
|
|
127
|
+
} : {});
|
|
128
|
+
if (!_this.props.breakpoints.isDesktop) gestures.on('swipe', _this.onSwipe);
|
|
134
129
|
return gestures;
|
|
135
130
|
});
|
|
136
131
|
|
|
@@ -21,9 +21,6 @@ export { default as AccordionSummary } from './MuiCozyTheme/AccordionSummary';
|
|
|
21
21
|
export { default as AccordionDetails } from './MuiCozyTheme/AccordionDetails';
|
|
22
22
|
export { default as Toggle } from './Toggle';
|
|
23
23
|
export { default as withBreakpoints } from './helpers/withBreakpoints';
|
|
24
|
-
export { default as makeStyles } from './helpers/makeStyles';
|
|
25
|
-
export { default as withStyles } from './helpers/withStyles';
|
|
26
|
-
export { default as useTheme } from './helpers/useTheme';
|
|
27
24
|
export { default as useBreakpoints } from './hooks/useBreakpoints';
|
|
28
25
|
export { default as useBrowserOffline } from './hooks/useBrowserOffline';
|
|
29
26
|
export { Media, Img, Bd } from './Media';
|