@atlaskit/editor-core 190.1.27 → 190.1.30
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/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/plugins/extension/toolbar.js +25 -0
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/presets/universal.js +7 -2
- package/dist/cjs/ui/ToolbarFeedback/index.js +20 -17
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/extension/toolbar.js +29 -0
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/presets/universal.js +8 -2
- package/dist/es2019/ui/ToolbarFeedback/index.js +23 -8
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/extension/toolbar.js +26 -0
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/presets/universal.js +7 -2
- package/dist/esm/ui/ToolbarFeedback/index.js +20 -17
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/editor.d.ts +2 -1
- package/dist/types/plugins/extension/utils.d.ts +6 -0
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/types/editor-props.d.ts +1 -10
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types-ts4.5/editor.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/utils.d.ts +6 -0
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -10
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/package.json +10 -6
- package/dist/cjs/plugins/feedback-dialog/getBrowserInfo.js +0 -70
- package/dist/cjs/plugins/feedback-dialog/getDeviceInfo.js +0 -118
- package/dist/cjs/plugins/feedback-dialog/index.js +0 -127
- package/dist/cjs/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +0 -67
- package/dist/cjs/utils/pick-by.js +0 -16
- package/dist/es2019/plugins/feedback-dialog/getBrowserInfo.js +0 -64
- package/dist/es2019/plugins/feedback-dialog/getDeviceInfo.js +0 -112
- package/dist/es2019/plugins/feedback-dialog/index.js +0 -82
- package/dist/es2019/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +0 -47
- package/dist/es2019/utils/pick-by.js +0 -5
- package/dist/esm/plugins/feedback-dialog/getBrowserInfo.js +0 -64
- package/dist/esm/plugins/feedback-dialog/getDeviceInfo.js +0 -112
- package/dist/esm/plugins/feedback-dialog/index.js +0 -120
- package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +0 -60
- package/dist/esm/utils/pick-by.js +0 -9
- package/dist/types/plugins/feedback-dialog/getBrowserInfo.d.ts +0 -6
- package/dist/types/plugins/feedback-dialog/getDeviceInfo.d.ts +0 -6
- package/dist/types/plugins/feedback-dialog/index.d.ts +0 -10
- package/dist/types/plugins/feedback-dialog/loadJiraCollectorDialogScript.d.ts +0 -8
- package/dist/types/utils/pick-by.d.ts +0 -2
- package/dist/types-ts4.5/plugins/feedback-dialog/getBrowserInfo.d.ts +0 -6
- package/dist/types-ts4.5/plugins/feedback-dialog/getDeviceInfo.d.ts +0 -6
- package/dist/types-ts4.5/plugins/feedback-dialog/index.d.ts +0 -12
- package/dist/types-ts4.5/plugins/feedback-dialog/loadJiraCollectorDialogScript.d.ts +0 -8
- package/dist/types-ts4.5/utils/pick-by.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 190.1.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#64152](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64152) [`4bc51e1731ba`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4bc51e1731ba) - [ux] Added a table selector button to the full page toolbar and button styles
|
|
8
|
+
- [#64193](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64193) [`5b5fa24e7856`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5b5fa24e7856) - [ux] Fixed floating toolbar position for multiBodiedExtension
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 190.1.28
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#63849](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63849) [`75e0c3b954b3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/75e0c3b954b3) - Extract feedback dialog plugin from editor-core as @atlaskit/editor-plugin-feedback-dialog
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 190.1.27
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -136,6 +136,9 @@
|
|
|
136
136
|
{
|
|
137
137
|
"path": "../../editor-plugin-feature-flags/afm-cc/tsconfig.json"
|
|
138
138
|
},
|
|
139
|
+
{
|
|
140
|
+
"path": "../../editor-plugin-feedback-dialog/afm-cc/tsconfig.json"
|
|
141
|
+
},
|
|
139
142
|
{
|
|
140
143
|
"path": "../../editor-plugin-floating-toolbar/afm-cc/tsconfig.json"
|
|
141
144
|
},
|
|
@@ -163,6 +163,31 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
163
163
|
return extensionState.element.parentElement || undefined;
|
|
164
164
|
},
|
|
165
165
|
nodeType: nodeType,
|
|
166
|
+
onPositionCalculated: function onPositionCalculated(editorView, nextPos) {
|
|
167
|
+
var _editorView$state = editorView.state,
|
|
168
|
+
schema = _editorView$state.schema,
|
|
169
|
+
selection = _editorView$state.selection;
|
|
170
|
+
var mbeNode = (0, _utils2.getSelectedExtension)(state, true);
|
|
171
|
+
var mbeFrame = (0, _utils.findParentNodeOfType)(schema.nodes.extensionFrame)(selection);
|
|
172
|
+
if (!mbeNode || !mbeFrame) {
|
|
173
|
+
return nextPos;
|
|
174
|
+
}
|
|
175
|
+
var mbeDomElement = editorView.nodeDOM(mbeNode.pos);
|
|
176
|
+
var mbeFrameElement = editorView.nodeDOM(mbeFrame.pos);
|
|
177
|
+
var mbeNodeRect = mbeDomElement === null || mbeDomElement === void 0 ? void 0 : mbeDomElement.getBoundingClientRect();
|
|
178
|
+
var mbeFrameRect = mbeFrameElement.getBoundingClientRect();
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* MbeNodeRect height will include mbeFrameRect height and the navigation toolbar of the MBE
|
|
182
|
+
* excluding nav toolbar height from the floaing extention toolbar position calculated.
|
|
183
|
+
* adding 15px extra for the spacing between MBE node and floating toolbar.
|
|
184
|
+
*
|
|
185
|
+
*/
|
|
186
|
+
return {
|
|
187
|
+
top: mbeNodeRect.top + mbeFrameRect.height + 15,
|
|
188
|
+
left: nextPos.left
|
|
189
|
+
};
|
|
190
|
+
},
|
|
166
191
|
items: [].concat((0, _toConsumableArray2.default)(editButtonArray), (0, _toConsumableArray2.default)(breakoutButtonArray), [{
|
|
167
192
|
type: 'separator',
|
|
168
193
|
hidden: editButtonArray.length === 0 && breakoutButtonArray.length === 0
|
|
@@ -28,12 +28,6 @@ Object.defineProperty(exports, "extensionPlugin", {
|
|
|
28
28
|
return _extension.default;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
Object.defineProperty(exports, "feedbackDialogPlugin", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function get() {
|
|
34
|
-
return _feedbackDialog.default;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
31
|
Object.defineProperty(exports, "findReplacePlugin", {
|
|
38
32
|
enumerable: true,
|
|
39
33
|
get: function get() {
|
|
@@ -49,7 +43,6 @@ Object.defineProperty(exports, "jiraIssuePlugin", {
|
|
|
49
43
|
var _collabEdit = _interopRequireDefault(require("./collab-edit"));
|
|
50
44
|
var _extension = _interopRequireDefault(require("./extension"));
|
|
51
45
|
var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
52
|
-
var _feedbackDialog = _interopRequireDefault(require("./feedback-dialog"));
|
|
53
46
|
var _findReplace = _interopRequireDefault(require("./find-replace"));
|
|
54
47
|
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
55
48
|
var _beforePrimaryToolbar = _interopRequireDefault(require("./before-primaryToolbar"));
|
|
@@ -49,9 +49,11 @@ var _editorPluginDataConsumer = require("@atlaskit/editor-plugin-data-consumer")
|
|
|
49
49
|
var _editorPluginAnnotation = require("@atlaskit/editor-plugin-annotation");
|
|
50
50
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
51
51
|
var _plugins = require("../plugins");
|
|
52
|
+
var _editorPluginFeedbackDialog = require("@atlaskit/editor-plugin-feedback-dialog");
|
|
52
53
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
53
54
|
var _isFullPage = require("../utils/is-full-page");
|
|
54
55
|
var _default = require("./default");
|
|
56
|
+
var _versionWrapper = require("../version-wrapper");
|
|
55
57
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
56
58
|
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) { (0, _defineProperty2.default)(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; }
|
|
57
59
|
/**
|
|
@@ -202,9 +204,11 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
202
204
|
}]);
|
|
203
205
|
}
|
|
204
206
|
return builder;
|
|
205
|
-
}).maybeAdd(
|
|
207
|
+
}).maybeAdd(_editorPluginFeedbackDialog.feedbackDialogPlugin, function (plugin, builder) {
|
|
206
208
|
if (props.feedbackInfo) {
|
|
207
|
-
return builder.add([plugin,
|
|
209
|
+
return builder.add([plugin, _objectSpread({
|
|
210
|
+
coreVersion: _versionWrapper.version
|
|
211
|
+
}, props.feedbackInfo)]);
|
|
208
212
|
}
|
|
209
213
|
return builder;
|
|
210
214
|
}).maybeAdd(_editorPluginHelpDialog.helpDialogPlugin, function (plugin, builder) {
|
|
@@ -362,6 +366,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
362
366
|
allowExpand: isExpandInsertionEnabled(props),
|
|
363
367
|
insertMenuItems: props.insertMenuItems,
|
|
364
368
|
horizontalRuleEnabled: props.allowRule,
|
|
369
|
+
tableSelectorSupported: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.insert-block.table-selector-button') && isFullPage,
|
|
365
370
|
nativeStatusSupported: !statusMenuDisabled,
|
|
366
371
|
showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
|
|
367
372
|
replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
|
|
@@ -28,9 +28,7 @@ var _withOuterListeners = _interopRequireDefault(require("../with-outer-listener
|
|
|
28
28
|
var _styles = require("./styles");
|
|
29
29
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
30
30
|
var _eventDispatcher = require("../../event-dispatcher");
|
|
31
|
-
var _feedbackDialog = require("../../plugins/feedback-dialog");
|
|
32
31
|
var _deprecationWarnings = _interopRequireDefault(require("../../utils/deprecation-warnings"));
|
|
33
|
-
var _pickBy = _interopRequireDefault(require("../../utils/pick-by"));
|
|
34
32
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
35
33
|
var _context2 = require("../../presets/context");
|
|
36
34
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -54,9 +52,6 @@ var deprecations = [{
|
|
|
54
52
|
description: 'To pass feedback labels use feedbackInfo property – <Editor feedbackInfo={{ labels }} />',
|
|
55
53
|
type: 'removed'
|
|
56
54
|
}];
|
|
57
|
-
var isNullOrUndefined = function isNullOrUndefined(attr) {
|
|
58
|
-
return attr === null || attr === undefined;
|
|
59
|
-
};
|
|
60
55
|
var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
61
56
|
(0, _inherits2.default)(ToolbarFeedbackInternal, _PureComponent);
|
|
62
57
|
var _super = _createSuper(ToolbarFeedbackInternal);
|
|
@@ -77,12 +72,20 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
77
72
|
});
|
|
78
73
|
// Create a FeedbackInfo instance from props.
|
|
79
74
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getFeedbackInfo", function () {
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
75
|
+
var _this$props = _this.props,
|
|
76
|
+
product = _this$props.product,
|
|
77
|
+
packageVersion = _this$props.packageVersion,
|
|
78
|
+
packageName = _this$props.packageName,
|
|
79
|
+
labels = _this$props.labels;
|
|
80
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, product !== undefined && {
|
|
81
|
+
product: product
|
|
82
|
+
}), packageVersion !== undefined && {
|
|
83
|
+
packageVersion: packageVersion
|
|
84
|
+
}), packageName !== undefined && {
|
|
85
|
+
packageName: packageName
|
|
86
|
+
}), labels !== undefined && {
|
|
87
|
+
labels: labels
|
|
88
|
+
});
|
|
86
89
|
});
|
|
87
90
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "collectFeedback", function () {
|
|
88
91
|
if (_this.props.product === 'bitbucket') {
|
|
@@ -99,7 +102,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
99
102
|
});
|
|
100
103
|
});
|
|
101
104
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "openJiraIssueCollector", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
102
|
-
var _this$props$api, _window$localStorage$, _basePluginState$cont;
|
|
105
|
+
var _this$props$api, _window$localStorage$, _basePluginState$cont, _this$props$api2;
|
|
103
106
|
var basePluginState, sessionId, contentId, tabId;
|
|
104
107
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
105
108
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -113,7 +116,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
113
116
|
contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
114
117
|
tabId = window.sessionStorage['awc.tab.id'];
|
|
115
118
|
_context.next = 7;
|
|
116
|
-
return (0
|
|
119
|
+
return (_this$props$api2 = _this.props.api) === null || _this$props$api2 === void 0 || (_this$props$api2 = _this$props$api2.feedbackDialog) === null || _this$props$api2 === void 0 ? void 0 : _this$props$api2.actions.openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
|
|
117
120
|
sessionId: sessionId,
|
|
118
121
|
contentId: contentId,
|
|
119
122
|
tabId: tabId
|
|
@@ -154,10 +157,10 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
154
157
|
(0, _createClass2.default)(ToolbarFeedbackInternal, [{
|
|
155
158
|
key: "render",
|
|
156
159
|
value: function render() {
|
|
157
|
-
var _this$
|
|
158
|
-
popupsMountPoint = _this$
|
|
159
|
-
popupsBoundariesElement = _this$
|
|
160
|
-
popupsScrollableElement = _this$
|
|
160
|
+
var _this$props2 = this.props,
|
|
161
|
+
popupsMountPoint = _this$props2.popupsMountPoint,
|
|
162
|
+
popupsBoundariesElement = _this$props2.popupsBoundariesElement,
|
|
163
|
+
popupsScrollableElement = _this$props2.popupsScrollableElement;
|
|
161
164
|
var iconBefore = this.state.jiraIssueCollectorScriptLoading ? (0, _react.jsx)(_spinner.default, null) : undefined;
|
|
162
165
|
|
|
163
166
|
// JIRA issue collector script is using jQuery internally
|
|
@@ -12,6 +12,7 @@ import { getSelectedExtension } from './utils';
|
|
|
12
12
|
import { updateExtensionLayout, removeExtension, removeDescendantNodes } from './commands';
|
|
13
13
|
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
14
14
|
import { isReferencedSource, getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
|
|
15
|
+
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
15
16
|
export const messages = defineMessages({
|
|
16
17
|
edit: {
|
|
17
18
|
id: 'fabric.editor.edit',
|
|
@@ -157,6 +158,34 @@ export const getToolbarConfig = ({
|
|
|
157
158
|
title: 'Extension floating controls',
|
|
158
159
|
getDomRef: () => extensionState.element.parentElement || undefined,
|
|
159
160
|
nodeType,
|
|
161
|
+
onPositionCalculated: (editorView, nextPos) => {
|
|
162
|
+
const {
|
|
163
|
+
state: {
|
|
164
|
+
schema,
|
|
165
|
+
selection
|
|
166
|
+
}
|
|
167
|
+
} = editorView;
|
|
168
|
+
const mbeNode = getSelectedExtension(state, true);
|
|
169
|
+
const mbeFrame = findParentNodeOfType(schema.nodes.extensionFrame)(selection);
|
|
170
|
+
if (!mbeNode || !mbeFrame) {
|
|
171
|
+
return nextPos;
|
|
172
|
+
}
|
|
173
|
+
const mbeDomElement = editorView.nodeDOM(mbeNode.pos);
|
|
174
|
+
const mbeFrameElement = editorView.nodeDOM(mbeFrame.pos);
|
|
175
|
+
const mbeNodeRect = mbeDomElement === null || mbeDomElement === void 0 ? void 0 : mbeDomElement.getBoundingClientRect();
|
|
176
|
+
const mbeFrameRect = mbeFrameElement.getBoundingClientRect();
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* MbeNodeRect height will include mbeFrameRect height and the navigation toolbar of the MBE
|
|
180
|
+
* excluding nav toolbar height from the floaing extention toolbar position calculated.
|
|
181
|
+
* adding 15px extra for the spacing between MBE node and floating toolbar.
|
|
182
|
+
*
|
|
183
|
+
*/
|
|
184
|
+
return {
|
|
185
|
+
top: mbeNodeRect.top + mbeFrameRect.height + 15,
|
|
186
|
+
left: nextPos.left
|
|
187
|
+
};
|
|
188
|
+
},
|
|
160
189
|
items: [...editButtonArray, ...breakoutButtonArray, {
|
|
161
190
|
type: 'separator',
|
|
162
191
|
hidden: editButtonArray.length === 0 && breakoutButtonArray.length === 0
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as collabEditPlugin } from './collab-edit';
|
|
2
2
|
export { default as extensionPlugin } from './extension';
|
|
3
3
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
4
|
-
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
5
4
|
export { default as findReplacePlugin } from './find-replace';
|
|
6
5
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
7
6
|
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
@@ -38,10 +38,12 @@ import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
|
38
38
|
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
39
39
|
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
40
40
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
41
|
-
import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin,
|
|
41
|
+
import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
42
|
+
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
42
43
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
43
44
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
44
45
|
import { createDefaultPreset } from './default';
|
|
46
|
+
import { version as coreVersion } from '../version-wrapper';
|
|
45
47
|
/**
|
|
46
48
|
* Creates a preset with all of the available plugins.
|
|
47
49
|
* Basis for create-plugins-list and can be used to migrate from Editor -> EditorNext (Presets project)
|
|
@@ -192,7 +194,10 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
192
194
|
return builder;
|
|
193
195
|
}).maybeAdd(feedbackDialogPlugin, (plugin, builder) => {
|
|
194
196
|
if (props.feedbackInfo) {
|
|
195
|
-
return builder.add([plugin,
|
|
197
|
+
return builder.add([plugin, {
|
|
198
|
+
coreVersion,
|
|
199
|
+
...props.feedbackInfo
|
|
200
|
+
}]);
|
|
196
201
|
}
|
|
197
202
|
return builder;
|
|
198
203
|
}).maybeAdd(helpDialogPlugin, (plugin, builder) => {
|
|
@@ -358,6 +363,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
358
363
|
allowExpand: isExpandInsertionEnabled(props),
|
|
359
364
|
insertMenuItems: props.insertMenuItems,
|
|
360
365
|
horizontalRuleEnabled: props.allowRule,
|
|
366
|
+
tableSelectorSupported: getBooleanFF('platform.editor.insert-block.table-selector-button') && isFullPage,
|
|
361
367
|
nativeStatusSupported: !statusMenuDisabled,
|
|
362
368
|
showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
|
|
363
369
|
replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
|
|
@@ -14,9 +14,7 @@ import withOuterListeners from '../with-outer-listeners';
|
|
|
14
14
|
import { wrapper, buttonContent, confirmationPopup, confirmationText, confirmationHeader, confirmationImg } from './styles';
|
|
15
15
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
16
16
|
import { createDispatch } from '../../event-dispatcher';
|
|
17
|
-
import { openFeedbackDialog } from '../../plugins/feedback-dialog';
|
|
18
17
|
import deprecationWarnings from '../../utils/deprecation-warnings';
|
|
19
|
-
import pickBy from '../../utils/pick-by';
|
|
20
18
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
21
19
|
import { usePresetContext } from '../../presets/context';
|
|
22
20
|
const PopupWithOutsideListeners = withOuterListeners(Popup);
|
|
@@ -36,7 +34,6 @@ const deprecations = [{
|
|
|
36
34
|
description: 'To pass feedback labels use feedbackInfo property – <Editor feedbackInfo={{ labels }} />',
|
|
37
35
|
type: 'removed'
|
|
38
36
|
}];
|
|
39
|
-
const isNullOrUndefined = attr => attr === null || attr === undefined;
|
|
40
37
|
class ToolbarFeedbackInternal extends PureComponent {
|
|
41
38
|
constructor(props) {
|
|
42
39
|
super(props);
|
|
@@ -53,8 +50,26 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
53
50
|
});
|
|
54
51
|
// Create a FeedbackInfo instance from props.
|
|
55
52
|
_defineProperty(this, "getFeedbackInfo", () => {
|
|
56
|
-
const
|
|
57
|
-
|
|
53
|
+
const {
|
|
54
|
+
product,
|
|
55
|
+
packageVersion,
|
|
56
|
+
packageName,
|
|
57
|
+
labels
|
|
58
|
+
} = this.props;
|
|
59
|
+
return {
|
|
60
|
+
...(product !== undefined && {
|
|
61
|
+
product
|
|
62
|
+
}),
|
|
63
|
+
...(packageVersion !== undefined && {
|
|
64
|
+
packageVersion
|
|
65
|
+
}),
|
|
66
|
+
...(packageName !== undefined && {
|
|
67
|
+
packageName
|
|
68
|
+
}),
|
|
69
|
+
...(labels !== undefined && {
|
|
70
|
+
labels
|
|
71
|
+
})
|
|
72
|
+
};
|
|
58
73
|
});
|
|
59
74
|
_defineProperty(this, "collectFeedback", () => {
|
|
60
75
|
if (this.props.product === 'bitbucket') {
|
|
@@ -71,7 +86,7 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
71
86
|
});
|
|
72
87
|
});
|
|
73
88
|
_defineProperty(this, "openJiraIssueCollector", async () => {
|
|
74
|
-
var _this$props$api, _this$props$api$base, _window$localStorage$, _basePluginState$cont;
|
|
89
|
+
var _this$props$api, _this$props$api$base, _window$localStorage$, _basePluginState$cont, _this$props$api2, _this$props$api2$feed;
|
|
75
90
|
this.setState({
|
|
76
91
|
jiraIssueCollectorScriptLoading: true,
|
|
77
92
|
showOptOutOption: false
|
|
@@ -80,12 +95,12 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
80
95
|
const sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
81
96
|
const contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
82
97
|
const tabId = window.sessionStorage['awc.tab.id'];
|
|
83
|
-
await openFeedbackDialog({
|
|
98
|
+
await ((_this$props$api2 = this.props.api) === null || _this$props$api2 === void 0 ? void 0 : (_this$props$api2$feed = _this$props$api2.feedbackDialog) === null || _this$props$api2$feed === void 0 ? void 0 : _this$props$api2$feed.actions.openFeedbackDialog({
|
|
84
99
|
...this.getFeedbackInfo(),
|
|
85
100
|
sessionId,
|
|
86
101
|
contentId,
|
|
87
102
|
tabId
|
|
88
|
-
});
|
|
103
|
+
}));
|
|
89
104
|
this.setState({
|
|
90
105
|
jiraIssueCollectorScriptLoading: false
|
|
91
106
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.1.
|
|
2
|
+
export const version = "190.1.30";
|
|
@@ -13,6 +13,7 @@ import { getSelectedExtension } from './utils';
|
|
|
13
13
|
import { updateExtensionLayout, removeExtension, removeDescendantNodes } from './commands';
|
|
14
14
|
import { pluginKey as macroPluginKey } from './pm-plugins/macro/plugin-key';
|
|
15
15
|
import { isReferencedSource, getChildrenInfo as _getChildrenInfo, getNodeName } from '@atlaskit/editor-common/utils';
|
|
16
|
+
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
16
17
|
export var messages = defineMessages({
|
|
17
18
|
edit: {
|
|
18
19
|
id: 'fabric.editor.edit',
|
|
@@ -156,6 +157,31 @@ export var getToolbarConfig = function getToolbarConfig(_ref) {
|
|
|
156
157
|
return extensionState.element.parentElement || undefined;
|
|
157
158
|
},
|
|
158
159
|
nodeType: nodeType,
|
|
160
|
+
onPositionCalculated: function onPositionCalculated(editorView, nextPos) {
|
|
161
|
+
var _editorView$state = editorView.state,
|
|
162
|
+
schema = _editorView$state.schema,
|
|
163
|
+
selection = _editorView$state.selection;
|
|
164
|
+
var mbeNode = getSelectedExtension(state, true);
|
|
165
|
+
var mbeFrame = findParentNodeOfType(schema.nodes.extensionFrame)(selection);
|
|
166
|
+
if (!mbeNode || !mbeFrame) {
|
|
167
|
+
return nextPos;
|
|
168
|
+
}
|
|
169
|
+
var mbeDomElement = editorView.nodeDOM(mbeNode.pos);
|
|
170
|
+
var mbeFrameElement = editorView.nodeDOM(mbeFrame.pos);
|
|
171
|
+
var mbeNodeRect = mbeDomElement === null || mbeDomElement === void 0 ? void 0 : mbeDomElement.getBoundingClientRect();
|
|
172
|
+
var mbeFrameRect = mbeFrameElement.getBoundingClientRect();
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* MbeNodeRect height will include mbeFrameRect height and the navigation toolbar of the MBE
|
|
176
|
+
* excluding nav toolbar height from the floaing extention toolbar position calculated.
|
|
177
|
+
* adding 15px extra for the spacing between MBE node and floating toolbar.
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
return {
|
|
181
|
+
top: mbeNodeRect.top + mbeFrameRect.height + 15,
|
|
182
|
+
left: nextPos.left
|
|
183
|
+
};
|
|
184
|
+
},
|
|
159
185
|
items: [].concat(_toConsumableArray(editButtonArray), _toConsumableArray(breakoutButtonArray), [{
|
|
160
186
|
type: 'separator',
|
|
161
187
|
hidden: editButtonArray.length === 0 && breakoutButtonArray.length === 0
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as collabEditPlugin } from './collab-edit';
|
|
2
2
|
export { default as extensionPlugin } from './extension';
|
|
3
3
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
4
|
-
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
5
4
|
export { default as findReplacePlugin } from './find-replace';
|
|
6
5
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
7
6
|
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
@@ -42,10 +42,12 @@ import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
|
42
42
|
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
43
43
|
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
44
44
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
45
|
-
import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin,
|
|
45
|
+
import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
46
|
+
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
46
47
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
47
48
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
48
49
|
import { createDefaultPreset } from './default';
|
|
50
|
+
import { version as coreVersion } from '../version-wrapper';
|
|
49
51
|
/**
|
|
50
52
|
* Creates a preset with all of the available plugins.
|
|
51
53
|
* Basis for create-plugins-list and can be used to migrate from Editor -> EditorNext (Presets project)
|
|
@@ -196,7 +198,9 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
196
198
|
return builder;
|
|
197
199
|
}).maybeAdd(feedbackDialogPlugin, function (plugin, builder) {
|
|
198
200
|
if (props.feedbackInfo) {
|
|
199
|
-
return builder.add([plugin,
|
|
201
|
+
return builder.add([plugin, _objectSpread({
|
|
202
|
+
coreVersion: coreVersion
|
|
203
|
+
}, props.feedbackInfo)]);
|
|
200
204
|
}
|
|
201
205
|
return builder;
|
|
202
206
|
}).maybeAdd(helpDialogPlugin, function (plugin, builder) {
|
|
@@ -354,6 +358,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
354
358
|
allowExpand: isExpandInsertionEnabled(props),
|
|
355
359
|
insertMenuItems: props.insertMenuItems,
|
|
356
360
|
horizontalRuleEnabled: props.allowRule,
|
|
361
|
+
tableSelectorSupported: getBooleanFF('platform.editor.insert-block.table-selector-button') && isFullPage,
|
|
357
362
|
nativeStatusSupported: !statusMenuDisabled,
|
|
358
363
|
showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
|
|
359
364
|
replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
|
|
@@ -26,9 +26,7 @@ import withOuterListeners from '../with-outer-listeners';
|
|
|
26
26
|
import { wrapper, buttonContent, confirmationPopup, confirmationText, confirmationHeader, confirmationImg } from './styles';
|
|
27
27
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
28
28
|
import { createDispatch } from '../../event-dispatcher';
|
|
29
|
-
import { openFeedbackDialog } from '../../plugins/feedback-dialog';
|
|
30
29
|
import deprecationWarnings from '../../utils/deprecation-warnings';
|
|
31
|
-
import pickBy from '../../utils/pick-by';
|
|
32
30
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
33
31
|
import { usePresetContext } from '../../presets/context';
|
|
34
32
|
var PopupWithOutsideListeners = withOuterListeners(Popup);
|
|
@@ -48,9 +46,6 @@ var deprecations = [{
|
|
|
48
46
|
description: 'To pass feedback labels use feedbackInfo property – <Editor feedbackInfo={{ labels }} />',
|
|
49
47
|
type: 'removed'
|
|
50
48
|
}];
|
|
51
|
-
var isNullOrUndefined = function isNullOrUndefined(attr) {
|
|
52
|
-
return attr === null || attr === undefined;
|
|
53
|
-
};
|
|
54
49
|
var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
55
50
|
_inherits(ToolbarFeedbackInternal, _PureComponent);
|
|
56
51
|
var _super = _createSuper(ToolbarFeedbackInternal);
|
|
@@ -71,12 +66,20 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
71
66
|
});
|
|
72
67
|
// Create a FeedbackInfo instance from props.
|
|
73
68
|
_defineProperty(_assertThisInitialized(_this), "getFeedbackInfo", function () {
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
69
|
+
var _this$props = _this.props,
|
|
70
|
+
product = _this$props.product,
|
|
71
|
+
packageVersion = _this$props.packageVersion,
|
|
72
|
+
packageName = _this$props.packageName,
|
|
73
|
+
labels = _this$props.labels;
|
|
74
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, product !== undefined && {
|
|
75
|
+
product: product
|
|
76
|
+
}), packageVersion !== undefined && {
|
|
77
|
+
packageVersion: packageVersion
|
|
78
|
+
}), packageName !== undefined && {
|
|
79
|
+
packageName: packageName
|
|
80
|
+
}), labels !== undefined && {
|
|
81
|
+
labels: labels
|
|
82
|
+
});
|
|
80
83
|
});
|
|
81
84
|
_defineProperty(_assertThisInitialized(_this), "collectFeedback", function () {
|
|
82
85
|
if (_this.props.product === 'bitbucket') {
|
|
@@ -93,7 +96,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
96
|
});
|
|
94
97
|
});
|
|
95
98
|
_defineProperty(_assertThisInitialized(_this), "openJiraIssueCollector", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
96
|
-
var _this$props$api, _window$localStorage$, _basePluginState$cont;
|
|
99
|
+
var _this$props$api, _window$localStorage$, _basePluginState$cont, _this$props$api2;
|
|
97
100
|
var basePluginState, sessionId, contentId, tabId;
|
|
98
101
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
99
102
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -107,7 +110,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
107
110
|
contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
108
111
|
tabId = window.sessionStorage['awc.tab.id'];
|
|
109
112
|
_context.next = 7;
|
|
110
|
-
return openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
|
|
113
|
+
return (_this$props$api2 = _this.props.api) === null || _this$props$api2 === void 0 || (_this$props$api2 = _this$props$api2.feedbackDialog) === null || _this$props$api2 === void 0 ? void 0 : _this$props$api2.actions.openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
|
|
111
114
|
sessionId: sessionId,
|
|
112
115
|
contentId: contentId,
|
|
113
116
|
tabId: tabId
|
|
@@ -148,10 +151,10 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
148
151
|
_createClass(ToolbarFeedbackInternal, [{
|
|
149
152
|
key: "render",
|
|
150
153
|
value: function render() {
|
|
151
|
-
var _this$
|
|
152
|
-
popupsMountPoint = _this$
|
|
153
|
-
popupsBoundariesElement = _this$
|
|
154
|
-
popupsScrollableElement = _this$
|
|
154
|
+
var _this$props2 = this.props,
|
|
155
|
+
popupsMountPoint = _this$props2.popupsMountPoint,
|
|
156
|
+
popupsBoundariesElement = _this$props2.popupsBoundariesElement,
|
|
157
|
+
popupsScrollableElement = _this$props2.popupsScrollableElement;
|
|
155
158
|
var iconBefore = this.state.jiraIssueCollectorScriptLoading ? jsx(Spinner, null) : undefined;
|
|
156
159
|
|
|
157
160
|
// JIRA issue collector script is using jQuery internally
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "190.1.
|
|
2
|
+
export var version = "190.1.30";
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { EditorProps } from './types/editor-props';
|
|
5
|
-
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp,
|
|
5
|
+
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
6
|
+
export type { FeedbackInfo } from '@atlaskit/editor-common/types';
|
|
6
7
|
export default class Editor extends React.Component<EditorProps> {
|
|
7
8
|
static defaultProps: EditorProps;
|
|
8
9
|
constructor(props: EditorProps);
|
|
@@ -7,3 +7,9 @@ export declare const getSelectedDomElement: (schema: Schema, domAtPos: DomAtPos,
|
|
|
7
7
|
export declare const getDataConsumerMark: (newNode: PMNode) => Mark | undefined;
|
|
8
8
|
export declare const getNodeTypesReferenced: (ids: string[], state: EditorState) => string[];
|
|
9
9
|
export declare const findNodePosWithLocalId: (state: EditorState, localId: string) => NodeWithPos | undefined;
|
|
10
|
+
export interface Position {
|
|
11
|
+
top?: number;
|
|
12
|
+
right?: number;
|
|
13
|
+
bottom?: number;
|
|
14
|
+
left?: number;
|
|
15
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as collabEditPlugin } from './collab-edit';
|
|
2
2
|
export { default as extensionPlugin } from './extension';
|
|
3
3
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
4
|
-
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
5
4
|
export { default as findReplacePlugin } from './find-replace';
|
|
6
5
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
7
6
|
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
@@ -6,7 +6,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
6
6
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions, TextFormattingOptions, QuickInsertOptions } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions, TextFormattingOptions, QuickInsertOptions, FeedbackInfo } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
|
|
12
12
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -37,15 +37,6 @@ export type ReactComponents = ReactElement<any> | ReactElement<any>[];
|
|
|
37
37
|
type ExtensionProviders = (ExtensionProvider | Promise<ExtensionProvider>)[];
|
|
38
38
|
type ExtensionProvidersWithEditorAction = (editorActions?: EditorActions) => ExtensionProviders;
|
|
39
39
|
export type ExtensionProvidersProp = ExtensionProviders | ExtensionProvidersWithEditorAction;
|
|
40
|
-
export type FeedbackInfo = {
|
|
41
|
-
product?: string;
|
|
42
|
-
packageVersion?: string;
|
|
43
|
-
packageName?: string;
|
|
44
|
-
labels?: Array<string>;
|
|
45
|
-
sessionId?: string;
|
|
46
|
-
contentId?: string;
|
|
47
|
-
tabId?: string;
|
|
48
|
-
};
|
|
49
40
|
export type BeforeAndAfterToolbarComponents = {
|
|
50
41
|
before: ReactComponents;
|
|
51
42
|
after: ReactComponents;
|
|
@@ -3,7 +3,7 @@ export type { EditorInstance } from './editor-instance';
|
|
|
3
3
|
export type { EditorConfig } from './editor-config';
|
|
4
4
|
export type { NextEditorPlugin, EditorPlugin, PluginsOptions, } from './editor-plugin';
|
|
5
5
|
export type { EditorReactContext } from './editor-react-context';
|
|
6
|
-
export type { EditorProps,
|
|
6
|
+
export type { EditorProps, ReactComponents, ExtensionProvidersProp, PrimaryToolbarComponents, ContentComponents, } from './editor-props';
|
|
7
7
|
export type { EditorAppearanceComponentProps } from './editor-appearance-component';
|
|
8
8
|
export type { Command, CommandDispatch } from './command';
|
|
9
9
|
export type { MessageDescriptor } from './i18n';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { EditorProps } from './types/editor-props';
|
|
5
|
-
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp,
|
|
5
|
+
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
6
|
+
export type { FeedbackInfo } from '@atlaskit/editor-common/types';
|
|
6
7
|
export default class Editor extends React.Component<EditorProps> {
|
|
7
8
|
static defaultProps: EditorProps;
|
|
8
9
|
constructor(props: EditorProps);
|
|
@@ -7,3 +7,9 @@ export declare const getSelectedDomElement: (schema: Schema, domAtPos: DomAtPos,
|
|
|
7
7
|
export declare const getDataConsumerMark: (newNode: PMNode) => Mark | undefined;
|
|
8
8
|
export declare const getNodeTypesReferenced: (ids: string[], state: EditorState) => string[];
|
|
9
9
|
export declare const findNodePosWithLocalId: (state: EditorState, localId: string) => NodeWithPos | undefined;
|
|
10
|
+
export interface Position {
|
|
11
|
+
top?: number;
|
|
12
|
+
right?: number;
|
|
13
|
+
bottom?: number;
|
|
14
|
+
left?: number;
|
|
15
|
+
}
|