cozy-ui 68.5.0 → 68.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 +7 -0
- package/package.json +1 -1
- package/react/AppLinker/index.jsx +17 -19
- package/transpiled/react/AppLinker/index.js +8 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [68.5.1](https://github.com/cozy/cozy-ui/compare/v68.5.0...v68.5.1) (2022-06-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Reduce console spam by AppLinker ([27d9064](https://github.com/cozy/cozy-ui/commit/27d9064))
|
|
7
|
+
|
|
1
8
|
# [68.5.0](https://github.com/cozy/cozy-ui/compare/v68.4.0...v68.5.0) (2022-06-08)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -87,25 +87,23 @@ export class AppLinker extends React.Component {
|
|
|
87
87
|
const appInfo = NATIVE_APP_INFOS[slug]
|
|
88
88
|
|
|
89
89
|
if (isFlagshipApp()) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
href: '#'
|
|
108
|
-
}
|
|
90
|
+
const imgPayload =
|
|
91
|
+
imgRef &&
|
|
92
|
+
JSON.stringify({
|
|
93
|
+
...imgRef.getBoundingClientRect().toJSON()
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
onClick: event => {
|
|
98
|
+
event.preventDefault()
|
|
99
|
+
|
|
100
|
+
context
|
|
101
|
+
? context.call('openApp', href, app, imgPayload)
|
|
102
|
+
: logger.error(
|
|
103
|
+
`Failed to "openApp(${app})". WebviewService has the following falsy value "${context}" in AppLinker's context.`
|
|
104
|
+
)
|
|
105
|
+
},
|
|
106
|
+
href: '#'
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
109
|
|
|
@@ -158,18 +158,14 @@ export var AppLinker = /*#__PURE__*/function (_React$Component) {
|
|
|
158
158
|
var appInfo = NATIVE_APP_INFOS[slug];
|
|
159
159
|
|
|
160
160
|
if (isFlagshipApp()) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
href: '#'
|
|
171
|
-
};
|
|
172
|
-
}
|
|
161
|
+
var imgPayload = imgRef && JSON.stringify(_objectSpread({}, imgRef.getBoundingClientRect().toJSON()));
|
|
162
|
+
return {
|
|
163
|
+
onClick: function onClick(event) {
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
context ? context.call('openApp', href, app, imgPayload) : logger.error("Failed to \"openApp(".concat(app, ")\". WebviewService has the following falsy value \"").concat(context, "\" in AppLinker's context."));
|
|
166
|
+
},
|
|
167
|
+
href: '#'
|
|
168
|
+
};
|
|
173
169
|
}
|
|
174
170
|
|
|
175
171
|
if (usingNativeApp) {
|