@atlaskit/editor-core 187.48.4 → 187.48.6
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 +15 -0
- package/README.md +1 -1
- package/dist/cjs/plugins/insert-block/index.js +11 -15
- package/dist/cjs/plugins/media/toolbar/index.js +3 -1
- package/dist/cjs/plugins/submit-editor/index.js +6 -5
- package/dist/cjs/ui/Appearance/Comment/Comment.js +19 -10
- package/dist/cjs/ui/ToolbarHelp/index.js +2 -2
- package/dist/cjs/ui/WithHelpTrigger/index.js +6 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/insert-block/index.js +6 -10
- package/dist/es2019/plugins/media/toolbar/index.js +6 -2
- package/dist/es2019/plugins/submit-editor/index.js +6 -5
- package/dist/es2019/ui/Appearance/Comment/Comment.js +18 -10
- package/dist/es2019/ui/ToolbarHelp/index.js +2 -2
- package/dist/es2019/ui/WithHelpTrigger/index.js +6 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/insert-block/index.js +7 -11
- package/dist/esm/plugins/media/toolbar/index.js +4 -2
- package/dist/esm/plugins/submit-editor/index.js +6 -5
- package/dist/esm/ui/Appearance/Comment/Comment.js +16 -10
- package/dist/esm/ui/ToolbarHelp/index.js +2 -2
- package/dist/esm/ui/WithHelpTrigger/index.js +6 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +230 -0
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/submit-editor/index.d.ts +6 -3
- package/dist/types/ui/ToolbarHelp/index.d.ts +2 -2
- package/dist/types/ui/WithHelpTrigger/index.d.ts +8 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +298 -0
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/submit-editor/index.d.ts +8 -3
- package/dist/types-ts4.5/ui/ToolbarHelp/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/WithHelpTrigger/index.d.ts +8 -2
- package/package.json +3 -3
- package/report.api.md +9 -5
- package/tmp/api-report-tmp.d.ts +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.48.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#40691](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40691) [`cffa2089176`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cffa2089176) - Decouple Help Dialog Plugin from Editor Core
|
|
8
|
+
- [#40485](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40485) [`14a726ecf5d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/14a726ecf5d) - [ux] Respect allowResizingInTables for pixel entry component
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 187.48.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#40763](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40763) [`7ff70f99909`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7ff70f99909) - Decouple media from editor-core and expose GridPluginState from grid plugin.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 187.48.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Main package for the Atlassian Editor.
|
|
|
6
6
|
|
|
7
7
|
Current devloop involves leveraging the atlaskit website shell to build out examples.
|
|
8
8
|
|
|
9
|
-
0. After following https://
|
|
9
|
+
0. After following https://hello.atlassian.net/wiki/spaces/AF/pages/2634599657/Getting+Started
|
|
10
10
|
1. `yarn start editor-core`
|
|
11
11
|
|
|
12
12
|
Then hit http://localhost:9000/examples/editor/editor-core
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
10
|
-
var _pluginKey = require("../media/pm-plugins/plugin-key");
|
|
11
10
|
var _utils = require("../type-ahead/utils");
|
|
12
11
|
var _layout = require("../layout");
|
|
13
12
|
var _macro = require("../macro");
|
|
@@ -16,8 +15,8 @@ var _ToolbarInsertBlock = _interopRequireDefault(require("./ui/ToolbarInsertBloc
|
|
|
16
15
|
var _key = require("../type-ahead/pm-plugins/key");
|
|
17
16
|
var _consts = require("@atlaskit/editor-plugin-block-type/consts");
|
|
18
17
|
var _analytics = require("../analytics");
|
|
19
|
-
var
|
|
20
|
-
var
|
|
18
|
+
var _pluginKey = require("../placeholder-text/plugin-key");
|
|
19
|
+
var _pluginKey2 = require("../macro/plugin-key");
|
|
21
20
|
var _types = require("../../ui/Toolbar/types");
|
|
22
21
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
23
22
|
var toolbarSizeToButtons = function toolbarSizeToButtons(toolbarSize) {
|
|
@@ -79,14 +78,12 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
79
78
|
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
80
79
|
plugins: {
|
|
81
80
|
typeAheadState: _key.pluginKey,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
placeholderTextState: _pluginKey2.pluginKey,
|
|
81
|
+
macroState: _pluginKey2.pluginKey,
|
|
82
|
+
placeholderTextState: _pluginKey.pluginKey,
|
|
85
83
|
layoutState: _layout.pluginKey
|
|
86
84
|
},
|
|
87
85
|
render: function render(_ref3) {
|
|
88
|
-
var
|
|
89
|
-
_ref3$macroState = _ref3.macroState,
|
|
86
|
+
var _ref3$macroState = _ref3.macroState,
|
|
90
87
|
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState,
|
|
91
88
|
placeholderTextState = _ref3.placeholderTextState,
|
|
92
89
|
layoutState = _ref3.layoutState;
|
|
@@ -104,7 +101,6 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
104
101
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
105
102
|
isLastItem: isLastItem,
|
|
106
103
|
featureFlags: featureFlags,
|
|
107
|
-
mediaState: mediaState,
|
|
108
104
|
macroState: macroState,
|
|
109
105
|
placeholderTextState: placeholderTextState,
|
|
110
106
|
layoutState: layoutState,
|
|
@@ -123,7 +119,7 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
123
119
|
};
|
|
124
120
|
};
|
|
125
121
|
function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
126
|
-
var _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
122
|
+
var _ref5, _ref6, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
127
123
|
var editorView = _ref4.editorView,
|
|
128
124
|
editorActions = _ref4.editorActions,
|
|
129
125
|
dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent,
|
|
@@ -137,19 +133,19 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
137
133
|
providers = _ref4.providers,
|
|
138
134
|
pluginInjectionApi = _ref4.pluginInjectionApi,
|
|
139
135
|
options = _ref4.options,
|
|
140
|
-
mediaState = _ref4.mediaState,
|
|
141
136
|
macroState = _ref4.macroState,
|
|
142
137
|
placeholderTextState = _ref4.placeholderTextState,
|
|
143
138
|
layoutState = _ref4.layoutState,
|
|
144
139
|
featureFlags = _ref4.featureFlags;
|
|
145
140
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
146
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType']),
|
|
141
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media']),
|
|
147
142
|
dateState = _useSharedPluginState.dateState,
|
|
148
143
|
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
149
144
|
imageUploadState = _useSharedPluginState.imageUploadState,
|
|
150
145
|
mentionState = _useSharedPluginState.mentionState,
|
|
151
146
|
emojiState = _useSharedPluginState.emojiState,
|
|
152
|
-
blockTypeState = _useSharedPluginState.blockTypeState
|
|
147
|
+
blockTypeState = _useSharedPluginState.blockTypeState,
|
|
148
|
+
mediaState = _useSharedPluginState.mediaState;
|
|
153
149
|
return /*#__PURE__*/_react.default.createElement(_ToolbarInsertBlock.default, {
|
|
154
150
|
pluginInjectionApi: pluginInjectionApi,
|
|
155
151
|
buttons: buttons,
|
|
@@ -166,8 +162,8 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
166
162
|
placeholderTextEnabled: placeholderTextState && placeholderTextState.allowInserting,
|
|
167
163
|
layoutSectionEnabled: !!layoutState,
|
|
168
164
|
expandEnabled: !!options.allowExpand,
|
|
169
|
-
mediaUploadsEnabled: mediaState && mediaState.allowsUploads,
|
|
170
|
-
onShowMediaPicker: mediaState && mediaState.showMediaPicker,
|
|
165
|
+
mediaUploadsEnabled: (_ref5 = mediaState && mediaState.allowsUploads) !== null && _ref5 !== void 0 ? _ref5 : undefined,
|
|
166
|
+
onShowMediaPicker: (_ref6 = mediaState && mediaState.showMediaPicker) !== null && _ref6 !== void 0 ? _ref6 : undefined,
|
|
171
167
|
mediaSupported: !!mediaState,
|
|
172
168
|
imageUploadSupported: !!(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.imageUpload),
|
|
173
169
|
imageUploadEnabled: imageUploadState === null || imageUploadState === void 0 ? void 0 : imageUploadState.enabled,
|
|
@@ -262,7 +262,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// Pixel Entry Toolbar Support
|
|
265
|
-
|
|
265
|
+
var selection = state.selection;
|
|
266
|
+
var isWithinTable = (0, _utils.hasParentNodeOfType)([state.schema.nodes.table])(selection);
|
|
267
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience') && allowResizing && (!isWithinTable || allowResizingInTables === true)) {
|
|
266
268
|
var selectedMediaSingleNode = (0, _utils2.getSelectedMediaSingle)(state);
|
|
267
269
|
var sizeInput = {
|
|
268
270
|
type: 'custom',
|
|
@@ -10,14 +10,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _keymap2 = require("@atlaskit/editor-prosemirror/keymap");
|
|
11
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
|
-
var _pluginKey = require("../../plugins/media/pm-plugins/plugin-key");
|
|
14
13
|
var _consts = require("../analytics/consts");
|
|
15
|
-
function createPlugin(eventDispatch, onSave) {
|
|
14
|
+
function createPlugin(eventDispatch, api, onSave) {
|
|
16
15
|
if (!onSave) {
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
18
|
return (0, _keymap2.keymap)((0, _defineProperty2.default)({}, "".concat(_keymaps.submit.common), function _(state, _dispatch, editorView) {
|
|
20
|
-
var
|
|
19
|
+
var _api$media, _api$media$sharedStat;
|
|
20
|
+
var mediaState = api === null || api === void 0 ? void 0 : (_api$media = api.media) === null || _api$media === void 0 ? void 0 : (_api$media$sharedStat = _api$media.sharedState) === null || _api$media$sharedStat === void 0 ? void 0 : _api$media$sharedStat.currentState();
|
|
21
21
|
if (mediaState && mediaState.waitForMediaUpload && !mediaState.allUploadsFinished) {
|
|
22
22
|
return true;
|
|
23
23
|
}
|
|
@@ -46,7 +46,8 @@ var analyticsPayload = function analyticsPayload(state) {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
var submitEditorPlugin = function submitEditorPlugin(_ref) {
|
|
49
|
-
var onSave = _ref.config
|
|
49
|
+
var onSave = _ref.config,
|
|
50
|
+
api = _ref.api;
|
|
50
51
|
return {
|
|
51
52
|
name: 'submitEditor',
|
|
52
53
|
pmPlugins: function pmPlugins() {
|
|
@@ -54,7 +55,7 @@ var submitEditorPlugin = function submitEditorPlugin(_ref) {
|
|
|
54
55
|
name: 'submitEditor',
|
|
55
56
|
plugin: function plugin(_ref2) {
|
|
56
57
|
var dispatch = _ref2.dispatch;
|
|
57
|
-
return createPlugin(dispatch, onSave);
|
|
58
|
+
return createPlugin(dispatch, api, onSave);
|
|
58
59
|
}
|
|
59
60
|
}];
|
|
60
61
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -13,7 +14,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
16
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
16
|
-
var _react =
|
|
17
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
18
|
var _react2 = require("@emotion/react");
|
|
18
19
|
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
19
20
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
@@ -21,9 +22,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
21
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
22
23
|
var _Toolbar = _interopRequireDefault(require("../../Toolbar"));
|
|
23
24
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
24
|
-
var _WithPluginState = _interopRequireDefault(require("../../WithPluginState"));
|
|
25
|
-
var _maxContentSize = require("../../../plugins/max-content-size");
|
|
26
|
-
var _pluginKey = require("../../../plugins/media/pm-plugins/plugin-key");
|
|
27
25
|
var _Addon = require("../../Addon");
|
|
28
26
|
var _commonStyles = require("@atlaskit/editor-plugin-table/ui/common-styles");
|
|
29
27
|
var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
|
|
@@ -34,11 +32,15 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
34
32
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
35
33
|
var _reactIntlNext = require("react-intl-next");
|
|
36
34
|
var _messages = _interopRequireDefault(require("../../../messages"));
|
|
35
|
+
var _context = require("../../../presets/context");
|
|
37
36
|
var _Toolbar2 = require("./Toolbar");
|
|
38
37
|
var _ContentStyles = require("../../ContentStyles");
|
|
39
38
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
39
|
+
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
40
40
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
41
41
|
/** @jsx jsx */
|
|
42
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
42
44
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
43
45
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
44
46
|
var CommentEditorMargin = 14;
|
|
@@ -195,17 +197,24 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
195
197
|
(0, _createClass2.default)(Editor, [{
|
|
196
198
|
key: "render",
|
|
197
199
|
value: function render() {
|
|
198
|
-
return (0, _react2.jsx)(
|
|
199
|
-
|
|
200
|
-
maxContentSize: _maxContentSize.pluginKey,
|
|
201
|
-
mediaState: _pluginKey.stateKey
|
|
202
|
-
},
|
|
203
|
-
render: this.renderChrome
|
|
200
|
+
return (0, _react2.jsx)(RenderWithPluginState, {
|
|
201
|
+
renderChrome: this.renderChrome
|
|
204
202
|
});
|
|
205
203
|
}
|
|
206
204
|
}]);
|
|
207
205
|
return Editor;
|
|
208
206
|
}(_react.default.Component);
|
|
209
207
|
(0, _defineProperty2.default)(Editor, "displayName", 'CommentEditorAppearance');
|
|
208
|
+
function RenderWithPluginState(_ref4) {
|
|
209
|
+
var renderChrome = _ref4.renderChrome;
|
|
210
|
+
var api = (0, _context.usePresetContext)();
|
|
211
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['media', 'maxContentSize']),
|
|
212
|
+
mediaState = _useSharedPluginState.mediaState,
|
|
213
|
+
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
214
|
+
return (0, _react2.jsx)(_react.Fragment, null, renderChrome({
|
|
215
|
+
maxContentSize: maxContentSizeState,
|
|
216
|
+
mediaState: mediaState
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
210
219
|
var CommentEditorWithIntl = (0, _reactIntlNext.injectIntl)(Editor);
|
|
211
220
|
exports.CommentEditorWithIntl = CommentEditorWithIntl;
|
|
@@ -11,7 +11,7 @@ var _ToolbarButton = _interopRequireDefault(require("../ToolbarButton"));
|
|
|
11
11
|
var _WithHelpTrigger = _interopRequireDefault(require("../WithHelpTrigger"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _messages = require("./messages");
|
|
14
|
-
var
|
|
14
|
+
var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
|
|
15
15
|
var _ref$title = _ref.title,
|
|
16
16
|
title = _ref$title === void 0 ? 'Open help dialog' : _ref$title,
|
|
17
17
|
_ref$titlePosition = _ref.titlePosition,
|
|
@@ -35,5 +35,5 @@ var tooltipHelpTrigger = function tooltipHelpTrigger(_ref) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
var _default = (0, _reactIntlNext.injectIntl)(
|
|
38
|
+
var _default = (0, _reactIntlNext.injectIntl)(TooltipHelpTrigger);
|
|
39
39
|
exports.default = _default;
|
|
@@ -16,10 +16,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
var _analytics = require("../../plugins/analytics");
|
|
18
18
|
var _eventDispatcher = require("../../event-dispatcher");
|
|
19
|
-
var _commands = require("../../plugins/help-dialog/commands");
|
|
20
19
|
var _consts = require("../../plugins/analytics/consts");
|
|
20
|
+
var _commands = require("../../plugins/help-dialog/commands");
|
|
21
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // TODO - ED-20189 Source deprecatedOpenHelpCommand from help-dialog-plugin
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
* Use WithHelpTrigger from @atlaskit/editor-plugin-help-dialog which uses pluginInjectionApi
|
|
26
|
+
*/
|
|
23
27
|
var WithHelpTrigger = /*#__PURE__*/function (_React$Component) {
|
|
24
28
|
(0, _inherits2.default)(WithHelpTrigger, _React$Component);
|
|
25
29
|
var _super = _createSuper(WithHelpTrigger);
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.48.
|
|
9
|
+
var version = "187.48.6";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { stateKey as mediaStateKey } from '../media/pm-plugins/plugin-key';
|
|
4
3
|
import { isTypeAheadAllowed } from '../type-ahead/utils';
|
|
5
4
|
import { pluginKey as layoutStateKey } from '../layout';
|
|
6
5
|
import { insertMacroFromMacroBrowser } from '../macro';
|
|
@@ -71,13 +70,11 @@ const insertBlockPlugin = ({
|
|
|
71
70
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
72
71
|
plugins: {
|
|
73
72
|
typeAheadState: typeAheadPluginKey,
|
|
74
|
-
mediaState: mediaStateKey,
|
|
75
73
|
macroState: macroStateKey,
|
|
76
74
|
placeholderTextState: placeholderTextStateKey,
|
|
77
75
|
layoutState: layoutStateKey
|
|
78
76
|
},
|
|
79
77
|
render: ({
|
|
80
|
-
mediaState,
|
|
81
78
|
macroState = {},
|
|
82
79
|
placeholderTextState,
|
|
83
80
|
layoutState
|
|
@@ -96,7 +93,6 @@ const insertBlockPlugin = ({
|
|
|
96
93
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
97
94
|
isLastItem: isLastItem,
|
|
98
95
|
featureFlags: featureFlags,
|
|
99
|
-
mediaState: mediaState,
|
|
100
96
|
macroState: macroState,
|
|
101
97
|
placeholderTextState: placeholderTextState,
|
|
102
98
|
layoutState: layoutState,
|
|
@@ -128,13 +124,12 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
128
124
|
providers,
|
|
129
125
|
pluginInjectionApi,
|
|
130
126
|
options,
|
|
131
|
-
mediaState,
|
|
132
127
|
macroState,
|
|
133
128
|
placeholderTextState,
|
|
134
129
|
layoutState,
|
|
135
130
|
featureFlags
|
|
136
131
|
}) {
|
|
137
|
-
var _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
132
|
+
var _ref, _ref2, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
138
133
|
const buttons = toolbarSizeToButtons(toolbarSize);
|
|
139
134
|
const {
|
|
140
135
|
dateState,
|
|
@@ -142,8 +137,9 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
142
137
|
imageUploadState,
|
|
143
138
|
mentionState,
|
|
144
139
|
emojiState,
|
|
145
|
-
blockTypeState
|
|
146
|
-
|
|
140
|
+
blockTypeState,
|
|
141
|
+
mediaState
|
|
142
|
+
} = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media']);
|
|
147
143
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
148
144
|
pluginInjectionApi: pluginInjectionApi,
|
|
149
145
|
buttons: buttons,
|
|
@@ -160,8 +156,8 @@ function ToolbarInsertBlockWithInjectionApi({
|
|
|
160
156
|
placeholderTextEnabled: placeholderTextState && placeholderTextState.allowInserting,
|
|
161
157
|
layoutSectionEnabled: !!layoutState,
|
|
162
158
|
expandEnabled: !!options.allowExpand,
|
|
163
|
-
mediaUploadsEnabled: mediaState && mediaState.allowsUploads,
|
|
164
|
-
onShowMediaPicker: mediaState && mediaState.showMediaPicker,
|
|
159
|
+
mediaUploadsEnabled: (_ref = mediaState && mediaState.allowsUploads) !== null && _ref !== void 0 ? _ref : undefined,
|
|
160
|
+
onShowMediaPicker: (_ref2 = mediaState && mediaState.showMediaPicker) !== null && _ref2 !== void 0 ? _ref2 : undefined,
|
|
165
161
|
mediaSupported: !!mediaState,
|
|
166
162
|
imageUploadSupported: !!(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.imageUpload),
|
|
167
163
|
imageUploadEnabled: imageUploadState === null || imageUploadState === void 0 ? void 0 : imageUploadState.enabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { findParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
3
|
+
import { findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
5
5
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
6
6
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
@@ -260,7 +260,11 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
// Pixel Entry Toolbar Support
|
|
263
|
-
|
|
263
|
+
const {
|
|
264
|
+
selection
|
|
265
|
+
} = state;
|
|
266
|
+
const isWithinTable = hasParentNodeOfType([state.schema.nodes.table])(selection);
|
|
267
|
+
if (getBooleanFF('platform.editor.media.extended-resize-experience') && allowResizing && (!isWithinTable || allowResizingInTables === true)) {
|
|
264
268
|
const selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
265
269
|
const sizeInput = {
|
|
266
270
|
type: 'custom',
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
2
|
import { submit } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { stateKey as mediaPluginKey } from '../../plugins/media/pm-plugins/plugin-key';
|
|
5
4
|
import { analyticsEventKey } from '../analytics/consts';
|
|
6
|
-
export function createPlugin(eventDispatch, onSave) {
|
|
5
|
+
export function createPlugin(eventDispatch, api, onSave) {
|
|
7
6
|
if (!onSave) {
|
|
8
7
|
return;
|
|
9
8
|
}
|
|
10
9
|
return keymap({
|
|
11
10
|
[`${submit.common}`]: (state, _dispatch, editorView) => {
|
|
12
|
-
|
|
11
|
+
var _api$media, _api$media$sharedStat;
|
|
12
|
+
const mediaState = api === null || api === void 0 ? void 0 : (_api$media = api.media) === null || _api$media === void 0 ? void 0 : (_api$media$sharedStat = _api$media.sharedState) === null || _api$media$sharedStat === void 0 ? void 0 : _api$media$sharedStat.currentState();
|
|
13
13
|
if (mediaState && mediaState.waitForMediaUpload && !mediaState.allUploadsFinished) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
@@ -37,7 +37,8 @@ const analyticsPayload = state => ({
|
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
const submitEditorPlugin = ({
|
|
40
|
-
config: onSave
|
|
40
|
+
config: onSave,
|
|
41
|
+
api
|
|
41
42
|
}) => ({
|
|
42
43
|
name: 'submitEditor',
|
|
43
44
|
pmPlugins() {
|
|
@@ -45,7 +46,7 @@ const submitEditorPlugin = ({
|
|
|
45
46
|
name: 'submitEditor',
|
|
46
47
|
plugin: ({
|
|
47
48
|
dispatch
|
|
48
|
-
}) => createPlugin(dispatch, onSave)
|
|
49
|
+
}) => createPlugin(dispatch, api, onSave)
|
|
49
50
|
}];
|
|
50
51
|
}
|
|
51
52
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { Fragment } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
6
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
@@ -8,9 +8,6 @@ import { borderRadius } from '@atlaskit/theme/constants';
|
|
|
8
8
|
import { N40 } from '@atlaskit/theme/colors';
|
|
9
9
|
import Toolbar from '../../Toolbar';
|
|
10
10
|
import PluginSlot from '../../PluginSlot';
|
|
11
|
-
import WithPluginState from '../../WithPluginState';
|
|
12
|
-
import { pluginKey as maxContentSizePluginKey } from '../../../plugins/max-content-size';
|
|
13
|
-
import { stateKey as mediaPluginKey } from '../../../plugins/media/pm-plugins/plugin-key';
|
|
14
11
|
import { ClickAreaBlock } from '../../Addon';
|
|
15
12
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
16
13
|
import WithFlash from '../../WithFlash';
|
|
@@ -21,9 +18,11 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
21
18
|
import classnames from 'classnames';
|
|
22
19
|
import { injectIntl } from 'react-intl-next';
|
|
23
20
|
import messages from '../../../messages';
|
|
21
|
+
import { usePresetContext } from '../../../presets/context';
|
|
24
22
|
import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
|
|
25
23
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
26
24
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
25
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
27
26
|
const CommentEditorMargin = 14;
|
|
28
27
|
const commentEditorStyle = css`
|
|
29
28
|
display: flex;
|
|
@@ -223,14 +222,23 @@ class Editor extends React.Component {
|
|
|
223
222
|
}
|
|
224
223
|
}
|
|
225
224
|
render() {
|
|
226
|
-
return jsx(
|
|
227
|
-
|
|
228
|
-
maxContentSize: maxContentSizePluginKey,
|
|
229
|
-
mediaState: mediaPluginKey
|
|
230
|
-
},
|
|
231
|
-
render: this.renderChrome
|
|
225
|
+
return jsx(RenderWithPluginState, {
|
|
226
|
+
renderChrome: this.renderChrome
|
|
232
227
|
});
|
|
233
228
|
}
|
|
234
229
|
}
|
|
235
230
|
_defineProperty(Editor, "displayName", 'CommentEditorAppearance');
|
|
231
|
+
function RenderWithPluginState({
|
|
232
|
+
renderChrome
|
|
233
|
+
}) {
|
|
234
|
+
const api = usePresetContext();
|
|
235
|
+
const {
|
|
236
|
+
mediaState,
|
|
237
|
+
maxContentSizeState
|
|
238
|
+
} = useSharedPluginState(api, ['media', 'maxContentSize']);
|
|
239
|
+
return jsx(Fragment, null, renderChrome({
|
|
240
|
+
maxContentSize: maxContentSizeState,
|
|
241
|
+
mediaState
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
236
244
|
export const CommentEditorWithIntl = injectIntl(Editor);
|
|
@@ -4,7 +4,7 @@ import ToolbarButton from '../ToolbarButton';
|
|
|
4
4
|
import WithHelpTrigger from '../WithHelpTrigger';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { messages } from './messages';
|
|
7
|
-
const
|
|
7
|
+
const TooltipHelpTrigger = ({
|
|
8
8
|
title = 'Open help dialog',
|
|
9
9
|
titlePosition = 'left',
|
|
10
10
|
intl
|
|
@@ -25,4 +25,4 @@ const tooltipHelpTrigger = ({
|
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
export default injectIntl(
|
|
28
|
+
export default injectIntl(TooltipHelpTrigger);
|
|
@@ -3,8 +3,13 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT_ID } from '../../plugins/analytics';
|
|
5
5
|
import { createDispatch } from '../../event-dispatcher';
|
|
6
|
-
import { openHelpCommand } from '../../plugins/help-dialog/commands';
|
|
7
6
|
import { analyticsEventKey } from '../../plugins/analytics/consts';
|
|
7
|
+
// TODO - ED-20189 Source deprecatedOpenHelpCommand from help-dialog-plugin
|
|
8
|
+
import { openHelpCommand } from '../../plugins/help-dialog/commands';
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
* Use WithHelpTrigger from @atlaskit/editor-plugin-help-dialog which uses pluginInjectionApi
|
|
12
|
+
*/
|
|
8
13
|
export default class WithHelpTrigger extends React.Component {
|
|
9
14
|
constructor(...args) {
|
|
10
15
|
super(...args);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import { stateKey as mediaStateKey } from '../media/pm-plugins/plugin-key';
|
|
4
3
|
import { isTypeAheadAllowed } from '../type-ahead/utils';
|
|
5
4
|
import { pluginKey as layoutStateKey } from '../layout';
|
|
6
5
|
import { insertMacroFromMacroBrowser } from '../macro';
|
|
@@ -72,14 +71,12 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
72
71
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
73
72
|
plugins: {
|
|
74
73
|
typeAheadState: typeAheadPluginKey,
|
|
75
|
-
mediaState: mediaStateKey,
|
|
76
74
|
macroState: macroStateKey,
|
|
77
75
|
placeholderTextState: placeholderTextStateKey,
|
|
78
76
|
layoutState: layoutStateKey
|
|
79
77
|
},
|
|
80
78
|
render: function render(_ref3) {
|
|
81
|
-
var
|
|
82
|
-
_ref3$macroState = _ref3.macroState,
|
|
79
|
+
var _ref3$macroState = _ref3.macroState,
|
|
83
80
|
macroState = _ref3$macroState === void 0 ? {} : _ref3$macroState,
|
|
84
81
|
placeholderTextState = _ref3.placeholderTextState,
|
|
85
82
|
layoutState = _ref3.layoutState;
|
|
@@ -97,7 +94,6 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
97
94
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
98
95
|
isLastItem: isLastItem,
|
|
99
96
|
featureFlags: featureFlags,
|
|
100
|
-
mediaState: mediaState,
|
|
101
97
|
macroState: macroState,
|
|
102
98
|
placeholderTextState: placeholderTextState,
|
|
103
99
|
layoutState: layoutState,
|
|
@@ -116,7 +112,7 @@ var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
116
112
|
};
|
|
117
113
|
};
|
|
118
114
|
function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
119
|
-
var _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
115
|
+
var _ref5, _ref6, _pluginInjectionApi$i, _pluginInjectionApi$c, _pluginInjectionApi$p, _pluginInjectionApi$b;
|
|
120
116
|
var editorView = _ref4.editorView,
|
|
121
117
|
editorActions = _ref4.editorActions,
|
|
122
118
|
dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent,
|
|
@@ -130,19 +126,19 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
130
126
|
providers = _ref4.providers,
|
|
131
127
|
pluginInjectionApi = _ref4.pluginInjectionApi,
|
|
132
128
|
options = _ref4.options,
|
|
133
|
-
mediaState = _ref4.mediaState,
|
|
134
129
|
macroState = _ref4.macroState,
|
|
135
130
|
placeholderTextState = _ref4.placeholderTextState,
|
|
136
131
|
layoutState = _ref4.layoutState,
|
|
137
132
|
featureFlags = _ref4.featureFlags;
|
|
138
133
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
139
|
-
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType']),
|
|
134
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media']),
|
|
140
135
|
dateState = _useSharedPluginState.dateState,
|
|
141
136
|
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
142
137
|
imageUploadState = _useSharedPluginState.imageUploadState,
|
|
143
138
|
mentionState = _useSharedPluginState.mentionState,
|
|
144
139
|
emojiState = _useSharedPluginState.emojiState,
|
|
145
|
-
blockTypeState = _useSharedPluginState.blockTypeState
|
|
140
|
+
blockTypeState = _useSharedPluginState.blockTypeState,
|
|
141
|
+
mediaState = _useSharedPluginState.mediaState;
|
|
146
142
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
147
143
|
pluginInjectionApi: pluginInjectionApi,
|
|
148
144
|
buttons: buttons,
|
|
@@ -159,8 +155,8 @@ function ToolbarInsertBlockWithInjectionApi(_ref4) {
|
|
|
159
155
|
placeholderTextEnabled: placeholderTextState && placeholderTextState.allowInserting,
|
|
160
156
|
layoutSectionEnabled: !!layoutState,
|
|
161
157
|
expandEnabled: !!options.allowExpand,
|
|
162
|
-
mediaUploadsEnabled: mediaState && mediaState.allowsUploads,
|
|
163
|
-
onShowMediaPicker: mediaState && mediaState.showMediaPicker,
|
|
158
|
+
mediaUploadsEnabled: (_ref5 = mediaState && mediaState.allowsUploads) !== null && _ref5 !== void 0 ? _ref5 : undefined,
|
|
159
|
+
onShowMediaPicker: (_ref6 = mediaState && mediaState.showMediaPicker) !== null && _ref6 !== void 0 ? _ref6 : undefined,
|
|
164
160
|
mediaSupported: !!mediaState,
|
|
165
161
|
imageUploadSupported: !!(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.imageUpload),
|
|
166
162
|
imageUploadEnabled: imageUploadState === null || imageUploadState === void 0 ? void 0 : imageUploadState.enabled,
|
|
@@ -4,7 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import { findParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
+
import { findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
9
9
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
10
10
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
@@ -253,7 +253,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
// Pixel Entry Toolbar Support
|
|
256
|
-
|
|
256
|
+
var selection = state.selection;
|
|
257
|
+
var isWithinTable = hasParentNodeOfType([state.schema.nodes.table])(selection);
|
|
258
|
+
if (getBooleanFF('platform.editor.media.extended-resize-experience') && allowResizing && (!isWithinTable || allowResizingInTables === true)) {
|
|
257
259
|
var selectedMediaSingleNode = getSelectedMediaSingle(state);
|
|
258
260
|
var sizeInput = {
|
|
259
261
|
type: 'custom',
|