@atlaskit/media-client 33.5.0 → 34.1.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 +20 -0
- package/dist/cjs/client/file-fetcher/index.js +3 -7
- package/dist/cjs/client/media-store/MediaStore.js +2 -1
- package/dist/es2019/client/file-fetcher/index.js +1 -4
- package/dist/es2019/client/media-store/MediaStore.js +2 -1
- package/dist/esm/client/file-fetcher/index.js +3 -7
- package/dist/esm/client/media-store/MediaStore.js +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 34.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#175834](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175834)
|
|
8
|
+
[`f10fd5e7fb66f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f10fd5e7fb66f) -
|
|
9
|
+
Enable Delete API for captions
|
|
10
|
+
|
|
11
|
+
## 34.0.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#169011](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169011)
|
|
16
|
+
[`93d6ca5689e75`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/93d6ca5689e75) -
|
|
17
|
+
Sending collection as query parameter during captions upload
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 33.5.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -224,13 +224,9 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
224
224
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
225
225
|
while (1) switch (_context3.prev = _context3.next) {
|
|
226
226
|
case 0:
|
|
227
|
-
|
|
228
|
-
_context3.next = 3;
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
_context3.next = 3;
|
|
227
|
+
_context3.next = 2;
|
|
232
228
|
return _this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
|
|
233
|
-
case
|
|
229
|
+
case 2:
|
|
234
230
|
// Manually remove the artifact from file state instead of re-requesting the entire payload.
|
|
235
231
|
file = _this.store.getState().files[id];
|
|
236
232
|
if (file && file.status === 'processed' && file.artifacts) {
|
|
@@ -241,7 +237,7 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
241
237
|
});
|
|
242
238
|
_this.setFileState(id, updatedFileState);
|
|
243
239
|
}
|
|
244
|
-
case
|
|
240
|
+
case 4:
|
|
245
241
|
case "end":
|
|
246
242
|
return _context3.stop();
|
|
247
243
|
}
|
|
@@ -95,7 +95,8 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
95
95
|
'Content-Type': file.type
|
|
96
96
|
};
|
|
97
97
|
extendedParams = _objectSpread(_objectSpread({}, params), {}, {
|
|
98
|
-
name: file.name
|
|
98
|
+
name: file.name,
|
|
99
|
+
collection: collectionName
|
|
99
100
|
});
|
|
100
101
|
authContext = {
|
|
101
102
|
collectionName: collectionName,
|
|
@@ -156,10 +156,7 @@ export class FileFetcherImpl {
|
|
|
156
156
|
return data;
|
|
157
157
|
});
|
|
158
158
|
_defineProperty(this, "deleteArtifact", async (id, params, collectionName, traceContext) => {
|
|
159
|
-
|
|
160
|
-
if (process.env.NODE_ENV === 'test') {
|
|
161
|
-
await this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
|
|
162
|
-
}
|
|
159
|
+
await this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
|
|
163
160
|
|
|
164
161
|
// Manually remove the artifact from file state instead of re-requesting the entire payload.
|
|
165
162
|
const file = this.store.getState().files[id];
|
|
@@ -206,13 +206,9 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
206
206
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
207
207
|
while (1) switch (_context3.prev = _context3.next) {
|
|
208
208
|
case 0:
|
|
209
|
-
|
|
210
|
-
_context3.next = 3;
|
|
211
|
-
break;
|
|
212
|
-
}
|
|
213
|
-
_context3.next = 3;
|
|
209
|
+
_context3.next = 2;
|
|
214
210
|
return _this.mediaApi.deleteArtifact(id, params, collectionName, traceContext);
|
|
215
|
-
case
|
|
211
|
+
case 2:
|
|
216
212
|
// Manually remove the artifact from file state instead of re-requesting the entire payload.
|
|
217
213
|
file = _this.store.getState().files[id];
|
|
218
214
|
if (file && file.status === 'processed' && file.artifacts) {
|
|
@@ -223,7 +219,7 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
223
219
|
});
|
|
224
220
|
_this.setFileState(id, updatedFileState);
|
|
225
221
|
}
|
|
226
|
-
case
|
|
222
|
+
case 4:
|
|
227
223
|
case "end":
|
|
228
224
|
return _context3.stop();
|
|
229
225
|
}
|
|
@@ -89,7 +89,8 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
89
89
|
'Content-Type': file.type
|
|
90
90
|
};
|
|
91
91
|
extendedParams = _objectSpread(_objectSpread({}, params), {}, {
|
|
92
|
-
name: file.name
|
|
92
|
+
name: file.name,
|
|
93
|
+
collection: collectionName
|
|
93
94
|
});
|
|
94
95
|
authContext = {
|
|
95
96
|
collectionName: collectionName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.1.0",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"xstate": "4.20.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/media-core": "^
|
|
53
|
+
"@atlaskit/media-core": "^37.0.0",
|
|
54
54
|
"@atlaskit/media-state": "^1.6.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@atlaskit/media-core": "^
|
|
57
|
+
"@atlaskit/media-core": "^37.0.0",
|
|
58
58
|
"@atlaskit/media-state": "^1.6.0",
|
|
59
59
|
"@atlaskit/ssr": "workspace:^",
|
|
60
|
-
"@atlaskit/tokens": "^5.
|
|
60
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
61
61
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
62
62
|
"@emotion/react": "^11.7.1",
|
|
63
63
|
"@types/deep-equal": "^1.0.1",
|