@atlaskit/editor-plugin-media 3.0.8 → 3.0.10
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/ui/toolbar/comments.js +0 -2
- package/dist/cjs/ui/toolbar/index.js +27 -40
- package/dist/cjs/ui/toolbar/linking-toolbar-appearance.js +1 -3
- package/dist/cjs/ui/toolbar/mediaInline.js +23 -37
- package/dist/cjs/ui/toolbar/utils.js +68 -1
- package/dist/es2019/ui/toolbar/comments.js +0 -2
- package/dist/es2019/ui/toolbar/index.js +27 -40
- package/dist/es2019/ui/toolbar/linking-toolbar-appearance.js +1 -3
- package/dist/es2019/ui/toolbar/mediaInline.js +22 -36
- package/dist/es2019/ui/toolbar/utils.js +62 -0
- package/dist/esm/ui/toolbar/comments.js +0 -2
- package/dist/esm/ui/toolbar/index.js +29 -42
- package/dist/esm/ui/toolbar/linking-toolbar-appearance.js +1 -3
- package/dist/esm/ui/toolbar/mediaInline.js +24 -38
- package/dist/esm/ui/toolbar/utils.js +67 -0
- package/dist/types/ui/toolbar/commands.d.ts +1 -1
- package/dist/types/ui/toolbar/utils.d.ts +4 -1
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/utils.d.ts +4 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 3.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#161063](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161063)
|
|
8
|
+
[`1a976ba4cbdc4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1a976ba4cbdc4) -
|
|
9
|
+
[ED-26871] Remove icon fallback for toolbar icons and create an utility function that returns size
|
|
10
|
+
option dropdown config for inline and block node types
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 3.0.9
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 3.0.8
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -13,7 +13,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
|
-
var _commentWithDotIcon = require("./assets/commentWithDotIcon");
|
|
17
16
|
var _utils = require("./utils");
|
|
18
17
|
var commentButton = exports.commentButton = function commentButton(intl, state, api, onCommentButtonMount) {
|
|
19
18
|
var _getSelectedMediaSing, _api$annotation, _api$connectivity;
|
|
@@ -46,7 +45,6 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
|
|
|
46
45
|
type: 'button',
|
|
47
46
|
testId: 'add-comment-media-button',
|
|
48
47
|
icon: _comment.default,
|
|
49
|
-
iconFallback: hasActiveComments ? _commentWithDotIcon.CommentWithDotIcon : _comment.default,
|
|
50
48
|
title: (0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? title : buttonLabel,
|
|
51
49
|
showTitle: (0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? undefined : true,
|
|
52
50
|
onClick: onClickHandler,
|
|
@@ -24,7 +24,6 @@ var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-dia
|
|
|
24
24
|
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
25
25
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
26
26
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
27
|
-
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
28
27
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
29
28
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
30
29
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
@@ -131,7 +130,6 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
131
130
|
testId: 'file-preview-toolbar-button',
|
|
132
131
|
type: 'button',
|
|
133
132
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
134
|
-
iconFallback: _maximize.default,
|
|
135
133
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
136
134
|
onClick: function onClick() {
|
|
137
135
|
var _handleShowMediaViewe;
|
|
@@ -166,7 +164,6 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
166
164
|
id: 'editor.media.view.switcher.inline',
|
|
167
165
|
type: 'button',
|
|
168
166
|
icon: _imageInline.default,
|
|
169
|
-
iconFallback: _card.IconInline,
|
|
170
167
|
selected: false,
|
|
171
168
|
focusEditoronEnter: true,
|
|
172
169
|
disabled: false,
|
|
@@ -178,7 +175,6 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
178
175
|
id: 'editor.media.view.switcher.thumbnail',
|
|
179
176
|
type: 'button',
|
|
180
177
|
icon: _smartLinkCard.default,
|
|
181
|
-
iconFallback: _card.IconCard,
|
|
182
178
|
selected: true,
|
|
183
179
|
disabled: false,
|
|
184
180
|
focusEditoronEnter: true,
|
|
@@ -210,7 +206,6 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
210
206
|
appearance: 'danger',
|
|
211
207
|
focusEditoronEnter: true,
|
|
212
208
|
icon: _delete.default,
|
|
213
|
-
iconFallback: _deleteEditorRemove.default,
|
|
214
209
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
215
210
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
216
211
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
@@ -407,9 +402,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
407
402
|
return /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
408
403
|
color: "currentColor",
|
|
409
404
|
spacing: "spacious",
|
|
410
|
-
label: inlineSwitcherTitle
|
|
411
|
-
LEGACY_size: "medium",
|
|
412
|
-
LEGACY_fallbackIcon: _card.IconInline
|
|
405
|
+
label: inlineSwitcherTitle
|
|
413
406
|
});
|
|
414
407
|
},
|
|
415
408
|
onClick: (0, _commands.changeMediaSingleToMediaInline)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions),
|
|
@@ -422,9 +415,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
422
415
|
return /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
423
416
|
color: "currentColor",
|
|
424
417
|
spacing: "spacious",
|
|
425
|
-
label: floatingSwitcherTitle
|
|
426
|
-
LEGACY_size: "medium",
|
|
427
|
-
LEGACY_fallbackIcon: _card.IconEmbed
|
|
418
|
+
label: floatingSwitcherTitle
|
|
428
419
|
});
|
|
429
420
|
},
|
|
430
421
|
onClick: function onClick() {
|
|
@@ -445,9 +436,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
445
436
|
icon: /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
446
437
|
color: "currentColor",
|
|
447
438
|
spacing: "spacious",
|
|
448
|
-
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : inlineTitle
|
|
449
|
-
LEGACY_size: "medium",
|
|
450
|
-
LEGACY_fallbackIcon: _card.IconInline
|
|
439
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : inlineTitle
|
|
451
440
|
}),
|
|
452
441
|
tooltip: hasCaption ? inlineSwitcherTitle : undefined
|
|
453
442
|
}, {
|
|
@@ -464,31 +453,32 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
464
453
|
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
465
454
|
color: "currentColor",
|
|
466
455
|
spacing: "spacious",
|
|
467
|
-
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle
|
|
468
|
-
LEGACY_size: "medium",
|
|
469
|
-
LEGACY_fallbackIcon: _card.IconEmbed
|
|
456
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle
|
|
470
457
|
})
|
|
471
458
|
}];
|
|
472
|
-
var switchFromBlockToInline
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
459
|
+
var switchFromBlockToInline;
|
|
460
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_11')) {
|
|
461
|
+
switchFromBlockToInline = (0, _utils2.getMediaSingleAndMediaInlineSwitcherDropdown)('block', intl, pluginInjectionApi, hasCaption);
|
|
462
|
+
} else {
|
|
463
|
+
switchFromBlockToInline = {
|
|
464
|
+
id: 'media-block-to-inline-toolbar-item',
|
|
465
|
+
testId: 'media-inline-to-block-dropdown',
|
|
466
|
+
type: 'dropdown',
|
|
467
|
+
options: _options2,
|
|
468
|
+
title: intl.formatMessage(_mediaUi.messages.sizeOptions),
|
|
469
|
+
icon: function icon() {
|
|
470
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? /*#__PURE__*/_react.default.createElement(_maximize.default, {
|
|
471
|
+
color: "currentColor",
|
|
472
|
+
spacing: "spacious",
|
|
473
|
+
label: intl.formatMessage(_mediaUi.messages.sizeOptions)
|
|
474
|
+
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
475
|
+
color: "currentColor",
|
|
476
|
+
spacing: "spacious",
|
|
477
|
+
label: intl.formatMessage(_mediaUi.messages.sizeOptions)
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
}
|
|
492
482
|
toolbarButtons.push(switchFromBlockToInline, {
|
|
493
483
|
type: 'separator',
|
|
494
484
|
fullHeight: true
|
|
@@ -611,7 +601,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
611
601
|
testId: 'file-preview-toolbar-button',
|
|
612
602
|
type: 'button',
|
|
613
603
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
614
|
-
iconFallback: _maximize.default,
|
|
615
604
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
616
605
|
onClick: function onClick() {
|
|
617
606
|
var _handleShowMediaViewe2;
|
|
@@ -660,7 +649,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
660
649
|
appearance: 'danger',
|
|
661
650
|
focusEditoronEnter: true,
|
|
662
651
|
icon: _delete.default,
|
|
663
|
-
iconFallback: _deleteEditorRemove.default,
|
|
664
652
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
665
653
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
666
654
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
@@ -698,7 +686,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
698
686
|
testId: 'file-preview-toolbar-button',
|
|
699
687
|
type: 'button',
|
|
700
688
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
701
|
-
iconFallback: _maximize.default,
|
|
702
689
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
703
690
|
onClick: function onClick() {
|
|
704
691
|
var _handleShowMediaViewe3;
|
|
@@ -15,7 +15,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
15
15
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
16
16
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
17
17
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/migration/link"));
|
|
18
|
-
var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
|
|
19
18
|
var _currentMediaNode = require("../../pm-plugins//utils/current-media-node");
|
|
20
19
|
var _pluginKey = require("../../pm-plugins/plugin-key");
|
|
21
20
|
var _checkMediaType = require("../../pm-plugins/utils/check-media-type");
|
|
@@ -87,8 +86,7 @@ var LinkToolbarAppearance = exports.LinkToolbarAppearance = function LinkToolbar
|
|
|
87
86
|
icon: (0, _react2.jsx)(_linkExternal.default, {
|
|
88
87
|
color: "currentColor",
|
|
89
88
|
spacing: "spacious",
|
|
90
|
-
label: linkTitle
|
|
91
|
-
LEGACY_fallbackIcon: _shortcut.default
|
|
89
|
+
label: linkTitle
|
|
92
90
|
})
|
|
93
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
94
92
|
,
|
|
@@ -9,7 +9,6 @@ exports.generateMediaInlineFloatingToolbar = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
|
-
var _card = require("@atlaskit/editor-common/card");
|
|
13
12
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
14
13
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
15
14
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
@@ -17,7 +16,6 @@ var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-dia
|
|
|
17
16
|
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
18
17
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
19
18
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
20
|
-
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
21
19
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
22
20
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
23
21
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
@@ -57,8 +55,6 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
57
55
|
testId: 'file-preview-toolbar-button',
|
|
58
56
|
type: 'button',
|
|
59
57
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
60
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
61
|
-
iconFallback: _maximize.default,
|
|
62
58
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
63
59
|
onClick: function onClick() {
|
|
64
60
|
var _handleShowMediaViewe;
|
|
@@ -87,7 +83,6 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
87
83
|
id: 'editor.media.view.switcher.inline',
|
|
88
84
|
type: 'button',
|
|
89
85
|
icon: _imageInline.default,
|
|
90
|
-
iconFallback: _card.IconInline,
|
|
91
86
|
selected: true,
|
|
92
87
|
disabled: false,
|
|
93
88
|
focusEditoronEnter: true,
|
|
@@ -101,7 +96,6 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
101
96
|
id: 'editor.media.view.switcher.thumbnail',
|
|
102
97
|
type: 'button',
|
|
103
98
|
icon: _smartLinkCard.default,
|
|
104
|
-
iconFallback: _card.IconCard,
|
|
105
99
|
selected: false,
|
|
106
100
|
disabled: false,
|
|
107
101
|
focusEditoronEnter: true,
|
|
@@ -131,7 +125,6 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
131
125
|
appearance: 'danger',
|
|
132
126
|
focusEditoronEnter: true,
|
|
133
127
|
icon: _delete.default,
|
|
134
|
-
iconFallback: _deleteEditorRemove.default,
|
|
135
128
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
136
129
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
137
130
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
@@ -253,9 +246,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
253
246
|
return /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
254
247
|
color: "currentColor",
|
|
255
248
|
spacing: "spacious",
|
|
256
|
-
label: mediaInlineImageTitle
|
|
257
|
-
LEGACY_size: "medium",
|
|
258
|
-
LEGACY_fallbackIcon: _card.IconInline
|
|
249
|
+
label: mediaInlineImageTitle
|
|
259
250
|
});
|
|
260
251
|
},
|
|
261
252
|
onClick: function onClick() {
|
|
@@ -270,9 +261,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
270
261
|
return /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
271
262
|
color: "currentColor",
|
|
272
263
|
spacing: "spacious",
|
|
273
|
-
label: mediaSingleTitle
|
|
274
|
-
LEGACY_size: "medium",
|
|
275
|
-
LEGACY_fallbackIcon: _card.IconEmbed
|
|
264
|
+
label: mediaSingleTitle
|
|
276
265
|
});
|
|
277
266
|
},
|
|
278
267
|
onClick: (0, _commands.changeMediaInlineToMediaSingle)(editorAnalyticsAPI, widthPluginState, options === null || options === void 0 ? void 0 : options.allowPixelResizing)
|
|
@@ -333,9 +322,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
333
322
|
icon: /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
334
323
|
color: "currentColor",
|
|
335
324
|
spacing: "spacious",
|
|
336
|
-
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : mediaInlineImageTitle
|
|
337
|
-
LEGACY_size: "medium",
|
|
338
|
-
LEGACY_fallbackIcon: _card.IconInline
|
|
325
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : mediaInlineImageTitle
|
|
339
326
|
})
|
|
340
327
|
}, {
|
|
341
328
|
id: 'editor.media.convert.mediasingle',
|
|
@@ -348,27 +335,28 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
348
335
|
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
349
336
|
color: "currentColor",
|
|
350
337
|
spacing: "spacious",
|
|
351
|
-
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : mediaSingleTitle
|
|
352
|
-
LEGACY_size: "medium",
|
|
353
|
-
LEGACY_fallbackIcon: _card.IconEmbed
|
|
338
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : mediaSingleTitle
|
|
354
339
|
})
|
|
355
340
|
}];
|
|
356
|
-
var switchFromInlineToBlock
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
341
|
+
var switchFromInlineToBlock;
|
|
342
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_11')) {
|
|
343
|
+
switchFromInlineToBlock = (0, _utils.getMediaSingleAndMediaInlineSwitcherDropdown)('inline', intl, pluginInjectionApi);
|
|
344
|
+
} else {
|
|
345
|
+
switchFromInlineToBlock = {
|
|
346
|
+
id: 'media-inline-to-block-toolbar-item',
|
|
347
|
+
testId: 'media-inline-to-block-dropdown',
|
|
348
|
+
type: 'dropdown',
|
|
349
|
+
options: _options2,
|
|
350
|
+
title: intl.formatMessage(_mediaUi.messages.sizeOptions),
|
|
351
|
+
icon: function icon() {
|
|
352
|
+
return /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
353
|
+
color: "currentColor",
|
|
354
|
+
spacing: "spacious",
|
|
355
|
+
label: mediaInlineImageTitle
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
}
|
|
372
360
|
inlineImageItems.push(switchFromInlineToBlock, {
|
|
373
361
|
type: 'separator',
|
|
374
362
|
fullHeight: true
|
|
@@ -388,7 +376,6 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
388
376
|
testId: 'file-preview-toolbar-button',
|
|
389
377
|
type: 'button',
|
|
390
378
|
icon: isEditorControlsEnabled ? _growDiagonal.default : _maximize.default,
|
|
391
|
-
iconFallback: _maximize.default,
|
|
392
379
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
393
380
|
onClick: function onClick() {
|
|
394
381
|
var _handleShowMediaViewe2;
|
|
@@ -444,7 +431,6 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
444
431
|
appearance: 'danger',
|
|
445
432
|
focusEditoronEnter: true,
|
|
446
433
|
icon: _delete.default,
|
|
447
|
-
iconFallback: _deleteEditorRemove.default,
|
|
448
434
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
449
435
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
450
436
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
@@ -4,16 +4,22 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.updateToFullHeightSeparator = exports.removeMediaGroupNode = exports.isExternalMedia = exports.getSelectedNearestMediaContainerNodeAttrsFunction = exports.getSelectedNearestMediaContainerNodeAttrs = exports.getSelectedMediaSingle = exports.getSelectedLayoutIcon = exports.getPixelWidthOfElement = exports.getMaxToolbarWidth = exports.downloadMedia = exports.canShowSwitchButtons = exports.calcNewLayout = void 0;
|
|
7
|
+
exports.updateToFullHeightSeparator = exports.removeMediaGroupNode = exports.isExternalMedia = exports.getSelectedNearestMediaContainerNodeAttrsFunction = exports.getSelectedNearestMediaContainerNodeAttrs = exports.getSelectedMediaSingle = exports.getSelectedLayoutIcon = exports.getPixelWidthOfElement = exports.getMediaSingleAndMediaInlineSwitcherDropdown = exports.getMaxToolbarWidth = exports.downloadMedia = exports.canShowSwitchButtons = exports.calcNewLayout = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
11
12
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
13
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
15
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
14
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
|
+
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
18
|
+
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
15
19
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
20
|
+
var _mediaUi = require("@atlaskit/media-ui");
|
|
16
21
|
var _mediaSingle2 = require("../../pm-plugins/utils/media-single");
|
|
22
|
+
var _commands = require("./commands");
|
|
17
23
|
var isExternalMedia = exports.isExternalMedia = function isExternalMedia(attrs) {
|
|
18
24
|
return attrs.type === 'external';
|
|
19
25
|
};
|
|
@@ -166,4 +172,65 @@ var updateToFullHeightSeparator = exports.updateToFullHeightSeparator = function
|
|
|
166
172
|
fullHeight: true
|
|
167
173
|
});
|
|
168
174
|
}
|
|
175
|
+
};
|
|
176
|
+
var getMediaSingleAndMediaInlineSwitcherDropdown = exports.getMediaSingleAndMediaInlineSwitcherDropdown = function getMediaSingleAndMediaInlineSwitcherDropdown(nodeType, intl, pluginInjectionApi) {
|
|
177
|
+
var _pluginInjectionApi$a, _pluginInjectionApi$a2;
|
|
178
|
+
var hasCaption = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
179
|
+
var mediaInlineImageTitle = intl.formatMessage(_messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
180
|
+
var mediaSingleTitle = intl.formatMessage(_messages.mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
181
|
+
var inlineSwitcherTitle = intl.formatMessage(hasCaption ? _messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImageCaptionWarning : _messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
182
|
+
var InlineIcon = function InlineIcon() {
|
|
183
|
+
return /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
184
|
+
color: "currentColor",
|
|
185
|
+
spacing: "spacious",
|
|
186
|
+
label: ""
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
var BlockIcon = function BlockIcon() {
|
|
190
|
+
return /*#__PURE__*/_react.default.createElement(_maximize.default, {
|
|
191
|
+
color: "currentColor",
|
|
192
|
+
spacing: "spacious",
|
|
193
|
+
label: ""
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
var dropdownConfig = {
|
|
197
|
+
inline: {
|
|
198
|
+
handleInlineButtonClick: function handleInlineButtonClick() {
|
|
199
|
+
return true;
|
|
200
|
+
},
|
|
201
|
+
handleBlockButtonClick: (0, _commands.changeMediaInlineToMediaSingle)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.width.sharedState.currentState()),
|
|
202
|
+
id: 'media-inline-to-block-toolbar-item',
|
|
203
|
+
icon: InlineIcon
|
|
204
|
+
},
|
|
205
|
+
block: {
|
|
206
|
+
handleInlineButtonClick: (0, _commands.changeMediaSingleToMediaInline)(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions),
|
|
207
|
+
handleBlockButtonClick: function handleBlockButtonClick() {
|
|
208
|
+
return true;
|
|
209
|
+
},
|
|
210
|
+
id: 'media-block-to-inline-toolbar-item',
|
|
211
|
+
icon: BlockIcon
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
var options = [{
|
|
215
|
+
id: 'editor.media.convert.mediainline',
|
|
216
|
+
title: mediaInlineImageTitle,
|
|
217
|
+
onClick: dropdownConfig[nodeType].handleInlineButtonClick,
|
|
218
|
+
selected: nodeType === 'inline',
|
|
219
|
+
icon: /*#__PURE__*/_react.default.createElement(InlineIcon, null),
|
|
220
|
+
tooltip: hasCaption ? inlineSwitcherTitle : undefined
|
|
221
|
+
}, {
|
|
222
|
+
id: 'editor.media.convert.mediasingle',
|
|
223
|
+
title: mediaSingleTitle,
|
|
224
|
+
onClick: dropdownConfig[nodeType].handleBlockButtonClick,
|
|
225
|
+
selected: nodeType === 'block',
|
|
226
|
+
icon: /*#__PURE__*/_react.default.createElement(BlockIcon, null)
|
|
227
|
+
}];
|
|
228
|
+
return {
|
|
229
|
+
id: dropdownConfig[nodeType].id,
|
|
230
|
+
testId: 'media-inline-to-block-dropdown',
|
|
231
|
+
title: intl.formatMessage(_mediaUi.messages.sizeOptions),
|
|
232
|
+
type: 'dropdown',
|
|
233
|
+
options: options,
|
|
234
|
+
icon: dropdownConfig[nodeType].icon
|
|
235
|
+
};
|
|
169
236
|
};
|
|
@@ -6,7 +6,6 @@ import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
|
-
import { CommentWithDotIcon } from './assets/commentWithDotIcon';
|
|
10
9
|
import { getSelectedMediaSingle } from './utils';
|
|
11
10
|
export const commentButton = (intl, state, api, onCommentButtonMount) => {
|
|
12
11
|
var _getSelectedMediaSing, _api$annotation, _api$annotation$share, _api$connectivity, _api$connectivity$sha, _api$connectivity$sha2;
|
|
@@ -38,7 +37,6 @@ export const commentButton = (intl, state, api, onCommentButtonMount) => {
|
|
|
38
37
|
type: 'button',
|
|
39
38
|
testId: 'add-comment-media-button',
|
|
40
39
|
icon: CommentIcon,
|
|
41
|
-
iconFallback: hasActiveComments ? CommentWithDotIcon : CommentIcon,
|
|
42
40
|
title: editorExperiment('platform_editor_controls', 'control') ? title : buttonLabel,
|
|
43
41
|
showTitle: editorExperiment('platform_editor_controls', 'control') ? undefined : true,
|
|
44
42
|
onClick: onClickHandler,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { alignmentIcons, buildLayoutButtons, buildLayoutDropdown,
|
|
4
|
+
import { alignmentIcons, buildLayoutButtons, buildLayoutDropdown, layoutToMessages, wrappingIcons } from '@atlaskit/editor-common/card';
|
|
5
5
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
6
6
|
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
7
7
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
@@ -14,7 +14,6 @@ import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
|
14
14
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
15
15
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
16
16
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
17
|
-
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
18
17
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
19
18
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
20
19
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
@@ -40,7 +39,7 @@ import { getLinkingDropdownOptions, getLinkingToolbar, getOpenLinkToolbarButtonO
|
|
|
40
39
|
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
41
40
|
import { generateMediaInlineFloatingToolbar } from './mediaInline';
|
|
42
41
|
import { getPixelResizingToolbar, getResizeDropdownOption } from './pixel-resizing';
|
|
43
|
-
import { canShowSwitchButtons, downloadMedia, getMaxToolbarWidth, getSelectedLayoutIcon, getSelectedMediaSingle, getSelectedNearestMediaContainerNodeAttrs, removeMediaGroupNode, updateToFullHeightSeparator } from './utils';
|
|
42
|
+
import { canShowSwitchButtons, downloadMedia, getMaxToolbarWidth, getMediaSingleAndMediaInlineSwitcherDropdown, getSelectedLayoutIcon, getSelectedMediaSingle, getSelectedNearestMediaContainerNodeAttrs, removeMediaGroupNode, updateToFullHeightSeparator } from './utils';
|
|
44
43
|
const mediaTypeMessages = {
|
|
45
44
|
image: messages.file_image_is_selected,
|
|
46
45
|
video: messages.file_video_is_selected,
|
|
@@ -118,7 +117,6 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
118
117
|
testId: 'file-preview-toolbar-button',
|
|
119
118
|
type: 'button',
|
|
120
119
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
121
|
-
iconFallback: MaximizeIcon,
|
|
122
120
|
title: intl.formatMessage(messages.preview),
|
|
123
121
|
onClick: () => {
|
|
124
122
|
var _handleShowMediaViewe;
|
|
@@ -156,7 +154,6 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
156
154
|
id: 'editor.media.view.switcher.inline',
|
|
157
155
|
type: 'button',
|
|
158
156
|
icon: ImageInlineIcon,
|
|
159
|
-
iconFallback: IconInline,
|
|
160
157
|
selected: false,
|
|
161
158
|
focusEditoronEnter: true,
|
|
162
159
|
disabled: false,
|
|
@@ -168,7 +165,6 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
168
165
|
id: 'editor.media.view.switcher.thumbnail',
|
|
169
166
|
type: 'button',
|
|
170
167
|
icon: SmartLinkCardIcon,
|
|
171
|
-
iconFallback: IconCard,
|
|
172
168
|
selected: true,
|
|
173
169
|
disabled: false,
|
|
174
170
|
focusEditoronEnter: true,
|
|
@@ -198,7 +194,6 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
198
194
|
appearance: 'danger',
|
|
199
195
|
focusEditoronEnter: true,
|
|
200
196
|
icon: DeleteIcon,
|
|
201
|
-
iconFallback: RemoveIcon,
|
|
202
197
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
203
198
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
204
199
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
@@ -397,9 +392,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
397
392
|
icon: () => /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
398
393
|
color: "currentColor",
|
|
399
394
|
spacing: "spacious",
|
|
400
|
-
label: inlineSwitcherTitle
|
|
401
|
-
LEGACY_size: "medium",
|
|
402
|
-
LEGACY_fallbackIcon: IconInline
|
|
395
|
+
label: inlineSwitcherTitle
|
|
403
396
|
}),
|
|
404
397
|
onClick: changeMediaSingleToMediaInline(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions),
|
|
405
398
|
testId: 'image-inline-appearance'
|
|
@@ -410,9 +403,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
410
403
|
icon: () => /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
411
404
|
color: "currentColor",
|
|
412
405
|
spacing: "spacious",
|
|
413
|
-
label: floatingSwitcherTitle
|
|
414
|
-
LEGACY_size: "medium",
|
|
415
|
-
LEGACY_fallbackIcon: IconEmbed
|
|
406
|
+
label: floatingSwitcherTitle
|
|
416
407
|
}),
|
|
417
408
|
onClick: () => {
|
|
418
409
|
return true;
|
|
@@ -432,9 +423,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
432
423
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
433
424
|
color: "currentColor",
|
|
434
425
|
spacing: "spacious",
|
|
435
|
-
label: fg('platform_editor_controls_patch_7') ? '' : inlineTitle
|
|
436
|
-
LEGACY_size: "medium",
|
|
437
|
-
LEGACY_fallbackIcon: IconInline
|
|
426
|
+
label: fg('platform_editor_controls_patch_7') ? '' : inlineTitle
|
|
438
427
|
}),
|
|
439
428
|
tooltip: hasCaption ? inlineSwitcherTitle : undefined
|
|
440
429
|
}, {
|
|
@@ -451,29 +440,30 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
451
440
|
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
452
441
|
color: "currentColor",
|
|
453
442
|
spacing: "spacious",
|
|
454
|
-
label: fg('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle
|
|
455
|
-
LEGACY_size: "medium",
|
|
456
|
-
LEGACY_fallbackIcon: IconEmbed
|
|
443
|
+
label: fg('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle
|
|
457
444
|
})
|
|
458
445
|
}];
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
446
|
+
let switchFromBlockToInline;
|
|
447
|
+
if (fg('platform_editor_controls_patch_11')) {
|
|
448
|
+
switchFromBlockToInline = getMediaSingleAndMediaInlineSwitcherDropdown('block', intl, pluginInjectionApi, hasCaption);
|
|
449
|
+
} else {
|
|
450
|
+
switchFromBlockToInline = {
|
|
451
|
+
id: 'media-block-to-inline-toolbar-item',
|
|
452
|
+
testId: 'media-inline-to-block-dropdown',
|
|
453
|
+
type: 'dropdown',
|
|
454
|
+
options: options,
|
|
455
|
+
title: intl.formatMessage(messages.sizeOptions),
|
|
456
|
+
icon: () => fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
457
|
+
color: "currentColor",
|
|
458
|
+
spacing: "spacious",
|
|
459
|
+
label: intl.formatMessage(messages.sizeOptions)
|
|
460
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
461
|
+
color: "currentColor",
|
|
462
|
+
spacing: "spacious",
|
|
463
|
+
label: intl.formatMessage(messages.sizeOptions)
|
|
464
|
+
})
|
|
465
|
+
};
|
|
466
|
+
}
|
|
477
467
|
toolbarButtons.push(switchFromBlockToInline, {
|
|
478
468
|
type: 'separator',
|
|
479
469
|
fullHeight: true
|
|
@@ -606,7 +596,6 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
606
596
|
testId: 'file-preview-toolbar-button',
|
|
607
597
|
type: 'button',
|
|
608
598
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
609
|
-
iconFallback: MaximizeIcon,
|
|
610
599
|
title: intl.formatMessage(messages.preview),
|
|
611
600
|
onClick: () => {
|
|
612
601
|
var _handleShowMediaViewe2;
|
|
@@ -655,7 +644,6 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
655
644
|
appearance: 'danger',
|
|
656
645
|
focusEditoronEnter: true,
|
|
657
646
|
icon: DeleteIcon,
|
|
658
|
-
iconFallback: RemoveIcon,
|
|
659
647
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
660
648
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
661
649
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
@@ -693,7 +681,6 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
693
681
|
testId: 'file-preview-toolbar-button',
|
|
694
682
|
type: 'button',
|
|
695
683
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
696
|
-
iconFallback: MaximizeIcon,
|
|
697
684
|
title: intl.formatMessage(messages.preview),
|
|
698
685
|
onClick: () => {
|
|
699
686
|
var _handleShowMediaViewe3;
|
|
@@ -12,7 +12,6 @@ import { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messa
|
|
|
12
12
|
import { FloatingToolbarSeparator as Separator, FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
14
14
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
15
|
-
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
16
15
|
import { currentMediaInlineNode, currentMediaNode } from '../../pm-plugins//utils/current-media-node';
|
|
17
16
|
import { stateKey } from '../../pm-plugins/plugin-key';
|
|
18
17
|
import { checkMediaType } from '../../pm-plugins/utils/check-media-type';
|
|
@@ -73,8 +72,7 @@ export const LinkToolbarAppearance = ({
|
|
|
73
72
|
icon: jsx(LinkExternalIcon, {
|
|
74
73
|
color: "currentColor",
|
|
75
74
|
spacing: "spacious",
|
|
76
|
-
label: linkTitle
|
|
77
|
-
LEGACY_fallbackIcon: OpenIcon
|
|
75
|
+
label: linkTitle
|
|
78
76
|
})
|
|
79
77
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
80
78
|
,
|