@atlaskit/editor-plugin-media 10.0.9 → 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 CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 10.0.9
4
12
 
5
13
  ### 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 && (0, _expValEquals.expValEquals)('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? undefined : onMediaSingleClicked,
479
+ onClick: notIos ? undefined : onMediaSingleClicked,
483
480
  onKeyDown: notIos ? undefined : onMediaSingleKeyDown
484
481
  }, (0, _react2.jsx)(_mediaSingle.MediaBadges, {
485
482
  mediaElement: currentMediaElement(),
@@ -357,11 +357,7 @@ var ImageBorder = function ImageBorder(_ref) {
357
357
  forcePlacement: true,
358
358
  stick: true
359
359
  }, (0, _react2.jsx)("div", {
360
- onMouseLeave: (0, _expValEquals.expValEquals)('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? undefined : function () {
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: (0, _expValEquals.expValEquals)('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? 'none' : undefined
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: (0, _expValEquals.expValEquals)('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? 'none' : undefined
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 && expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? undefined : onMediaSingleClicked,
439
+ onClick: notIos ? undefined : onMediaSingleClicked,
443
440
  onKeyDown: notIos ? undefined : onMediaSingleKeyDown
444
441
  }, jsx(MediaBadges, {
445
442
  mediaElement: currentMediaElement(),
@@ -328,11 +328,7 @@ const ImageBorder = ({
328
328
  forcePlacement: true,
329
329
  stick: true
330
330
  }, jsx("div", {
331
- onMouseLeave: expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? undefined : () => {
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: expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? 'none' : undefined
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: expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? 'none' : undefined
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 && expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? undefined : onMediaSingleClicked,
473
+ onClick: notIos ? undefined : onMediaSingleClicked,
477
474
  onKeyDown: notIos ? undefined : onMediaSingleKeyDown
478
475
  }, jsx(MediaBadges, {
479
476
  mediaElement: currentMediaElement(),
@@ -349,11 +349,7 @@ var ImageBorder = function ImageBorder(_ref) {
349
349
  forcePlacement: true,
350
350
  stick: true
351
351
  }, jsx("div", {
352
- onMouseLeave: expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? undefined : function () {
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: expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? 'none' : undefined
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: expValEquals('platform_editor_eslint_suppression_fix', 'isEnabled', true) ? 'none' : undefined
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.9",
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": "^41.0.0",
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.6.0",
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",