@atlaskit/editor-plugin-media-insert 44.0.5 → 44.0.6
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 +7 -0
- package/dist/cjs/ui/MediaFromURL.js +4 -13
- package/dist/cjs/ui/MediaInsertPicker.js +9 -21
- package/dist/es2019/ui/MediaFromURL.js +4 -13
- package/dist/es2019/ui/MediaInsertPicker.js +9 -19
- package/dist/esm/ui/MediaFromURL.js +4 -13
- package/dist/esm/ui/MediaInsertPicker.js +9 -21
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media-insert
|
|
2
2
|
|
|
3
|
+
## 44.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a6e997a7a24f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6e997a7a24f7) -
|
|
8
|
+
Clean up experiment `platform_editor_fix_focus_mediainsertpicker`
|
|
9
|
+
|
|
3
10
|
## 44.0.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -28,7 +28,6 @@ var _helperMessage = require("@atlaskit/form/helper-message");
|
|
|
28
28
|
var _messageWrapper = require("@atlaskit/form/message-wrapper");
|
|
29
29
|
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
30
30
|
var _getMediaClient = require("@atlaskit/media-client-react/get-media-client");
|
|
31
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
32
31
|
var _primitives = require("@atlaskit/primitives");
|
|
33
32
|
var _message = _interopRequireDefault(require("@atlaskit/section-message/message"));
|
|
34
33
|
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
@@ -278,13 +277,9 @@ function MediaFromURL(_ref) {
|
|
|
278
277
|
};
|
|
279
278
|
dispatchAnalyticsEvent(payload);
|
|
280
279
|
}
|
|
281
|
-
|
|
282
|
-
cancelMediaInsertPicker();
|
|
283
|
-
} else {
|
|
284
|
-
closeMediaInsertPicker();
|
|
285
|
-
}
|
|
280
|
+
cancelMediaInsertPicker();
|
|
286
281
|
}
|
|
287
|
-
}, [dispatchAnalyticsEvent, cancelMediaInsertPicker
|
|
282
|
+
}, [dispatchAnalyticsEvent, cancelMediaInsertPicker]);
|
|
288
283
|
var onCancel = _react.default.useCallback(function () {
|
|
289
284
|
if (dispatchAnalyticsEvent) {
|
|
290
285
|
var payload = {
|
|
@@ -295,12 +290,8 @@ function MediaFromURL(_ref) {
|
|
|
295
290
|
};
|
|
296
291
|
dispatchAnalyticsEvent(payload);
|
|
297
292
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
} else {
|
|
301
|
-
closeMediaInsertPicker();
|
|
302
|
-
}
|
|
303
|
-
}, [cancelMediaInsertPicker, dispatchAnalyticsEvent, closeMediaInsertPicker]);
|
|
293
|
+
cancelMediaInsertPicker();
|
|
294
|
+
}, [cancelMediaInsertPicker, dispatchAnalyticsEvent]);
|
|
304
295
|
return /*#__PURE__*/_react.default.createElement(_form.default, {
|
|
305
296
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
306
297
|
onSubmit: function onSubmit(_ref3, form) {
|
|
@@ -18,7 +18,6 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
18
18
|
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
19
19
|
var _withOuterListeners = _interopRequireDefault(require("@atlaskit/editor-common/with-outer-listeners"));
|
|
20
20
|
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
21
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
22
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
22
|
var _tabList = _interopRequireDefault(require("@atlaskit/tabs/tab-list"));
|
|
24
23
|
var _tabs = _interopRequireDefault(require("@atlaskit/tabs/tabs"));
|
|
@@ -175,6 +174,10 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
|
|
|
175
174
|
returnFocusRef.current = focusButton;
|
|
176
175
|
closeMediaInsertPicker();
|
|
177
176
|
}, [closeMediaInsertPicker, focusButton]);
|
|
177
|
+
// Return focus on unmount to whichever element `returnFocusRef` currently points at.
|
|
178
|
+
var returnFocusOnUnmount = _react.default.useCallback(function () {
|
|
179
|
+
returnFocusRef.current();
|
|
180
|
+
}, []);
|
|
178
181
|
var intl = (0, _reactIntl.useIntl)();
|
|
179
182
|
var _useUnholyAutofocus = (0, _useUnholyAutofocus2.useUnholyAutofocus)(),
|
|
180
183
|
autofocusRef = _useUnholyAutofocus.autofocusRef,
|
|
@@ -310,22 +313,9 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
|
|
|
310
313
|
};
|
|
311
314
|
dispatchAnalyticsEvent(payload);
|
|
312
315
|
}
|
|
313
|
-
|
|
314
|
-
closeAndReturnFocusToButton();
|
|
315
|
-
} else {
|
|
316
|
-
closeMediaInsertPicker(); // Focuses editor on unmount
|
|
317
|
-
focusEditor();
|
|
318
|
-
}
|
|
316
|
+
closeAndReturnFocusToButton();
|
|
319
317
|
};
|
|
320
318
|
};
|
|
321
|
-
var closePickerAndFocusEditor = function closePickerAndFocusEditor() {
|
|
322
|
-
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_fix_focus_mediainsertpicker')) {
|
|
323
|
-
closeAndFocusEditor();
|
|
324
|
-
} else {
|
|
325
|
-
closeMediaInsertPicker();
|
|
326
|
-
focusEditor();
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
319
|
var fileTabTitle = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc_page_experiences_editor_image_generation', 'isEnabled', true) ? intl.formatMessage(_mediaInsert.mediaInsertMessages.uploadTabTitle) : intl.formatMessage(_mediaInsert.mediaInsertMessages.fileTabTitle);
|
|
330
320
|
return /*#__PURE__*/_react.default.createElement(PopupWithListeners, {
|
|
331
321
|
ariaLabel: intl.formatMessage(_mediaInsert.mediaInsertMessages.mediaPickerPopupAriaLabel)
|
|
@@ -337,9 +327,7 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
|
|
|
337
327
|
fitHeight: 390,
|
|
338
328
|
fitWidth: 340,
|
|
339
329
|
mountTo: mountPoint,
|
|
340
|
-
onUnmount:
|
|
341
|
-
return returnFocusRef.current();
|
|
342
|
-
} : undefined,
|
|
330
|
+
onUnmount: returnFocusOnUnmount,
|
|
343
331
|
boundariesElement: popupsBoundariesElement,
|
|
344
332
|
handleClickOutside: handleClose(_enums.INPUT_METHOD.MOUSE),
|
|
345
333
|
handleEscapeKeydown: handleClose(_enums.INPUT_METHOD.KEYBOARD),
|
|
@@ -370,7 +358,7 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
|
|
|
370
358
|
key: tab.key,
|
|
371
359
|
disablePaddingBlockEnd: true
|
|
372
360
|
}, /*#__PURE__*/_react.default.createElement(TabComponent, {
|
|
373
|
-
closeMediaInsertPicker:
|
|
361
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
374
362
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
375
363
|
insertMediaSingle: insertMediaSingle,
|
|
376
364
|
mediaProvider: mediaProvider
|
|
@@ -382,7 +370,7 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
|
|
|
382
370
|
}, /*#__PURE__*/_react.default.createElement(_LocalMedia.LocalMedia, {
|
|
383
371
|
ref: autofocusRef,
|
|
384
372
|
mediaProvider: mediaProvider,
|
|
385
|
-
closeMediaInsertPicker:
|
|
373
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
386
374
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
387
375
|
insertFile: insertFile
|
|
388
376
|
}));
|
|
@@ -392,7 +380,7 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
|
|
|
392
380
|
}, /*#__PURE__*/_react.default.createElement(_MediaFromURL.MediaFromURL, {
|
|
393
381
|
mediaProvider: mediaProvider,
|
|
394
382
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
395
|
-
closeMediaInsertPicker:
|
|
383
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
396
384
|
cancelMediaInsertPicker: closeAndReturnFocusToButton,
|
|
397
385
|
insertMediaSingle: insertMediaSingle,
|
|
398
386
|
insertExternalMediaSingle: insertExternalMediaSingle,
|
|
@@ -14,7 +14,6 @@ import { HelperMessage } from '@atlaskit/form/helper-message';
|
|
|
14
14
|
import { MessageWrapper } from '@atlaskit/form/message-wrapper';
|
|
15
15
|
import ExpandIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
16
16
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
17
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
17
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
19
18
|
import { Box, Flex, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
20
19
|
import SectionMessage from '@atlaskit/section-message/message';
|
|
@@ -242,13 +241,9 @@ export function MediaFromURL({
|
|
|
242
241
|
};
|
|
243
242
|
dispatchAnalyticsEvent(payload);
|
|
244
243
|
}
|
|
245
|
-
|
|
246
|
-
cancelMediaInsertPicker();
|
|
247
|
-
} else {
|
|
248
|
-
closeMediaInsertPicker();
|
|
249
|
-
}
|
|
244
|
+
cancelMediaInsertPicker();
|
|
250
245
|
}
|
|
251
|
-
}, [dispatchAnalyticsEvent, cancelMediaInsertPicker
|
|
246
|
+
}, [dispatchAnalyticsEvent, cancelMediaInsertPicker]);
|
|
252
247
|
const onCancel = React.useCallback(() => {
|
|
253
248
|
if (dispatchAnalyticsEvent) {
|
|
254
249
|
const payload = {
|
|
@@ -259,12 +254,8 @@ export function MediaFromURL({
|
|
|
259
254
|
};
|
|
260
255
|
dispatchAnalyticsEvent(payload);
|
|
261
256
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
} else {
|
|
265
|
-
closeMediaInsertPicker();
|
|
266
|
-
}
|
|
267
|
-
}, [cancelMediaInsertPicker, dispatchAnalyticsEvent, closeMediaInsertPicker]);
|
|
257
|
+
cancelMediaInsertPicker();
|
|
258
|
+
}, [cancelMediaInsertPicker, dispatchAnalyticsEvent]);
|
|
268
259
|
return /*#__PURE__*/React.createElement(Form, {
|
|
269
260
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
270
261
|
onSubmit: ({
|
|
@@ -10,7 +10,6 @@ import { PlainOutsideClickTargetRefContext } from '@atlaskit/editor-common/ui';
|
|
|
10
10
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
11
11
|
import withOuterListeners from '@atlaskit/editor-common/with-outer-listeners';
|
|
12
12
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
13
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
13
|
import { Box, Focusable, Text } from '@atlaskit/primitives/compiled';
|
|
15
14
|
import TabList from '@atlaskit/tabs/tab-list';
|
|
16
15
|
import Tabs from '@atlaskit/tabs/tabs';
|
|
@@ -166,6 +165,10 @@ export const MediaInsertPicker = ({
|
|
|
166
165
|
returnFocusRef.current = focusButton;
|
|
167
166
|
closeMediaInsertPicker();
|
|
168
167
|
}, [closeMediaInsertPicker, focusButton]);
|
|
168
|
+
// Return focus on unmount to whichever element `returnFocusRef` currently points at.
|
|
169
|
+
const returnFocusOnUnmount = React.useCallback(() => {
|
|
170
|
+
returnFocusRef.current();
|
|
171
|
+
}, []);
|
|
169
172
|
const intl = useIntl();
|
|
170
173
|
const {
|
|
171
174
|
autofocusRef,
|
|
@@ -297,20 +300,7 @@ export const MediaInsertPicker = ({
|
|
|
297
300
|
};
|
|
298
301
|
dispatchAnalyticsEvent(payload);
|
|
299
302
|
}
|
|
300
|
-
|
|
301
|
-
closeAndReturnFocusToButton();
|
|
302
|
-
} else {
|
|
303
|
-
closeMediaInsertPicker(); // Focuses editor on unmount
|
|
304
|
-
focusEditor();
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
const closePickerAndFocusEditor = () => {
|
|
308
|
-
if (isExperimentEnabled('platform_editor_fix_focus_mediainsertpicker')) {
|
|
309
|
-
closeAndFocusEditor();
|
|
310
|
-
} else {
|
|
311
|
-
closeMediaInsertPicker();
|
|
312
|
-
focusEditor();
|
|
313
|
-
}
|
|
303
|
+
closeAndReturnFocusToButton();
|
|
314
304
|
};
|
|
315
305
|
const fileTabTitle = expValEqualsNoExposure('cc_page_experiences_editor_image_generation', 'isEnabled', true) ? intl.formatMessage(mediaInsertMessages.uploadTabTitle) : intl.formatMessage(mediaInsertMessages.fileTabTitle);
|
|
316
306
|
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
@@ -323,7 +313,7 @@ export const MediaInsertPicker = ({
|
|
|
323
313
|
fitHeight: 390,
|
|
324
314
|
fitWidth: 340,
|
|
325
315
|
mountTo: mountPoint,
|
|
326
|
-
onUnmount:
|
|
316
|
+
onUnmount: returnFocusOnUnmount,
|
|
327
317
|
boundariesElement: popupsBoundariesElement,
|
|
328
318
|
handleClickOutside: handleClose(INPUT_METHOD.MOUSE),
|
|
329
319
|
handleEscapeKeydown: handleClose(INPUT_METHOD.KEYBOARD),
|
|
@@ -351,7 +341,7 @@ export const MediaInsertPicker = ({
|
|
|
351
341
|
key: tab.key,
|
|
352
342
|
disablePaddingBlockEnd: true
|
|
353
343
|
}, /*#__PURE__*/React.createElement(TabComponent, {
|
|
354
|
-
closeMediaInsertPicker:
|
|
344
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
355
345
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
356
346
|
insertMediaSingle: insertMediaSingle,
|
|
357
347
|
mediaProvider: mediaProvider
|
|
@@ -363,7 +353,7 @@ export const MediaInsertPicker = ({
|
|
|
363
353
|
}, /*#__PURE__*/React.createElement(LocalMedia, {
|
|
364
354
|
ref: autofocusRef,
|
|
365
355
|
mediaProvider: mediaProvider,
|
|
366
|
-
closeMediaInsertPicker:
|
|
356
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
367
357
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
368
358
|
insertFile: insertFile
|
|
369
359
|
}));
|
|
@@ -373,7 +363,7 @@ export const MediaInsertPicker = ({
|
|
|
373
363
|
}, /*#__PURE__*/React.createElement(MediaFromURL, {
|
|
374
364
|
mediaProvider: mediaProvider,
|
|
375
365
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
376
|
-
closeMediaInsertPicker:
|
|
366
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
377
367
|
cancelMediaInsertPicker: closeAndReturnFocusToButton,
|
|
378
368
|
insertMediaSingle: insertMediaSingle,
|
|
379
369
|
insertExternalMediaSingle: insertExternalMediaSingle,
|
|
@@ -22,7 +22,6 @@ import { HelperMessage } from '@atlaskit/form/helper-message';
|
|
|
22
22
|
import { MessageWrapper } from '@atlaskit/form/message-wrapper';
|
|
23
23
|
import ExpandIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
24
24
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
25
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
26
25
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
27
26
|
import { Box, Flex, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
28
27
|
import SectionMessage from '@atlaskit/section-message/message';
|
|
@@ -270,13 +269,9 @@ export function MediaFromURL(_ref) {
|
|
|
270
269
|
};
|
|
271
270
|
dispatchAnalyticsEvent(payload);
|
|
272
271
|
}
|
|
273
|
-
|
|
274
|
-
cancelMediaInsertPicker();
|
|
275
|
-
} else {
|
|
276
|
-
closeMediaInsertPicker();
|
|
277
|
-
}
|
|
272
|
+
cancelMediaInsertPicker();
|
|
278
273
|
}
|
|
279
|
-
}, [dispatchAnalyticsEvent, cancelMediaInsertPicker
|
|
274
|
+
}, [dispatchAnalyticsEvent, cancelMediaInsertPicker]);
|
|
280
275
|
var onCancel = React.useCallback(function () {
|
|
281
276
|
if (dispatchAnalyticsEvent) {
|
|
282
277
|
var payload = {
|
|
@@ -287,12 +282,8 @@ export function MediaFromURL(_ref) {
|
|
|
287
282
|
};
|
|
288
283
|
dispatchAnalyticsEvent(payload);
|
|
289
284
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
} else {
|
|
293
|
-
closeMediaInsertPicker();
|
|
294
|
-
}
|
|
295
|
-
}, [cancelMediaInsertPicker, dispatchAnalyticsEvent, closeMediaInsertPicker]);
|
|
285
|
+
cancelMediaInsertPicker();
|
|
286
|
+
}, [cancelMediaInsertPicker, dispatchAnalyticsEvent]);
|
|
296
287
|
return /*#__PURE__*/React.createElement(Form, {
|
|
297
288
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
298
289
|
onSubmit: function onSubmit(_ref3, form) {
|
|
@@ -13,7 +13,6 @@ import { PlainOutsideClickTargetRefContext } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
14
14
|
import withOuterListeners from '@atlaskit/editor-common/with-outer-listeners';
|
|
15
15
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
16
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
16
|
import { Box, Focusable, Text } from '@atlaskit/primitives/compiled';
|
|
18
17
|
import TabList from '@atlaskit/tabs/tab-list';
|
|
19
18
|
import Tabs from '@atlaskit/tabs/tabs';
|
|
@@ -168,6 +167,10 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref3) {
|
|
|
168
167
|
returnFocusRef.current = focusButton;
|
|
169
168
|
closeMediaInsertPicker();
|
|
170
169
|
}, [closeMediaInsertPicker, focusButton]);
|
|
170
|
+
// Return focus on unmount to whichever element `returnFocusRef` currently points at.
|
|
171
|
+
var returnFocusOnUnmount = React.useCallback(function () {
|
|
172
|
+
returnFocusRef.current();
|
|
173
|
+
}, []);
|
|
171
174
|
var intl = useIntl();
|
|
172
175
|
var _useUnholyAutofocus = useUnholyAutofocus(),
|
|
173
176
|
autofocusRef = _useUnholyAutofocus.autofocusRef,
|
|
@@ -303,22 +306,9 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref3) {
|
|
|
303
306
|
};
|
|
304
307
|
dispatchAnalyticsEvent(payload);
|
|
305
308
|
}
|
|
306
|
-
|
|
307
|
-
closeAndReturnFocusToButton();
|
|
308
|
-
} else {
|
|
309
|
-
closeMediaInsertPicker(); // Focuses editor on unmount
|
|
310
|
-
focusEditor();
|
|
311
|
-
}
|
|
309
|
+
closeAndReturnFocusToButton();
|
|
312
310
|
};
|
|
313
311
|
};
|
|
314
|
-
var closePickerAndFocusEditor = function closePickerAndFocusEditor() {
|
|
315
|
-
if (isExperimentEnabled('platform_editor_fix_focus_mediainsertpicker')) {
|
|
316
|
-
closeAndFocusEditor();
|
|
317
|
-
} else {
|
|
318
|
-
closeMediaInsertPicker();
|
|
319
|
-
focusEditor();
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
312
|
var fileTabTitle = expValEqualsNoExposure('cc_page_experiences_editor_image_generation', 'isEnabled', true) ? intl.formatMessage(mediaInsertMessages.uploadTabTitle) : intl.formatMessage(mediaInsertMessages.fileTabTitle);
|
|
323
313
|
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
324
314
|
ariaLabel: intl.formatMessage(mediaInsertMessages.mediaPickerPopupAriaLabel)
|
|
@@ -330,9 +320,7 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref3) {
|
|
|
330
320
|
fitHeight: 390,
|
|
331
321
|
fitWidth: 340,
|
|
332
322
|
mountTo: mountPoint,
|
|
333
|
-
onUnmount:
|
|
334
|
-
return returnFocusRef.current();
|
|
335
|
-
} : undefined,
|
|
323
|
+
onUnmount: returnFocusOnUnmount,
|
|
336
324
|
boundariesElement: popupsBoundariesElement,
|
|
337
325
|
handleClickOutside: handleClose(INPUT_METHOD.MOUSE),
|
|
338
326
|
handleEscapeKeydown: handleClose(INPUT_METHOD.KEYBOARD),
|
|
@@ -363,7 +351,7 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref3) {
|
|
|
363
351
|
key: tab.key,
|
|
364
352
|
disablePaddingBlockEnd: true
|
|
365
353
|
}, /*#__PURE__*/React.createElement(TabComponent, {
|
|
366
|
-
closeMediaInsertPicker:
|
|
354
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
367
355
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
368
356
|
insertMediaSingle: insertMediaSingle,
|
|
369
357
|
mediaProvider: mediaProvider
|
|
@@ -375,7 +363,7 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref3) {
|
|
|
375
363
|
}, /*#__PURE__*/React.createElement(LocalMedia, {
|
|
376
364
|
ref: autofocusRef,
|
|
377
365
|
mediaProvider: mediaProvider,
|
|
378
|
-
closeMediaInsertPicker:
|
|
366
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
379
367
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
380
368
|
insertFile: insertFile
|
|
381
369
|
}));
|
|
@@ -385,7 +373,7 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref3) {
|
|
|
385
373
|
}, /*#__PURE__*/React.createElement(MediaFromURL, {
|
|
386
374
|
mediaProvider: mediaProvider,
|
|
387
375
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
388
|
-
closeMediaInsertPicker:
|
|
376
|
+
closeMediaInsertPicker: closeAndFocusEditor,
|
|
389
377
|
cancelMediaInsertPicker: closeAndReturnFocusToButton,
|
|
390
378
|
insertMediaSingle: insertMediaSingle,
|
|
391
379
|
insertExternalMediaSingle: insertExternalMediaSingle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media-insert",
|
|
3
|
-
"version": "44.0.
|
|
3
|
+
"version": "44.0.6",
|
|
4
4
|
"description": "Media Insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@babel/runtime": "^7.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^130.
|
|
49
|
+
"@atlaskit/editor-common": "^130.4.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
51
51
|
"@atlaskit/tokens": "^20.4.0",
|
|
52
52
|
"react": "^18.2.0 || ^19.2.0",
|