@atlaskit/editor-plugin-media 2.6.5 → 2.6.7
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 +17 -0
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +2 -2
- package/dist/cjs/ui/toolbar/index.js +17 -7
- package/dist/cjs/ui/toolbar/mediaInline.js +11 -4
- package/dist/cjs/ui/toolbar/pixel-resizing.js +5 -1
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +2 -2
- package/dist/es2019/ui/toolbar/index.js +17 -7
- package/dist/es2019/ui/toolbar/mediaInline.js +11 -4
- package/dist/es2019/ui/toolbar/pixel-resizing.js +5 -1
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +2 -2
- package/dist/esm/ui/toolbar/index.js +17 -7
- package/dist/esm/ui/toolbar/mediaInline.js +11 -4
- package/dist/esm/ui/toolbar/pixel-resizing.js +5 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 2.6.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#146103](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146103)
|
|
8
|
+
[`de3c759c70129`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/de3c759c70129) -
|
|
9
|
+
[ux] ED-26971 Update media toolbar icons and show resize option in disabled state for inline media
|
|
10
|
+
|
|
11
|
+
## 2.6.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#144194](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144194)
|
|
16
|
+
[`542b82e03416e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/542b82e03416e) -
|
|
17
|
+
[ux] Remove separators within group in Editor floating toolbar
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 2.6.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -55,13 +55,13 @@ var MediaViewerContainer = exports.MediaViewerContainer = function MediaViewerCo
|
|
|
55
55
|
var isVideoMedia = (0, _isType.isVideo)((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
56
56
|
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && (0, _experiments.editorExperiment)('platform_editor_controls', 'control');
|
|
57
57
|
return (0, _react2.jsx)(_react.Fragment, null, isEditorViewMode ? (0, _react2.jsx)(_react.Fragment, null, isInline ?
|
|
58
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
58
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
59
59
|
(0, _react2.jsx)("span", {
|
|
60
60
|
onClick: showMediaViewer,
|
|
61
61
|
css: interactiveStyles,
|
|
62
62
|
"data-testid": mediaViewerContainerTestID
|
|
63
63
|
}, children) :
|
|
64
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
64
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
65
65
|
(0, _react2.jsx)("div", {
|
|
66
66
|
onClick: showMediaViewer,
|
|
67
67
|
css: interactiveStyles,
|
|
@@ -272,9 +272,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
if (!isEditorControlsEnabled || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
|
|
276
|
+
toolbarButtons.push({
|
|
277
|
+
type: 'separator'
|
|
278
|
+
});
|
|
279
|
+
}
|
|
278
280
|
}
|
|
279
281
|
if (allowAdvancedToolBarOptions) {
|
|
280
282
|
var _pluginInjectionApi$a3;
|
|
@@ -319,9 +321,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
319
321
|
title: intl.formatMessage(_card.layoutToMessages[selectedLayoutIcon.value]),
|
|
320
322
|
icon: selectedLayoutIcon.icon
|
|
321
323
|
};
|
|
322
|
-
toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), [trigger, {
|
|
324
|
+
toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), [trigger], (0, _toConsumableArray2.default)(isEditorControlsEnabled && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? [] : [{
|
|
323
325
|
type: 'separator'
|
|
324
|
-
}]);
|
|
326
|
+
}]));
|
|
325
327
|
}
|
|
326
328
|
}
|
|
327
329
|
};
|
|
@@ -417,7 +419,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
417
419
|
onClick: function onClick() {
|
|
418
420
|
return true;
|
|
419
421
|
},
|
|
420
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
422
|
+
icon: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? /*#__PURE__*/_react.default.createElement(_maximize.default, {
|
|
423
|
+
color: "currentColor",
|
|
424
|
+
spacing: "spacious",
|
|
425
|
+
label: ""
|
|
426
|
+
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
421
427
|
color: "currentColor",
|
|
422
428
|
spacing: "spacious",
|
|
423
429
|
label: floatingSwitcherTitle,
|
|
@@ -432,7 +438,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
432
438
|
options: _options2,
|
|
433
439
|
title: intl.formatMessage(_mediaUi.messages.sizeOptions),
|
|
434
440
|
icon: function icon() {
|
|
435
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
441
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? /*#__PURE__*/_react.default.createElement(_maximize.default, {
|
|
442
|
+
color: "currentColor",
|
|
443
|
+
spacing: "spacious",
|
|
444
|
+
label: intl.formatMessage(_mediaUi.messages.sizeOptions)
|
|
445
|
+
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
436
446
|
color: "currentColor",
|
|
437
447
|
spacing: "spacious",
|
|
438
448
|
label: intl.formatMessage(_mediaUi.messages.sizeOptions),
|
|
@@ -21,6 +21,7 @@ var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/mi
|
|
|
21
21
|
var _download = _interopRequireDefault(require("@atlaskit/icon/core/migration/download"));
|
|
22
22
|
var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
|
|
23
23
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
24
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
25
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
25
26
|
var _linking = require("../../pm-plugins/commands/linking");
|
|
26
27
|
var _linking2 = require("../../pm-plugins/linking");
|
|
@@ -224,9 +225,11 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
224
225
|
});
|
|
225
226
|
}
|
|
226
227
|
});
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
if (!isEditorControlsEnabled || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
|
|
229
|
+
inlineImageItems.push({
|
|
230
|
+
type: 'separator'
|
|
231
|
+
});
|
|
232
|
+
}
|
|
230
233
|
}
|
|
231
234
|
var download = {
|
|
232
235
|
id: 'editor.media.image.download',
|
|
@@ -338,7 +341,11 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
338
341
|
id: 'editor.media.convert.mediasingle',
|
|
339
342
|
title: mediaSingleTitle,
|
|
340
343
|
onClick: (0, _commands.changeMediaInlineToMediaSingle)(editorAnalyticsAPI, widthPluginState),
|
|
341
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
344
|
+
icon: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? /*#__PURE__*/_react.default.createElement(_maximize.default, {
|
|
345
|
+
color: "currentColor",
|
|
346
|
+
spacing: "spacious",
|
|
347
|
+
label: ""
|
|
348
|
+
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
342
349
|
color: "currentColor",
|
|
343
350
|
spacing: "spacious",
|
|
344
351
|
label: mediaSingleTitle,
|
|
@@ -10,6 +10,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _media = require("@atlaskit/editor-common/media");
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
12
|
var _growHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/grow-horizontal"));
|
|
13
|
+
var _imageFullscreen = _interopRequireDefault(require("@atlaskit/icon/core/image-fullscreen"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
15
|
var _commands = require("../../pm-plugins/pixel-resizing/commands");
|
|
14
16
|
var _ui = require("../../pm-plugins/pixel-resizing/ui");
|
|
15
17
|
var _constants = require("../../pm-plugins/pixel-resizing/ui/constants");
|
|
@@ -62,7 +64,9 @@ var getResizeDropdownOption = exports.getResizeDropdownOption = function getResi
|
|
|
62
64
|
return [{
|
|
63
65
|
title: formatMessage(_media.pixelEntryMessages.resizeOption),
|
|
64
66
|
onClick: (0, _commands.openPixelEditor)(),
|
|
65
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
67
|
+
icon: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
68
|
+
label: ""
|
|
69
|
+
}) : /*#__PURE__*/_react.default.createElement(_growHorizontal.default, {
|
|
66
70
|
label: ""
|
|
67
71
|
}),
|
|
68
72
|
testId: 'media-pixel-resizing-dropdown-option'
|
|
@@ -38,13 +38,13 @@ export const MediaViewerContainer = ({
|
|
|
38
38
|
const isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
39
39
|
const shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && editorExperiment('platform_editor_controls', 'control');
|
|
40
40
|
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ?
|
|
41
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
41
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
42
42
|
jsx("span", {
|
|
43
43
|
onClick: showMediaViewer,
|
|
44
44
|
css: interactiveStyles,
|
|
45
45
|
"data-testid": mediaViewerContainerTestID
|
|
46
46
|
}, children) :
|
|
47
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
47
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
48
48
|
jsx("div", {
|
|
49
49
|
onClick: showMediaViewer,
|
|
50
50
|
css: interactiveStyles,
|
|
@@ -263,9 +263,11 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
|
|
267
|
+
toolbarButtons.push({
|
|
268
|
+
type: 'separator'
|
|
269
|
+
});
|
|
270
|
+
}
|
|
269
271
|
}
|
|
270
272
|
if (allowAdvancedToolBarOptions) {
|
|
271
273
|
var _pluginInjectionApi$a3;
|
|
@@ -310,9 +312,9 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
310
312
|
title: intl.formatMessage(layoutToMessages[selectedLayoutIcon.value]),
|
|
311
313
|
icon: selectedLayoutIcon.icon
|
|
312
314
|
};
|
|
313
|
-
toolbarButtons = [...toolbarButtons, trigger, {
|
|
315
|
+
toolbarButtons = [...toolbarButtons, trigger, ...(isEditorControlsEnabled && fg('platform_editor_controls_patch_6') ? [] : [{
|
|
314
316
|
type: 'separator'
|
|
315
|
-
}];
|
|
317
|
+
}])];
|
|
316
318
|
}
|
|
317
319
|
}
|
|
318
320
|
};
|
|
@@ -404,7 +406,11 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
404
406
|
onClick: () => {
|
|
405
407
|
return true;
|
|
406
408
|
},
|
|
407
|
-
icon: /*#__PURE__*/React.createElement(
|
|
409
|
+
icon: fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
410
|
+
color: "currentColor",
|
|
411
|
+
spacing: "spacious",
|
|
412
|
+
label: ""
|
|
413
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
408
414
|
color: "currentColor",
|
|
409
415
|
spacing: "spacious",
|
|
410
416
|
label: floatingSwitcherTitle,
|
|
@@ -418,7 +424,11 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
418
424
|
type: 'dropdown',
|
|
419
425
|
options: options,
|
|
420
426
|
title: intl.formatMessage(messages.sizeOptions),
|
|
421
|
-
icon: () => /*#__PURE__*/React.createElement(
|
|
427
|
+
icon: () => fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
428
|
+
color: "currentColor",
|
|
429
|
+
spacing: "spacious",
|
|
430
|
+
label: intl.formatMessage(messages.sizeOptions)
|
|
431
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
422
432
|
color: "currentColor",
|
|
423
433
|
spacing: "spacious",
|
|
424
434
|
label: intl.formatMessage(messages.sizeOptions),
|
|
@@ -12,6 +12,7 @@ import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
|
12
12
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
13
13
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
14
14
|
import { messages } from '@atlaskit/media-ui';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
17
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
17
18
|
import { getMediaLinkingState } from '../../pm-plugins/linking';
|
|
@@ -213,9 +214,11 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
213
214
|
});
|
|
214
215
|
}
|
|
215
216
|
});
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
|
|
218
|
+
inlineImageItems.push({
|
|
219
|
+
type: 'separator'
|
|
220
|
+
});
|
|
221
|
+
}
|
|
219
222
|
}
|
|
220
223
|
const download = {
|
|
221
224
|
id: 'editor.media.image.download',
|
|
@@ -329,7 +332,11 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
329
332
|
id: 'editor.media.convert.mediasingle',
|
|
330
333
|
title: mediaSingleTitle,
|
|
331
334
|
onClick: changeMediaInlineToMediaSingle(editorAnalyticsAPI, widthPluginState),
|
|
332
|
-
icon: /*#__PURE__*/React.createElement(
|
|
335
|
+
icon: fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
336
|
+
color: "currentColor",
|
|
337
|
+
spacing: "spacious",
|
|
338
|
+
label: ""
|
|
339
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
333
340
|
color: "currentColor",
|
|
334
341
|
spacing: "spacious",
|
|
335
342
|
label: mediaSingleTitle,
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
3
3
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import GrowHorizontalIcon from '@atlaskit/icon/core/grow-horizontal';
|
|
5
|
+
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
7
|
import { openPixelEditor } from '../../pm-plugins/pixel-resizing/commands';
|
|
6
8
|
import { PixelEntry } from '../../pm-plugins/pixel-resizing/ui';
|
|
7
9
|
import { PIXEL_RESIZING_TOOLBAR_WIDTH } from '../../pm-plugins/pixel-resizing/ui/constants';
|
|
@@ -54,7 +56,9 @@ export const getResizeDropdownOption = (mediaOptions, state, formatMessage, sele
|
|
|
54
56
|
return [{
|
|
55
57
|
title: formatMessage(messages.resizeOption),
|
|
56
58
|
onClick: openPixelEditor(),
|
|
57
|
-
icon: /*#__PURE__*/React.createElement(
|
|
59
|
+
icon: fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
60
|
+
label: ""
|
|
61
|
+
}) : /*#__PURE__*/React.createElement(GrowHorizontalIcon, {
|
|
58
62
|
label: ""
|
|
59
63
|
}),
|
|
60
64
|
testId: 'media-pixel-resizing-dropdown-option'
|
|
@@ -44,13 +44,13 @@ export var MediaViewerContainer = function MediaViewerContainer(_ref) {
|
|
|
44
44
|
var isVideoMedia = isVideo((_mediaNode$firstChild = mediaNode.firstChild) === null || _mediaNode$firstChild === void 0 ? void 0 : _mediaNode$firstChild.attrs.__fileMimeType);
|
|
45
45
|
var shouldShowViewer = isEditorViewMode && showViewer && selectedNodeAttrs && mediaClientConfig && !isVideoMedia && editorExperiment('platform_editor_controls', 'control');
|
|
46
46
|
return jsx(Fragment, null, isEditorViewMode ? jsx(Fragment, null, isInline ?
|
|
47
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
47
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
48
48
|
jsx("span", {
|
|
49
49
|
onClick: showMediaViewer,
|
|
50
50
|
css: interactiveStyles,
|
|
51
51
|
"data-testid": mediaViewerContainerTestID
|
|
52
52
|
}, children) :
|
|
53
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
53
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, @atlassian/a11y/interactive-element-not-keyboard-focusable
|
|
54
54
|
jsx("div", {
|
|
55
55
|
onClick: showMediaViewer,
|
|
56
56
|
css: interactiveStyles,
|
|
@@ -262,9 +262,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
|
|
266
|
+
toolbarButtons.push({
|
|
267
|
+
type: 'separator'
|
|
268
|
+
});
|
|
269
|
+
}
|
|
268
270
|
}
|
|
269
271
|
if (allowAdvancedToolBarOptions) {
|
|
270
272
|
var _pluginInjectionApi$a3;
|
|
@@ -309,9 +311,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
309
311
|
title: intl.formatMessage(layoutToMessages[selectedLayoutIcon.value]),
|
|
310
312
|
icon: selectedLayoutIcon.icon
|
|
311
313
|
};
|
|
312
|
-
toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), [trigger, {
|
|
314
|
+
toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), [trigger], _toConsumableArray(isEditorControlsEnabled && fg('platform_editor_controls_patch_6') ? [] : [{
|
|
313
315
|
type: 'separator'
|
|
314
|
-
}]);
|
|
316
|
+
}]));
|
|
315
317
|
}
|
|
316
318
|
}
|
|
317
319
|
};
|
|
@@ -407,7 +409,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
407
409
|
onClick: function onClick() {
|
|
408
410
|
return true;
|
|
409
411
|
},
|
|
410
|
-
icon: /*#__PURE__*/React.createElement(
|
|
412
|
+
icon: fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
413
|
+
color: "currentColor",
|
|
414
|
+
spacing: "spacious",
|
|
415
|
+
label: ""
|
|
416
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
411
417
|
color: "currentColor",
|
|
412
418
|
spacing: "spacious",
|
|
413
419
|
label: floatingSwitcherTitle,
|
|
@@ -422,7 +428,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
422
428
|
options: _options2,
|
|
423
429
|
title: intl.formatMessage(messages.sizeOptions),
|
|
424
430
|
icon: function icon() {
|
|
425
|
-
return /*#__PURE__*/React.createElement(
|
|
431
|
+
return fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
432
|
+
color: "currentColor",
|
|
433
|
+
spacing: "spacious",
|
|
434
|
+
label: intl.formatMessage(messages.sizeOptions)
|
|
435
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
426
436
|
color: "currentColor",
|
|
427
437
|
spacing: "spacious",
|
|
428
438
|
label: intl.formatMessage(messages.sizeOptions),
|
|
@@ -15,6 +15,7 @@ import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
|
15
15
|
import DownloadIcon from '@atlaskit/icon/core/migration/download';
|
|
16
16
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
17
17
|
import { messages } from '@atlaskit/media-ui';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
20
|
import { showLinkingToolbar } from '../../pm-plugins/commands/linking';
|
|
20
21
|
import { getMediaLinkingState } from '../../pm-plugins/linking';
|
|
@@ -214,9 +215,11 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
214
215
|
});
|
|
215
216
|
}
|
|
216
217
|
});
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
if (!isEditorControlsEnabled || !fg('platform_editor_controls_patch_6')) {
|
|
219
|
+
inlineImageItems.push({
|
|
220
|
+
type: 'separator'
|
|
221
|
+
});
|
|
222
|
+
}
|
|
220
223
|
}
|
|
221
224
|
var download = {
|
|
222
225
|
id: 'editor.media.image.download',
|
|
@@ -328,7 +331,11 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
328
331
|
id: 'editor.media.convert.mediasingle',
|
|
329
332
|
title: mediaSingleTitle,
|
|
330
333
|
onClick: changeMediaInlineToMediaSingle(editorAnalyticsAPI, widthPluginState),
|
|
331
|
-
icon: /*#__PURE__*/React.createElement(
|
|
334
|
+
icon: fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(MaximizeIcon, {
|
|
335
|
+
color: "currentColor",
|
|
336
|
+
spacing: "spacious",
|
|
337
|
+
label: ""
|
|
338
|
+
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
332
339
|
color: "currentColor",
|
|
333
340
|
spacing: "spacious",
|
|
334
341
|
label: mediaSingleTitle,
|
|
@@ -5,6 +5,8 @@ import React from 'react';
|
|
|
5
5
|
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
6
6
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import GrowHorizontalIcon from '@atlaskit/icon/core/grow-horizontal';
|
|
8
|
+
import ImageFullscreenIcon from '@atlaskit/icon/core/image-fullscreen';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { openPixelEditor } from '../../pm-plugins/pixel-resizing/commands';
|
|
9
11
|
import { PixelEntry } from '../../pm-plugins/pixel-resizing/ui';
|
|
10
12
|
import { PIXEL_RESIZING_TOOLBAR_WIDTH } from '../../pm-plugins/pixel-resizing/ui/constants';
|
|
@@ -55,7 +57,9 @@ export var getResizeDropdownOption = function getResizeDropdownOption(mediaOptio
|
|
|
55
57
|
return [{
|
|
56
58
|
title: formatMessage(messages.resizeOption),
|
|
57
59
|
onClick: openPixelEditor(),
|
|
58
|
-
icon: /*#__PURE__*/React.createElement(
|
|
60
|
+
icon: fg('platform_editor_controls_patch_7') ? /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
61
|
+
label: ""
|
|
62
|
+
}) : /*#__PURE__*/React.createElement(GrowHorizontalIcon, {
|
|
59
63
|
label: ""
|
|
60
64
|
}),
|
|
61
65
|
testId: 'media-pixel-resizing-dropdown-option'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.7",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
40
|
"@atlaskit/button": "^23.0.0",
|
|
41
|
-
"@atlaskit/editor-common": "^103.
|
|
41
|
+
"@atlaskit/editor-common": "^103.16.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/primitives": "^14.4.0",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/theme": "^18.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^4.14.0",
|
|
74
74
|
"@atlaskit/tokens": "^4.8.0",
|
|
75
75
|
"@atlaskit/tooltip": "^20.0.0",
|
|
76
76
|
"@babel/runtime": "^7.0.0",
|
|
@@ -186,6 +186,9 @@
|
|
|
186
186
|
},
|
|
187
187
|
"platform_editor_no_selection_until_interaction": {
|
|
188
188
|
"type": "boolean"
|
|
189
|
+
},
|
|
190
|
+
"platform_editor_controls_patch_7": {
|
|
191
|
+
"type": "boolean"
|
|
189
192
|
}
|
|
190
193
|
},
|
|
191
194
|
"stricter": {
|