@atlaskit/editor-plugin-media-insert 2.4.0 → 2.5.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 +12 -0
- package/dist/cjs/ui/MediaFromURL.js +13 -1
- package/dist/es2019/ui/MediaFromURL.js +13 -1
- package/dist/esm/ui/MediaFromURL.js +13 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media-insert
|
|
2
2
|
|
|
3
|
+
## 2.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#138801](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138801)
|
|
8
|
+
[`f742cd24b83a1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f742cd24b83a1) -
|
|
9
|
+
[ux] [ED-24877] Improve keyboard UX for "from link" media uploads
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 2.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -260,7 +260,19 @@ function MediaFromURL(_ref) {
|
|
|
260
260
|
as: "form",
|
|
261
261
|
onSubmit: function onSubmit(e) {
|
|
262
262
|
e.preventDefault();
|
|
263
|
-
|
|
263
|
+
// This can be triggered from an enter key event on the input even when
|
|
264
|
+
// the button is disabled, so we explicitly do nothing when in loading
|
|
265
|
+
// state.
|
|
266
|
+
if (previewState.isLoading) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
if (previewState.previewInfo) {
|
|
270
|
+
return onInsert();
|
|
271
|
+
}
|
|
272
|
+
if (previewState.warning) {
|
|
273
|
+
return onExternalInsert(inputUrl);
|
|
274
|
+
}
|
|
275
|
+
return uploadExternalMedia(inputUrl);
|
|
264
276
|
},
|
|
265
277
|
xcss: FormStyles
|
|
266
278
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
|
|
@@ -228,7 +228,19 @@ export function MediaFromURL({
|
|
|
228
228
|
as: "form",
|
|
229
229
|
onSubmit: e => {
|
|
230
230
|
e.preventDefault();
|
|
231
|
-
|
|
231
|
+
// This can be triggered from an enter key event on the input even when
|
|
232
|
+
// the button is disabled, so we explicitly do nothing when in loading
|
|
233
|
+
// state.
|
|
234
|
+
if (previewState.isLoading) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (previewState.previewInfo) {
|
|
238
|
+
return onInsert();
|
|
239
|
+
}
|
|
240
|
+
if (previewState.warning) {
|
|
241
|
+
return onExternalInsert(inputUrl);
|
|
242
|
+
}
|
|
243
|
+
return uploadExternalMedia(inputUrl);
|
|
232
244
|
},
|
|
233
245
|
xcss: FormStyles
|
|
234
246
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -253,7 +253,19 @@ export function MediaFromURL(_ref) {
|
|
|
253
253
|
as: "form",
|
|
254
254
|
onSubmit: function onSubmit(e) {
|
|
255
255
|
e.preventDefault();
|
|
256
|
-
|
|
256
|
+
// This can be triggered from an enter key event on the input even when
|
|
257
|
+
// the button is disabled, so we explicitly do nothing when in loading
|
|
258
|
+
// state.
|
|
259
|
+
if (previewState.isLoading) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
if (previewState.previewInfo) {
|
|
263
|
+
return onInsert();
|
|
264
|
+
}
|
|
265
|
+
if (previewState.warning) {
|
|
266
|
+
return onExternalInsert(inputUrl);
|
|
267
|
+
}
|
|
268
|
+
return uploadExternalMedia(inputUrl);
|
|
257
269
|
},
|
|
258
270
|
xcss: FormStyles
|
|
259
271
|
}, /*#__PURE__*/React.createElement(Stack, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media-insert",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Media Insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/button": "^20.1.0",
|
|
27
|
-
"@atlaskit/editor-common": "^88.
|
|
27
|
+
"@atlaskit/editor-common": "^88.13.0",
|
|
28
28
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
29
|
-
"@atlaskit/editor-plugin-media": "^1.
|
|
29
|
+
"@atlaskit/editor-plugin-media": "^1.31.0",
|
|
30
30
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
31
31
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
32
32
|
"@atlaskit/icon": "^22.16.0",
|