@atlaskit/media-test-helpers 33.0.14 → 33.0.16
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 +64 -52
- package/dist/cjs/I18nWrapper.js +2 -3
- package/dist/cjs/authProvider.js +2 -3
- package/dist/cjs/clipboardEventMocks.js +12 -13
- package/dist/cjs/collectionNames.js +5 -10
- package/dist/cjs/createMouseEvent.js +2 -3
- package/dist/cjs/createTouchEvent.js +2 -3
- package/dist/cjs/dataURIs/smallImageURI.js +1 -2
- package/dist/cjs/dataURIs/smallTransparentImageURI.js +1 -2
- package/dist/cjs/dataURIs/tallImageURI.js +1 -2
- package/dist/cjs/dataURIs/videoPreviewURI.js +1 -2
- package/dist/cjs/dataURIs/videoURI.js +1 -2
- package/dist/cjs/dataURIs/vr_test_small_image.js +1 -2
- package/dist/cjs/dataURIs/wideImageURI.js +1 -2
- package/dist/cjs/dataURIs/wideTransparentImageURI.js +1 -2
- package/dist/cjs/docs-content-tabs.js +2 -3
- package/dist/cjs/example-mediaFeatureFlags.js +1 -2
- package/dist/cjs/exampleMediaItems.js +48 -91
- package/dist/cjs/fakeI18n.js +2 -3
- package/dist/cjs/fakeMediaClient.js +3 -5
- package/dist/cjs/featureFlagsWrapper/dropdown.js +1 -2
- package/dist/cjs/featureFlagsWrapper/helpers.js +5 -9
- package/dist/cjs/featureFlagsWrapper/index.js +1 -2
- package/dist/cjs/fileReader.js +5 -9
- package/dist/cjs/fileStateFactory/factory/createFileState.js +2 -3
- package/dist/cjs/fileStateFactory/factory/factory.js +3 -5
- package/dist/cjs/fileStateFactory/factory/helpers.js +4 -7
- package/dist/cjs/fileStateFactory/fileSimulation/fileSimulation.js +1 -2
- package/dist/cjs/fileStateFactory/fileSimulation/simulations.js +13 -23
- package/dist/cjs/flushPromises.js +2 -3
- package/dist/cjs/getAuthFromContextProvider.js +2 -3
- package/dist/cjs/getJest.js +2 -3
- package/dist/cjs/globalEventEmitterListeners.js +2 -3
- package/dist/cjs/images.js +1 -2
- package/dist/cjs/index.js +1 -2
- package/dist/cjs/jestHelpers.js +9 -17
- package/dist/cjs/keyboardEventWithKeyCode.js +1 -2
- package/dist/cjs/mediaClientErrors.js +4 -7
- package/dist/cjs/mediaClientProvider.js +7 -13
- package/dist/cjs/mediaPickerAuthProvider.js +3 -5
- package/dist/cjs/mockData/handlers/copyWithToken.js +2 -3
- package/dist/cjs/mockData/handlers/getFile.js +2 -3
- package/dist/cjs/mockData/handlers/getFileImage.js +2 -3
- package/dist/cjs/mockData/handlers/tenantAuth.js +2 -3
- package/dist/cjs/mockData/handlers/userCollectionFetch.js +2 -3
- package/dist/cjs/mockData/index.js +2 -3
- package/dist/cjs/mockData/matchers.js +6 -11
- package/dist/cjs/mockData/staticCommon.js +4 -7
- package/dist/cjs/mockData/utils.js +3 -5
- package/dist/cjs/mockLoadImage.js +5 -9
- package/dist/cjs/mocks/database/collection-item.js +1 -2
- package/dist/cjs/mocks/database/index.js +4 -8
- package/dist/cjs/mocks/fileAndDirectoriesUtils.js +4 -7
- package/dist/cjs/mocks/media-mock.js +5 -9
- package/dist/cjs/mocks/routers/api-router.js +2 -2
- package/dist/cjs/mocks/websockets/messages.js +5 -9
- package/dist/cjs/mocks/websockets/remote-upload-server.js +2 -3
- package/dist/cjs/mountWithIntlContext.js +4 -7
- package/dist/cjs/nextTick.js +3 -5
- package/dist/cjs/renderWithIntl.js +2 -3
- package/dist/cjs/smart-card-state.js +3 -5
- package/dist/cjs/story-list.js +2 -3
- package/dist/cjs/story-styles.js +1 -2
- package/dist/cjs/styled.js +1 -2
- package/dist/cjs/ufoLogger.js +2 -3
- package/dist/cjs/utils/logging.js +1 -2
- package/dist/cjs/utils/mockData.js +12 -23
- package/dist/cjs/waitUntil.js +1 -2
- package/dist/es2019/clipboardEventMocks.js +7 -2
- package/dist/es2019/mocks/routers/api-router.js +1 -1
- package/dist/esm/clipboardEventMocks.js +6 -2
- package/dist/esm/mocks/routers/api-router.js +1 -1
- package/dist/types/clipboardEventMocks.d.ts +2 -1
- package/dist/types-ts4.5/clipboardEventMocks.d.ts +2 -1
- package/package.json +6 -5
- package/report.api.md +3 -1
- package/tmp/api-report-tmp.d.ts +3 -1
|
@@ -22,7 +22,7 @@ var CustomTabPanel = function CustomTabPanel(_ref) {
|
|
|
22
22
|
css: panelStyle
|
|
23
23
|
}, context), children);
|
|
24
24
|
};
|
|
25
|
-
var DocsContentTabs = function DocsContentTabs(_ref2) {
|
|
25
|
+
var DocsContentTabs = exports.DocsContentTabs = function DocsContentTabs(_ref2) {
|
|
26
26
|
var _ref2$tabs = _ref2.tabs,
|
|
27
27
|
tabs = _ref2$tabs === void 0 ? [] : _ref2$tabs;
|
|
28
28
|
return (0, _react.jsx)(_tabs.default, {
|
|
@@ -38,5 +38,4 @@ var DocsContentTabs = function DocsContentTabs(_ref2) {
|
|
|
38
38
|
key: idx
|
|
39
39
|
}, content);
|
|
40
40
|
}));
|
|
41
|
-
};
|
|
42
|
-
exports.DocsContentTabs = DocsContentTabs;
|
|
41
|
+
};
|
|
@@ -9,5 +9,4 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
|
-
var exampleMediaFeatureFlags = _objectSpread({}, _mediaCommon.defaultMediaFeatureFlags);
|
|
13
|
-
exports.exampleMediaFeatureFlags = exampleMediaFeatureFlags;
|
|
12
|
+
var exampleMediaFeatureFlags = exports.exampleMediaFeatureFlags = _objectSpread({}, _mediaCommon.defaultMediaFeatureFlags);
|
|
@@ -11,229 +11,193 @@ var fileType = 'file';
|
|
|
11
11
|
|
|
12
12
|
// === FILE ===
|
|
13
13
|
|
|
14
|
-
var genericFileId = {
|
|
14
|
+
var genericFileId = exports.genericFileId = {
|
|
15
15
|
id: '2dfcc12d-04d7-46e7-9fdf-3715ff00ba40',
|
|
16
16
|
mediaItemType: fileType,
|
|
17
17
|
collectionName: _collectionNames.defaultCollectionName
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
20
|
-
var audioFileId = {
|
|
19
|
+
var audioFileId = exports.audioFileId = {
|
|
21
20
|
id: 'a965c8df-1d64-4db8-9de5-16dfa8fd2e12',
|
|
22
21
|
// mp3 audio
|
|
23
22
|
mediaItemType: fileType,
|
|
24
23
|
collectionName: _collectionNames.defaultCollectionName
|
|
25
24
|
};
|
|
26
|
-
exports.
|
|
27
|
-
var audioNoCoverFileId = {
|
|
25
|
+
var audioNoCoverFileId = exports.audioNoCoverFileId = {
|
|
28
26
|
id: '7a5698bb-919c-4200-8699-6041e7913b11',
|
|
29
27
|
// mp3 audio
|
|
30
28
|
mediaItemType: fileType,
|
|
31
29
|
collectionName: _collectionNames.defaultCollectionName
|
|
32
30
|
};
|
|
33
|
-
exports.
|
|
34
|
-
var videoFileId = {
|
|
31
|
+
var videoFileId = exports.videoFileId = {
|
|
35
32
|
id: '1b01a476-83b4-4f44-8192-f83b2d00913a',
|
|
36
33
|
// mp4 video
|
|
37
34
|
mediaItemType: fileType,
|
|
38
35
|
collectionName: _collectionNames.defaultCollectionName
|
|
39
36
|
};
|
|
40
|
-
exports.
|
|
41
|
-
var videoHorizontalFileId = {
|
|
37
|
+
var videoHorizontalFileId = exports.videoHorizontalFileId = {
|
|
42
38
|
id: '2afaf845-4385-431f-9a15-3e21520cf896',
|
|
43
39
|
// .mov video
|
|
44
40
|
mediaItemType: fileType,
|
|
45
41
|
collectionName: _collectionNames.defaultCollectionName
|
|
46
42
|
};
|
|
47
|
-
exports.
|
|
48
|
-
var videoLargeFileId = {
|
|
43
|
+
var videoLargeFileId = exports.videoLargeFileId = {
|
|
49
44
|
id: '3291050e-6b66-4296-94c6-12088ef6fbad',
|
|
50
45
|
mediaItemType: fileType,
|
|
51
46
|
collectionName: _collectionNames.defaultCollectionName
|
|
52
47
|
};
|
|
53
|
-
exports.
|
|
54
|
-
var videoSquareFileId = {
|
|
48
|
+
var videoSquareFileId = exports.videoSquareFileId = {
|
|
55
49
|
id: 'cdff20d6-2c0a-4d0d-b2a9-22cc728a0368',
|
|
56
50
|
mediaItemType: fileType,
|
|
57
51
|
collectionName: _collectionNames.defaultCollectionName
|
|
58
52
|
};
|
|
59
|
-
exports.
|
|
60
|
-
var videoProcessingFailedId = {
|
|
53
|
+
var videoProcessingFailedId = exports.videoProcessingFailedId = {
|
|
61
54
|
id: 'e558199f-f982-4d23-93eb-313be5998d1b',
|
|
62
55
|
mediaItemType: fileType,
|
|
63
56
|
collectionName: _collectionNames.defaultCollectionName
|
|
64
57
|
};
|
|
65
|
-
exports.
|
|
66
|
-
var imageFileId = {
|
|
58
|
+
var imageFileId = exports.imageFileId = {
|
|
67
59
|
id: '5556346b-b081-482b-bc4a-4faca8ecd2de',
|
|
68
60
|
// jpg image
|
|
69
61
|
mediaItemType: fileType,
|
|
70
62
|
collectionName: _collectionNames.defaultCollectionName
|
|
71
63
|
};
|
|
72
|
-
exports.
|
|
73
|
-
var emptyImageFileId = {
|
|
64
|
+
var emptyImageFileId = exports.emptyImageFileId = {
|
|
74
65
|
id: 'aa7f7a63-2b1a-4405-b585-62e375a3b40a',
|
|
75
66
|
// jpg image
|
|
76
67
|
mediaItemType: fileType,
|
|
77
68
|
collectionName: _collectionNames.defaultCollectionName
|
|
78
69
|
};
|
|
79
|
-
exports.
|
|
80
|
-
var smallImageFileId = {
|
|
70
|
+
var smallImageFileId = exports.smallImageFileId = {
|
|
81
71
|
id: 'f251bd05-4b2d-485d-a088-57d112ca7945',
|
|
82
72
|
mediaItemType: fileType,
|
|
83
73
|
collectionName: _collectionNames.defaultCollectionName
|
|
84
74
|
};
|
|
85
|
-
exports.
|
|
86
|
-
var wideImageFileId = {
|
|
75
|
+
var wideImageFileId = exports.wideImageFileId = {
|
|
87
76
|
id: '3b6621a2-5b72-400e-ad95-447610dbb770',
|
|
88
77
|
mediaItemType: fileType,
|
|
89
78
|
collectionName: _collectionNames.defaultCollectionName
|
|
90
79
|
};
|
|
91
|
-
exports.
|
|
92
|
-
var largeImageFileId = {
|
|
80
|
+
var largeImageFileId = exports.largeImageFileId = {
|
|
93
81
|
id: '0607a6a8-b2ec-49a7-b6d3-d767cb49e844',
|
|
94
82
|
mediaItemType: fileType,
|
|
95
83
|
collectionName: _collectionNames.defaultCollectionName
|
|
96
84
|
};
|
|
97
|
-
exports.
|
|
98
|
-
var verticalImageFileId = {
|
|
85
|
+
var verticalImageFileId = exports.verticalImageFileId = {
|
|
99
86
|
id: 'f9235f5a-d582-4740-8611-ebf3feaf28b6',
|
|
100
87
|
mediaItemType: fileType,
|
|
101
88
|
collectionName: _collectionNames.defaultCollectionName
|
|
102
89
|
};
|
|
103
|
-
exports.
|
|
104
|
-
var docFileId = {
|
|
90
|
+
var docFileId = exports.docFileId = {
|
|
105
91
|
id: '71cd7e7d-4e86-4b89-a0b4-7f6ffe013c94',
|
|
106
92
|
mediaItemType: fileType,
|
|
107
93
|
collectionName: _collectionNames.defaultCollectionName
|
|
108
94
|
};
|
|
109
|
-
exports.
|
|
110
|
-
var bigDocFileId = {
|
|
95
|
+
var bigDocFileId = exports.bigDocFileId = {
|
|
111
96
|
id: 'd22f7a80-a661-4518-8b0e-eba02b6dfaca',
|
|
112
97
|
mediaItemType: fileType,
|
|
113
98
|
collectionName: _collectionNames.defaultCollectionName
|
|
114
99
|
};
|
|
115
|
-
exports.
|
|
116
|
-
var largePdfFileId = {
|
|
100
|
+
var largePdfFileId = exports.largePdfFileId = {
|
|
117
101
|
id: '0a510b7f-4168-44d8-b4d7-f5639ecefa2c',
|
|
118
102
|
mediaItemType: fileType,
|
|
119
103
|
collectionName: _collectionNames.defaultCollectionName
|
|
120
104
|
};
|
|
121
|
-
exports.
|
|
122
|
-
var passwordProtectedPdfFileId = {
|
|
105
|
+
var passwordProtectedPdfFileId = exports.passwordProtectedPdfFileId = {
|
|
123
106
|
id: 'c0e5bfa5-013d-4cbc-9b87-17d7f63bcc30',
|
|
124
107
|
mediaItemType: fileType,
|
|
125
108
|
collectionName: _collectionNames.defaultCollectionName
|
|
126
109
|
};
|
|
127
|
-
exports.
|
|
128
|
-
var codeFileId = {
|
|
110
|
+
var codeFileId = exports.codeFileId = {
|
|
129
111
|
id: '4bc95dd5-a7a2-4cbd-ac46-f9b9f0e0941a',
|
|
130
112
|
mediaItemType: fileType,
|
|
131
113
|
collectionName: _collectionNames.defaultCollectionName
|
|
132
114
|
};
|
|
133
|
-
exports.
|
|
134
|
-
var emailFileId = {
|
|
115
|
+
var emailFileId = exports.emailFileId = {
|
|
135
116
|
id: '79bb7327-fa6c-4e6f-8a7a-4ebd3607f481',
|
|
136
117
|
mediaItemType: fileType,
|
|
137
118
|
collectionName: _collectionNames.defaultCollectionName
|
|
138
119
|
};
|
|
139
|
-
exports.
|
|
140
|
-
var emailUnsupportedFileId = {
|
|
120
|
+
var emailUnsupportedFileId = exports.emailUnsupportedFileId = {
|
|
141
121
|
id: '3a2ae022-212a-4dca-a7d3-86eb016a0ed2',
|
|
142
122
|
mediaItemType: fileType,
|
|
143
123
|
collectionName: _collectionNames.defaultCollectionName
|
|
144
124
|
};
|
|
145
|
-
exports.
|
|
146
|
-
var archiveFileId = {
|
|
125
|
+
var archiveFileId = exports.archiveFileId = {
|
|
147
126
|
id: '1abbae6b-f507-4b4f-b181-21016bf3b7cc',
|
|
148
127
|
mediaItemType: fileType,
|
|
149
128
|
collectionName: _collectionNames.defaultCollectionName
|
|
150
129
|
};
|
|
151
|
-
exports.
|
|
152
|
-
var zipJiraArchiveFileId = {
|
|
130
|
+
var zipJiraArchiveFileId = exports.zipJiraArchiveFileId = {
|
|
153
131
|
id: 'aa99969c-6f0e-4cdc-8a57-9d38c43b2af8',
|
|
154
132
|
mediaItemType: fileType,
|
|
155
133
|
collectionName: _collectionNames.defaultCollectionName
|
|
156
134
|
};
|
|
157
|
-
exports.
|
|
158
|
-
var zipFileWithNestedFolderId = {
|
|
135
|
+
var zipFileWithNestedFolderId = exports.zipFileWithNestedFolderId = {
|
|
159
136
|
id: 'd1730520-316c-482a-a8c8-2b34acbea00b',
|
|
160
137
|
mediaItemType: fileType,
|
|
161
138
|
collectionName: _collectionNames.defaultCollectionName
|
|
162
139
|
};
|
|
163
|
-
exports.
|
|
164
|
-
var zipFileId = {
|
|
140
|
+
var zipFileId = exports.zipFileId = {
|
|
165
141
|
id: '3822aff2-9297-4ad9-93fd-ab1709f400ad',
|
|
166
142
|
mediaItemType: fileType,
|
|
167
143
|
collectionName: _collectionNames.defaultCollectionName
|
|
168
144
|
};
|
|
169
|
-
exports.
|
|
170
|
-
var zipItemMultipleFoldersAtRootId = {
|
|
145
|
+
var zipItemMultipleFoldersAtRootId = exports.zipItemMultipleFoldersAtRootId = {
|
|
171
146
|
id: 'b2c4623b-bd84-4d90-a2ed-61d50b0bd5f4',
|
|
172
147
|
mediaItemType: fileType,
|
|
173
148
|
collectionName: _collectionNames.defaultCollectionName
|
|
174
149
|
};
|
|
175
|
-
exports.
|
|
176
|
-
var zipItemLargeInnerFileId = {
|
|
150
|
+
var zipItemLargeInnerFileId = exports.zipItemLargeInnerFileId = {
|
|
177
151
|
id: '36b7957c-2d73-4cd5-8541-103daa2619ce',
|
|
178
152
|
mediaItemType: fileType,
|
|
179
153
|
collectionName: _collectionNames.defaultCollectionName
|
|
180
154
|
};
|
|
181
|
-
exports.
|
|
182
|
-
var zipEncryptedFileId = {
|
|
155
|
+
var zipEncryptedFileId = exports.zipEncryptedFileId = {
|
|
183
156
|
id: 'd1569d0f-936d-46f3-b974-a285696016c0',
|
|
184
157
|
mediaItemType: fileType,
|
|
185
158
|
collectionName: _collectionNames.defaultCollectionName
|
|
186
159
|
};
|
|
187
|
-
exports.
|
|
188
|
-
var unknownFileId = {
|
|
160
|
+
var unknownFileId = exports.unknownFileId = {
|
|
189
161
|
id: 'e0652e68-c596-4800-8a91-1920e6b8a585',
|
|
190
162
|
mediaItemType: fileType,
|
|
191
163
|
collectionName: _collectionNames.defaultCollectionName
|
|
192
164
|
};
|
|
193
|
-
exports.
|
|
194
|
-
var errorFileId = {
|
|
165
|
+
var errorFileId = exports.errorFileId = {
|
|
195
166
|
id: 'error-file-id',
|
|
196
167
|
mediaItemType: fileType,
|
|
197
168
|
collectionName: _collectionNames.defaultCollectionName
|
|
198
169
|
};
|
|
199
|
-
exports.
|
|
200
|
-
var gifFileId = {
|
|
170
|
+
var gifFileId = exports.gifFileId = {
|
|
201
171
|
id: '26adc5af-3af4-42a8-9c24-62b6ce0f9369',
|
|
202
172
|
mediaItemType: fileType,
|
|
203
173
|
collectionName: _collectionNames.defaultCollectionName
|
|
204
174
|
};
|
|
205
|
-
exports.
|
|
206
|
-
var noMetadataFileId = {
|
|
175
|
+
var noMetadataFileId = exports.noMetadataFileId = {
|
|
207
176
|
id: '1adaf6f9-37f6-4171-ab6b-455ec3115381',
|
|
208
177
|
mediaItemType: fileType,
|
|
209
178
|
collectionName: _collectionNames.defaultCollectionName
|
|
210
179
|
};
|
|
211
|
-
exports.
|
|
212
|
-
var animatedFileId = {
|
|
180
|
+
var animatedFileId = exports.animatedFileId = {
|
|
213
181
|
id: 'af637c7a-75c3-4254-b074-d16e6ae2e04b',
|
|
214
182
|
mediaItemType: fileType,
|
|
215
183
|
collectionName: _collectionNames.onlyAnimatedGifsCollectionName
|
|
216
184
|
};
|
|
217
185
|
// === EXTERNAL IMAGE ===
|
|
218
|
-
|
|
219
|
-
var atlassianLogoUrl = 'https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/apple-touch-icon-152x152.png';
|
|
220
|
-
exports.
|
|
221
|
-
var externalImageIdentifier = {
|
|
186
|
+
|
|
187
|
+
var atlassianLogoUrl = exports.atlassianLogoUrl = 'https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/apple-touch-icon-152x152.png';
|
|
188
|
+
var externalImageIdentifier = exports.externalImageIdentifier = {
|
|
222
189
|
mediaItemType: 'external-image',
|
|
223
190
|
dataURI: atlassianLogoUrl
|
|
224
191
|
};
|
|
225
|
-
exports.
|
|
226
|
-
var externalSmallImageIdentifier = {
|
|
192
|
+
var externalSmallImageIdentifier = exports.externalSmallImageIdentifier = {
|
|
227
193
|
mediaItemType: 'external-image',
|
|
228
194
|
dataURI: 'https://aui-cdn.atlassian.com/media/files-icon.png'
|
|
229
195
|
};
|
|
230
|
-
exports.
|
|
231
|
-
var externaBrokenlIdentifier = {
|
|
196
|
+
var externaBrokenlIdentifier = exports.externaBrokenlIdentifier = {
|
|
232
197
|
mediaItemType: 'external-image',
|
|
233
198
|
dataURI: 'https://some-uri'
|
|
234
199
|
};
|
|
235
|
-
exports.
|
|
236
|
-
var genericFileDetails = {
|
|
200
|
+
var genericFileDetails = exports.genericFileDetails = {
|
|
237
201
|
id: 'fd4c4672-323a-4b6c-8326-223169e2a13e',
|
|
238
202
|
mediaType: 'image',
|
|
239
203
|
mimeType: 'image/gif',
|
|
@@ -267,52 +231,45 @@ var genericFileDetails = {
|
|
|
267
231
|
}
|
|
268
232
|
}
|
|
269
233
|
};
|
|
270
|
-
exports.
|
|
271
|
-
var imageFileDetails = {
|
|
234
|
+
var imageFileDetails = exports.imageFileDetails = {
|
|
272
235
|
id: 'some-id',
|
|
273
236
|
mediaType: 'image',
|
|
274
237
|
name: 'image_file.jpg',
|
|
275
238
|
size: 2958464
|
|
276
239
|
};
|
|
277
|
-
exports.
|
|
278
|
-
var videoFileDetails = {
|
|
240
|
+
var videoFileDetails = exports.videoFileDetails = {
|
|
279
241
|
id: 'some-id',
|
|
280
242
|
mediaType: 'video',
|
|
281
243
|
name: 'video_file.mp4',
|
|
282
244
|
size: 29584640
|
|
283
245
|
};
|
|
284
|
-
exports.
|
|
285
|
-
var audioFileDetails = {
|
|
246
|
+
var audioFileDetails = exports.audioFileDetails = {
|
|
286
247
|
id: 'some-id',
|
|
287
248
|
mediaType: 'audio',
|
|
288
249
|
name: 'audio_file.mp3',
|
|
289
250
|
size: 2958464
|
|
290
251
|
};
|
|
291
|
-
exports.
|
|
292
|
-
var docFileDetails = {
|
|
252
|
+
var docFileDetails = exports.docFileDetails = {
|
|
293
253
|
id: 'some-id',
|
|
294
254
|
mediaType: 'doc',
|
|
295
255
|
name: 'doc_file.pdf',
|
|
296
256
|
size: 2958464
|
|
297
257
|
};
|
|
298
|
-
exports.
|
|
299
|
-
var unknownFileDetails = {
|
|
258
|
+
var unknownFileDetails = exports.unknownFileDetails = {
|
|
300
259
|
id: 'some-id',
|
|
301
260
|
mediaType: 'unknown',
|
|
302
261
|
name: 'doc_file.pdf',
|
|
303
262
|
size: 2958464
|
|
304
263
|
};
|
|
305
|
-
exports.
|
|
306
|
-
var genericDataURI = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAZABkAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABkAAAAAQAAAGQAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAAKgAwAEAAAAAQAAAAIAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAAIAAgMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQICAQECAQEBAgICAgICAgICAQICAgICAgICAgL/2wBDAQEBAQEBAQEBAQECAQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/3QAEAAH/2gAMAwEAAhEDEQA/AP0U8M2NmPDfh8C0tgBomkgAW8OAPsFvwK/lh7s+5u+/4n//2Q==';
|
|
264
|
+
var genericDataURI = exports.genericDataURI = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAZABkAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABkAAAAAQAAAGQAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAAKgAwAEAAAAAQAAAAIAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAAIAAgMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQICAQECAQEBAgICAgICAgICAQICAgICAgICAgL/2wBDAQEBAQEBAQEBAQECAQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/3QAEAAH/2gAMAwEAAhEDEQA/AP0U8M2NmPDfh8C0tgBomkgAW8OAPsFvwK/lh7s+5u+/4n//2Q==';
|
|
307
265
|
|
|
308
266
|
// === VR test ids ===
|
|
309
|
-
|
|
310
|
-
var vrVideoDetails = {
|
|
267
|
+
|
|
268
|
+
var vrVideoDetails = exports.vrVideoDetails = {
|
|
311
269
|
id: '0c3c64b9-65ad-4592-89d0-f838beebd81e',
|
|
312
270
|
name: 'video.mp4',
|
|
313
271
|
dataUri: _videoURI.videoURI,
|
|
314
272
|
previewDataUri: _videoPreviewURI.videoPreviewURI,
|
|
315
273
|
mediaType: 'video',
|
|
316
274
|
mimeType: 'video/mp4'
|
|
317
|
-
};
|
|
318
|
-
exports.vrVideoDetails = vrVideoDetails;
|
|
275
|
+
};
|
package/dist/cjs/fakeI18n.js
CHANGED
|
@@ -9,10 +9,9 @@ var _getJest = _interopRequireDefault(require("./getJest"));
|
|
|
9
9
|
var jest = (0, _getJest.default)();
|
|
10
10
|
|
|
11
11
|
// fakeIntl["..."] here to indicate those went through formatMessage and not just left as string itself
|
|
12
|
-
var fakeIntl = {
|
|
12
|
+
var fakeIntl = exports.fakeIntl = {
|
|
13
13
|
formatMessage: jest.fn(function (_ref) {
|
|
14
14
|
var defaultMessage = _ref.defaultMessage;
|
|
15
15
|
return "fakeIntl[\"".concat(defaultMessage, "\"]");
|
|
16
16
|
})
|
|
17
|
-
};
|
|
18
|
-
exports.fakeIntl = fakeIntl;
|
|
17
|
+
};
|
|
@@ -9,7 +9,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
9
9
|
var _jestHelpers = require("./jestHelpers");
|
|
10
10
|
var _getJest = _interopRequireDefault(require("./getJest"));
|
|
11
11
|
var jest = (0, _getJest.default)();
|
|
12
|
-
var getDefaultMediaClientConfig = function getDefaultMediaClientConfig() {
|
|
12
|
+
var getDefaultMediaClientConfig = exports.getDefaultMediaClientConfig = function getDefaultMediaClientConfig() {
|
|
13
13
|
return {
|
|
14
14
|
authProvider: jest.fn().mockReturnValue(Promise.resolve({
|
|
15
15
|
clientId: 'some-client-id',
|
|
@@ -18,8 +18,7 @@ var getDefaultMediaClientConfig = function getDefaultMediaClientConfig() {
|
|
|
18
18
|
}))
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
exports.
|
|
22
|
-
var fakeMediaClient = function fakeMediaClient() {
|
|
21
|
+
var fakeMediaClient = exports.fakeMediaClient = function fakeMediaClient() {
|
|
23
22
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultMediaClientConfig();
|
|
24
23
|
if (jest && jest.genMockFromModule) {
|
|
25
24
|
var _jest$genMockFromModu = jest.genMockFromModule('@atlaskit/media-client'),
|
|
@@ -75,5 +74,4 @@ var fakeMediaClient = function fakeMediaClient() {
|
|
|
75
74
|
} else {
|
|
76
75
|
return new _mediaClient.MediaClient(config);
|
|
77
76
|
}
|
|
78
|
-
};
|
|
79
|
-
exports.fakeMediaClient = fakeMediaClient;
|
|
77
|
+
};
|
|
@@ -10,25 +10,21 @@ var _mediaCommon = require("@atlaskit/media-common");
|
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
12
|
var mediaFeatureFlagsKeys = Object.keys(_mediaCommon.defaultMediaFeatureFlags);
|
|
13
|
-
var setLocalFeatureFlag = function setLocalFeatureFlag(key, value) {
|
|
13
|
+
var setLocalFeatureFlag = exports.setLocalFeatureFlag = function setLocalFeatureFlag(key, value) {
|
|
14
14
|
try {
|
|
15
15
|
window.localStorage.setItem(key, JSON.stringify(value));
|
|
16
16
|
} catch (e) {}
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
19
|
-
var clearLocalFeatureFlag = function clearLocalFeatureFlag(key) {
|
|
18
|
+
var clearLocalFeatureFlag = exports.clearLocalFeatureFlag = function clearLocalFeatureFlag(key) {
|
|
20
19
|
try {
|
|
21
20
|
delete window.localStorage[key];
|
|
22
21
|
} catch (e) {}
|
|
23
22
|
};
|
|
24
|
-
exports.
|
|
25
|
-
var clearAllLocalFeatureFlags = function clearAllLocalFeatureFlags() {
|
|
23
|
+
var clearAllLocalFeatureFlags = exports.clearAllLocalFeatureFlags = function clearAllLocalFeatureFlags() {
|
|
26
24
|
mediaFeatureFlagsKeys.forEach(clearLocalFeatureFlag);
|
|
27
25
|
};
|
|
28
|
-
exports.
|
|
29
|
-
var getMediaFeatureFlags = function getMediaFeatureFlags() {
|
|
26
|
+
var getMediaFeatureFlags = exports.getMediaFeatureFlags = function getMediaFeatureFlags() {
|
|
30
27
|
return mediaFeatureFlagsKeys.reduce(function (result, flagName) {
|
|
31
28
|
return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, flagName, (0, _mediaCommon.getMediaFeatureFlag)(flagName)));
|
|
32
29
|
}, {});
|
|
33
|
-
};
|
|
34
|
-
exports.getMediaFeatureFlags = getMediaFeatureFlags;
|
|
30
|
+
};
|
|
@@ -37,5 +37,4 @@ var FeatureFlagsWrapper = function FeatureFlagsWrapper(_ref) {
|
|
|
37
37
|
key: childrenKey
|
|
38
38
|
}, children)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
39
39
|
};
|
|
40
|
-
var _default = FeatureFlagsWrapper;
|
|
41
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = FeatureFlagsWrapper;
|
package/dist/cjs/fileReader.js
CHANGED
|
@@ -37,10 +37,9 @@ var MockFileReader = /*#__PURE__*/(0, _createClass2.default)(function MockFileRe
|
|
|
37
37
|
}));
|
|
38
38
|
this.result = result;
|
|
39
39
|
});
|
|
40
|
-
var mockFileReaderError = {
|
|
40
|
+
var mockFileReaderError = exports.mockFileReaderError = {
|
|
41
41
|
message: 'error'
|
|
42
42
|
};
|
|
43
|
-
exports.mockFileReaderError = mockFileReaderError;
|
|
44
43
|
var MockFileReaderWithError = /*#__PURE__*/function (_MockFileReader) {
|
|
45
44
|
(0, _inherits2.default)(MockFileReaderWithError, _MockFileReader);
|
|
46
45
|
var _super = _createSuper(MockFileReaderWithError);
|
|
@@ -65,25 +64,22 @@ if (global.FileReader && typeof jest !== 'undefined') {
|
|
|
65
64
|
return new GlobalFileReader();
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
|
-
var mockFileReader = function mockFileReader(result) {
|
|
67
|
+
var mockFileReader = exports.mockFileReader = function mockFileReader(result) {
|
|
69
68
|
var fileReader = new MockFileReader(result);
|
|
70
69
|
FileReader.mockImplementation(function () {
|
|
71
70
|
return fileReader;
|
|
72
71
|
});
|
|
73
72
|
return fileReader;
|
|
74
73
|
};
|
|
75
|
-
exports.
|
|
76
|
-
var mockFileReaderWithError = function mockFileReaderWithError() {
|
|
74
|
+
var mockFileReaderWithError = exports.mockFileReaderWithError = function mockFileReaderWithError() {
|
|
77
75
|
var fileReader = new MockFileReaderWithError();
|
|
78
76
|
FileReader.mockImplementation(function () {
|
|
79
77
|
return fileReader;
|
|
80
78
|
});
|
|
81
79
|
return fileReader;
|
|
82
80
|
};
|
|
83
|
-
exports.
|
|
84
|
-
var unmockFileReader = function unmockFileReader() {
|
|
81
|
+
var unmockFileReader = exports.unmockFileReader = function unmockFileReader() {
|
|
85
82
|
return FileReader.mockImplementation(function () {
|
|
86
83
|
return new GlobalFileReader();
|
|
87
84
|
});
|
|
88
|
-
};
|
|
89
|
-
exports.unmockFileReader = unmockFileReader;
|
|
85
|
+
};
|
|
@@ -18,7 +18,7 @@ var brokenLocalPreview = {
|
|
|
18
18
|
var remotePreview = {
|
|
19
19
|
image: {}
|
|
20
20
|
};
|
|
21
|
-
var createFileState = function createFileState(id, status) {
|
|
21
|
+
var createFileState = exports.createFileState = function createFileState(id, status) {
|
|
22
22
|
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
23
23
|
withRemotePreview = _ref.withRemotePreview,
|
|
24
24
|
withLocalPreview = _ref.withLocalPreview,
|
|
@@ -64,5 +64,4 @@ var createFileState = function createFileState(id, status) {
|
|
|
64
64
|
message: 'This is a terrible error with a super long trace'
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
};
|
|
68
|
-
exports.createFileState = createFileState;
|
|
67
|
+
};
|
|
@@ -24,7 +24,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
24
24
|
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; }
|
|
25
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
26
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
var MediaClientMock = /*#__PURE__*/function (_MediaClient) {
|
|
27
|
+
var MediaClientMock = exports.MediaClientMock = /*#__PURE__*/function (_MediaClient) {
|
|
28
28
|
(0, _inherits2.default)(MediaClientMock, _MediaClient);
|
|
29
29
|
var _super = _createSuper(MediaClientMock);
|
|
30
30
|
function MediaClientMock(observable, mediaClientConfig, featureFlags) {
|
|
@@ -74,7 +74,6 @@ var MediaClientMock = /*#__PURE__*/function (_MediaClient) {
|
|
|
74
74
|
}
|
|
75
75
|
return (0, _createClass2.default)(MediaClientMock);
|
|
76
76
|
}(_mediaClient.MediaClient);
|
|
77
|
-
exports.MediaClientMock = MediaClientMock;
|
|
78
77
|
var mockConfig = {
|
|
79
78
|
authProvider: function () {
|
|
80
79
|
var _authProvider = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
@@ -103,7 +102,7 @@ var mockConfig = {
|
|
|
103
102
|
* simulated file states. With this class, we can test several scenarios
|
|
104
103
|
* without having to recreate them all in the backend.
|
|
105
104
|
*/
|
|
106
|
-
var FileStateFactory = /*#__PURE__*/(0, _createClass2.default)(function FileStateFactory(_identifier) {
|
|
105
|
+
var FileStateFactory = exports.FileStateFactory = /*#__PURE__*/(0, _createClass2.default)(function FileStateFactory(_identifier) {
|
|
107
106
|
var _this2 = this;
|
|
108
107
|
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
109
108
|
_fileDetails = _ref2.fileDetails,
|
|
@@ -142,5 +141,4 @@ var FileStateFactory = /*#__PURE__*/(0, _createClass2.default)(function FileStat
|
|
|
142
141
|
this.fileDetails = _fileDetails || (0, _helpers.createFileDetails)(this.identifier.id);
|
|
143
142
|
this.observable = (0, _mediaClient.createMediaSubject)();
|
|
144
143
|
this.mediaClient = new MediaClientMock(this.observable, mediaClientConfig, featureFlags, mediaClientMockOptions);
|
|
145
|
-
});
|
|
146
|
-
exports.FileStateFactory = FileStateFactory;
|
|
144
|
+
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultFileDetails = exports.createIdentifier = exports.createFileDetails = void 0;
|
|
7
7
|
var _uuid = require("uuid");
|
|
8
|
-
var defaultFileDetails = {
|
|
8
|
+
var defaultFileDetails = exports.defaultFileDetails = {
|
|
9
9
|
createdAt: 1630986510989,
|
|
10
10
|
mediaType: 'image',
|
|
11
11
|
mimeType: 'image/png',
|
|
@@ -14,7 +14,6 @@ var defaultFileDetails = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// min inclusive / max exclusive
|
|
17
|
-
exports.defaultFileDetails = defaultFileDetails;
|
|
18
17
|
function random() {
|
|
19
18
|
var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
20
19
|
var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10000;
|
|
@@ -26,7 +25,7 @@ function random() {
|
|
|
26
25
|
var getRandomElem = function getRandomElem(arr) {
|
|
27
26
|
return arr[Math.floor(Math.random() * arr.length)];
|
|
28
27
|
};
|
|
29
|
-
var createIdentifier = function createIdentifier() {
|
|
28
|
+
var createIdentifier = exports.createIdentifier = function createIdentifier() {
|
|
30
29
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
31
30
|
_ref$collectionName = _ref.collectionName,
|
|
32
31
|
collectionName = _ref$collectionName === void 0 ? "collection-".concat(random()) : _ref$collectionName,
|
|
@@ -39,7 +38,6 @@ var createIdentifier = function createIdentifier() {
|
|
|
39
38
|
occurrenceKey: occurrenceKey
|
|
40
39
|
};
|
|
41
40
|
};
|
|
42
|
-
exports.createIdentifier = createIdentifier;
|
|
43
41
|
var generateFileName = function generateFileName(extension) {
|
|
44
42
|
var fileNames = ['quick-and-dirty', 'quality-time', 'down-for-the-count', 'hard-pill-to-swallow', 'between-a-rock-and-a-hard-place', 'fish-out-of-water', 'top-drawer', 'like-father-like-son', 'mountain-out-of-a-molehill', 'under-your-nose', 'a-chip-on-your-shoulder', 'hit-below-the-belt'];
|
|
45
43
|
return "".concat(getRandomElem(fileNames), ".").concat(extension);
|
|
@@ -80,7 +78,7 @@ var generateMediaTypeDetails = function generateMediaTypeDetails(mediaType) {
|
|
|
80
78
|
name: generateFileName(ext)
|
|
81
79
|
};
|
|
82
80
|
};
|
|
83
|
-
var createFileDetails = function createFileDetails(id) {
|
|
81
|
+
var createFileDetails = exports.createFileDetails = function createFileDetails(id) {
|
|
84
82
|
var mediaType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getRandomElem(mediaTypes);
|
|
85
83
|
var _generateMediaTypeDet = generateMediaTypeDetails(mediaType),
|
|
86
84
|
mimeType = _generateMediaTypeDet.mimeType,
|
|
@@ -93,5 +91,4 @@ var createFileDetails = function createFileDetails(id) {
|
|
|
93
91
|
mediaType: mediaType,
|
|
94
92
|
mimeType: mimeType
|
|
95
93
|
};
|
|
96
|
-
};
|
|
97
|
-
exports.createFileDetails = createFileDetails;
|
|
94
|
+
};
|
|
@@ -45,7 +45,7 @@ var useSimulationSettings = function useSimulationSettings() {
|
|
|
45
45
|
updateIdentifier: updateIdentifier
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
var useRunSimulation = function useRunSimulation(simulation) {
|
|
48
|
+
var useRunSimulation = exports.useRunSimulation = function useRunSimulation(simulation) {
|
|
49
49
|
var simulationSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
50
50
|
var _useSimulationSetting = useSimulationSettings(simulationSettings),
|
|
51
51
|
identifier = _useSimulationSetting.identifier,
|
|
@@ -64,7 +64,6 @@ var useRunSimulation = function useRunSimulation(simulation) {
|
|
|
64
64
|
updateIdentifier: updateIdentifier
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
exports.useRunSimulation = useRunSimulation;
|
|
68
67
|
var useSubscribeToFileState = function useSubscribeToFileState(identifier, fileStateFactory) {
|
|
69
68
|
var _useState7 = (0, _react.useState)(),
|
|
70
69
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|