@atlaskit/editor-plugin-media 8.0.1 → 8.1.1

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,25 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 8.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bb3c94399895a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bb3c94399895a) -
8
+ [CONFCLOUD-82847] Fixes a bug where users cannot delete the last media card in a filmstrip using
9
+ the delete button in the floating toolbar
10
+
11
+ ## 8.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`2e913b897ced3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e913b897ced3) -
16
+ [https://product-fabric.atlassian.net/browse/ED-29463](ED-29463) - clean up
17
+ platform_editor_media_card_vc_wrapper_attribute Statsig experiment
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 8.0.1
4
24
 
5
25
  ### Patch Changes
@@ -19,7 +19,6 @@ var _providerFactory = require("@atlaskit/editor-common/provider-factory");
19
19
  var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
20
20
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
21
21
  var _utils = require("@atlaskit/editor-common/utils");
22
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
22
  var _main = require("../pm-plugins/main");
24
23
  var _mediaSingleNext = require("./mediaSingleNext");
25
24
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -144,9 +143,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
144
143
  if ((_this$reactComponentP2 = this.reactComponentProps.mediaOptions) !== null && _this$reactComponentP2 !== void 0 && _this$reactComponentP2.allowPixelResizing) {
145
144
  domRef.classList.add('media-extended-resize-experience');
146
145
  }
147
- if ((0, _expValEquals.expValEquals)('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true)) {
148
- domRef.setAttribute('data-media-vc-wrapper', 'true');
149
- }
146
+ domRef.setAttribute('data-media-vc-wrapper', 'true');
150
147
  return domRef;
151
148
  }
152
149
  }, {
@@ -466,7 +466,7 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
466
466
  };
467
467
  }, [widthType, mediaSingleWidthAttribute]);
468
468
  var MediaChildren =
469
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
469
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
470
470
  (0, _react2.jsx)("figure", {
471
471
  ref: mediaSingleWrapperRef,
472
472
  css: figureWrapperStyles
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
11
11
  var _colors = require("@atlaskit/theme/colors");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
13
  var _toDOMAttrs = require("./toDOMAttrs");
15
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -191,9 +190,10 @@ var getToDom = exports.getToDom = function getToDom(allowPixelResizing) {
191
190
  childMediaWidth: childMediaWidth,
192
191
  mediaSingleDimensionWidth: mediaSingleAttrs === null || mediaSingleAttrs === void 0 ? void 0 : mediaSingleAttrs.width
193
192
  });
194
- return ['div', _objectSpread({
193
+ return ['div', {
195
194
  class: 'mediaSingleView-content-wrap',
196
195
  layout: layout,
196
+ 'data-media-vc-wrapper': 'true',
197
197
  style: (0, _lazyNodeView.convertToInlineCss)({
198
198
  '--ak-editor-media-single--proportion': proportionCalc,
199
199
  '--ak-editor-media-card-display': 'block',
@@ -206,9 +206,7 @@ var getToDom = exports.getToDom = function getToDom(allowPixelResizing) {
206
206
  marginLeft: isMediaWrapped ? layout === 'wrap-left' ? 'auto' : HALF_GUTTER_SIZE : 0,
207
207
  width: contentWrapperWidth
208
208
  })
209
- }, (0, _expValEquals.expValEquals)('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true) ? {
210
- 'data-media-vc-wrapper': 'true'
211
- } : {}), content];
209
+ }, content];
212
210
  };
213
211
  };
214
212
 
@@ -42,7 +42,7 @@ var CaptionPlaceholder = exports.CaptionPlaceholder = /*#__PURE__*/_react.defaul
42
42
  // This issue is a temporary fix for users being able to edit captions on edge browsers. This will be removed
43
43
  // replaced with CaptionPlaceholderButton in the near future and this code can be removed.
44
44
  return (
45
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
45
+ // eslint-disable-next-line @atlaskit/design-system/use-primitives-text, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/no-static-element-interactions
46
46
  (0, _react2.jsx)("span", {
47
47
  ref: ref,
48
48
  css: placeholder,
@@ -54,13 +54,13 @@ var MediaViewerContainer = exports.MediaViewerContainer = function MediaViewerCo
54
54
  var isVideoMedia = (0, _isType.isVideo)((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
55
55
  var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && (0, _experiments.editorExperiment)('platform_editor_controls', 'control');
56
56
  return (0, _react2.jsx)(_react.Fragment, null, isEditorViewMode ? (0, _react2.jsx)(_react.Fragment, null, isInline ?
57
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
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
58
  (0, _react2.jsx)("span", {
59
59
  onClick: showMediaViewer,
60
60
  css: interactiveStyles,
61
61
  "data-testid": mediaViewerContainerTestID
62
62
  }, children) :
63
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
63
+ // eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
64
64
  (0, _react2.jsx)("div", {
65
65
  onClick: showMediaViewer,
66
66
  css: interactiveStyles,
@@ -814,7 +814,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
814
814
  items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
815
815
  }
816
816
  if (!mediaPluginState.isResizing && (0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar))) {
817
- var _pluginInjectionApi$a0, _pluginInjectionApi$a1;
817
+ var _pluginInjectionApi$a0, _pluginInjectionApi$a1, _pluginInjectionApi$a10;
818
818
  (0, _utils2.updateToFullHeightSeparator)(items);
819
819
  var customOptions = [].concat((0, _toConsumableArray2.default)((0, _linking3.getLinkingDropdownOptions)(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly)), (0, _toConsumableArray2.default)((0, _altText2.getAltTextDropdownOption)(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a0 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a0 === void 0 ? void 0 : _pluginInjectionApi$a0.actions)), (0, _toConsumableArray2.default)((0, _pixelResizing2.getResizeDropdownOption)(options, state, intl.formatMessage, selectedNodeType)));
820
820
  if (customOptions.length) {
@@ -847,7 +847,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
847
847
  })
848
848
  }, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
849
849
  title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(_messages.default.delete),
850
- onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a1 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a1 === void 0 ? void 0 : _pluginInjectionApi$a1.actions, selectedNodeType),
850
+ onClick: (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup && (0, _platformFeatureFlags.fg)('platform_editor_fix_media_card_removal') ? handleRemoveMediaGroupWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a1 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a1 === void 0 ? void 0 : _pluginInjectionApi$a1.actions) : removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, selectedNodeType),
851
851
  icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
852
852
  label: ""
853
853
  })
@@ -13,7 +13,6 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
13
13
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
14
14
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
15
15
  import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
16
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
18
17
  import { MediaSingleNodeNext } from './mediaSingleNext';
19
18
  const selector = states => {
@@ -122,9 +121,7 @@ class MediaSingleNodeView extends ReactNodeView {
122
121
  if ((_this$reactComponentP4 = this.reactComponentProps.mediaOptions) !== null && _this$reactComponentP4 !== void 0 && _this$reactComponentP4.allowPixelResizing) {
123
122
  domRef.classList.add('media-extended-resize-experience');
124
123
  }
125
- if (expValEquals('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true)) {
126
- domRef.setAttribute('data-media-vc-wrapper', 'true');
127
- }
124
+ domRef.setAttribute('data-media-vc-wrapper', 'true');
128
125
  return domRef;
129
126
  }
130
127
  getContentDOM() {
@@ -428,7 +428,7 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
428
428
  };
429
429
  }, [widthType, mediaSingleWidthAttribute]);
430
430
  const MediaChildren =
431
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
431
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
432
432
  jsx("figure", {
433
433
  ref: mediaSingleWrapperRef,
434
434
  css: figureWrapperStyles
@@ -1,7 +1,6 @@
1
1
  import { mediaSingleSpec } from '@atlaskit/adf-schema';
2
2
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
3
3
  import { N20, N50 } from '@atlaskit/theme/colors';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
7
6
  const WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
@@ -189,6 +188,7 @@ export const getToDom = allowPixelResizing => node => {
189
188
  return ['div', {
190
189
  class: 'mediaSingleView-content-wrap',
191
190
  layout,
191
+ 'data-media-vc-wrapper': 'true',
192
192
  style: convertToInlineCss({
193
193
  '--ak-editor-media-single--proportion': proportionCalc,
194
194
  '--ak-editor-media-card-display': 'block',
@@ -200,10 +200,7 @@ export const getToDom = allowPixelResizing => node => {
200
200
  marginRight: isMediaWrapped ? layout === 'wrap-right' ? 'auto' : HALF_GUTTER_SIZE : 0,
201
201
  marginLeft: isMediaWrapped ? layout === 'wrap-left' ? 'auto' : HALF_GUTTER_SIZE : 0,
202
202
  width: contentWrapperWidth
203
- }),
204
- ...(expValEquals('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true) ? {
205
- 'data-media-vc-wrapper': 'true'
206
- } : {})
203
+ })
207
204
  }, content];
208
205
  };
209
206
 
@@ -39,7 +39,7 @@ export const CaptionPlaceholder = /*#__PURE__*/React.forwardRef(({
39
39
  // This issue is a temporary fix for users being able to edit captions on edge browsers. This will be removed
40
40
  // replaced with CaptionPlaceholderButton in the near future and this code can be removed.
41
41
  return (
42
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
42
+ // eslint-disable-next-line @atlaskit/design-system/use-primitives-text, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/no-static-element-interactions
43
43
  jsx("span", {
44
44
  ref: ref,
45
45
  css: placeholder,
@@ -38,13 +38,13 @@ export const MediaViewerContainer = ({
38
38
  const isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
39
39
  const shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && editorExperiment('platform_editor_controls', 'control');
40
40
  return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ?
41
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
41
+ // eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
42
42
  jsx("span", {
43
43
  onClick: showMediaViewer,
44
44
  css: interactiveStyles,
45
45
  "data-testid": mediaViewerContainerTestID
46
46
  }, children) :
47
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
47
+ // eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
48
48
  jsx("div", {
49
49
  onClick: showMediaViewer,
50
50
  css: interactiveStyles,
@@ -816,7 +816,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
816
816
  items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
817
817
  }
818
818
  if (!mediaPluginState.isResizing && areToolbarFlagsEnabled(Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar))) {
819
- var _pluginInjectionApi$a0, _pluginInjectionApi$a1;
819
+ var _pluginInjectionApi$a0, _pluginInjectionApi$a1, _pluginInjectionApi$a10;
820
820
  updateToFullHeightSeparator(items);
821
821
  const customOptions = [...getLinkingDropdownOptions(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly), ...getAltTextDropdownOption(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a0 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a0 === void 0 ? void 0 : _pluginInjectionApi$a0.actions), ...getResizeDropdownOption(options, state, intl.formatMessage, selectedNodeType)];
822
822
  if (customOptions.length) {
@@ -848,7 +848,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
848
848
  ...hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)
849
849
  }, {
850
850
  title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
851
- onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a1 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a1 === void 0 ? void 0 : _pluginInjectionApi$a1.actions, selectedNodeType),
851
+ onClick: (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup && fg('platform_editor_fix_media_card_removal') ? handleRemoveMediaGroupWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a1 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a1 === void 0 ? void 0 : _pluginInjectionApi$a1.actions) : removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, selectedNodeType),
852
852
  icon: /*#__PURE__*/React.createElement(DeleteIcon, {
853
853
  label: ""
854
854
  }),
@@ -22,7 +22,6 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
22
22
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
23
23
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
24
24
  import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
25
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
26
25
  import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
27
26
  import { MediaSingleNodeNext } from './mediaSingleNext';
28
27
  var selector = function selector(states) {
@@ -140,9 +139,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
140
139
  if ((_this$reactComponentP2 = this.reactComponentProps.mediaOptions) !== null && _this$reactComponentP2 !== void 0 && _this$reactComponentP2.allowPixelResizing) {
141
140
  domRef.classList.add('media-extended-resize-experience');
142
141
  }
143
- if (expValEquals('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true)) {
144
- domRef.setAttribute('data-media-vc-wrapper', 'true');
145
- }
142
+ domRef.setAttribute('data-media-vc-wrapper', 'true');
146
143
  return domRef;
147
144
  }
148
145
  }, {
@@ -460,7 +460,7 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
460
460
  };
461
461
  }, [widthType, mediaSingleWidthAttribute]);
462
462
  var MediaChildren =
463
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, @atlassian/a11y/no-noninteractive-element-interactions
463
+ // eslint-disable-next-line @atlassian/a11y/no-noninteractive-element-interactions, @atlassian/a11y/click-events-have-key-events
464
464
  jsx("figure", {
465
465
  ref: mediaSingleWrapperRef,
466
466
  css: figureWrapperStyles
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { mediaSingleSpec } from '@atlaskit/adf-schema';
5
5
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
6
6
  import { N20, N50 } from '@atlaskit/theme/colors';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
10
9
  var WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
@@ -184,9 +183,10 @@ export var getToDom = function getToDom(allowPixelResizing) {
184
183
  childMediaWidth: childMediaWidth,
185
184
  mediaSingleDimensionWidth: mediaSingleAttrs === null || mediaSingleAttrs === void 0 ? void 0 : mediaSingleAttrs.width
186
185
  });
187
- return ['div', _objectSpread({
186
+ return ['div', {
188
187
  class: 'mediaSingleView-content-wrap',
189
188
  layout: layout,
189
+ 'data-media-vc-wrapper': 'true',
190
190
  style: convertToInlineCss({
191
191
  '--ak-editor-media-single--proportion': proportionCalc,
192
192
  '--ak-editor-media-card-display': 'block',
@@ -199,9 +199,7 @@ export var getToDom = function getToDom(allowPixelResizing) {
199
199
  marginLeft: isMediaWrapped ? layout === 'wrap-left' ? 'auto' : HALF_GUTTER_SIZE : 0,
200
200
  width: contentWrapperWidth
201
201
  })
202
- }, expValEquals('platform_editor_media_card_vc_wrapper_attribute', 'isEnabled', true) ? {
203
- 'data-media-vc-wrapper': 'true'
204
- } : {}), content];
202
+ }, content];
205
203
  };
206
204
  };
207
205
 
@@ -34,7 +34,7 @@ export var CaptionPlaceholder = /*#__PURE__*/React.forwardRef(function (_ref, re
34
34
  // This issue is a temporary fix for users being able to edit captions on edge browsers. This will be removed
35
35
  // replaced with CaptionPlaceholderButton in the near future and this code can be removed.
36
36
  return (
37
- // eslint-disable-next-line @atlaskit/design-system/use-primitives-text, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
37
+ // eslint-disable-next-line @atlaskit/design-system/use-primitives-text, @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/no-static-element-interactions
38
38
  jsx("span", {
39
39
  ref: ref,
40
40
  css: placeholder,
@@ -44,13 +44,13 @@ export var MediaViewerContainer = function MediaViewerContainer(_ref) {
44
44
  var isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
45
45
  var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && editorExperiment('platform_editor_controls', 'control');
46
46
  return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ?
47
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
47
+ // eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
48
48
  jsx("span", {
49
49
  onClick: showMediaViewer,
50
50
  css: interactiveStyles,
51
51
  "data-testid": mediaViewerContainerTestID
52
52
  }, children) :
53
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
53
+ // eslint-disable-next-line @atlassian/a11y/click-events-have-key-events, @atlassian/a11y/interactive-element-not-keyboard-focusable, @atlassian/a11y/no-static-element-interactions
54
54
  jsx("div", {
55
55
  onClick: showMediaViewer,
56
56
  css: interactiveStyles,
@@ -805,7 +805,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
805
805
  items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
806
806
  }
807
807
  if (!mediaPluginState.isResizing && areToolbarFlagsEnabled(Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar))) {
808
- var _pluginInjectionApi$a0, _pluginInjectionApi$a1;
808
+ var _pluginInjectionApi$a0, _pluginInjectionApi$a1, _pluginInjectionApi$a10;
809
809
  updateToFullHeightSeparator(items);
810
810
  var customOptions = [].concat(_toConsumableArray(getLinkingDropdownOptions(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly)), _toConsumableArray(getAltTextDropdownOption(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a0 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a0 === void 0 ? void 0 : _pluginInjectionApi$a0.actions)), _toConsumableArray(getResizeDropdownOption(options, state, intl.formatMessage, selectedNodeType)));
811
811
  if (customOptions.length) {
@@ -838,7 +838,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
838
838
  })
839
839
  }, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)), _objectSpread({
840
840
  title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
841
- onClick: removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a1 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a1 === void 0 ? void 0 : _pluginInjectionApi$a1.actions, selectedNodeType),
841
+ onClick: (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup && fg('platform_editor_fix_media_card_removal') ? handleRemoveMediaGroupWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a1 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a1 === void 0 ? void 0 : _pluginInjectionApi$a1.actions) : removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, selectedNodeType),
842
842
  icon: /*#__PURE__*/React.createElement(DeleteIcon, {
843
843
  label: ""
844
844
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "8.0.1",
3
+ "version": "8.1.1",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,30 +32,30 @@
32
32
  "@atlaskit/adf-schema": "^51.2.0",
33
33
  "@atlaskit/analytics-namespaced-context": "^7.1.0",
34
34
  "@atlaskit/analytics-next": "^11.1.0",
35
- "@atlaskit/button": "^23.4.0",
35
+ "@atlaskit/button": "^23.5.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^6.1.0",
38
38
  "@atlaskit/editor-plugin-annotation": "^6.1.0",
39
39
  "@atlaskit/editor-plugin-connectivity": "^6.0.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
41
- "@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
41
+ "@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
42
42
  "@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
43
- "@atlaskit/editor-plugin-floating-toolbar": "^8.1.0",
43
+ "@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",
44
44
  "@atlaskit/editor-plugin-focus": "^5.0.0",
45
45
  "@atlaskit/editor-plugin-grid": "^6.0.0",
46
46
  "@atlaskit/editor-plugin-guideline": "^6.0.0",
47
47
  "@atlaskit/editor-plugin-interaction": "^8.0.0",
48
- "@atlaskit/editor-plugin-selection": "^6.0.0",
49
- "@atlaskit/editor-plugin-toolbar": "^3.0.0",
48
+ "@atlaskit/editor-plugin-selection": "^6.1.0",
49
+ "@atlaskit/editor-plugin-toolbar": "^3.1.0",
50
50
  "@atlaskit/editor-plugin-width": "^7.0.0",
51
51
  "@atlaskit/editor-prosemirror": "7.0.0",
52
52
  "@atlaskit/editor-shared-styles": "^3.6.0",
53
53
  "@atlaskit/editor-tables": "^2.9.0",
54
54
  "@atlaskit/form": "^14.2.0",
55
- "@atlaskit/icon": "^28.3.0",
56
- "@atlaskit/icon-lab": "^5.8.0",
55
+ "@atlaskit/icon": "^28.5.0",
56
+ "@atlaskit/icon-lab": "^5.10.0",
57
57
  "@atlaskit/media-card": "^79.5.0",
58
- "@atlaskit/media-client": "^35.3.0",
58
+ "@atlaskit/media-client": "^35.5.0",
59
59
  "@atlaskit/media-client-react": "^4.1.0",
60
60
  "@atlaskit/media-common": "^12.3.0",
61
61
  "@atlaskit/media-filmstrip": "^51.0.0",
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/primitives": "^14.15.0",
67
67
  "@atlaskit/textfield": "^8.0.0",
68
68
  "@atlaskit/theme": "^21.0.0",
69
- "@atlaskit/tmp-editor-statsig": "^13.0.0",
69
+ "@atlaskit/tmp-editor-statsig": "^13.6.0",
70
70
  "@atlaskit/tokens": "^6.4.0",
71
71
  "@atlaskit/tooltip": "^20.5.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": "^110.4.0",
81
+ "@atlaskit/editor-common": "^110.9.0",
82
82
  "@atlaskit/media-core": "^37.0.0",
83
83
  "react": "^18.2.0",
84
84
  "react-dom": "^18.2.0",
@@ -162,6 +162,9 @@
162
162
  },
163
163
  "platform_media_video_captions": {
164
164
  "type": "boolean"
165
+ },
166
+ "platform_editor_fix_media_card_removal": {
167
+ "type": "boolean"
165
168
  }
166
169
  },
167
170
  "stricter": {