@atlaskit/editor-core 187.17.0 → 187.17.1
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 +7 -0
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +5 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +34 -42
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -11
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +5 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +34 -42
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -0
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +1 -0
- package/package.json +4 -4
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9d2794a7753`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d2794a7753) - Add `executeCommand` to `pluginInjectionAPI` which should be used to dispatch a `PluginCommand` - from the `commands` property of a plugin.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 187.17.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -110,6 +110,9 @@ var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
var _this$view;
|
|
111
111
|
return (_this$view = _this.view) === null || _this$view === void 0 ? void 0 : _this$view.state;
|
|
112
112
|
});
|
|
113
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getEditorView", function () {
|
|
114
|
+
return _this.view;
|
|
115
|
+
});
|
|
113
116
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "formatFullWidthAppearance", function (appearance) {
|
|
114
117
|
if (appearance === 'full-width') {
|
|
115
118
|
return _analytics.FULL_WIDTH_MODE.FULL_WIDTH;
|
|
@@ -530,7 +533,8 @@ var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
530
533
|
});
|
|
531
534
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel));
|
|
532
535
|
_this.pluginInjectionAPI = new _preset.EditorPluginInjectionAPI({
|
|
533
|
-
getEditorState: _this.getEditorState
|
|
536
|
+
getEditorState: _this.getEditorState,
|
|
537
|
+
getEditorView: _this.getEditorView
|
|
534
538
|
});
|
|
535
539
|
_this.eventDispatcher = new _eventDispatcher.EventDispatcher();
|
|
536
540
|
_this.dispatch = (0, _eventDispatcher.createDispatch)(_this.eventDispatcher);
|
|
@@ -19,7 +19,6 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
19
19
|
var _reactIntlNext = require("react-intl-next");
|
|
20
20
|
var _picker = require("@atlaskit/emoji/picker");
|
|
21
21
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
|
-
var _preset = require("@atlaskit/editor-common/preset");
|
|
23
22
|
var _ToolbarButton = _interopRequireDefault(require("../../../../ui/ToolbarButton"));
|
|
24
23
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
25
24
|
var _actions = require("../../../date/actions");
|
|
@@ -172,22 +171,15 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
172
171
|
}
|
|
173
172
|
});
|
|
174
173
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toggleLinkPanel", function (inputMethod) {
|
|
175
|
-
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
pluginInjectionApi = _this$props.pluginInjectionApi;
|
|
179
|
-
var state = editorView.state,
|
|
180
|
-
dispatch = editorView.dispatch;
|
|
181
|
-
|
|
182
|
-
// We should update this to use `pluginInjectionApi.executeCommand` once available
|
|
183
|
-
(0, _preset.pluginCommandToPMCommand)(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.hyperlink) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.showLinkToolbar(inputMethod))(state, dispatch);
|
|
184
|
-
return true;
|
|
174
|
+
var _pluginInjectionApi$e, _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
175
|
+
var pluginInjectionApi = _this.props.pluginInjectionApi;
|
|
176
|
+
return (_pluginInjectionApi$e = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.executeCommand(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.hyperlink) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.showLinkToolbar(inputMethod))) !== null && _pluginInjectionApi$e !== void 0 ? _pluginInjectionApi$e : false;
|
|
185
177
|
});
|
|
186
178
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertMention", function (inputMethod) {
|
|
187
179
|
var _pluginInjectionApi$d3;
|
|
188
|
-
var _this$
|
|
189
|
-
editorView = _this$
|
|
190
|
-
pluginInjectionApi = _this$
|
|
180
|
+
var _this$props = _this.props,
|
|
181
|
+
editorView = _this$props.editorView,
|
|
182
|
+
pluginInjectionApi = _this$props.pluginInjectionApi;
|
|
191
183
|
if (!editorView) {
|
|
192
184
|
return true;
|
|
193
185
|
}
|
|
@@ -200,9 +192,9 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
200
192
|
});
|
|
201
193
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertTable", function (inputMethod) {
|
|
202
194
|
var _pluginInjectionApi$d4, _pluginInjectionApi$d5, _pluginInjectionApi$d6, _pluginInjectionApi$d7;
|
|
203
|
-
var _this$
|
|
204
|
-
pluginInjectionApi = _this$
|
|
205
|
-
editorView = _this$
|
|
195
|
+
var _this$props2 = _this.props,
|
|
196
|
+
pluginInjectionApi = _this$props2.pluginInjectionApi,
|
|
197
|
+
editorView = _this$props2.editorView;
|
|
206
198
|
var state = editorView.state,
|
|
207
199
|
dispatch = editorView.dispatch;
|
|
208
200
|
return (_pluginInjectionApi$d4 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies.table) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : (_pluginInjectionApi$d6 = (_pluginInjectionApi$d7 = _pluginInjectionApi$d5.actions).insertTable) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.call(_pluginInjectionApi$d7, {
|
|
@@ -236,9 +228,9 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
236
228
|
return true;
|
|
237
229
|
});
|
|
238
230
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "openMediaPicker", function (inputMethod) {
|
|
239
|
-
var _this$
|
|
240
|
-
onShowMediaPicker = _this$
|
|
241
|
-
dispatchAnalyticsEvent = _this$
|
|
231
|
+
var _this$props3 = _this.props,
|
|
232
|
+
onShowMediaPicker = _this$props3.onShowMediaPicker,
|
|
233
|
+
dispatchAnalyticsEvent = _this$props3.dispatchAnalyticsEvent;
|
|
242
234
|
if (onShowMediaPicker) {
|
|
243
235
|
onShowMediaPicker();
|
|
244
236
|
if (dispatchAnalyticsEvent) {
|
|
@@ -265,11 +257,11 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
265
257
|
};
|
|
266
258
|
});
|
|
267
259
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertHorizontalRule", function (inputMethod) {
|
|
268
|
-
var _this$
|
|
269
|
-
_this$
|
|
270
|
-
state = _this$
|
|
271
|
-
dispatch = _this$
|
|
272
|
-
featureFlags = _this$
|
|
260
|
+
var _this$props4 = _this.props,
|
|
261
|
+
_this$props4$editorVi = _this$props4.editorView,
|
|
262
|
+
state = _this$props4$editorVi.state,
|
|
263
|
+
dispatch = _this$props4$editorVi.dispatch,
|
|
264
|
+
featureFlags = _this$props4.featureFlags;
|
|
273
265
|
return (0, _commands4.insertHorizontalRule)(inputMethod, featureFlags)(state, dispatch);
|
|
274
266
|
});
|
|
275
267
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertExpand", function () {
|
|
@@ -280,9 +272,9 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
280
272
|
});
|
|
281
273
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "insertBlockType", function (itemName) {
|
|
282
274
|
return function () {
|
|
283
|
-
var _this$
|
|
284
|
-
editorView = _this$
|
|
285
|
-
onInsertBlockType = _this$
|
|
275
|
+
var _this$props5 = _this.props,
|
|
276
|
+
editorView = _this$props5.editorView,
|
|
277
|
+
onInsertBlockType = _this$props5.onInsertBlockType;
|
|
286
278
|
var state = editorView.state,
|
|
287
279
|
dispatch = editorView.dispatch;
|
|
288
280
|
onInsertBlockType(itemName)(state, dispatch);
|
|
@@ -301,11 +293,11 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
301
293
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onItemActivated", function (_ref2) {
|
|
302
294
|
var item = _ref2.item,
|
|
303
295
|
inputMethod = _ref2.inputMethod;
|
|
304
|
-
var _this$
|
|
305
|
-
editorView = _this$
|
|
306
|
-
editorActions = _this$
|
|
307
|
-
handleImageUpload = _this$
|
|
308
|
-
expandEnabled = _this$
|
|
296
|
+
var _this$props6 = _this.props,
|
|
297
|
+
editorView = _this$props6.editorView,
|
|
298
|
+
editorActions = _this$props6.editorActions,
|
|
299
|
+
handleImageUpload = _this$props6.handleImageUpload,
|
|
300
|
+
expandEnabled = _this$props6.expandEnabled;
|
|
309
301
|
|
|
310
302
|
// need to do this before inserting nodes so scrollIntoView works properly
|
|
311
303
|
if (!editorView.hasFocus()) {
|
|
@@ -421,12 +413,12 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
421
413
|
key: "renderPopup",
|
|
422
414
|
value: function renderPopup() {
|
|
423
415
|
var emojiPickerOpen = this.state.emojiPickerOpen;
|
|
424
|
-
var _this$
|
|
425
|
-
popupsMountPoint = _this$
|
|
426
|
-
popupsBoundariesElement = _this$
|
|
427
|
-
popupsScrollableElement = _this$
|
|
428
|
-
emojiProvider = _this$
|
|
429
|
-
replacePlusMenuWithElementBrowser = _this$
|
|
416
|
+
var _this$props7 = this.props,
|
|
417
|
+
popupsMountPoint = _this$props7.popupsMountPoint,
|
|
418
|
+
popupsBoundariesElement = _this$props7.popupsBoundariesElement,
|
|
419
|
+
popupsScrollableElement = _this$props7.popupsScrollableElement,
|
|
420
|
+
emojiProvider = _this$props7.emojiProvider,
|
|
421
|
+
replacePlusMenuWithElementBrowser = _this$props7.replacePlusMenuWithElementBrowser;
|
|
430
422
|
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
431
423
|
var name = _ref4.value.name;
|
|
432
424
|
return name === 'emoji';
|
|
@@ -462,9 +454,9 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
462
454
|
buttons = _this$state.buttons,
|
|
463
455
|
dropdownItems = _this$state.dropdownItems,
|
|
464
456
|
emojiPickerOpen = _this$state.emojiPickerOpen;
|
|
465
|
-
var _this$
|
|
466
|
-
isDisabled = _this$
|
|
467
|
-
isReducedSpacing = _this$
|
|
457
|
+
var _this$props8 = this.props,
|
|
458
|
+
isDisabled = _this$props8.isDisabled,
|
|
459
|
+
isReducedSpacing = _this$props8.isReducedSpacing;
|
|
468
460
|
if (buttons.length === 0 && dropdownItems.length === 0) {
|
|
469
461
|
return null;
|
|
470
462
|
}
|
|
@@ -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.17.
|
|
9
|
+
var version = "187.17.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -107,6 +107,7 @@ export class ReactEditorView extends React.Component {
|
|
|
107
107
|
var _this$view;
|
|
108
108
|
return (_this$view = this.view) === null || _this$view === void 0 ? void 0 : _this$view.state;
|
|
109
109
|
});
|
|
110
|
+
_defineProperty(this, "getEditorView", () => this.view);
|
|
110
111
|
_defineProperty(this, "formatFullWidthAppearance", appearance => {
|
|
111
112
|
if (appearance === 'full-width') {
|
|
112
113
|
return FULL_WIDTH_MODE.FULL_WIDTH;
|
|
@@ -528,7 +529,8 @@ export class ReactEditorView extends React.Component {
|
|
|
528
529
|
});
|
|
529
530
|
_defineProperty(this, "editor", this.createEditor(this.props.editorProps.assistiveLabel));
|
|
530
531
|
this.pluginInjectionAPI = new EditorPluginInjectionAPI({
|
|
531
|
-
getEditorState: this.getEditorState
|
|
532
|
+
getEditorState: this.getEditorState,
|
|
533
|
+
getEditorView: this.getEditorView
|
|
532
534
|
});
|
|
533
535
|
this.eventDispatcher = new EventDispatcher();
|
|
534
536
|
this.dispatch = createDispatch(this.eventDispatcher);
|
|
@@ -6,7 +6,6 @@ import ReactDOM from 'react-dom';
|
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { EmojiPicker as AkEmojiPicker } from '@atlaskit/emoji/picker';
|
|
8
8
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
9
|
-
import { pluginCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
10
9
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
11
10
|
import { separatorStyles, buttonGroupStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
12
11
|
import { insertDate } from '../../../date/actions';
|
|
@@ -153,19 +152,11 @@ export class ToolbarInsertBlock extends React.PureComponent {
|
|
|
153
152
|
}
|
|
154
153
|
});
|
|
155
154
|
_defineProperty(this, "toggleLinkPanel", inputMethod => {
|
|
156
|
-
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
155
|
+
var _pluginInjectionApi$e, _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
157
156
|
const {
|
|
158
|
-
editorView,
|
|
159
157
|
pluginInjectionApi
|
|
160
158
|
} = this.props;
|
|
161
|
-
|
|
162
|
-
state,
|
|
163
|
-
dispatch
|
|
164
|
-
} = editorView;
|
|
165
|
-
|
|
166
|
-
// We should update this to use `pluginInjectionApi.executeCommand` once available
|
|
167
|
-
pluginCommandToPMCommand(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.hyperlink) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.showLinkToolbar(inputMethod))(state, dispatch);
|
|
168
|
-
return true;
|
|
159
|
+
return (_pluginInjectionApi$e = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.executeCommand(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.hyperlink) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.showLinkToolbar(inputMethod))) !== null && _pluginInjectionApi$e !== void 0 ? _pluginInjectionApi$e : false;
|
|
169
160
|
});
|
|
170
161
|
_defineProperty(this, "insertMention", inputMethod => {
|
|
171
162
|
var _pluginInjectionApi$d3;
|
package/dist/es2019/version.json
CHANGED
|
@@ -103,6 +103,9 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
103
103
|
var _this$view;
|
|
104
104
|
return (_this$view = _this.view) === null || _this$view === void 0 ? void 0 : _this$view.state;
|
|
105
105
|
});
|
|
106
|
+
_defineProperty(_assertThisInitialized(_this), "getEditorView", function () {
|
|
107
|
+
return _this.view;
|
|
108
|
+
});
|
|
106
109
|
_defineProperty(_assertThisInitialized(_this), "formatFullWidthAppearance", function (appearance) {
|
|
107
110
|
if (appearance === 'full-width') {
|
|
108
111
|
return FULL_WIDTH_MODE.FULL_WIDTH;
|
|
@@ -523,7 +526,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
523
526
|
});
|
|
524
527
|
_defineProperty(_assertThisInitialized(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel));
|
|
525
528
|
_this.pluginInjectionAPI = new EditorPluginInjectionAPI({
|
|
526
|
-
getEditorState: _this.getEditorState
|
|
529
|
+
getEditorState: _this.getEditorState,
|
|
530
|
+
getEditorView: _this.getEditorView
|
|
527
531
|
});
|
|
528
532
|
_this.eventDispatcher = new EventDispatcher();
|
|
529
533
|
_this.dispatch = createDispatch(_this.eventDispatcher);
|
|
@@ -17,7 +17,6 @@ import ReactDOM from 'react-dom';
|
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
18
|
import { EmojiPicker as AkEmojiPicker } from '@atlaskit/emoji/picker';
|
|
19
19
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
20
|
-
import { pluginCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
21
20
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
22
21
|
import { separatorStyles, buttonGroupStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
23
22
|
import { insertDate } from '../../../date/actions';
|
|
@@ -167,22 +166,15 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
167
166
|
}
|
|
168
167
|
});
|
|
169
168
|
_defineProperty(_assertThisInitialized(_this), "toggleLinkPanel", function (inputMethod) {
|
|
170
|
-
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
171
|
-
var
|
|
172
|
-
|
|
173
|
-
pluginInjectionApi = _this$props.pluginInjectionApi;
|
|
174
|
-
var state = editorView.state,
|
|
175
|
-
dispatch = editorView.dispatch;
|
|
176
|
-
|
|
177
|
-
// We should update this to use `pluginInjectionApi.executeCommand` once available
|
|
178
|
-
pluginCommandToPMCommand(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.hyperlink) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.showLinkToolbar(inputMethod))(state, dispatch);
|
|
179
|
-
return true;
|
|
169
|
+
var _pluginInjectionApi$e, _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
170
|
+
var pluginInjectionApi = _this.props.pluginInjectionApi;
|
|
171
|
+
return (_pluginInjectionApi$e = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.executeCommand(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.hyperlink) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.showLinkToolbar(inputMethod))) !== null && _pluginInjectionApi$e !== void 0 ? _pluginInjectionApi$e : false;
|
|
180
172
|
});
|
|
181
173
|
_defineProperty(_assertThisInitialized(_this), "insertMention", function (inputMethod) {
|
|
182
174
|
var _pluginInjectionApi$d3;
|
|
183
|
-
var _this$
|
|
184
|
-
editorView = _this$
|
|
185
|
-
pluginInjectionApi = _this$
|
|
175
|
+
var _this$props = _this.props,
|
|
176
|
+
editorView = _this$props.editorView,
|
|
177
|
+
pluginInjectionApi = _this$props.pluginInjectionApi;
|
|
186
178
|
if (!editorView) {
|
|
187
179
|
return true;
|
|
188
180
|
}
|
|
@@ -195,9 +187,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
195
187
|
});
|
|
196
188
|
_defineProperty(_assertThisInitialized(_this), "insertTable", function (inputMethod) {
|
|
197
189
|
var _pluginInjectionApi$d4, _pluginInjectionApi$d5, _pluginInjectionApi$d6, _pluginInjectionApi$d7;
|
|
198
|
-
var _this$
|
|
199
|
-
pluginInjectionApi = _this$
|
|
200
|
-
editorView = _this$
|
|
190
|
+
var _this$props2 = _this.props,
|
|
191
|
+
pluginInjectionApi = _this$props2.pluginInjectionApi,
|
|
192
|
+
editorView = _this$props2.editorView;
|
|
201
193
|
var state = editorView.state,
|
|
202
194
|
dispatch = editorView.dispatch;
|
|
203
195
|
return (_pluginInjectionApi$d4 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies.table) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : (_pluginInjectionApi$d6 = (_pluginInjectionApi$d7 = _pluginInjectionApi$d5.actions).insertTable) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.call(_pluginInjectionApi$d7, {
|
|
@@ -231,9 +223,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
231
223
|
return true;
|
|
232
224
|
});
|
|
233
225
|
_defineProperty(_assertThisInitialized(_this), "openMediaPicker", function (inputMethod) {
|
|
234
|
-
var _this$
|
|
235
|
-
onShowMediaPicker = _this$
|
|
236
|
-
dispatchAnalyticsEvent = _this$
|
|
226
|
+
var _this$props3 = _this.props,
|
|
227
|
+
onShowMediaPicker = _this$props3.onShowMediaPicker,
|
|
228
|
+
dispatchAnalyticsEvent = _this$props3.dispatchAnalyticsEvent;
|
|
237
229
|
if (onShowMediaPicker) {
|
|
238
230
|
onShowMediaPicker();
|
|
239
231
|
if (dispatchAnalyticsEvent) {
|
|
@@ -260,11 +252,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
260
252
|
};
|
|
261
253
|
});
|
|
262
254
|
_defineProperty(_assertThisInitialized(_this), "insertHorizontalRule", function (inputMethod) {
|
|
263
|
-
var _this$
|
|
264
|
-
_this$
|
|
265
|
-
state = _this$
|
|
266
|
-
dispatch = _this$
|
|
267
|
-
featureFlags = _this$
|
|
255
|
+
var _this$props4 = _this.props,
|
|
256
|
+
_this$props4$editorVi = _this$props4.editorView,
|
|
257
|
+
state = _this$props4$editorVi.state,
|
|
258
|
+
dispatch = _this$props4$editorVi.dispatch,
|
|
259
|
+
featureFlags = _this$props4.featureFlags;
|
|
268
260
|
return insertHorizontalRule(inputMethod, featureFlags)(state, dispatch);
|
|
269
261
|
});
|
|
270
262
|
_defineProperty(_assertThisInitialized(_this), "insertExpand", function () {
|
|
@@ -275,9 +267,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
275
267
|
});
|
|
276
268
|
_defineProperty(_assertThisInitialized(_this), "insertBlockType", function (itemName) {
|
|
277
269
|
return function () {
|
|
278
|
-
var _this$
|
|
279
|
-
editorView = _this$
|
|
280
|
-
onInsertBlockType = _this$
|
|
270
|
+
var _this$props5 = _this.props,
|
|
271
|
+
editorView = _this$props5.editorView,
|
|
272
|
+
onInsertBlockType = _this$props5.onInsertBlockType;
|
|
281
273
|
var state = editorView.state,
|
|
282
274
|
dispatch = editorView.dispatch;
|
|
283
275
|
onInsertBlockType(itemName)(state, dispatch);
|
|
@@ -296,11 +288,11 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
296
288
|
_defineProperty(_assertThisInitialized(_this), "onItemActivated", function (_ref2) {
|
|
297
289
|
var item = _ref2.item,
|
|
298
290
|
inputMethod = _ref2.inputMethod;
|
|
299
|
-
var _this$
|
|
300
|
-
editorView = _this$
|
|
301
|
-
editorActions = _this$
|
|
302
|
-
handleImageUpload = _this$
|
|
303
|
-
expandEnabled = _this$
|
|
291
|
+
var _this$props6 = _this.props,
|
|
292
|
+
editorView = _this$props6.editorView,
|
|
293
|
+
editorActions = _this$props6.editorActions,
|
|
294
|
+
handleImageUpload = _this$props6.handleImageUpload,
|
|
295
|
+
expandEnabled = _this$props6.expandEnabled;
|
|
304
296
|
|
|
305
297
|
// need to do this before inserting nodes so scrollIntoView works properly
|
|
306
298
|
if (!editorView.hasFocus()) {
|
|
@@ -416,12 +408,12 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
416
408
|
key: "renderPopup",
|
|
417
409
|
value: function renderPopup() {
|
|
418
410
|
var emojiPickerOpen = this.state.emojiPickerOpen;
|
|
419
|
-
var _this$
|
|
420
|
-
popupsMountPoint = _this$
|
|
421
|
-
popupsBoundariesElement = _this$
|
|
422
|
-
popupsScrollableElement = _this$
|
|
423
|
-
emojiProvider = _this$
|
|
424
|
-
replacePlusMenuWithElementBrowser = _this$
|
|
411
|
+
var _this$props7 = this.props,
|
|
412
|
+
popupsMountPoint = _this$props7.popupsMountPoint,
|
|
413
|
+
popupsBoundariesElement = _this$props7.popupsBoundariesElement,
|
|
414
|
+
popupsScrollableElement = _this$props7.popupsScrollableElement,
|
|
415
|
+
emojiProvider = _this$props7.emojiProvider,
|
|
416
|
+
replacePlusMenuWithElementBrowser = _this$props7.replacePlusMenuWithElementBrowser;
|
|
425
417
|
var dropdownEmoji = this.state.dropdownItems.some(function (_ref4) {
|
|
426
418
|
var name = _ref4.value.name;
|
|
427
419
|
return name === 'emoji';
|
|
@@ -457,9 +449,9 @@ export var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
457
449
|
buttons = _this$state.buttons,
|
|
458
450
|
dropdownItems = _this$state.dropdownItems,
|
|
459
451
|
emojiPickerOpen = _this$state.emojiPickerOpen;
|
|
460
|
-
var _this$
|
|
461
|
-
isDisabled = _this$
|
|
462
|
-
isReducedSpacing = _this$
|
|
452
|
+
var _this$props8 = this.props,
|
|
453
|
+
isDisabled = _this$props8.isDisabled,
|
|
454
|
+
isReducedSpacing = _this$props8.isReducedSpacing;
|
|
463
455
|
if (buttons.length === 0 && dropdownItems.length === 0) {
|
|
464
456
|
return null;
|
|
465
457
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -85,6 +85,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
85
85
|
private isTransactionTrackingExplicitlyDisabled;
|
|
86
86
|
constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
|
|
87
87
|
getEditorState: () => EditorState | undefined;
|
|
88
|
+
getEditorView: () => EditorView | undefined;
|
|
88
89
|
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
89
90
|
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
90
91
|
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
|
@@ -85,6 +85,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
85
85
|
private isTransactionTrackingExplicitlyDisabled;
|
|
86
86
|
constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
|
|
87
87
|
getEditorState: () => EditorState | undefined;
|
|
88
|
+
getEditorView: () => EditorView | undefined;
|
|
88
89
|
UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
|
|
89
90
|
formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
|
|
90
91
|
resetEditorState: ({ doc, shouldScrollToBottom, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.17.
|
|
3
|
+
"version": "187.17.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
58
|
-
"@atlaskit/editor-common": "^74.
|
|
58
|
+
"@atlaskit/editor-common": "^74.42.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
71
71
|
"@atlaskit/editor-plugin-guideline": "^0.3.4",
|
|
72
72
|
"@atlaskit/editor-plugin-hyperlink": "^0.3.0",
|
|
73
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
73
|
+
"@atlaskit/editor-plugin-table": "^2.8.0",
|
|
74
74
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
75
75
|
"@atlaskit/editor-prosemirror": "1.0.2",
|
|
76
76
|
"@atlaskit/editor-shared-styles": "^2.6.0",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"@atlaskit/collab-provider": "9.9.0",
|
|
144
144
|
"@atlaskit/dropdown-menu": "^11.11.0",
|
|
145
145
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
146
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
146
|
+
"@atlaskit/editor-plugin-table": "^2.8.0",
|
|
147
147
|
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
148
148
|
"@atlaskit/flag": "^15.2.0",
|
|
149
149
|
"@atlaskit/icon-object": "^6.3.0",
|
package/report.api.md
CHANGED
|
@@ -1856,6 +1856,8 @@ class ReactEditorView_2<T = {}> extends React_2.Component<
|
|
|
1856
1856
|
// (undocumented)
|
|
1857
1857
|
getEditorState: () => EditorState | undefined;
|
|
1858
1858
|
// (undocumented)
|
|
1859
|
+
getEditorView: () => EditorView | undefined;
|
|
1860
|
+
// (undocumented)
|
|
1859
1861
|
getPlugins(
|
|
1860
1862
|
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>,
|
|
1861
1863
|
): EditorPlugin[];
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -1650,6 +1650,8 @@ class ReactEditorView_2<T = {}> extends React_2.Component<EditorViewProps & Wrap
|
|
|
1650
1650
|
// (undocumented)
|
|
1651
1651
|
getEditorState: () => EditorState | undefined;
|
|
1652
1652
|
// (undocumented)
|
|
1653
|
+
getEditorView: () => EditorView | undefined;
|
|
1654
|
+
// (undocumented)
|
|
1653
1655
|
getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
|
|
1654
1656
|
// (undocumented)
|
|
1655
1657
|
handleAnalyticsEvent: FireAnalyticsCallback;
|