@atlaskit/editor-plugin-media 2.3.15 → 2.3.17
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 +18 -0
- package/dist/cjs/nodeviews/mediaGroup.js +2 -2
- package/dist/cjs/nodeviews/mediaGroupNext.js +2 -2
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +3 -3
- package/dist/cjs/ui/Media/DropPlaceholder.js +3 -3
- package/dist/cjs/ui/MediaLinkingToolbar.js +4 -4
- package/dist/cjs/ui/ToolbarMedia/index.js +2 -2
- package/dist/cjs/ui/toolbar/comments.js +1 -2
- package/dist/cjs/ui/toolbar/index.js +18 -10
- package/dist/cjs/ui/toolbar/mediaInline.js +6 -6
- package/dist/es2019/nodeviews/mediaGroup.js +1 -1
- package/dist/es2019/nodeviews/mediaGroupNext.js +1 -1
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +2 -2
- package/dist/es2019/ui/Media/DropPlaceholder.js +2 -2
- package/dist/es2019/ui/MediaLinkingToolbar.js +2 -2
- package/dist/es2019/ui/ToolbarMedia/index.js +1 -1
- package/dist/es2019/ui/toolbar/comments.js +1 -2
- package/dist/es2019/ui/toolbar/index.js +16 -8
- package/dist/es2019/ui/toolbar/mediaInline.js +4 -4
- package/dist/esm/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/nodeviews/mediaGroupNext.js +1 -1
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +2 -2
- package/dist/esm/ui/Media/DropPlaceholder.js +2 -2
- package/dist/esm/ui/MediaLinkingToolbar.js +2 -2
- package/dist/esm/ui/ToolbarMedia/index.js +1 -1
- package/dist/esm/ui/toolbar/comments.js +1 -2
- package/dist/esm/ui/toolbar/index.js +17 -9
- package/dist/esm/ui/toolbar/mediaInline.js +4 -4
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 2.3.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#134468](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134468)
|
|
8
|
+
[`e312ec529d05a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e312ec529d05a) -
|
|
9
|
+
[ux] Apply hover decoration when hovering on copy/delete button on overflow menu
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.3.16
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#131525](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131525)
|
|
17
|
+
[`cb8403ffb5a8b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb8403ffb5a8b) -
|
|
18
|
+
ENGHEALTH-23697 Iconography update for editor-plugin-media
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 2.3.15
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -20,7 +20,7 @@ var _media = require("@atlaskit/editor-common/media");
|
|
|
20
20
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
21
21
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
22
22
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
23
|
-
var
|
|
23
|
+
var _closeEditorClose = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--editor-close"));
|
|
24
24
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
25
25
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
26
26
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -162,7 +162,7 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
162
162
|
shouldEnableDownloadButton: mediaOptions.enableDownloadButton,
|
|
163
163
|
actions: [{
|
|
164
164
|
handler: disabled || !_this.mediaPluginState ? function () {} : _this.mediaPluginState.handleMediaNodeRemoval.bind(null, undefined, getNodePos),
|
|
165
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
165
|
+
icon: /*#__PURE__*/_react.default.createElement(_closeEditorClose.default, {
|
|
166
166
|
label: _this.props.intl.formatMessage(_media.nodeViewsMessages.mediaGroupDeleteLabel)
|
|
167
167
|
})
|
|
168
168
|
}]
|
|
@@ -15,7 +15,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
16
16
|
var _media = require("@atlaskit/editor-common/media");
|
|
17
17
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
18
|
-
var
|
|
18
|
+
var _closeEditorClose = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--editor-close"));
|
|
19
19
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
20
20
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
21
21
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -82,7 +82,7 @@ var prepareFilmstripItem = function prepareFilmstripItem(_ref) {
|
|
|
82
82
|
shouldEnableDownloadButton: enableDownloadButton,
|
|
83
83
|
actions: [{
|
|
84
84
|
handler: handleMediaNodeRemoval.bind(null, undefined, getNodePos),
|
|
85
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
85
|
+
icon: /*#__PURE__*/_react.default.createElement(_closeEditorClose.default, {
|
|
86
86
|
label: intl.formatMessage(_media.nodeViewsMessages.mediaGroupDeleteLabel)
|
|
87
87
|
})
|
|
88
88
|
}]
|
|
@@ -20,8 +20,8 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
20
20
|
var _media = require("@atlaskit/editor-common/media");
|
|
21
21
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
23
|
+
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle"));
|
|
24
|
+
var _chevronLeftChevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-left--chevron-left-large"));
|
|
25
25
|
var _colors = require("@atlaskit/theme/colors");
|
|
26
26
|
var _commands = require("../commands");
|
|
27
27
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -196,7 +196,7 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
196
196
|
css: buttonWrapperStyles
|
|
197
197
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
198
198
|
title: formatMessage(_media.altTextMessages.back),
|
|
199
|
-
icon: (0, _react2.jsx)(
|
|
199
|
+
icon: (0, _react2.jsx)(_chevronLeftChevronLeftLarge.default, {
|
|
200
200
|
label: formatMessage(_media.altTextMessages.back)
|
|
201
201
|
}),
|
|
202
202
|
tooltipContent: backButtonMessageComponent,
|
|
@@ -9,7 +9,7 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
11
|
var _media = require("@atlaskit/editor-common/media");
|
|
12
|
-
var
|
|
12
|
+
var _fileDocumentFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--document-filled"));
|
|
13
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
15
|
var _media2 = require("../../nodeviews/mediaNodeView/media");
|
|
@@ -48,9 +48,9 @@ var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
|
48
48
|
var dropPlaceholderLabel = _media.dropPlaceholderMessages.dropPlaceholderLabel;
|
|
49
49
|
return (0, _react.jsx)("div", {
|
|
50
50
|
css: iconWrapperStyles
|
|
51
|
-
}, (0, _react.jsx)(
|
|
51
|
+
}, (0, _react.jsx)(_fileDocumentFilled.default, {
|
|
52
52
|
label: intl.formatMessage(dropPlaceholderLabel),
|
|
53
|
-
|
|
53
|
+
LEGACY_size: "medium"
|
|
54
54
|
}));
|
|
55
55
|
};
|
|
56
56
|
var IntlIconWrapper = (0, _reactIntlNext.injectIntl)(IconWrapperComponent);
|
|
@@ -20,8 +20,8 @@ var _media = require("@atlaskit/editor-common/media");
|
|
|
20
20
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
21
21
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
22
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
23
|
+
var _linkBrokenEditorUnlink = _interopRequireDefault(require("@atlaskit/icon/core/migration/link-broken--editor-unlink"));
|
|
24
|
+
var _chevronLeftChevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-left--chevron-left-large"));
|
|
25
25
|
var _colors = require("@atlaskit/theme/colors");
|
|
26
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -124,7 +124,7 @@ var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
124
124
|
css: buttonWrapper
|
|
125
125
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
126
126
|
title: formatLinkAddressText,
|
|
127
|
-
icon: (0, _react2.jsx)(
|
|
127
|
+
icon: (0, _react2.jsx)(_chevronLeftChevronLeftLarge.default, {
|
|
128
128
|
label: formatLinkAddressText
|
|
129
129
|
}),
|
|
130
130
|
onClick: function onClick() {
|
|
@@ -161,7 +161,7 @@ var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
161
161
|
htmlFor: "media-link-search-input"
|
|
162
162
|
}, formatMessage(_messages.linkToolbarMessages.searchInput)), (0, _utils.normalizeUrl)(displayUrl) && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
163
163
|
title: formatUnlinkText,
|
|
164
|
-
icon: (0, _react2.jsx)(
|
|
164
|
+
icon: (0, _react2.jsx)(_linkBrokenEditorUnlink.default, {
|
|
165
165
|
label: formatUnlinkText
|
|
166
166
|
}),
|
|
167
167
|
onClick: _this.handleUnlink
|
|
@@ -10,7 +10,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
11
|
var _media = require("@atlaskit/editor-common/media");
|
|
12
12
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
13
|
-
var
|
|
13
|
+
var _attachmentEditorAttachment = _interopRequireDefault(require("@atlaskit/icon/core/migration/attachment--editor-attachment"));
|
|
14
14
|
var onClickMediaButton = function onClickMediaButton(pluginState) {
|
|
15
15
|
return function () {
|
|
16
16
|
pluginState.showMediaPicker();
|
|
@@ -34,7 +34,7 @@ var ToolbarMedia = function ToolbarMedia(_ref) {
|
|
|
34
34
|
disabled: isDisabled,
|
|
35
35
|
title: intl.formatMessage(toolbarMediaTitle),
|
|
36
36
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
37
|
-
iconBefore: /*#__PURE__*/_react.default.createElement(
|
|
37
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_attachmentEditorAttachment.default, {
|
|
38
38
|
label: intl.formatMessage(toolbarMediaTitle)
|
|
39
39
|
})
|
|
40
40
|
});
|
|
@@ -11,7 +11,6 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
11
11
|
var _media = require("@atlaskit/editor-common/media");
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
|
|
14
|
-
var _comment2 = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
|
|
15
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
16
|
var _commentWithDotIcon = require("./assets/commentWithDotIcon");
|
|
@@ -47,7 +46,7 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
|
|
|
47
46
|
type: 'button',
|
|
48
47
|
testId: 'add-comment-media-button',
|
|
49
48
|
icon: _comment.default,
|
|
50
|
-
iconFallback: hasActiveComments ? _commentWithDotIcon.CommentWithDotIcon :
|
|
49
|
+
iconFallback: hasActiveComments ? _commentWithDotIcon.CommentWithDotIcon : _comment.default,
|
|
51
50
|
title: (0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? title : buttonLabel,
|
|
52
51
|
showTitle: (0, _experiments.editorExperiment)('platform_editor_controls', 'control') ? undefined : true,
|
|
53
52
|
onClick: onClickHandler,
|
|
@@ -16,16 +16,16 @@ var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
|
16
16
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
17
17
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
18
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
19
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
19
20
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
20
21
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
21
22
|
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
22
23
|
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
23
24
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
24
25
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
26
|
+
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
25
27
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
26
28
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
27
|
-
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
28
|
-
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
29
29
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
30
30
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
31
31
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -94,7 +94,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
94
94
|
testId: 'file-preview-toolbar-button',
|
|
95
95
|
type: 'button',
|
|
96
96
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
97
|
-
iconFallback:
|
|
97
|
+
iconFallback: _maximize.default,
|
|
98
98
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
99
99
|
onClick: function onClick() {
|
|
100
100
|
var _handleShowMediaViewe;
|
|
@@ -173,7 +173,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
173
173
|
appearance: 'danger',
|
|
174
174
|
focusEditoronEnter: true,
|
|
175
175
|
icon: _delete.default,
|
|
176
|
-
iconFallback:
|
|
176
|
+
iconFallback: _deleteEditorRemove.default,
|
|
177
177
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
178
178
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
179
179
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
@@ -538,7 +538,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
538
538
|
testId: 'file-preview-toolbar-button',
|
|
539
539
|
type: 'button',
|
|
540
540
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
541
|
-
iconFallback:
|
|
541
|
+
iconFallback: _maximize.default,
|
|
542
542
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
543
543
|
onClick: function onClick() {
|
|
544
544
|
var _handleShowMediaViewe2;
|
|
@@ -586,7 +586,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
586
586
|
appearance: 'danger',
|
|
587
587
|
focusEditoronEnter: true,
|
|
588
588
|
icon: _delete.default,
|
|
589
|
-
iconFallback:
|
|
589
|
+
iconFallback: _deleteEditorRemove.default,
|
|
590
590
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
591
591
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
592
592
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
@@ -624,7 +624,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
624
624
|
testId: 'file-preview-toolbar-button',
|
|
625
625
|
type: 'button',
|
|
626
626
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
627
|
-
iconFallback:
|
|
627
|
+
iconFallback: _maximize.default,
|
|
628
628
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
629
629
|
onClick: function onClick() {
|
|
630
630
|
var _handleShowMediaViewe3;
|
|
@@ -775,10 +775,18 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
775
775
|
type: 'separator'
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
|
+
var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
|
|
779
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') ? {
|
|
780
|
+
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
781
|
+
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
782
|
+
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
783
|
+
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
784
|
+
} : undefined;
|
|
785
|
+
};
|
|
778
786
|
items.push({
|
|
779
787
|
type: 'overflow-dropdown',
|
|
780
788
|
id: 'media',
|
|
781
|
-
options: [].concat((0, _toConsumableArray2.default)(customOptions), [{
|
|
789
|
+
options: [].concat((0, _toConsumableArray2.default)(customOptions), [_objectSpread({
|
|
782
790
|
title: 'Copy',
|
|
783
791
|
onClick: function onClick() {
|
|
784
792
|
var _pluginInjectionApi$c4, _pluginInjectionApi$f3;
|
|
@@ -789,13 +797,13 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
789
797
|
icon: /*#__PURE__*/_react.default.createElement(_copy.default, {
|
|
790
798
|
label: ""
|
|
791
799
|
})
|
|
792
|
-
}, {
|
|
800
|
+
}, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
793
801
|
title: 'Delete',
|
|
794
802
|
onClick: remove,
|
|
795
803
|
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
796
804
|
label: ""
|
|
797
805
|
})
|
|
798
|
-
}])
|
|
806
|
+
}, hoverDecorationProps(nodeType))])
|
|
799
807
|
});
|
|
800
808
|
}
|
|
801
809
|
|
|
@@ -17,10 +17,9 @@ var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-dia
|
|
|
17
17
|
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
18
18
|
var _imageInline = _interopRequireDefault(require("@atlaskit/icon/core/image-inline"));
|
|
19
19
|
var _maximize = _interopRequireDefault(require("@atlaskit/icon/core/maximize"));
|
|
20
|
+
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
20
21
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
21
22
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
22
|
-
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
23
|
-
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
24
23
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
25
24
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
25
|
var _linking = require("../../pm-plugins/commands/linking");
|
|
@@ -57,7 +56,8 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
57
56
|
testId: 'file-preview-toolbar-button',
|
|
58
57
|
type: 'button',
|
|
59
58
|
icon: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? _growDiagonal.default : _maximize.default,
|
|
60
|
-
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
60
|
+
iconFallback: _maximize.default,
|
|
61
61
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
62
62
|
onClick: function onClick() {
|
|
63
63
|
var _handleShowMediaViewe;
|
|
@@ -130,7 +130,7 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
130
130
|
appearance: 'danger',
|
|
131
131
|
focusEditoronEnter: true,
|
|
132
132
|
icon: _delete.default,
|
|
133
|
-
iconFallback:
|
|
133
|
+
iconFallback: _deleteEditorRemove.default,
|
|
134
134
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
135
135
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
136
136
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
@@ -381,7 +381,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
381
381
|
testId: 'file-preview-toolbar-button',
|
|
382
382
|
type: 'button',
|
|
383
383
|
icon: isEditorControlsEnabled ? _growDiagonal.default : _maximize.default,
|
|
384
|
-
iconFallback:
|
|
384
|
+
iconFallback: _maximize.default,
|
|
385
385
|
title: intl.formatMessage(_mediaUi.messages.preview),
|
|
386
386
|
onClick: function onClick() {
|
|
387
387
|
var _handleShowMediaViewe2;
|
|
@@ -437,7 +437,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
437
437
|
appearance: 'danger',
|
|
438
438
|
focusEditoronEnter: true,
|
|
439
439
|
icon: _delete.default,
|
|
440
|
-
iconFallback:
|
|
440
|
+
iconFallback: _deleteEditorRemove.default,
|
|
441
441
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
442
442
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
443
443
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
@@ -6,7 +6,7 @@ import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
|
6
6
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
8
8
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import EditorCloseIcon from '@atlaskit/icon/
|
|
9
|
+
import EditorCloseIcon from '@atlaskit/icon/core/migration/close--editor-close';
|
|
10
10
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
11
11
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -3,7 +3,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
3
3
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import EditorCloseIcon from '@atlaskit/icon/
|
|
6
|
+
import EditorCloseIcon from '@atlaskit/icon/core/migration/close--editor-close';
|
|
7
7
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
8
8
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
9
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -15,8 +15,8 @@ import { escape, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
|
15
15
|
import { altTextMessages as messages } from '@atlaskit/editor-common/media';
|
|
16
16
|
import { RECENT_SEARCH_WIDTH_IN_PX as CONTAINER_WIDTH_IN_PX, FloatingToolbarButton as Button, ErrorMessage, PanelTextInput } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
19
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-large';
|
|
20
20
|
import { N200, N30, N80, R400 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { closeMediaAltTextMenu, closeMediaAltTextMenuAndSave } from '../commands';
|
|
22
22
|
export const MAX_ALT_TEXT_LENGTH = 510; // double tweet length
|
|
@@ -7,7 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
9
9
|
import { dropPlaceholderMessages } from '@atlaskit/editor-common/media';
|
|
10
|
-
import DocumentFilledIcon from '@atlaskit/icon/
|
|
10
|
+
import DocumentFilledIcon from '@atlaskit/icon/core/migration/file--document-filled';
|
|
11
11
|
import { B200, B300, B400 } from '@atlaskit/theme/colors';
|
|
12
12
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
13
13
|
import { FILE_WIDTH, MEDIA_HEIGHT } from '../../nodeviews/mediaNodeView/media';
|
|
@@ -46,7 +46,7 @@ const IconWrapperComponent = props => {
|
|
|
46
46
|
css: iconWrapperStyles
|
|
47
47
|
}, jsx(DocumentFilledIcon, {
|
|
48
48
|
label: intl.formatMessage(dropPlaceholderLabel),
|
|
49
|
-
|
|
49
|
+
LEGACY_size: "medium"
|
|
50
50
|
}));
|
|
51
51
|
};
|
|
52
52
|
const IntlIconWrapper = injectIntl(IconWrapperComponent);
|
|
@@ -15,8 +15,8 @@ import { FloatingToolbarButton as Button, ErrorMessage, FloatingToolbarSeparator
|
|
|
15
15
|
// Common Translations will live here
|
|
16
16
|
PanelTextInput } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import EditorUnlinkIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink';
|
|
19
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-large';
|
|
20
20
|
import { R400 } from '@atlaskit/theme/colors';
|
|
21
21
|
const validationWrapper = css({
|
|
22
22
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
@@ -3,7 +3,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
3
3
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { toolbarMediaMessages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
6
|
-
import AttachmentIcon from '@atlaskit/icon/
|
|
6
|
+
import AttachmentIcon from '@atlaskit/icon/core/migration/attachment--editor-attachment';
|
|
7
7
|
const onClickMediaButton = pluginState => () => {
|
|
8
8
|
pluginState.showMediaPicker();
|
|
9
9
|
return true;
|
|
@@ -4,7 +4,6 @@ import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
|
4
4
|
import { commentMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
7
|
-
import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
|
|
8
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
9
|
import { CommentWithDotIcon } from './assets/commentWithDotIcon';
|
|
@@ -39,7 +38,7 @@ export const commentButton = (intl, state, api) => {
|
|
|
39
38
|
type: 'button',
|
|
40
39
|
testId: 'add-comment-media-button',
|
|
41
40
|
icon: CommentIcon,
|
|
42
|
-
iconFallback: hasActiveComments ? CommentWithDotIcon :
|
|
41
|
+
iconFallback: hasActiveComments ? CommentWithDotIcon : CommentIcon,
|
|
43
42
|
title: editorExperiment('platform_editor_controls', 'control') ? title : buttonLabel,
|
|
44
43
|
showTitle: editorExperiment('platform_editor_controls', 'control') ? undefined : true,
|
|
45
44
|
onClick: onClickHandler,
|
|
@@ -6,16 +6,16 @@ import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
|
6
6
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { contains, findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
+
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
10
11
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
11
12
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
12
13
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
13
14
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
14
15
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
16
|
+
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
15
17
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
16
18
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
17
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
18
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
19
19
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
20
20
|
import { messages } from '@atlaskit/media-ui';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -30,7 +30,7 @@ import { stateKey } from '../../pm-plugins/plugin-key';
|
|
|
30
30
|
import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/current-media-node';
|
|
31
31
|
import { isVideo } from '../../pm-plugins/utils/media-single';
|
|
32
32
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
33
|
-
import { altTextButton,
|
|
33
|
+
import { altTextButton, getAltTextDropdownOption, getAltTextToolbar } from './alt-text';
|
|
34
34
|
import { changeMediaCardToInline, changeMediaSingleToMediaInline, setBorderMark, toggleBorderMark } from './commands';
|
|
35
35
|
import { commentButton } from './comments';
|
|
36
36
|
import { shouldShowImageBorder } from './imageBorder';
|
|
@@ -81,7 +81,7 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
81
81
|
testId: 'file-preview-toolbar-button',
|
|
82
82
|
type: 'button',
|
|
83
83
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
84
|
-
iconFallback:
|
|
84
|
+
iconFallback: MaximizeIcon,
|
|
85
85
|
title: intl.formatMessage(messages.preview),
|
|
86
86
|
onClick: () => {
|
|
87
87
|
var _handleShowMediaViewe;
|
|
@@ -533,7 +533,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
533
533
|
testId: 'file-preview-toolbar-button',
|
|
534
534
|
type: 'button',
|
|
535
535
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
536
|
-
iconFallback:
|
|
536
|
+
iconFallback: MaximizeIcon,
|
|
537
537
|
title: intl.formatMessage(messages.preview),
|
|
538
538
|
onClick: () => {
|
|
539
539
|
var _handleShowMediaViewe2;
|
|
@@ -619,7 +619,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
619
619
|
testId: 'file-preview-toolbar-button',
|
|
620
620
|
type: 'button',
|
|
621
621
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
622
|
-
iconFallback:
|
|
622
|
+
iconFallback: MaximizeIcon,
|
|
623
623
|
title: intl.formatMessage(messages.preview),
|
|
624
624
|
onClick: () => {
|
|
625
625
|
var _handleShowMediaViewe3;
|
|
@@ -770,6 +770,12 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
770
770
|
type: 'separator'
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
|
+
const hoverDecorationProps = (nodeType, className) => fg('platform_editor_controls_patch_1') ? {
|
|
774
|
+
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
775
|
+
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
776
|
+
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
777
|
+
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
778
|
+
} : undefined;
|
|
773
779
|
items.push({
|
|
774
780
|
type: 'overflow-dropdown',
|
|
775
781
|
id: 'media',
|
|
@@ -783,13 +789,15 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
783
789
|
},
|
|
784
790
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
785
791
|
label: ""
|
|
786
|
-
})
|
|
792
|
+
}),
|
|
793
|
+
...hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)
|
|
787
794
|
}, {
|
|
788
795
|
title: 'Delete',
|
|
789
796
|
onClick: remove,
|
|
790
797
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
791
798
|
label: ""
|
|
792
|
-
})
|
|
799
|
+
}),
|
|
800
|
+
...hoverDecorationProps(nodeType)
|
|
793
801
|
}]
|
|
794
802
|
});
|
|
795
803
|
}
|
|
@@ -8,10 +8,9 @@ import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
|
8
8
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
9
9
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
10
10
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
11
|
+
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
11
12
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
12
13
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
13
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
14
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
15
14
|
import { messages } from '@atlaskit/media-ui';
|
|
16
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
16
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
@@ -45,7 +44,8 @@ export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState
|
|
|
45
44
|
testId: 'file-preview-toolbar-button',
|
|
46
45
|
type: 'button',
|
|
47
46
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
48
|
-
|
|
47
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
48
|
+
iconFallback: MaximizeIcon,
|
|
49
49
|
title: intl.formatMessage(messages.preview),
|
|
50
50
|
onClick: () => {
|
|
51
51
|
var _handleShowMediaViewe;
|
|
@@ -370,7 +370,7 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
370
370
|
testId: 'file-preview-toolbar-button',
|
|
371
371
|
type: 'button',
|
|
372
372
|
icon: isEditorControlsEnabled ? GrowDiagonalIcon : MaximizeIcon,
|
|
373
|
-
iconFallback:
|
|
373
|
+
iconFallback: MaximizeIcon,
|
|
374
374
|
title: intl.formatMessage(messages.preview),
|
|
375
375
|
onClick: () => {
|
|
376
376
|
var _handleShowMediaViewe2;
|
|
@@ -17,7 +17,7 @@ import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
|
17
17
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
18
18
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
19
19
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
20
|
-
import EditorCloseIcon from '@atlaskit/icon/
|
|
20
|
+
import EditorCloseIcon from '@atlaskit/icon/core/migration/close--editor-close';
|
|
21
21
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
22
22
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
23
23
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -9,7 +9,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
9
9
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
11
11
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
12
|
-
import EditorCloseIcon from '@atlaskit/icon/
|
|
12
|
+
import EditorCloseIcon from '@atlaskit/icon/core/migration/close--editor-close';
|
|
13
13
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
14
14
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -22,8 +22,8 @@ import { escape, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
|
22
22
|
import { altTextMessages as messages } from '@atlaskit/editor-common/media';
|
|
23
23
|
import { RECENT_SEARCH_WIDTH_IN_PX as CONTAINER_WIDTH_IN_PX, FloatingToolbarButton as Button, ErrorMessage, PanelTextInput } from '@atlaskit/editor-common/ui';
|
|
24
24
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
25
|
-
import
|
|
26
|
-
import
|
|
25
|
+
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
26
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-large';
|
|
27
27
|
import { N200, N30, N80, R400 } from '@atlaskit/theme/colors';
|
|
28
28
|
import { closeMediaAltTextMenu, closeMediaAltTextMenuAndSave } from '../commands';
|
|
29
29
|
export var MAX_ALT_TEXT_LENGTH = 510; // double tweet length
|
|
@@ -7,7 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
9
9
|
import { dropPlaceholderMessages } from '@atlaskit/editor-common/media';
|
|
10
|
-
import DocumentFilledIcon from '@atlaskit/icon/
|
|
10
|
+
import DocumentFilledIcon from '@atlaskit/icon/core/migration/file--document-filled';
|
|
11
11
|
import { B200, B300, B400 } from '@atlaskit/theme/colors';
|
|
12
12
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
13
13
|
import { FILE_WIDTH, MEDIA_HEIGHT } from '../../nodeviews/mediaNodeView/media';
|
|
@@ -42,7 +42,7 @@ var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
|
42
42
|
css: iconWrapperStyles
|
|
43
43
|
}, jsx(DocumentFilledIcon, {
|
|
44
44
|
label: intl.formatMessage(dropPlaceholderLabel),
|
|
45
|
-
|
|
45
|
+
LEGACY_size: "medium"
|
|
46
46
|
}));
|
|
47
47
|
};
|
|
48
48
|
var IntlIconWrapper = injectIntl(IconWrapperComponent);
|
|
@@ -22,8 +22,8 @@ import { FloatingToolbarButton as Button, ErrorMessage, FloatingToolbarSeparator
|
|
|
22
22
|
// Common Translations will live here
|
|
23
23
|
PanelTextInput } from '@atlaskit/editor-common/ui';
|
|
24
24
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
25
|
-
import
|
|
26
|
-
import
|
|
25
|
+
import EditorUnlinkIcon from '@atlaskit/icon/core/migration/link-broken--editor-unlink';
|
|
26
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-large';
|
|
27
27
|
import { R400 } from '@atlaskit/theme/colors';
|
|
28
28
|
var validationWrapper = css({
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
@@ -3,7 +3,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
3
3
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { toolbarMediaMessages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
6
|
-
import AttachmentIcon from '@atlaskit/icon/
|
|
6
|
+
import AttachmentIcon from '@atlaskit/icon/core/migration/attachment--editor-attachment';
|
|
7
7
|
var onClickMediaButton = function onClickMediaButton(pluginState) {
|
|
8
8
|
return function () {
|
|
9
9
|
pluginState.showMediaPicker();
|
|
@@ -4,7 +4,6 @@ import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
|
4
4
|
import { commentMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
5
|
import { annotationMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
7
|
-
import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
|
|
8
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
9
|
import { CommentWithDotIcon } from './assets/commentWithDotIcon';
|
|
@@ -40,7 +39,7 @@ export var commentButton = function commentButton(intl, state, api) {
|
|
|
40
39
|
type: 'button',
|
|
41
40
|
testId: 'add-comment-media-button',
|
|
42
41
|
icon: CommentIcon,
|
|
43
|
-
iconFallback: hasActiveComments ? CommentWithDotIcon :
|
|
42
|
+
iconFallback: hasActiveComments ? CommentWithDotIcon : CommentIcon,
|
|
44
43
|
title: editorExperiment('platform_editor_controls', 'control') ? title : buttonLabel,
|
|
45
44
|
showTitle: editorExperiment('platform_editor_controls', 'control') ? undefined : true,
|
|
46
45
|
onClick: onClickHandler,
|
|
@@ -10,16 +10,16 @@ import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
|
10
10
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { contains, findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
13
|
+
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
13
14
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
14
15
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
15
16
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
16
17
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
17
18
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
18
19
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
20
|
+
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
19
21
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
20
22
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
21
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
22
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
23
23
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
24
24
|
import { messages } from '@atlaskit/media-ui';
|
|
25
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -34,7 +34,7 @@ import { stateKey } from '../../pm-plugins/plugin-key';
|
|
|
34
34
|
import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/current-media-node';
|
|
35
35
|
import { isVideo } from '../../pm-plugins/utils/media-single';
|
|
36
36
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
37
|
-
import { altTextButton,
|
|
37
|
+
import { altTextButton, getAltTextDropdownOption, getAltTextToolbar } from './alt-text';
|
|
38
38
|
import { changeMediaCardToInline, changeMediaSingleToMediaInline, setBorderMark, toggleBorderMark } from './commands';
|
|
39
39
|
import { commentButton } from './comments';
|
|
40
40
|
import { shouldShowImageBorder } from './imageBorder';
|
|
@@ -84,7 +84,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
84
84
|
testId: 'file-preview-toolbar-button',
|
|
85
85
|
type: 'button',
|
|
86
86
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
87
|
-
iconFallback:
|
|
87
|
+
iconFallback: MaximizeIcon,
|
|
88
88
|
title: intl.formatMessage(messages.preview),
|
|
89
89
|
onClick: function onClick() {
|
|
90
90
|
var _handleShowMediaViewe;
|
|
@@ -528,7 +528,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
528
528
|
testId: 'file-preview-toolbar-button',
|
|
529
529
|
type: 'button',
|
|
530
530
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
531
|
-
iconFallback:
|
|
531
|
+
iconFallback: MaximizeIcon,
|
|
532
532
|
title: intl.formatMessage(messages.preview),
|
|
533
533
|
onClick: function onClick() {
|
|
534
534
|
var _handleShowMediaViewe2;
|
|
@@ -614,7 +614,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
614
614
|
testId: 'file-preview-toolbar-button',
|
|
615
615
|
type: 'button',
|
|
616
616
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
617
|
-
iconFallback:
|
|
617
|
+
iconFallback: MaximizeIcon,
|
|
618
618
|
title: intl.formatMessage(messages.preview),
|
|
619
619
|
onClick: function onClick() {
|
|
620
620
|
var _handleShowMediaViewe3;
|
|
@@ -765,10 +765,18 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
765
765
|
type: 'separator'
|
|
766
766
|
});
|
|
767
767
|
}
|
|
768
|
+
var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
|
|
769
|
+
return fg('platform_editor_controls_patch_1') ? {
|
|
770
|
+
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
771
|
+
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
|
|
772
|
+
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
|
|
773
|
+
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
|
|
774
|
+
} : undefined;
|
|
775
|
+
};
|
|
768
776
|
items.push({
|
|
769
777
|
type: 'overflow-dropdown',
|
|
770
778
|
id: 'media',
|
|
771
|
-
options: [].concat(_toConsumableArray(customOptions), [{
|
|
779
|
+
options: [].concat(_toConsumableArray(customOptions), [_objectSpread({
|
|
772
780
|
title: 'Copy',
|
|
773
781
|
onClick: function onClick() {
|
|
774
782
|
var _pluginInjectionApi$c4, _pluginInjectionApi$f3;
|
|
@@ -779,13 +787,13 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
779
787
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
780
788
|
label: ""
|
|
781
789
|
})
|
|
782
|
-
}, {
|
|
790
|
+
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)), _objectSpread({
|
|
783
791
|
title: 'Delete',
|
|
784
792
|
onClick: remove,
|
|
785
793
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
786
794
|
label: ""
|
|
787
795
|
})
|
|
788
|
-
}])
|
|
796
|
+
}, hoverDecorationProps(nodeType))])
|
|
789
797
|
});
|
|
790
798
|
}
|
|
791
799
|
|
|
@@ -11,10 +11,9 @@ import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
|
11
11
|
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
12
12
|
import ImageInlineIcon from '@atlaskit/icon/core/image-inline';
|
|
13
13
|
import MaximizeIcon from '@atlaskit/icon/core/maximize';
|
|
14
|
+
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
14
15
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
15
16
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
16
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
17
|
-
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
18
17
|
import { messages } from '@atlaskit/media-ui';
|
|
19
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
19
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
@@ -47,7 +46,8 @@ export var generateMediaInlineFloatingToolbar = function generateMediaInlineFloa
|
|
|
47
46
|
testId: 'file-preview-toolbar-button',
|
|
48
47
|
type: 'button',
|
|
49
48
|
icon: editorExperiment('platform_editor_controls', 'variant1') ? GrowDiagonalIcon : MaximizeIcon,
|
|
50
|
-
|
|
49
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
50
|
+
iconFallback: MaximizeIcon,
|
|
51
51
|
title: intl.formatMessage(messages.preview),
|
|
52
52
|
onClick: function onClick() {
|
|
53
53
|
var _handleShowMediaViewe;
|
|
@@ -371,7 +371,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
371
371
|
testId: 'file-preview-toolbar-button',
|
|
372
372
|
type: 'button',
|
|
373
373
|
icon: isEditorControlsEnabled ? GrowDiagonalIcon : MaximizeIcon,
|
|
374
|
-
iconFallback:
|
|
374
|
+
iconFallback: MaximizeIcon,
|
|
375
375
|
title: intl.formatMessage(messages.preview),
|
|
376
376
|
onClick: function onClick() {
|
|
377
377
|
var _handleShowMediaViewe2;
|
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.17",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
|
-
"@atlaskit/button": "^
|
|
41
|
-
"@atlaskit/editor-common": "^102.
|
|
40
|
+
"@atlaskit/button": "^22.0.0",
|
|
41
|
+
"@atlaskit/editor-common": "^102.15.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-annotation": "^2.
|
|
44
|
+
"@atlaskit/editor-plugin-annotation": "^2.2.0",
|
|
45
45
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
47
47
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
57
57
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
58
58
|
"@atlaskit/form": "^12.0.0",
|
|
59
|
-
"@atlaskit/icon": "^25.
|
|
59
|
+
"@atlaskit/icon": "^25.3.0",
|
|
60
60
|
"@atlaskit/media-card": "^79.0.0",
|
|
61
61
|
"@atlaskit/media-client": "^32.0.0",
|
|
62
62
|
"@atlaskit/media-client-react": "^4.0.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.6.0",
|
|
73
73
|
"@atlaskit/tokens": "^4.5.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.0.0",
|
|
75
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -170,6 +170,9 @@
|
|
|
170
170
|
},
|
|
171
171
|
"platform_editor_multi_images_overridden_upload_fix": {
|
|
172
172
|
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"platform_editor_controls_patch_1": {
|
|
175
|
+
"type": "boolean"
|
|
173
176
|
}
|
|
174
177
|
},
|
|
175
178
|
"stricter": {
|