@atlaskit/editor-plugin-media 1.29.9 → 1.30.0
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 +15 -0
- package/dist/cjs/nodeviews/mediaSingle.js +65 -86
- package/dist/cjs/ui/CommentBadge/index.js +13 -16
- package/dist/es2019/nodeviews/mediaSingle.js +24 -43
- package/dist/es2019/ui/CommentBadge/index.js +16 -19
- package/dist/esm/nodeviews/mediaSingle.js +67 -88
- package/dist/esm/ui/CommentBadge/index.js +15 -18
- package/dist/types/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/ui/CommentBadge/index.d.ts +17 -1
- package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types-ts4.5/ui/CommentBadge/index.d.ts +17 -1
- package/package.json +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.30.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#137821](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137821)
|
|
8
|
+
[`e26174c7d02a6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e26174c7d02a6) -
|
|
9
|
+
ED-24631 Refactor how ExternalImageBadge and CommentBadge are rendered
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#138118](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138118)
|
|
14
|
+
[`5e4d9eb1aefe4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5e4d9eb1aefe4) -
|
|
15
|
+
NOISSUE: Upgrades editor React peer dependencies to v18
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 1.29.9
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -48,6 +48,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
48
48
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
49
49
|
* @jsxRuntime classic
|
|
50
50
|
* @jsx jsx
|
|
51
|
+
* @jsxFrag
|
|
51
52
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
52
53
|
var figureWrapperStyles = (0, _react2.css)({
|
|
53
54
|
margin: 0
|
|
@@ -72,7 +73,6 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
72
73
|
});
|
|
73
74
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaSingleWrapperRef", /*#__PURE__*/_react.default.createRef());
|
|
74
75
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "captionPlaceHolderRef", /*#__PURE__*/_react.default.createRef());
|
|
75
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "commentBadgeRef", /*#__PURE__*/_react.default.createRef());
|
|
76
76
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createOrUpdateMediaNodeUpdater", function (props) {
|
|
77
77
|
var node = _this.props.node.firstChild;
|
|
78
78
|
var updaterProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -332,12 +332,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
332
332
|
}, {
|
|
333
333
|
key: "render",
|
|
334
334
|
value: function render() {
|
|
335
|
-
var _mediaOptions$getEdit,
|
|
336
|
-
_pluginInjectionApi$m,
|
|
337
|
-
_node$firstChild,
|
|
338
|
-
_this2 = this,
|
|
339
|
-
_mediaOptions$getEdit3,
|
|
340
|
-
_mediaOptions$getEdit4;
|
|
335
|
+
var _mediaOptions$getEdit, _pluginInjectionApi$m, _node$firstChild, _mediaOptions$getEdit2;
|
|
341
336
|
var _this$props2 = this.props,
|
|
342
337
|
selected = _this$props2.selected,
|
|
343
338
|
getPos = _this$props2.getPos,
|
|
@@ -431,9 +426,9 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
431
426
|
var canResize = !!this.props.mediaOptions.allowResizing && !editorDisabled && !editorViewMode;
|
|
432
427
|
if (!this.props.mediaOptions.allowResizingInTables) {
|
|
433
428
|
// If resizing not allowed in tables, check parents for tables
|
|
434
|
-
var
|
|
435
|
-
if (
|
|
436
|
-
var $pos = state.doc.resolve(
|
|
429
|
+
var _pos = getPos();
|
|
430
|
+
if (_pos) {
|
|
431
|
+
var $pos = state.doc.resolve(_pos);
|
|
437
432
|
var table = state.schema.nodes.table;
|
|
438
433
|
var disabledNode = !!(0, _utils2.findParentNodeOfTypeClosestToPos)($pos, [table]);
|
|
439
434
|
canResize = canResize && !disabledNode;
|
|
@@ -454,33 +449,14 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
454
449
|
shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
|
|
455
450
|
}
|
|
456
451
|
var isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 || (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
|
|
457
|
-
var
|
|
458
|
-
var
|
|
459
|
-
var
|
|
460
|
-
if (_this2.commentBadgeRef.current) {
|
|
461
|
-
var _mediaOptions$getEdit2;
|
|
462
|
-
var 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;
|
|
463
|
-
var commentBadgeWidth = _this2.commentBadgeRef.current.offsetWidth;
|
|
464
|
-
var isMediaInsideTable = function isMediaInsideTable() {
|
|
465
|
-
var pos = getPos();
|
|
466
|
-
if (pos !== undefined) {
|
|
467
|
-
var _$pos2 = view.state.doc.resolve(pos);
|
|
468
|
-
var _table2 = view.state.schema.nodes.table;
|
|
469
|
-
var foundTableNode = (0, _utils2.findParentNodeOfTypeClosestToPos)(_$pos2, [_table2]);
|
|
470
|
-
return Boolean(foundTableNode);
|
|
471
|
-
}
|
|
472
|
-
return false;
|
|
473
|
-
};
|
|
474
|
-
if (commentsOnMediaBugFixEnabled && isMediaInsideTable()) {
|
|
475
|
-
return commentBadgeWidth + 2;
|
|
476
|
-
}
|
|
477
|
-
return commentBadgeWidth + 14;
|
|
478
|
-
}
|
|
479
|
-
return 0;
|
|
480
|
-
};
|
|
452
|
+
var shouldShowExternalMediaBadge = attrs.type === 'external';
|
|
453
|
+
var pos = getPos();
|
|
454
|
+
var isInsideTable = pos !== undefined && (0, _utils2.findParentNodeOfTypeClosestToPos)(state.doc.resolve(pos), [state.schema.nodes.table]);
|
|
481
455
|
var currentMediaElement = function currentMediaElement() {
|
|
482
|
-
|
|
483
|
-
|
|
456
|
+
if (pos !== undefined) {
|
|
457
|
+
return view.domAtPos(pos + 1).node;
|
|
458
|
+
}
|
|
459
|
+
return null;
|
|
484
460
|
};
|
|
485
461
|
var MediaChildren = (0, _react2.jsx)("figure", {
|
|
486
462
|
ref: this.mediaSingleWrapperRef,
|
|
@@ -489,29 +465,32 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
489
465
|
,
|
|
490
466
|
className: _styles.MediaSingleNodeSelector,
|
|
491
467
|
onClick: this.onMediaSingleClicked
|
|
492
|
-
},
|
|
493
|
-
commentBadgeRightOffset: commentBadgeOffset(),
|
|
468
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_insert_media_plugin_phase_one') && (0, _react2.jsx)(_mediaSingle.MediaBadges, {
|
|
494
469
|
mediaElement: currentMediaElement(),
|
|
495
470
|
mediaHeight: height,
|
|
496
|
-
mediaWidth: width
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
471
|
+
mediaWidth: width,
|
|
472
|
+
extendedResizeOffset: (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
473
|
+
}, function (_ref6) {
|
|
474
|
+
var badgeSize = _ref6.badgeSize;
|
|
475
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, shouldShowExternalMediaBadge && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
476
|
+
badgeSize: badgeSize
|
|
477
|
+
}), commentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadgeNextWrapper, {
|
|
478
|
+
view: view,
|
|
479
|
+
api: pluginInjectionApi,
|
|
480
|
+
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
481
|
+
getPos: getPos,
|
|
482
|
+
isDrafting: isCurrentNodeDrafting,
|
|
483
|
+
badgeSize: badgeSize
|
|
484
|
+
}));
|
|
485
|
+
}), !(0, _platformFeatureFlags.fg)('platform_editor_insert_media_plugin_phase_one') && commentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadge, {
|
|
486
|
+
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,
|
|
500
487
|
view: view,
|
|
501
488
|
api: pluginInjectionApi,
|
|
502
489
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
503
490
|
badgeOffsetRight: badgeOffsetRight,
|
|
504
491
|
getPos: getPos,
|
|
505
492
|
isDrafting: isCurrentNodeDrafting
|
|
506
|
-
})
|
|
507
|
-
commentsOnMediaBugFixEnabled: mediaOptions === null || mediaOptions === void 0 || (_mediaOptions$getEdit4 = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit4 === void 0 || (_mediaOptions$getEdit4 = _mediaOptions$getEdit4.call(mediaOptions)) === null || _mediaOptions$getEdit4 === void 0 ? void 0 : _mediaOptions$getEdit4.commentsOnMediaBugFix,
|
|
508
|
-
view: view,
|
|
509
|
-
api: pluginInjectionApi,
|
|
510
|
-
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
511
|
-
badgeOffsetRight: badgeOffsetRight,
|
|
512
|
-
getPos: getPos,
|
|
513
|
-
isDrafting: isCurrentNodeDrafting
|
|
514
|
-
})), (0, _react2.jsx)("div", {
|
|
493
|
+
}), (0, _react2.jsx)("div", {
|
|
515
494
|
ref: this.props.forwardRef
|
|
516
495
|
}), shouldShowPlaceholder && (0, _react2.jsx)(_CaptionPlaceholder.default, {
|
|
517
496
|
ref: this.captionPlaceHolderRef,
|
|
@@ -537,19 +516,19 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
537
516
|
mediaOptions: {}
|
|
538
517
|
});
|
|
539
518
|
(0, _defineProperty2.default)(MediaSingleNode, "displayName", 'MediaSingleNode');
|
|
540
|
-
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(
|
|
541
|
-
var pluginInjectionApi =
|
|
542
|
-
contextIdentifierProvider =
|
|
543
|
-
node =
|
|
544
|
-
getPos =
|
|
545
|
-
mediaOptions =
|
|
546
|
-
view =
|
|
547
|
-
fullWidthMode =
|
|
548
|
-
selected =
|
|
549
|
-
eventDispatcher =
|
|
550
|
-
dispatchAnalyticsEvent =
|
|
551
|
-
forwardRef =
|
|
552
|
-
editorAppearance =
|
|
519
|
+
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref7) {
|
|
520
|
+
var pluginInjectionApi = _ref7.pluginInjectionApi,
|
|
521
|
+
contextIdentifierProvider = _ref7.contextIdentifierProvider,
|
|
522
|
+
node = _ref7.node,
|
|
523
|
+
getPos = _ref7.getPos,
|
|
524
|
+
mediaOptions = _ref7.mediaOptions,
|
|
525
|
+
view = _ref7.view,
|
|
526
|
+
fullWidthMode = _ref7.fullWidthMode,
|
|
527
|
+
selected = _ref7.selected,
|
|
528
|
+
eventDispatcher = _ref7.eventDispatcher,
|
|
529
|
+
dispatchAnalyticsEvent = _ref7.dispatchAnalyticsEvent,
|
|
530
|
+
forwardRef = _ref7.forwardRef,
|
|
531
|
+
editorAppearance = _ref7.editorAppearance;
|
|
553
532
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width', 'media', 'annotation', 'editorDisabled', 'editorViewMode']),
|
|
554
533
|
widthState = _useSharedPluginState.widthState,
|
|
555
534
|
mediaState = _useSharedPluginState.mediaState,
|
|
@@ -585,18 +564,18 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
585
564
|
(0, _inherits2.default)(MediaSingleNodeView, _ReactNodeView);
|
|
586
565
|
var _super2 = _createSuper(MediaSingleNodeView);
|
|
587
566
|
function MediaSingleNodeView() {
|
|
588
|
-
var
|
|
567
|
+
var _this2;
|
|
589
568
|
(0, _classCallCheck2.default)(this, MediaSingleNodeView);
|
|
590
569
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
591
570
|
args[_key2] = arguments[_key2];
|
|
592
571
|
}
|
|
593
|
-
|
|
594
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(
|
|
595
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(
|
|
596
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(
|
|
597
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(
|
|
598
|
-
var getPos =
|
|
599
|
-
var selection =
|
|
572
|
+
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
573
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "lastOffsetLeft", 0);
|
|
574
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "forceViewUpdate", false);
|
|
575
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "selectionType", null);
|
|
576
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "checkAndUpdateSelectionType", function () {
|
|
577
|
+
var getPos = _this2.getPos;
|
|
578
|
+
var selection = _this2.view.state.selection;
|
|
600
579
|
|
|
601
580
|
/**
|
|
602
581
|
* ED-19831
|
|
@@ -609,15 +588,15 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
609
588
|
} catch (e) {
|
|
610
589
|
pos = undefined;
|
|
611
590
|
}
|
|
612
|
-
var isNodeSelected = (0, _utils.isNodeSelectedOrInRange)(selection.$anchor.pos, selection.$head.pos, pos,
|
|
613
|
-
|
|
591
|
+
var isNodeSelected = (0, _utils.isNodeSelectedOrInRange)(selection.$anchor.pos, selection.$head.pos, pos, _this2.node.nodeSize);
|
|
592
|
+
_this2.selectionType = isNodeSelected;
|
|
614
593
|
return isNodeSelected;
|
|
615
594
|
});
|
|
616
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(
|
|
617
|
-
|
|
618
|
-
return
|
|
595
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "isNodeSelected", function () {
|
|
596
|
+
_this2.checkAndUpdateSelectionType();
|
|
597
|
+
return _this2.selectionType !== null;
|
|
619
598
|
});
|
|
620
|
-
return
|
|
599
|
+
return _this2;
|
|
621
600
|
}
|
|
622
601
|
(0, _createClass2.default)(MediaSingleNodeView, [{
|
|
623
602
|
key: "createDomRef",
|
|
@@ -682,10 +661,10 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
682
661
|
}, {
|
|
683
662
|
key: "update",
|
|
684
663
|
value: function update(node, decorations, _innerDecorations, isValidUpdate) {
|
|
685
|
-
var
|
|
664
|
+
var _this3 = this;
|
|
686
665
|
if (!isValidUpdate) {
|
|
687
666
|
isValidUpdate = function isValidUpdate(currentNode, newNode) {
|
|
688
|
-
return
|
|
667
|
+
return _this3.getNodeMediaId(currentNode) === _this3.getNodeMediaId(newNode);
|
|
689
668
|
};
|
|
690
669
|
}
|
|
691
670
|
return (0, _get2.default)((0, _getPrototypeOf2.default)(MediaSingleNodeView.prototype), "update", this).call(this, node, decorations, _innerDecorations, isValidUpdate);
|
|
@@ -693,7 +672,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
693
672
|
}, {
|
|
694
673
|
key: "render",
|
|
695
674
|
value: function render(props, forwardRef) {
|
|
696
|
-
var
|
|
675
|
+
var _this4 = this;
|
|
697
676
|
var _this$reactComponentP = this.reactComponentProps,
|
|
698
677
|
eventDispatcher = _this$reactComponentP.eventDispatcher,
|
|
699
678
|
fullWidthMode = _this$reactComponentP.fullWidthMode,
|
|
@@ -708,17 +687,17 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
708
687
|
return (0, _react2.jsx)(_providerFactory.WithProviders, {
|
|
709
688
|
providers: ['contextIdentifierProvider'],
|
|
710
689
|
providerFactory: providerFactory,
|
|
711
|
-
renderNode: function renderNode(
|
|
712
|
-
var contextIdentifierProvider =
|
|
690
|
+
renderNode: function renderNode(_ref8) {
|
|
691
|
+
var contextIdentifierProvider = _ref8.contextIdentifierProvider;
|
|
713
692
|
return (0, _react2.jsx)(MediaSingleNodeWrapper, {
|
|
714
693
|
pluginInjectionApi: pluginInjectionApi,
|
|
715
694
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
716
|
-
node:
|
|
695
|
+
node: _this4.node,
|
|
717
696
|
getPos: getPos,
|
|
718
697
|
mediaOptions: mediaOptions,
|
|
719
|
-
view:
|
|
698
|
+
view: _this4.view,
|
|
720
699
|
fullWidthMode: fullWidthMode,
|
|
721
|
-
selected:
|
|
700
|
+
selected: _this4.isNodeSelected,
|
|
722
701
|
eventDispatcher: eventDispatcher,
|
|
723
702
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
724
703
|
forwardRef: forwardRef,
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.CommentBadgeNextWrapper = exports.CommentBadge = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -77,17 +77,19 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
|
|
|
77
77
|
};
|
|
78
78
|
var CommentBadge = exports.CommentBadge = (0, _reactIntlNext.injectIntl)(CommentBadgeWrapper);
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Remove CommentBadgeWrapper component above
|
|
82
|
+
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
83
|
+
* when clean up platform_editor_insert_media_plugin_phase_one feature flag
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
var CommentBadgeNextWrapper = exports.CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref2) {
|
|
83
87
|
var api = _ref2.api,
|
|
84
88
|
mediaNode = _ref2.mediaNode,
|
|
85
89
|
view = _ref2.view,
|
|
86
90
|
getPos = _ref2.getPos,
|
|
87
91
|
isDrafting = _ref2.isDrafting,
|
|
88
|
-
|
|
89
|
-
commentsOnMediaBugFixEnabled = _ref2.commentsOnMediaBugFixEnabled;
|
|
90
|
-
var intl = (0, _reactIntlNext.useIntl)();
|
|
92
|
+
badgeSize = _ref2.badgeSize;
|
|
91
93
|
var _useState3 = (0, _react.useState)(false),
|
|
92
94
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
93
95
|
entered = _useState4[0],
|
|
@@ -123,21 +125,16 @@ var CommentBadgeWithRef = exports.CommentBadgeWithRef = /*#__PURE__*/(0, _react.
|
|
|
123
125
|
return null;
|
|
124
126
|
}
|
|
125
127
|
var mediaSingleElement = view.domAtPos(pos + 1).node;
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(_mediaSingle.
|
|
127
|
-
ref: ref,
|
|
128
|
-
commentsOnMediaBugFixEnabled: commentsOnMediaBugFixEnabled,
|
|
129
|
-
badgeOffsetRight: badgeOffsetRight,
|
|
130
|
-
width: mediaNode.attrs.width,
|
|
131
|
-
height: mediaNode.attrs.height,
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_mediaSingle.CommentBadgeNext, {
|
|
132
129
|
onClick: onClick,
|
|
133
130
|
mediaSingleElement: mediaSingleElement,
|
|
134
|
-
intl: intl,
|
|
135
131
|
status: entered ? 'entered' : status,
|
|
136
132
|
onMouseEnter: function onMouseEnter() {
|
|
137
133
|
return setEntered(true);
|
|
138
134
|
},
|
|
139
135
|
onMouseLeave: function onMouseLeave() {
|
|
140
136
|
return setEntered(false);
|
|
141
|
-
}
|
|
137
|
+
},
|
|
138
|
+
badgeSize: badgeSize
|
|
142
139
|
});
|
|
143
|
-
}
|
|
140
|
+
};
|
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
5
|
* @jsx jsx
|
|
6
|
+
* @jsxFrag
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
import React, { Component, Fragment, useMemo } from 'react';
|
|
@@ -11,7 +12,7 @@ import React, { Component, Fragment, useMemo } from 'react';
|
|
|
11
12
|
import { css, jsx } from '@emotion/react';
|
|
12
13
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
14
|
import { calcMediaSinglePixelWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, getMaxWidthForNestedNode, MEDIA_SINGLE_GUTTER_SIZE } from '@atlaskit/editor-common/media-single';
|
|
14
|
-
import { ExternalImageBadge } from '@atlaskit/editor-common/media-single';
|
|
15
|
+
import { ExternalImageBadge, MediaBadges } from '@atlaskit/editor-common/media-single';
|
|
15
16
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
16
17
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
17
18
|
import { MediaSingle } from '@atlaskit/editor-common/ui';
|
|
@@ -24,7 +25,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
24
25
|
import { insertAndSelectCaptionFromMediaSinglePos } from '../commands/captions';
|
|
25
26
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
26
27
|
import CaptionPlaceholder from '../ui/CaptionPlaceholder';
|
|
27
|
-
import { CommentBadge,
|
|
28
|
+
import { CommentBadge, CommentBadgeNextWrapper } from '../ui/CommentBadge';
|
|
28
29
|
import ResizableMediaSingle from '../ui/ResizableMediaSingle';
|
|
29
30
|
import ResizableMediaSingleNext from '../ui/ResizableMediaSingle/ResizableMediaSingleNext';
|
|
30
31
|
import { isMediaBlobUrlFromAttrs } from '../utils/media-common';
|
|
@@ -47,7 +48,6 @@ export default class MediaSingleNode extends Component {
|
|
|
47
48
|
});
|
|
48
49
|
_defineProperty(this, "mediaSingleWrapperRef", /*#__PURE__*/React.createRef());
|
|
49
50
|
_defineProperty(this, "captionPlaceHolderRef", /*#__PURE__*/React.createRef());
|
|
50
|
-
_defineProperty(this, "commentBadgeRef", /*#__PURE__*/React.createRef());
|
|
51
51
|
_defineProperty(this, "createOrUpdateMediaNodeUpdater", props => {
|
|
52
52
|
const node = this.props.node.firstChild;
|
|
53
53
|
const updaterProps = {
|
|
@@ -236,7 +236,7 @@ export default class MediaSingleNode extends Component {
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
render() {
|
|
239
|
-
var _mediaOptions$getEdit, _pluginInjectionApi$m, _pluginInjectionApi$m2, _node$firstChild, _mediaOptions$
|
|
239
|
+
var _mediaOptions$getEdit, _pluginInjectionApi$m, _pluginInjectionApi$m2, _node$firstChild, _mediaOptions$getEdit2, _mediaOptions$getEdit3;
|
|
240
240
|
const {
|
|
241
241
|
selected,
|
|
242
242
|
getPos,
|
|
@@ -367,35 +367,14 @@ export default class MediaSingleNode extends Component {
|
|
|
367
367
|
shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
|
|
368
368
|
}
|
|
369
369
|
const isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 ? void 0 : (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
|
|
370
|
-
const
|
|
371
|
-
const
|
|
372
|
-
const
|
|
373
|
-
if (this.commentBadgeRef.current) {
|
|
374
|
-
var _mediaOptions$getEdit2, _mediaOptions$getEdit3;
|
|
375
|
-
const 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;
|
|
376
|
-
const commentBadgeWidth = this.commentBadgeRef.current.offsetWidth;
|
|
377
|
-
const isMediaInsideTable = () => {
|
|
378
|
-
const pos = getPos();
|
|
379
|
-
if (pos !== undefined) {
|
|
380
|
-
const $pos = view.state.doc.resolve(pos);
|
|
381
|
-
const {
|
|
382
|
-
table
|
|
383
|
-
} = view.state.schema.nodes;
|
|
384
|
-
const foundTableNode = findParentNodeOfTypeClosestToPos($pos, [table]);
|
|
385
|
-
return Boolean(foundTableNode);
|
|
386
|
-
}
|
|
387
|
-
return false;
|
|
388
|
-
};
|
|
389
|
-
if (commentsOnMediaBugFixEnabled && isMediaInsideTable()) {
|
|
390
|
-
return commentBadgeWidth + 2;
|
|
391
|
-
}
|
|
392
|
-
return commentBadgeWidth + 14;
|
|
393
|
-
}
|
|
394
|
-
return 0;
|
|
395
|
-
};
|
|
370
|
+
const shouldShowExternalMediaBadge = attrs.type === 'external';
|
|
371
|
+
const pos = getPos();
|
|
372
|
+
const isInsideTable = pos !== undefined && findParentNodeOfTypeClosestToPos(state.doc.resolve(pos), [state.schema.nodes.table]);
|
|
396
373
|
const currentMediaElement = () => {
|
|
397
|
-
|
|
398
|
-
|
|
374
|
+
if (pos !== undefined) {
|
|
375
|
+
return view.domAtPos(pos + 1).node;
|
|
376
|
+
}
|
|
377
|
+
return null;
|
|
399
378
|
};
|
|
400
379
|
const MediaChildren = jsx("figure", {
|
|
401
380
|
ref: this.mediaSingleWrapperRef,
|
|
@@ -404,29 +383,31 @@ export default class MediaSingleNode extends Component {
|
|
|
404
383
|
,
|
|
405
384
|
className: MediaSingleNodeSelector,
|
|
406
385
|
onClick: this.onMediaSingleClicked
|
|
407
|
-
},
|
|
408
|
-
commentBadgeRightOffset: commentBadgeOffset(),
|
|
386
|
+
}, fg('platform_editor_insert_media_plugin_phase_one') && jsx(MediaBadges, {
|
|
409
387
|
mediaElement: currentMediaElement(),
|
|
410
388
|
mediaHeight: height,
|
|
411
|
-
mediaWidth: width
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
389
|
+
mediaWidth: width,
|
|
390
|
+
extendedResizeOffset: fg('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
391
|
+
}, ({
|
|
392
|
+
badgeSize
|
|
393
|
+
}) => jsx(React.Fragment, null, shouldShowExternalMediaBadge && jsx(ExternalImageBadge, {
|
|
394
|
+
badgeSize: badgeSize
|
|
395
|
+
}), commentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
415
396
|
view: view,
|
|
416
397
|
api: pluginInjectionApi,
|
|
417
398
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
418
|
-
badgeOffsetRight: badgeOffsetRight,
|
|
419
399
|
getPos: getPos,
|
|
420
|
-
isDrafting: isCurrentNodeDrafting
|
|
421
|
-
|
|
422
|
-
|
|
400
|
+
isDrafting: isCurrentNodeDrafting,
|
|
401
|
+
badgeSize: badgeSize
|
|
402
|
+
}))), !fg('platform_editor_insert_media_plugin_phase_one') && commentsOnMedia && jsx(CommentBadge, {
|
|
403
|
+
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,
|
|
423
404
|
view: view,
|
|
424
405
|
api: pluginInjectionApi,
|
|
425
406
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
426
407
|
badgeOffsetRight: badgeOffsetRight,
|
|
427
408
|
getPos: getPos,
|
|
428
409
|
isDrafting: isCurrentNodeDrafting
|
|
429
|
-
})
|
|
410
|
+
}), jsx("div", {
|
|
430
411
|
ref: this.props.forwardRef
|
|
431
412
|
}), shouldShowPlaceholder && jsx(CaptionPlaceholder, {
|
|
432
413
|
ref: this.captionPlaceHolderRef,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { injectIntl
|
|
1
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
|
-
import { CommentBadge as CommentBadgeComponent } from '@atlaskit/editor-common/media-single';
|
|
5
|
+
import { CommentBadge as CommentBadgeComponent, CommentBadgeNext } from '@atlaskit/editor-common/media-single';
|
|
6
6
|
const CommentBadgeWrapper = ({
|
|
7
7
|
api,
|
|
8
8
|
mediaNode,
|
|
@@ -66,18 +66,20 @@ const CommentBadgeWrapper = ({
|
|
|
66
66
|
};
|
|
67
67
|
export const CommentBadge = injectIntl(CommentBadgeWrapper);
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Remove CommentBadgeWrapper component above
|
|
71
|
+
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
72
|
+
* when clean up platform_editor_insert_media_plugin_phase_one feature flag
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
export const CommentBadgeNextWrapper = ({
|
|
72
76
|
api,
|
|
73
77
|
mediaNode,
|
|
74
78
|
view,
|
|
75
79
|
getPos,
|
|
76
80
|
isDrafting,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, ref) => {
|
|
80
|
-
const intl = useIntl();
|
|
81
|
+
badgeSize
|
|
82
|
+
}) => {
|
|
81
83
|
const [entered, setEntered] = useState(false);
|
|
82
84
|
const {
|
|
83
85
|
annotationState
|
|
@@ -116,17 +118,12 @@ export const CommentBadgeWithRef = /*#__PURE__*/forwardRef(({
|
|
|
116
118
|
return null;
|
|
117
119
|
}
|
|
118
120
|
const mediaSingleElement = view.domAtPos(pos + 1).node;
|
|
119
|
-
return /*#__PURE__*/React.createElement(
|
|
120
|
-
ref: ref,
|
|
121
|
-
commentsOnMediaBugFixEnabled: commentsOnMediaBugFixEnabled,
|
|
122
|
-
badgeOffsetRight: badgeOffsetRight,
|
|
123
|
-
width: mediaNode.attrs.width,
|
|
124
|
-
height: mediaNode.attrs.height,
|
|
121
|
+
return /*#__PURE__*/React.createElement(CommentBadgeNext, {
|
|
125
122
|
onClick: onClick,
|
|
126
123
|
mediaSingleElement: mediaSingleElement,
|
|
127
|
-
intl: intl,
|
|
128
124
|
status: entered ? 'entered' : status,
|
|
129
125
|
onMouseEnter: () => setEntered(true),
|
|
130
|
-
onMouseLeave: () => setEntered(false)
|
|
126
|
+
onMouseLeave: () => setEntered(false),
|
|
127
|
+
badgeSize: badgeSize
|
|
131
128
|
});
|
|
132
|
-
}
|
|
129
|
+
};
|
|
@@ -16,6 +16,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
16
16
|
/**
|
|
17
17
|
* @jsxRuntime classic
|
|
18
18
|
* @jsx jsx
|
|
19
|
+
* @jsxFrag
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
22
|
import React, { Component, Fragment, useMemo } from 'react';
|
|
@@ -24,7 +25,7 @@ import React, { Component, Fragment, useMemo } from 'react';
|
|
|
24
25
|
import { css, jsx } from '@emotion/react';
|
|
25
26
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
26
27
|
import { calcMediaSinglePixelWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, getMaxWidthForNestedNode, MEDIA_SINGLE_GUTTER_SIZE } from '@atlaskit/editor-common/media-single';
|
|
27
|
-
import { ExternalImageBadge } from '@atlaskit/editor-common/media-single';
|
|
28
|
+
import { ExternalImageBadge, MediaBadges } from '@atlaskit/editor-common/media-single';
|
|
28
29
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
29
30
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
30
31
|
import { MediaSingle } from '@atlaskit/editor-common/ui';
|
|
@@ -37,7 +38,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
37
38
|
import { insertAndSelectCaptionFromMediaSinglePos } from '../commands/captions';
|
|
38
39
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
39
40
|
import CaptionPlaceholder from '../ui/CaptionPlaceholder';
|
|
40
|
-
import { CommentBadge,
|
|
41
|
+
import { CommentBadge, CommentBadgeNextWrapper } from '../ui/CommentBadge';
|
|
41
42
|
import ResizableMediaSingle from '../ui/ResizableMediaSingle';
|
|
42
43
|
import ResizableMediaSingleNext from '../ui/ResizableMediaSingle/ResizableMediaSingleNext';
|
|
43
44
|
import { isMediaBlobUrlFromAttrs } from '../utils/media-common';
|
|
@@ -67,7 +68,6 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
67
68
|
});
|
|
68
69
|
_defineProperty(_assertThisInitialized(_this), "mediaSingleWrapperRef", /*#__PURE__*/React.createRef());
|
|
69
70
|
_defineProperty(_assertThisInitialized(_this), "captionPlaceHolderRef", /*#__PURE__*/React.createRef());
|
|
70
|
-
_defineProperty(_assertThisInitialized(_this), "commentBadgeRef", /*#__PURE__*/React.createRef());
|
|
71
71
|
_defineProperty(_assertThisInitialized(_this), "createOrUpdateMediaNodeUpdater", function (props) {
|
|
72
72
|
var node = _this.props.node.firstChild;
|
|
73
73
|
var updaterProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -327,12 +327,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
327
327
|
}, {
|
|
328
328
|
key: "render",
|
|
329
329
|
value: function render() {
|
|
330
|
-
var _mediaOptions$getEdit,
|
|
331
|
-
_pluginInjectionApi$m,
|
|
332
|
-
_node$firstChild,
|
|
333
|
-
_this2 = this,
|
|
334
|
-
_mediaOptions$getEdit3,
|
|
335
|
-
_mediaOptions$getEdit4;
|
|
330
|
+
var _mediaOptions$getEdit, _pluginInjectionApi$m, _node$firstChild, _mediaOptions$getEdit2;
|
|
336
331
|
var _this$props2 = this.props,
|
|
337
332
|
selected = _this$props2.selected,
|
|
338
333
|
getPos = _this$props2.getPos,
|
|
@@ -426,9 +421,9 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
426
421
|
var canResize = !!this.props.mediaOptions.allowResizing && !editorDisabled && !editorViewMode;
|
|
427
422
|
if (!this.props.mediaOptions.allowResizingInTables) {
|
|
428
423
|
// If resizing not allowed in tables, check parents for tables
|
|
429
|
-
var
|
|
430
|
-
if (
|
|
431
|
-
var $pos = state.doc.resolve(
|
|
424
|
+
var _pos = getPos();
|
|
425
|
+
if (_pos) {
|
|
426
|
+
var $pos = state.doc.resolve(_pos);
|
|
432
427
|
var table = state.schema.nodes.table;
|
|
433
428
|
var disabledNode = !!findParentNodeOfTypeClosestToPos($pos, [table]);
|
|
434
429
|
canResize = canResize && !disabledNode;
|
|
@@ -449,33 +444,14 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
449
444
|
shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
|
|
450
445
|
}
|
|
451
446
|
var isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 || (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
|
|
452
|
-
var
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
if (_this2.commentBadgeRef.current) {
|
|
456
|
-
var _mediaOptions$getEdit2;
|
|
457
|
-
var 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;
|
|
458
|
-
var commentBadgeWidth = _this2.commentBadgeRef.current.offsetWidth;
|
|
459
|
-
var isMediaInsideTable = function isMediaInsideTable() {
|
|
460
|
-
var pos = getPos();
|
|
461
|
-
if (pos !== undefined) {
|
|
462
|
-
var _$pos2 = view.state.doc.resolve(pos);
|
|
463
|
-
var _table2 = view.state.schema.nodes.table;
|
|
464
|
-
var foundTableNode = findParentNodeOfTypeClosestToPos(_$pos2, [_table2]);
|
|
465
|
-
return Boolean(foundTableNode);
|
|
466
|
-
}
|
|
467
|
-
return false;
|
|
468
|
-
};
|
|
469
|
-
if (commentsOnMediaBugFixEnabled && isMediaInsideTable()) {
|
|
470
|
-
return commentBadgeWidth + 2;
|
|
471
|
-
}
|
|
472
|
-
return commentBadgeWidth + 14;
|
|
473
|
-
}
|
|
474
|
-
return 0;
|
|
475
|
-
};
|
|
447
|
+
var shouldShowExternalMediaBadge = attrs.type === 'external';
|
|
448
|
+
var pos = getPos();
|
|
449
|
+
var isInsideTable = pos !== undefined && findParentNodeOfTypeClosestToPos(state.doc.resolve(pos), [state.schema.nodes.table]);
|
|
476
450
|
var currentMediaElement = function currentMediaElement() {
|
|
477
|
-
|
|
478
|
-
|
|
451
|
+
if (pos !== undefined) {
|
|
452
|
+
return view.domAtPos(pos + 1).node;
|
|
453
|
+
}
|
|
454
|
+
return null;
|
|
479
455
|
};
|
|
480
456
|
var MediaChildren = jsx("figure", {
|
|
481
457
|
ref: this.mediaSingleWrapperRef,
|
|
@@ -484,29 +460,32 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
484
460
|
,
|
|
485
461
|
className: MediaSingleNodeSelector,
|
|
486
462
|
onClick: this.onMediaSingleClicked
|
|
487
|
-
},
|
|
488
|
-
commentBadgeRightOffset: commentBadgeOffset(),
|
|
463
|
+
}, fg('platform_editor_insert_media_plugin_phase_one') && jsx(MediaBadges, {
|
|
489
464
|
mediaElement: currentMediaElement(),
|
|
490
465
|
mediaHeight: height,
|
|
491
|
-
mediaWidth: width
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
466
|
+
mediaWidth: width,
|
|
467
|
+
extendedResizeOffset: fg('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
468
|
+
}, function (_ref6) {
|
|
469
|
+
var badgeSize = _ref6.badgeSize;
|
|
470
|
+
return jsx(React.Fragment, null, shouldShowExternalMediaBadge && jsx(ExternalImageBadge, {
|
|
471
|
+
badgeSize: badgeSize
|
|
472
|
+
}), commentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
473
|
+
view: view,
|
|
474
|
+
api: pluginInjectionApi,
|
|
475
|
+
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
476
|
+
getPos: getPos,
|
|
477
|
+
isDrafting: isCurrentNodeDrafting,
|
|
478
|
+
badgeSize: badgeSize
|
|
479
|
+
}));
|
|
480
|
+
}), !fg('platform_editor_insert_media_plugin_phase_one') && commentsOnMedia && jsx(CommentBadge, {
|
|
481
|
+
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
482
|
view: view,
|
|
496
483
|
api: pluginInjectionApi,
|
|
497
484
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
498
485
|
badgeOffsetRight: badgeOffsetRight,
|
|
499
486
|
getPos: getPos,
|
|
500
487
|
isDrafting: isCurrentNodeDrafting
|
|
501
|
-
})
|
|
502
|
-
commentsOnMediaBugFixEnabled: mediaOptions === null || mediaOptions === void 0 || (_mediaOptions$getEdit4 = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit4 === void 0 || (_mediaOptions$getEdit4 = _mediaOptions$getEdit4.call(mediaOptions)) === null || _mediaOptions$getEdit4 === void 0 ? void 0 : _mediaOptions$getEdit4.commentsOnMediaBugFix,
|
|
503
|
-
view: view,
|
|
504
|
-
api: pluginInjectionApi,
|
|
505
|
-
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
506
|
-
badgeOffsetRight: badgeOffsetRight,
|
|
507
|
-
getPos: getPos,
|
|
508
|
-
isDrafting: isCurrentNodeDrafting
|
|
509
|
-
})), jsx("div", {
|
|
488
|
+
}), jsx("div", {
|
|
510
489
|
ref: this.props.forwardRef
|
|
511
490
|
}), shouldShowPlaceholder && jsx(CaptionPlaceholder, {
|
|
512
491
|
ref: this.captionPlaceHolderRef,
|
|
@@ -533,19 +512,19 @@ _defineProperty(MediaSingleNode, "defaultProps", {
|
|
|
533
512
|
});
|
|
534
513
|
_defineProperty(MediaSingleNode, "displayName", 'MediaSingleNode');
|
|
535
514
|
export { MediaSingleNode as default };
|
|
536
|
-
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(
|
|
537
|
-
var pluginInjectionApi =
|
|
538
|
-
contextIdentifierProvider =
|
|
539
|
-
node =
|
|
540
|
-
getPos =
|
|
541
|
-
mediaOptions =
|
|
542
|
-
view =
|
|
543
|
-
fullWidthMode =
|
|
544
|
-
selected =
|
|
545
|
-
eventDispatcher =
|
|
546
|
-
dispatchAnalyticsEvent =
|
|
547
|
-
forwardRef =
|
|
548
|
-
editorAppearance =
|
|
515
|
+
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref7) {
|
|
516
|
+
var pluginInjectionApi = _ref7.pluginInjectionApi,
|
|
517
|
+
contextIdentifierProvider = _ref7.contextIdentifierProvider,
|
|
518
|
+
node = _ref7.node,
|
|
519
|
+
getPos = _ref7.getPos,
|
|
520
|
+
mediaOptions = _ref7.mediaOptions,
|
|
521
|
+
view = _ref7.view,
|
|
522
|
+
fullWidthMode = _ref7.fullWidthMode,
|
|
523
|
+
selected = _ref7.selected,
|
|
524
|
+
eventDispatcher = _ref7.eventDispatcher,
|
|
525
|
+
dispatchAnalyticsEvent = _ref7.dispatchAnalyticsEvent,
|
|
526
|
+
forwardRef = _ref7.forwardRef,
|
|
527
|
+
editorAppearance = _ref7.editorAppearance;
|
|
549
528
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width', 'media', 'annotation', 'editorDisabled', 'editorViewMode']),
|
|
550
529
|
widthState = _useSharedPluginState.widthState,
|
|
551
530
|
mediaState = _useSharedPluginState.mediaState,
|
|
@@ -581,18 +560,18 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
581
560
|
_inherits(MediaSingleNodeView, _ReactNodeView);
|
|
582
561
|
var _super2 = _createSuper(MediaSingleNodeView);
|
|
583
562
|
function MediaSingleNodeView() {
|
|
584
|
-
var
|
|
563
|
+
var _this2;
|
|
585
564
|
_classCallCheck(this, MediaSingleNodeView);
|
|
586
565
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
587
566
|
args[_key2] = arguments[_key2];
|
|
588
567
|
}
|
|
589
|
-
|
|
590
|
-
_defineProperty(_assertThisInitialized(
|
|
591
|
-
_defineProperty(_assertThisInitialized(
|
|
592
|
-
_defineProperty(_assertThisInitialized(
|
|
593
|
-
_defineProperty(_assertThisInitialized(
|
|
594
|
-
var getPos =
|
|
595
|
-
var selection =
|
|
568
|
+
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
569
|
+
_defineProperty(_assertThisInitialized(_this2), "lastOffsetLeft", 0);
|
|
570
|
+
_defineProperty(_assertThisInitialized(_this2), "forceViewUpdate", false);
|
|
571
|
+
_defineProperty(_assertThisInitialized(_this2), "selectionType", null);
|
|
572
|
+
_defineProperty(_assertThisInitialized(_this2), "checkAndUpdateSelectionType", function () {
|
|
573
|
+
var getPos = _this2.getPos;
|
|
574
|
+
var selection = _this2.view.state.selection;
|
|
596
575
|
|
|
597
576
|
/**
|
|
598
577
|
* ED-19831
|
|
@@ -605,15 +584,15 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
605
584
|
} catch (e) {
|
|
606
585
|
pos = undefined;
|
|
607
586
|
}
|
|
608
|
-
var isNodeSelected = isNodeSelectedOrInRange(selection.$anchor.pos, selection.$head.pos, pos,
|
|
609
|
-
|
|
587
|
+
var isNodeSelected = isNodeSelectedOrInRange(selection.$anchor.pos, selection.$head.pos, pos, _this2.node.nodeSize);
|
|
588
|
+
_this2.selectionType = isNodeSelected;
|
|
610
589
|
return isNodeSelected;
|
|
611
590
|
});
|
|
612
|
-
_defineProperty(_assertThisInitialized(
|
|
613
|
-
|
|
614
|
-
return
|
|
591
|
+
_defineProperty(_assertThisInitialized(_this2), "isNodeSelected", function () {
|
|
592
|
+
_this2.checkAndUpdateSelectionType();
|
|
593
|
+
return _this2.selectionType !== null;
|
|
615
594
|
});
|
|
616
|
-
return
|
|
595
|
+
return _this2;
|
|
617
596
|
}
|
|
618
597
|
_createClass(MediaSingleNodeView, [{
|
|
619
598
|
key: "createDomRef",
|
|
@@ -678,10 +657,10 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
678
657
|
}, {
|
|
679
658
|
key: "update",
|
|
680
659
|
value: function update(node, decorations, _innerDecorations, isValidUpdate) {
|
|
681
|
-
var
|
|
660
|
+
var _this3 = this;
|
|
682
661
|
if (!isValidUpdate) {
|
|
683
662
|
isValidUpdate = function isValidUpdate(currentNode, newNode) {
|
|
684
|
-
return
|
|
663
|
+
return _this3.getNodeMediaId(currentNode) === _this3.getNodeMediaId(newNode);
|
|
685
664
|
};
|
|
686
665
|
}
|
|
687
666
|
return _get(_getPrototypeOf(MediaSingleNodeView.prototype), "update", this).call(this, node, decorations, _innerDecorations, isValidUpdate);
|
|
@@ -689,7 +668,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
689
668
|
}, {
|
|
690
669
|
key: "render",
|
|
691
670
|
value: function render(props, forwardRef) {
|
|
692
|
-
var
|
|
671
|
+
var _this4 = this;
|
|
693
672
|
var _this$reactComponentP = this.reactComponentProps,
|
|
694
673
|
eventDispatcher = _this$reactComponentP.eventDispatcher,
|
|
695
674
|
fullWidthMode = _this$reactComponentP.fullWidthMode,
|
|
@@ -704,17 +683,17 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
704
683
|
return jsx(WithProviders, {
|
|
705
684
|
providers: ['contextIdentifierProvider'],
|
|
706
685
|
providerFactory: providerFactory,
|
|
707
|
-
renderNode: function renderNode(
|
|
708
|
-
var contextIdentifierProvider =
|
|
686
|
+
renderNode: function renderNode(_ref8) {
|
|
687
|
+
var contextIdentifierProvider = _ref8.contextIdentifierProvider;
|
|
709
688
|
return jsx(MediaSingleNodeWrapper, {
|
|
710
689
|
pluginInjectionApi: pluginInjectionApi,
|
|
711
690
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
712
|
-
node:
|
|
691
|
+
node: _this4.node,
|
|
713
692
|
getPos: getPos,
|
|
714
693
|
mediaOptions: mediaOptions,
|
|
715
|
-
view:
|
|
694
|
+
view: _this4.view,
|
|
716
695
|
fullWidthMode: fullWidthMode,
|
|
717
|
-
selected:
|
|
696
|
+
selected: _this4.isNodeSelected,
|
|
718
697
|
eventDispatcher: eventDispatcher,
|
|
719
698
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
720
699
|
forwardRef: forwardRef,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import React, {
|
|
3
|
-
import { injectIntl
|
|
2
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import { injectIntl } from 'react-intl-next';
|
|
4
4
|
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
|
-
import { CommentBadge as CommentBadgeComponent } from '@atlaskit/editor-common/media-single';
|
|
6
|
+
import { CommentBadge as CommentBadgeComponent, CommentBadgeNext } from '@atlaskit/editor-common/media-single';
|
|
7
7
|
var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
|
|
8
8
|
var api = _ref.api,
|
|
9
9
|
mediaNode = _ref.mediaNode,
|
|
@@ -67,17 +67,19 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref) {
|
|
|
67
67
|
};
|
|
68
68
|
export var CommentBadge = injectIntl(CommentBadgeWrapper);
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Remove CommentBadgeWrapper component above
|
|
72
|
+
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
73
|
+
* when clean up platform_editor_insert_media_plugin_phase_one feature flag
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
export var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref2) {
|
|
73
77
|
var api = _ref2.api,
|
|
74
78
|
mediaNode = _ref2.mediaNode,
|
|
75
79
|
view = _ref2.view,
|
|
76
80
|
getPos = _ref2.getPos,
|
|
77
81
|
isDrafting = _ref2.isDrafting,
|
|
78
|
-
|
|
79
|
-
commentsOnMediaBugFixEnabled = _ref2.commentsOnMediaBugFixEnabled;
|
|
80
|
-
var intl = useIntl();
|
|
82
|
+
badgeSize = _ref2.badgeSize;
|
|
81
83
|
var _useState3 = useState(false),
|
|
82
84
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
83
85
|
entered = _useState4[0],
|
|
@@ -113,21 +115,16 @@ export var CommentBadgeWithRef = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
113
115
|
return null;
|
|
114
116
|
}
|
|
115
117
|
var mediaSingleElement = view.domAtPos(pos + 1).node;
|
|
116
|
-
return /*#__PURE__*/React.createElement(
|
|
117
|
-
ref: ref,
|
|
118
|
-
commentsOnMediaBugFixEnabled: commentsOnMediaBugFixEnabled,
|
|
119
|
-
badgeOffsetRight: badgeOffsetRight,
|
|
120
|
-
width: mediaNode.attrs.width,
|
|
121
|
-
height: mediaNode.attrs.height,
|
|
118
|
+
return /*#__PURE__*/React.createElement(CommentBadgeNext, {
|
|
122
119
|
onClick: onClick,
|
|
123
120
|
mediaSingleElement: mediaSingleElement,
|
|
124
|
-
intl: intl,
|
|
125
121
|
status: entered ? 'entered' : status,
|
|
126
122
|
onMouseEnter: function onMouseEnter() {
|
|
127
123
|
return setEntered(true);
|
|
128
124
|
},
|
|
129
125
|
onMouseLeave: function onMouseLeave() {
|
|
130
126
|
return setEntered(false);
|
|
131
|
-
}
|
|
127
|
+
},
|
|
128
|
+
badgeSize: badgeSize
|
|
132
129
|
});
|
|
133
|
-
}
|
|
130
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
|
+
* @jsxFrag
|
|
4
5
|
*/
|
|
5
6
|
import type { MouseEvent } from 'react';
|
|
6
7
|
import React, { Component } from 'react';
|
|
@@ -34,7 +35,6 @@ export default class MediaSingleNode extends Component<MediaSingleNodeProps, Med
|
|
|
34
35
|
state: MediaSingleNodeState;
|
|
35
36
|
mediaSingleWrapperRef: React.RefObject<HTMLDivElement>;
|
|
36
37
|
captionPlaceHolderRef: React.RefObject<HTMLSpanElement>;
|
|
37
|
-
commentBadgeRef: React.RefObject<HTMLDivElement>;
|
|
38
38
|
createOrUpdateMediaNodeUpdater: (props: MediaSingleNodeProps) => void;
|
|
39
39
|
UNSAFE_componentWillReceiveProps(nextProps: MediaSingleNodeProps): void;
|
|
40
40
|
setViewMediaClientConfig: (props: MediaSingleNodeProps) => Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
import type { AnnotationMarkDefinition } from '@atlaskit/adf-schema';
|
|
3
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,5 +19,20 @@ type CommentBadgeProps = {
|
|
|
18
19
|
export declare const CommentBadge: React.FC<import("react-intl-next").WithIntlProps<CommentBadgeProps>> & {
|
|
19
20
|
WrappedComponent: React.ComponentType<CommentBadgeProps>;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Remove CommentBadgeWrapper component above
|
|
24
|
+
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
25
|
+
* when clean up platform_editor_insert_media_plugin_phase_one feature flag
|
|
26
|
+
*/
|
|
27
|
+
type CommentBadgeNextWrapperProps = {
|
|
28
|
+
mediaSingleElement?: HTMLElement | null;
|
|
29
|
+
marks?: AnnotationMarkDefinition[];
|
|
30
|
+
isDrafting?: boolean;
|
|
31
|
+
api: ExtractInjectionAPI<MediaNextEditorPluginType>;
|
|
32
|
+
mediaNode: PMNode | null;
|
|
33
|
+
view: EditorView;
|
|
34
|
+
getPos: getPosHandler;
|
|
35
|
+
badgeSize: 'small' | 'medium';
|
|
36
|
+
};
|
|
37
|
+
export declare const CommentBadgeNextWrapper: ({ api, mediaNode, view, getPos, isDrafting, badgeSize, }: CommentBadgeNextWrapperProps) => JSX.Element | null;
|
|
22
38
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
|
+
* @jsxFrag
|
|
4
5
|
*/
|
|
5
6
|
import type { MouseEvent } from 'react';
|
|
6
7
|
import React, { Component } from 'react';
|
|
@@ -34,7 +35,6 @@ export default class MediaSingleNode extends Component<MediaSingleNodeProps, Med
|
|
|
34
35
|
state: MediaSingleNodeState;
|
|
35
36
|
mediaSingleWrapperRef: React.RefObject<HTMLDivElement>;
|
|
36
37
|
captionPlaceHolderRef: React.RefObject<HTMLSpanElement>;
|
|
37
|
-
commentBadgeRef: React.RefObject<HTMLDivElement>;
|
|
38
38
|
createOrUpdateMediaNodeUpdater: (props: MediaSingleNodeProps) => void;
|
|
39
39
|
UNSAFE_componentWillReceiveProps(nextProps: MediaSingleNodeProps): void;
|
|
40
40
|
setViewMediaClientConfig: (props: MediaSingleNodeProps) => Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
import type { AnnotationMarkDefinition } from '@atlaskit/adf-schema';
|
|
3
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,5 +19,20 @@ type CommentBadgeProps = {
|
|
|
18
19
|
export declare const CommentBadge: React.FC<import("react-intl-next").WithIntlProps<CommentBadgeProps>> & {
|
|
19
20
|
WrappedComponent: React.ComponentType<CommentBadgeProps>;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Remove CommentBadgeWrapper component above
|
|
24
|
+
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
25
|
+
* when clean up platform_editor_insert_media_plugin_phase_one feature flag
|
|
26
|
+
*/
|
|
27
|
+
type CommentBadgeNextWrapperProps = {
|
|
28
|
+
mediaSingleElement?: HTMLElement | null;
|
|
29
|
+
marks?: AnnotationMarkDefinition[];
|
|
30
|
+
isDrafting?: boolean;
|
|
31
|
+
api: ExtractInjectionAPI<MediaNextEditorPluginType>;
|
|
32
|
+
mediaNode: PMNode | null;
|
|
33
|
+
view: EditorView;
|
|
34
|
+
getPos: getPosHandler;
|
|
35
|
+
badgeSize: 'small' | 'medium';
|
|
36
|
+
};
|
|
37
|
+
export declare const CommentBadgeNextWrapper: ({ api, mediaNode, view, getPos, isDrafting, badgeSize, }: CommentBadgeNextWrapperProps) => JSX.Element | null;
|
|
22
38
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
11
|
"team": "Editor: Media Experience Porygon",
|
|
12
|
-
"releaseModel": "continuous",
|
|
13
12
|
"singleton": true,
|
|
14
|
-
"runReact18":
|
|
13
|
+
"runReact18": true
|
|
15
14
|
},
|
|
16
15
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
17
16
|
"main": "dist/cjs/index.js",
|
|
@@ -34,17 +33,17 @@
|
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"@atlaskit/adf-schema": "^40.9.0",
|
|
37
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
36
|
+
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
38
37
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
39
38
|
"@atlaskit/button": "^20.1.0",
|
|
40
|
-
"@atlaskit/editor-common": "^88.
|
|
39
|
+
"@atlaskit/editor-common": "^88.12.0",
|
|
41
40
|
"@atlaskit/editor-palette": "1.6.0",
|
|
42
41
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
43
|
-
"@atlaskit/editor-plugin-annotation": "1.19.
|
|
42
|
+
"@atlaskit/editor-plugin-annotation": "1.19.4",
|
|
44
43
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
45
44
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
46
45
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
47
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^1.
|
|
46
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^1.12.0",
|
|
48
47
|
"@atlaskit/editor-plugin-focus": "^1.3.0",
|
|
49
48
|
"@atlaskit/editor-plugin-grid": "^1.2.0",
|
|
50
49
|
"@atlaskit/editor-plugin-guideline": "^1.2.0",
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
55
54
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
56
55
|
"@atlaskit/form": "^10.5.0",
|
|
57
|
-
"@atlaskit/icon": "^22.
|
|
56
|
+
"@atlaskit/icon": "^22.16.0",
|
|
58
57
|
"@atlaskit/media-card": "^78.2.0",
|
|
59
58
|
"@atlaskit/media-client": "^27.6.0",
|
|
60
59
|
"@atlaskit/media-client-react": "^2.2.0",
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
"@atlaskit/media-ui": "^25.11.0",
|
|
65
64
|
"@atlaskit/media-viewer": "^48.7.0",
|
|
66
65
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
67
|
-
"@atlaskit/primitives": "^12.
|
|
66
|
+
"@atlaskit/primitives": "^12.1.0",
|
|
68
67
|
"@atlaskit/textfield": "^6.5.0",
|
|
69
68
|
"@atlaskit/theme": "^13.0.0",
|
|
70
69
|
"@atlaskit/tokens": "^1.59.0",
|
|
@@ -83,8 +82,8 @@
|
|
|
83
82
|
},
|
|
84
83
|
"peerDependencies": {
|
|
85
84
|
"@atlaskit/media-core": "^34.3.0",
|
|
86
|
-
"react": "^16.8.0",
|
|
87
|
-
"react-dom": "^16.8.0",
|
|
85
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
86
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
88
87
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
89
88
|
},
|
|
90
89
|
"techstack": {
|