@atlaskit/media-file-preview 0.2.0 → 0.2.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
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/media-file-preview
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#69372](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69372) [`d719e8e81e2c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d719e8e81e2c) - Fixed status for processed files with no preview
|
|
8
|
+
|
|
3
9
|
## 0.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -114,13 +114,13 @@ var useFilePreview = exports.useFilePreview = function useFilePreview(_ref) {
|
|
|
114
114
|
}, [identifier]);
|
|
115
115
|
(0, _react.useEffect)(function () {
|
|
116
116
|
if (status !== 'error') {
|
|
117
|
-
if (!preview) {
|
|
117
|
+
if (!preview && (!fileState || fileState.status === 'processing' || fileState.status === 'uploading')) {
|
|
118
118
|
setStatus('loading');
|
|
119
119
|
} else {
|
|
120
120
|
setStatus('complete');
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
}, [preview, status]);
|
|
123
|
+
}, [preview, status, fileState]);
|
|
124
124
|
|
|
125
125
|
//----------------------------------------------------------------
|
|
126
126
|
// Preview Fetch Helper
|
|
@@ -90,13 +90,13 @@ export const useFilePreview = ({
|
|
|
90
90
|
}, [identifier]);
|
|
91
91
|
useEffect(() => {
|
|
92
92
|
if (status !== 'error') {
|
|
93
|
-
if (!preview) {
|
|
93
|
+
if (!preview && (!fileState || fileState.status === 'processing' || fileState.status === 'uploading')) {
|
|
94
94
|
setStatus('loading');
|
|
95
95
|
} else {
|
|
96
96
|
setStatus('complete');
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
}, [preview, status]);
|
|
99
|
+
}, [preview, status, fileState]);
|
|
100
100
|
|
|
101
101
|
//----------------------------------------------------------------
|
|
102
102
|
// Preview Fetch Helper
|
|
@@ -107,13 +107,13 @@ export var useFilePreview = function useFilePreview(_ref) {
|
|
|
107
107
|
}, [identifier]);
|
|
108
108
|
useEffect(function () {
|
|
109
109
|
if (status !== 'error') {
|
|
110
|
-
if (!preview) {
|
|
110
|
+
if (!preview && (!fileState || fileState.status === 'processing' || fileState.status === 'uploading')) {
|
|
111
111
|
setStatus('loading');
|
|
112
112
|
} else {
|
|
113
113
|
setStatus('complete');
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
}, [preview, status]);
|
|
116
|
+
}, [preview, status, fileState]);
|
|
117
117
|
|
|
118
118
|
//----------------------------------------------------------------
|
|
119
119
|
// Preview Fetch Helper
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-file-preview",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A React Hook to fetch and render file previews. It's overloaded with fancy features like SSR, lazy loading, memory cache and local preview.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|