@atlaskit/media-client 27.6.1 → 28.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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 28.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#139803](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139803)
|
|
8
|
+
[`573e2dccbc940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/573e2dccbc940) -
|
|
9
|
+
BREAKING CHANGE: Attribute `preview` in File State is now set unnconditionally in the file state.
|
|
10
|
+
No longer when it's supported by the broswer. If your application relies on this attribute, check
|
|
11
|
+
the file mimetype to ensure that you are using it properly. This change was released in `v27.0.0`
|
|
12
|
+
behind a feature flag. Now, it is a permanent change.
|
|
13
|
+
|
|
3
14
|
## 27.6.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -47,7 +47,6 @@ var _shouldFetchRemoteFileStates = require("../../utils/shouldFetchRemoteFileSta
|
|
|
47
47
|
var _polling = require("../../utils/polling");
|
|
48
48
|
var _detectEmptyFile = require("../../utils/detectEmptyFile");
|
|
49
49
|
var _mediaState = require("@atlaskit/media-state");
|
|
50
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
51
50
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
52
51
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
53
52
|
var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
@@ -152,12 +151,10 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
152
151
|
if (content instanceof Blob) {
|
|
153
152
|
size = content.size;
|
|
154
153
|
mimeType = content.type;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
}
|
|
154
|
+
preview = {
|
|
155
|
+
value: content,
|
|
156
|
+
origin: 'local'
|
|
157
|
+
};
|
|
161
158
|
}
|
|
162
159
|
var mediaType = (0, _getMediaTypeFromUploadableFile.getMediaTypeFromUploadableFile)(file);
|
|
163
160
|
return {
|
|
@@ -19,12 +19,11 @@ import { convertBase64ToBlob } from '../../utils/convertBase64ToBlob';
|
|
|
19
19
|
import { toPromise, fromObservable } from '../../utils/mediaSubscribable';
|
|
20
20
|
import { getDimensionsFromBlob } from '../../utils/getDimensionsFromBlob';
|
|
21
21
|
import { createMediaSubject } from '../../utils/createMediaSubject';
|
|
22
|
-
import {
|
|
22
|
+
import { getMediaTypeFromMimeType } from '@atlaskit/media-common/mediaTypeUtils';
|
|
23
23
|
import { shouldFetchRemoteFileStates } from '../../utils/shouldFetchRemoteFileStates';
|
|
24
24
|
import { PollingFunction } from '../../utils/polling';
|
|
25
25
|
import { isEmptyFile } from '../../utils/detectEmptyFile';
|
|
26
26
|
import { mediaStore } from '@atlaskit/media-state';
|
|
27
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
28
27
|
export { isFileFetcherError, FileFetcherError } from './error';
|
|
29
28
|
export class FileFetcherImpl {
|
|
30
29
|
constructor(mediaApi, store = mediaStore) {
|
|
@@ -105,12 +104,10 @@ export class FileFetcherImpl {
|
|
|
105
104
|
if (content instanceof Blob) {
|
|
106
105
|
size = content.size;
|
|
107
106
|
mimeType = content.type;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
};
|
|
113
|
-
}
|
|
107
|
+
preview = {
|
|
108
|
+
value: content,
|
|
109
|
+
origin: 'local'
|
|
110
|
+
};
|
|
114
111
|
}
|
|
115
112
|
const mediaType = getMediaTypeFromUploadableFile(file);
|
|
116
113
|
return {
|
|
@@ -25,12 +25,11 @@ import { convertBase64ToBlob } from '../../utils/convertBase64ToBlob';
|
|
|
25
25
|
import { toPromise, fromObservable } from '../../utils/mediaSubscribable';
|
|
26
26
|
import { getDimensionsFromBlob } from '../../utils/getDimensionsFromBlob';
|
|
27
27
|
import { createMediaSubject } from '../../utils/createMediaSubject';
|
|
28
|
-
import {
|
|
28
|
+
import { getMediaTypeFromMimeType } from '@atlaskit/media-common/mediaTypeUtils';
|
|
29
29
|
import { shouldFetchRemoteFileStates } from '../../utils/shouldFetchRemoteFileStates';
|
|
30
30
|
import { PollingFunction } from '../../utils/polling';
|
|
31
31
|
import { isEmptyFile } from '../../utils/detectEmptyFile';
|
|
32
32
|
import { mediaStore } from '@atlaskit/media-state';
|
|
33
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
34
33
|
export { isFileFetcherError, FileFetcherError } from './error';
|
|
35
34
|
export var FileFetcherImpl = /*#__PURE__*/function () {
|
|
36
35
|
function FileFetcherImpl(mediaApi) {
|
|
@@ -134,12 +133,10 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
134
133
|
if (content instanceof Blob) {
|
|
135
134
|
size = content.size;
|
|
136
135
|
mimeType = content.type;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
};
|
|
142
|
-
}
|
|
136
|
+
preview = {
|
|
137
|
+
value: content,
|
|
138
|
+
origin: 'local'
|
|
139
|
+
};
|
|
143
140
|
}
|
|
144
141
|
var mediaType = getMediaTypeFromUploadableFile(file);
|
|
145
142
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -81,9 +81,6 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"platform-feature-flags": {
|
|
84
|
-
"platform.media-svg-rendering": {
|
|
85
|
-
"type": "boolean"
|
|
86
|
-
},
|
|
87
84
|
"platform.media-cdn-delivery": {
|
|
88
85
|
"type": "boolean"
|
|
89
86
|
},
|