@atlaskit/editor-plugin-media 1.38.6 → 1.39.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 +16 -0
- package/dist/cjs/nodeviews/mediaSingle.js +24 -27
- package/dist/cjs/nodeviews/mediaSingleNext.js +9 -12
- package/dist/cjs/plugin.js +0 -1
- package/dist/cjs/toolbar/comments.js +1 -1
- package/dist/cjs/toolbar/index.js +8 -6
- package/dist/cjs/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/es2019/nodeviews/mediaSingle.js +3 -6
- package/dist/es2019/nodeviews/mediaSingleNext.js +3 -6
- package/dist/es2019/plugin.js +0 -1
- package/dist/es2019/toolbar/comments.js +1 -1
- package/dist/es2019/toolbar/index.js +8 -6
- package/dist/es2019/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/esm/nodeviews/mediaSingle.js +24 -27
- package/dist/esm/nodeviews/mediaSingleNext.js +9 -12
- package/dist/esm/plugin.js +0 -1
- package/dist/esm/toolbar/comments.js +1 -1
- package/dist/esm/toolbar/index.js +8 -6
- package/dist/esm/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/types/types.d.ts +0 -1
- package/dist/types-ts4.5/types.d.ts +0 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.39.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#158723](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/158723)
|
|
8
|
+
[`8ff5b01b0d37f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8ff5b01b0d37f) -
|
|
9
|
+
[ED-24682] Cleanup feature flag for commenting on media in the renderer
|
|
10
|
+
|
|
11
|
+
**@atlaskit/editor-plugin-media**: Add optional checks for the api in Comment Badges on media
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`ccf61c525278a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ccf61c525278a) -
|
|
16
|
+
fix floating toolbar spacing and legacy icon issues
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 1.38.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -353,7 +353,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
353
353
|
}, {
|
|
354
354
|
key: "render",
|
|
355
355
|
value: function render() {
|
|
356
|
-
var
|
|
356
|
+
var _pluginInjectionApi$m, _node$firstChild;
|
|
357
357
|
var _this$props2 = this.props,
|
|
358
358
|
selected = _this$props2.selected,
|
|
359
359
|
getPos = _this$props2.getPos,
|
|
@@ -370,13 +370,10 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
370
370
|
editorDisabled = _this$props2.editorDisabled,
|
|
371
371
|
annotationPluginState = _this$props2.annotationPluginState,
|
|
372
372
|
editorAppearance = _this$props2.editorAppearance;
|
|
373
|
-
var _ref4 =
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
layout = _ref5.layout,
|
|
378
|
-
widthType = _ref5.widthType,
|
|
379
|
-
mediaSingleWidthAttribute = _ref5.width;
|
|
373
|
+
var _ref4 = node.attrs,
|
|
374
|
+
layout = _ref4.layout,
|
|
375
|
+
widthType = _ref4.widthType,
|
|
376
|
+
mediaSingleWidthAttribute = _ref4.width;
|
|
380
377
|
var childNode = node.firstChild;
|
|
381
378
|
var attrs = (childNode === null || childNode === void 0 ? void 0 : childNode.attrs) || {};
|
|
382
379
|
|
|
@@ -490,11 +487,11 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
490
487
|
mediaHeight: height,
|
|
491
488
|
mediaWidth: width,
|
|
492
489
|
extendedResizeOffset: (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
493
|
-
}, function (
|
|
494
|
-
var badgeSize =
|
|
490
|
+
}, function (_ref5) {
|
|
491
|
+
var badgeSize = _ref5.badgeSize;
|
|
495
492
|
return (0, _react2.jsx)(_react.default.Fragment, null, shouldShowExternalMediaBadge && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
496
493
|
badgeSize: badgeSize
|
|
497
|
-
}),
|
|
494
|
+
}), mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadgeNextWrapper, {
|
|
498
495
|
view: view,
|
|
499
496
|
api: pluginInjectionApi,
|
|
500
497
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -502,7 +499,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
502
499
|
isDrafting: isCurrentNodeDrafting,
|
|
503
500
|
badgeSize: badgeSize
|
|
504
501
|
}));
|
|
505
|
-
}), !(0, _experiments.editorExperiment)('add-media-from-url', true) &&
|
|
502
|
+
}), !(0, _experiments.editorExperiment)('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadge, {
|
|
506
503
|
view: view,
|
|
507
504
|
api: pluginInjectionApi,
|
|
508
505
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -541,19 +538,19 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
541
538
|
mediaOptions: {}
|
|
542
539
|
});
|
|
543
540
|
(0, _defineProperty2.default)(MediaSingleNode, "displayName", 'MediaSingleNode');
|
|
544
|
-
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(
|
|
545
|
-
var pluginInjectionApi =
|
|
546
|
-
contextIdentifierProvider =
|
|
547
|
-
node =
|
|
548
|
-
getPos =
|
|
549
|
-
mediaOptions =
|
|
550
|
-
view =
|
|
551
|
-
fullWidthMode =
|
|
552
|
-
selected =
|
|
553
|
-
eventDispatcher =
|
|
554
|
-
dispatchAnalyticsEvent =
|
|
555
|
-
forwardRef =
|
|
556
|
-
editorAppearance =
|
|
541
|
+
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref6) {
|
|
542
|
+
var pluginInjectionApi = _ref6.pluginInjectionApi,
|
|
543
|
+
contextIdentifierProvider = _ref6.contextIdentifierProvider,
|
|
544
|
+
node = _ref6.node,
|
|
545
|
+
getPos = _ref6.getPos,
|
|
546
|
+
mediaOptions = _ref6.mediaOptions,
|
|
547
|
+
view = _ref6.view,
|
|
548
|
+
fullWidthMode = _ref6.fullWidthMode,
|
|
549
|
+
selected = _ref6.selected,
|
|
550
|
+
eventDispatcher = _ref6.eventDispatcher,
|
|
551
|
+
dispatchAnalyticsEvent = _ref6.dispatchAnalyticsEvent,
|
|
552
|
+
forwardRef = _ref6.forwardRef,
|
|
553
|
+
editorAppearance = _ref6.editorAppearance;
|
|
557
554
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width', 'media', 'annotation', 'editorDisabled', 'editorViewMode']),
|
|
558
555
|
widthState = _useSharedPluginState.widthState,
|
|
559
556
|
mediaState = _useSharedPluginState.mediaState,
|
|
@@ -735,8 +732,8 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
735
732
|
return (0, _react2.jsx)(_providerFactory.WithProviders, {
|
|
736
733
|
providers: ['contextIdentifierProvider'],
|
|
737
734
|
providerFactory: providerFactory,
|
|
738
|
-
renderNode: function renderNode(
|
|
739
|
-
var contextIdentifierProvider =
|
|
735
|
+
renderNode: function renderNode(_ref7) {
|
|
736
|
+
var contextIdentifierProvider = _ref7.contextIdentifierProvider;
|
|
740
737
|
return (0, _react2.jsx)(MediaSingleNodeWrapper, {
|
|
741
738
|
pluginInjectionApi: pluginInjectionApi,
|
|
742
739
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
@@ -287,7 +287,7 @@ var useUpdateSizeCallback = function useUpdateSizeCallback(_ref5) {
|
|
|
287
287
|
*/
|
|
288
288
|
var FALLBACK_MOST_COMMON_WIDTH = 760;
|
|
289
289
|
var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNextProps) {
|
|
290
|
-
var
|
|
290
|
+
var _pluginInjectionApi$m, _mediaNode$firstChild2;
|
|
291
291
|
var selected = mediaSingleNodeNextProps.selected,
|
|
292
292
|
getPos = mediaSingleNodeNextProps.getPos,
|
|
293
293
|
nextMediaNode = mediaSingleNodeNextProps.node,
|
|
@@ -306,9 +306,6 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
306
306
|
forwardRef = mediaSingleNodeNextProps.forwardRef,
|
|
307
307
|
contextIdentifierProviderPromise = mediaSingleNodeNextProps.contextIdentifierProvider,
|
|
308
308
|
mediaPluginState = mediaSingleNodeNextProps.mediaPluginState;
|
|
309
|
-
var _ref6 = (mediaOptions === null || mediaOptions === void 0 || (_mediaOptions$getEdit = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit === void 0 ? void 0 : _mediaOptions$getEdit.call(mediaOptions)) || {},
|
|
310
|
-
_ref6$commentsOnMedia = _ref6.commentsOnMedia,
|
|
311
|
-
commentsOnMedia = _ref6$commentsOnMedia === void 0 ? false : _ref6$commentsOnMedia;
|
|
312
309
|
var _React$useState3 = _react.default.useState(null),
|
|
313
310
|
_React$useState4 = (0, _slicedToArray2.default)(_React$useState3, 2),
|
|
314
311
|
mediaProvider = _React$useState4[0],
|
|
@@ -382,10 +379,10 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
382
379
|
}
|
|
383
380
|
}
|
|
384
381
|
}, [mediaNode]);
|
|
385
|
-
var
|
|
386
|
-
layout =
|
|
387
|
-
widthType =
|
|
388
|
-
mediaSingleWidthAttribute =
|
|
382
|
+
var _ref6 = mediaNode.attrs,
|
|
383
|
+
layout = _ref6.layout,
|
|
384
|
+
widthType = _ref6.widthType,
|
|
385
|
+
mediaSingleWidthAttribute = _ref6.width;
|
|
389
386
|
var childNode = mediaNode.firstChild;
|
|
390
387
|
var childMediaNodeAttrs = _react.default.useMemo(function () {
|
|
391
388
|
return (childNode === null || childNode === void 0 ? void 0 : childNode.attrs) || {};
|
|
@@ -497,11 +494,11 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
497
494
|
mediaHeight: height,
|
|
498
495
|
mediaWidth: width,
|
|
499
496
|
extendedResizeOffset: (0, _platformFeatureFlags.fg)('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
500
|
-
}, function (
|
|
501
|
-
var badgeSize =
|
|
497
|
+
}, function (_ref7) {
|
|
498
|
+
var badgeSize = _ref7.badgeSize;
|
|
502
499
|
return (0, _react2.jsx)(_react.default.Fragment, null, shouldShowExternalMediaBadge && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
503
500
|
badgeSize: badgeSize
|
|
504
|
-
}),
|
|
501
|
+
}), mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadgeNextWrapper, {
|
|
505
502
|
view: view,
|
|
506
503
|
api: pluginInjectionApi,
|
|
507
504
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
@@ -509,7 +506,7 @@ var MediaSingleNodeNext = exports.MediaSingleNodeNext = function MediaSingleNode
|
|
|
509
506
|
isDrafting: isCurrentNodeDrafting,
|
|
510
507
|
badgeSize: badgeSize
|
|
511
508
|
}));
|
|
512
|
-
}), !(0, _experiments.editorExperiment)('add-media-from-url', true) &&
|
|
509
|
+
}), !(0, _experiments.editorExperiment)('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && (0, _react2.jsx)(_CommentBadge.CommentBadge, {
|
|
513
510
|
view: view,
|
|
514
511
|
api: pluginInjectionApi,
|
|
515
512
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -339,7 +339,6 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
339
339
|
altTextValidator: options && options.altTextValidator,
|
|
340
340
|
fullWidthEnabled: options && options.fullWidthEnabled,
|
|
341
341
|
allowMediaInlineImages: options && options.allowMediaInlineImages,
|
|
342
|
-
getEditorFeatureFlags: options && options.getEditorFeatureFlags,
|
|
343
342
|
isViewOnly: (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view'
|
|
344
343
|
}, api);
|
|
345
344
|
}
|
|
@@ -33,7 +33,7 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
|
|
|
33
33
|
var _selectMediaNode$attr;
|
|
34
34
|
setInlineCommentDraftState(true,
|
|
35
35
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
36
|
-
_analytics.INPUT_METHOD.FLOATING_TB, 'block',
|
|
36
|
+
_analytics.INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id)(state, dispatch);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
return true;
|
|
@@ -23,6 +23,7 @@ var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image
|
|
|
23
23
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
24
24
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
25
25
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
26
|
+
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
26
27
|
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
27
28
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
28
29
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
@@ -103,7 +104,8 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
103
104
|
var items = [{
|
|
104
105
|
id: 'editor.media.view.switcher.inline',
|
|
105
106
|
type: 'button',
|
|
106
|
-
icon:
|
|
107
|
+
icon: _imageInline.default,
|
|
108
|
+
iconFallback: _card.IconInline,
|
|
107
109
|
selected: false,
|
|
108
110
|
focusEditoronEnter: true,
|
|
109
111
|
disabled: false,
|
|
@@ -114,7 +116,8 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
114
116
|
}, {
|
|
115
117
|
id: 'editor.media.view.switcher.thumbnail',
|
|
116
118
|
type: 'button',
|
|
117
|
-
icon:
|
|
119
|
+
icon: _smartLinkCard.default,
|
|
120
|
+
iconFallback: _card.IconCard,
|
|
118
121
|
selected: true,
|
|
119
122
|
disabled: false,
|
|
120
123
|
focusEditoronEnter: true,
|
|
@@ -193,9 +196,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
193
196
|
allowMediaInline = options.allowMediaInline,
|
|
194
197
|
allowMediaInlineImages = options.allowMediaInlineImages,
|
|
195
198
|
allowImagePreview = options.allowImagePreview,
|
|
196
|
-
getEditorFeatureFlags = options.getEditorFeatureFlags,
|
|
197
199
|
isViewOnly = options.isViewOnly;
|
|
198
|
-
var editorFeatureFlags = getEditorFeatureFlags ? getEditorFeatureFlags() : undefined;
|
|
199
200
|
var toolbarButtons = [];
|
|
200
201
|
var _ref2 = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
|
|
201
202
|
hoverDecoration = _ref2.hoverDecoration;
|
|
@@ -424,7 +425,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
424
425
|
type: 'separator'
|
|
425
426
|
});
|
|
426
427
|
}
|
|
427
|
-
if (
|
|
428
|
+
if (allowCommentsOnMedia) {
|
|
428
429
|
toolbarButtons.push((0, _comments.commentButton)(intl, state, pluginInjectionApi), {
|
|
429
430
|
type: 'separator',
|
|
430
431
|
supportsViewMode: true
|
|
@@ -529,7 +530,8 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
529
530
|
type: 'button',
|
|
530
531
|
appearance: 'danger',
|
|
531
532
|
focusEditoronEnter: true,
|
|
532
|
-
icon:
|
|
533
|
+
icon: _delete.default,
|
|
534
|
+
iconFallback: _remove.default,
|
|
533
535
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
534
536
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
535
537
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
@@ -106,7 +106,8 @@ var LinkToolbarAppearance = exports.LinkToolbarAppearance = function LinkToolbar
|
|
|
106
106
|
}),
|
|
107
107
|
icon: (0, _react2.jsx)(_link.default, {
|
|
108
108
|
color: "currentColor",
|
|
109
|
-
label: _title
|
|
109
|
+
label: _title,
|
|
110
|
+
spacing: "spacious"
|
|
110
111
|
})
|
|
111
112
|
}), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null)) : null;
|
|
112
113
|
}
|
|
@@ -257,7 +257,7 @@ export default class MediaSingleNode extends Component {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
render() {
|
|
260
|
-
var
|
|
260
|
+
var _pluginInjectionApi$m, _pluginInjectionApi$m2, _node$firstChild;
|
|
261
261
|
const {
|
|
262
262
|
selected,
|
|
263
263
|
getPos,
|
|
@@ -277,9 +277,6 @@ export default class MediaSingleNode extends Component {
|
|
|
277
277
|
annotationPluginState,
|
|
278
278
|
editorAppearance
|
|
279
279
|
} = this.props;
|
|
280
|
-
const {
|
|
281
|
-
commentsOnMedia = false
|
|
282
|
-
} = (mediaOptions === null || mediaOptions === void 0 ? void 0 : (_mediaOptions$getEdit = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit === void 0 ? void 0 : _mediaOptions$getEdit.call(mediaOptions)) || {};
|
|
283
280
|
const {
|
|
284
281
|
layout,
|
|
285
282
|
widthType,
|
|
@@ -412,14 +409,14 @@ export default class MediaSingleNode extends Component {
|
|
|
412
409
|
badgeSize
|
|
413
410
|
}) => jsx(React.Fragment, null, shouldShowExternalMediaBadge && jsx(ExternalImageBadge, {
|
|
414
411
|
badgeSize: badgeSize
|
|
415
|
-
}),
|
|
412
|
+
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
416
413
|
view: view,
|
|
417
414
|
api: pluginInjectionApi,
|
|
418
415
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
419
416
|
getPos: getPos,
|
|
420
417
|
isDrafting: isCurrentNodeDrafting,
|
|
421
418
|
badgeSize: badgeSize
|
|
422
|
-
}))), !editorExperiment('add-media-from-url', true) &&
|
|
419
|
+
}))), !editorExperiment('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
423
420
|
view: view,
|
|
424
421
|
api: pluginInjectionApi,
|
|
425
422
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -247,7 +247,7 @@ const useUpdateSizeCallback = ({
|
|
|
247
247
|
*/
|
|
248
248
|
const FALLBACK_MOST_COMMON_WIDTH = 760;
|
|
249
249
|
export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
250
|
-
var
|
|
250
|
+
var _pluginInjectionApi$m, _pluginInjectionApi$m2, _mediaNode$firstChild2;
|
|
251
251
|
const {
|
|
252
252
|
selected,
|
|
253
253
|
getPos,
|
|
@@ -268,9 +268,6 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
268
268
|
contextIdentifierProvider: contextIdentifierProviderPromise,
|
|
269
269
|
mediaPluginState
|
|
270
270
|
} = mediaSingleNodeNextProps;
|
|
271
|
-
const {
|
|
272
|
-
commentsOnMedia = false
|
|
273
|
-
} = (mediaOptions === null || mediaOptions === void 0 ? void 0 : (_mediaOptions$getEdit = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit === void 0 ? void 0 : _mediaOptions$getEdit.call(mediaOptions)) || {};
|
|
274
271
|
const [mediaProvider, setMediaProvider] = React.useState(null);
|
|
275
272
|
const [_contextIdentifierProvider, setContextIdentifierProvider] = React.useState(null);
|
|
276
273
|
const [viewMediaClientConfig, setViewMediaClientConfig] = React.useState();
|
|
@@ -462,14 +459,14 @@ export const MediaSingleNodeNext = mediaSingleNodeNextProps => {
|
|
|
462
459
|
badgeSize
|
|
463
460
|
}) => jsx(React.Fragment, null, shouldShowExternalMediaBadge && jsx(ExternalImageBadge, {
|
|
464
461
|
badgeSize: badgeSize
|
|
465
|
-
}),
|
|
462
|
+
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
466
463
|
view: view,
|
|
467
464
|
api: pluginInjectionApi,
|
|
468
465
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
469
466
|
getPos: getPos,
|
|
470
467
|
isDrafting: isCurrentNodeDrafting,
|
|
471
468
|
badgeSize: badgeSize
|
|
472
|
-
}))), !editorExperiment('add-media-from-url', true) &&
|
|
469
|
+
}))), !editorExperiment('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
473
470
|
view: view,
|
|
474
471
|
api: pluginInjectionApi,
|
|
475
472
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -335,7 +335,6 @@ export const mediaPlugin = ({
|
|
|
335
335
|
altTextValidator: options && options.altTextValidator,
|
|
336
336
|
fullWidthEnabled: options && options.fullWidthEnabled,
|
|
337
337
|
allowMediaInlineImages: options && options.allowMediaInlineImages,
|
|
338
|
-
getEditorFeatureFlags: options && options.getEditorFeatureFlags,
|
|
339
338
|
isViewOnly: (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view'
|
|
340
339
|
}, api);
|
|
341
340
|
}
|
|
@@ -25,7 +25,7 @@ export const commentButton = (intl, state, api) => {
|
|
|
25
25
|
var _selectMediaNode$attr;
|
|
26
26
|
setInlineCommentDraftState(true,
|
|
27
27
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
28
|
-
INPUT_METHOD.FLOATING_TB, 'block',
|
|
28
|
+
INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id)(state, dispatch);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
return true;
|
|
@@ -13,6 +13,7 @@ import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
|
13
13
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
14
14
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
15
15
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
16
|
+
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
16
17
|
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
17
18
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
18
19
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
@@ -92,7 +93,8 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
92
93
|
const items = [{
|
|
93
94
|
id: 'editor.media.view.switcher.inline',
|
|
94
95
|
type: 'button',
|
|
95
|
-
icon:
|
|
96
|
+
icon: ImageInlineIcon,
|
|
97
|
+
iconFallback: IconInline,
|
|
96
98
|
selected: false,
|
|
97
99
|
focusEditoronEnter: true,
|
|
98
100
|
disabled: false,
|
|
@@ -103,7 +105,8 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
103
105
|
}, {
|
|
104
106
|
id: 'editor.media.view.switcher.thumbnail',
|
|
105
107
|
type: 'button',
|
|
106
|
-
icon:
|
|
108
|
+
icon: SmartLinkCardIcon,
|
|
109
|
+
iconFallback: IconCard,
|
|
107
110
|
selected: true,
|
|
108
111
|
disabled: false,
|
|
109
112
|
focusEditoronEnter: true,
|
|
@@ -183,10 +186,8 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
183
186
|
allowMediaInline,
|
|
184
187
|
allowMediaInlineImages,
|
|
185
188
|
allowImagePreview,
|
|
186
|
-
getEditorFeatureFlags,
|
|
187
189
|
isViewOnly
|
|
188
190
|
} = options;
|
|
189
|
-
const editorFeatureFlags = getEditorFeatureFlags ? getEditorFeatureFlags() : undefined;
|
|
190
191
|
let toolbarButtons = [];
|
|
191
192
|
const {
|
|
192
193
|
hoverDecoration
|
|
@@ -422,7 +423,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
422
423
|
type: 'separator'
|
|
423
424
|
});
|
|
424
425
|
}
|
|
425
|
-
if (
|
|
426
|
+
if (allowCommentsOnMedia) {
|
|
426
427
|
toolbarButtons.push(commentButton(intl, state, pluginInjectionApi), {
|
|
427
428
|
type: 'separator',
|
|
428
429
|
supportsViewMode: true
|
|
@@ -533,7 +534,8 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
533
534
|
type: 'button',
|
|
534
535
|
appearance: 'danger',
|
|
535
536
|
focusEditoronEnter: true,
|
|
536
|
-
icon:
|
|
537
|
+
icon: DeleteIcon,
|
|
538
|
+
iconFallback: RemoveIcon,
|
|
537
539
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
538
540
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
539
541
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
@@ -347,7 +347,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
347
347
|
}, {
|
|
348
348
|
key: "render",
|
|
349
349
|
value: function render() {
|
|
350
|
-
var
|
|
350
|
+
var _pluginInjectionApi$m, _node$firstChild;
|
|
351
351
|
var _this$props2 = this.props,
|
|
352
352
|
selected = _this$props2.selected,
|
|
353
353
|
getPos = _this$props2.getPos,
|
|
@@ -364,13 +364,10 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
364
364
|
editorDisabled = _this$props2.editorDisabled,
|
|
365
365
|
annotationPluginState = _this$props2.annotationPluginState,
|
|
366
366
|
editorAppearance = _this$props2.editorAppearance;
|
|
367
|
-
var _ref4 =
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
layout = _ref5.layout,
|
|
372
|
-
widthType = _ref5.widthType,
|
|
373
|
-
mediaSingleWidthAttribute = _ref5.width;
|
|
367
|
+
var _ref4 = node.attrs,
|
|
368
|
+
layout = _ref4.layout,
|
|
369
|
+
widthType = _ref4.widthType,
|
|
370
|
+
mediaSingleWidthAttribute = _ref4.width;
|
|
374
371
|
var childNode = node.firstChild;
|
|
375
372
|
var attrs = (childNode === null || childNode === void 0 ? void 0 : childNode.attrs) || {};
|
|
376
373
|
|
|
@@ -484,11 +481,11 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
484
481
|
mediaHeight: height,
|
|
485
482
|
mediaWidth: width,
|
|
486
483
|
extendedResizeOffset: fg('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
487
|
-
}, function (
|
|
488
|
-
var badgeSize =
|
|
484
|
+
}, function (_ref5) {
|
|
485
|
+
var badgeSize = _ref5.badgeSize;
|
|
489
486
|
return jsx(React.Fragment, null, shouldShowExternalMediaBadge && jsx(ExternalImageBadge, {
|
|
490
487
|
badgeSize: badgeSize
|
|
491
|
-
}),
|
|
488
|
+
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
492
489
|
view: view,
|
|
493
490
|
api: pluginInjectionApi,
|
|
494
491
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -496,7 +493,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
496
493
|
isDrafting: isCurrentNodeDrafting,
|
|
497
494
|
badgeSize: badgeSize
|
|
498
495
|
}));
|
|
499
|
-
}), !editorExperiment('add-media-from-url', true) &&
|
|
496
|
+
}), !editorExperiment('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
500
497
|
view: view,
|
|
501
498
|
api: pluginInjectionApi,
|
|
502
499
|
mediaNode: node === null || node === void 0 ? void 0 : node.firstChild,
|
|
@@ -536,19 +533,19 @@ _defineProperty(MediaSingleNode, "defaultProps", {
|
|
|
536
533
|
});
|
|
537
534
|
_defineProperty(MediaSingleNode, "displayName", 'MediaSingleNode');
|
|
538
535
|
export { MediaSingleNode as default };
|
|
539
|
-
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(
|
|
540
|
-
var pluginInjectionApi =
|
|
541
|
-
contextIdentifierProvider =
|
|
542
|
-
node =
|
|
543
|
-
getPos =
|
|
544
|
-
mediaOptions =
|
|
545
|
-
view =
|
|
546
|
-
fullWidthMode =
|
|
547
|
-
selected =
|
|
548
|
-
eventDispatcher =
|
|
549
|
-
dispatchAnalyticsEvent =
|
|
550
|
-
forwardRef =
|
|
551
|
-
editorAppearance =
|
|
536
|
+
var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref6) {
|
|
537
|
+
var pluginInjectionApi = _ref6.pluginInjectionApi,
|
|
538
|
+
contextIdentifierProvider = _ref6.contextIdentifierProvider,
|
|
539
|
+
node = _ref6.node,
|
|
540
|
+
getPos = _ref6.getPos,
|
|
541
|
+
mediaOptions = _ref6.mediaOptions,
|
|
542
|
+
view = _ref6.view,
|
|
543
|
+
fullWidthMode = _ref6.fullWidthMode,
|
|
544
|
+
selected = _ref6.selected,
|
|
545
|
+
eventDispatcher = _ref6.eventDispatcher,
|
|
546
|
+
dispatchAnalyticsEvent = _ref6.dispatchAnalyticsEvent,
|
|
547
|
+
forwardRef = _ref6.forwardRef,
|
|
548
|
+
editorAppearance = _ref6.editorAppearance;
|
|
552
549
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width', 'media', 'annotation', 'editorDisabled', 'editorViewMode']),
|
|
553
550
|
widthState = _useSharedPluginState.widthState,
|
|
554
551
|
mediaState = _useSharedPluginState.mediaState,
|
|
@@ -730,8 +727,8 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
730
727
|
return jsx(WithProviders, {
|
|
731
728
|
providers: ['contextIdentifierProvider'],
|
|
732
729
|
providerFactory: providerFactory,
|
|
733
|
-
renderNode: function renderNode(
|
|
734
|
-
var contextIdentifierProvider =
|
|
730
|
+
renderNode: function renderNode(_ref7) {
|
|
731
|
+
var contextIdentifierProvider = _ref7.contextIdentifierProvider;
|
|
735
732
|
return jsx(MediaSingleNodeWrapper, {
|
|
736
733
|
pluginInjectionApi: pluginInjectionApi,
|
|
737
734
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
@@ -280,7 +280,7 @@ var useUpdateSizeCallback = function useUpdateSizeCallback(_ref5) {
|
|
|
280
280
|
*/
|
|
281
281
|
var FALLBACK_MOST_COMMON_WIDTH = 760;
|
|
282
282
|
export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNextProps) {
|
|
283
|
-
var
|
|
283
|
+
var _pluginInjectionApi$m, _mediaNode$firstChild2;
|
|
284
284
|
var selected = mediaSingleNodeNextProps.selected,
|
|
285
285
|
getPos = mediaSingleNodeNextProps.getPos,
|
|
286
286
|
nextMediaNode = mediaSingleNodeNextProps.node,
|
|
@@ -299,9 +299,6 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
299
299
|
forwardRef = mediaSingleNodeNextProps.forwardRef,
|
|
300
300
|
contextIdentifierProviderPromise = mediaSingleNodeNextProps.contextIdentifierProvider,
|
|
301
301
|
mediaPluginState = mediaSingleNodeNextProps.mediaPluginState;
|
|
302
|
-
var _ref6 = (mediaOptions === null || mediaOptions === void 0 || (_mediaOptions$getEdit = mediaOptions.getEditorFeatureFlags) === null || _mediaOptions$getEdit === void 0 ? void 0 : _mediaOptions$getEdit.call(mediaOptions)) || {},
|
|
303
|
-
_ref6$commentsOnMedia = _ref6.commentsOnMedia,
|
|
304
|
-
commentsOnMedia = _ref6$commentsOnMedia === void 0 ? false : _ref6$commentsOnMedia;
|
|
305
302
|
var _React$useState3 = React.useState(null),
|
|
306
303
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
307
304
|
mediaProvider = _React$useState4[0],
|
|
@@ -375,10 +372,10 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
375
372
|
}
|
|
376
373
|
}
|
|
377
374
|
}, [mediaNode]);
|
|
378
|
-
var
|
|
379
|
-
layout =
|
|
380
|
-
widthType =
|
|
381
|
-
mediaSingleWidthAttribute =
|
|
375
|
+
var _ref6 = mediaNode.attrs,
|
|
376
|
+
layout = _ref6.layout,
|
|
377
|
+
widthType = _ref6.widthType,
|
|
378
|
+
mediaSingleWidthAttribute = _ref6.width;
|
|
382
379
|
var childNode = mediaNode.firstChild;
|
|
383
380
|
var childMediaNodeAttrs = React.useMemo(function () {
|
|
384
381
|
return (childNode === null || childNode === void 0 ? void 0 : childNode.attrs) || {};
|
|
@@ -490,11 +487,11 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
490
487
|
mediaHeight: height,
|
|
491
488
|
mediaWidth: width,
|
|
492
489
|
extendedResizeOffset: fg('platform.editor.media.extended-resize-experience') && !isInsideTable
|
|
493
|
-
}, function (
|
|
494
|
-
var badgeSize =
|
|
490
|
+
}, function (_ref7) {
|
|
491
|
+
var badgeSize = _ref7.badgeSize;
|
|
495
492
|
return jsx(React.Fragment, null, shouldShowExternalMediaBadge && jsx(ExternalImageBadge, {
|
|
496
493
|
badgeSize: badgeSize
|
|
497
|
-
}),
|
|
494
|
+
}), mediaOptions.allowCommentsOnMedia && jsx(CommentBadgeNextWrapper, {
|
|
498
495
|
view: view,
|
|
499
496
|
api: pluginInjectionApi,
|
|
500
497
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
|
@@ -502,7 +499,7 @@ export var MediaSingleNodeNext = function MediaSingleNodeNext(mediaSingleNodeNex
|
|
|
502
499
|
isDrafting: isCurrentNodeDrafting,
|
|
503
500
|
badgeSize: badgeSize
|
|
504
501
|
}));
|
|
505
|
-
}), !editorExperiment('add-media-from-url', true) &&
|
|
502
|
+
}), !editorExperiment('add-media-from-url', true) && mediaOptions.allowCommentsOnMedia && jsx(CommentBadge, {
|
|
506
503
|
view: view,
|
|
507
504
|
api: pluginInjectionApi,
|
|
508
505
|
mediaNode: mediaNode === null || mediaNode === void 0 ? void 0 : mediaNode.firstChild,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -329,7 +329,6 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
|
|
|
329
329
|
altTextValidator: options && options.altTextValidator,
|
|
330
330
|
fullWidthEnabled: options && options.fullWidthEnabled,
|
|
331
331
|
allowMediaInlineImages: options && options.allowMediaInlineImages,
|
|
332
|
-
getEditorFeatureFlags: options && options.getEditorFeatureFlags,
|
|
333
332
|
isViewOnly: (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view'
|
|
334
333
|
}, api);
|
|
335
334
|
}
|
|
@@ -26,7 +26,7 @@ export var commentButton = function commentButton(intl, state, api) {
|
|
|
26
26
|
var _selectMediaNode$attr;
|
|
27
27
|
setInlineCommentDraftState(true,
|
|
28
28
|
// TODO: might need to update to reflect it's from media floating toolbar
|
|
29
|
-
INPUT_METHOD.FLOATING_TB, 'block',
|
|
29
|
+
INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id)(state, dispatch);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
return true;
|
|
@@ -17,6 +17,7 @@ import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
|
17
17
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
18
18
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
19
19
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
20
|
+
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
20
21
|
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
21
22
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
22
23
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
@@ -93,7 +94,8 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
93
94
|
var items = [{
|
|
94
95
|
id: 'editor.media.view.switcher.inline',
|
|
95
96
|
type: 'button',
|
|
96
|
-
icon:
|
|
97
|
+
icon: ImageInlineIcon,
|
|
98
|
+
iconFallback: IconInline,
|
|
97
99
|
selected: false,
|
|
98
100
|
focusEditoronEnter: true,
|
|
99
101
|
disabled: false,
|
|
@@ -104,7 +106,8 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
104
106
|
}, {
|
|
105
107
|
id: 'editor.media.view.switcher.thumbnail',
|
|
106
108
|
type: 'button',
|
|
107
|
-
icon:
|
|
109
|
+
icon: SmartLinkCardIcon,
|
|
110
|
+
iconFallback: IconCard,
|
|
108
111
|
selected: true,
|
|
109
112
|
disabled: false,
|
|
110
113
|
focusEditoronEnter: true,
|
|
@@ -183,9 +186,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
183
186
|
allowMediaInline = options.allowMediaInline,
|
|
184
187
|
allowMediaInlineImages = options.allowMediaInlineImages,
|
|
185
188
|
allowImagePreview = options.allowImagePreview,
|
|
186
|
-
getEditorFeatureFlags = options.getEditorFeatureFlags,
|
|
187
189
|
isViewOnly = options.isViewOnly;
|
|
188
|
-
var editorFeatureFlags = getEditorFeatureFlags ? getEditorFeatureFlags() : undefined;
|
|
189
190
|
var toolbarButtons = [];
|
|
190
191
|
var _ref2 = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
|
|
191
192
|
hoverDecoration = _ref2.hoverDecoration;
|
|
@@ -414,7 +415,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
414
415
|
type: 'separator'
|
|
415
416
|
});
|
|
416
417
|
}
|
|
417
|
-
if (
|
|
418
|
+
if (allowCommentsOnMedia) {
|
|
418
419
|
toolbarButtons.push(commentButton(intl, state, pluginInjectionApi), {
|
|
419
420
|
type: 'separator',
|
|
420
421
|
supportsViewMode: true
|
|
@@ -519,7 +520,8 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
519
520
|
type: 'button',
|
|
520
521
|
appearance: 'danger',
|
|
521
522
|
focusEditoronEnter: true,
|
|
522
|
-
icon:
|
|
523
|
+
icon: DeleteIcon,
|
|
524
|
+
iconFallback: RemoveIcon,
|
|
523
525
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
524
526
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
525
527
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
package/dist/types/types.d.ts
CHANGED
|
@@ -112,7 +112,6 @@ export type MediaFloatingToolbarOptions = {
|
|
|
112
112
|
allowAltTextOnImages?: boolean;
|
|
113
113
|
allowImagePreview?: boolean;
|
|
114
114
|
altTextValidator?: (value: string) => string[];
|
|
115
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
116
115
|
fullWidthEnabled?: boolean;
|
|
117
116
|
allowCommentsOnMedia?: boolean;
|
|
118
117
|
isViewOnly?: boolean;
|
|
@@ -112,7 +112,6 @@ export type MediaFloatingToolbarOptions = {
|
|
|
112
112
|
allowAltTextOnImages?: boolean;
|
|
113
113
|
allowImagePreview?: boolean;
|
|
114
114
|
altTextValidator?: (value: string) => string[];
|
|
115
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
116
115
|
fullWidthEnabled?: boolean;
|
|
117
116
|
allowCommentsOnMedia?: boolean;
|
|
118
117
|
isViewOnly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.39.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/editor-common": "^94.9.0",
|
|
40
40
|
"@atlaskit/editor-palette": "1.6.3",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
42
|
-
"@atlaskit/editor-plugin-annotation": "1.23.
|
|
42
|
+
"@atlaskit/editor-plugin-annotation": "1.23.3",
|
|
43
43
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
44
44
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
45
45
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/icon": "^22.24.0",
|
|
57
57
|
"@atlaskit/media-card": "^78.10.0",
|
|
58
58
|
"@atlaskit/media-client": "^28.0.0",
|
|
59
|
-
"@atlaskit/media-client-react": "^2.
|
|
59
|
+
"@atlaskit/media-client-react": "^2.3.0",
|
|
60
60
|
"@atlaskit/media-common": "^11.7.0",
|
|
61
61
|
"@atlaskit/media-filmstrip": "^47.4.0",
|
|
62
62
|
"@atlaskit/media-picker": "^67.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/primitives": "^13.0.0",
|
|
67
67
|
"@atlaskit/textfield": "^6.5.0",
|
|
68
68
|
"@atlaskit/theme": "^14.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^2.11.0",
|
|
70
70
|
"@atlaskit/tokens": "^2.0.0",
|
|
71
71
|
"@atlaskit/tooltip": "^18.8.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|