@atlaskit/editor-core 189.5.0 → 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 +14 -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/paste/edge-cases/index.js +26 -0
- package/dist/cjs/plugins/paste/handlers.js +18 -9
- 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/paste/edge-cases/index.js +27 -1
- package/dist/es2019/plugins/paste/handlers.js +19 -10
- 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/paste/edge-cases/index.js +26 -1
- package/dist/esm/plugins/paste/handlers.js +19 -10
- 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/dist/types/plugins/paste/edge-cases/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/paste/edge-cases/index.d.ts +4 -0
- package/package.json +8 -4
|
@@ -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,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { getAvatarColor } from '../utils';
|
|
2
4
|
import { badge } from './styles';
|
|
3
5
|
export var ColoredAvatarItem = function ColoredAvatarItem(props) {
|
|
4
6
|
var color = getAvatarColor(props.sessionId).color.solid;
|
|
5
7
|
var avatar = props.name.substr(0, 1).toUpperCase();
|
|
6
|
-
return
|
|
8
|
+
return jsx("div", {
|
|
7
9
|
css: badge(color),
|
|
8
10
|
"data-testid": "editor-collab-badge"
|
|
9
11
|
}, avatar);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React, { Fragment } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import InviteTeamIcon from '@atlaskit/icon/glyph/editor/add';
|
|
3
5
|
import ToolbarButton from '../../../ui/ToolbarButton';
|
|
4
6
|
import { inviteTeamWrapper } from './styles';
|
|
5
7
|
var ID = function ID(props) {
|
|
6
|
-
return
|
|
8
|
+
return jsx(Fragment, null, props.children);
|
|
7
9
|
};
|
|
8
10
|
export var InviteToEditButton = function InviteToEditButton(props) {
|
|
9
11
|
var Component = props.Component,
|
|
@@ -11,7 +13,7 @@ export var InviteToEditButton = function InviteToEditButton(props) {
|
|
|
11
13
|
selected = props.selected,
|
|
12
14
|
title = props.title;
|
|
13
15
|
var iconBefore = React.useMemo(function () {
|
|
14
|
-
return
|
|
16
|
+
return jsx(InviteTeamIcon, {
|
|
15
17
|
label: title
|
|
16
18
|
});
|
|
17
19
|
}, [title]);
|
|
@@ -19,9 +21,9 @@ export var InviteToEditButton = function InviteToEditButton(props) {
|
|
|
19
21
|
return null;
|
|
20
22
|
}
|
|
21
23
|
var Wrapper = Component ? Component : ID;
|
|
22
|
-
return
|
|
24
|
+
return jsx("div", {
|
|
23
25
|
css: inviteTeamWrapper
|
|
24
|
-
},
|
|
26
|
+
}, jsx(Wrapper, null, jsx(ToolbarButton, {
|
|
25
27
|
className: "invite-to-edit",
|
|
26
28
|
onClick: onClick,
|
|
27
29
|
selected: selected,
|
|
@@ -4,7 +4,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
var _excluded = ["type"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
|
|
7
9
|
import React from 'react';
|
|
10
|
+
import { jsx } from '@emotion/react';
|
|
8
11
|
import { overflowShadow } from '@atlaskit/editor-common/ui';
|
|
9
12
|
import { calculateBreakoutStyles } from '@atlaskit/editor-common/utils';
|
|
10
13
|
import { wrapperStyle, header, content, contentWrapper, widerLayoutClassName } from './styles';
|
|
@@ -66,26 +69,26 @@ function ExtensionWithPluginState(props) {
|
|
|
66
69
|
customContainerStyles = breakoutStyles;
|
|
67
70
|
}
|
|
68
71
|
newContentStyles = _objectSpread(_objectSpread({}, newContentStyles), contentWrapper);
|
|
69
|
-
return
|
|
72
|
+
return jsx("div", {
|
|
70
73
|
ref: handleRef,
|
|
71
74
|
"data-layout": node.attrs.layout,
|
|
72
75
|
className: classNames,
|
|
73
76
|
css: wrapperStyle,
|
|
74
77
|
style: customContainerStyles
|
|
75
|
-
},
|
|
78
|
+
}, jsx("div", {
|
|
76
79
|
className: "extension-overflow-wrapper ".concat(hasBody ? 'with-body' : '')
|
|
77
|
-
},
|
|
80
|
+
}, jsx("div", {
|
|
78
81
|
css: overlay,
|
|
79
82
|
className: "extension-overlay"
|
|
80
|
-
}),
|
|
83
|
+
}), jsx("div", {
|
|
81
84
|
css: header,
|
|
82
85
|
contentEditable: false,
|
|
83
86
|
className: headerClassNames
|
|
84
|
-
}, !removeBorder &&
|
|
87
|
+
}, !removeBorder && jsx(ExtensionLozenge, {
|
|
85
88
|
node: node
|
|
86
|
-
}), children), hasBody &&
|
|
89
|
+
}), children), hasBody && jsx("div", {
|
|
87
90
|
css: newContentStyles
|
|
88
|
-
},
|
|
91
|
+
}, jsx("div", {
|
|
89
92
|
css: content,
|
|
90
93
|
ref: handleContentDOMRef,
|
|
91
94
|
className: "extension-content block"
|
|
@@ -97,13 +100,13 @@ var Extension = function Extension(props) {
|
|
|
97
100
|
// which cannot access the `pluginInjectionApi`. When we move
|
|
98
101
|
// Confluence to using presets we can remove this workaround.
|
|
99
102
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
100
|
-
return pluginInjectionApi === undefined ?
|
|
103
|
+
return pluginInjectionApi === undefined ? jsx(ExtensionDeprecated, props) : jsx(ExtensionWithSharedState, props);
|
|
101
104
|
};
|
|
102
105
|
var ExtensionWithSharedState = function ExtensionWithSharedState(props) {
|
|
103
106
|
var pluginInjectionApi = props.pluginInjectionApi;
|
|
104
107
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
105
108
|
widthState = _useSharedPluginState.widthState;
|
|
106
|
-
return
|
|
109
|
+
return jsx(ExtensionWithPluginState, _extends({
|
|
107
110
|
widthState: widthState
|
|
108
111
|
}, props));
|
|
109
112
|
};
|
|
@@ -120,14 +123,14 @@ var widthPluginKey = {
|
|
|
120
123
|
}
|
|
121
124
|
};
|
|
122
125
|
var ExtensionDeprecated = function ExtensionDeprecated(props) {
|
|
123
|
-
return
|
|
126
|
+
return jsx(WithPluginState, {
|
|
124
127
|
editorView: props.view,
|
|
125
128
|
plugins: {
|
|
126
129
|
widthState: widthPluginKey
|
|
127
130
|
},
|
|
128
131
|
render: function render(_ref) {
|
|
129
132
|
var widthState = _ref.widthState;
|
|
130
|
-
return
|
|
133
|
+
return jsx(ExtensionWithPluginState, _extends({
|
|
131
134
|
widthState: widthState
|
|
132
135
|
}, props));
|
|
133
136
|
}
|
|
@@ -5,7 +5,9 @@ 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 */
|
|
8
9
|
import React from 'react';
|
|
10
|
+
import { jsx } from '@emotion/react';
|
|
9
11
|
import { Component } from 'react';
|
|
10
12
|
import { overlay } from '../styles';
|
|
11
13
|
import ExtensionLozenge from '../Lozenge';
|
|
@@ -25,13 +27,13 @@ var InlineExtension = /*#__PURE__*/function (_Component) {
|
|
|
25
27
|
children = _this$props.children;
|
|
26
28
|
var hasChildren = !!children;
|
|
27
29
|
var className = hasChildren ? 'with-overlay with-children' : 'with-overlay';
|
|
28
|
-
return
|
|
30
|
+
return jsx("div", {
|
|
29
31
|
css: wrapperStyle,
|
|
30
32
|
className: "extension-container inline ".concat(className)
|
|
31
|
-
},
|
|
33
|
+
}, jsx("div", {
|
|
32
34
|
css: overlay,
|
|
33
35
|
className: "extension-overlay"
|
|
34
|
-
}), children ? children :
|
|
36
|
+
}), children ? children : jsx(ExtensionLozenge, {
|
|
35
37
|
node: node
|
|
36
38
|
}));
|
|
37
39
|
}
|
|
@@ -11,6 +11,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
11
11
|
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; }
|
|
12
12
|
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); }; }
|
|
13
13
|
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; } }
|
|
14
|
+
/** @jsx jsx */
|
|
15
|
+
import { jsx } from '@emotion/react';
|
|
14
16
|
import { Component } from 'react';
|
|
15
17
|
import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
|
|
16
18
|
import { getExtensionLozengeData } from '@atlaskit/editor-common/utils';
|
|
@@ -49,7 +51,7 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
49
51
|
var extensionKey = this.props.node.attrs.extensionKey;
|
|
50
52
|
var url = lozengeData.url,
|
|
51
53
|
rest = _objectWithoutProperties(lozengeData, _excluded);
|
|
52
|
-
return
|
|
54
|
+
return jsx("img", _extends({
|
|
53
55
|
css: styledImage,
|
|
54
56
|
src: url
|
|
55
57
|
}, rest, {
|
|
@@ -66,17 +68,17 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
66
68
|
var params = parameters && parameters.macroParams;
|
|
67
69
|
var title = parameters && parameters.extensionTitle || parameters && parameters.macroMetadata && parameters.macroMetadata.title || extensionKey;
|
|
68
70
|
var isBlockExtension = name === 'extension';
|
|
69
|
-
return
|
|
71
|
+
return jsx("div", {
|
|
70
72
|
"data-testid": "lozenge-fallback",
|
|
71
73
|
css: placeholderFallback
|
|
72
74
|
}, lozengeData && !isBlockExtension ? this.renderImage(_objectSpread({
|
|
73
75
|
height: ICON_SIZE,
|
|
74
76
|
width: ICON_SIZE
|
|
75
|
-
}, lozengeData)) :
|
|
77
|
+
}, lozengeData)) : jsx(EditorFileIcon, {
|
|
76
78
|
label: title
|
|
77
|
-
}),
|
|
79
|
+
}), jsx("span", {
|
|
78
80
|
className: "extension-title"
|
|
79
|
-
}, capitalizeFirstLetter(title)), params && !isBlockExtension &&
|
|
81
|
+
}, capitalizeFirstLetter(title)), params && !isBlockExtension && jsx("span", {
|
|
80
82
|
css: placeholderFallbackParams
|
|
81
83
|
}, Object.keys(params).map(function (key) {
|
|
82
84
|
return key && " | ".concat(key, " = ").concat(params[key].value);
|
|
@@ -4,7 +4,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
var _templateObject, _templateObject2;
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
|
-
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
|
|
9
|
+
import { jsx, css } from '@emotion/react';
|
|
8
10
|
import { N30 } from '@atlaskit/theme/colors';
|
|
9
11
|
import React, { useState } from 'react';
|
|
10
12
|
var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_ref) {
|
|
@@ -128,16 +130,16 @@ var MultiBodiedExtension = function MultiBodiedExtension(_ref2) {
|
|
|
128
130
|
return handleContentDOMRef(node);
|
|
129
131
|
}, [handleContentDOMRef]);
|
|
130
132
|
var containerCSS = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n padding: ", ";\n .multiBodiedExtension-content-dom-wrapper > [data-extension-frame='true'] {\n display: none;\n }\n\n .multiBodiedExtension-content-dom-wrapper\n > [data-extension-frame='true']:nth-of-type(", ") {\n display: block;\n }\n "])), "var(--ds-border, ".concat(N30, ")"), "var(--ds-space-050, 4px)", activeChildIndex + 1);
|
|
131
|
-
return
|
|
133
|
+
return jsx("section", {
|
|
132
134
|
className: "multiBodiedExtension--container",
|
|
133
135
|
css: containerCSS,
|
|
134
136
|
"data-testid": "multiBodiedExtension--container",
|
|
135
137
|
"data-active-child-index": activeChildIndex
|
|
136
|
-
},
|
|
138
|
+
}, jsx("nav", {
|
|
137
139
|
className: "multiBodiedExtension-navigation",
|
|
138
140
|
css: navigationCSS,
|
|
139
141
|
"data-testid": "multiBodiedExtension-navigation"
|
|
140
|
-
}, extensionHandlerResult),
|
|
142
|
+
}, extensionHandlerResult), jsx("article", {
|
|
141
143
|
className: "multiBodiedExtension--frames",
|
|
142
144
|
"data-testid": "multiBodiedExtension--frames",
|
|
143
145
|
ref: articleRef
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3;
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { G300, N0 } from '@atlaskit/theme/colors';
|
|
7
8
|
import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
8
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -37,19 +38,19 @@ export var SaveIndicator = function SaveIndicator(_ref) {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
}, [saving, duration]);
|
|
40
|
-
return
|
|
41
|
+
return jsx(Fragment, null, jsx("div", null, children({
|
|
41
42
|
onSaveStarted: onSaveStarted,
|
|
42
43
|
onSaveEnded: noop
|
|
43
|
-
})), visible && saving &&
|
|
44
|
+
})), visible && saving && jsx("div", {
|
|
44
45
|
css: saveIndicatorWrapper
|
|
45
|
-
},
|
|
46
|
+
}, jsx("div", {
|
|
46
47
|
css: saveIndicatorContent,
|
|
47
48
|
"data-testid": "save-indicator-content"
|
|
48
|
-
},
|
|
49
|
+
}, jsx(CheckCircleIcon, {
|
|
49
50
|
label: "Saving",
|
|
50
51
|
primaryColor: "var(--ds-icon-success, ".concat(G300, ")"),
|
|
51
52
|
size: "small"
|
|
52
|
-
}),
|
|
53
|
+
}), jsx("span", {
|
|
53
54
|
css: saveIndicatorText
|
|
54
|
-
},
|
|
55
|
+
}, jsx(FormattedMessage, messages.saveIndicator)))));
|
|
55
56
|
};
|
|
@@ -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 { defineMessages, injectIntl } from 'react-intl-next';
|
|
12
14
|
import debounce from 'lodash/debounce';
|
|
13
15
|
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
@@ -172,16 +174,16 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
172
174
|
_this.findNext = formatMessage(messages.findNext);
|
|
173
175
|
_this.findPrevious = formatMessage(messages.findPrevious);
|
|
174
176
|
_this.matchCase = formatMessage(messages.matchCase);
|
|
175
|
-
_this.matchCaseIcon =
|
|
177
|
+
_this.matchCaseIcon = jsx(MatchCaseIcon, {
|
|
176
178
|
label: _this.matchCase
|
|
177
179
|
});
|
|
178
|
-
_this.findNextIcon =
|
|
180
|
+
_this.findNextIcon = jsx(ChevronDownIcon, {
|
|
179
181
|
label: _this.findNext
|
|
180
182
|
});
|
|
181
|
-
_this.findPrevIcon =
|
|
183
|
+
_this.findPrevIcon = jsx(ChevronUpIcon, {
|
|
182
184
|
label: _this.findPrevious
|
|
183
185
|
});
|
|
184
|
-
_this.closeIcon =
|
|
186
|
+
_this.closeIcon = jsx(EditorCloseIcon, {
|
|
185
187
|
label: _this.closeFindReplaceDialog
|
|
186
188
|
});
|
|
187
189
|
|
|
@@ -249,9 +251,9 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
249
251
|
selectedMatchPosition: count.index + 1,
|
|
250
252
|
totalResultsCount: count.total
|
|
251
253
|
});
|
|
252
|
-
return
|
|
254
|
+
return jsx("div", {
|
|
253
255
|
css: sectionWrapperStyles
|
|
254
|
-
},
|
|
256
|
+
}, jsx(Textfield, {
|
|
255
257
|
name: "find",
|
|
256
258
|
appearance: "none",
|
|
257
259
|
placeholder: this.find,
|
|
@@ -264,30 +266,30 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
264
266
|
onBlur: this.props.onFindBlur,
|
|
265
267
|
onCompositionStart: this.handleCompositionStart,
|
|
266
268
|
onCompositionEnd: this.handleCompositionEnd
|
|
267
|
-
}),
|
|
269
|
+
}), jsx("div", {
|
|
268
270
|
css: countWrapperStyles,
|
|
269
271
|
"aria-live": "polite"
|
|
270
|
-
}, findText &&
|
|
272
|
+
}, findText && jsx("span", {
|
|
271
273
|
"data-testid": "textfield-count",
|
|
272
274
|
css: countStyles
|
|
273
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase &&
|
|
275
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && jsx(FindReplaceTooltipButton, {
|
|
274
276
|
title: this.matchCase,
|
|
275
277
|
icon: this.matchCaseIcon,
|
|
276
278
|
onClick: this.handleMatchCaseClick,
|
|
277
279
|
isPressed: shouldMatchCase
|
|
278
|
-
}),
|
|
280
|
+
}), jsx(FindReplaceTooltipButton, {
|
|
279
281
|
title: this.findNext,
|
|
280
282
|
icon: this.findNextIcon,
|
|
281
283
|
keymapDescription: 'Enter',
|
|
282
284
|
onClick: this.handleFindNextClick,
|
|
283
285
|
disabled: count.total <= 1
|
|
284
|
-
}),
|
|
286
|
+
}), jsx(FindReplaceTooltipButton, {
|
|
285
287
|
title: this.findPrevious,
|
|
286
288
|
icon: this.findPrevIcon,
|
|
287
289
|
keymapDescription: 'Shift Enter',
|
|
288
290
|
onClick: this.handleFindPrevClick,
|
|
289
291
|
disabled: count.total <= 1
|
|
290
|
-
}),
|
|
292
|
+
}), jsx(FindReplaceTooltipButton, {
|
|
291
293
|
title: this.closeFindReplaceDialog,
|
|
292
294
|
icon: this.closeIcon,
|
|
293
295
|
keymapDescription: 'Escape',
|
|
@@ -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 Find from './Find';
|
|
12
14
|
import Replace from './Replace';
|
|
13
15
|
import { ruleStyles, wrapperStyles } from './styles';
|
|
@@ -60,9 +62,9 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
60
62
|
allowMatchCase = _this$props.allowMatchCase,
|
|
61
63
|
shouldMatchCase = _this$props.shouldMatchCase,
|
|
62
64
|
onToggleMatchCase = _this$props.onToggleMatchCase;
|
|
63
|
-
return
|
|
65
|
+
return jsx("div", {
|
|
64
66
|
css: wrapperStyles
|
|
65
|
-
},
|
|
67
|
+
}, jsx(Find, {
|
|
66
68
|
allowMatchCase: allowMatchCase,
|
|
67
69
|
shouldMatchCase: shouldMatchCase,
|
|
68
70
|
onToggleMatchCase: onToggleMatchCase,
|
|
@@ -76,10 +78,10 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
76
78
|
onFindTextfieldRefSet: this.setFindTextfieldRef,
|
|
77
79
|
onCancel: onCancel,
|
|
78
80
|
onArrowDown: this.setFocusToReplace
|
|
79
|
-
}),
|
|
81
|
+
}), jsx("hr", {
|
|
80
82
|
css: ruleStyles,
|
|
81
83
|
id: "replace-hr-element"
|
|
82
|
-
}),
|
|
84
|
+
}), jsx(Replace, {
|
|
83
85
|
canReplace: count.total > 0,
|
|
84
86
|
replaceText: replaceText,
|
|
85
87
|
onReplace: onReplace,
|
|
@@ -10,8 +10,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3;
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
12
|
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; } }
|
|
13
|
+
/** @jsx jsx */
|
|
13
14
|
import React from 'react';
|
|
14
|
-
import { css } from '@emotion/react';
|
|
15
|
+
import { css, jsx } from '@emotion/react';
|
|
15
16
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
16
17
|
import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
17
18
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../ui/ToolbarButton';
|
|
@@ -71,9 +72,9 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
71
72
|
var title = formatMessage(messages.findReplaceToolbarButton);
|
|
72
73
|
var stackBelowOtherEditorFloatingPanels = akEditorFloatingPanelZIndex - 1;
|
|
73
74
|
var keymap = findKeymapByDescription('Find');
|
|
74
|
-
return
|
|
75
|
+
return jsx("div", {
|
|
75
76
|
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWith]
|
|
76
|
-
},
|
|
77
|
+
}, jsx(Dropdown, {
|
|
77
78
|
mountTo: popupsMountPoint,
|
|
78
79
|
boundariesElement: popupsBoundariesElement,
|
|
79
80
|
scrollableElement: popupsScrollableElement,
|
|
@@ -91,15 +92,15 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
91
92
|
type: ArrowKeyNavigationType.MENU,
|
|
92
93
|
disableArrowKeyNavigation: true
|
|
93
94
|
},
|
|
94
|
-
trigger:
|
|
95
|
+
trigger: jsx(ToolbarButton, {
|
|
95
96
|
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
96
97
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
97
98
|
selected: isActive,
|
|
98
|
-
title:
|
|
99
|
+
title: jsx(ToolTipContent, {
|
|
99
100
|
description: title,
|
|
100
101
|
keymap: keymap
|
|
101
102
|
}),
|
|
102
|
-
iconBefore:
|
|
103
|
+
iconBefore: jsx(EditorSearchIcon, {
|
|
103
104
|
label: title
|
|
104
105
|
}),
|
|
105
106
|
onClick: this.toggleOpen,
|
|
@@ -108,9 +109,9 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
108
109
|
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
109
110
|
"aria-keyshortcuts": getAriaKeyshortcuts(keymap)
|
|
110
111
|
})
|
|
111
|
-
},
|
|
112
|
+
}, jsx("div", {
|
|
112
113
|
css: wrapper
|
|
113
|
-
},
|
|
114
|
+
}, jsx(FindReplace, _extends({
|
|
114
115
|
findText: findText,
|
|
115
116
|
replaceText: replaceText,
|
|
116
117
|
count: {
|
|
@@ -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 Button from '@atlaskit/button/standard-button';
|
|
12
14
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
13
15
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -135,9 +137,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
135
137
|
value: function render() {
|
|
136
138
|
var replaceText = this.state.replaceText;
|
|
137
139
|
var canReplace = this.props.canReplace;
|
|
138
|
-
return
|
|
140
|
+
return jsx("div", {
|
|
139
141
|
css: sectionWrapperStyles
|
|
140
|
-
},
|
|
142
|
+
}, jsx(Textfield, {
|
|
141
143
|
name: "replace",
|
|
142
144
|
appearance: "none",
|
|
143
145
|
placeholder: this.replaceWith,
|
|
@@ -148,12 +150,12 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
148
150
|
onKeyDown: this.handleReplaceKeyDown,
|
|
149
151
|
onCompositionStart: this.handleCompositionStart,
|
|
150
152
|
onCompositionEnd: this.handleCompositionEnd
|
|
151
|
-
}),
|
|
153
|
+
}), jsx(Button, {
|
|
152
154
|
css: replaceSectionButtonStyles,
|
|
153
155
|
testId: this.replace,
|
|
154
156
|
onClick: this.handleReplaceClick,
|
|
155
157
|
isDisabled: !canReplace
|
|
156
|
-
}, this.replace),
|
|
158
|
+
}, this.replace), jsx(Button, {
|
|
157
159
|
css: replaceSectionButtonStyles,
|
|
158
160
|
testId: this.replaceAll,
|
|
159
161
|
onClick: this.handleReplaceAllClick,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
5
|
import { N60, N30A } from '@atlaskit/theme/colors';
|
|
5
6
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
5
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
7
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
@@ -10,14 +11,14 @@ var jiraChildNode = css(_templateObject2 || (_templateObject2 = _taggedTemplateL
|
|
|
10
11
|
var svgChildNode = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n\n & > div {\n height: 24px;\n width: 24px;\n }\n"])));
|
|
11
12
|
export default function JIRAIssueNode(props) {
|
|
12
13
|
var issueKey = props.node.attrs.issueKey;
|
|
13
|
-
return
|
|
14
|
+
return jsx("span", {
|
|
14
15
|
css: wrapperNode,
|
|
15
16
|
"data-testid": "jira-issue-node"
|
|
16
|
-
},
|
|
17
|
+
}, jsx("span", {
|
|
17
18
|
css: svgChildNode
|
|
18
|
-
},
|
|
19
|
+
}, jsx(JiraIcon, {
|
|
19
20
|
size: "small"
|
|
20
|
-
})),
|
|
21
|
+
})), jsx("span", {
|
|
21
22
|
css: jiraChildNode
|
|
22
23
|
}, issueKey));
|
|
23
24
|
}
|