@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
|
@@ -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 { injectIntl } from 'react-intl-next';
|
|
4
5
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
5
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -35,17 +36,17 @@ const RemovableField = ({
|
|
|
35
36
|
var _children$props$field;
|
|
36
37
|
const onClickCallback = React.useCallback(() => onClickRemove && onClickRemove(name), [name, onClickRemove]);
|
|
37
38
|
const hasMarginBottom = ((_children$props$field = children.props.field) === null || _children$props$field === void 0 ? void 0 : _children$props$field.type) !== 'expand';
|
|
38
|
-
return
|
|
39
|
+
return jsx("div", {
|
|
39
40
|
css: [removableFieldWrapper, hasMarginBottom && wrapperWithMarginBottom],
|
|
40
41
|
className: className
|
|
41
|
-
}, children, canRemoveField &&
|
|
42
|
+
}, children, canRemoveField && jsx("div", {
|
|
42
43
|
css: removeButtonWrapper,
|
|
43
44
|
"data-testid": `remove-field-${name}`,
|
|
44
45
|
onClick: onClickCallback
|
|
45
|
-
},
|
|
46
|
+
}, jsx(Tooltip, {
|
|
46
47
|
content: intl.formatMessage(messages.removeField),
|
|
47
48
|
position: "left"
|
|
48
|
-
},
|
|
49
|
+
}, jsx(CrossCircleIcon, {
|
|
49
50
|
size: "small",
|
|
50
51
|
label: intl.formatMessage(messages.removeField)
|
|
51
52
|
}))));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { css, useTheme } from '@emotion/react';
|
|
3
|
+
import { jsx, css, useTheme } from '@emotion/react';
|
|
3
4
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
4
5
|
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
@@ -269,7 +270,7 @@ export const createEditorContentStyle = styles => {
|
|
|
269
270
|
theme,
|
|
270
271
|
featureFlags
|
|
271
272
|
}), [theme, featureFlags]);
|
|
272
|
-
return
|
|
273
|
+
return jsx("div", {
|
|
273
274
|
className: className,
|
|
274
275
|
ref: ref,
|
|
275
276
|
css: [memoizedStyle, styles]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useContext } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Transition from 'react-transition-group/Transition';
|
|
6
7
|
import { N30 } from '@atlaskit/theme/colors';
|
|
7
8
|
import { akEditorSwoopCubicBezier, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorBreakoutPadding, akEditorContextPanelWidth, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
@@ -91,7 +92,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
91
92
|
if (!currentPluginContent) {
|
|
92
93
|
return;
|
|
93
94
|
}
|
|
94
|
-
return
|
|
95
|
+
return jsx(Transition, {
|
|
95
96
|
timeout: this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
96
97
|
in: !!pluginContent,
|
|
97
98
|
mountOnEnter: true,
|
|
@@ -106,7 +107,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
106
107
|
if (!children) {
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
109
|
-
return
|
|
110
|
+
return jsx(Transition, {
|
|
110
111
|
timeout: this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
111
112
|
in: isVisible,
|
|
112
113
|
mountOnEnter: true,
|
|
@@ -143,7 +144,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
143
144
|
const width = akEditorContextPanelWidth;
|
|
144
145
|
const userVisible = !!this.props.visible;
|
|
145
146
|
const visible = userVisible || !!this.state.currentPluginContent;
|
|
146
|
-
return
|
|
147
|
+
return jsx(ContextPanelConsumer, null, ({
|
|
147
148
|
broadcastWidth,
|
|
148
149
|
broadcastPosition,
|
|
149
150
|
positionedOverEditor
|
|
@@ -152,7 +153,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
152
153
|
const newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
|
|
153
154
|
broadcastWidth(contextPanelWidth);
|
|
154
155
|
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
155
|
-
return
|
|
156
|
+
return jsx("div", {
|
|
156
157
|
css: [panel, !visible && panelHidden,
|
|
157
158
|
/**
|
|
158
159
|
* Only use absolute position for panel when screen size is wide enough
|
|
@@ -162,7 +163,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
162
163
|
"data-testid": "context-panel-panel",
|
|
163
164
|
"aria-labelledby": "context-panel-title",
|
|
164
165
|
role: "dialog"
|
|
165
|
-
},
|
|
166
|
+
}, jsx("div", {
|
|
166
167
|
"data-testid": "context-panel-content",
|
|
167
168
|
css: [content, !visible && panelHidden]
|
|
168
169
|
}, this.showPluginContent() || this.showProvidedContent(userVisible)));
|
|
@@ -200,11 +201,11 @@ function ContextPanelWithActions({
|
|
|
200
201
|
width
|
|
201
202
|
} = useContext(WidthContext);
|
|
202
203
|
if (!eventDispatcher) {
|
|
203
|
-
return
|
|
204
|
+
return jsx(SwappableContentArea, _extends({
|
|
204
205
|
editorView: editorView
|
|
205
206
|
}, props));
|
|
206
207
|
}
|
|
207
|
-
return
|
|
208
|
+
return jsx(WithPluginState, {
|
|
208
209
|
eventDispatcher: eventDispatcher,
|
|
209
210
|
plugins: {
|
|
210
211
|
contextPanel: contextPanelPluginKey,
|
|
@@ -220,7 +221,7 @@ function ContextPanelWithActions({
|
|
|
220
221
|
containerWidth: width,
|
|
221
222
|
contentBreakoutModes: editorView ? getChildBreakoutModes(editorView.state.doc, editorView.state.schema) : []
|
|
222
223
|
};
|
|
223
|
-
return
|
|
224
|
+
return jsx(SwappableContentArea, _extends({}, props, {
|
|
224
225
|
editorView: editorView,
|
|
225
226
|
pluginContent: firstContent,
|
|
226
227
|
editorWidth: editorWidth
|
|
@@ -229,8 +230,8 @@ function ContextPanelWithActions({
|
|
|
229
230
|
});
|
|
230
231
|
}
|
|
231
232
|
export default function ContextPanel(props) {
|
|
232
|
-
return
|
|
233
|
-
render: actions =>
|
|
233
|
+
return jsx(WithEditorActions, {
|
|
234
|
+
render: actions => jsx(ContextPanelWithActions, _extends({
|
|
234
235
|
actions: actions
|
|
235
236
|
}, props))
|
|
236
237
|
});
|
|
@@ -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 { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
import { whichTransitionEvent } from '../../utils';
|
|
6
7
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
@@ -82,14 +83,14 @@ export default class PluginSlot extends React.Component {
|
|
|
82
83
|
if (!items && !pluginHooks || !editorView) {
|
|
83
84
|
return null;
|
|
84
85
|
}
|
|
85
|
-
return
|
|
86
|
+
return jsx(ErrorBoundary, {
|
|
86
87
|
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
87
88
|
fallbackComponent: null
|
|
88
|
-
},
|
|
89
|
+
}, jsx(MountPluginHooks, {
|
|
89
90
|
editorView: editorView,
|
|
90
91
|
pluginHooks: pluginHooks,
|
|
91
92
|
containerElement: containerElement
|
|
92
|
-
}),
|
|
93
|
+
}), jsx("div", {
|
|
93
94
|
css: pluginsComponentsWrapper
|
|
94
95
|
}, items === null || items === void 0 ? void 0 : items.map((component, key) => {
|
|
95
96
|
const props = {
|
|
@@ -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 { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
4
5
|
const toolbarComponentsWrapper = css`
|
|
5
6
|
display: flex;
|
|
@@ -32,7 +33,7 @@ export class ToolbarInner extends React.Component {
|
|
|
32
33
|
if (!items || !items.length) {
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
|
-
return
|
|
36
|
+
return jsx("div", {
|
|
36
37
|
css: toolbarComponentsWrapper
|
|
37
38
|
}, items.map((component, key) => {
|
|
38
39
|
const props = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React, { useMemo } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
5
6
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
6
7
|
import { useElementWidth } from './hooks';
|
|
@@ -31,13 +32,13 @@ export const ToolbarWithSizeDetector = props => {
|
|
|
31
32
|
const minWidth = `min-width: ${props.hasMinWidth ? toolbarMinWidth : '254'}px`;
|
|
32
33
|
return [toolbar, minWidth];
|
|
33
34
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
34
|
-
return
|
|
35
|
+
return jsx("div", {
|
|
35
36
|
css: toolbarStyle
|
|
36
|
-
},
|
|
37
|
+
}, jsx(WidthObserver, {
|
|
37
38
|
setWidth: setWidth
|
|
38
|
-
}), props.editorView && toolbarSize ?
|
|
39
|
+
}), props.editorView && toolbarSize ? jsx(Toolbar, _extends({}, props, {
|
|
39
40
|
toolbarSize: toolbarSize
|
|
40
|
-
})) :
|
|
41
|
+
})) : jsx("div", {
|
|
41
42
|
ref: ref
|
|
42
43
|
}));
|
|
43
44
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import ReactDOM from 'react-dom';
|
|
4
6
|
import { PureComponent } from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
@@ -116,20 +118,20 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
116
118
|
popupsBoundariesElement,
|
|
117
119
|
popupsScrollableElement
|
|
118
120
|
} = this.props;
|
|
119
|
-
const iconBefore = this.state.jiraIssueCollectorScriptLoading ?
|
|
121
|
+
const iconBefore = this.state.jiraIssueCollectorScriptLoading ? jsx(Spinner, null) : undefined;
|
|
120
122
|
|
|
121
123
|
// JIRA issue collector script is using jQuery internally
|
|
122
|
-
return this.hasJquery() ?
|
|
124
|
+
return this.hasJquery() ? jsx("div", {
|
|
123
125
|
css: wrapper
|
|
124
|
-
},
|
|
126
|
+
}, jsx(ToolbarButton, {
|
|
125
127
|
ref: this.handleRef,
|
|
126
128
|
iconBefore: iconBefore,
|
|
127
129
|
onClick: this.collectFeedback,
|
|
128
130
|
selected: false,
|
|
129
131
|
spacing: "compact"
|
|
130
|
-
},
|
|
132
|
+
}, jsx("span", {
|
|
131
133
|
css: buttonContent
|
|
132
|
-
}, "Feedback")), this.state.showOptOutOption &&
|
|
134
|
+
}, "Feedback")), this.state.showOptOutOption && jsx(PopupWithOutsideListeners, {
|
|
133
135
|
target: this.state.target,
|
|
134
136
|
mountTo: popupsMountPoint,
|
|
135
137
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -138,19 +140,19 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
138
140
|
fitWidth: POPUP_WIDTH,
|
|
139
141
|
handleClickOutside: this.toggleShowOptOutOption,
|
|
140
142
|
handleEscapeKeydown: this.toggleShowOptOutOption
|
|
141
|
-
},
|
|
143
|
+
}, jsx("div", {
|
|
142
144
|
css: confirmationPopup
|
|
143
|
-
},
|
|
145
|
+
}, jsx("div", {
|
|
144
146
|
css: confirmationHeader
|
|
145
|
-
},
|
|
147
|
+
}, jsx("img", {
|
|
146
148
|
css: confirmationImg,
|
|
147
149
|
src: EDITOR_IMAGE_URL
|
|
148
|
-
})),
|
|
150
|
+
})), jsx("div", {
|
|
149
151
|
css: confirmationText
|
|
150
|
-
},
|
|
152
|
+
}, jsx("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), jsx("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), jsx(ButtonGroup, null, jsx(Button, {
|
|
151
153
|
appearance: "primary",
|
|
152
154
|
onClick: this.openFeedbackPopup
|
|
153
|
-
}, "Give feedback"),
|
|
155
|
+
}, "Give feedback"), jsx(Button, {
|
|
154
156
|
appearance: "default",
|
|
155
157
|
onClick: this.openLearnMorePage
|
|
156
158
|
}, "Learn more")))))) : null;
|
|
@@ -161,7 +163,7 @@ _defineProperty(ToolbarFeedbackInternal, "contextTypes", {
|
|
|
161
163
|
});
|
|
162
164
|
export default function ToolbarFeedback(props) {
|
|
163
165
|
const api = usePresetContext();
|
|
164
|
-
return
|
|
166
|
+
return jsx(ToolbarFeedbackInternal, _extends({
|
|
165
167
|
api: api
|
|
166
168
|
}, props));
|
|
167
169
|
}
|
|
@@ -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, keyframes } from '@emotion/react';
|
|
4
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
4
5
|
import { R100 } from '@atlaskit/theme/colors';
|
|
5
6
|
const pulseBackground = keyframes`
|
|
6
7
|
50% {
|
|
@@ -45,7 +46,7 @@ export default class WithFlash extends React.Component {
|
|
|
45
46
|
children
|
|
46
47
|
} = this.props;
|
|
47
48
|
this.toggle = animate && !this.toggle;
|
|
48
|
-
return
|
|
49
|
+
return jsx("div", {
|
|
49
50
|
css: animate ? flashWrapperAnimated : flashWrapper,
|
|
50
51
|
className: this.toggle ? '-flash' : ''
|
|
51
52
|
}, children);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.5.
|
|
2
|
+
export const version = "189.5.3";
|
|
@@ -2,8 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
/** @jsx jsx */
|
|
5
6
|
import { memo, Fragment, useCallback } from 'react';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
8
9
|
import { PortalProviderWithThemeProviders, PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
9
10
|
import { BaseTheme, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -46,29 +47,29 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
46
47
|
// it will still be enabled as it currently is. Then we can
|
|
47
48
|
// progressively opt out synthetic tenants.
|
|
48
49
|
var isErrorTrackingExplicitlyDisabled = ((_props$performanceTra2 = props.performanceTracking) === null || _props$performanceTra2 === void 0 || (_props$performanceTra2 = _props$performanceTra2.errorTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled) === false;
|
|
49
|
-
return
|
|
50
|
+
return jsx(Fragment, null, renderTrackingEnabled && jsx(RenderTracking, {
|
|
50
51
|
componentProps: props,
|
|
51
52
|
action: ACTION.RE_RENDERED,
|
|
52
53
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
53
54
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
54
55
|
propsToIgnore: ['defaultValue'],
|
|
55
56
|
useShallow: useShallow
|
|
56
|
-
}),
|
|
57
|
+
}), jsx(ErrorBoundary, {
|
|
57
58
|
errorTracking: !isErrorTrackingExplicitlyDisabled,
|
|
58
59
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
59
60
|
contextIdentifierProvider: props.contextIdentifierProvider,
|
|
60
61
|
featureFlags: featureFlags
|
|
61
|
-
},
|
|
62
|
+
}, jsx(WidthProvider, {
|
|
62
63
|
css: css({
|
|
63
64
|
height: '100%'
|
|
64
65
|
})
|
|
65
|
-
},
|
|
66
|
+
}, jsx(EditorContext, {
|
|
66
67
|
editorActions: editorActions
|
|
67
|
-
},
|
|
68
|
+
}, jsx(ContextAdapter, null, jsx(PortalProviderWithThemeProviders, {
|
|
68
69
|
onAnalyticsEvent: handleAnalyticsEvent,
|
|
69
70
|
useAnalyticsContext: props.UNSAFE_useAnalyticsContext,
|
|
70
71
|
render: function render(portalProviderAPI) {
|
|
71
|
-
return
|
|
72
|
+
return jsx(Fragment, null, jsx(ReactEditorViewContextWrapper, {
|
|
72
73
|
editorProps: overriddenEditorProps,
|
|
73
74
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
74
75
|
portalProviderAPI: portalProviderAPI,
|
|
@@ -86,9 +87,9 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
86
87
|
config = _ref2.config,
|
|
87
88
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
88
89
|
editorRef = _ref2.editorRef;
|
|
89
|
-
return
|
|
90
|
+
return jsx(BaseTheme, {
|
|
90
91
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
91
|
-
},
|
|
92
|
+
}, jsx(Component, {
|
|
92
93
|
innerRef: editorRef,
|
|
93
94
|
appearance: props.appearance,
|
|
94
95
|
disabled: props.disabled,
|
|
@@ -122,7 +123,7 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
122
123
|
hideAvatarGroup: props.hideAvatarGroup
|
|
123
124
|
}));
|
|
124
125
|
}
|
|
125
|
-
}),
|
|
126
|
+
}), jsx(PortalRenderer, {
|
|
126
127
|
portalProviderAPI: portalProviderAPI
|
|
127
128
|
}));
|
|
128
129
|
}
|
|
@@ -144,7 +145,7 @@ function ReactEditorViewContextWrapper(props) {
|
|
|
144
145
|
setInternalEditorAPI === null || setInternalEditorAPI === void 0 || setInternalEditorAPI(api);
|
|
145
146
|
setExternalEditorAPI === null || setExternalEditorAPI === void 0 || setExternalEditorAPI(api);
|
|
146
147
|
}, [setInternalEditorAPI, setExternalEditorAPI]);
|
|
147
|
-
return
|
|
148
|
+
return jsx(ReactEditorView, _extends({}, props, {
|
|
148
149
|
setEditorApi: setEditorAPI
|
|
149
150
|
}));
|
|
150
151
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import { useRef, useCallback, useMemo } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import uuid from 'uuid/v4';
|
|
6
8
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
7
9
|
import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -75,7 +77,7 @@ function Editor(passedProps) {
|
|
|
75
77
|
};
|
|
76
78
|
useMeasureEditorMountTime(props, getExperienceStore, createAnalyticsEvent);
|
|
77
79
|
var providerFactory = useProviderFactory(props, editorActions.current, createAnalyticsEvent);
|
|
78
|
-
return
|
|
80
|
+
return jsx(EditorInternal, {
|
|
79
81
|
props: props,
|
|
80
82
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
81
83
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -264,7 +266,7 @@ function EditorButBetter(passedProps) {
|
|
|
264
266
|
onSaveFromProps(view);
|
|
265
267
|
}
|
|
266
268
|
}, [onSaveFromProps]);
|
|
267
|
-
return
|
|
269
|
+
return jsx(EditorInternal, {
|
|
268
270
|
props: props,
|
|
269
271
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
270
272
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -288,17 +290,17 @@ export function ComposableEditor(props) {
|
|
|
288
290
|
};
|
|
289
291
|
}, [props.appearance]);
|
|
290
292
|
if (getBooleanFF('platform.editor.less-editor-props-rerendering')) {
|
|
291
|
-
return
|
|
293
|
+
return jsx(FabricEditorAnalyticsContext
|
|
292
294
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
293
295
|
, {
|
|
294
296
|
data: data
|
|
295
|
-
},
|
|
297
|
+
}, jsx(EditorButBetter, props));
|
|
296
298
|
}
|
|
297
|
-
return
|
|
299
|
+
return jsx(FabricEditorAnalyticsContext
|
|
298
300
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
299
301
|
, {
|
|
300
302
|
data: data
|
|
301
|
-
},
|
|
303
|
+
}, jsx(Editor, props));
|
|
302
304
|
}
|
|
303
305
|
ComposableEditor.propTypes = {
|
|
304
306
|
minHeight: function minHeight(_ref) {
|
package/dist/esm/editor.js
CHANGED
|
@@ -7,7 +7,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
import _extends from "@babel/runtime/helpers/extends";
|
|
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 editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
12
14
|
import { ComposableEditor } from './composable-editor';
|
|
13
15
|
import useUniversalPreset from './presets/useUniversalPreset';
|
|
@@ -16,7 +18,7 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
16
18
|
var preset = useUniversalPreset({
|
|
17
19
|
props: props
|
|
18
20
|
});
|
|
19
|
-
return
|
|
21
|
+
return jsx(ComposableEditor, _extends({
|
|
20
22
|
preset: preset
|
|
21
23
|
}, props));
|
|
22
24
|
};
|
|
@@ -33,7 +35,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
33
35
|
_createClass(Editor, [{
|
|
34
36
|
key: "render",
|
|
35
37
|
value: function render() {
|
|
36
|
-
return
|
|
38
|
+
return jsx(ComposableEditorWrapper, {
|
|
37
39
|
props: this.props
|
|
38
40
|
});
|
|
39
41
|
}
|
|
@@ -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 { injectIntl } from 'react-intl-next';
|
|
12
14
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
13
15
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
@@ -82,9 +84,9 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
82
84
|
disabled = _this$props.disabled,
|
|
83
85
|
intl = _this$props.intl;
|
|
84
86
|
var title = intl.formatMessage(messages.alignment);
|
|
85
|
-
return
|
|
87
|
+
return jsx("span", {
|
|
86
88
|
css: wrapper
|
|
87
|
-
},
|
|
89
|
+
}, jsx(Dropdown, {
|
|
88
90
|
mountTo: popupsMountPoint,
|
|
89
91
|
boundariesElement: popupsBoundariesElement,
|
|
90
92
|
scrollableElement: popupsScrollableElement,
|
|
@@ -110,7 +112,7 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
110
112
|
fitWidth: 112,
|
|
111
113
|
fitHeight: 80,
|
|
112
114
|
closeOnTab: true,
|
|
113
|
-
trigger:
|
|
115
|
+
trigger: jsx(ToolbarButton, {
|
|
114
116
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
115
117
|
disabled: disabled,
|
|
116
118
|
selected: isOpen,
|
|
@@ -121,23 +123,23 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
121
123
|
"aria-haspopup": true,
|
|
122
124
|
onClick: this.toggleOpen,
|
|
123
125
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
124
|
-
iconBefore:
|
|
126
|
+
iconBefore: jsx("div", {
|
|
125
127
|
css: triggerWrapper
|
|
126
|
-
},
|
|
128
|
+
}, jsx(IconMap, {
|
|
127
129
|
alignment: pluginState.align
|
|
128
|
-
}),
|
|
130
|
+
}), jsx("span", {
|
|
129
131
|
css: expandIconWrapper
|
|
130
|
-
},
|
|
132
|
+
}, jsx(ExpandIcon, {
|
|
131
133
|
label: ""
|
|
132
134
|
}))),
|
|
133
135
|
ref: this.toolbarItemRef
|
|
134
136
|
})
|
|
135
|
-
},
|
|
137
|
+
}, jsx(Alignment, {
|
|
136
138
|
onClick: function onClick(align) {
|
|
137
139
|
return _this2.changeAlignment(align, false);
|
|
138
140
|
},
|
|
139
141
|
selectedAlignment: pluginState.align
|
|
140
|
-
})),
|
|
142
|
+
})), jsx("span", {
|
|
141
143
|
css: separatorStyles
|
|
142
144
|
}));
|
|
143
145
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import { useEffect } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import AvatarsWithPluginState from '../../collab-edit/ui/avatars-with-plugin-state';
|
|
6
7
|
import { useIntl } from 'react-intl-next';
|
|
7
8
|
import { avatarGroupMessages } from '../messages';
|
|
@@ -23,11 +24,11 @@ var AvatarGroupPluginWrapper = function AvatarGroupPluginWrapper(props) {
|
|
|
23
24
|
eventType: EVENT_TYPE.UI
|
|
24
25
|
});
|
|
25
26
|
}, [dispatchAnalyticsEvent]);
|
|
26
|
-
return
|
|
27
|
+
return jsx("div", {
|
|
27
28
|
"aria-label": intl.formatMessage(avatarGroupMessages.editors),
|
|
28
29
|
"data-testid": 'avatar-group-in-plugin',
|
|
29
30
|
css: props.takeFullWidth ? toolbarButtonWrapperFullWidth : toolbarButtonWrapper
|
|
30
|
-
},
|
|
31
|
+
}, jsx(AvatarsWithPluginState, {
|
|
31
32
|
editorView: props.editorView,
|
|
32
33
|
eventDispatcher: props.eventDispatcher,
|
|
33
34
|
inviteToEditComponent: props.collabEdit && props.collabEdit.inviteToEditComponent,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
var beforePrimaryToolbarPluginWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-right: 8px;\n flex-grow: 1;\n justify-content: flex-end;\n align-items: center;\n"])));
|
|
5
6
|
export var BeforePrimaryToolbarWrapper = function BeforePrimaryToolbarWrapper(props) {
|
|
6
|
-
return
|
|
7
|
+
return jsx("div", {
|
|
7
8
|
css: beforePrimaryToolbarPluginWrapper,
|
|
8
9
|
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
9
10
|
}, props.beforePrimaryToolbarComponents);
|
|
@@ -9,8 +9,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject;
|
|
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 from 'react';
|
|
13
|
-
import { css } from '@emotion/react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
14
15
|
import { B300, N300, N20A } from '@atlaskit/theme/colors';
|
|
15
16
|
import { injectIntl } from 'react-intl-next';
|
|
16
17
|
import { findParentDomRefOfType, findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -93,7 +94,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
93
94
|
if (closestEl && closestEl.firstChild) {
|
|
94
95
|
element = closestEl.firstChild;
|
|
95
96
|
}
|
|
96
|
-
return
|
|
97
|
+
return jsx(Popup, {
|
|
97
98
|
ariaLabel: title,
|
|
98
99
|
target: element,
|
|
99
100
|
offset: [5, 0],
|
|
@@ -105,15 +106,15 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
105
106
|
stick: true,
|
|
106
107
|
forcePlacement: true,
|
|
107
108
|
zIndex: belowOtherPopupsZIndex
|
|
108
|
-
},
|
|
109
|
+
}, jsx("div", {
|
|
109
110
|
css: toolbarButtonWrapper
|
|
110
|
-
},
|
|
111
|
+
}, jsx(ToolbarButton, {
|
|
111
112
|
title: title,
|
|
112
113
|
testId: titleMessage.id,
|
|
113
114
|
onClick: this.handleClick(nextBreakoutMode),
|
|
114
|
-
iconBefore: breakoutMode === 'full-width' ?
|
|
115
|
+
iconBefore: breakoutMode === 'full-width' ? jsx(CollapseIcon, {
|
|
115
116
|
label: title
|
|
116
|
-
}) :
|
|
117
|
+
}) : jsx(ExpandIcon, {
|
|
117
118
|
label: title
|
|
118
119
|
})
|
|
119
120
|
})));
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
3
5
|
import { avatarContainer } from './styles';
|
|
4
6
|
import toAvatar from './to-avatar';
|
|
@@ -14,9 +16,9 @@ export var Avatars = /*#__PURE__*/React.memo(function (props) {
|
|
|
14
16
|
if (!avatars.length) {
|
|
15
17
|
return null;
|
|
16
18
|
}
|
|
17
|
-
return
|
|
19
|
+
return jsx("div", {
|
|
18
20
|
css: avatarContainer
|
|
19
|
-
},
|
|
21
|
+
}, jsx(AvatarGroup, {
|
|
20
22
|
appearance: "stack",
|
|
21
23
|
size: "medium",
|
|
22
24
|
data: avatars,
|