@atlaskit/editor-plugin-media 2.3.11 → 2.3.13
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 +19 -0
- package/dist/cjs/mediaPlugin.js +1 -1
- package/dist/cjs/nodeviews/mediaSingle.js +6 -27
- package/dist/cjs/nodeviews/mediaSingleNext.js +7 -30
- package/dist/cjs/pm-plugins/main.js +0 -4
- package/dist/cjs/pm-plugins/utils/media-single.js +1 -2
- package/dist/cjs/ui/CommentBadge/index.js +3 -5
- package/dist/cjs/ui/MediaViewer/PortalWrapper.js +2 -2
- package/dist/cjs/ui/toolbar/index.js +5 -3
- package/dist/es2019/mediaPlugin.js +1 -1
- package/dist/es2019/nodeviews/mediaSingle.js +4 -26
- package/dist/es2019/nodeviews/mediaSingleNext.js +6 -29
- package/dist/es2019/pm-plugins/main.js +0 -4
- package/dist/es2019/pm-plugins/utils/media-single.js +1 -2
- package/dist/es2019/ui/CommentBadge/index.js +3 -5
- package/dist/es2019/ui/MediaViewer/PortalWrapper.js +2 -2
- package/dist/es2019/ui/toolbar/index.js +5 -3
- package/dist/esm/mediaPlugin.js +1 -1
- package/dist/esm/nodeviews/mediaSingle.js +6 -27
- package/dist/esm/nodeviews/mediaSingleNext.js +7 -30
- package/dist/esm/pm-plugins/main.js +0 -4
- package/dist/esm/pm-plugins/utils/media-single.js +1 -2
- package/dist/esm/ui/CommentBadge/index.js +3 -5
- package/dist/esm/ui/MediaViewer/PortalWrapper.js +2 -2
- package/dist/esm/ui/toolbar/index.js +5 -3
- package/dist/types/ui/CommentBadge/index.d.ts +2 -3
- package/dist/types-ts4.5/ui/CommentBadge/index.d.ts +2 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 2.3.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#130882](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130882)
|
|
8
|
+
[`df1c29f476539`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df1c29f476539) -
|
|
9
|
+
[ux] Adds a new i18n message and updates icons and tooltips on links, media and extensions.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.3.12
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#128664](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128664)
|
|
17
|
+
[`abca3266336d9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/abca3266336d9) -
|
|
18
|
+
[ED-23250] Remove form element from MediaFromUrl and consolidate experiments and feature flags in
|
|
19
|
+
prepartion for jira release
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 2.3.11
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/cjs/mediaPlugin.js
CHANGED
|
@@ -307,7 +307,7 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
307
307
|
pluginsOptions: {
|
|
308
308
|
quickInsert: function quickInsert(_ref14) {
|
|
309
309
|
var formatMessage = _ref14.formatMessage;
|
|
310
|
-
return (0,
|
|
310
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout') ? [] : [{
|
|
311
311
|
id: 'media',
|
|
312
312
|
title: formatMessage(_messages.toolbarInsertBlockMessages.mediaFiles),
|
|
313
313
|
description: formatMessage(_messages.toolbarInsertBlockMessages.mediaFilesDescription),
|
|
@@ -30,7 +30,6 @@ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
|
30
30
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
31
31
|
var _mediaClient = require("@atlaskit/media-client");
|
|
32
32
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
33
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
34
33
|
var _captions = require("../pm-plugins/commands/captions");
|
|
35
34
|
var _main = require("../pm-plugins/main");
|
|
36
35
|
var _mediaCommon = require("../pm-plugins/utils/media-common");
|
|
@@ -315,7 +314,6 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
315
314
|
key: "componentDidMount",
|
|
316
315
|
value: function () {
|
|
317
316
|
var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
318
|
-
var _this$props$node$firs2;
|
|
319
317
|
var contextIdentifierProvider;
|
|
320
318
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
321
319
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -334,20 +332,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
334
332
|
contextIdentifierProvider: _context3.t1
|
|
335
333
|
};
|
|
336
334
|
_context3.t0.setState.call(_context3.t0, _context3.t2);
|
|
337
|
-
|
|
338
|
-
// Remove this block when cleaning up platform_editor_add_media_from_url
|
|
339
|
-
if (((_this$props$node$firs2 = this.props.node.firstChild) === null || _this$props$node$firs2 === void 0 ? void 0 : _this$props$node$firs2.attrs.type) === 'external') {
|
|
340
|
-
if ((0, _experiments.editorExperiment)('add-media-from-url', true)) {
|
|
341
|
-
(0, _experiments.editorExperiment)('add-media-from-url', true, {
|
|
342
|
-
exposure: true
|
|
343
|
-
});
|
|
344
|
-
} else {
|
|
345
|
-
(0, _experiments.editorExperiment)('add-media-from-url', false, {
|
|
346
|
-
exposure: true
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
case 11:
|
|
335
|
+
case 10:
|
|
351
336
|
case "end":
|
|
352
337
|
return _context3.stop();
|
|
353
338
|
}
|
|
@@ -474,7 +459,6 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
474
459
|
var shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof _state.NodeSelection;
|
|
475
460
|
shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
|
|
476
461
|
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);
|
|
477
|
-
var shouldShowExternalMediaBadge = attrs.type === 'external';
|
|
478
462
|
var pos = getPos();
|
|
479
463
|
var isInsideTable = pos !== undefined && (0, _utils2.findParentNodeOfTypeClosestToPos)(state.doc.resolve(pos), [state.schema.nodes.table]);
|
|
480
464
|
var currentMediaElement = function currentMediaElement() {
|
|
@@ -493,29 +477,24 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
493
477
|
,
|
|
494
478
|
className: _styles.MediaSingleNodeSelector,
|
|
495
479
|
onClick: this.onMediaSingleClicked
|
|
496
|
-
}, (0,
|
|
480
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout') && (0, _react2.jsx)(_mediaSingle.MediaBadges, {
|
|
497
481
|
mediaElement: currentMediaElement(),
|
|
498
482
|
mediaHeight: height,
|
|
499
483
|
mediaWidth: width,
|
|
500
484
|
extendedResizeOffset: (0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience') && !isInsideTable
|
|
501
485
|
}, function (_ref5) {
|
|
502
|
-
var
|
|
503
|
-
|
|
504
|
-
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('platform_editor_hide_external_media_badge') ? visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
505
|
-
badgeSize: badgeSize,
|
|
486
|
+
var visible = _ref5.visible;
|
|
487
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
506
488
|
type: attrs.type,
|
|
507
489
|
url: attrs.type === 'external' ? attrs.url : undefined
|
|
508
|
-
}) : shouldShowExternalMediaBadge && visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
509
|
-
badgeSize: badgeSize
|
|
510
490
|
}), mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadgeNextWrapper, {
|
|
511
491
|
view: view,
|
|
512
492
|
api: pluginInjectionApi,
|
|
513
493
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
514
494
|
getPos: getPos,
|
|
515
|
-
isDrafting: isCurrentNodeDrafting
|
|
516
|
-
badgeSize: badgeSize
|
|
495
|
+
isDrafting: isCurrentNodeDrafting
|
|
517
496
|
}));
|
|
518
|
-
}), !(0,
|
|
497
|
+
}), !(0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout') && mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadge, {
|
|
519
498
|
view: view,
|
|
520
499
|
api: pluginInjectionApi,
|
|
521
500
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -21,7 +21,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
21
21
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
22
22
|
var _mediaClient = require("@atlaskit/media-client");
|
|
23
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
25
24
|
var _captions = require("../pm-plugins/commands/captions");
|
|
26
25
|
var _mediaCommon = require("../pm-plugins/utils/media-common");
|
|
27
26
|
var _CaptionPlaceholder = require("../ui/CaptionPlaceholder");
|
|
@@ -288,7 +287,7 @@ var useUpdateSizeCallback = function useUpdateSizeCallback(_ref5) {
|
|
|
288
287
|
*/
|
|
289
288
|
var FALLBACK_MOST_COMMON_WIDTH = 760;
|
|
290
289
|
var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNextProps) {
|
|
291
|
-
var _pluginInjectionApi$m, _mediaNode$
|
|
290
|
+
var _pluginInjectionApi$m, _mediaNode$firstChild;
|
|
292
291
|
var selected = mediaSingleNodeNextProps.selected,
|
|
293
292
|
getPos = mediaSingleNodeNextProps.getPos,
|
|
294
293
|
nextMediaNode = mediaSingleNodeNextProps.node,
|
|
@@ -364,22 +363,6 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
364
363
|
}
|
|
365
364
|
});
|
|
366
365
|
}, [contextIdentifierProviderPromise]);
|
|
367
|
-
_react.default.useEffect(function () {
|
|
368
|
-
var _mediaNode$firstChild;
|
|
369
|
-
// No-op but logging an exposure when an external image is rendered
|
|
370
|
-
// Remove this block when cleaning up platform_editor_add_media_from_url
|
|
371
|
-
if (((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.type) === 'external') {
|
|
372
|
-
if ((0, _experiments.editorExperiment)('add-media-from-url', true)) {
|
|
373
|
-
(0, _experiments.editorExperiment)('add-media-from-url', true, {
|
|
374
|
-
exposure: true
|
|
375
|
-
});
|
|
376
|
-
} else {
|
|
377
|
-
(0, _experiments.editorExperiment)('add-media-from-url', false, {
|
|
378
|
-
exposure: true
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}, [mediaNode]);
|
|
383
366
|
var _ref6 = mediaNode.attrs,
|
|
384
367
|
layout = _ref6.layout,
|
|
385
368
|
widthType = _ref6.widthType,
|
|
@@ -454,8 +437,7 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
454
437
|
}, [mediaSingleWidthAttribute, widthType, width, layout, contentWidthForLegacyExperience, containerWidth]);
|
|
455
438
|
var currentMaxWidth = isSelected ? pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$m = pluginInjectionApi.media) === null || _pluginInjectionApi$m === void 0 || (_pluginInjectionApi$m = _pluginInjectionApi$m.sharedState.currentState()) === null || _pluginInjectionApi$m === void 0 ? void 0 : _pluginInjectionApi$m.currentMaxWidth : undefined;
|
|
456
439
|
var contentWidth = currentMaxWidth || lineLength;
|
|
457
|
-
var isCurrentNodeDrafting = Boolean((annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (mediaNode === null || mediaNode === void 0 || (_mediaNode$
|
|
458
|
-
var shouldShowExternalMediaBadge = childMediaNodeAttrs.type === 'external';
|
|
440
|
+
var isCurrentNodeDrafting = Boolean((annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (mediaNode === null || mediaNode === void 0 || (_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.id));
|
|
459
441
|
var mediaSingleWrapperRef = /*#__PURE__*/_react.default.createRef();
|
|
460
442
|
var captionPlaceHolderRef = /*#__PURE__*/_react.default.createRef();
|
|
461
443
|
var onMediaSingleClicked = _react.default.useCallback(function (event) {
|
|
@@ -492,29 +474,24 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
492
474
|
,
|
|
493
475
|
className: _styles.MediaSingleNodeSelector,
|
|
494
476
|
onClick: onMediaSingleClicked
|
|
495
|
-
}, (0,
|
|
477
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout') && (0, _react2.jsx)(_mediaSingle.MediaBadges, {
|
|
496
478
|
mediaElement: currentMediaElement(),
|
|
497
479
|
mediaHeight: height,
|
|
498
480
|
mediaWidth: width,
|
|
499
481
|
extendedResizeOffset: (0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience') && !isInsideTable
|
|
500
482
|
}, function (_ref7) {
|
|
501
|
-
var
|
|
502
|
-
|
|
503
|
-
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('platform_editor_hide_external_media_badge') ? visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
504
|
-
badgeSize: badgeSize,
|
|
483
|
+
var visible = _ref7.visible;
|
|
484
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
505
485
|
type: childMediaNodeAttrs.type,
|
|
506
486
|
url: childMediaNodeAttrs.type === 'external' ? childMediaNodeAttrs.url : undefined
|
|
507
|
-
}) : shouldShowExternalMediaBadge && visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
508
|
-
badgeSize: badgeSize
|
|
509
487
|
}), mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadgeNextWrapper, {
|
|
510
488
|
view: view,
|
|
511
489
|
api: pluginInjectionApi,
|
|
512
490
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
513
491
|
getPos: getPos,
|
|
514
|
-
isDrafting: isCurrentNodeDrafting
|
|
515
|
-
badgeSize: badgeSize
|
|
492
|
+
isDrafting: isCurrentNodeDrafting
|
|
516
493
|
}));
|
|
517
|
-
}), !(0,
|
|
494
|
+
}), !(0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout') && mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadge, {
|
|
518
495
|
view: view,
|
|
519
496
|
api: pluginInjectionApi,
|
|
520
497
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
@@ -27,7 +27,6 @@ var _view2 = require("@atlaskit/editor-prosemirror/view");
|
|
|
27
27
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
28
28
|
var _mediaClient = require("@atlaskit/media-client");
|
|
29
29
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
30
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
31
30
|
var _helpers = _interopRequireWildcard(require("../pm-plugins/commands/helpers"));
|
|
32
31
|
var helpers = _helpers;
|
|
33
32
|
var _mediaCommon2 = require("../pm-plugins/utils/media-common");
|
|
@@ -218,9 +217,6 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
218
217
|
});
|
|
219
218
|
(0, _defineProperty2.default)(this, "showMediaPicker", function () {
|
|
220
219
|
if (_this.openMediaPickerBrowser) {
|
|
221
|
-
(0, _experiments.editorExperiment)('add-media-from-url', false, {
|
|
222
|
-
exposure: true
|
|
223
|
-
});
|
|
224
220
|
return _this.openMediaPickerBrowser();
|
|
225
221
|
}
|
|
226
222
|
_this.onPopupToggleCallback(true);
|
|
@@ -16,7 +16,6 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
16
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
17
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
19
|
var _mediaCommon = require("../utils/media-common");
|
|
21
20
|
var _analytics2 = require("./analytics");
|
|
22
21
|
var _isType = require("./is-type");
|
|
@@ -107,7 +106,7 @@ var insertMediaAsMediaSingle = exports.insertMediaAsMediaSingle = function inser
|
|
|
107
106
|
return false;
|
|
108
107
|
}
|
|
109
108
|
var resizeExperience = (0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience');
|
|
110
|
-
var insertMediaPopup = (0,
|
|
109
|
+
var insertMediaPopup = (0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout');
|
|
111
110
|
var mediaSingleAttrs = resizeExperience && insertMediaPopup ? {
|
|
112
111
|
widthType: 'pixel',
|
|
113
112
|
width: (0, _mediaSingle.getMediaSingleInitialWidth)((_node$attrs$width = node.attrs.width) !== null && _node$attrs$width !== void 0 ? _node$attrs$width : _mediaSingle.DEFAULT_IMAGE_WIDTH),
|
|
@@ -85,7 +85,7 @@ var CommentBadge = exports.CommentBadge = (0, _reactIntlNext.injectIntl)(Comment
|
|
|
85
85
|
/**
|
|
86
86
|
* Remove CommentBadgeWrapper component above
|
|
87
87
|
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
88
|
-
* when clean up
|
|
88
|
+
* when clean up platform_editor_add_media_from_url_rollout feature flag
|
|
89
89
|
*/
|
|
90
90
|
|
|
91
91
|
var CommentBadgeNextWrapper = exports.CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref2) {
|
|
@@ -93,8 +93,7 @@ var CommentBadgeNextWrapper = exports.CommentBadgeNextWrapper = function Comment
|
|
|
93
93
|
mediaNode = _ref2.mediaNode,
|
|
94
94
|
view = _ref2.view,
|
|
95
95
|
getPos = _ref2.getPos,
|
|
96
|
-
isDrafting = _ref2.isDrafting
|
|
97
|
-
badgeSize = _ref2.badgeSize;
|
|
96
|
+
isDrafting = _ref2.isDrafting;
|
|
98
97
|
var _useState3 = (0, _react.useState)(false),
|
|
99
98
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
100
99
|
entered = _useState4[0],
|
|
@@ -140,7 +139,6 @@ var CommentBadgeNextWrapper = exports.CommentBadgeNextWrapper = function Comment
|
|
|
140
139
|
},
|
|
141
140
|
onMouseLeave: function onMouseLeave() {
|
|
142
141
|
return setEntered(false);
|
|
143
|
-
}
|
|
144
|
-
badgeSize: badgeSize
|
|
142
|
+
}
|
|
145
143
|
});
|
|
146
144
|
};
|
|
@@ -8,7 +8,7 @@ exports.RenderMediaViewer = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
10
|
var _mediaViewer = require("@atlaskit/media-viewer");
|
|
11
|
-
var
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var _utils = require("../../ui/toolbar/utils");
|
|
13
13
|
var getIdentifier = function getIdentifier(attrs) {
|
|
14
14
|
if ((0, _utils.isExternalMedia)(attrs)) {
|
|
@@ -33,7 +33,7 @@ var RenderMediaViewer = exports.RenderMediaViewer = function RenderMediaViewer(_
|
|
|
33
33
|
selectedNodeAttrs = _ref.selectedNodeAttrs,
|
|
34
34
|
_ref$items = _ref.items,
|
|
35
35
|
items = _ref$items === void 0 ? [] : _ref$items;
|
|
36
|
-
if ((0,
|
|
36
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_add_media_from_url_rollout')) {
|
|
37
37
|
var _identifier = getIdentifier(selectedNodeAttrs);
|
|
38
38
|
var collectionName = (0, _utils.isExternalMedia)(selectedNodeAttrs) ? '' : selectedNodeAttrs.collection;
|
|
39
39
|
return /*#__PURE__*/_reactDom.default.createPortal( /*#__PURE__*/_react.default.createElement(_mediaViewer.MediaViewer, {
|
|
@@ -377,17 +377,19 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
377
377
|
});
|
|
378
378
|
} else {
|
|
379
379
|
var _pluginInjectionApi$a5;
|
|
380
|
+
var inlineTitle = intl.formatMessage(_messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
380
381
|
var _options2 = [{
|
|
381
382
|
id: 'editor.media.convert.mediainline',
|
|
382
|
-
title:
|
|
383
|
+
title: inlineTitle,
|
|
383
384
|
onClick: (0, _commands3.changeMediaSingleToMediaInline)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions),
|
|
384
385
|
icon: /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
385
386
|
color: "currentColor",
|
|
386
387
|
spacing: "spacious",
|
|
387
|
-
label:
|
|
388
|
+
label: inlineTitle,
|
|
388
389
|
LEGACY_size: "medium",
|
|
389
390
|
LEGACY_fallbackIcon: _card.IconInline
|
|
390
|
-
})
|
|
391
|
+
}),
|
|
392
|
+
tooltip: hasCaption ? inlineSwitcherTitle : undefined
|
|
391
393
|
}, {
|
|
392
394
|
id: 'editor.media.convert.mediasingle',
|
|
393
395
|
title: floatingSwitcherTitle,
|
|
@@ -306,7 +306,7 @@ export const mediaPlugin = ({
|
|
|
306
306
|
pluginsOptions: {
|
|
307
307
|
quickInsert: ({
|
|
308
308
|
formatMessage
|
|
309
|
-
}) =>
|
|
309
|
+
}) => fg('platform_editor_add_media_from_url_rollout') ? [] : [{
|
|
310
310
|
id: 'media',
|
|
311
311
|
title: formatMessage(messages.mediaFiles),
|
|
312
312
|
description: formatMessage(messages.mediaFilesDescription),
|
|
@@ -22,7 +22,6 @@ import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/u
|
|
|
22
22
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
23
23
|
import { getAttrsFromUrl } from '@atlaskit/media-client';
|
|
24
24
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
26
25
|
import { insertAndSelectCaptionFromMediaSinglePos } from '../pm-plugins/commands/captions';
|
|
27
26
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
28
27
|
import { isMediaBlobUrlFromAttrs } from '../pm-plugins/utils/media-common';
|
|
@@ -240,7 +239,6 @@ export default class MediaSingleNode extends Component {
|
|
|
240
239
|
}
|
|
241
240
|
}
|
|
242
241
|
async componentDidMount() {
|
|
243
|
-
var _this$props$node$firs2;
|
|
244
242
|
const {
|
|
245
243
|
contextIdentifierProvider
|
|
246
244
|
} = this.props;
|
|
@@ -249,20 +247,6 @@ export default class MediaSingleNode extends Component {
|
|
|
249
247
|
this.setState({
|
|
250
248
|
contextIdentifierProvider: await contextIdentifierProvider
|
|
251
249
|
});
|
|
252
|
-
|
|
253
|
-
// No-op but logging an exposure when an external image is rendered
|
|
254
|
-
// Remove this block when cleaning up platform_editor_add_media_from_url
|
|
255
|
-
if (((_this$props$node$firs2 = this.props.node.firstChild) === null || _this$props$node$firs2 === void 0 ? void 0 : _this$props$node$firs2.attrs.type) === 'external') {
|
|
256
|
-
if (editorExperiment('add-media-from-url', true)) {
|
|
257
|
-
editorExperiment('add-media-from-url', true, {
|
|
258
|
-
exposure: true
|
|
259
|
-
});
|
|
260
|
-
} else {
|
|
261
|
-
editorExperiment('add-media-from-url', false, {
|
|
262
|
-
exposure: true
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
250
|
}
|
|
267
251
|
render() {
|
|
268
252
|
var _pluginInjectionApi$m, _pluginInjectionApi$m2, _node$firstChild;
|
|
@@ -392,7 +376,6 @@ export default class MediaSingleNode extends Component {
|
|
|
392
376
|
let shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
|
|
393
377
|
shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
|
|
394
378
|
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);
|
|
395
|
-
const shouldShowExternalMediaBadge = attrs.type === 'external';
|
|
396
379
|
const pos = getPos();
|
|
397
380
|
const isInsideTable = pos !== undefined && findParentNodeOfTypeClosestToPos(state.doc.resolve(pos), [state.schema.nodes.table]);
|
|
398
381
|
const currentMediaElement = () => {
|
|
@@ -411,28 +394,23 @@ export default class MediaSingleNode extends Component {
|
|
|
411
394
|
,
|
|
412
395
|
className: MediaSingleNodeSelector,
|
|
413
396
|
onClick: this.onMediaSingleClicked
|
|
414
|
-
},
|
|
397
|
+
}, fg('platform_editor_add_media_from_url_rollout') && jsx(MediaBadges, {
|
|
415
398
|
mediaElement: currentMediaElement(),
|
|
416
399
|
mediaHeight: height,
|
|
417
400
|
mediaWidth: width,
|
|
418
401
|
extendedResizeOffset: fg('platform_editor_media_extended_resize_experience') && !isInsideTable
|
|
419
402
|
}, ({
|
|
420
|
-
badgeSize,
|
|
421
403
|
visible
|
|
422
|
-
}) => jsx(React.Fragment, null,
|
|
423
|
-
badgeSize: badgeSize,
|
|
404
|
+
}) => jsx(React.Fragment, null, visible && jsx(ExternalImageBadge, {
|
|
424
405
|
type: attrs.type,
|
|
425
406
|
url: attrs.type === 'external' ? attrs.url : undefined
|
|
426
|
-
}) : shouldShowExternalMediaBadge && visible && jsx(ExternalImageBadge, {
|
|
427
|
-
badgeSize: badgeSize
|
|
428
407
|
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
429
408
|
view: view,
|
|
430
409
|
api: pluginInjectionApi,
|
|
431
410
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
432
411
|
getPos: getPos,
|
|
433
|
-
isDrafting: isCurrentNodeDrafting
|
|
434
|
-
|
|
435
|
-
}))), !editorExperiment('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
412
|
+
isDrafting: isCurrentNodeDrafting
|
|
413
|
+
}))), !fg('platform_editor_add_media_from_url_rollout') && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
436
414
|
view: view,
|
|
437
415
|
api: pluginInjectionApi,
|
|
438
416
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -16,7 +16,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
16
16
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
17
17
|
import { getAttrsFromUrl } from '@atlaskit/media-client';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
19
|
import { insertAndSelectCaptionFromMediaSinglePos } from '../pm-plugins/commands/captions';
|
|
21
20
|
import { isMediaBlobUrlFromAttrs } from '../pm-plugins/utils/media-common';
|
|
22
21
|
import { CaptionPlaceholder, CaptionPlaceholderButton } from '../ui/CaptionPlaceholder';
|
|
@@ -248,7 +247,7 @@ const useUpdateSizeCallback = ({
|
|
|
248
247
|
*/
|
|
249
248
|
const FALLBACK_MOST_COMMON_WIDTH = 760;
|
|
250
249
|
export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
251
|
-
var _pluginInjectionApi$m, _pluginInjectionApi$m2, _mediaNode$
|
|
250
|
+
var _pluginInjectionApi$m, _pluginInjectionApi$m2, _mediaNode$firstChild;
|
|
252
251
|
const {
|
|
253
252
|
selected,
|
|
254
253
|
getPos,
|
|
@@ -319,22 +318,6 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
319
318
|
}
|
|
320
319
|
});
|
|
321
320
|
}, [contextIdentifierProviderPromise]);
|
|
322
|
-
React.useEffect(() => {
|
|
323
|
-
var _mediaNode$firstChild;
|
|
324
|
-
// No-op but logging an exposure when an external image is rendered
|
|
325
|
-
// Remove this block when cleaning up platform_editor_add_media_from_url
|
|
326
|
-
if (((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.type) === 'external') {
|
|
327
|
-
if (editorExperiment('add-media-from-url', true)) {
|
|
328
|
-
editorExperiment('add-media-from-url', true, {
|
|
329
|
-
exposure: true
|
|
330
|
-
});
|
|
331
|
-
} else {
|
|
332
|
-
editorExperiment('add-media-from-url', false, {
|
|
333
|
-
exposure: true
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}, [mediaNode]);
|
|
338
321
|
const {
|
|
339
322
|
layout,
|
|
340
323
|
widthType,
|
|
@@ -415,8 +398,7 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
415
398
|
}, [mediaSingleWidthAttribute, widthType, width, layout, contentWidthForLegacyExperience, containerWidth]);
|
|
416
399
|
const currentMaxWidth = isSelected ? pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$m = pluginInjectionApi.media) === null || _pluginInjectionApi$m === void 0 ? void 0 : (_pluginInjectionApi$m2 = _pluginInjectionApi$m.sharedState.currentState()) === null || _pluginInjectionApi$m2 === void 0 ? void 0 : _pluginInjectionApi$m2.currentMaxWidth : undefined;
|
|
417
400
|
const contentWidth = currentMaxWidth || lineLength;
|
|
418
|
-
const isCurrentNodeDrafting = Boolean((annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (mediaNode === null || mediaNode === void 0 ? void 0 : (_mediaNode$
|
|
419
|
-
const shouldShowExternalMediaBadge = childMediaNodeAttrs.type === 'external';
|
|
401
|
+
const isCurrentNodeDrafting = Boolean((annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (mediaNode === null || mediaNode === void 0 ? void 0 : (_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.id));
|
|
420
402
|
const mediaSingleWrapperRef = /*#__PURE__*/React.createRef();
|
|
421
403
|
const captionPlaceHolderRef = /*#__PURE__*/React.createRef();
|
|
422
404
|
const onMediaSingleClicked = React.useCallback(event => {
|
|
@@ -453,28 +435,23 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
453
435
|
,
|
|
454
436
|
className: MediaSingleNodeSelector,
|
|
455
437
|
onClick: onMediaSingleClicked
|
|
456
|
-
},
|
|
438
|
+
}, fg('platform_editor_add_media_from_url_rollout') && jsx(MediaBadges, {
|
|
457
439
|
mediaElement: currentMediaElement(),
|
|
458
440
|
mediaHeight: height,
|
|
459
441
|
mediaWidth: width,
|
|
460
442
|
extendedResizeOffset: fg('platform_editor_media_extended_resize_experience') && !isInsideTable
|
|
461
443
|
}, ({
|
|
462
|
-
badgeSize,
|
|
463
444
|
visible
|
|
464
|
-
}) => jsx(React.Fragment, null,
|
|
465
|
-
badgeSize: badgeSize,
|
|
445
|
+
}) => jsx(React.Fragment, null, visible && jsx(ExternalImageBadge, {
|
|
466
446
|
type: childMediaNodeAttrs.type,
|
|
467
447
|
url: childMediaNodeAttrs.type === 'external' ? childMediaNodeAttrs.url : undefined
|
|
468
|
-
}) : shouldShowExternalMediaBadge && visible && jsx(ExternalImageBadge, {
|
|
469
|
-
badgeSize: badgeSize
|
|
470
448
|
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
471
449
|
view: view,
|
|
472
450
|
api: pluginInjectionApi,
|
|
473
451
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
474
452
|
getPos: getPos,
|
|
475
|
-
isDrafting: isCurrentNodeDrafting
|
|
476
|
-
|
|
477
|
-
}))), !editorExperiment('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
453
|
+
isDrafting: isCurrentNodeDrafting
|
|
454
|
+
}))), !fg('platform_editor_add_media_from_url_rollout') && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
478
455
|
view: view,
|
|
479
456
|
api: pluginInjectionApi,
|
|
480
457
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
@@ -15,7 +15,6 @@ import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
15
15
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
16
16
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
17
17
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
18
|
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
20
19
|
// Ignored via go/ees005
|
|
21
20
|
// eslint-disable-next-line import/no-namespace
|
|
@@ -190,9 +189,6 @@ export class MediaPluginStateImplementation {
|
|
|
190
189
|
});
|
|
191
190
|
_defineProperty(this, "showMediaPicker", () => {
|
|
192
191
|
if (this.openMediaPickerBrowser) {
|
|
193
|
-
editorExperiment('add-media-from-url', false, {
|
|
194
|
-
exposure: true
|
|
195
|
-
});
|
|
196
192
|
return this.openMediaPickerBrowser();
|
|
197
193
|
}
|
|
198
194
|
this.onPopupToggleCallback(true);
|
|
@@ -8,7 +8,6 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
8
8
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { safeInsert as pmSafeInsert, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
11
|
import { copyOptionalAttrsFromMediaState, isInsidePotentialEmptyParagraph } from '../utils/media-common';
|
|
13
12
|
import { findChangeFromLocation, getChangeMediaAnalytics } from './analytics';
|
|
14
13
|
import { isImage } from './is-type';
|
|
@@ -100,7 +99,7 @@ export const insertMediaAsMediaSingle = (view, node, inputMethod, editorAnalytic
|
|
|
100
99
|
return false;
|
|
101
100
|
}
|
|
102
101
|
const resizeExperience = fg('platform_editor_media_extended_resize_experience');
|
|
103
|
-
const insertMediaPopup =
|
|
102
|
+
const insertMediaPopup = fg('platform_editor_add_media_from_url_rollout');
|
|
104
103
|
const mediaSingleAttrs = resizeExperience && insertMediaPopup ? {
|
|
105
104
|
widthType: 'pixel',
|
|
106
105
|
width: getMediaSingleInitialWidth((_node$attrs$width = node.attrs.width) !== null && _node$attrs$width !== void 0 ? _node$attrs$width : DEFAULT_IMAGE_WIDTH),
|
|
@@ -74,7 +74,7 @@ export const CommentBadge = injectIntl(CommentBadgeWrapper);
|
|
|
74
74
|
/**
|
|
75
75
|
* Remove CommentBadgeWrapper component above
|
|
76
76
|
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
77
|
-
* when clean up
|
|
77
|
+
* when clean up platform_editor_add_media_from_url_rollout feature flag
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
80
|
export const CommentBadgeNextWrapper = ({
|
|
@@ -82,8 +82,7 @@ export const CommentBadgeNextWrapper = ({
|
|
|
82
82
|
mediaNode,
|
|
83
83
|
view,
|
|
84
84
|
getPos,
|
|
85
|
-
isDrafting
|
|
86
|
-
badgeSize
|
|
85
|
+
isDrafting
|
|
87
86
|
}) => {
|
|
88
87
|
const [entered, setEntered] = useState(false);
|
|
89
88
|
const {
|
|
@@ -129,7 +128,6 @@ export const CommentBadgeNextWrapper = ({
|
|
|
129
128
|
mediaSingleElement: mediaSingleElement,
|
|
130
129
|
status: entered ? 'entered' : status,
|
|
131
130
|
onMouseEnter: () => setEntered(true),
|
|
132
|
-
onMouseLeave: () => setEntered(false)
|
|
133
|
-
badgeSize: badgeSize
|
|
131
|
+
onMouseLeave: () => setEntered(false)
|
|
134
132
|
});
|
|
135
133
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
4
|
-
import {
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { isExternalMedia } from '../../ui/toolbar/utils';
|
|
6
6
|
const getIdentifier = attrs => {
|
|
7
7
|
if (isExternalMedia(attrs)) {
|
|
@@ -27,7 +27,7 @@ export const RenderMediaViewer = ({
|
|
|
27
27
|
selectedNodeAttrs,
|
|
28
28
|
items = []
|
|
29
29
|
}) => {
|
|
30
|
-
if (
|
|
30
|
+
if (fg('platform_editor_add_media_from_url_rollout')) {
|
|
31
31
|
const identifier = getIdentifier(selectedNodeAttrs);
|
|
32
32
|
const collectionName = isExternalMedia(selectedNodeAttrs) ? '' : selectedNodeAttrs.collection;
|
|
33
33
|
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(MediaViewer, {
|
|
@@ -364,17 +364,19 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
364
364
|
});
|
|
365
365
|
} else {
|
|
366
366
|
var _pluginInjectionApi$a5;
|
|
367
|
+
const inlineTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
367
368
|
const options = [{
|
|
368
369
|
id: 'editor.media.convert.mediainline',
|
|
369
|
-
title:
|
|
370
|
+
title: inlineTitle,
|
|
370
371
|
onClick: changeMediaSingleToMediaInline(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions),
|
|
371
372
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
372
373
|
color: "currentColor",
|
|
373
374
|
spacing: "spacious",
|
|
374
|
-
label:
|
|
375
|
+
label: inlineTitle,
|
|
375
376
|
LEGACY_size: "medium",
|
|
376
377
|
LEGACY_fallbackIcon: IconInline
|
|
377
|
-
})
|
|
378
|
+
}),
|
|
379
|
+
tooltip: hasCaption ? inlineSwitcherTitle : undefined
|
|
378
380
|
}, {
|
|
379
381
|
id: 'editor.media.convert.mediasingle',
|
|
380
382
|
title: floatingSwitcherTitle,
|
package/dist/esm/mediaPlugin.js
CHANGED
|
@@ -297,7 +297,7 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
297
297
|
pluginsOptions: {
|
|
298
298
|
quickInsert: function quickInsert(_ref14) {
|
|
299
299
|
var formatMessage = _ref14.formatMessage;
|
|
300
|
-
return
|
|
300
|
+
return fg('platform_editor_add_media_from_url_rollout') ? [] : [{
|
|
301
301
|
id: 'media',
|
|
302
302
|
title: formatMessage(messages.mediaFiles),
|
|
303
303
|
description: formatMessage(messages.mediaFilesDescription),
|
|
@@ -35,7 +35,6 @@ import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/u
|
|
|
35
35
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
36
36
|
import { getAttrsFromUrl } from '@atlaskit/media-client';
|
|
37
37
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
38
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
39
38
|
import { insertAndSelectCaptionFromMediaSinglePos } from '../pm-plugins/commands/captions';
|
|
40
39
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
41
40
|
import { isMediaBlobUrlFromAttrs } from '../pm-plugins/utils/media-common';
|
|
@@ -309,7 +308,6 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
309
308
|
key: "componentDidMount",
|
|
310
309
|
value: function () {
|
|
311
310
|
var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
312
|
-
var _this$props$node$firs2;
|
|
313
311
|
var contextIdentifierProvider;
|
|
314
312
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
315
313
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -328,20 +326,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
328
326
|
contextIdentifierProvider: _context3.t1
|
|
329
327
|
};
|
|
330
328
|
_context3.t0.setState.call(_context3.t0, _context3.t2);
|
|
331
|
-
|
|
332
|
-
// Remove this block when cleaning up platform_editor_add_media_from_url
|
|
333
|
-
if (((_this$props$node$firs2 = this.props.node.firstChild) === null || _this$props$node$firs2 === void 0 ? void 0 : _this$props$node$firs2.attrs.type) === 'external') {
|
|
334
|
-
if (editorExperiment('add-media-from-url', true)) {
|
|
335
|
-
editorExperiment('add-media-from-url', true, {
|
|
336
|
-
exposure: true
|
|
337
|
-
});
|
|
338
|
-
} else {
|
|
339
|
-
editorExperiment('add-media-from-url', false, {
|
|
340
|
-
exposure: true
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
case 11:
|
|
329
|
+
case 10:
|
|
345
330
|
case "end":
|
|
346
331
|
return _context3.stop();
|
|
347
332
|
}
|
|
@@ -468,7 +453,6 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
468
453
|
var shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
|
|
469
454
|
shouldShowPlaceholder = !editorDisabled && shouldShowPlaceholder;
|
|
470
455
|
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);
|
|
471
|
-
var shouldShowExternalMediaBadge = attrs.type === 'external';
|
|
472
456
|
var pos = getPos();
|
|
473
457
|
var isInsideTable = pos !== undefined && findParentNodeOfTypeClosestToPos(state.doc.resolve(pos), [state.schema.nodes.table]);
|
|
474
458
|
var currentMediaElement = function currentMediaElement() {
|
|
@@ -487,29 +471,24 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
487
471
|
,
|
|
488
472
|
className: MediaSingleNodeSelector,
|
|
489
473
|
onClick: this.onMediaSingleClicked
|
|
490
|
-
},
|
|
474
|
+
}, fg('platform_editor_add_media_from_url_rollout') && jsx(MediaBadges, {
|
|
491
475
|
mediaElement: currentMediaElement(),
|
|
492
476
|
mediaHeight: height,
|
|
493
477
|
mediaWidth: width,
|
|
494
478
|
extendedResizeOffset: fg('platform_editor_media_extended_resize_experience') && !isInsideTable
|
|
495
479
|
}, function (_ref5) {
|
|
496
|
-
var
|
|
497
|
-
|
|
498
|
-
return jsx(React.Fragment, null, fg('platform_editor_hide_external_media_badge') ? visible && jsx(ExternalImageBadge, {
|
|
499
|
-
badgeSize: badgeSize,
|
|
480
|
+
var visible = _ref5.visible;
|
|
481
|
+
return jsx(React.Fragment, null, visible && jsx(ExternalImageBadge, {
|
|
500
482
|
type: attrs.type,
|
|
501
483
|
url: attrs.type === 'external' ? attrs.url : undefined
|
|
502
|
-
}) : shouldShowExternalMediaBadge && visible && jsx(ExternalImageBadge, {
|
|
503
|
-
badgeSize: badgeSize
|
|
504
484
|
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
505
485
|
view: view,
|
|
506
486
|
api: pluginInjectionApi,
|
|
507
487
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
508
488
|
getPos: getPos,
|
|
509
|
-
isDrafting: isCurrentNodeDrafting
|
|
510
|
-
badgeSize: badgeSize
|
|
489
|
+
isDrafting: isCurrentNodeDrafting
|
|
511
490
|
}));
|
|
512
|
-
}), !
|
|
491
|
+
}), !fg('platform_editor_add_media_from_url_rollout') && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
513
492
|
view: view,
|
|
514
493
|
api: pluginInjectionApi,
|
|
515
494
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -22,7 +22,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
22
22
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
23
23
|
import { getAttrsFromUrl } from '@atlaskit/media-client';
|
|
24
24
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
26
25
|
import { insertAndSelectCaptionFromMediaSinglePos } from '../pm-plugins/commands/captions';
|
|
27
26
|
import { isMediaBlobUrlFromAttrs } from '../pm-plugins/utils/media-common';
|
|
28
27
|
import { CaptionPlaceholder, CaptionPlaceholderButton } from '../ui/CaptionPlaceholder';
|
|
@@ -281,7 +280,7 @@ var useUpdateSizeCallback = function useUpdateSizeCallback(_ref5) {
|
|
|
281
280
|
*/
|
|
282
281
|
var FALLBACK_MOST_COMMON_WIDTH = 760;
|
|
283
282
|
export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNextProps) {
|
|
284
|
-
var _pluginInjectionApi$m, _mediaNode$
|
|
283
|
+
var _pluginInjectionApi$m, _mediaNode$firstChild;
|
|
285
284
|
var selected = mediaSingleNodeNextProps.selected,
|
|
286
285
|
getPos = mediaSingleNodeNextProps.getPos,
|
|
287
286
|
nextMediaNode = mediaSingleNodeNextProps.node,
|
|
@@ -357,22 +356,6 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
357
356
|
}
|
|
358
357
|
});
|
|
359
358
|
}, [contextIdentifierProviderPromise]);
|
|
360
|
-
React.useEffect(function () {
|
|
361
|
-
var _mediaNode$firstChild;
|
|
362
|
-
// No-op but logging an exposure when an external image is rendered
|
|
363
|
-
// Remove this block when cleaning up platform_editor_add_media_from_url
|
|
364
|
-
if (((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.type) === 'external') {
|
|
365
|
-
if (editorExperiment('add-media-from-url', true)) {
|
|
366
|
-
editorExperiment('add-media-from-url', true, {
|
|
367
|
-
exposure: true
|
|
368
|
-
});
|
|
369
|
-
} else {
|
|
370
|
-
editorExperiment('add-media-from-url', false, {
|
|
371
|
-
exposure: true
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}, [mediaNode]);
|
|
376
359
|
var _ref6 = mediaNode.attrs,
|
|
377
360
|
layout = _ref6.layout,
|
|
378
361
|
widthType = _ref6.widthType,
|
|
@@ -447,8 +430,7 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
447
430
|
}, [mediaSingleWidthAttribute, widthType, width, layout, contentWidthForLegacyExperience, containerWidth]);
|
|
448
431
|
var currentMaxWidth = isSelected ? pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$m = pluginInjectionApi.media) === null || _pluginInjectionApi$m === void 0 || (_pluginInjectionApi$m = _pluginInjectionApi$m.sharedState.currentState()) === null || _pluginInjectionApi$m === void 0 ? void 0 : _pluginInjectionApi$m.currentMaxWidth : undefined;
|
|
449
432
|
var contentWidth = currentMaxWidth || lineLength;
|
|
450
|
-
var isCurrentNodeDrafting = Boolean((annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (mediaNode === null || mediaNode === void 0 || (_mediaNode$
|
|
451
|
-
var shouldShowExternalMediaBadge = childMediaNodeAttrs.type === 'external';
|
|
433
|
+
var isCurrentNodeDrafting = Boolean((annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (mediaNode === null || mediaNode === void 0 || (_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.id));
|
|
452
434
|
var mediaSingleWrapperRef = /*#__PURE__*/React.createRef();
|
|
453
435
|
var captionPlaceHolderRef = /*#__PURE__*/React.createRef();
|
|
454
436
|
var onMediaSingleClicked = React.useCallback(function (event) {
|
|
@@ -485,29 +467,24 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
485
467
|
,
|
|
486
468
|
className: MediaSingleNodeSelector,
|
|
487
469
|
onClick: onMediaSingleClicked
|
|
488
|
-
},
|
|
470
|
+
}, fg('platform_editor_add_media_from_url_rollout') && jsx(MediaBadges, {
|
|
489
471
|
mediaElement: currentMediaElement(),
|
|
490
472
|
mediaHeight: height,
|
|
491
473
|
mediaWidth: width,
|
|
492
474
|
extendedResizeOffset: fg('platform_editor_media_extended_resize_experience') && !isInsideTable
|
|
493
475
|
}, function (_ref7) {
|
|
494
|
-
var
|
|
495
|
-
|
|
496
|
-
return jsx(React.Fragment, null, fg('platform_editor_hide_external_media_badge') ? visible && jsx(ExternalImageBadge, {
|
|
497
|
-
badgeSize: badgeSize,
|
|
476
|
+
var visible = _ref7.visible;
|
|
477
|
+
return jsx(React.Fragment, null, visible && jsx(ExternalImageBadge, {
|
|
498
478
|
type: childMediaNodeAttrs.type,
|
|
499
479
|
url: childMediaNodeAttrs.type === 'external' ? childMediaNodeAttrs.url : undefined
|
|
500
|
-
}) : shouldShowExternalMediaBadge && visible && jsx(ExternalImageBadge, {
|
|
501
|
-
badgeSize: badgeSize
|
|
502
480
|
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
503
481
|
view: view,
|
|
504
482
|
api: pluginInjectionApi,
|
|
505
483
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
506
484
|
getPos: getPos,
|
|
507
|
-
isDrafting: isCurrentNodeDrafting
|
|
508
|
-
badgeSize: badgeSize
|
|
485
|
+
isDrafting: isCurrentNodeDrafting
|
|
509
486
|
}));
|
|
510
|
-
}), !
|
|
487
|
+
}), !fg('platform_editor_add_media_from_url_rollout') && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
511
488
|
view: view,
|
|
512
489
|
api: pluginInjectionApi,
|
|
513
490
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
@@ -24,7 +24,6 @@ import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
24
24
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
25
25
|
import { isFileIdentifier } from '@atlaskit/media-client';
|
|
26
26
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
27
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
28
27
|
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
29
28
|
// Ignored via go/ees005
|
|
30
29
|
// eslint-disable-next-line import/no-namespace
|
|
@@ -209,9 +208,6 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
209
208
|
});
|
|
210
209
|
_defineProperty(this, "showMediaPicker", function () {
|
|
211
210
|
if (_this.openMediaPickerBrowser) {
|
|
212
|
-
editorExperiment('add-media-from-url', false, {
|
|
213
|
-
exposure: true
|
|
214
|
-
});
|
|
215
211
|
return _this.openMediaPickerBrowser();
|
|
216
212
|
}
|
|
217
213
|
_this.onPopupToggleCallback(true);
|
|
@@ -11,7 +11,6 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
11
11
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { safeInsert as pmSafeInsert, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
14
|
import { copyOptionalAttrsFromMediaState, isInsidePotentialEmptyParagraph } from '../utils/media-common';
|
|
16
15
|
import { findChangeFromLocation, getChangeMediaAnalytics } from './analytics';
|
|
17
16
|
import { isImage } from './is-type';
|
|
@@ -100,7 +99,7 @@ export var insertMediaAsMediaSingle = function insertMediaAsMediaSingle(view, no
|
|
|
100
99
|
return false;
|
|
101
100
|
}
|
|
102
101
|
var resizeExperience = fg('platform_editor_media_extended_resize_experience');
|
|
103
|
-
var insertMediaPopup =
|
|
102
|
+
var insertMediaPopup = fg('platform_editor_add_media_from_url_rollout');
|
|
104
103
|
var mediaSingleAttrs = resizeExperience && insertMediaPopup ? {
|
|
105
104
|
widthType: 'pixel',
|
|
106
105
|
width: getMediaSingleInitialWidth((_node$attrs$width = node.attrs.width) !== null && _node$attrs$width !== void 0 ? _node$attrs$width : DEFAULT_IMAGE_WIDTH),
|
|
@@ -75,7 +75,7 @@ export var CommentBadge = injectIntl(CommentBadgeWrapper);
|
|
|
75
75
|
/**
|
|
76
76
|
* Remove CommentBadgeWrapper component above
|
|
77
77
|
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
78
|
-
* when clean up
|
|
78
|
+
* when clean up platform_editor_add_media_from_url_rollout feature flag
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
81
|
export var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref2) {
|
|
@@ -83,8 +83,7 @@ export var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref2) {
|
|
|
83
83
|
mediaNode = _ref2.mediaNode,
|
|
84
84
|
view = _ref2.view,
|
|
85
85
|
getPos = _ref2.getPos,
|
|
86
|
-
isDrafting = _ref2.isDrafting
|
|
87
|
-
badgeSize = _ref2.badgeSize;
|
|
86
|
+
isDrafting = _ref2.isDrafting;
|
|
88
87
|
var _useState3 = useState(false),
|
|
89
88
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
90
89
|
entered = _useState4[0],
|
|
@@ -130,7 +129,6 @@ export var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref2) {
|
|
|
130
129
|
},
|
|
131
130
|
onMouseLeave: function onMouseLeave() {
|
|
132
131
|
return setEntered(false);
|
|
133
|
-
}
|
|
134
|
-
badgeSize: badgeSize
|
|
132
|
+
}
|
|
135
133
|
});
|
|
136
134
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
4
|
-
import {
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { isExternalMedia } from '../../ui/toolbar/utils';
|
|
6
6
|
var getIdentifier = function getIdentifier(attrs) {
|
|
7
7
|
if (isExternalMedia(attrs)) {
|
|
@@ -26,7 +26,7 @@ export var RenderMediaViewer = function RenderMediaViewer(_ref) {
|
|
|
26
26
|
selectedNodeAttrs = _ref.selectedNodeAttrs,
|
|
27
27
|
_ref$items = _ref.items,
|
|
28
28
|
items = _ref$items === void 0 ? [] : _ref$items;
|
|
29
|
-
if (
|
|
29
|
+
if (fg('platform_editor_add_media_from_url_rollout')) {
|
|
30
30
|
var _identifier = getIdentifier(selectedNodeAttrs);
|
|
31
31
|
var collectionName = isExternalMedia(selectedNodeAttrs) ? '' : selectedNodeAttrs.collection;
|
|
32
32
|
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(MediaViewer, {
|
|
@@ -367,17 +367,19 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
367
367
|
});
|
|
368
368
|
} else {
|
|
369
369
|
var _pluginInjectionApi$a5;
|
|
370
|
+
var inlineTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
370
371
|
var _options2 = [{
|
|
371
372
|
id: 'editor.media.convert.mediainline',
|
|
372
|
-
title:
|
|
373
|
+
title: inlineTitle,
|
|
373
374
|
onClick: changeMediaSingleToMediaInline(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions),
|
|
374
375
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
375
376
|
color: "currentColor",
|
|
376
377
|
spacing: "spacious",
|
|
377
|
-
label:
|
|
378
|
+
label: inlineTitle,
|
|
378
379
|
LEGACY_size: "medium",
|
|
379
380
|
LEGACY_fallbackIcon: IconInline
|
|
380
|
-
})
|
|
381
|
+
}),
|
|
382
|
+
tooltip: hasCaption ? inlineSwitcherTitle : undefined
|
|
381
383
|
}, {
|
|
382
384
|
id: 'editor.media.convert.mediasingle',
|
|
383
385
|
title: floatingSwitcherTitle,
|
|
@@ -21,7 +21,7 @@ export declare const CommentBadge: React.FC<import("react-intl-next").WithIntlPr
|
|
|
21
21
|
/**
|
|
22
22
|
* Remove CommentBadgeWrapper component above
|
|
23
23
|
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
24
|
-
* when clean up
|
|
24
|
+
* when clean up platform_editor_add_media_from_url_rollout feature flag
|
|
25
25
|
*/
|
|
26
26
|
type CommentBadgeNextWrapperProps = {
|
|
27
27
|
mediaSingleElement?: HTMLElement | null;
|
|
@@ -31,7 +31,6 @@ type CommentBadgeNextWrapperProps = {
|
|
|
31
31
|
mediaNode: PMNode | null;
|
|
32
32
|
view: EditorView;
|
|
33
33
|
getPos: getPosHandler;
|
|
34
|
-
badgeSize: 'small' | 'medium';
|
|
35
34
|
};
|
|
36
|
-
export declare const CommentBadgeNextWrapper: ({ api, mediaNode, view, getPos, isDrafting,
|
|
35
|
+
export declare const CommentBadgeNextWrapper: ({ api, mediaNode, view, getPos, isDrafting, }: CommentBadgeNextWrapperProps) => React.JSX.Element | null;
|
|
37
36
|
export {};
|
|
@@ -21,7 +21,7 @@ export declare const CommentBadge: React.FC<import("react-intl-next").WithIntlPr
|
|
|
21
21
|
/**
|
|
22
22
|
* Remove CommentBadgeWrapper component above
|
|
23
23
|
* and rename CommentBadgeNextWrapper to CommentBadgeWrapper
|
|
24
|
-
* when clean up
|
|
24
|
+
* when clean up platform_editor_add_media_from_url_rollout feature flag
|
|
25
25
|
*/
|
|
26
26
|
type CommentBadgeNextWrapperProps = {
|
|
27
27
|
mediaSingleElement?: HTMLElement | null;
|
|
@@ -31,7 +31,6 @@ type CommentBadgeNextWrapperProps = {
|
|
|
31
31
|
mediaNode: PMNode | null;
|
|
32
32
|
view: EditorView;
|
|
33
33
|
getPos: getPosHandler;
|
|
34
|
-
badgeSize: 'small' | 'medium';
|
|
35
34
|
};
|
|
36
|
-
export declare const CommentBadgeNextWrapper: ({ api, mediaNode, view, getPos, isDrafting,
|
|
35
|
+
export declare const CommentBadgeNextWrapper: ({ api, mediaNode, view, getPos, isDrafting, }: CommentBadgeNextWrapperProps) => React.JSX.Element | null;
|
|
37
36
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.13",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
40
|
"@atlaskit/button": "^21.1.0",
|
|
41
|
-
"@atlaskit/editor-common": "^102.
|
|
41
|
+
"@atlaskit/editor-common": "^102.13.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-annotation": "^2.1.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/primitives": "^14.2.0",
|
|
70
70
|
"@atlaskit/textfield": "^8.0.0",
|
|
71
71
|
"@atlaskit/theme": "^18.0.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^4.3.0",
|
|
73
73
|
"@atlaskit/tokens": "^4.5.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.0.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -150,9 +150,6 @@
|
|
|
150
150
|
"confluence_frontend_media_scroll_fix": {
|
|
151
151
|
"type": "boolean"
|
|
152
152
|
},
|
|
153
|
-
"platform_editor_hide_external_media_badge": {
|
|
154
|
-
"type": "boolean"
|
|
155
|
-
},
|
|
156
153
|
"platform_editor_media_block_default": {
|
|
157
154
|
"type": "boolean"
|
|
158
155
|
},
|
|
@@ -165,6 +162,9 @@
|
|
|
165
162
|
"platform_editor_safari_media_clipboard_fix": {
|
|
166
163
|
"type": "boolean"
|
|
167
164
|
},
|
|
165
|
+
"platform_editor_add_media_from_url_rollout": {
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
168
|
"platform_editor_render_media_viewer_as_inline": {
|
|
169
169
|
"type": "boolean"
|
|
170
170
|
}
|