@atlaskit/media-test-helpers 41.1.0 → 42.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.
Files changed (158) hide show
  1. package/AGENTS.md +58 -0
  2. package/CHANGELOG.md +37 -0
  3. package/I18nWrapper/package.json +1 -8
  4. package/MockGlobalImage/package.json +1 -8
  5. package/authProvider/package.json +1 -8
  6. package/await-error/package.json +1 -8
  7. package/clipboardEventMocks/package.json +1 -8
  8. package/collectionNames/package.json +1 -8
  9. package/createFileState/package.json +1 -8
  10. package/createMouseEvent/package.json +1 -8
  11. package/createTouchEvent/package.json +1 -8
  12. package/dist/cjs/authProvider.js +6 -6
  13. package/dist/cjs/await-error.js +13 -12
  14. package/dist/cjs/featureFlagsWrapper/dropdown.js +1 -2
  15. package/dist/cjs/fileStateFactory/factory/factory.js +7 -7
  16. package/dist/cjs/fileStateFactory/fileSimulation/simulations.js +66 -66
  17. package/dist/cjs/getAuthFromContextProvider.js +4 -4
  18. package/dist/cjs/getMediaAuthProvider.js +4 -4
  19. package/dist/cjs/mediaPickerAuthProvider.js +4 -4
  20. package/dist/cjs/mocks/routers/api-router.js +11 -11
  21. package/dist/cjs/waitUntil.js +2 -2
  22. package/dist/es2019/featureFlagsWrapper/dropdown.js +1 -2
  23. package/dist/esm/authProvider.js +6 -6
  24. package/dist/esm/await-error.js +13 -12
  25. package/dist/esm/featureFlagsWrapper/dropdown.js +1 -2
  26. package/dist/esm/fileStateFactory/factory/factory.js +7 -7
  27. package/dist/esm/fileStateFactory/fileSimulation/simulations.js +66 -66
  28. package/dist/esm/getAuthFromContextProvider.js +4 -4
  29. package/dist/esm/getMediaAuthProvider.js +4 -4
  30. package/dist/esm/mediaPickerAuthProvider.js +4 -4
  31. package/dist/esm/mocks/routers/api-router.js +11 -11
  32. package/dist/esm/waitUntil.js +2 -2
  33. package/docs-content-tabs/package.json +1 -8
  34. package/exampleMediaFeatureFlags/package.json +1 -8
  35. package/exampleMediaItems/package.json +1 -8
  36. package/factory/package.json +1 -8
  37. package/fakeI18n/package.json +1 -8
  38. package/fakeMediaClient/package.json +1 -8
  39. package/featureFlagsWrapper/package.json +1 -8
  40. package/fileReader/package.json +1 -8
  41. package/fileSimulation/package.json +1 -8
  42. package/flushPromises/package.json +1 -8
  43. package/getAuthFromContextProvider/package.json +1 -8
  44. package/getMediaAuthProvider/package.json +1 -8
  45. package/globalEventEmitterListeners/package.json +1 -8
  46. package/helpers/package.json +1 -8
  47. package/images/package.json +1 -8
  48. package/jestHelpers/package.json +1 -8
  49. package/keyboardEventWithKeyCode/package.json +1 -8
  50. package/media-mock/package.json +1 -8
  51. package/mediaBaseURLS/package.json +1 -8
  52. package/mediaClientProvider/package.json +1 -8
  53. package/mediaPickerAuthProvider/package.json +1 -8
  54. package/mock-data-utils/package.json +1 -8
  55. package/mockCanvas/package.json +1 -8
  56. package/mockData/package.json +1 -8
  57. package/mockLoadImage/package.json +1 -8
  58. package/nextTick/package.json +1 -8
  59. package/package.json +22 -33
  60. package/renderWithIntl/package.json +1 -8
  61. package/simulations/package.json +1 -8
  62. package/smallImageURI/package.json +1 -8
  63. package/smallTransparentImageURI/package.json +1 -8
  64. package/smart-card-state/package.json +1 -8
  65. package/story-list/package.json +1 -8
  66. package/story-styles/package.json +1 -8
  67. package/tallImageURI/package.json +1 -8
  68. package/timeoutPromise/package.json +1 -8
  69. package/ufoLogger/package.json +1 -8
  70. package/utils/package.json +1 -8
  71. package/videoPreviewURI/package.json +1 -8
  72. package/videoURI/package.json +1 -8
  73. package/vr-test-small-image/package.json +1 -8
  74. package/waitUntil/package.json +1 -8
  75. package/wideImageURI/package.json +1 -8
  76. package/wideTransparentImageURI/package.json +1 -8
  77. package/dist/types-ts4.5/I18nWrapper.d.ts +0 -10
  78. package/dist/types-ts4.5/MockGlobalImage.d.ts +0 -2
  79. package/dist/types-ts4.5/authProvider.d.ts +0 -6
  80. package/dist/types-ts4.5/await-error.d.ts +0 -1
  81. package/dist/types-ts4.5/clipboardEventMocks.d.ts +0 -122
  82. package/dist/types-ts4.5/collectionNames.d.ts +0 -5
  83. package/dist/types-ts4.5/createMouseEvent.d.ts +0 -8
  84. package/dist/types-ts4.5/createTouchEvent.d.ts +0 -4
  85. package/dist/types-ts4.5/dataURIs/smallImageURI.d.ts +0 -1
  86. package/dist/types-ts4.5/dataURIs/smallTransparentImageURI.d.ts +0 -1
  87. package/dist/types-ts4.5/dataURIs/tallImageURI.d.ts +0 -1
  88. package/dist/types-ts4.5/dataURIs/videoPreviewURI.d.ts +0 -1
  89. package/dist/types-ts4.5/dataURIs/videoURI.d.ts +0 -1
  90. package/dist/types-ts4.5/dataURIs/vr_test_small_image.d.ts +0 -1
  91. package/dist/types-ts4.5/dataURIs/wideImageURI.d.ts +0 -1
  92. package/dist/types-ts4.5/dataURIs/wideTransparentImageURI.d.ts +0 -1
  93. package/dist/types-ts4.5/docs-content-tabs.d.ts +0 -14
  94. package/dist/types-ts4.5/example-mediaFeatureFlags.d.ts +0 -2
  95. package/dist/types-ts4.5/exampleMediaItems.d.ts +0 -56
  96. package/dist/types-ts4.5/fakeI18n.d.ts +0 -1
  97. package/dist/types-ts4.5/fakeMediaClient.d.ts +0 -4
  98. package/dist/types-ts4.5/featureFlagsWrapper/dropdown.d.ts +0 -6
  99. package/dist/types-ts4.5/featureFlagsWrapper/helpers.d.ts +0 -5
  100. package/dist/types-ts4.5/featureFlagsWrapper/index.d.ts +0 -5
  101. package/dist/types-ts4.5/fileReader.d.ts +0 -19
  102. package/dist/types-ts4.5/fileStateFactory/factory/createFileState.d.ts +0 -10
  103. package/dist/types-ts4.5/fileStateFactory/factory/factory.d.ts +0 -45
  104. package/dist/types-ts4.5/fileStateFactory/factory/helpers.d.ts +0 -7
  105. package/dist/types-ts4.5/fileStateFactory/factory/index.d.ts +0 -4
  106. package/dist/types-ts4.5/fileStateFactory/fileSimulation/fileSimulation.d.ts +0 -18
  107. package/dist/types-ts4.5/fileStateFactory/fileSimulation/index.d.ts +0 -4
  108. package/dist/types-ts4.5/fileStateFactory/fileSimulation/simulations.d.ts +0 -36
  109. package/dist/types-ts4.5/fileStateFactory/index.d.ts +0 -8
  110. package/dist/types-ts4.5/flushPromises.d.ts +0 -2
  111. package/dist/types-ts4.5/getAuthFromContextProvider.d.ts +0 -1
  112. package/dist/types-ts4.5/getJest.d.ts +0 -15
  113. package/dist/types-ts4.5/getMediaAuthProvider.d.ts +0 -3
  114. package/dist/types-ts4.5/globalEventEmitterListeners.d.ts +0 -1
  115. package/dist/types-ts4.5/images.d.ts +0 -7
  116. package/dist/types-ts4.5/index.d.ts +0 -48
  117. package/dist/types-ts4.5/jestHelpers.d.ts +0 -12
  118. package/dist/types-ts4.5/keyboardEventWithKeyCode.d.ts +0 -2
  119. package/dist/types-ts4.5/mediaBaseURLS.d.ts +0 -2
  120. package/dist/types-ts4.5/mediaClientProvider.d.ts +0 -23
  121. package/dist/types-ts4.5/mediaPickerAuthProvider.d.ts +0 -3
  122. package/dist/types-ts4.5/mockCanvas.d.ts +0 -10
  123. package/dist/types-ts4.5/mockData/handlers/copyWithToken.d.ts +0 -3
  124. package/dist/types-ts4.5/mockData/handlers/getFile.d.ts +0 -3
  125. package/dist/types-ts4.5/mockData/handlers/getFileImage.d.ts +0 -3
  126. package/dist/types-ts4.5/mockData/handlers/index.d.ts +0 -5
  127. package/dist/types-ts4.5/mockData/handlers/tenantAuth.d.ts +0 -3
  128. package/dist/types-ts4.5/mockData/handlers/userCollectionFetch.d.ts +0 -3
  129. package/dist/types-ts4.5/mockData/index.d.ts +0 -50
  130. package/dist/types-ts4.5/mockData/matchers.d.ts +0 -7
  131. package/dist/types-ts4.5/mockData/staticCommon.d.ts +0 -4
  132. package/dist/types-ts4.5/mockData/utils.d.ts +0 -4
  133. package/dist/types-ts4.5/mockLoadImage.d.ts +0 -4
  134. package/dist/types-ts4.5/mocks/database/chunk.d.ts +0 -6
  135. package/dist/types-ts4.5/mocks/database/collection-item.d.ts +0 -29
  136. package/dist/types-ts4.5/mocks/database/collection.d.ts +0 -5
  137. package/dist/types-ts4.5/mocks/database/index.d.ts +0 -21
  138. package/dist/types-ts4.5/mocks/database/upload.d.ts +0 -6
  139. package/dist/types-ts4.5/mocks/fileAndDirectoriesUtils.d.ts +0 -16
  140. package/dist/types-ts4.5/mocks/media-mock.d.ts +0 -36
  141. package/dist/types-ts4.5/mocks/routers/api-router.d.ts +0 -3
  142. package/dist/types-ts4.5/mocks/routers/index.d.ts +0 -2
  143. package/dist/types-ts4.5/mocks/routers/media-playground-router.d.ts +0 -3
  144. package/dist/types-ts4.5/mocks/websockets/index.d.ts +0 -3
  145. package/dist/types-ts4.5/mocks/websockets/messages.d.ts +0 -34
  146. package/dist/types-ts4.5/mocks/websockets/remote-upload-server.d.ts +0 -14
  147. package/dist/types-ts4.5/mocks/websockets/types.d.ts +0 -4
  148. package/dist/types-ts4.5/nextTick.d.ts +0 -2
  149. package/dist/types-ts4.5/renderWithIntl.d.ts +0 -7
  150. package/dist/types-ts4.5/smart-card-state.d.ts +0 -4
  151. package/dist/types-ts4.5/story-list.d.ts +0 -13
  152. package/dist/types-ts4.5/story-styles.d.ts +0 -7
  153. package/dist/types-ts4.5/timeoutPromise.d.ts +0 -1
  154. package/dist/types-ts4.5/ufoLogger.d.ts +0 -5
  155. package/dist/types-ts4.5/utils/index.d.ts +0 -2
  156. package/dist/types-ts4.5/utils/logging.d.ts +0 -23
  157. package/dist/types-ts4.5/utils/mockData.d.ts +0 -11
  158. package/dist/types-ts4.5/waitUntil.d.ts +0 -2
@@ -18,16 +18,16 @@ var simulateProcessed = exports.simulateProcessed = function simulateProcessed()
18
18
  return {
19
19
  simulation: function () {
20
20
  var _simulation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(factory) {
21
- return _regenerator.default.wrap(function _callee$(_context) {
21
+ return _regenerator.default.wrap(function (_context) {
22
22
  while (1) switch (_context.prev = _context.next) {
23
23
  case 0:
24
- _context.next = 2;
24
+ _context.next = 1;
25
25
  return (0, _nextTick.sleep)(speed);
26
- case 2:
26
+ case 1:
27
27
  factory.next('processed', {
28
28
  withRemotePreview: withRemotePreview
29
29
  });
30
- case 3:
30
+ case 2:
31
31
  case "end":
32
32
  return _context.stop();
33
33
  }
@@ -48,20 +48,20 @@ var simulateProcessing = exports.simulateProcessing = function simulateProcessin
48
48
  description: "File is processing, then ".concat(suceeded ? 'succeeds' : 'fails', " ").concat(withRemotePreview ? 'with' : 'without', " remote preview"),
49
49
  simulation: function () {
50
50
  var _simulation2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(factory) {
51
- return _regenerator.default.wrap(function _callee2$(_context2) {
51
+ return _regenerator.default.wrap(function (_context2) {
52
52
  while (1) switch (_context2.prev = _context2.next) {
53
53
  case 0:
54
- _context2.next = 2;
54
+ _context2.next = 1;
55
55
  return (0, _nextTick.sleep)(speed);
56
- case 2:
56
+ case 1:
57
57
  factory.next('processing');
58
- _context2.next = 5;
58
+ _context2.next = 2;
59
59
  return (0, _nextTick.sleep)(speed);
60
- case 5:
60
+ case 2:
61
61
  factory.next('processing');
62
- _context2.next = 8;
62
+ _context2.next = 3;
63
63
  return (0, _nextTick.sleep)(speed * 0.5);
64
- case 8:
64
+ case 3:
65
65
  if (!suceeded) {
66
66
  factory.next('failed-processing', {
67
67
  withRemotePreview: withRemotePreview
@@ -71,7 +71,7 @@ var simulateProcessing = exports.simulateProcessing = function simulateProcessin
71
71
  withRemotePreview: withRemotePreview
72
72
  });
73
73
  }
74
- case 9:
74
+ case 4:
75
75
  case "end":
76
76
  return _context2.stop();
77
77
  }
@@ -89,14 +89,14 @@ var simulateImmediateFailProcessing = exports.simulateImmediateFailProcessing =
89
89
  description: 'The first sate is failed-processing with no preview',
90
90
  simulation: function () {
91
91
  var _simulation3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(factory) {
92
- return _regenerator.default.wrap(function _callee3$(_context3) {
92
+ return _regenerator.default.wrap(function (_context3) {
93
93
  while (1) switch (_context3.prev = _context3.next) {
94
94
  case 0:
95
- _context3.next = 2;
95
+ _context3.next = 1;
96
96
  return (0, _nextTick.sleep)(speed);
97
- case 2:
97
+ case 1:
98
98
  factory.next('failed-processing');
99
- case 3:
99
+ case 2:
100
100
  case "end":
101
101
  return _context3.stop();
102
102
  }
@@ -116,49 +116,49 @@ var simulateUpload = exports.simulateUpload = function simulateUpload(withLocalP
116
116
  simulation: function () {
117
117
  var _simulation4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(factory) {
118
118
  var chunks, chunkUploadDelay, processingTime, uploadUpTo, index;
119
- return _regenerator.default.wrap(function _callee4$(_context4) {
119
+ return _regenerator.default.wrap(function (_context4) {
120
120
  while (1) switch (_context4.prev = _context4.next) {
121
121
  case 0:
122
122
  chunks = 3;
123
123
  chunkUploadDelay = 500;
124
124
  processingTime = speed;
125
- _context4.next = 5;
125
+ _context4.next = 1;
126
126
  return (0, _nextTick.sleep)(speed);
127
- case 5:
127
+ case 1:
128
128
  factory.next('uploading', {
129
129
  withLocalPreview: withLocalPreview
130
130
  });
131
131
  uploadUpTo = !suceeded ? chunks / 2 : chunks;
132
132
  index = 0;
133
- case 8:
133
+ case 2:
134
134
  if (!(index <= uploadUpTo)) {
135
- _context4.next = 15;
135
+ _context4.next = 4;
136
136
  break;
137
137
  }
138
138
  factory.next('uploading', {
139
139
  uploadProgress: index / chunks,
140
140
  withLocalPreview: withLocalPreview
141
141
  });
142
- _context4.next = 12;
142
+ _context4.next = 3;
143
143
  return (0, _nextTick.sleep)(chunkUploadDelay);
144
- case 12:
144
+ case 3:
145
145
  index++;
146
- _context4.next = 8;
146
+ _context4.next = 2;
147
147
  break;
148
- case 15:
148
+ case 4:
149
149
  if (!suceeded) {
150
150
  factory.error(new Error('some-error'));
151
151
  }
152
152
  factory.next('processing', {
153
153
  withLocalPreview: withLocalPreview
154
154
  });
155
- _context4.next = 19;
155
+ _context4.next = 5;
156
156
  return (0, _nextTick.sleep)(processingTime);
157
- case 19:
157
+ case 5:
158
158
  factory.next('processed', {
159
159
  withLocalPreview: withLocalPreview
160
160
  });
161
- case 20:
161
+ case 6:
162
162
  case "end":
163
163
  return _context4.stop();
164
164
  }
@@ -176,14 +176,14 @@ var simulateErrorState = exports.simulateErrorState = function simulateErrorStat
176
176
  description: 'File state is error',
177
177
  simulation: function () {
178
178
  var _simulation5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(factory) {
179
- return _regenerator.default.wrap(function _callee5$(_context5) {
179
+ return _regenerator.default.wrap(function (_context5) {
180
180
  while (1) switch (_context5.prev = _context5.next) {
181
181
  case 0:
182
- _context5.next = 2;
182
+ _context5.next = 1;
183
183
  return (0, _nextTick.sleep)(speed);
184
- case 2:
184
+ case 1:
185
185
  factory.next('error');
186
- case 3:
186
+ case 2:
187
187
  case "end":
188
188
  return _context5.stop();
189
189
  }
@@ -201,14 +201,14 @@ var simulateError = exports.simulateError = function simulateError() {
201
201
  description: 'Subscription throws an error through the observer',
202
202
  simulation: function () {
203
203
  var _simulation6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(factory) {
204
- return _regenerator.default.wrap(function _callee6$(_context6) {
204
+ return _regenerator.default.wrap(function (_context6) {
205
205
  while (1) switch (_context6.prev = _context6.next) {
206
206
  case 0:
207
- _context6.next = 2;
207
+ _context6.next = 1;
208
208
  return (0, _nextTick.sleep)(speed);
209
- case 2:
209
+ case 1:
210
210
  factory.error(new Error('error thrown from client'));
211
- case 3:
211
+ case 2:
212
212
  case "end":
213
213
  return _context6.stop();
214
214
  }
@@ -232,28 +232,28 @@ var simulateManyProcessed = exports.simulateManyProcessed = function simulateMan
232
232
  description: '',
233
233
  simulation: function () {
234
234
  var _simulation7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(factory) {
235
- return _regenerator.default.wrap(function _callee7$(_context7) {
235
+ return _regenerator.default.wrap(function (_context7) {
236
236
  while (1) switch (_context7.prev = _context7.next) {
237
237
  case 0:
238
- _context7.next = 2;
238
+ _context7.next = 1;
239
239
  return (0, _nextTick.sleep)(speed);
240
- case 2:
240
+ case 1:
241
241
  factory.next('processed', {
242
242
  withRemotePreview: withRemotePreview
243
243
  });
244
- _context7.next = 5;
244
+ _context7.next = 2;
245
245
  return (0, _nextTick.sleep)(speed);
246
- case 5:
246
+ case 2:
247
247
  factory.next('processed', {
248
248
  withRemotePreview: withRemotePreview
249
249
  });
250
- _context7.next = 8;
250
+ _context7.next = 3;
251
251
  return (0, _nextTick.sleep)(speed);
252
- case 8:
252
+ case 3:
253
253
  factory.next('processed', {
254
254
  withRemotePreview: withRemotePreview
255
255
  });
256
- case 9:
256
+ case 4:
257
257
  case "end":
258
258
  return _context7.stop();
259
259
  }
@@ -272,19 +272,19 @@ var simulateEmptyDetails = exports.simulateEmptyDetails = function simulateEmpty
272
272
  simulation: function () {
273
273
  var _simulation8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(factory) {
274
274
  var emptyDetails;
275
- return _regenerator.default.wrap(function _callee8$(_context8) {
275
+ return _regenerator.default.wrap(function (_context8) {
276
276
  while (1) switch (_context8.prev = _context8.next) {
277
277
  case 0:
278
278
  emptyDetails = {
279
279
  createdAt: 1630986510989
280
280
  };
281
- _context8.next = 3;
281
+ _context8.next = 1;
282
282
  return (0, _nextTick.sleep)(speed);
283
- case 3:
283
+ case 1:
284
284
  factory.next('processing', {
285
285
  fileDetails: emptyDetails
286
286
  });
287
- case 4:
287
+ case 2:
288
288
  case "end":
289
289
  return _context8.stop();
290
290
  }
@@ -303,27 +303,27 @@ var simulateUpdateFileId = exports.simulateUpdateFileId = function simulateUpdat
303
303
  simulation: function () {
304
304
  var _simulation9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(factory, _ref) {
305
305
  var updateIdentifier;
306
- return _regenerator.default.wrap(function _callee9$(_context9) {
306
+ return _regenerator.default.wrap(function (_context9) {
307
307
  while (1) switch (_context9.prev = _context9.next) {
308
308
  case 0:
309
309
  updateIdentifier = _ref.updateIdentifier;
310
- _context9.next = 3;
310
+ _context9.next = 1;
311
311
  return (0, _nextTick.sleep)(speed);
312
- case 3:
312
+ case 1:
313
313
  factory.next('failed-processing');
314
- _context9.next = 6;
314
+ _context9.next = 2;
315
315
  return (0, _nextTick.sleep)(speed);
316
- case 6:
316
+ case 2:
317
317
  updateIdentifier('doc');
318
- _context9.next = 9;
318
+ _context9.next = 3;
319
319
  return (0, _nextTick.sleep)(speed);
320
- case 9:
320
+ case 3:
321
321
  factory.next('processing');
322
- _context9.next = 12;
322
+ _context9.next = 4;
323
323
  return (0, _nextTick.sleep)(speed);
324
- case 12:
324
+ case 4:
325
325
  factory.next('processed');
326
- case 13:
326
+ case 5:
327
327
  case "end":
328
328
  return _context9.stop();
329
329
  }
@@ -341,7 +341,7 @@ var simulateAlwaysLoading = exports.simulateAlwaysLoading = function simulateAlw
341
341
  description: 'File state never fetched',
342
342
  simulation: function () {
343
343
  var _simulation0 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee0() {
344
- return _regenerator.default.wrap(function _callee0$(_context0) {
344
+ return _regenerator.default.wrap(function (_context0) {
345
345
  while (1) switch (_context0.prev = _context0.next) {
346
346
  case 0:
347
347
  case "end":
@@ -361,20 +361,20 @@ var simulateAlwaysProcessing = exports.simulateAlwaysProcessing = function simul
361
361
  description: 'File state is permanently processing',
362
362
  simulation: function () {
363
363
  var _simulation1 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee1(factory) {
364
- return _regenerator.default.wrap(function _callee1$(_context1) {
364
+ return _regenerator.default.wrap(function (_context1) {
365
365
  while (1) switch (_context1.prev = _context1.next) {
366
366
  case 0:
367
- _context1.next = 2;
367
+ _context1.next = 1;
368
368
  return (0, _nextTick.sleep)(speed);
369
- case 2:
369
+ case 1:
370
370
  factory.next('processing');
371
- _context1.next = 5;
371
+ _context1.next = 2;
372
372
  return (0, _nextTick.sleep)(speed);
373
- case 5:
373
+ case 2:
374
374
  factory.next('processing');
375
- _context1.next = 8;
375
+ _context1.next = 3;
376
376
  return (0, _nextTick.sleep)(speed * 0.5);
377
- case 8:
377
+ case 3:
378
378
  case "end":
379
379
  return _context1.stop();
380
380
  }
@@ -20,7 +20,7 @@ var access = {
20
20
  var getAuthFromContextProvider = exports.getAuthFromContextProvider = /*#__PURE__*/function () {
21
21
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
22
22
  var url, body, headers, response;
23
- return _regenerator.default.wrap(function _callee$(_context) {
23
+ return _regenerator.default.wrap(function (_context) {
24
24
  while (1) switch (_context.prev = _context.next) {
25
25
  case 0:
26
26
  url = 'https://media-playground.dev.atl-paas.net/token/tenant?environment=asap';
@@ -30,16 +30,16 @@ var getAuthFromContextProvider = exports.getAuthFromContextProvider = /*#__PURE_
30
30
  headers = new Headers();
31
31
  headers.append('Content-Type', 'application/json; charset=utf-8');
32
32
  headers.append('Accept', 'text/plain, */*; q=0.01');
33
- _context.next = 7;
33
+ _context.next = 1;
34
34
  return fetch(url, {
35
35
  method: 'POST',
36
36
  body: body,
37
37
  headers: headers
38
38
  });
39
- case 7:
39
+ case 1:
40
40
  response = _context.sent;
41
41
  return _context.abrupt("return", response.json());
42
- case 9:
42
+ case 2:
43
43
  case "end":
44
44
  return _context.stop();
45
45
  }
@@ -20,7 +20,7 @@ var access = {
20
20
  var requestMediaAuthProvider = exports.requestMediaAuthProvider = /*#__PURE__*/function () {
21
21
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
22
22
  var url, body, headers, response;
23
- return _regenerator.default.wrap(function _callee$(_context2) {
23
+ return _regenerator.default.wrap(function (_context2) {
24
24
  while (1) switch (_context2.prev = _context2.next) {
25
25
  case 0:
26
26
  url = "".concat(_mediaBaseURLS.MEDIA_PLAYGROUND_BASE_URL, "/token/tenant?environment=asap");
@@ -30,16 +30,16 @@ var requestMediaAuthProvider = exports.requestMediaAuthProvider = /*#__PURE__*/f
30
30
  headers = new Headers();
31
31
  headers.append('Content-Type', 'application/json; charset=utf-8');
32
32
  headers.append('Accept', 'text/plain, */*; q=0.01');
33
- _context2.next = 7;
33
+ _context2.next = 1;
34
34
  return fetch(url, {
35
35
  method: 'POST',
36
36
  body: body,
37
37
  headers: headers
38
38
  });
39
- case 7:
39
+ case 1:
40
40
  response = _context2.sent;
41
41
  return _context2.abrupt("return", response.json());
42
- case 9:
42
+ case 2:
43
43
  case "end":
44
44
  return _context2.stop();
45
45
  }
@@ -37,7 +37,7 @@ var requestAuthProvider = /*#__PURE__*/function () {
37
37
  headers,
38
38
  response,
39
39
  _args = arguments;
40
- return _regenerator.default.wrap(function _callee$(_context) {
40
+ return _regenerator.default.wrap(function (_context) {
41
41
  while (1) switch (_context.prev = _context.next) {
42
42
  case 0:
43
43
  env = _args.length > 2 && _args[2] !== undefined ? _args[2] : 'staging';
@@ -50,16 +50,16 @@ var requestAuthProvider = /*#__PURE__*/function () {
50
50
  headers = new Headers();
51
51
  headers.append('Content-Type', 'application/json; charset=utf-8');
52
52
  headers.append('Accept', 'text/plain, */*; q=0.01');
53
- _context.next = 9;
53
+ _context.next = 1;
54
54
  return fetch(url, {
55
55
  method: 'POST',
56
56
  body: body,
57
57
  headers: headers
58
58
  });
59
- case 9:
59
+ case 1:
60
60
  response = _context.sent;
61
61
  return _context.abrupt("return", response.json());
62
- case 11:
62
+ case 2:
63
63
  case "end":
64
64
  return _context.stop();
65
65
  }
@@ -171,8 +171,8 @@ function createApiRouter(isSlowServer, urlsReturnErrorsTo) {
171
171
  });
172
172
  router.get('/file/:fileId/image/metadata', /*#__PURE__*/function () {
173
173
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref5, database) {
174
- var params, fileId, record, defaultDimensions, dimensions;
175
- return _regenerator.default.wrap(function _callee$(_context) {
174
+ var params, fileId, record, defaultDimensions, dimensions, _t, _t2, _t3;
175
+ return _regenerator.default.wrap(function (_context) {
176
176
  while (1) switch (_context.prev = _context.next) {
177
177
  case 0:
178
178
  params = _ref5.params;
@@ -197,20 +197,20 @@ function createApiRouter(isSlowServer, urlsReturnErrorsTo) {
197
197
  };
198
198
  });
199
199
  }
200
- _context.t0 = {};
201
- _context.next = 9;
200
+ _t = {};
201
+ _context.next = 1;
202
202
  return dimensions;
203
- case 9:
204
- _context.t1 = _context.sent;
205
- _context.t2 = {
203
+ case 1:
204
+ _t2 = _context.sent;
205
+ _t3 = {
206
206
  pending: false,
207
- preview: _context.t0,
208
- original: _context.t1
207
+ preview: _t,
208
+ original: _t2
209
209
  };
210
210
  return _context.abrupt("return", {
211
- metadata: _context.t2
211
+ metadata: _t3
212
212
  });
213
- case 12:
213
+ case 2:
214
214
  case "end":
215
215
  return _context.stop();
216
216
  }
@@ -16,7 +16,7 @@ function _waitUntil() {
16
16
  var timeout,
17
17
  maxRetries,
18
18
  _args = arguments;
19
- return _regenerator.default.wrap(function _callee$(_context) {
19
+ return _regenerator.default.wrap(function (_context) {
20
20
  while (1) switch (_context.prev = _context.next) {
21
21
  case 0:
22
22
  timeout = _args.length > 1 && _args[1] !== undefined ? _args[1] : 100;
@@ -35,7 +35,7 @@ function _waitUntil() {
35
35
  };
36
36
  _check(maxRetries);
37
37
  }));
38
- case 3:
38
+ case 1:
39
39
  case "end":
40
40
  return _context.stop();
41
41
  }
@@ -5,7 +5,6 @@ import { getMediaFeatureFlags, clearAllLocalFeatureFlags, setLocalFeatureFlag }
5
5
  import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
6
6
  import HipchatChevronDownIcon from '@atlaskit/icon/core/chevron-down';
7
7
  import Button from '@atlaskit/button/standard-button';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
10
9
  import { Stack, xcss } from '@atlaskit/primitives';
11
10
  import Tooltip from '@atlaskit/tooltip';
@@ -118,7 +117,7 @@ const MediaFeatureFlagsDropdown = ({
118
117
  size: "small"
119
118
  })
120
119
  }), "Media Feature Flags"),
121
- shouldRenderToParent: fg('should-render-to-parent-should-be-true-media-exif')
120
+ shouldRenderToParent: true
122
121
  }), /*#__PURE__*/React.createElement(Tooltip, {
123
122
  content: "Reset all flags"
124
123
  }, /*#__PURE__*/React.createElement(Button
@@ -16,7 +16,7 @@ export var StoryBookAuthProvider = /*#__PURE__*/function () {
16
16
  var loadTenatAuth = /*#__PURE__*/function () {
17
17
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(collectionName) {
18
18
  var environment, headers, config, url, response;
19
- return _regeneratorRuntime.wrap(function _callee$(_context) {
19
+ return _regeneratorRuntime.wrap(function (_context) {
20
20
  while (1) switch (_context.prev = _context.next) {
21
21
  case 0:
22
22
  environment = isAsapEnvironment ? 'asap' : '';
@@ -33,14 +33,14 @@ export var StoryBookAuthProvider = /*#__PURE__*/function () {
33
33
  };
34
34
  url = "".concat(MEDIA_PLAYGROUND_BASE_URL, "/token/tenant?collection=").concat(collectionName, "&environment=").concat(environment);
35
35
  response = fetch(url, config); // We leverage the fact, that our internal /toke/tenant API returns data in the same format as Auth
36
- _context.next = 9;
36
+ _context.next = 1;
37
37
  return response;
38
- case 9:
39
- _context.next = 11;
38
+ case 1:
39
+ _context.next = 2;
40
40
  return _context.sent.json();
41
- case 11:
41
+ case 2:
42
42
  return _context.abrupt("return", _context.sent);
43
- case 12:
43
+ case 3:
44
44
  case "end":
45
45
  return _context.stop();
46
46
  }
@@ -5,28 +5,29 @@ export function awaitError(_x, _x2) {
5
5
  }
6
6
  function _awaitError() {
7
7
  _awaitError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response, expectedMessage) {
8
- return _regeneratorRuntime.wrap(function _callee$(_context) {
8
+ var _t;
9
+ return _regeneratorRuntime.wrap(function (_context) {
9
10
  while (1) switch (_context.prev = _context.next) {
10
11
  case 0:
11
12
  _context.prev = 0;
12
- _context.next = 3;
13
+ _context.next = 1;
13
14
  return response;
14
- case 3:
15
- _context.next = 9;
15
+ case 1:
16
+ _context.next = 3;
16
17
  break;
17
- case 5:
18
- _context.prev = 5;
19
- _context.t0 = _context["catch"](0);
20
- if (!(_context.t0 instanceof Error && _context.t0.message !== expectedMessage)) {
21
- _context.next = 9;
18
+ case 2:
19
+ _context.prev = 2;
20
+ _t = _context["catch"](0);
21
+ if (!(_t instanceof Error && _t.message !== expectedMessage)) {
22
+ _context.next = 3;
22
23
  break;
23
24
  }
24
- throw _context.t0;
25
- case 9:
25
+ throw _t;
26
+ case 3:
26
27
  case "end":
27
28
  return _context.stop();
28
29
  }
29
- }, _callee, null, [[0, 5]]);
30
+ }, _callee, null, [[0, 2]]);
30
31
  }));
31
32
  return _awaitError.apply(this, arguments);
32
33
  }
@@ -7,7 +7,6 @@ import { getMediaFeatureFlags, clearAllLocalFeatureFlags, setLocalFeatureFlag }
7
7
  import SelectClearIcon from '@atlaskit/icon/core/cross-circle';
8
8
  import HipchatChevronDownIcon from '@atlaskit/icon/core/chevron-down';
9
9
  import Button from '@atlaskit/button/standard-button';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
12
11
  import { Stack, xcss } from '@atlaskit/primitives';
13
12
  import Tooltip from '@atlaskit/tooltip';
@@ -134,7 +133,7 @@ var MediaFeatureFlagsDropdown = function MediaFeatureFlagsDropdown(_ref6) {
134
133
  })
135
134
  }), "Media Feature Flags");
136
135
  },
137
- shouldRenderToParent: fg('should-render-to-parent-should-be-true-media-exif')
136
+ shouldRenderToParent: true
138
137
  }), /*#__PURE__*/React.createElement(Tooltip, {
139
138
  content: "Reset all flags"
140
139
  }, /*#__PURE__*/React.createElement(Button
@@ -32,21 +32,21 @@ export var MediaClientMock = /*#__PURE__*/function (_MediaClient) {
32
32
  });
33
33
  _defineProperty(_this, "getImage", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
34
34
  var _this$options$getImag, getImageDelay;
35
- return _regeneratorRuntime.wrap(function _callee$(_context) {
35
+ return _regeneratorRuntime.wrap(function (_context) {
36
36
  while (1) switch (_context.prev = _context.next) {
37
37
  case 0:
38
38
  _this$options$getImag = _this.options.getImageDelay, getImageDelay = _this$options$getImag === void 0 ? 0 : _this$options$getImag;
39
39
  if (_this.hasPreview) {
40
- _context.next = 3;
40
+ _context.next = 1;
41
41
  break;
42
42
  }
43
43
  throw new Error('some error');
44
- case 3:
45
- _context.next = 5;
44
+ case 1:
45
+ _context.next = 2;
46
46
  return sleep(getImageDelay);
47
- case 5:
47
+ case 2:
48
48
  return _context.abrupt("return", dataURItoBlob(tallImage));
49
- case 6:
49
+ case 3:
50
50
  case "end":
51
51
  return _context.stop();
52
52
  }
@@ -69,7 +69,7 @@ export var MediaClientMock = /*#__PURE__*/function (_MediaClient) {
69
69
  var mockConfig = {
70
70
  authProvider: function () {
71
71
  var _authProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
72
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
72
+ return _regeneratorRuntime.wrap(function (_context2) {
73
73
  while (1) switch (_context2.prev = _context2.next) {
74
74
  case 0:
75
75
  return _context2.abrupt("return", {