@atlaskit/media-client 35.7.1 → 36.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,23 @@
1
1
  # @atlaskit/media-client
2
2
 
3
+ ## 36.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 35.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`c90ccf0c600ee`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c90ccf0c600ee) -
14
+ Enable cross product/cross client copy and paste of Media files by including clientId during Copy
15
+ operations.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 35.7.1
4
22
 
5
23
  ### Patch Changes
@@ -76,8 +76,8 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
76
76
  var err = new _errors.CommonMediaClientError(error);
77
77
  return (0, _errors.fromCommonMediaClientError)(id, occurrenceKey, err);
78
78
  } else {
79
- var _err2 = new _errors.CommonMediaClientError((error === null || error === void 0 ? void 0 : error.reason) || 'unknown', error === null || error === void 0 ? void 0 : error.metadata, error === null || error === void 0 ? void 0 : error.innerError);
80
- return (0, _errors.fromCommonMediaClientError)(id, occurrenceKey, _err2);
79
+ var _err = new _errors.CommonMediaClientError((error === null || error === void 0 ? void 0 : error.reason) || 'unknown', error === null || error === void 0 ? void 0 : error.metadata, error === null || error === void 0 ? void 0 : error.innerError);
80
+ return (0, _errors.fromCommonMediaClientError)(id, occurrenceKey, _err);
81
81
  }
82
82
  });
83
83
  (0, _defineProperty2.default)(this, "setFileState", function (id, fileState) {
@@ -884,7 +884,7 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
884
884
  sourceCollection: source.collection,
885
885
  collection: destination.collection,
886
886
  replaceFileId: destination.replaceFileId
887
- }, traceContext);
887
+ }, traceContext, source.clientId);
888
888
  case 2:
889
889
  res = _context12.sent;
890
890
  data = res.data;
@@ -64,23 +64,42 @@ var MediaClient = exports.MediaClient = /*#__PURE__*/function () {
64
64
  return this.mediaStore.getFileImageURLSync(id, params);
65
65
  }
66
66
  }, {
67
- key: "getImageMetadata",
67
+ key: "getClientId",
68
68
  value: function () {
69
- var _getImageMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(id, params) {
69
+ var _getClientId = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(collectionName) {
70
70
  return _regenerator.default.wrap(function _callee$(_context) {
71
71
  while (1) switch (_context.prev = _context.next) {
72
72
  case 0:
73
- _context.next = 2;
73
+ return _context.abrupt("return", this.mediaStore.getClientId(collectionName));
74
+ case 1:
75
+ case "end":
76
+ return _context.stop();
77
+ }
78
+ }, _callee, this);
79
+ }));
80
+ function getClientId(_x) {
81
+ return _getClientId.apply(this, arguments);
82
+ }
83
+ return getClientId;
84
+ }()
85
+ }, {
86
+ key: "getImageMetadata",
87
+ value: function () {
88
+ var _getImageMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id, params) {
89
+ return _regenerator.default.wrap(function _callee2$(_context2) {
90
+ while (1) switch (_context2.prev = _context2.next) {
91
+ case 0:
92
+ _context2.next = 2;
74
93
  return this.mediaStore.getImageMetadata(id, params);
75
94
  case 2:
76
- return _context.abrupt("return", _context.sent.metadata);
95
+ return _context2.abrupt("return", _context2.sent.metadata);
77
96
  case 3:
78
97
  case "end":
79
- return _context.stop();
98
+ return _context2.stop();
80
99
  }
81
- }, _callee, this);
100
+ }, _callee2, this);
82
101
  }));
83
- function getImageMetadata(_x, _x2) {
102
+ function getImageMetadata(_x2, _x3) {
84
103
  return _getImageMetadata.apply(this, arguments);
85
104
  }
86
105
  return getImageMetadata;
@@ -88,30 +107,30 @@ var MediaClient = exports.MediaClient = /*#__PURE__*/function () {
88
107
  }, {
89
108
  key: "mobileUploadPromise",
90
109
  value: function () {
91
- var _mobileUploadPromise = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
110
+ var _mobileUploadPromise = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
92
111
  var module;
93
- return _regenerator.default.wrap(function _callee2$(_context2) {
94
- while (1) switch (_context2.prev = _context2.next) {
112
+ return _regenerator.default.wrap(function _callee3$(_context3) {
113
+ while (1) switch (_context3.prev = _context3.next) {
95
114
  case 0:
96
115
  if (!this.mobileUpload) {
97
- _context2.next = 2;
116
+ _context3.next = 2;
98
117
  break;
99
118
  }
100
- return _context2.abrupt("return", this.mobileUpload);
119
+ return _context3.abrupt("return", this.mobileUpload);
101
120
  case 2:
102
- _context2.next = 4;
121
+ _context3.next = 4;
103
122
  return Promise.resolve().then(function () {
104
123
  return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-client-mobile-upload" */'./mobile-upload'));
105
124
  });
106
125
  case 4:
107
- module = _context2.sent;
126
+ module = _context3.sent;
108
127
  this.mobileUpload = new module.MobileUploadImpl(this.mediaStore, this.store);
109
- return _context2.abrupt("return", this.mobileUpload);
128
+ return _context3.abrupt("return", this.mobileUpload);
110
129
  case 7:
111
130
  case "end":
112
- return _context2.stop();
131
+ return _context3.stop();
113
132
  }
114
- }, _callee2, this);
133
+ }, _callee3, this);
115
134
  }));
116
135
  function mobileUploadPromise() {
117
136
  return _mobileUploadPromise.apply(this, arguments);
@@ -121,19 +140,19 @@ var MediaClient = exports.MediaClient = /*#__PURE__*/function () {
121
140
  }, {
122
141
  key: "removeFileFromCollection",
123
142
  value: function () {
124
- var _removeFileFromCollection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(id, collectionName, occurrenceKey, traceContext) {
125
- return _regenerator.default.wrap(function _callee3$(_context3) {
126
- while (1) switch (_context3.prev = _context3.next) {
143
+ var _removeFileFromCollection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id, collectionName, occurrenceKey, traceContext) {
144
+ return _regenerator.default.wrap(function _callee4$(_context4) {
145
+ while (1) switch (_context4.prev = _context4.next) {
127
146
  case 0:
128
- _context3.next = 2;
147
+ _context4.next = 2;
129
148
  return this.mediaStore.removeCollectionFile(id, collectionName, occurrenceKey, traceContext);
130
149
  case 2:
131
150
  case "end":
132
- return _context3.stop();
151
+ return _context4.stop();
133
152
  }
134
- }, _callee3, this);
153
+ }, _callee4, this);
135
154
  }));
136
- function removeFileFromCollection(_x3, _x4, _x5, _x6) {
155
+ function removeFileFromCollection(_x4, _x5, _x6, _x7) {
137
156
  return _removeFileFromCollection.apply(this, arguments);
138
157
  }
139
158
  return removeFileFromCollection;