@atlaskit/editor-core 172.0.4 → 172.1.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 +56 -0
- package/dist/cjs/create-editor/ReactEditorView.js +11 -2
- package/dist/cjs/create-editor/ReactEditorViewContext.js +15 -0
- package/dist/cjs/create-editor/create-plugins-list.js +2 -1
- package/dist/cjs/editor.js +7 -1
- package/dist/cjs/labs/next/mobile.js +5 -3
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +1 -1
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +8 -0
- package/dist/cjs/plugins/card/pm-plugins/doc.js +2 -26
- package/dist/cjs/plugins/card/toolbar.js +118 -86
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +9 -2
- package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +37 -1
- package/dist/cjs/plugins/code-block/toolbar.js +3 -1
- package/dist/cjs/plugins/code-block/ui/class-names.js +2 -0
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -3
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +42 -2
- package/dist/cjs/plugins/hyperlink/Toolbar.js +43 -8
- package/dist/cjs/plugins/media/commands/helpers.js +1 -8
- package/dist/cjs/plugins/media/index.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +0 -10
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +2 -3
- package/dist/cjs/plugins/media/picker-facade.js +1 -0
- package/dist/cjs/plugins/media/pm-plugins/main.js +3 -13
- package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +1 -1
- package/dist/cjs/plugins/paste/handlers.js +9 -20
- package/dist/cjs/plugins/paste/md.js +8 -2
- package/dist/cjs/plugins/paste/newline-md-plugin.js +67 -0
- package/dist/cjs/plugins/paste/paragraph-md-plugin.js +72 -0
- package/dist/cjs/plugins/table/commands/hover.js +4 -4
- package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/utils/decoration.js +53 -3
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -0
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +3 -2
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +78 -53
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +1 -1
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +7 -2
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +8 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +13 -13
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +8 -7
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/Mobile.js +4 -2
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -4
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/DropdownMenu/index.js +5 -5
- package/dist/cjs/ui/with-outer-listeners.js +105 -50
- package/dist/cjs/utils/deprecation-warnings.js +4 -0
- package/dist/cjs/utils/linking-utils.js +40 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +11 -2
- package/dist/es2019/create-editor/ReactEditorViewContext.js +3 -0
- package/dist/es2019/create-editor/create-plugins-list.js +2 -1
- package/dist/es2019/editor.js +7 -1
- package/dist/es2019/labs/next/mobile.js +5 -3
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +1 -1
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +10 -0
- package/dist/es2019/plugins/card/pm-plugins/doc.js +1 -24
- package/dist/es2019/plugins/card/toolbar.js +114 -86
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +9 -2
- package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +40 -2
- package/dist/es2019/plugins/code-block/toolbar.js +2 -1
- package/dist/es2019/plugins/code-block/ui/class-names.js +2 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -3
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +37 -0
- package/dist/es2019/plugins/hyperlink/Toolbar.js +40 -9
- package/dist/es2019/plugins/media/commands/helpers.js +0 -2
- package/dist/es2019/plugins/media/index.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +0 -7
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +2 -3
- package/dist/es2019/plugins/media/picker-facade.js +1 -0
- package/dist/es2019/plugins/media/pm-plugins/main.js +3 -13
- package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +7 -19
- package/dist/es2019/plugins/paste/md.js +6 -2
- package/dist/es2019/plugins/paste/newline-md-plugin.js +56 -0
- package/dist/es2019/plugins/paste/paragraph-md-plugin.js +61 -0
- package/dist/es2019/plugins/table/commands/hover.js +4 -4
- package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +39 -2
- package/dist/es2019/plugins/table/utils/decoration.js +60 -24
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -0
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +4 -3
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +78 -59
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +2 -2
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +6 -2
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +7 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +12 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +7 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/es2019/ui/Appearance/Mobile.js +4 -2
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +5 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/DropdownMenu/index.js +10 -6
- package/dist/es2019/ui/with-outer-listeners.js +83 -33
- package/dist/es2019/utils/deprecation-warnings.js +4 -0
- package/dist/es2019/utils/linking-utils.js +37 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +11 -2
- package/dist/esm/create-editor/ReactEditorViewContext.js +3 -0
- package/dist/esm/create-editor/create-plugins-list.js +2 -1
- package/dist/esm/editor.js +7 -1
- package/dist/esm/labs/next/mobile.js +5 -3
- package/dist/esm/messages.js +5 -0
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +1 -1
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +9 -0
- package/dist/esm/plugins/card/pm-plugins/doc.js +1 -20
- package/dist/esm/plugins/card/toolbar.js +108 -83
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +9 -2
- package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +37 -2
- package/dist/esm/plugins/code-block/toolbar.js +2 -1
- package/dist/esm/plugins/code-block/ui/class-names.js +2 -0
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -3
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +41 -2
- package/dist/esm/plugins/hyperlink/Toolbar.js +43 -10
- package/dist/esm/plugins/media/commands/helpers.js +0 -4
- package/dist/esm/plugins/media/index.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +0 -8
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +2 -3
- package/dist/esm/plugins/media/picker-facade.js +1 -0
- package/dist/esm/plugins/media/pm-plugins/main.js +3 -15
- package/dist/esm/plugins/panel/pm-plugins/keymaps.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +11 -22
- package/dist/esm/plugins/paste/md.js +6 -2
- package/dist/esm/plugins/paste/newline-md-plugin.js +58 -0
- package/dist/esm/plugins/paste/paragraph-md-plugin.js +63 -0
- package/dist/esm/plugins/table/commands/hover.js +4 -4
- package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +2 -1
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/utils/decoration.js +50 -3
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -0
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +4 -3
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +77 -51
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +2 -2
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +7 -2
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +8 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +12 -12
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +7 -6
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/esm/ui/Appearance/Mobile.js +4 -2
- package/dist/esm/ui/AppearanceComponents/Mobile.js +5 -4
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/DropdownMenu/index.js +5 -5
- package/dist/esm/ui/with-outer-listeners.js +105 -51
- package/dist/esm/utils/deprecation-warnings.js +4 -0
- package/dist/esm/utils/linking-utils.js +37 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +3 -0
- package/dist/types/create-editor/ReactEditorViewContext.d.ts +8 -0
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +2 -2
- package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -0
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +3 -0
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -2
- package/dist/types/plugins/card/toolbar.d.ts +1 -0
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +4 -1
- package/dist/types/plugins/code-block/ui/class-names.d.ts +2 -0
- package/dist/types/plugins/hyperlink/types.d.ts +1 -0
- package/dist/types/plugins/media/commands/helpers.d.ts +0 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +0 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +0 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +0 -2
- package/dist/types/plugins/media/pm-plugins/types.d.ts +0 -2
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types/plugins/paste/newline-md-plugin.d.ts +2 -0
- package/dist/types/plugins/paste/paragraph-md-plugin.d.ts +2 -0
- package/dist/types/plugins/table/utils/decoration.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +9 -0
- package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -0
- package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/Dropdown/index.d.ts +1 -1
- package/dist/types/ui/with-outer-listeners.d.ts +2 -1
- package/dist/types/utils/linking-utils.d.ts +1 -0
- package/package.json +37 -39
- package/dist/cjs/plugins/type-ahead/ui/DynamicHeightListItem.js +0 -77
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.js +0 -118
- package/dist/cjs/plugins/type-ahead/ui/hooks/use-resize-observer.js +0 -70
- package/dist/es2019/plugins/type-ahead/ui/DynamicHeightListItem.js +0 -51
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.js +0 -97
- package/dist/es2019/plugins/type-ahead/ui/hooks/use-resize-observer.js +0 -53
- package/dist/esm/plugins/type-ahead/ui/DynamicHeightListItem.js +0 -51
- package/dist/esm/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.js +0 -101
- package/dist/esm/plugins/type-ahead/ui/hooks/use-resize-observer.js +0 -48
- package/dist/types/plugins/type-ahead/ui/DynamicHeightListItem.d.ts +0 -21
- package/dist/types/plugins/type-ahead/ui/hooks/use-dynamic-list-height-calculation.d.ts +0 -25
- package/dist/types/plugins/type-ahead/ui/hooks/use-resize-observer.d.ts +0 -8
|
@@ -36,17 +36,17 @@ var buttonStyles = function buttonStyles(isActive) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
38
38
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
42
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n > span,\n > span:hover {\n background: #6c798f;\n color: #fff;\n }\n "])));
|
|
39
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n > span,\n > span:hover,\n > span:active {\n background: ", ";\n color: ", ";\n }\n "])), token('color.background.selected', '#6c798f'), token('color.text', '#fff'));
|
|
43
40
|
} else {
|
|
44
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n > span:hover[aria-disabled='false'] {\n color: ", ";\n background-color: ", ";\n }\n > span[aria-disabled='true'] {\n color: ", ";\n }\n "])), themed({
|
|
41
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n > span:hover[aria-disabled='false'] {\n color: ", ";\n background-color: ", ";\n }\n > span:active[aria-disabled='false'] {\n background-color: ", ";\n }\n > span[aria-disabled='true'] {\n color: ", ";\n }\n "])), themed({
|
|
45
42
|
light: token('color.text', N900),
|
|
46
43
|
dark: token('color.text', DN600)
|
|
47
44
|
})(theme), themed({
|
|
48
45
|
light: token('color.background.neutral.subtle.hovered', 'rgb(244, 245, 247)'),
|
|
49
46
|
dark: token('color.background.neutral.subtle.hovered', 'rgb(59, 71, 92)')
|
|
47
|
+
})(theme), themed({
|
|
48
|
+
light: token('color.background.neutral.subtle.pressed', 'rgb(179, 212, 255)'),
|
|
49
|
+
dark: token('color.background.neutral.subtle.pressed', 'rgb(179, 212, 255)')
|
|
50
50
|
})(theme), themed({
|
|
51
51
|
light: token('color.text.disabled', N70),
|
|
52
52
|
dark: token('color.text.disabled', DN80)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -5,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
var _excluded = ["handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown"];
|
|
8
10
|
|
|
9
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
12
|
|
|
@@ -13,73 +15,125 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
15
|
import React from 'react';
|
|
14
16
|
import { PureComponent } from 'react';
|
|
15
17
|
import ReactDOM from 'react-dom';
|
|
16
|
-
|
|
17
|
-
return /*#__PURE__*/function (_PureComponent) {
|
|
18
|
-
_inherits(WithOutsideClick, _PureComponent);
|
|
18
|
+
import ReactEditorViewContext from '../create-editor/ReactEditorViewContext';
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
21
|
+
_inherits(WithOutsideClick, _PureComponent);
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
var _this;
|
|
23
|
+
var _super = _createSuper(WithOutsideClick);
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
function WithOutsideClick() {
|
|
26
|
+
var _this;
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
args[_key] = arguments[_key];
|
|
29
|
-
}
|
|
28
|
+
_classCallCheck(this, WithOutsideClick);
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
args[_key] = arguments[_key];
|
|
32
|
+
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
var domNode = ReactDOM.findDOMNode(_assertThisInitialized(_this)); // eslint-disable-line react/no-find-dom-node
|
|
34
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
_defineProperty(_assertThisInitialized(_this), "handleClick", function (evt) {
|
|
37
|
+
if (!_this.props.isActiveComponent) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var domNode = ReactDOM.findDOMNode(_assertThisInitialized(_this)); // eslint-disable-line react/no-find-dom-node
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
if (
|
|
45
|
-
_this.props.
|
|
46
|
-
} else if (evt.code === 'Enter' && _this.props.handleEnterKeydown) {
|
|
47
|
-
_this.props.handleEnterKeydown(evt);
|
|
43
|
+
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
44
|
+
if (_this.props.handleClickOutside) {
|
|
45
|
+
_this.props.handleClickOutside(evt);
|
|
48
46
|
}
|
|
49
|
-
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeydown", function (evt) {
|
|
51
|
+
if (!_this.props.isActiveComponent) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
if (evt.code === 'Escape' && _this.props.handleEscapeKeydown) {
|
|
56
|
+
var _this$props$editorVie;
|
|
57
|
+
|
|
58
|
+
evt.preventDefault();
|
|
59
|
+
evt.stopPropagation();
|
|
60
|
+
|
|
61
|
+
_this.props.handleEscapeKeydown(evt);
|
|
60
62
|
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
+
if (!((_this$props$editorVie = _this.props.editorView) !== null && _this$props$editorVie !== void 0 && _this$props$editorVie.hasFocus())) {
|
|
64
|
+
var _this$props$editorVie2;
|
|
65
|
+
|
|
66
|
+
(_this$props$editorVie2 = _this.props.editorView) === null || _this$props$editorVie2 === void 0 ? void 0 : _this$props$editorVie2.focus();
|
|
63
67
|
}
|
|
68
|
+
|
|
69
|
+
return false;
|
|
70
|
+
} else if (evt.code === 'Enter' && _this.props.handleEnterKeydown) {
|
|
71
|
+
_this.props.handleEnterKeydown(evt);
|
|
64
72
|
}
|
|
65
|
-
}
|
|
66
|
-
key: "componentWillUnmount",
|
|
67
|
-
value: function componentWillUnmount() {
|
|
68
|
-
if (this.props.handleClickOutside) {
|
|
69
|
-
document.removeEventListener('click', this.handleClick, false);
|
|
70
|
-
}
|
|
73
|
+
});
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_createClass(WithOutsideClick, [{
|
|
79
|
+
key: "componentDidMount",
|
|
80
|
+
value: function componentDidMount() {
|
|
81
|
+
if (this.props.handleClickOutside) {
|
|
82
|
+
document.addEventListener('click', this.handleClick, false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (this.props.handleEscapeKeydown) {
|
|
86
|
+
var _this$props$editorRef;
|
|
87
|
+
|
|
88
|
+
(((_this$props$editorRef = this.props.editorRef) === null || _this$props$editorRef === void 0 ? void 0 : _this$props$editorRef.current) || document).addEventListener('keydown', this.handleKeydown, false);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "componentWillUnmount",
|
|
93
|
+
value: function componentWillUnmount() {
|
|
94
|
+
if (this.props.handleClickOutside) {
|
|
95
|
+
document.removeEventListener('click', this.handleClick, false);
|
|
75
96
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
97
|
+
|
|
98
|
+
if (this.props.handleEscapeKeydown) {
|
|
99
|
+
var _this$props$editorRef2;
|
|
100
|
+
|
|
101
|
+
(((_this$props$editorRef2 = this.props.editorRef) === null || _this$props$editorRef2 === void 0 ? void 0 : _this$props$editorRef2.current) || document).removeEventListener('keydown', this.handleKeydown, false);
|
|
80
102
|
}
|
|
81
|
-
}
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
key: "render",
|
|
106
|
+
value: function render() {
|
|
107
|
+
return this.props.children;
|
|
108
|
+
}
|
|
109
|
+
}]);
|
|
82
110
|
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
return WithOutsideClick;
|
|
112
|
+
}(PureComponent);
|
|
113
|
+
|
|
114
|
+
function hasIsOpen(props) {
|
|
115
|
+
return 'isOpen' in props;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export default function withOuterListeners(Component) {
|
|
119
|
+
return function (_ref) {
|
|
120
|
+
var handleClickOutside = _ref.handleClickOutside,
|
|
121
|
+
handleEnterKeydown = _ref.handleEnterKeydown,
|
|
122
|
+
handleEscapeKeydown = _ref.handleEscapeKeydown,
|
|
123
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
124
|
+
|
|
125
|
+
var isActiveComponent = hasIsOpen(props) ? props.isOpen : true;
|
|
126
|
+
return /*#__PURE__*/React.createElement(ReactEditorViewContext.Consumer, null, function (_ref2) {
|
|
127
|
+
var editorView = _ref2.editorView,
|
|
128
|
+
editorRef = _ref2.editorRef;
|
|
129
|
+
return /*#__PURE__*/React.createElement(WithOutsideClick, {
|
|
130
|
+
editorView: editorView,
|
|
131
|
+
editorRef: editorRef,
|
|
132
|
+
isActiveComponent: isActiveComponent,
|
|
133
|
+
handleClickOutside: handleClickOutside,
|
|
134
|
+
handleEnterKeydown: handleEnterKeydown,
|
|
135
|
+
handleEscapeKeydown: handleEscapeKeydown
|
|
136
|
+
}, /*#__PURE__*/React.createElement(Component, props));
|
|
137
|
+
});
|
|
138
|
+
};
|
|
85
139
|
}
|
|
@@ -7,6 +7,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
7
7
|
import { nextMajorVersion } from '../version-wrapper';
|
|
8
8
|
|
|
9
9
|
var deprecationWarnings = function deprecationWarnings(className, props, deprecations) {
|
|
10
|
+
if (process.env.NODE_ENV === 'production') {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
var nextVersion = nextMajorVersion();
|
|
11
15
|
|
|
12
16
|
var _iterator = _createForOfIteratorHelper(deprecations),
|
|
@@ -10,6 +10,31 @@ export var buildEditLinkPayload = function buildEditLinkPayload(type) {
|
|
|
10
10
|
eventType: EVENT_TYPE.UI
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
+
|
|
14
|
+
var mapLinkTypeToCardAppearance = function mapLinkTypeToCardAppearance(type) {
|
|
15
|
+
switch (type) {
|
|
16
|
+
case ACTION_SUBJECT_ID.CARD_INLINE:
|
|
17
|
+
{
|
|
18
|
+
return 'inline';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
case ACTION_SUBJECT_ID.CARD_BLOCK:
|
|
22
|
+
{
|
|
23
|
+
return 'block';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
case ACTION_SUBJECT_ID.EMBEDS:
|
|
27
|
+
{
|
|
28
|
+
return 'embed';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
default:
|
|
32
|
+
{
|
|
33
|
+
return 'url';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
13
38
|
export var buildVisitedLinkPayload = function buildVisitedLinkPayload(type) {
|
|
14
39
|
return type === ACTION_SUBJECT_ID.HYPERLINK ? {
|
|
15
40
|
action: ACTION.VISITED,
|
|
@@ -29,6 +54,18 @@ export var buildVisitedLinkPayload = function buildVisitedLinkPayload(type) {
|
|
|
29
54
|
eventType: EVENT_TYPE.TRACK
|
|
30
55
|
};
|
|
31
56
|
};
|
|
57
|
+
export var buildOpenedSettingsPayload = function buildOpenedSettingsPayload(type) {
|
|
58
|
+
return {
|
|
59
|
+
action: ACTION.CLICKED,
|
|
60
|
+
actionSubject: ACTION_SUBJECT.BUTTON,
|
|
61
|
+
actionSubjectId: ACTION_SUBJECT_ID.GOTO_SMART_LINK_SETTINGS,
|
|
62
|
+
attributes: {
|
|
63
|
+
inputMethod: INPUT_METHOD.TOOLBAR,
|
|
64
|
+
display: mapLinkTypeToCardAppearance(type)
|
|
65
|
+
},
|
|
66
|
+
eventType: EVENT_TYPE.UI
|
|
67
|
+
};
|
|
68
|
+
};
|
|
32
69
|
export var unlinkPayload = function unlinkPayload(type) {
|
|
33
70
|
return {
|
|
34
71
|
action: ACTION.UNLINK,
|
package/dist/esm/version.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { EditorState } from 'prosemirror-state';
|
|
@@ -31,6 +32,7 @@ export interface EditorViewProps {
|
|
|
31
32
|
eventDispatcher: EventDispatcher;
|
|
32
33
|
transformer?: Transformer<string>;
|
|
33
34
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
35
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
34
36
|
}) => JSX.Element;
|
|
35
37
|
onEditorCreated: (instance: {
|
|
36
38
|
view: EditorView;
|
|
@@ -58,6 +60,7 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
|
|
|
58
60
|
transactionTracker: TransactionTracker;
|
|
59
61
|
validTransactionCount: number;
|
|
60
62
|
experienceStore?: ExperienceStore;
|
|
63
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
61
64
|
static contextTypes: {
|
|
62
65
|
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
63
66
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
declare type ReactEditorViewContextProps = {
|
|
4
|
+
editorView?: EditorView;
|
|
5
|
+
editorRef?: React.RefObject<HTMLDivElement>;
|
|
6
|
+
};
|
|
7
|
+
declare const ReactEditorViewContext: React.Context<ReactEditorViewContextProps>;
|
|
8
|
+
export default ReactEditorViewContext;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -20,12 +20,12 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, CONTENT_COMPONENT, FLOATING_
|
|
|
20
20
|
import { SimplifiedNode } from '../../../utils/document-logger';
|
|
21
21
|
import { DateEventPayload } from './date-events';
|
|
22
22
|
import { SelectionEventPayload } from './selection-events';
|
|
23
|
-
import { CreateLinkInlineDialogEventPayload, UnlinkToolbarAEP, EditLinkToolbarAEP } from './link-tool-bar-events';
|
|
23
|
+
import { CreateLinkInlineDialogEventPayload, UnlinkToolbarAEP, EditLinkToolbarAEP, OpenSettingsToolbarAEP } from './link-tool-bar-events';
|
|
24
24
|
import { ExtensionEventPayload } from './extension-events';
|
|
25
25
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '@atlaskit/editor-common/utils';
|
|
26
26
|
import { AvatarEventPayload } from './avatar';
|
|
27
27
|
import { NewCollabSyncUpErrorAttributes } from '@atlaskit/editor-common/types';
|
|
28
|
-
export declare type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload;
|
|
28
|
+
export declare type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload;
|
|
29
29
|
declare type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
30
30
|
previousColor: string;
|
|
31
31
|
newColor: string;
|
|
@@ -70,6 +70,7 @@ export declare type SelectedSearchResultsAEP = UIAEP<ACTION.SELECTED, ACTION_SUB
|
|
|
70
70
|
prefetch: boolean;
|
|
71
71
|
}, undefined>;
|
|
72
72
|
export declare type EditLinkToolbarAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.SMART_LINK | ACTION_SUBJECT.HYPERLINK, ACTION_SUBJECT_ID.EDIT_LINK, {}, undefined>;
|
|
73
|
+
export declare type OpenSettingsToolbarAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.GOTO_SMART_LINK_SETTINGS, {}, undefined>;
|
|
73
74
|
export declare type UnlinkToolbarAEP = UIAEP<ACTION.UNLINK, ACTION_SUBJECT.SMART_LINK | ACTION_SUBJECT.HYPERLINK, ACTION_SUBJECT_ID.CARD_INLINE | undefined, {}, undefined>;
|
|
74
75
|
export declare type CreateLinkInlineDialogEventPayload = QuickSearchPerfAEP | RecentActivitiesPerfAEP | ViewedCreateLinkInlineDialogAEP | EnteredTextLinkSearchInputAEP | ShownPreQuerySearchResultsAEP | ShownPostQuerySearchResultsAEP | HighlightedSearchResultsAEP | SelectedSearchResultsAEP | DismissedCreateLinkInlineDialogAEP;
|
|
75
76
|
export declare type CreateLinkInlineDialogActionType = ACTION.INVOKED | ACTION.VIEWED | ACTION.ENTERED | ACTION.SHOWN;
|
|
@@ -13,6 +13,9 @@ export declare class InlineCardComponent extends React.PureComponent<SmartCardPr
|
|
|
13
13
|
url?: string | undefined;
|
|
14
14
|
title?: string | undefined;
|
|
15
15
|
}) => void;
|
|
16
|
+
onError: (data: {
|
|
17
|
+
url?: string | undefined;
|
|
18
|
+
}) => void;
|
|
16
19
|
render(): JSX.Element | null;
|
|
17
20
|
}
|
|
18
21
|
export declare type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader'>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { Node
|
|
2
|
+
import { Node } from 'prosemirror-model';
|
|
3
3
|
import { CardReplacementInputMethod } from '../types';
|
|
4
4
|
import { CardAdf, CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { Command } from '../../../types';
|
|
6
6
|
import { ACTION, InputMethodInsertLink } from '../../../plugins/analytics';
|
|
7
7
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
|
-
export declare function insertCard(tr: Transaction, cardAdf: Node, schema: Schema): Transaction<any>;
|
|
9
8
|
export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf, analyticsAction?: ACTION | undefined, createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined) => Command;
|
|
10
9
|
export declare const handleFallbackWithAnalytics: (url: string, source: InputMethodInsertLink) => Command;
|
|
11
10
|
export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, normalizeLinkText?: boolean) => Transaction;
|
|
@@ -4,4 +4,5 @@ import { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
4
4
|
import { LinkPickerOptions } from '../hyperlink/types';
|
|
5
5
|
export declare const removeCard: Command;
|
|
6
6
|
export declare const visitCardLink: Command;
|
|
7
|
+
export declare const openLinkSettings: Command;
|
|
7
8
|
export declare const floatingToolbar: (cardOptions: CardOptions, platform?: import("json-ld-types").JsonLd.Primitives.Platforms | undefined, linkPickerOptions?: LinkPickerOptions | undefined) => FloatingToolbarHandler;
|
|
@@ -42,7 +42,7 @@ export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
|
42
42
|
calcSnapPoints(): number[];
|
|
43
43
|
calcPxWidth: (useLayout?: RichMediaLayout | undefined) => number;
|
|
44
44
|
get insideInlineLike(): boolean;
|
|
45
|
-
highlights: (newWidth: number, snapPoints: number[]) =>
|
|
45
|
+
highlights: (newWidth: number, snapPoints: number[]) => string[] | number[];
|
|
46
46
|
/**
|
|
47
47
|
* Previously height of the box was controlled with paddingTop/paddingBottom trick inside Wrapper.
|
|
48
48
|
* It allowed height to be defined by a given percent ratio and so absolute value was defined by actual width.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
|
|
2
|
+
interface CodeBlockIDEKeyBindingsPluginState {
|
|
3
|
+
isComposing: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: SafePlugin<CodeBlockIDEKeyBindingsPluginState, any>;
|
|
3
6
|
export default _default;
|
|
@@ -15,7 +15,6 @@ export declare const findMediaSingleNode: (mediaPluginState: MediaPluginState, i
|
|
|
15
15
|
export declare const findMediaInlineNode: (mediaPluginState: MediaPluginState, id: string, isMediaSingle: boolean) => MediaNodeWithPosHandler | null;
|
|
16
16
|
export declare const findAllMediaSingleNodes: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler[];
|
|
17
17
|
export declare const findMediaNode: (mediaPluginState: MediaPluginState, id: string, isMediaSingle: boolean) => MediaNodeWithPosHandler | null;
|
|
18
|
-
export declare const isMobileUploadCompleted: (mediaPluginState: MediaPluginState, mediaId: string) => boolean | undefined;
|
|
19
18
|
export declare const isMediaNode: (pos: number, state: EditorState) => boolean | null | undefined;
|
|
20
19
|
export declare const updateAllMediaNodesAttrs: (id: string, attrs: object, isMediaSingle: boolean) => Command;
|
|
21
20
|
export declare const updateMediaNodeAttrs: (id: string, attrs: object, isMediaSingle: boolean) => Command;
|
|
@@ -16,7 +16,6 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
16
16
|
stopEvent(event: Event): boolean;
|
|
17
17
|
getAttrs(): MediaADFAttrs;
|
|
18
18
|
isMediaBlobUrl(): boolean;
|
|
19
|
-
uploadComplete(): boolean | undefined;
|
|
20
19
|
renderMediaNodeWithState: (mediaProvider?: Promise<MediaProvider> | undefined, contextIdentifierProvider?: Promise<ContextIdentifierProvider> | undefined) => ({ width: editorWidth }: {
|
|
21
20
|
width?: WidthPluginState | undefined;
|
|
22
21
|
}) => JSX.Element;
|
|
@@ -19,7 +19,6 @@ export interface MediaNodeProps extends ReactNodeProps, ImageLoaderProps {
|
|
|
19
19
|
isMediaSingle?: boolean;
|
|
20
20
|
onClick?: CardOnClickCallback;
|
|
21
21
|
mediaProvider?: Promise<MediaProvider>;
|
|
22
|
-
uploadComplete?: boolean;
|
|
23
22
|
isLoading?: boolean;
|
|
24
23
|
mediaOptions?: MediaOptions;
|
|
25
24
|
}
|
|
@@ -27,7 +27,6 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
27
27
|
layout: MediaSingleLayout;
|
|
28
28
|
mediaNodes: MediaNodeWithPosHandler[];
|
|
29
29
|
mediaGroupNodes: Record<string, any>;
|
|
30
|
-
mobileUploadComplete: Record<string, boolean>;
|
|
31
30
|
options: MediaPluginOptions;
|
|
32
31
|
mediaProvider?: MediaProvider;
|
|
33
32
|
private pendingTask;
|
|
@@ -95,7 +94,6 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
95
94
|
updateMediaNodeAttrs: (id: string, attrs: object, isMediaSingle: boolean) => boolean | undefined;
|
|
96
95
|
private collectionFromProvider;
|
|
97
96
|
private handleMediaState;
|
|
98
|
-
isMobileUploadCompleted: (mediaId: string) => boolean | undefined;
|
|
99
97
|
removeNodeById: (state: MediaState) => void;
|
|
100
98
|
removeSelectedMediaContainer: () => boolean;
|
|
101
99
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
@@ -26,7 +26,6 @@ export interface MediaPluginState {
|
|
|
26
26
|
layout: MediaSingleLayout;
|
|
27
27
|
mediaNodes: MediaNodeWithPosHandler[];
|
|
28
28
|
mediaGroupNodes: Record<string, any>;
|
|
29
|
-
mobileUploadComplete: Record<string, boolean>;
|
|
30
29
|
options: MediaPluginOptions;
|
|
31
30
|
mediaProvider?: MediaProvider;
|
|
32
31
|
pickers: PickerFacade[];
|
|
@@ -51,7 +50,6 @@ export interface MediaPluginState {
|
|
|
51
50
|
handleMediaNodeUnmount: (oldNode: PMNode) => void;
|
|
52
51
|
findMediaNode: (id: string) => MediaNodeWithPosHandler | null;
|
|
53
52
|
updateMediaNodeAttrs: (id: string, attrs: object, isMediaSingle: boolean) => undefined | boolean;
|
|
54
|
-
isMobileUploadCompleted: (mediaId: string) => boolean | undefined;
|
|
55
53
|
removeNodeById: (state: MediaState) => void;
|
|
56
54
|
removeSelectedMediaContainer: () => boolean;
|
|
57
55
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
@@ -36,7 +36,7 @@ export default class ResizableMediaSingle extends React.Component<Props, State>
|
|
|
36
36
|
calcPxWidth: (useLayout?: MediaSingleLayout | undefined) => number;
|
|
37
37
|
get insideInlineLike(): boolean;
|
|
38
38
|
get insideLayout(): boolean;
|
|
39
|
-
highlights: (newWidth: number, snapPoints: number[]) =>
|
|
39
|
+
highlights: (newWidth: number, snapPoints: number[]) => string[] | number[];
|
|
40
40
|
private saveWrapper;
|
|
41
41
|
render(): jsx.JSX.Element;
|
|
42
42
|
}
|
|
@@ -5,7 +5,7 @@ import { Cell, CellColumnPositioning, TableDecorations } from '../types';
|
|
|
5
5
|
export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
6
6
|
export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
7
7
|
export declare const createCellHoverDecoration: (cells: Cell[], type: 'warning') => Decoration[];
|
|
8
|
-
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', danger?: boolean | undefined, selected?: boolean | undefined) => Decoration[];
|
|
8
|
+
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', tr: Transaction | ReadonlyTransaction, danger?: boolean | undefined, selected?: boolean | undefined) => Decoration[];
|
|
9
9
|
export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
|
|
10
10
|
export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
|
|
11
11
|
export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
@@ -330,5 +330,14 @@ export declare type FeatureFlags = {
|
|
|
330
330
|
* @default false
|
|
331
331
|
*/
|
|
332
332
|
lpLinkPicker?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* @description
|
|
335
|
+
* Show link settings button in the Floating toolbar
|
|
336
|
+
*
|
|
337
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3199172609/POP+Some+users+need+to+work+with+URLs+to+get+their+job+done
|
|
338
|
+
* @see https://product-fabric.atlassian.net/browse/EDM-3268
|
|
339
|
+
* @default null
|
|
340
|
+
*/
|
|
341
|
+
floatingToolbarLinkSettingsButton?: string;
|
|
333
342
|
};
|
|
334
343
|
export declare type FeatureFlagKey = keyof FeatureFlags;
|
|
@@ -11,6 +11,7 @@ export declare class FullPageEditor extends React.Component<EditorAppearanceComp
|
|
|
11
11
|
private scrollContainer;
|
|
12
12
|
private contentArea;
|
|
13
13
|
private wrapperElementRef;
|
|
14
|
+
constructor(props: any);
|
|
14
15
|
private contentAreaRef;
|
|
15
16
|
private scrollContainerRef;
|
|
16
17
|
private updateToolbarKeyline;
|