@atlaskit/editor-core 189.5.1 → 189.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/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 +13 -5
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import Button from '@atlaskit/button/standard-button';
|
|
4
6
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
5
7
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -121,9 +123,9 @@ class Replace extends React.PureComponent {
|
|
|
121
123
|
const {
|
|
122
124
|
canReplace
|
|
123
125
|
} = this.props;
|
|
124
|
-
return
|
|
126
|
+
return jsx("div", {
|
|
125
127
|
css: sectionWrapperStyles
|
|
126
|
-
},
|
|
128
|
+
}, jsx(Textfield, {
|
|
127
129
|
name: "replace",
|
|
128
130
|
appearance: "none",
|
|
129
131
|
placeholder: this.replaceWith,
|
|
@@ -134,12 +136,12 @@ class Replace extends React.PureComponent {
|
|
|
134
136
|
onKeyDown: this.handleReplaceKeyDown,
|
|
135
137
|
onCompositionStart: this.handleCompositionStart,
|
|
136
138
|
onCompositionEnd: this.handleCompositionEnd
|
|
137
|
-
}),
|
|
139
|
+
}), jsx(Button, {
|
|
138
140
|
css: replaceSectionButtonStyles,
|
|
139
141
|
testId: this.replace,
|
|
140
142
|
onClick: this.handleReplaceClick,
|
|
141
143
|
isDisabled: !canReplace
|
|
142
|
-
}, this.replace),
|
|
144
|
+
}, this.replace), jsx(Button, {
|
|
143
145
|
css: replaceSectionButtonStyles,
|
|
144
146
|
testId: this.replaceAll,
|
|
145
147
|
onClick: this.handleReplaceAllClick,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
2
3
|
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
3
4
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
5
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
@@ -54,14 +55,14 @@ export default function JIRAIssueNode(props) {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
} = props;
|
|
57
|
-
return
|
|
58
|
+
return jsx("span", {
|
|
58
59
|
css: wrapperNode,
|
|
59
60
|
"data-testid": "jira-issue-node"
|
|
60
|
-
},
|
|
61
|
+
}, jsx("span", {
|
|
61
62
|
css: svgChildNode
|
|
62
|
-
},
|
|
63
|
+
}, jsx(JiraIcon, {
|
|
63
64
|
size: "small"
|
|
64
|
-
})),
|
|
65
|
+
})), jsx("span", {
|
|
65
66
|
css: jiraChildNode
|
|
66
67
|
}, issueKey));
|
|
67
68
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { injectIntl } from 'react-intl-next';
|
|
2
4
|
import UndoIcon from '@atlaskit/icon/glyph/undo';
|
|
3
5
|
import RedoIcon from '@atlaskit/icon/glyph/redo';
|
|
@@ -53,39 +55,39 @@ export const ToolbarUndoRedo = ({
|
|
|
53
55
|
canUndo,
|
|
54
56
|
canRedo
|
|
55
57
|
} = historyState !== null && historyState !== void 0 ? historyState : {};
|
|
56
|
-
return
|
|
58
|
+
return jsx("span", {
|
|
57
59
|
css: buttonGroupStyle
|
|
58
|
-
},
|
|
60
|
+
}, jsx(ToolbarButton, {
|
|
59
61
|
buttonId: TOOLBAR_BUTTON.UNDO,
|
|
60
62
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
61
63
|
onClick: handleUndo,
|
|
62
64
|
disabled: !canUndo || disabled,
|
|
63
65
|
"aria-label": tooltip(undoKeymap, labelUndo),
|
|
64
66
|
"aria-keyshortcuts": getAriaKeyshortcuts(undoKeymap),
|
|
65
|
-
title:
|
|
67
|
+
title: jsx(ToolTipContent, {
|
|
66
68
|
description: labelUndo,
|
|
67
69
|
keymap: undoKeymap
|
|
68
70
|
}),
|
|
69
|
-
iconBefore:
|
|
71
|
+
iconBefore: jsx(UndoIcon, {
|
|
70
72
|
label: ""
|
|
71
73
|
}),
|
|
72
74
|
testId: "ak-editor-toolbar-button-undo"
|
|
73
|
-
}),
|
|
75
|
+
}), jsx(ToolbarButton, {
|
|
74
76
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
75
77
|
buttonId: TOOLBAR_BUTTON.REDO,
|
|
76
78
|
onClick: handleRedo,
|
|
77
79
|
disabled: !canRedo || disabled,
|
|
78
|
-
title:
|
|
80
|
+
title: jsx(ToolTipContent, {
|
|
79
81
|
description: labelRedo,
|
|
80
82
|
keymap: redoKeymap
|
|
81
83
|
}),
|
|
82
|
-
iconBefore:
|
|
84
|
+
iconBefore: jsx(RedoIcon, {
|
|
83
85
|
label: ""
|
|
84
86
|
}),
|
|
85
87
|
testId: "ak-editor-toolbar-button-redo",
|
|
86
88
|
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
87
89
|
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
88
|
-
}),
|
|
90
|
+
}), jsx("span", {
|
|
89
91
|
css: separatorStyles
|
|
90
92
|
}));
|
|
91
93
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { clickAreaClickHandler } from '../click-area-helper';
|
|
4
5
|
const clickWrapper = css`
|
|
5
6
|
flex-grow: 1;
|
|
@@ -18,7 +19,7 @@ export const ClickAreaBlock = ({
|
|
|
18
19
|
clickAreaClickHandler(editorView, event);
|
|
19
20
|
}
|
|
20
21
|
}, [editorView, editorDisabled]);
|
|
21
|
-
return
|
|
22
|
+
return jsx("div", {
|
|
22
23
|
"data-testid": "click-wrapper",
|
|
23
24
|
css: clickWrapper,
|
|
24
25
|
onMouseDown: handleMouseDown
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { createParagraphAtEnd } from '../../../commands';
|
|
4
5
|
const clickArea = css`
|
|
5
6
|
flex-grow: 1;
|
|
@@ -17,7 +18,7 @@ export const ClickAreaInline = ({
|
|
|
17
18
|
event.stopPropagation();
|
|
18
19
|
}
|
|
19
20
|
}, [editorView]);
|
|
20
|
-
return
|
|
21
|
+
return jsx("div", {
|
|
21
22
|
"data-testid": "click-wrapper",
|
|
22
23
|
css: clickArea,
|
|
23
24
|
onMouseDown: handleMouseDown
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { clickAreaClickHandler } from '../click-area-helper';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -57,7 +58,7 @@ export default class ClickAreaMobile extends React.Component {
|
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
render() {
|
|
60
|
-
return
|
|
61
|
+
return jsx("div", {
|
|
61
62
|
css: clickWrapper({
|
|
62
63
|
isExpanded: this.props.isExpanded,
|
|
63
64
|
minHeight: this.props.minHeight
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { dropdown } from './styles';
|
|
4
6
|
export default class DropdownWrapper extends React.Component {
|
|
5
7
|
constructor(...args) {
|
|
@@ -25,7 +27,7 @@ export default class DropdownWrapper extends React.Component {
|
|
|
25
27
|
const children = React.Children.map(this.props.children, child => /*#__PURE__*/React.cloneElement(child, {
|
|
26
28
|
onClick: this.handleClick
|
|
27
29
|
}));
|
|
28
|
-
return
|
|
30
|
+
return jsx("div", {
|
|
29
31
|
css: dropdown
|
|
30
32
|
}, children);
|
|
31
33
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { dropdownItem } from './styles';
|
|
2
|
-
const DropdownItemWrapper = props =>
|
|
4
|
+
const DropdownItemWrapper = props => jsx("div", {
|
|
3
5
|
css: dropdownItem,
|
|
4
6
|
onClick: () => props.onClick && props.onClick({
|
|
5
7
|
actionOnClick: props.actionOnClick,
|
|
6
8
|
renderOnClick: props.renderOnClick
|
|
7
9
|
})
|
|
8
|
-
},
|
|
10
|
+
}, jsx("span", null, props.icon), props.children);
|
|
9
11
|
export default DropdownItemWrapper;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { PureComponent } from 'react';
|
|
2
4
|
import { injectIntl } from 'react-intl-next';
|
|
3
5
|
import { IconMap } from '../../plugins/alignment/ui/ToolbarAlignment/icon-map';
|
|
@@ -24,7 +26,7 @@ class Alignment extends PureComponent {
|
|
|
24
26
|
className,
|
|
25
27
|
intl
|
|
26
28
|
} = this.props;
|
|
27
|
-
return
|
|
29
|
+
return jsx("div", {
|
|
28
30
|
css: alignmentWrapper,
|
|
29
31
|
className: className
|
|
30
32
|
}, alignmentOptions.map(alignment => {
|
|
@@ -34,8 +36,8 @@ class Alignment extends PureComponent {
|
|
|
34
36
|
shortcut
|
|
35
37
|
} = alignment;
|
|
36
38
|
const message = intl.formatMessage(title);
|
|
37
|
-
return
|
|
38
|
-
content:
|
|
39
|
+
return jsx(AlignmentButton, {
|
|
40
|
+
content: jsx(IconMap, {
|
|
39
41
|
alignment: value
|
|
40
42
|
}),
|
|
41
43
|
key: value,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { Fragment } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import PluginSlot from '../PluginSlot';
|
|
5
6
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
6
7
|
import { scrollbarStyles } from '../styles';
|
|
@@ -58,9 +59,9 @@ export default class Editor extends React.Component {
|
|
|
58
59
|
featureFlags
|
|
59
60
|
} = this.props;
|
|
60
61
|
const maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
61
|
-
return
|
|
62
|
+
return jsx(WithFlash, {
|
|
62
63
|
animate: maxContentSizeReached
|
|
63
|
-
},
|
|
64
|
+
}, jsx("div", {
|
|
64
65
|
css: [chromelessEditor, maxHeight && css`
|
|
65
66
|
max-height: ${maxHeight}px;
|
|
66
67
|
`, css`
|
|
@@ -68,10 +69,10 @@ export default class Editor extends React.Component {
|
|
|
68
69
|
`],
|
|
69
70
|
"data-testid": "chromeless-editor",
|
|
70
71
|
ref: ref => this.containerElement = ref
|
|
71
|
-
},
|
|
72
|
+
}, jsx(ContentArea, {
|
|
72
73
|
className: "ak-editor-content-area",
|
|
73
74
|
featureFlags: featureFlags
|
|
74
|
-
}, customContentComponents,
|
|
75
|
+
}, customContentComponents, jsx(PluginSlot, {
|
|
75
76
|
editorView: editorView,
|
|
76
77
|
editorActions: editorActions,
|
|
77
78
|
eventDispatcher: eventDispatcher,
|
|
@@ -90,7 +91,7 @@ export default class Editor extends React.Component {
|
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
render() {
|
|
93
|
-
return
|
|
94
|
+
return jsx(RenderWithPluginState, {
|
|
94
95
|
renderChrome: this.renderChrome
|
|
95
96
|
});
|
|
96
97
|
}
|
|
@@ -103,7 +104,7 @@ function RenderWithPluginState({
|
|
|
103
104
|
const {
|
|
104
105
|
maxContentSizeState
|
|
105
106
|
} = useSharedPluginState(api, ['maxContentSize']);
|
|
106
|
-
return
|
|
107
|
+
return jsx(Fragment, null, renderChrome({
|
|
107
108
|
maxContentSize: maxContentSizeState
|
|
108
109
|
}));
|
|
109
110
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { Fragment } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
5
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -134,17 +135,17 @@ class Editor extends React.Component {
|
|
|
134
135
|
event.preventDefault();
|
|
135
136
|
event.stopPropagation();
|
|
136
137
|
};
|
|
137
|
-
return
|
|
138
|
+
return jsx(WithFlash, {
|
|
138
139
|
animate: maxContentSizeReached
|
|
139
|
-
},
|
|
140
|
+
}, jsx("div", {
|
|
140
141
|
css: [commentEditorStyle, css`
|
|
141
142
|
min-height: ${minHeight}px;
|
|
142
143
|
`],
|
|
143
144
|
className: "akEditor",
|
|
144
145
|
ref: this.wrapperElementRef
|
|
145
|
-
},
|
|
146
|
+
}, jsx(MainToolbar, {
|
|
146
147
|
useStickyToolbar: useStickyToolbar
|
|
147
|
-
},
|
|
148
|
+
}, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
148
149
|
editorView: editorView,
|
|
149
150
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
150
151
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -152,7 +153,7 @@ class Editor extends React.Component {
|
|
|
152
153
|
editorAppearance: this.appearance,
|
|
153
154
|
useStickyToolbar: useStickyToolbar,
|
|
154
155
|
intl: intl
|
|
155
|
-
},
|
|
156
|
+
}, jsx(Toolbar, {
|
|
156
157
|
editorView: editorView,
|
|
157
158
|
editorActions: editorActions,
|
|
158
159
|
eventDispatcher: eventDispatcher,
|
|
@@ -165,15 +166,15 @@ class Editor extends React.Component {
|
|
|
165
166
|
disabled: !!disabled,
|
|
166
167
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
167
168
|
containerElement: this.containerElement
|
|
168
|
-
}),
|
|
169
|
+
}), jsx("div", {
|
|
169
170
|
css: mainToolbarCustomComponentsSlotStyle
|
|
170
|
-
}, customPrimaryToolbarComponents))),
|
|
171
|
+
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
171
172
|
editorView: editorView,
|
|
172
173
|
editorDisabled: disabled
|
|
173
|
-
},
|
|
174
|
+
}, jsx(WidthConsumer, null, ({
|
|
174
175
|
width
|
|
175
176
|
}) => {
|
|
176
|
-
return
|
|
177
|
+
return jsx(ContentArea, {
|
|
177
178
|
ref: ref => this.containerElement = ref,
|
|
178
179
|
css: maxHeight ? css`
|
|
179
180
|
max-height: ${maxHeight}px;
|
|
@@ -182,7 +183,7 @@ class Editor extends React.Component {
|
|
|
182
183
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
183
184
|
}),
|
|
184
185
|
featureFlags: featureFlags
|
|
185
|
-
}, customContentComponents,
|
|
186
|
+
}, customContentComponents, jsx(PluginSlot, {
|
|
186
187
|
editorView: editorView,
|
|
187
188
|
editorActions: editorActions,
|
|
188
189
|
eventDispatcher: eventDispatcher,
|
|
@@ -198,19 +199,19 @@ class Editor extends React.Component {
|
|
|
198
199
|
wrapperElement: this.wrapperElementRef.current,
|
|
199
200
|
pluginHooks: pluginHooks
|
|
200
201
|
}), editorDOMElement);
|
|
201
|
-
}))), showSecondaryToolbar &&
|
|
202
|
+
}))), showSecondaryToolbar && jsx("div", {
|
|
202
203
|
css: secondaryToolbarStyle,
|
|
203
204
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
204
|
-
},
|
|
205
|
+
}, jsx(ButtonGroup, null, !!onSave && jsx(Button, {
|
|
205
206
|
appearance: "primary",
|
|
206
207
|
onClick: this.handleSave,
|
|
207
208
|
testId: "comment-save-button",
|
|
208
209
|
isDisabled: disabled || mediaState && !mediaState.allUploadsFinished
|
|
209
|
-
}, intl.formatMessage(messages.saveButton)), !!onCancel &&
|
|
210
|
+
}, intl.formatMessage(messages.saveButton)), !!onCancel && jsx(Button, {
|
|
210
211
|
appearance: "subtle",
|
|
211
212
|
onClick: this.handleCancel,
|
|
212
213
|
isDisabled: disabled
|
|
213
|
-
}, intl.formatMessage(messages.cancelButton))),
|
|
214
|
+
}, intl.formatMessage(messages.cancelButton))), jsx("span", {
|
|
214
215
|
style: {
|
|
215
216
|
flexGrow: 1
|
|
216
217
|
}
|
|
@@ -221,7 +222,7 @@ class Editor extends React.Component {
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
render() {
|
|
224
|
-
return
|
|
225
|
+
return jsx(RenderWithPluginState, {
|
|
225
226
|
renderChrome: this.renderChrome
|
|
226
227
|
});
|
|
227
228
|
}
|
|
@@ -235,7 +236,7 @@ function RenderWithPluginState({
|
|
|
235
236
|
mediaState,
|
|
236
237
|
maxContentSizeState
|
|
237
238
|
} = useSharedPluginState(api, ['media', 'maxContentSize']);
|
|
238
|
-
return
|
|
239
|
+
return jsx(Fragment, null, renderChrome({
|
|
239
240
|
maxContentSize: maxContentSizeState,
|
|
240
241
|
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
241
242
|
}));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
1
3
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
3
5
|
import { N30 } from '@atlaskit/theme/colors';
|
|
4
6
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
7
|
export const TableControlsPadding = 20;
|
|
@@ -51,7 +53,7 @@ const StickyToolbar = props => {
|
|
|
51
53
|
setTop(props.offsetTop || 0);
|
|
52
54
|
}
|
|
53
55
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
54
|
-
return
|
|
56
|
+
return jsx("div", {
|
|
55
57
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css`
|
|
56
58
|
top: ${top}px;
|
|
57
59
|
`],
|
|
@@ -59,7 +61,7 @@ const StickyToolbar = props => {
|
|
|
59
61
|
className: 'show-keyline'
|
|
60
62
|
}, props.children);
|
|
61
63
|
};
|
|
62
|
-
const FixedToolbar = props =>
|
|
64
|
+
const FixedToolbar = props => jsx("div", {
|
|
63
65
|
css: mainToolbarWrapperStyle,
|
|
64
66
|
"data-testid": "ak-editor-main-toolbar"
|
|
65
67
|
}, props.children);
|
|
@@ -96,9 +98,9 @@ export const MainToolbar = ({
|
|
|
96
98
|
children
|
|
97
99
|
}) => {
|
|
98
100
|
if (useStickyToolbar) {
|
|
99
|
-
return
|
|
101
|
+
return jsx(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
100
102
|
}
|
|
101
|
-
return
|
|
103
|
+
return jsx(FixedToolbar, null, children);
|
|
102
104
|
};
|
|
103
105
|
export const mainToolbarCustomComponentsSlotStyle = css`
|
|
104
106
|
display: flex;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { fullPageEditorWrapper } from './StyledComponents';
|
|
3
5
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
4
6
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
@@ -33,11 +35,11 @@ export const FullPageEditor = props => {
|
|
|
33
35
|
const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
|
|
34
36
|
const scrollContentContainerRef = useRef(null);
|
|
35
37
|
const showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
36
|
-
return
|
|
38
|
+
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
37
39
|
css: fullPageEditorWrapper,
|
|
38
40
|
className: "akEditor",
|
|
39
41
|
ref: wrapperElementRef
|
|
40
|
-
},
|
|
42
|
+
}, jsx(FullPageToolbar, {
|
|
41
43
|
appearance: props.appearance,
|
|
42
44
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
43
45
|
collabEdit: props.collabEdit,
|
|
@@ -58,7 +60,7 @@ export const FullPageEditor = props => {
|
|
|
58
60
|
showKeyline: showKeyline,
|
|
59
61
|
featureFlags: props.featureFlags,
|
|
60
62
|
hideAvatarGroup: props.hideAvatarGroup
|
|
61
|
-
}),
|
|
63
|
+
}), jsx(FullPageContentArea, {
|
|
62
64
|
ref: scrollContentContainerRef,
|
|
63
65
|
appearance: props.appearance,
|
|
64
66
|
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';
|
|
@@ -21,23 +22,23 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
21
22
|
return contentAreaRef.current;
|
|
22
23
|
}
|
|
23
24
|
}), []);
|
|
24
|
-
return
|
|
25
|
+
return jsx(WidthConsumer, null, ({
|
|
25
26
|
width
|
|
26
|
-
}) =>
|
|
27
|
+
}) => jsx(ContextPanelConsumer, null, ({
|
|
27
28
|
positionedOverEditor
|
|
28
29
|
}) => {
|
|
29
30
|
var _contentAreaRef$curre;
|
|
30
|
-
return
|
|
31
|
+
return jsx("div", {
|
|
31
32
|
css: [contentArea, positionedOverEditor && positionedOverEditorStyle],
|
|
32
33
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
33
|
-
},
|
|
34
|
+
}, jsx(ScrollContainer, {
|
|
34
35
|
className: "fabric-editor-popup-scroll-parent",
|
|
35
36
|
featureFlags: props.featureFlags,
|
|
36
37
|
ref: scrollContainerRef
|
|
37
|
-
},
|
|
38
|
+
}, jsx(ClickAreaBlock, {
|
|
38
39
|
editorView: props.editorView,
|
|
39
40
|
editorDisabled: props.disabled
|
|
40
|
-
},
|
|
41
|
+
}, jsx("div", {
|
|
41
42
|
css: editorContentAreaStyle({
|
|
42
43
|
fullWidthMode,
|
|
43
44
|
layoutMaxWidth: theme.layoutMaxWidth,
|
|
@@ -46,11 +47,11 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
46
47
|
role: "region",
|
|
47
48
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
48
49
|
ref: contentAreaRef
|
|
49
|
-
},
|
|
50
|
+
}, jsx("div", {
|
|
50
51
|
css: editorContentGutterStyle,
|
|
51
52
|
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
52
53
|
ref: contentAreaRef
|
|
53
|
-
}, props.customContentComponents,
|
|
54
|
+
}, props.customContentComponents, jsx(PluginSlot, {
|
|
54
55
|
editorView: props.editorView,
|
|
55
56
|
editorActions: props.editorActions,
|
|
56
57
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -66,9 +67,9 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
66
67
|
containerElement: scrollContainerRef.current,
|
|
67
68
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
68
69
|
wrapperElement: props.wrapperElement
|
|
69
|
-
}), props.editorDOMElement)))),
|
|
70
|
+
}), props.editorDOMElement)))), jsx("div", {
|
|
70
71
|
css: sidebarArea
|
|
71
|
-
}, props.contextPanel ||
|
|
72
|
+
}, props.contextPanel || jsx(ContextPanel, {
|
|
72
73
|
visible: false
|
|
73
74
|
})));
|
|
74
75
|
}));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
1
3
|
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
2
5
|
import { injectIntl } from 'react-intl-next';
|
|
3
6
|
import AvatarsWithPluginState from '../../../plugins/collab-edit/ui';
|
|
4
7
|
import FindReplaceToolbarButtonWithState from '../../../plugins/find-replace/FindReplaceToolbarButtonWithState';
|
|
@@ -16,11 +19,11 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
16
19
|
|
|
17
20
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
18
21
|
const twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
19
|
-
const nonCustomToolbar =
|
|
22
|
+
const nonCustomToolbar = jsx("div", {
|
|
20
23
|
css: nonCustomToolbarWrapperStyle
|
|
21
|
-
}, props.beforeIcon &&
|
|
24
|
+
}, props.beforeIcon && jsx("div", {
|
|
22
25
|
css: mainToolbarIconBeforeStyle
|
|
23
|
-
}, props.beforeIcon),
|
|
26
|
+
}, props.beforeIcon), jsx(Toolbar, {
|
|
24
27
|
editorView: props.editorView,
|
|
25
28
|
editorActions: props.editorActions,
|
|
26
29
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -36,17 +39,16 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
36
39
|
hasMinWidth: props.hasMinWidth,
|
|
37
40
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
38
41
|
}));
|
|
39
|
-
const customToolbar =
|
|
42
|
+
const customToolbar = jsx("div", {
|
|
40
43
|
css: customToolbarWrapperStyle
|
|
41
|
-
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ?
|
|
44
|
+
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
42
45
|
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
43
46
|
}) : null, props.hideAvatarGroup || (props === null || props === void 0 ? 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 :
|
|
44
|
-
/*#__PURE__*/
|
|
45
47
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
46
48
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
47
49
|
// For more details please check
|
|
48
50
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
49
|
-
|
|
51
|
+
jsx(AvatarsWithPluginState, {
|
|
50
52
|
editorView: props.editorView,
|
|
51
53
|
eventDispatcher: props.eventDispatcher,
|
|
52
54
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
@@ -54,7 +56,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
54
56
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected,
|
|
55
57
|
featureFlags: props.featureFlags || {},
|
|
56
58
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
57
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ?
|
|
59
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? jsx(FindReplaceToolbarButtonWithState, {
|
|
58
60
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
59
61
|
popupsMountPoint: props.popupsMountPoint,
|
|
60
62
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -91,22 +93,22 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
91
93
|
event.preventDefault();
|
|
92
94
|
event.stopPropagation();
|
|
93
95
|
};
|
|
94
|
-
return
|
|
96
|
+
return jsx(ContextPanelConsumer, null, ({
|
|
95
97
|
width: contextPanelWidth
|
|
96
|
-
}) =>
|
|
98
|
+
}) => jsx(ToolbarArrowKeyNavigationProvider, {
|
|
97
99
|
editorView: props.editorView,
|
|
98
100
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
99
101
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
100
102
|
handleEscape: handleEscape,
|
|
101
103
|
intl: props.intl
|
|
102
|
-
},
|
|
104
|
+
}, jsx("div", {
|
|
103
105
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
|
|
104
106
|
"data-testid": "ak-editor-main-toolbar"
|
|
105
|
-
},
|
|
107
|
+
}, jsx("div", {
|
|
106
108
|
css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
|
|
107
109
|
role: "toolbar",
|
|
108
110
|
"aria-label": props.intl.formatMessage(messages.toolbarLabel)
|
|
109
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
111
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
|
|
110
112
|
css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
|
|
111
113
|
"data-testid": 'avatar-group-outside-plugin',
|
|
112
114
|
role: "region",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useCallback, forwardRef } from 'react';
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import WithFlash from '../WithFlash';
|
|
4
5
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
5
6
|
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
@@ -69,20 +70,20 @@ export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearanc
|
|
|
69
70
|
currentIsExpanded = isExpanded;
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
return
|
|
73
|
+
return jsx(WithFlash, {
|
|
73
74
|
animate: maxContentSizeReached
|
|
74
|
-
},
|
|
75
|
+
}, jsx("div", {
|
|
75
76
|
css: mobileEditor,
|
|
76
77
|
ref: ref
|
|
77
|
-
},
|
|
78
|
+
}, jsx(ClickArea, {
|
|
78
79
|
editorView: editorView || undefined,
|
|
79
80
|
minHeight: minHeight,
|
|
80
81
|
persistScrollGutter: persistScrollGutter,
|
|
81
82
|
isExpanded: currentIsExpanded,
|
|
82
83
|
editorDisabled: editorDisabled
|
|
83
|
-
},
|
|
84
|
+
}, jsx(ContentArea, {
|
|
84
85
|
featureFlags: featureFlags
|
|
85
|
-
},
|
|
86
|
+
}, jsx("div", {
|
|
86
87
|
className: "ak-editor-content-area"
|
|
87
88
|
}, children)))));
|
|
88
89
|
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags, api === null || api === void 0 ? void 0 : (_api$base2 = api.base) === null || _api$base2 === void 0 ? void 0 : _api$base2.sharedState]);
|