@atlaskit/editor-core 189.5.1 → 189.5.3
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 +8 -0
- package/afm-cc/tsconfig.json +335 -0
- package/dist/cjs/composable-editor/editor-internal.js +11 -11
- package/dist/cjs/composable-editor/editor.js +8 -7
- package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +2 -0
- package/dist/cjs/editor.js +4 -3
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +11 -10
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -1
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +6 -5
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +5 -2
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -1
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +7 -4
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +13 -11
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +5 -4
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +9 -8
- package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -4
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -6
- package/dist/cjs/plugins/find-replace/ui/Find.js +14 -13
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +6 -5
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -7
- package/dist/cjs/plugins/find-replace/ui/Replace.js +6 -5
- package/dist/cjs/plugins/find-replace/ui/styles.js +1 -0
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +5 -4
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +11 -8
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +2 -1
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +2 -1
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +2 -1
- package/dist/cjs/ui/Addon/Dropdown/index.js +3 -2
- package/dist/cjs/ui/Addon/DropdownItem/index.js +5 -2
- package/dist/cjs/ui/Alignment/index.js +7 -6
- package/dist/cjs/ui/Appearance/Chromeless.js +7 -6
- package/dist/cjs/ui/Appearance/Comment/Comment.js +17 -16
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +5 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +12 -10
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +6 -5
- package/dist/cjs/ui/ChromeCollapsed/index.js +3 -2
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +16 -15
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +12 -11
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +8 -8
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +18 -17
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +9 -8
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +10 -9
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +6 -5
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Header.js +14 -13
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +3 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +5 -4
- package/dist/cjs/ui/ContentStyles/index.js +2 -1
- package/dist/cjs/ui/ContextPanel/index.js +11 -10
- package/dist/cjs/ui/PluginSlot/index.js +4 -3
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +16 -15
- package/dist/cjs/ui/WithFlash/index.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +12 -11
- package/dist/es2019/composable-editor/editor.js +8 -6
- package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
- package/dist/es2019/editor.js +4 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +7 -6
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +4 -2
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +6 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +14 -11
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +7 -5
- package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
- package/dist/es2019/plugins/find-replace/ui/Find.js +14 -12
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +6 -4
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
- package/dist/es2019/plugins/find-replace/ui/Replace.js +6 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +1 -0
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +3 -2
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +3 -2
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -2
- package/dist/es2019/ui/Addon/Dropdown/index.js +3 -1
- package/dist/es2019/ui/Addon/DropdownItem/index.js +4 -2
- package/dist/es2019/ui/Alignment/index.js +5 -3
- package/dist/es2019/ui/Appearance/Chromeless.js +8 -7
- package/dist/es2019/ui/Appearance/Comment/Comment.js +18 -17
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +7 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +3 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +13 -12
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +19 -18
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +10 -9
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +11 -10
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +7 -6
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +8 -7
- package/dist/es2019/ui/ConfigPanel/Header.js +15 -14
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +4 -3
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +12 -11
- package/dist/es2019/ui/PluginSlot/index.js +5 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +3 -2
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
- package/dist/es2019/ui/ToolbarFeedback/index.js +14 -12
- package/dist/es2019/ui/WithFlash/index.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +12 -11
- package/dist/esm/composable-editor/editor.js +8 -6
- package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
- package/dist/esm/editor.js +4 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +7 -6
- package/dist/esm/plugins/collab-edit/ui/avatars.js +4 -2
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +6 -4
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +14 -11
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +7 -5
- package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
- package/dist/esm/plugins/find-replace/ui/Find.js +14 -12
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +6 -4
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
- package/dist/esm/plugins/find-replace/ui/Replace.js +6 -4
- package/dist/esm/plugins/find-replace/ui/styles.js +1 -0
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +3 -2
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +3 -2
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -2
- package/dist/esm/ui/Addon/Dropdown/index.js +3 -1
- package/dist/esm/ui/Addon/DropdownItem/index.js +4 -2
- package/dist/esm/ui/Alignment/index.js +5 -3
- package/dist/esm/ui/Appearance/Chromeless.js +8 -7
- package/dist/esm/ui/Appearance/Comment/Comment.js +18 -17
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +7 -5
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +3 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +13 -12
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +19 -18
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +10 -9
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +11 -10
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +7 -6
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +8 -7
- package/dist/esm/ui/ConfigPanel/Header.js +15 -14
- package/dist/esm/ui/ConfigPanel/LoadingState.js +4 -3
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +12 -11
- package/dist/esm/ui/PluginSlot/index.js +5 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +3 -2
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
- package/dist/esm/ui/ToolbarFeedback/index.js +14 -12
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +8 -4
|
@@ -7,7 +7,9 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
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); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
+
/** @jsx jsx */
|
|
10
11
|
import React from 'react';
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
11
13
|
import { dropdown } from './styles';
|
|
12
14
|
var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
13
15
|
_inherits(DropdownWrapper, _React$Component);
|
|
@@ -42,7 +44,7 @@ var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
42
44
|
onClick: _this2.handleClick
|
|
43
45
|
});
|
|
44
46
|
});
|
|
45
|
-
return
|
|
47
|
+
return jsx("div", {
|
|
46
48
|
css: dropdown
|
|
47
49
|
}, children);
|
|
48
50
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { dropdownItem } from './styles';
|
|
2
4
|
var DropdownItemWrapper = function DropdownItemWrapper(props) {
|
|
3
|
-
return
|
|
5
|
+
return jsx("div", {
|
|
4
6
|
css: dropdownItem,
|
|
5
7
|
onClick: function onClick() {
|
|
6
8
|
return props.onClick && props.onClick({
|
|
@@ -8,6 +10,6 @@ var DropdownItemWrapper = function DropdownItemWrapper(props) {
|
|
|
8
10
|
renderOnClick: props.renderOnClick
|
|
9
11
|
});
|
|
10
12
|
}
|
|
11
|
-
},
|
|
13
|
+
}, jsx("span", null, props.icon), props.children);
|
|
12
14
|
};
|
|
13
15
|
export default DropdownItemWrapper;
|
|
@@ -5,6 +5,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
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); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
8
10
|
import { PureComponent } from 'react';
|
|
9
11
|
import { injectIntl } from 'react-intl-next';
|
|
10
12
|
import { IconMap } from '../../plugins/alignment/ui/ToolbarAlignment/icon-map';
|
|
@@ -38,7 +40,7 @@ var Alignment = /*#__PURE__*/function (_PureComponent) {
|
|
|
38
40
|
selectedAlignment = _this$props.selectedAlignment,
|
|
39
41
|
className = _this$props.className,
|
|
40
42
|
intl = _this$props.intl;
|
|
41
|
-
return
|
|
43
|
+
return jsx("div", {
|
|
42
44
|
css: alignmentWrapper,
|
|
43
45
|
className: className
|
|
44
46
|
}, alignmentOptions.map(function (alignment) {
|
|
@@ -46,8 +48,8 @@ var Alignment = /*#__PURE__*/function (_PureComponent) {
|
|
|
46
48
|
title = alignment.title,
|
|
47
49
|
shortcut = alignment.shortcut;
|
|
48
50
|
var message = intl.formatMessage(title);
|
|
49
|
-
return
|
|
50
|
-
content:
|
|
51
|
+
return jsx(AlignmentButton, {
|
|
52
|
+
content: jsx(IconMap, {
|
|
51
53
|
alignment: value
|
|
52
54
|
}),
|
|
53
55
|
key: value,
|
|
@@ -9,8 +9,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3;
|
|
10
10
|
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); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
import React, { Fragment } from 'react';
|
|
13
|
-
import { css } from '@emotion/react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
14
15
|
import PluginSlot from '../PluginSlot';
|
|
15
16
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
16
17
|
import { scrollbarStyles } from '../styles';
|
|
@@ -53,18 +54,18 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
53
54
|
pluginHooks = _this$props.pluginHooks,
|
|
54
55
|
featureFlags = _this$props.featureFlags;
|
|
55
56
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
56
|
-
return
|
|
57
|
+
return jsx(WithFlash, {
|
|
57
58
|
animate: maxContentSizeReached
|
|
58
|
-
},
|
|
59
|
+
}, jsx("div", {
|
|
59
60
|
css: [chromelessEditor, maxHeight && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), maxHeight), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
60
61
|
"data-testid": "chromeless-editor",
|
|
61
62
|
ref: function ref(_ref2) {
|
|
62
63
|
return _this.containerElement = _ref2;
|
|
63
64
|
}
|
|
64
|
-
},
|
|
65
|
+
}, jsx(ContentArea, {
|
|
65
66
|
className: "ak-editor-content-area",
|
|
66
67
|
featureFlags: featureFlags
|
|
67
|
-
}, customContentComponents,
|
|
68
|
+
}, customContentComponents, jsx(PluginSlot, {
|
|
68
69
|
editorView: editorView,
|
|
69
70
|
editorActions: editorActions,
|
|
70
71
|
eventDispatcher: eventDispatcher,
|
|
@@ -86,7 +87,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
86
87
|
_createClass(Editor, [{
|
|
87
88
|
key: "render",
|
|
88
89
|
value: function render() {
|
|
89
|
-
return
|
|
90
|
+
return jsx(RenderWithPluginState, {
|
|
90
91
|
renderChrome: this.renderChrome
|
|
91
92
|
});
|
|
92
93
|
}
|
|
@@ -100,7 +101,7 @@ function RenderWithPluginState(_ref3) {
|
|
|
100
101
|
var api = usePresetContext();
|
|
101
102
|
var _useSharedPluginState = useSharedPluginState(api, ['maxContentSize']),
|
|
102
103
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
103
|
-
return
|
|
104
|
+
return jsx(Fragment, null, renderChrome({
|
|
104
105
|
maxContentSize: maxContentSizeState
|
|
105
106
|
}));
|
|
106
107
|
}
|
|
@@ -9,8 +9,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
10
10
|
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); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
import React, { Fragment } from 'react';
|
|
13
|
-
import { css } from '@emotion/react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
14
15
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
15
16
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
16
17
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -99,15 +100,15 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
99
100
|
event.preventDefault();
|
|
100
101
|
event.stopPropagation();
|
|
101
102
|
};
|
|
102
|
-
return
|
|
103
|
+
return jsx(WithFlash, {
|
|
103
104
|
animate: maxContentSizeReached
|
|
104
|
-
},
|
|
105
|
+
}, jsx("div", {
|
|
105
106
|
css: [commentEditorStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
106
107
|
className: "akEditor",
|
|
107
108
|
ref: _this.wrapperElementRef
|
|
108
|
-
},
|
|
109
|
+
}, jsx(MainToolbar, {
|
|
109
110
|
useStickyToolbar: useStickyToolbar
|
|
110
|
-
},
|
|
111
|
+
}, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
111
112
|
editorView: editorView,
|
|
112
113
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
113
114
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -115,7 +116,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
115
116
|
editorAppearance: _this.appearance,
|
|
116
117
|
useStickyToolbar: useStickyToolbar,
|
|
117
118
|
intl: intl
|
|
118
|
-
},
|
|
119
|
+
}, jsx(Toolbar, {
|
|
119
120
|
editorView: editorView,
|
|
120
121
|
editorActions: editorActions,
|
|
121
122
|
eventDispatcher: eventDispatcher,
|
|
@@ -128,14 +129,14 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
128
129
|
disabled: !!disabled,
|
|
129
130
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
130
131
|
containerElement: _this.containerElement
|
|
131
|
-
}),
|
|
132
|
+
}), jsx("div", {
|
|
132
133
|
css: mainToolbarCustomComponentsSlotStyle
|
|
133
|
-
}, customPrimaryToolbarComponents))),
|
|
134
|
+
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
134
135
|
editorView: editorView,
|
|
135
136
|
editorDisabled: disabled
|
|
136
|
-
},
|
|
137
|
+
}, jsx(WidthConsumer, null, function (_ref2) {
|
|
137
138
|
var width = _ref2.width;
|
|
138
|
-
return
|
|
139
|
+
return jsx(ContentArea, {
|
|
139
140
|
ref: function ref(_ref3) {
|
|
140
141
|
return _this.containerElement = _ref3;
|
|
141
142
|
},
|
|
@@ -144,7 +145,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
144
145
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
145
146
|
}),
|
|
146
147
|
featureFlags: featureFlags
|
|
147
|
-
}, customContentComponents,
|
|
148
|
+
}, customContentComponents, jsx(PluginSlot, {
|
|
148
149
|
editorView: editorView,
|
|
149
150
|
editorActions: editorActions,
|
|
150
151
|
eventDispatcher: eventDispatcher,
|
|
@@ -160,19 +161,19 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
160
161
|
wrapperElement: _this.wrapperElementRef.current,
|
|
161
162
|
pluginHooks: pluginHooks
|
|
162
163
|
}), editorDOMElement);
|
|
163
|
-
}))), showSecondaryToolbar &&
|
|
164
|
+
}))), showSecondaryToolbar && jsx("div", {
|
|
164
165
|
css: secondaryToolbarStyle,
|
|
165
166
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
166
|
-
},
|
|
167
|
+
}, jsx(ButtonGroup, null, !!onSave && jsx(Button, {
|
|
167
168
|
appearance: "primary",
|
|
168
169
|
onClick: _this.handleSave,
|
|
169
170
|
testId: "comment-save-button",
|
|
170
171
|
isDisabled: disabled || mediaState && !mediaState.allUploadsFinished
|
|
171
|
-
}, intl.formatMessage(messages.saveButton)), !!onCancel &&
|
|
172
|
+
}, intl.formatMessage(messages.saveButton)), !!onCancel && jsx(Button, {
|
|
172
173
|
appearance: "subtle",
|
|
173
174
|
onClick: _this.handleCancel,
|
|
174
175
|
isDisabled: disabled
|
|
175
|
-
}, intl.formatMessage(messages.cancelButton))),
|
|
176
|
+
}, intl.formatMessage(messages.cancelButton))), jsx("span", {
|
|
176
177
|
style: {
|
|
177
178
|
flexGrow: 1
|
|
178
179
|
}
|
|
@@ -186,7 +187,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
186
187
|
_createClass(Editor, [{
|
|
187
188
|
key: "render",
|
|
188
189
|
value: function render() {
|
|
189
|
-
return
|
|
190
|
+
return jsx(RenderWithPluginState, {
|
|
190
191
|
renderChrome: this.renderChrome
|
|
191
192
|
});
|
|
192
193
|
}
|
|
@@ -200,7 +201,7 @@ function RenderWithPluginState(_ref4) {
|
|
|
200
201
|
var _useSharedPluginState = useSharedPluginState(api, ['media', 'maxContentSize']),
|
|
201
202
|
mediaState = _useSharedPluginState.mediaState,
|
|
202
203
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
203
|
-
return
|
|
204
|
+
return jsx(Fragment, null, renderChrome({
|
|
204
205
|
maxContentSize: maxContentSizeState,
|
|
205
206
|
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
206
207
|
}));
|
|
@@ -2,8 +2,10 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
|
|
5
7
|
import React, { useEffect, useState } from 'react';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import { N30 } from '@atlaskit/theme/colors';
|
|
8
10
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
9
11
|
export var TableControlsPadding = 20;
|
|
@@ -26,14 +28,14 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
26
28
|
setTop(props.offsetTop || 0);
|
|
27
29
|
}
|
|
28
30
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
29
|
-
return
|
|
31
|
+
return jsx("div", {
|
|
30
32
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n "])), top)],
|
|
31
33
|
"data-testid": "ak-editor-main-toolbar",
|
|
32
34
|
className: 'show-keyline'
|
|
33
35
|
}, props.children);
|
|
34
36
|
};
|
|
35
37
|
var FixedToolbar = function FixedToolbar(props) {
|
|
36
|
-
return
|
|
38
|
+
return jsx("div", {
|
|
37
39
|
css: mainToolbarWrapperStyle,
|
|
38
40
|
"data-testid": "ak-editor-main-toolbar"
|
|
39
41
|
}, props.children);
|
|
@@ -70,8 +72,8 @@ export var MainToolbar = function MainToolbar(_ref) {
|
|
|
70
72
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
71
73
|
children = _ref.children;
|
|
72
74
|
if (useStickyToolbar) {
|
|
73
|
-
return
|
|
75
|
+
return jsx(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
74
76
|
}
|
|
75
|
-
return
|
|
77
|
+
return jsx(FixedToolbar, null, children);
|
|
76
78
|
};
|
|
77
79
|
export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)");
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { fullPageEditorWrapper } from './StyledComponents';
|
|
4
6
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
5
7
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
@@ -41,11 +43,11 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
41
43
|
}, [props.innerRef]);
|
|
42
44
|
var scrollContentContainerRef = useRef(null);
|
|
43
45
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
44
|
-
return
|
|
46
|
+
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
45
47
|
css: fullPageEditorWrapper,
|
|
46
48
|
className: "akEditor",
|
|
47
49
|
ref: wrapperElementRef
|
|
48
|
-
},
|
|
50
|
+
}, jsx(FullPageToolbar, {
|
|
49
51
|
appearance: props.appearance,
|
|
50
52
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
51
53
|
collabEdit: props.collabEdit,
|
|
@@ -66,7 +68,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
66
68
|
showKeyline: showKeyline,
|
|
67
69
|
featureFlags: props.featureFlags,
|
|
68
70
|
hideAvatarGroup: props.hideAvatarGroup
|
|
69
|
-
}),
|
|
71
|
+
}), jsx(FullPageContentArea, {
|
|
70
72
|
ref: scrollContentContainerRef,
|
|
71
73
|
appearance: props.appearance,
|
|
72
74
|
contentComponents: props.contentComponents,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx, useTheme } from '@emotion/react';
|
|
2
3
|
import { WidthConsumer, ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
3
4
|
import React, { useImperativeHandle, useRef } from 'react';
|
|
4
5
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -23,22 +24,22 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
26
|
}, []);
|
|
26
|
-
return
|
|
27
|
+
return jsx(WidthConsumer, null, function (_ref) {
|
|
27
28
|
var width = _ref.width;
|
|
28
|
-
return
|
|
29
|
+
return jsx(ContextPanelConsumer, null, function (_ref2) {
|
|
29
30
|
var _contentAreaRef$curre;
|
|
30
31
|
var positionedOverEditor = _ref2.positionedOverEditor;
|
|
31
|
-
return
|
|
32
|
+
return jsx("div", {
|
|
32
33
|
css: [contentArea, positionedOverEditor && positionedOverEditorStyle],
|
|
33
34
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
34
|
-
},
|
|
35
|
+
}, jsx(ScrollContainer, {
|
|
35
36
|
className: "fabric-editor-popup-scroll-parent",
|
|
36
37
|
featureFlags: props.featureFlags,
|
|
37
38
|
ref: scrollContainerRef
|
|
38
|
-
},
|
|
39
|
+
}, jsx(ClickAreaBlock, {
|
|
39
40
|
editorView: props.editorView,
|
|
40
41
|
editorDisabled: props.disabled
|
|
41
|
-
},
|
|
42
|
+
}, jsx("div", {
|
|
42
43
|
css: editorContentAreaStyle({
|
|
43
44
|
fullWidthMode: fullWidthMode,
|
|
44
45
|
layoutMaxWidth: theme.layoutMaxWidth,
|
|
@@ -47,11 +48,11 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
47
48
|
role: "region",
|
|
48
49
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
49
50
|
ref: contentAreaRef
|
|
50
|
-
},
|
|
51
|
+
}, jsx("div", {
|
|
51
52
|
css: editorContentGutterStyle,
|
|
52
53
|
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
53
54
|
ref: contentAreaRef
|
|
54
|
-
}, props.customContentComponents,
|
|
55
|
+
}, props.customContentComponents, jsx(PluginSlot, {
|
|
55
56
|
editorView: props.editorView,
|
|
56
57
|
editorActions: props.editorActions,
|
|
57
58
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -67,9 +68,9 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
67
68
|
containerElement: scrollContainerRef.current,
|
|
68
69
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
69
70
|
wrapperElement: props.wrapperElement
|
|
70
|
-
}), props.editorDOMElement)))),
|
|
71
|
+
}), props.editorDOMElement)))), jsx("div", {
|
|
71
72
|
css: sidebarArea
|
|
72
|
-
}, props.contextPanel ||
|
|
73
|
+
}, props.contextPanel || jsx(ContextPanel, {
|
|
73
74
|
visible: false
|
|
74
75
|
})));
|
|
75
76
|
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import React, { useState, useEffect } from 'react';
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
3
6
|
import { injectIntl } from 'react-intl-next';
|
|
4
7
|
import AvatarsWithPluginState from '../../../plugins/collab-edit/ui';
|
|
5
8
|
import FindReplaceToolbarButtonWithState from '../../../plugins/find-replace/FindReplaceToolbarButtonWithState';
|
|
@@ -20,11 +23,11 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
20
23
|
|
|
21
24
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
22
25
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
23
|
-
var nonCustomToolbar =
|
|
26
|
+
var nonCustomToolbar = jsx("div", {
|
|
24
27
|
css: nonCustomToolbarWrapperStyle
|
|
25
|
-
}, props.beforeIcon &&
|
|
28
|
+
}, props.beforeIcon && jsx("div", {
|
|
26
29
|
css: mainToolbarIconBeforeStyle
|
|
27
|
-
}, props.beforeIcon),
|
|
30
|
+
}, props.beforeIcon), jsx(Toolbar, {
|
|
28
31
|
editorView: props.editorView,
|
|
29
32
|
editorActions: props.editorActions,
|
|
30
33
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -40,17 +43,16 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
40
43
|
hasMinWidth: props.hasMinWidth,
|
|
41
44
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
42
45
|
}));
|
|
43
|
-
var customToolbar =
|
|
46
|
+
var customToolbar = jsx("div", {
|
|
44
47
|
css: customToolbarWrapperStyle
|
|
45
|
-
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ?
|
|
48
|
+
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
46
49
|
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
47
50
|
}) : null, props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null :
|
|
48
|
-
/*#__PURE__*/
|
|
49
51
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
50
52
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
51
53
|
// For more details please check
|
|
52
54
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
53
|
-
|
|
55
|
+
jsx(AvatarsWithPluginState, {
|
|
54
56
|
editorView: props.editorView,
|
|
55
57
|
eventDispatcher: props.eventDispatcher,
|
|
56
58
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
@@ -58,7 +60,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
58
60
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected,
|
|
59
61
|
featureFlags: props.featureFlags || {},
|
|
60
62
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
61
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ?
|
|
63
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? jsx(FindReplaceToolbarButtonWithState, {
|
|
62
64
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
63
65
|
popupsMountPoint: props.popupsMountPoint,
|
|
64
66
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -97,22 +99,22 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
97
99
|
event.preventDefault();
|
|
98
100
|
event.stopPropagation();
|
|
99
101
|
};
|
|
100
|
-
return
|
|
102
|
+
return jsx(ContextPanelConsumer, null, function (_ref) {
|
|
101
103
|
var contextPanelWidth = _ref.width;
|
|
102
|
-
return
|
|
104
|
+
return jsx(ToolbarArrowKeyNavigationProvider, {
|
|
103
105
|
editorView: props.editorView,
|
|
104
106
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
105
107
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
106
108
|
handleEscape: handleEscape,
|
|
107
109
|
intl: props.intl
|
|
108
|
-
},
|
|
110
|
+
}, jsx("div", {
|
|
109
111
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
|
|
110
112
|
"data-testid": "ak-editor-main-toolbar"
|
|
111
|
-
},
|
|
113
|
+
}, jsx("div", {
|
|
112
114
|
css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
|
|
113
115
|
role: "toolbar",
|
|
114
116
|
"aria-label": props.intl.formatMessage(messages.toolbarLabel)
|
|
115
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
117
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
|
|
116
118
|
css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
|
|
117
119
|
"data-testid": 'avatar-group-outside-plugin',
|
|
118
120
|
role: "region",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useCallback, forwardRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import WithFlash from '../WithFlash';
|
|
6
7
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
7
8
|
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
@@ -53,20 +54,20 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
53
54
|
currentIsExpanded = isExpanded;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
return
|
|
57
|
+
return jsx(WithFlash, {
|
|
57
58
|
animate: maxContentSizeReached
|
|
58
|
-
},
|
|
59
|
+
}, jsx("div", {
|
|
59
60
|
css: mobileEditor,
|
|
60
61
|
ref: ref
|
|
61
|
-
},
|
|
62
|
+
}, jsx(ClickArea, {
|
|
62
63
|
editorView: editorView || undefined,
|
|
63
64
|
minHeight: minHeight,
|
|
64
65
|
persistScrollGutter: persistScrollGutter,
|
|
65
66
|
isExpanded: currentIsExpanded,
|
|
66
67
|
editorDisabled: editorDisabled
|
|
67
|
-
},
|
|
68
|
+
}, jsx(ContentArea, {
|
|
68
69
|
featureFlags: featureFlags
|
|
69
|
-
},
|
|
70
|
+
}, jsx("div", {
|
|
70
71
|
className: "ak-editor-content-area"
|
|
71
72
|
}, children)))));
|
|
72
73
|
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags, api === null || api === void 0 || (_api$base2 = api.base) === null || _api$base2 === void 0 ? void 0 : _api$base2.sharedState]);
|
|
@@ -7,7 +7,9 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
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); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
+
/** @jsx jsx */
|
|
10
11
|
import React from 'react';
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
11
13
|
import { PureComponent } from 'react';
|
|
12
14
|
import { inputStyle } from './styles';
|
|
13
15
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -45,7 +47,7 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
45
47
|
key: "render",
|
|
46
48
|
value: function render() {
|
|
47
49
|
var placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
48
|
-
return
|
|
50
|
+
return jsx("input", {
|
|
49
51
|
"data-testid": "chrome-collapsed",
|
|
50
52
|
css: inputStyle,
|
|
51
53
|
ref: this.handleInputRef,
|
|
@@ -2,64 +2,64 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
4
|
// Quality Ticket: https://product-fabric.atlassian.net/browse/DSP-4249
|
|
5
|
-
|
|
5
|
+
/** @jsx jsx */
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
8
|
var imageContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0 auto ", ";\n height: 80px;\n"])), "var(--ds-space-300, 24px)");
|
|
9
9
|
var ErrorImage = function ErrorImage() {
|
|
10
|
-
return
|
|
10
|
+
return jsx("div", {
|
|
11
11
|
css: imageContainer
|
|
12
|
-
},
|
|
12
|
+
}, jsx("svg", {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
viewBox: "0 0 163.28 218",
|
|
15
15
|
height: "80"
|
|
16
|
-
},
|
|
16
|
+
}, jsx("defs", null, jsx("linearGradient", {
|
|
17
17
|
id: "linear-gradient",
|
|
18
18
|
x1: "133.86",
|
|
19
19
|
x2: "-2.79",
|
|
20
20
|
y1: "136.43",
|
|
21
21
|
y2: "200.15",
|
|
22
22
|
gradientUnits: "userSpaceOnUse"
|
|
23
|
-
},
|
|
23
|
+
}, jsx("stop", {
|
|
24
24
|
offset: "0",
|
|
25
25
|
stopColor: "#ffd740"
|
|
26
|
-
}),
|
|
26
|
+
}), jsx("stop", {
|
|
27
27
|
offset: "1",
|
|
28
28
|
stopColor: "#ffab00"
|
|
29
|
-
})),
|
|
29
|
+
})), jsx("clipPath", {
|
|
30
30
|
id: "clip-path"
|
|
31
|
-
},
|
|
31
|
+
}, jsx("path", {
|
|
32
32
|
id: "_Polygon_",
|
|
33
33
|
d: "M94.78 80.16l66.44 115.08A15.17 15.17 0 01148.08 218H15.2a15.17 15.17 0 01-13.14-22.76L68.5 80.16a15.17 15.17 0 0126.28 0z",
|
|
34
34
|
className: "cls-1",
|
|
35
35
|
"data-name": "<Polygon>"
|
|
36
|
-
})),
|
|
36
|
+
})), jsx("style", null, ".cls-1{fill:url(#linear-gradient)}.cls-2{fill:#253858}.cls-6{fill:none;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2px;stroke:#5e6c84}")), jsx("g", {
|
|
37
37
|
id: "Layer_2",
|
|
38
38
|
"data-name": "Layer 2"
|
|
39
|
-
},
|
|
39
|
+
}, jsx("g", {
|
|
40
40
|
id: "Software"
|
|
41
|
-
},
|
|
41
|
+
}, jsx("path", {
|
|
42
42
|
id: "_Polygon_2",
|
|
43
43
|
d: "M94.78 80.16l66.44 115.08A15.17 15.17 0 01148.08 218H15.2a15.17 15.17 0 01-13.14-22.76L68.5 80.16a15.17 15.17 0 0126.28 0z",
|
|
44
44
|
className: "cls-1",
|
|
45
45
|
"data-name": "<Polygon>"
|
|
46
|
-
}),
|
|
46
|
+
}), jsx("path", {
|
|
47
47
|
d: "M87.22 163.71l2.88-44.35a9.18 9.18 0 00-9.16-9.78 9.18 9.18 0 00-9.16 9.78l2.88 44.35a6.3 6.3 0 006.28 5.89 6.3 6.3 0 006.28-5.89zM71.38 187.25a9.53 9.53 0 0010.39 9.58 9.68 9.68 0 00-.9-19.32 9.64 9.64 0 00-9.49 9.74z",
|
|
48
48
|
className: "cls-2"
|
|
49
|
-
}),
|
|
49
|
+
}), jsx("path", {
|
|
50
50
|
fill: "#ffc400",
|
|
51
51
|
d: "M91.7 27.17L84.29.45A.61.61 0 0083.1.5l-4.66 25.1-5.8-1.08a.61.61 0 00-.7.76L79.35 52a.61.61 0 001.19 0l4.66-25.1 5.8 1.03a.61.61 0 00.7-.76z"
|
|
52
|
-
}),
|
|
52
|
+
}), jsx("path", {
|
|
53
53
|
fill: "#ffab00",
|
|
54
54
|
d: "M65.12 41.81l-10.88-8.55a.27.27 0 00-.41.33L59.36 45l-2.66 1.31a.27.27 0 000 .45l10.87 8.55a.27.27 0 00.41-.33l-5.57-11.43 2.66-1.29a.27.27 0 00.05-.45z"
|
|
55
|
-
}),
|
|
55
|
+
}), jsx("path", {
|
|
56
56
|
fill: "none",
|
|
57
57
|
stroke: "#344563",
|
|
58
58
|
strokeLinecap: "round",
|
|
59
59
|
strokeMiterlimit: "10",
|
|
60
60
|
strokeWidth: "2",
|
|
61
61
|
d: "M115.15 36.6c-1.17 1.59-11-5.6-12.16-4s8.66 8.79 7.5 10.39-11-5.6-12.17-4 8.66 8.79 7.49 10.39-11-5.6-12.17-4 8.66 8.79 7.49 10.39"
|
|
62
|
-
}),
|
|
62
|
+
}), jsx("path", {
|
|
63
63
|
d: "M119.92 64.19c-1.46 1.33-7.05-4.78-8.51-3.44s4.13 7.45 2.67 8.78-7.05-4.78-8.51-3.44c-.68.62.16 2.27 1.11 4M44.8 64c1.82.77 5-6.87 6.86-6.1s-1.39 8.4.43 9.17 5-6.87 6.86-6.1c.85.36.61 2.19.29 4.13",
|
|
64
64
|
className: "cls-6"
|
|
65
65
|
})))));
|