@atlaskit/editor-plugin-media 2.3.21 → 2.3.22
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 +13 -0
- package/dist/cjs/nodeviews/mediaGroup.js +1 -1
- package/dist/cjs/nodeviews/mediaSingle.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/cjs/ui/toolbar/alt-text.js +2 -1
- package/dist/cjs/ui/toolbar/index.js +8 -5
- package/dist/es2019/nodeviews/mediaGroup.js +1 -1
- package/dist/es2019/nodeviews/mediaSingle.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/es2019/ui/toolbar/alt-text.js +2 -1
- package/dist/es2019/ui/toolbar/index.js +10 -5
- package/dist/esm/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/esm/ui/toolbar/alt-text.js +2 -1
- package/dist/esm/ui/toolbar/index.js +8 -5
- package/package.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 2.3.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#137128](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/137128)
|
|
8
|
+
[`9717d76a633ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9717d76a633ca) -
|
|
9
|
+
[ux] Fix media custom toolbar position issue
|
|
10
|
+
- [#137153](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/137153)
|
|
11
|
+
[`105ebf2f4f54b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/105ebf2f4f54b) -
|
|
12
|
+
[ED-27125] This change is adding a feature gate to use the functional components for media nodes
|
|
13
|
+
which will resolve the bug of attachment duplication when copying and pasting.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 2.3.21
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -348,7 +348,7 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
348
348
|
if (!mediaProvider) {
|
|
349
349
|
return null;
|
|
350
350
|
}
|
|
351
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single')) {
|
|
351
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single') || (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single_jira')) {
|
|
352
352
|
return /*#__PURE__*/_react.default.createElement(_mediaGroupNext.MediaGroupNext, {
|
|
353
353
|
node: _this3.node,
|
|
354
354
|
getPos: getPos,
|
|
@@ -565,7 +565,7 @@ var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref6) {
|
|
|
565
565
|
var mediaProvider = (0, _react.useMemo)(function () {
|
|
566
566
|
return mediaState !== null && mediaState !== void 0 && mediaState.mediaProvider ? Promise.resolve(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaProvider) : undefined;
|
|
567
567
|
}, [mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaProvider]);
|
|
568
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single')) {
|
|
568
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single') || (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single_jira')) {
|
|
569
569
|
return (0, _react2.jsx)(_mediaSingleNext.MediaSingleNodeNext, {
|
|
570
570
|
width: (widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0,
|
|
571
571
|
lineLength: (widthState === null || widthState === void 0 ? void 0 : widthState.lineLength) || 0,
|
|
@@ -1075,7 +1075,7 @@ var ResizableMediaSingleToggle = function ResizableMediaSingleToggle(_ref9) {
|
|
|
1075
1075
|
viewMediaClientConfig = _ref9.viewMediaClientConfig,
|
|
1076
1076
|
width = _ref9.width,
|
|
1077
1077
|
forceHandlePositioning = _ref9.forceHandlePositioning;
|
|
1078
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single')) {
|
|
1078
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single') || (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2__media_single_jira')) {
|
|
1079
1079
|
return (0, _react2.jsx)(ResizableMediaSingleNextFunctional, {
|
|
1080
1080
|
allowBreakoutSnapPoints: allowBreakoutSnapPoints
|
|
1081
1081
|
// eslint-disable-next-line react/no-children-prop
|
|
@@ -95,7 +95,8 @@ var getAltTextDropdownOption = exports.getAltTextDropdownOption = function getAl
|
|
|
95
95
|
onClick: (0, _commands.openMediaAltTextMenu)(editorAnalyticsAPI),
|
|
96
96
|
icon: /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
97
97
|
label: ""
|
|
98
|
-
})
|
|
98
|
+
}),
|
|
99
|
+
testId: 'media-alt-text-dropdown-option'
|
|
99
100
|
}];
|
|
100
101
|
}
|
|
101
102
|
return [];
|
|
@@ -720,11 +720,14 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
720
720
|
return;
|
|
721
721
|
}
|
|
722
722
|
var nodeType = allowMediaInline ? [mediaInline, mediaSingle, media] : [mediaSingle];
|
|
723
|
+
var isSelectedNodeMediaSingle = state.selection instanceof _state2.NodeSelection && state.selection.node.type === mediaSingle;
|
|
723
724
|
var baseToolbar = {
|
|
724
725
|
title: 'Media floating controls',
|
|
725
726
|
nodeType: nodeType,
|
|
726
727
|
getDomRef: function getDomRef() {
|
|
727
|
-
|
|
728
|
+
var _mediaPluginState$ele;
|
|
729
|
+
var element = isSelectedNodeMediaSingle && (0, _platformFeatureFlags.fg)('platform_editor_media_single_toolbar_target') ? ((_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(".".concat(_styles.MediaSingleNodeSelector))) || mediaPluginState.element : mediaPluginState.element;
|
|
730
|
+
return element;
|
|
728
731
|
}
|
|
729
732
|
};
|
|
730
733
|
if (allowLinking && mediaLinkingState && mediaLinkingState.visible && (0, _linking3.shouldShowMediaLinkToolbar)(state)) {
|
|
@@ -767,21 +770,21 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
767
770
|
var _pluginInjectionApi$a8, _pluginInjectionApi$f2;
|
|
768
771
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
769
772
|
baseToolbar.getDomRef = function () {
|
|
770
|
-
var _mediaPluginState$
|
|
773
|
+
var _mediaPluginState$ele2;
|
|
771
774
|
var selector = (0, _mediaFilmstrip.mediaFilmstripItemDOMSelector)(mediaOffset);
|
|
772
775
|
// Ignored via go/ees005
|
|
773
776
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
774
|
-
return (_mediaPluginState$
|
|
777
|
+
return (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(selector);
|
|
775
778
|
};
|
|
776
779
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
777
780
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
778
781
|
items = (0, _mediaInline2.generateMediaInlineFloatingToolbar)(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
779
782
|
} else {
|
|
780
783
|
baseToolbar.getDomRef = function () {
|
|
781
|
-
var _mediaPluginState$
|
|
784
|
+
var _mediaPluginState$ele3;
|
|
782
785
|
// Ignored via go/ees005
|
|
783
786
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
784
|
-
var element = (_mediaPluginState$
|
|
787
|
+
var element = (_mediaPluginState$ele3 = mediaPluginState.element) === null || _mediaPluginState$ele3 === void 0 ? void 0 : _mediaPluginState$ele3.querySelector(".".concat(_styles.MediaSingleNodeSelector));
|
|
785
788
|
return element || mediaPluginState.element;
|
|
786
789
|
};
|
|
787
790
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
@@ -296,7 +296,7 @@ class MediaGroupNodeView extends ReactNodeView {
|
|
|
296
296
|
if (!mediaProvider) {
|
|
297
297
|
return null;
|
|
298
298
|
}
|
|
299
|
-
if (fg('platform_editor_react18_phase2__media_single')) {
|
|
299
|
+
if (fg('platform_editor_react18_phase2__media_single') || fg('platform_editor_react18_phase2__media_single_jira')) {
|
|
300
300
|
return /*#__PURE__*/React.createElement(MediaGroupNext, {
|
|
301
301
|
node: this.node,
|
|
302
302
|
getPos: getPos,
|
|
@@ -480,7 +480,7 @@ const MediaSingleNodeWrapper = ({
|
|
|
480
480
|
editorViewModeState
|
|
481
481
|
} = useSharedPluginState(pluginInjectionApi, ['width', 'media', 'annotation', 'editorDisabled', 'editorViewMode']);
|
|
482
482
|
const mediaProvider = useMemo(() => mediaState !== null && mediaState !== void 0 && mediaState.mediaProvider ? Promise.resolve(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaProvider) : undefined, [mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaProvider]);
|
|
483
|
-
if (fg('platform_editor_react18_phase2__media_single')) {
|
|
483
|
+
if (fg('platform_editor_react18_phase2__media_single') || fg('platform_editor_react18_phase2__media_single_jira')) {
|
|
484
484
|
return jsx(MediaSingleNodeNext, {
|
|
485
485
|
width: (widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0,
|
|
486
486
|
lineLength: (widthState === null || widthState === void 0 ? void 0 : widthState.lineLength) || 0,
|
|
@@ -983,7 +983,7 @@ const ResizableMediaSingleToggle = ({
|
|
|
983
983
|
width,
|
|
984
984
|
forceHandlePositioning
|
|
985
985
|
}) => {
|
|
986
|
-
if (fg('platform_editor_react18_phase2__media_single')) {
|
|
986
|
+
if (fg('platform_editor_react18_phase2__media_single') || fg('platform_editor_react18_phase2__media_single_jira')) {
|
|
987
987
|
return jsx(ResizableMediaSingleNextFunctional, {
|
|
988
988
|
allowBreakoutSnapPoints: allowBreakoutSnapPoints
|
|
989
989
|
// eslint-disable-next-line react/no-children-prop
|
|
@@ -91,7 +91,8 @@ export const getAltTextDropdownOption = (state, formatMessage, allowAltTextOnIma
|
|
|
91
91
|
onClick: openMediaAltTextMenu(editorAnalyticsAPI),
|
|
92
92
|
icon: /*#__PURE__*/React.createElement(TextIcon, {
|
|
93
93
|
label: ""
|
|
94
|
-
})
|
|
94
|
+
}),
|
|
95
|
+
testId: 'media-alt-text-dropdown-option'
|
|
95
96
|
}];
|
|
96
97
|
}
|
|
97
98
|
return [];
|
|
@@ -717,10 +717,15 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
717
717
|
return;
|
|
718
718
|
}
|
|
719
719
|
const nodeType = allowMediaInline ? [mediaInline, mediaSingle, media] : [mediaSingle];
|
|
720
|
+
const isSelectedNodeMediaSingle = state.selection instanceof NodeSelection && state.selection.node.type === mediaSingle;
|
|
720
721
|
const baseToolbar = {
|
|
721
722
|
title: 'Media floating controls',
|
|
722
723
|
nodeType,
|
|
723
|
-
getDomRef: () =>
|
|
724
|
+
getDomRef: () => {
|
|
725
|
+
var _mediaPluginState$ele;
|
|
726
|
+
const element = isSelectedNodeMediaSingle && fg('platform_editor_media_single_toolbar_target') ? ((_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(`.${MediaSingleNodeSelector}`)) || mediaPluginState.element : mediaPluginState.element;
|
|
727
|
+
return element;
|
|
728
|
+
}
|
|
724
729
|
};
|
|
725
730
|
if (allowLinking && mediaLinkingState && mediaLinkingState.visible && shouldShowMediaLinkToolbar(state)) {
|
|
726
731
|
const linkingToolbar = getLinkingToolbar(baseToolbar, mediaLinkingState, state, intl, pluginInjectionApi, providerFactory);
|
|
@@ -764,21 +769,21 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
764
769
|
var _pluginInjectionApi$a8, _pluginInjectionApi$f3, _pluginInjectionApi$f4;
|
|
765
770
|
const mediaOffset = state.selection.$from.parentOffset + 1;
|
|
766
771
|
baseToolbar.getDomRef = () => {
|
|
767
|
-
var _mediaPluginState$
|
|
772
|
+
var _mediaPluginState$ele2;
|
|
768
773
|
const selector = mediaFilmstripItemDOMSelector(mediaOffset);
|
|
769
774
|
// Ignored via go/ees005
|
|
770
775
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
771
|
-
return (_mediaPluginState$
|
|
776
|
+
return (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(selector);
|
|
772
777
|
};
|
|
773
778
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : (_pluginInjectionApi$f4 = _pluginInjectionApi$f3.actions) === null || _pluginInjectionApi$f4 === void 0 ? void 0 : _pluginInjectionApi$f4.forceFocusSelector, isViewOnly);
|
|
774
779
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
775
780
|
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
776
781
|
} else {
|
|
777
782
|
baseToolbar.getDomRef = () => {
|
|
778
|
-
var _mediaPluginState$
|
|
783
|
+
var _mediaPluginState$ele3;
|
|
779
784
|
// Ignored via go/ees005
|
|
780
785
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
781
|
-
const element = (_mediaPluginState$
|
|
786
|
+
const element = (_mediaPluginState$ele3 = mediaPluginState.element) === null || _mediaPluginState$ele3 === void 0 ? void 0 : _mediaPluginState$ele3.querySelector(`.${MediaSingleNodeSelector}`);
|
|
782
787
|
return element || mediaPluginState.element;
|
|
783
788
|
};
|
|
784
789
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
@@ -341,7 +341,7 @@ var MediaGroupNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
341
341
|
if (!mediaProvider) {
|
|
342
342
|
return null;
|
|
343
343
|
}
|
|
344
|
-
if (fg('platform_editor_react18_phase2__media_single')) {
|
|
344
|
+
if (fg('platform_editor_react18_phase2__media_single') || fg('platform_editor_react18_phase2__media_single_jira')) {
|
|
345
345
|
return /*#__PURE__*/React.createElement(MediaGroupNext, {
|
|
346
346
|
node: _this3.node,
|
|
347
347
|
getPos: getPos,
|
|
@@ -560,7 +560,7 @@ var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref6) {
|
|
|
560
560
|
var mediaProvider = useMemo(function () {
|
|
561
561
|
return mediaState !== null && mediaState !== void 0 && mediaState.mediaProvider ? Promise.resolve(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaProvider) : undefined;
|
|
562
562
|
}, [mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaProvider]);
|
|
563
|
-
if (fg('platform_editor_react18_phase2__media_single')) {
|
|
563
|
+
if (fg('platform_editor_react18_phase2__media_single') || fg('platform_editor_react18_phase2__media_single_jira')) {
|
|
564
564
|
return jsx(MediaSingleNodeNext, {
|
|
565
565
|
width: (widthState === null || widthState === void 0 ? void 0 : widthState.width) || 0,
|
|
566
566
|
lineLength: (widthState === null || widthState === void 0 ? void 0 : widthState.lineLength) || 0,
|
|
@@ -1068,7 +1068,7 @@ var ResizableMediaSingleToggle = function ResizableMediaSingleToggle(_ref9) {
|
|
|
1068
1068
|
viewMediaClientConfig = _ref9.viewMediaClientConfig,
|
|
1069
1069
|
width = _ref9.width,
|
|
1070
1070
|
forceHandlePositioning = _ref9.forceHandlePositioning;
|
|
1071
|
-
if (fg('platform_editor_react18_phase2__media_single')) {
|
|
1071
|
+
if (fg('platform_editor_react18_phase2__media_single') || fg('platform_editor_react18_phase2__media_single_jira')) {
|
|
1072
1072
|
return jsx(ResizableMediaSingleNextFunctional, {
|
|
1073
1073
|
allowBreakoutSnapPoints: allowBreakoutSnapPoints
|
|
1074
1074
|
// eslint-disable-next-line react/no-children-prop
|
|
@@ -88,7 +88,8 @@ export var getAltTextDropdownOption = function getAltTextDropdownOption(state, f
|
|
|
88
88
|
onClick: openMediaAltTextMenu(editorAnalyticsAPI),
|
|
89
89
|
icon: /*#__PURE__*/React.createElement(TextIcon, {
|
|
90
90
|
label: ""
|
|
91
|
-
})
|
|
91
|
+
}),
|
|
92
|
+
testId: 'media-alt-text-dropdown-option'
|
|
92
93
|
}];
|
|
93
94
|
}
|
|
94
95
|
return [];
|
|
@@ -710,11 +710,14 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
710
710
|
return;
|
|
711
711
|
}
|
|
712
712
|
var nodeType = allowMediaInline ? [mediaInline, mediaSingle, media] : [mediaSingle];
|
|
713
|
+
var isSelectedNodeMediaSingle = state.selection instanceof NodeSelection && state.selection.node.type === mediaSingle;
|
|
713
714
|
var baseToolbar = {
|
|
714
715
|
title: 'Media floating controls',
|
|
715
716
|
nodeType: nodeType,
|
|
716
717
|
getDomRef: function getDomRef() {
|
|
717
|
-
|
|
718
|
+
var _mediaPluginState$ele;
|
|
719
|
+
var element = isSelectedNodeMediaSingle && fg('platform_editor_media_single_toolbar_target') ? ((_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(".".concat(MediaSingleNodeSelector))) || mediaPluginState.element : mediaPluginState.element;
|
|
720
|
+
return element;
|
|
718
721
|
}
|
|
719
722
|
};
|
|
720
723
|
if (allowLinking && mediaLinkingState && mediaLinkingState.visible && shouldShowMediaLinkToolbar(state)) {
|
|
@@ -757,21 +760,21 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
757
760
|
var _pluginInjectionApi$a8, _pluginInjectionApi$f2;
|
|
758
761
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
759
762
|
baseToolbar.getDomRef = function () {
|
|
760
|
-
var _mediaPluginState$
|
|
763
|
+
var _mediaPluginState$ele2;
|
|
761
764
|
var selector = mediaFilmstripItemDOMSelector(mediaOffset);
|
|
762
765
|
// Ignored via go/ees005
|
|
763
766
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
764
|
-
return (_mediaPluginState$
|
|
767
|
+
return (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(selector);
|
|
765
768
|
};
|
|
766
769
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
767
770
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
768
771
|
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
769
772
|
} else {
|
|
770
773
|
baseToolbar.getDomRef = function () {
|
|
771
|
-
var _mediaPluginState$
|
|
774
|
+
var _mediaPluginState$ele3;
|
|
772
775
|
// Ignored via go/ees005
|
|
773
776
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
774
|
-
var element = (_mediaPluginState$
|
|
777
|
+
var element = (_mediaPluginState$ele3 = mediaPluginState.element) === null || _mediaPluginState$ele3 === void 0 ? void 0 : _mediaPluginState$ele3.querySelector(".".concat(MediaSingleNodeSelector));
|
|
775
778
|
return element || mediaPluginState.element;
|
|
776
779
|
};
|
|
777
780
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.22",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -129,6 +129,9 @@
|
|
|
129
129
|
"platform_editor_react18_phase2__media_single": {
|
|
130
130
|
"type": "boolean"
|
|
131
131
|
},
|
|
132
|
+
"platform_editor_react18_phase2__media_single_jira": {
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
},
|
|
132
135
|
"platform_media_cross_client_copy": {
|
|
133
136
|
"type": "boolean"
|
|
134
137
|
},
|
|
@@ -176,6 +179,9 @@
|
|
|
176
179
|
},
|
|
177
180
|
"platform_editor_remove_media_inline_feature_flag": {
|
|
178
181
|
"type": "boolean"
|
|
182
|
+
},
|
|
183
|
+
"platform_editor_media_single_toolbar_target": {
|
|
184
|
+
"type": "boolean"
|
|
179
185
|
}
|
|
180
186
|
},
|
|
181
187
|
"stricter": {
|