@atlaskit/editor-plugin-media 10.0.8 → 10.0.10
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 +14 -0
- package/dist/cjs/nodeviews/mediaSingleNext.js +1 -4
- package/dist/cjs/ui/ImageBorder/index.js +5 -9
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +4 -11
- package/dist/es2019/nodeviews/mediaSingleNext.js +1 -4
- package/dist/es2019/ui/ImageBorder/index.js +5 -9
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +4 -11
- package/dist/esm/nodeviews/mediaSingleNext.js +1 -4
- package/dist/esm/ui/ImageBorder/index.js +5 -9
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +4 -11
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 10.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`46ff42199054d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/46ff42199054d) -
|
|
8
|
+
Cleans up experiment platform_editor_eslint_suppression_fix
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 10.0.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 10.0.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -448,9 +448,6 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
448
448
|
(_captionPlaceHolderRe = captionPlaceHolderRef.current) === null || _captionPlaceHolderRe === void 0 || _captionPlaceHolderRe.click();
|
|
449
449
|
}, [mediaSingleWrapperRef, captionPlaceHolderRef]);
|
|
450
450
|
var onMediaSingleKeyDown = _react.default.useCallback(function (event) {
|
|
451
|
-
if (!(0, _expValEquals.expValEquals)('platform_editor_eslint_suppression_fix', 'isEnabled', true)) {
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
451
|
if (mediaSingleWrapperRef.current !== event.target) {
|
|
455
452
|
return;
|
|
456
453
|
}
|
|
@@ -479,7 +476,7 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
479
476
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
480
477
|
,
|
|
481
478
|
className: _styles.MediaSingleNodeSelector,
|
|
482
|
-
onClick: notIos
|
|
479
|
+
onClick: notIos ? undefined : onMediaSingleClicked,
|
|
483
480
|
onKeyDown: notIos ? undefined : onMediaSingleKeyDown
|
|
484
481
|
}, (0, _react2.jsx)(_mediaSingle.MediaBadges, {
|
|
485
482
|
mediaElement: currentMediaElement(),
|
|
@@ -144,9 +144,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
144
144
|
type: "button",
|
|
145
145
|
"aria-label": formatMessage(_media.imageBorderMessages.borderColorDropdownAriaLabel),
|
|
146
146
|
"data-testid": "image-border-dropdown-button-color",
|
|
147
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
|
|
147
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
|
|
148
148
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
149
|
-
|
|
149
|
+
_styles2.dropdownOptionButton,
|
|
150
150
|
"aria-expanded": isColorSubmenuOpen,
|
|
151
151
|
onKeyDown: function onKeyDown(e) {
|
|
152
152
|
return handleTriggerByKeyboard(e, function () {
|
|
@@ -210,9 +210,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
210
210
|
type: "button",
|
|
211
211
|
"aria-label": formatMessage(_media.imageBorderMessages.borderSizeDropdownAriaLabel),
|
|
212
212
|
"data-testid": "image-border-dropdown-button-size",
|
|
213
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
|
|
213
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
|
|
214
214
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
215
|
-
|
|
215
|
+
_styles2.dropdownOptionButton,
|
|
216
216
|
"aria-expanded": isSizeSubmenuOpen,
|
|
217
217
|
ref: dropDownSizeOptionButton,
|
|
218
218
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -357,11 +357,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
357
357
|
forcePlacement: true,
|
|
358
358
|
stick: true
|
|
359
359
|
}, (0, _react2.jsx)("div", {
|
|
360
|
-
|
|
361
|
-
setIsColorSubmenuOpen(false);
|
|
362
|
-
setIsSizeSubmenuOpen(false);
|
|
363
|
-
}
|
|
364
|
-
/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */,
|
|
360
|
+
/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */
|
|
365
361
|
css: _styles2.dropdownWrapper
|
|
366
362
|
}, (0, _react2.jsx)(_uiMenu.DropdownMenu
|
|
367
363
|
//This needs be removed when the a11y is completely handled
|
|
@@ -9,7 +9,6 @@ exports.MediaViewerContainer = void 0;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _isType = require("../../pm-plugins/utils/is-type");
|
|
15
14
|
var _utils = require("../../ui/toolbar/utils");
|
|
@@ -54,22 +53,16 @@ var MediaViewerContainer = exports.MediaViewerContainer = function MediaViewerCo
|
|
|
54
53
|
};
|
|
55
54
|
var isVideoMedia = (0, _isType.isVideo)((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
56
55
|
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && (0, _experiments.editorExperiment)('platform_editor_controls', 'control');
|
|
57
|
-
return (0, _react2.jsx)(_react.Fragment, null, isEditorViewMode ? (0, _react2.jsx)(_react.Fragment, null, isInline ?
|
|
58
|
-
// remove eslint disable when platform_editor_eslint_suppression_fix has been cleaned up
|
|
59
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
60
|
-
(0, _react2.jsx)("span", {
|
|
56
|
+
return (0, _react2.jsx)(_react.Fragment, null, isEditorViewMode ? (0, _react2.jsx)(_react.Fragment, null, isInline ? (0, _react2.jsx)("span", {
|
|
61
57
|
onClick: showMediaViewer,
|
|
62
58
|
css: interactiveStyles,
|
|
63
59
|
"data-testid": mediaViewerContainerTestID,
|
|
64
|
-
role:
|
|
65
|
-
}, children) :
|
|
66
|
-
// remove eslint disable when platform_editor_eslint_suppression_fix has been cleaned up
|
|
67
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
68
|
-
(0, _react2.jsx)("div", {
|
|
60
|
+
role: "none"
|
|
61
|
+
}, children) : (0, _react2.jsx)("div", {
|
|
69
62
|
onClick: showMediaViewer,
|
|
70
63
|
css: interactiveStyles,
|
|
71
64
|
"data-testid": mediaViewerContainerTestID,
|
|
72
|
-
role:
|
|
65
|
+
role: "none"
|
|
73
66
|
}, children), shouldShowViewer && (0, _react2.jsx)(_PortalWrapper.RenderMediaViewer, {
|
|
74
67
|
selectedNodeAttrs: selectedNodeAttrs,
|
|
75
68
|
mediaClientConfig: mediaClientConfig,
|
|
@@ -408,9 +408,6 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
408
408
|
(_captionPlaceHolderRe = captionPlaceHolderRef.current) === null || _captionPlaceHolderRe === void 0 ? void 0 : _captionPlaceHolderRe.click();
|
|
409
409
|
}, [mediaSingleWrapperRef, captionPlaceHolderRef]);
|
|
410
410
|
const onMediaSingleKeyDown = React.useCallback(event => {
|
|
411
|
-
if (!expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true)) {
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
411
|
if (mediaSingleWrapperRef.current !== event.target) {
|
|
415
412
|
return;
|
|
416
413
|
}
|
|
@@ -439,7 +436,7 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
439
436
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
440
437
|
,
|
|
441
438
|
className: MediaSingleNodeSelector,
|
|
442
|
-
onClick: notIos
|
|
439
|
+
onClick: notIos ? undefined : onMediaSingleClicked,
|
|
443
440
|
onKeyDown: notIos ? undefined : onMediaSingleKeyDown
|
|
444
441
|
}, jsx(MediaBadges, {
|
|
445
442
|
mediaElement: currentMediaElement(),
|
|
@@ -126,9 +126,9 @@ const ImageBorder = ({
|
|
|
126
126
|
type: "button",
|
|
127
127
|
"aria-label": formatMessage(messages.borderColorDropdownAriaLabel),
|
|
128
128
|
"data-testid": "image-border-dropdown-button-color",
|
|
129
|
-
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
|
|
129
|
+
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
|
|
130
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
131
|
-
|
|
131
|
+
dropdownOptionButton,
|
|
132
132
|
"aria-expanded": isColorSubmenuOpen,
|
|
133
133
|
onKeyDown: e => handleTriggerByKeyboard(e, () => setIsColorSubmenuOpen(!isColorSubmenuOpen))
|
|
134
134
|
}, jsx(Text, null, formatMessage(messages.borderColor)), jsx("div", {
|
|
@@ -188,9 +188,9 @@ const ImageBorder = ({
|
|
|
188
188
|
type: "button",
|
|
189
189
|
"aria-label": formatMessage(messages.borderSizeDropdownAriaLabel),
|
|
190
190
|
"data-testid": "image-border-dropdown-button-size",
|
|
191
|
-
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
|
|
191
|
+
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
|
|
192
192
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
193
|
-
|
|
193
|
+
dropdownOptionButton,
|
|
194
194
|
"aria-expanded": isSizeSubmenuOpen,
|
|
195
195
|
ref: dropDownSizeOptionButton,
|
|
196
196
|
onKeyDown: e => handleTriggerByKeyboard(e, () => setIsSizeSubmenuOpen(!isSizeSubmenuOpen))
|
|
@@ -328,11 +328,7 @@ const ImageBorder = ({
|
|
|
328
328
|
forcePlacement: true,
|
|
329
329
|
stick: true
|
|
330
330
|
}, jsx("div", {
|
|
331
|
-
|
|
332
|
-
setIsColorSubmenuOpen(false);
|
|
333
|
-
setIsSizeSubmenuOpen(false);
|
|
334
|
-
}
|
|
335
|
-
/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */,
|
|
331
|
+
/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */
|
|
336
332
|
css: dropdownWrapper
|
|
337
333
|
}, jsx(DropdownMenu
|
|
338
334
|
//This needs be removed when the a11y is completely handled
|
|
@@ -6,7 +6,6 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
10
|
import { isVideo } from '../../pm-plugins/utils/is-type';
|
|
12
11
|
import { getSelectedNearestMediaContainerNodeAttrsFunction } from '../../ui/toolbar/utils';
|
|
@@ -38,22 +37,16 @@ export const MediaViewerContainer = ({
|
|
|
38
37
|
};
|
|
39
38
|
const isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
40
39
|
const shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && editorExperiment('platform_editor_controls', 'control');
|
|
41
|
-
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ?
|
|
42
|
-
// remove eslint disable when platform_editor_eslint_suppression_fix has been cleaned up
|
|
43
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
44
|
-
jsx("span", {
|
|
40
|
+
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ? jsx("span", {
|
|
45
41
|
onClick: showMediaViewer,
|
|
46
42
|
css: interactiveStyles,
|
|
47
43
|
"data-testid": mediaViewerContainerTestID,
|
|
48
|
-
role:
|
|
49
|
-
}, children) :
|
|
50
|
-
// remove eslint disable when platform_editor_eslint_suppression_fix has been cleaned up
|
|
51
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
52
|
-
jsx("div", {
|
|
44
|
+
role: "none"
|
|
45
|
+
}, children) : jsx("div", {
|
|
53
46
|
onClick: showMediaViewer,
|
|
54
47
|
css: interactiveStyles,
|
|
55
48
|
"data-testid": mediaViewerContainerTestID,
|
|
56
|
-
role:
|
|
49
|
+
role: "none"
|
|
57
50
|
}, children), shouldShowViewer && jsx(RenderMediaViewer, {
|
|
58
51
|
selectedNodeAttrs: selectedNodeAttrs,
|
|
59
52
|
mediaClientConfig: mediaClientConfig,
|
|
@@ -442,9 +442,6 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
442
442
|
(_captionPlaceHolderRe = captionPlaceHolderRef.current) === null || _captionPlaceHolderRe === void 0 || _captionPlaceHolderRe.click();
|
|
443
443
|
}, [mediaSingleWrapperRef, captionPlaceHolderRef]);
|
|
444
444
|
var onMediaSingleKeyDown = React.useCallback(function (event) {
|
|
445
|
-
if (!expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true)) {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
445
|
if (mediaSingleWrapperRef.current !== event.target) {
|
|
449
446
|
return;
|
|
450
447
|
}
|
|
@@ -473,7 +470,7 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
473
470
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
474
471
|
,
|
|
475
472
|
className: MediaSingleNodeSelector,
|
|
476
|
-
onClick: notIos
|
|
473
|
+
onClick: notIos ? undefined : onMediaSingleClicked,
|
|
477
474
|
onKeyDown: notIos ? undefined : onMediaSingleKeyDown
|
|
478
475
|
}, jsx(MediaBadges, {
|
|
479
476
|
mediaElement: currentMediaElement(),
|
|
@@ -136,9 +136,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
136
136
|
type: "button",
|
|
137
137
|
"aria-label": formatMessage(messages.borderColorDropdownAriaLabel),
|
|
138
138
|
"data-testid": "image-border-dropdown-button-color",
|
|
139
|
-
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
|
|
139
|
+
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
|
|
140
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
141
|
-
|
|
141
|
+
dropdownOptionButton,
|
|
142
142
|
"aria-expanded": isColorSubmenuOpen,
|
|
143
143
|
onKeyDown: function onKeyDown(e) {
|
|
144
144
|
return handleTriggerByKeyboard(e, function () {
|
|
@@ -202,9 +202,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
202
202
|
type: "button",
|
|
203
203
|
"aria-label": formatMessage(messages.borderSizeDropdownAriaLabel),
|
|
204
204
|
"data-testid": "image-border-dropdown-button-size",
|
|
205
|
-
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
|
|
205
|
+
css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
|
|
206
206
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
207
|
-
|
|
207
|
+
dropdownOptionButton,
|
|
208
208
|
"aria-expanded": isSizeSubmenuOpen,
|
|
209
209
|
ref: dropDownSizeOptionButton,
|
|
210
210
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -349,11 +349,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
349
349
|
forcePlacement: true,
|
|
350
350
|
stick: true
|
|
351
351
|
}, jsx("div", {
|
|
352
|
-
|
|
353
|
-
setIsColorSubmenuOpen(false);
|
|
354
|
-
setIsSizeSubmenuOpen(false);
|
|
355
|
-
}
|
|
356
|
-
/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */,
|
|
352
|
+
/* eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */
|
|
357
353
|
css: dropdownWrapper
|
|
358
354
|
}, jsx(DropdownMenu
|
|
359
355
|
//This needs be removed when the a11y is completely handled
|
|
@@ -7,7 +7,6 @@ import React, { Fragment, useEffect, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
11
|
import { isVideo } from '../../pm-plugins/utils/is-type';
|
|
13
12
|
import { getSelectedNearestMediaContainerNodeAttrsFunction } from '../../ui/toolbar/utils';
|
|
@@ -44,22 +43,16 @@ export var MediaViewerContainer = function MediaViewerContainer(_ref) {
|
|
|
44
43
|
};
|
|
45
44
|
var isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
46
45
|
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && editorExperiment('platform_editor_controls', 'control');
|
|
47
|
-
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ?
|
|
48
|
-
// remove eslint disable when platform_editor_eslint_suppression_fix has been cleaned up
|
|
49
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
50
|
-
jsx("span", {
|
|
46
|
+
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ? jsx("span", {
|
|
51
47
|
onClick: showMediaViewer,
|
|
52
48
|
css: interactiveStyles,
|
|
53
49
|
"data-testid": mediaViewerContainerTestID,
|
|
54
|
-
role:
|
|
55
|
-
}, children) :
|
|
56
|
-
// remove eslint disable when platform_editor_eslint_suppression_fix has been cleaned up
|
|
57
|
-
// eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
|
|
58
|
-
jsx("div", {
|
|
50
|
+
role: "none"
|
|
51
|
+
}, children) : jsx("div", {
|
|
59
52
|
onClick: showMediaViewer,
|
|
60
53
|
css: interactiveStyles,
|
|
61
54
|
"data-testid": mediaViewerContainerTestID,
|
|
62
|
-
role:
|
|
55
|
+
role: "none"
|
|
63
56
|
}, children), shouldShowViewer && jsx(RenderMediaViewer, {
|
|
64
57
|
selectedNodeAttrs: selectedNodeAttrs,
|
|
65
58
|
mediaClientConfig: mediaClientConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.10",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/primitives": "^18.0.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.2.0",
|
|
68
68
|
"@atlaskit/theme": "^22.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^42.0.0",
|
|
70
70
|
"@atlaskit/tokens": "^11.1.0",
|
|
71
71
|
"@atlaskit/tooltip": "^21.0.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"uuid": "^3.1.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@atlaskit/editor-common": "^112.
|
|
81
|
+
"@atlaskit/editor-common": "^112.7.0",
|
|
82
82
|
"@atlaskit/media-core": "^37.0.0",
|
|
83
83
|
"react": "^18.2.0",
|
|
84
84
|
"react-dom": "^18.2.0",
|