@atlaskit/editor-plugin-media 1.34.3 → 1.34.5

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,22 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 1.34.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9499e2f456edb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9499e2f456edb) -
8
+ [ED-24689] clean up `confluence.frontend.fabric.editor.comments-on-media-bug-fix`
9
+ - Updated dependencies
10
+
11
+ ## 1.34.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [#147206](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147206)
16
+ [`c3f82dfdeaf62`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c3f82dfdeaf62) -
17
+ [ED-25157] Make sure document inserted for media from the media insert plugin has the correct
18
+ attributes (insertMediaVia)
19
+
3
20
  ## 1.34.3
4
21
 
5
22
  ### Patch Changes
@@ -347,7 +347,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
347
347
  }, {
348
348
  key: "render",
349
349
  value: function render() {
350
- var _mediaOptions$getEdit, _pluginInjectionApi$m, _node$firstChild, _mediaOptions$getEdit2;
350
+ var _mediaOptions$getEdit, _pluginInjectionApi$m, _node$firstChild;
351
351
  var _this$props2 = this.props,
352
352
  selected = _this$props2.selected,
353
353
  getPos = _this$props2.getPos,
@@ -497,7 +497,6 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
497
497
  badgeSize: badgeSize
498
498
  }));
499
499
  }), !(0, _experiments.editorExperiment)('add-media-from-url', true) && commentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadge, {
500
- commentsOnMediaBugFixEnabled: mediaOptions === null || mediaOptions === void 0 || (_mediaOptions$getEdit2 = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit2 === void 0 || (_mediaOptions$getEdit2 = _mediaOptions$getEdit2.call(mediaOptions)) === null || _mediaOptions$getEdit2 === void 0 ? void 0 : _mediaOptions$getEdit2.commentsOnMediaBugFix,
501
500
  view: view,
502
501
  api: pluginInjectionApi,
503
502
  mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
@@ -64,9 +64,9 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref2) {
64
64
  return _main.stateKey.getState(editorState) || null;
65
65
  },
66
66
  actions: {
67
- insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, insertMediaVia) {
67
+ insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, isNestingInQuoteSupported, insertMediaVia) {
68
68
  var _api$analytics;
69
- return (0, _mediaSingle2.insertMediaAsMediaSingle)(view, node, inputMethod, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, insertMediaVia);
69
+ return (0, _mediaSingle2.insertMediaAsMediaSingle)(view, node, inputMethod, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isNestingInQuoteSupported, insertMediaVia);
70
70
  },
71
71
  setProvider: function setProvider(provider) {
72
72
  var _api$core$actions$exe;
@@ -21,8 +21,7 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
21
21
  getPos = _ref.getPos,
22
22
  intl = _ref.intl,
23
23
  isDrafting = _ref.isDrafting,
24
- badgeOffsetRight = _ref.badgeOffsetRight,
25
- commentsOnMediaBugFixEnabled = _ref.commentsOnMediaBugFixEnabled;
24
+ badgeOffsetRight = _ref.badgeOffsetRight;
26
25
  var _useState = (0, _react.useState)(false),
27
26
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
28
27
  entered = _useState2[0],
@@ -66,7 +65,6 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
66
65
  var maybeMediaSingleElement = view.domAtPos(pos + 1).node;
67
66
  var mediaSingleElement = maybeMediaSingleElement instanceof HTMLElement ? maybeMediaSingleElement : null;
68
67
  return /*#__PURE__*/_react.default.createElement(_mediaSingle.CommentBadge, {
69
- commentsOnMediaBugFixEnabled: commentsOnMediaBugFixEnabled,
70
68
  badgeOffsetRight: badgeOffsetRight,
71
69
  width: mediaNode.attrs.width,
72
70
  height: mediaNode.attrs.height,
@@ -251,7 +251,7 @@ export default class MediaSingleNode extends Component {
251
251
  }
252
252
  }
253
253
  render() {
254
- var _mediaOptions$getEdit, _pluginInjectionApi$m, _pluginInjectionApi$m2, _node$firstChild, _mediaOptions$getEdit2, _mediaOptions$getEdit3;
254
+ var _mediaOptions$getEdit, _pluginInjectionApi$m, _pluginInjectionApi$m2, _node$firstChild;
255
255
  const {
256
256
  selected,
257
257
  getPos,
@@ -414,7 +414,6 @@ export default class MediaSingleNode extends Component {
414
414
  isDrafting: isCurrentNodeDrafting,
415
415
  badgeSize: badgeSize
416
416
  }))), !editorExperiment('add-media-from-url', true) && commentsOnMedia && jsx(CommentBadge, {
417
- commentsOnMediaBugFixEnabled: mediaOptions === null || mediaOptions === void 0 ? void 0 : (_mediaOptions$getEdit2 = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit2 === void 0 ? void 0 : (_mediaOptions$getEdit3 = _mediaOptions$getEdit2.call(mediaOptions)) === null || _mediaOptions$getEdit3 === void 0 ? void 0 : _mediaOptions$getEdit3.commentsOnMediaBugFix,
418
417
  view: view,
419
418
  api: pluginInjectionApi,
420
419
  mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
@@ -59,9 +59,9 @@ export const mediaPlugin = ({
59
59
  return stateKey.getState(editorState) || null;
60
60
  },
61
61
  actions: {
62
- insertMediaAsMediaSingle: (view, node, inputMethod, insertMediaVia) => {
62
+ insertMediaAsMediaSingle: (view, node, inputMethod, isNestingInQuoteSupported, insertMediaVia) => {
63
63
  var _api$analytics;
64
- return insertMediaAsMediaSingle(view, node, inputMethod, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, insertMediaVia);
64
+ return insertMediaAsMediaSingle(view, node, inputMethod, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isNestingInQuoteSupported, insertMediaVia);
65
65
  },
66
66
  setProvider: provider => {
67
67
  var _api$core$actions$exe;
@@ -10,8 +10,7 @@ const CommentBadgeWrapper = ({
10
10
  getPos,
11
11
  intl,
12
12
  isDrafting,
13
- badgeOffsetRight,
14
- commentsOnMediaBugFixEnabled
13
+ badgeOffsetRight
15
14
  }) => {
16
15
  const [entered, setEntered] = useState(false);
17
16
  const {
@@ -59,7 +58,6 @@ const CommentBadgeWrapper = ({
59
58
  const maybeMediaSingleElement = view.domAtPos(pos + 1).node;
60
59
  const mediaSingleElement = maybeMediaSingleElement instanceof HTMLElement ? maybeMediaSingleElement : null;
61
60
  return /*#__PURE__*/React.createElement(CommentBadgeComponent, {
62
- commentsOnMediaBugFixEnabled: commentsOnMediaBugFixEnabled,
63
61
  badgeOffsetRight: badgeOffsetRight,
64
62
  width: mediaNode.attrs.width,
65
63
  height: mediaNode.attrs.height,
@@ -341,7 +341,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
341
341
  }, {
342
342
  key: "render",
343
343
  value: function render() {
344
- var _mediaOptions$getEdit, _pluginInjectionApi$m, _node$firstChild, _mediaOptions$getEdit2;
344
+ var _mediaOptions$getEdit, _pluginInjectionApi$m, _node$firstChild;
345
345
  var _this$props2 = this.props,
346
346
  selected = _this$props2.selected,
347
347
  getPos = _this$props2.getPos,
@@ -491,7 +491,6 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
491
491
  badgeSize: badgeSize
492
492
  }));
493
493
  }), !editorExperiment('add-media-from-url', true) && commentsOnMedia && jsx(CommentBadge, {
494
- commentsOnMediaBugFixEnabled: mediaOptions === null || mediaOptions === void 0 || (_mediaOptions$getEdit2 = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit2 === void 0 || (_mediaOptions$getEdit2 = _mediaOptions$getEdit2.call(mediaOptions)) === null || _mediaOptions$getEdit2 === void 0 ? void 0 : _mediaOptions$getEdit2.commentsOnMediaBugFix,
495
494
  view: view,
496
495
  api: pluginInjectionApi,
497
496
  mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
@@ -57,9 +57,9 @@ export var mediaPlugin = function mediaPlugin(_ref2) {
57
57
  return stateKey.getState(editorState) || null;
58
58
  },
59
59
  actions: {
60
- insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, insertMediaVia) {
60
+ insertMediaAsMediaSingle: function insertMediaAsMediaSingle(view, node, inputMethod, isNestingInQuoteSupported, insertMediaVia) {
61
61
  var _api$analytics;
62
- return _insertMediaAsMediaSingle(view, node, inputMethod, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, insertMediaVia);
62
+ return _insertMediaAsMediaSingle(view, node, inputMethod, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, isNestingInQuoteSupported, insertMediaVia);
63
63
  },
64
64
  setProvider: function setProvider(provider) {
65
65
  var _api$core$actions$exe;
@@ -11,8 +11,7 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
11
11
  getPos = _ref.getPos,
12
12
  intl = _ref.intl,
13
13
  isDrafting = _ref.isDrafting,
14
- badgeOffsetRight = _ref.badgeOffsetRight,
15
- commentsOnMediaBugFixEnabled = _ref.commentsOnMediaBugFixEnabled;
14
+ badgeOffsetRight = _ref.badgeOffsetRight;
16
15
  var _useState = useState(false),
17
16
  _useState2 = _slicedToArray(_useState, 2),
18
17
  entered = _useState2[0],
@@ -56,7 +55,6 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
56
55
  var maybeMediaSingleElement = view.domAtPos(pos + 1).node;
57
56
  var mediaSingleElement = maybeMediaSingleElement instanceof HTMLElement ? maybeMediaSingleElement : null;
58
57
  return /*#__PURE__*/React.createElement(CommentBadgeComponent, {
59
- commentsOnMediaBugFixEnabled: commentsOnMediaBugFixEnabled,
60
58
  badgeOffsetRight: badgeOffsetRight,
61
59
  width: mediaNode.attrs.width,
62
60
  height: mediaNode.attrs.height,
@@ -14,7 +14,6 @@ type CommentBadgeProps = {
14
14
  getPos: getPosHandler;
15
15
  isDrafting: boolean;
16
16
  badgeOffsetRight?: string;
17
- commentsOnMediaBugFixEnabled?: boolean;
18
17
  };
19
18
  export declare const CommentBadge: React.FC<import("react-intl-next").WithIntlProps<CommentBadgeProps>> & {
20
19
  WrappedComponent: React.ComponentType<CommentBadgeProps>;
@@ -14,7 +14,6 @@ type CommentBadgeProps = {
14
14
  getPos: getPosHandler;
15
15
  isDrafting: boolean;
16
16
  badgeOffsetRight?: string;
17
- commentsOnMediaBugFixEnabled?: boolean;
18
17
  };
19
18
  export declare const CommentBadge: React.FC<import("react-intl-next").WithIntlProps<CommentBadgeProps>> & {
20
19
  WrappedComponent: React.ComponentType<CommentBadgeProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.34.3",
3
+ "version": "1.34.5",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
37
37
  "@atlaskit/analytics-next": "^10.1.0",
38
38
  "@atlaskit/button": "^20.2.0",
39
- "@atlaskit/editor-common": "^92.0.0",
39
+ "@atlaskit/editor-common": "^92.1.0",
40
40
  "@atlaskit/editor-palette": "1.6.1",
41
41
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
42
42
  "@atlaskit/editor-plugin-annotation": "1.19.10",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/editor-shared-styles": "^3.0.0",
54
54
  "@atlaskit/editor-tables": "^2.8.0",
55
55
  "@atlaskit/form": "^10.5.0",
56
- "@atlaskit/icon": "^22.19.0",
56
+ "@atlaskit/icon": "^22.20.0",
57
57
  "@atlaskit/media-card": "^78.5.0",
58
58
  "@atlaskit/media-client": "^28.0.0",
59
59
  "@atlaskit/media-client-react": "^2.2.0",