@atlaskit/editor-core 189.4.17 → 189.4.18
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 +28 -0
- package/dist/cjs/composable-editor/editor-internal.js +11 -11
- package/dist/cjs/composable-editor/editor.js +7 -8
- package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +0 -2
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +0 -2
- package/dist/cjs/editor.js +3 -4
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +10 -11
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +2 -3
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +1 -2
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +5 -6
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +2 -5
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +1 -4
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +4 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +11 -13
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +4 -5
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +8 -9
- package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -4
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +6 -7
- package/dist/cjs/plugins/find-replace/ui/Find.js +13 -14
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +5 -6
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -8
- package/dist/cjs/plugins/find-replace/ui/Replace.js +5 -6
- package/dist/cjs/plugins/find-replace/ui/styles.js +0 -1
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -5
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +8 -11
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -2
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +1 -2
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +1 -2
- package/dist/cjs/ui/Addon/Dropdown/index.js +2 -3
- package/dist/cjs/ui/Addon/DropdownItem/index.js +2 -5
- package/dist/cjs/ui/Alignment/index.js +6 -7
- package/dist/cjs/ui/Appearance/Chromeless.js +6 -7
- package/dist/cjs/ui/Appearance/Comment/Comment.js +16 -17
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -5
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +3 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -12
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +13 -15
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -6
- package/dist/cjs/ui/ChromeCollapsed/index.js +2 -3
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +15 -16
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +11 -12
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +6 -7
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +8 -8
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +17 -18
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +8 -9
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +9 -10
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +5 -6
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +6 -7
- package/dist/cjs/ui/ConfigPanel/Header.js +13 -14
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +2 -3
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -5
- package/dist/cjs/ui/ContentStyles/index.js +1 -2
- package/dist/cjs/ui/ContextPanel/index.js +10 -11
- package/dist/cjs/ui/PluginSlot/index.js +3 -4
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +1 -2
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +4 -5
- package/dist/cjs/ui/ToolbarFeedback/index.js +15 -16
- package/dist/cjs/ui/WithFlash/index.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +11 -12
- package/dist/es2019/composable-editor/editor.js +6 -8
- package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +0 -2
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +0 -1
- package/dist/es2019/editor.js +2 -4
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +9 -11
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -4
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -3
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -7
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +2 -4
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +1 -3
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +4 -6
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +11 -14
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +3 -5
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +5 -7
- package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -6
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -8
- package/dist/es2019/plugins/find-replace/ui/Find.js +12 -14
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +4 -6
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -9
- package/dist/es2019/plugins/find-replace/ui/Replace.js +4 -6
- package/dist/es2019/plugins/find-replace/ui/styles.js +0 -1
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +5 -6
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +8 -10
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +2 -3
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +2 -3
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +2 -3
- package/dist/es2019/ui/Addon/Dropdown/index.js +1 -3
- package/dist/es2019/ui/Addon/DropdownItem/index.js +2 -4
- package/dist/es2019/ui/Alignment/index.js +3 -5
- package/dist/es2019/ui/Appearance/Chromeless.js +7 -8
- package/dist/es2019/ui/Appearance/Comment/Comment.js +17 -18
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +5 -7
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +3 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +11 -12
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +13 -15
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +6 -7
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -3
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +12 -13
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -8
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +8 -9
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +18 -19
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +9 -10
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +10 -11
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +6 -7
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +7 -8
- package/dist/es2019/ui/ConfigPanel/Header.js +14 -15
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +3 -4
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +5 -6
- package/dist/es2019/ui/ContentStyles/index.js +2 -3
- package/dist/es2019/ui/ContextPanel/index.js +11 -12
- package/dist/es2019/ui/PluginSlot/index.js +4 -5
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -3
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +5 -6
- package/dist/es2019/ui/ToolbarFeedback/index.js +12 -14
- package/dist/es2019/ui/WithFlash/index.js +2 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +11 -12
- package/dist/esm/composable-editor/editor.js +6 -8
- package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +0 -2
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +0 -1
- package/dist/esm/editor.js +2 -4
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +9 -11
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -4
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -3
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +6 -7
- package/dist/esm/plugins/collab-edit/ui/avatars.js +2 -4
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +1 -3
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +4 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +11 -14
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +3 -5
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +5 -7
- package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -6
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -8
- package/dist/esm/plugins/find-replace/ui/Find.js +12 -14
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +4 -6
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -9
- package/dist/esm/plugins/find-replace/ui/Replace.js +4 -6
- package/dist/esm/plugins/find-replace/ui/styles.js +0 -1
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +5 -6
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +8 -10
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +2 -3
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +2 -3
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +2 -3
- package/dist/esm/ui/Addon/Dropdown/index.js +1 -3
- package/dist/esm/ui/Addon/DropdownItem/index.js +2 -4
- package/dist/esm/ui/Alignment/index.js +3 -5
- package/dist/esm/ui/Appearance/Chromeless.js +7 -8
- package/dist/esm/ui/Appearance/Comment/Comment.js +17 -18
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +5 -7
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +3 -5
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +11 -12
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +13 -15
- package/dist/esm/ui/AppearanceComponents/Mobile.js +6 -7
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -3
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +12 -13
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -8
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +8 -9
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +18 -19
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +9 -10
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +10 -11
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +6 -7
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +7 -8
- package/dist/esm/ui/ConfigPanel/Header.js +14 -15
- package/dist/esm/ui/ConfigPanel/LoadingState.js +3 -4
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +5 -6
- package/dist/esm/ui/ContentStyles/index.js +2 -3
- package/dist/esm/ui/ContextPanel/index.js +11 -12
- package/dist/esm/ui/PluginSlot/index.js +4 -5
- package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -3
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +5 -6
- package/dist/esm/ui/ToolbarFeedback/index.js +12 -14
- package/dist/esm/ui/WithFlash/index.js +2 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +8 -4
|
@@ -7,9 +7,7 @@ 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 */
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
11
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
14
12
|
import debounce from 'lodash/debounce';
|
|
15
13
|
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
@@ -174,16 +172,16 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
174
172
|
_this.findNext = formatMessage(messages.findNext);
|
|
175
173
|
_this.findPrevious = formatMessage(messages.findPrevious);
|
|
176
174
|
_this.matchCase = formatMessage(messages.matchCase);
|
|
177
|
-
_this.matchCaseIcon =
|
|
175
|
+
_this.matchCaseIcon = /*#__PURE__*/React.createElement(MatchCaseIcon, {
|
|
178
176
|
label: _this.matchCase
|
|
179
177
|
});
|
|
180
|
-
_this.findNextIcon =
|
|
178
|
+
_this.findNextIcon = /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
181
179
|
label: _this.findNext
|
|
182
180
|
});
|
|
183
|
-
_this.findPrevIcon =
|
|
181
|
+
_this.findPrevIcon = /*#__PURE__*/React.createElement(ChevronUpIcon, {
|
|
184
182
|
label: _this.findPrevious
|
|
185
183
|
});
|
|
186
|
-
_this.closeIcon =
|
|
184
|
+
_this.closeIcon = /*#__PURE__*/React.createElement(EditorCloseIcon, {
|
|
187
185
|
label: _this.closeFindReplaceDialog
|
|
188
186
|
});
|
|
189
187
|
|
|
@@ -251,9 +249,9 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
251
249
|
selectedMatchPosition: count.index + 1,
|
|
252
250
|
totalResultsCount: count.total
|
|
253
251
|
});
|
|
254
|
-
return
|
|
252
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
255
253
|
css: sectionWrapperStyles
|
|
256
|
-
},
|
|
254
|
+
}, /*#__PURE__*/React.createElement(Textfield, {
|
|
257
255
|
name: "find",
|
|
258
256
|
appearance: "none",
|
|
259
257
|
placeholder: this.find,
|
|
@@ -266,30 +264,30 @@ var Find = /*#__PURE__*/function (_React$Component) {
|
|
|
266
264
|
onBlur: this.props.onFindBlur,
|
|
267
265
|
onCompositionStart: this.handleCompositionStart,
|
|
268
266
|
onCompositionEnd: this.handleCompositionEnd
|
|
269
|
-
}),
|
|
267
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
270
268
|
css: countWrapperStyles,
|
|
271
269
|
"aria-live": "polite"
|
|
272
|
-
}, findText &&
|
|
270
|
+
}, findText && /*#__PURE__*/React.createElement("span", {
|
|
273
271
|
"data-testid": "textfield-count",
|
|
274
272
|
css: countStyles
|
|
275
|
-
}, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase &&
|
|
273
|
+
}, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
|
|
276
274
|
title: this.matchCase,
|
|
277
275
|
icon: this.matchCaseIcon,
|
|
278
276
|
onClick: this.handleMatchCaseClick,
|
|
279
277
|
isPressed: shouldMatchCase
|
|
280
|
-
}),
|
|
278
|
+
}), /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
|
|
281
279
|
title: this.findNext,
|
|
282
280
|
icon: this.findNextIcon,
|
|
283
281
|
keymapDescription: 'Enter',
|
|
284
282
|
onClick: this.handleFindNextClick,
|
|
285
283
|
disabled: count.total <= 1
|
|
286
|
-
}),
|
|
284
|
+
}), /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
|
|
287
285
|
title: this.findPrevious,
|
|
288
286
|
icon: this.findPrevIcon,
|
|
289
287
|
keymapDescription: 'Shift Enter',
|
|
290
288
|
onClick: this.handleFindPrevClick,
|
|
291
289
|
disabled: count.total <= 1
|
|
292
|
-
}),
|
|
290
|
+
}), /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
|
|
293
291
|
title: this.closeFindReplaceDialog,
|
|
294
292
|
icon: this.closeIcon,
|
|
295
293
|
keymapDescription: 'Escape',
|
|
@@ -7,9 +7,7 @@ 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 */
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
11
|
import Find from './Find';
|
|
14
12
|
import Replace from './Replace';
|
|
15
13
|
import { ruleStyles, wrapperStyles } from './styles';
|
|
@@ -62,9 +60,9 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
62
60
|
allowMatchCase = _this$props.allowMatchCase,
|
|
63
61
|
shouldMatchCase = _this$props.shouldMatchCase,
|
|
64
62
|
onToggleMatchCase = _this$props.onToggleMatchCase;
|
|
65
|
-
return
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
66
64
|
css: wrapperStyles
|
|
67
|
-
},
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Find, {
|
|
68
66
|
allowMatchCase: allowMatchCase,
|
|
69
67
|
shouldMatchCase: shouldMatchCase,
|
|
70
68
|
onToggleMatchCase: onToggleMatchCase,
|
|
@@ -78,10 +76,10 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
78
76
|
onFindTextfieldRefSet: this.setFindTextfieldRef,
|
|
79
77
|
onCancel: onCancel,
|
|
80
78
|
onArrowDown: this.setFocusToReplace
|
|
81
|
-
}),
|
|
79
|
+
}), /*#__PURE__*/React.createElement("hr", {
|
|
82
80
|
css: ruleStyles,
|
|
83
81
|
id: "replace-hr-element"
|
|
84
|
-
}),
|
|
82
|
+
}), /*#__PURE__*/React.createElement(Replace, {
|
|
85
83
|
canReplace: count.total > 0,
|
|
86
84
|
replaceText: replaceText,
|
|
87
85
|
onReplace: onReplace,
|
|
@@ -10,9 +10,8 @@ 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 */
|
|
14
13
|
import React from 'react';
|
|
15
|
-
import { css
|
|
14
|
+
import { css } from '@emotion/react';
|
|
16
15
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
17
16
|
import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
18
17
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../ui/ToolbarButton';
|
|
@@ -72,9 +71,9 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72
71
|
var title = formatMessage(messages.findReplaceToolbarButton);
|
|
73
72
|
var stackBelowOtherEditorFloatingPanels = akEditorFloatingPanelZIndex - 1;
|
|
74
73
|
var keymap = findKeymapByDescription('Find');
|
|
75
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
76
75
|
css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWith]
|
|
77
|
-
},
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
78
77
|
mountTo: popupsMountPoint,
|
|
79
78
|
boundariesElement: popupsBoundariesElement,
|
|
80
79
|
scrollableElement: popupsScrollableElement,
|
|
@@ -92,15 +91,15 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
92
91
|
type: ArrowKeyNavigationType.MENU,
|
|
93
92
|
disableArrowKeyNavigation: true
|
|
94
93
|
},
|
|
95
|
-
trigger:
|
|
94
|
+
trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
96
95
|
buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
|
|
97
96
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
98
97
|
selected: isActive,
|
|
99
|
-
title:
|
|
98
|
+
title: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
100
99
|
description: title,
|
|
101
100
|
keymap: keymap
|
|
102
101
|
}),
|
|
103
|
-
iconBefore:
|
|
102
|
+
iconBefore: /*#__PURE__*/React.createElement(EditorSearchIcon, {
|
|
104
103
|
label: title
|
|
105
104
|
}),
|
|
106
105
|
onClick: this.toggleOpen,
|
|
@@ -109,9 +108,9 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
109
108
|
"aria-label": keymap ? tooltip(keymap, title) : title,
|
|
110
109
|
"aria-keyshortcuts": getAriaKeyshortcuts(keymap)
|
|
111
110
|
})
|
|
112
|
-
},
|
|
111
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
113
112
|
css: wrapper
|
|
114
|
-
},
|
|
113
|
+
}, /*#__PURE__*/React.createElement(FindReplace, _extends({
|
|
115
114
|
findText: findText,
|
|
116
115
|
replaceText: replaceText,
|
|
117
116
|
count: {
|
|
@@ -7,9 +7,7 @@ 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 */
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
11
|
import Button from '@atlaskit/button/standard-button';
|
|
14
12
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
15
13
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -137,9 +135,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
137
135
|
value: function render() {
|
|
138
136
|
var replaceText = this.state.replaceText;
|
|
139
137
|
var canReplace = this.props.canReplace;
|
|
140
|
-
return
|
|
138
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
141
139
|
css: sectionWrapperStyles
|
|
142
|
-
},
|
|
140
|
+
}, /*#__PURE__*/React.createElement(Textfield, {
|
|
143
141
|
name: "replace",
|
|
144
142
|
appearance: "none",
|
|
145
143
|
placeholder: this.replaceWith,
|
|
@@ -150,12 +148,12 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
150
148
|
onKeyDown: this.handleReplaceKeyDown,
|
|
151
149
|
onCompositionStart: this.handleCompositionStart,
|
|
152
150
|
onCompositionEnd: this.handleCompositionEnd
|
|
153
|
-
}),
|
|
151
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
154
152
|
css: replaceSectionButtonStyles,
|
|
155
153
|
testId: this.replace,
|
|
156
154
|
onClick: this.handleReplaceClick,
|
|
157
155
|
isDisabled: !canReplace
|
|
158
|
-
}, this.replace),
|
|
156
|
+
}, this.replace), /*#__PURE__*/React.createElement(Button, {
|
|
159
157
|
css: replaceSectionButtonStyles,
|
|
160
158
|
testId: this.replaceAll,
|
|
161
159
|
onClick: this.handleReplaceAllClick,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { N60, N30A } from '@atlaskit/theme/colors';
|
|
6
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
6
5
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
6
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
@@ -11,14 +10,14 @@ var jiraChildNode = css(_templateObject2 || (_templateObject2 = _taggedTemplateL
|
|
|
11
10
|
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"])));
|
|
12
11
|
export default function JIRAIssueNode(props) {
|
|
13
12
|
var issueKey = props.node.attrs.issueKey;
|
|
14
|
-
return
|
|
13
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
15
14
|
css: wrapperNode,
|
|
16
15
|
"data-testid": "jira-issue-node"
|
|
17
|
-
},
|
|
16
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
18
17
|
css: svgChildNode
|
|
19
|
-
},
|
|
18
|
+
}, /*#__PURE__*/React.createElement(JiraIcon, {
|
|
20
19
|
size: "small"
|
|
21
|
-
})),
|
|
20
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
22
21
|
css: jiraChildNode
|
|
23
22
|
}, issueKey));
|
|
24
23
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import { injectIntl } from 'react-intl-next';
|
|
4
2
|
import UndoIcon from '@atlaskit/icon/glyph/undo';
|
|
5
3
|
import RedoIcon from '@atlaskit/icon/glyph/redo';
|
|
@@ -54,39 +52,39 @@ export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
54
52
|
var _ref2 = historyState !== null && historyState !== void 0 ? historyState : {},
|
|
55
53
|
canUndo = _ref2.canUndo,
|
|
56
54
|
canRedo = _ref2.canRedo;
|
|
57
|
-
return
|
|
55
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
58
56
|
css: buttonGroupStyle
|
|
59
|
-
},
|
|
57
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
60
58
|
buttonId: TOOLBAR_BUTTON.UNDO,
|
|
61
59
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
62
60
|
onClick: handleUndo,
|
|
63
61
|
disabled: !canUndo || disabled,
|
|
64
62
|
"aria-label": tooltip(undoKeymap, labelUndo),
|
|
65
63
|
"aria-keyshortcuts": getAriaKeyshortcuts(undoKeymap),
|
|
66
|
-
title:
|
|
64
|
+
title: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
67
65
|
description: labelUndo,
|
|
68
66
|
keymap: undoKeymap
|
|
69
67
|
}),
|
|
70
|
-
iconBefore:
|
|
68
|
+
iconBefore: /*#__PURE__*/React.createElement(UndoIcon, {
|
|
71
69
|
label: ""
|
|
72
70
|
}),
|
|
73
71
|
testId: "ak-editor-toolbar-button-undo"
|
|
74
|
-
}),
|
|
72
|
+
}), /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
75
73
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
76
74
|
buttonId: TOOLBAR_BUTTON.REDO,
|
|
77
75
|
onClick: handleRedo,
|
|
78
76
|
disabled: !canRedo || disabled,
|
|
79
|
-
title:
|
|
77
|
+
title: /*#__PURE__*/React.createElement(ToolTipContent, {
|
|
80
78
|
description: labelRedo,
|
|
81
79
|
keymap: redoKeymap
|
|
82
80
|
}),
|
|
83
|
-
iconBefore:
|
|
81
|
+
iconBefore: /*#__PURE__*/React.createElement(RedoIcon, {
|
|
84
82
|
label: ""
|
|
85
83
|
}),
|
|
86
84
|
testId: "ak-editor-toolbar-button-redo",
|
|
87
85
|
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
88
86
|
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
89
|
-
}),
|
|
87
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
90
88
|
css: separatorStyles
|
|
91
89
|
}));
|
|
92
90
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import { clickAreaClickHandler } from '../click-area-helper';
|
|
7
6
|
var clickWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-grow: 1;\n height: 100%;\n"])));
|
|
8
7
|
export var ClickAreaBlock = function ClickAreaBlock(_ref) {
|
|
@@ -17,7 +16,7 @@ export var ClickAreaBlock = function ClickAreaBlock(_ref) {
|
|
|
17
16
|
clickAreaClickHandler(editorView, event);
|
|
18
17
|
}
|
|
19
18
|
}, [editorView, editorDisabled]);
|
|
20
|
-
return
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
20
|
"data-testid": "click-wrapper",
|
|
22
21
|
css: clickWrapper,
|
|
23
22
|
onMouseDown: handleMouseDown
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import { createParagraphAtEnd } from '../../../commands';
|
|
7
6
|
var clickArea = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-grow: 1;\n"])));
|
|
8
7
|
export var ClickAreaInline = function ClickAreaInline(_ref) {
|
|
@@ -17,7 +16,7 @@ export var ClickAreaInline = function ClickAreaInline(_ref) {
|
|
|
17
16
|
event.stopPropagation();
|
|
18
17
|
}
|
|
19
18
|
}, [editorView]);
|
|
20
|
-
return
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
20
|
"data-testid": "click-wrapper",
|
|
22
21
|
css: clickArea,
|
|
23
22
|
onMouseDown: handleMouseDown
|
|
@@ -9,9 +9,8 @@ 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 */
|
|
13
12
|
import React from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import { clickAreaClickHandler } from '../click-area-helper';
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -75,7 +74,7 @@ var ClickAreaMobile = /*#__PURE__*/function (_React$Component) {
|
|
|
75
74
|
_createClass(ClickAreaMobile, [{
|
|
76
75
|
key: "render",
|
|
77
76
|
value: function render() {
|
|
78
|
-
return
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
79
78
|
css: clickWrapper({
|
|
80
79
|
isExpanded: this.props.isExpanded,
|
|
81
80
|
minHeight: this.props.minHeight
|
|
@@ -7,9 +7,7 @@ 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 */
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
11
|
import { dropdown } from './styles';
|
|
14
12
|
var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
15
13
|
_inherits(DropdownWrapper, _React$Component);
|
|
@@ -44,7 +42,7 @@ var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
44
42
|
onClick: _this2.handleClick
|
|
45
43
|
});
|
|
46
44
|
});
|
|
47
|
-
return
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
46
|
css: dropdown
|
|
49
47
|
}, children);
|
|
50
48
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import { dropdownItem } from './styles';
|
|
4
2
|
var DropdownItemWrapper = function DropdownItemWrapper(props) {
|
|
5
|
-
return
|
|
3
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
4
|
css: dropdownItem,
|
|
7
5
|
onClick: function onClick() {
|
|
8
6
|
return props.onClick && props.onClick({
|
|
@@ -10,6 +8,6 @@ var DropdownItemWrapper = function DropdownItemWrapper(props) {
|
|
|
10
8
|
renderOnClick: props.renderOnClick
|
|
11
9
|
});
|
|
12
10
|
}
|
|
13
|
-
},
|
|
11
|
+
}, /*#__PURE__*/React.createElement("span", null, props.icon), props.children);
|
|
14
12
|
};
|
|
15
13
|
export default DropdownItemWrapper;
|
|
@@ -5,8 +5,6 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
8
|
-
/** @jsx jsx */
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
8
|
import { PureComponent } from 'react';
|
|
11
9
|
import { injectIntl } from 'react-intl-next';
|
|
12
10
|
import { IconMap } from '../../plugins/alignment/ui/ToolbarAlignment/icon-map';
|
|
@@ -40,7 +38,7 @@ var Alignment = /*#__PURE__*/function (_PureComponent) {
|
|
|
40
38
|
selectedAlignment = _this$props.selectedAlignment,
|
|
41
39
|
className = _this$props.className,
|
|
42
40
|
intl = _this$props.intl;
|
|
43
|
-
return
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
42
|
css: alignmentWrapper,
|
|
45
43
|
className: className
|
|
46
44
|
}, alignmentOptions.map(function (alignment) {
|
|
@@ -48,8 +46,8 @@ var Alignment = /*#__PURE__*/function (_PureComponent) {
|
|
|
48
46
|
title = alignment.title,
|
|
49
47
|
shortcut = alignment.shortcut;
|
|
50
48
|
var message = intl.formatMessage(title);
|
|
51
|
-
return
|
|
52
|
-
content:
|
|
49
|
+
return /*#__PURE__*/React.createElement(AlignmentButton, {
|
|
50
|
+
content: /*#__PURE__*/React.createElement(IconMap, {
|
|
53
51
|
alignment: value
|
|
54
52
|
}),
|
|
55
53
|
key: value,
|
|
@@ -9,9 +9,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3;
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
/** @jsx jsx */
|
|
13
12
|
import React, { Fragment } from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import PluginSlot from '../PluginSlot';
|
|
16
15
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
17
16
|
import { scrollbarStyles } from '../styles';
|
|
@@ -54,18 +53,18 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
54
53
|
pluginHooks = _this$props.pluginHooks,
|
|
55
54
|
featureFlags = _this$props.featureFlags;
|
|
56
55
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
57
|
-
return
|
|
56
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
58
57
|
animate: maxContentSizeReached
|
|
59
|
-
},
|
|
58
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
60
59
|
css: [chromelessEditor, maxHeight && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), maxHeight), css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
61
60
|
"data-testid": "chromeless-editor",
|
|
62
61
|
ref: function ref(_ref2) {
|
|
63
62
|
return _this.containerElement = _ref2;
|
|
64
63
|
}
|
|
65
|
-
},
|
|
64
|
+
}, /*#__PURE__*/React.createElement(ContentArea, {
|
|
66
65
|
className: "ak-editor-content-area",
|
|
67
66
|
featureFlags: featureFlags
|
|
68
|
-
}, customContentComponents,
|
|
67
|
+
}, customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
69
68
|
editorView: editorView,
|
|
70
69
|
editorActions: editorActions,
|
|
71
70
|
eventDispatcher: eventDispatcher,
|
|
@@ -87,7 +86,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
87
86
|
_createClass(Editor, [{
|
|
88
87
|
key: "render",
|
|
89
88
|
value: function render() {
|
|
90
|
-
return
|
|
89
|
+
return /*#__PURE__*/React.createElement(RenderWithPluginState, {
|
|
91
90
|
renderChrome: this.renderChrome
|
|
92
91
|
});
|
|
93
92
|
}
|
|
@@ -101,7 +100,7 @@ function RenderWithPluginState(_ref3) {
|
|
|
101
100
|
var api = usePresetContext();
|
|
102
101
|
var _useSharedPluginState = useSharedPluginState(api, ['maxContentSize']),
|
|
103
102
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
104
|
-
return
|
|
103
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
|
|
105
104
|
maxContentSize: maxContentSizeState
|
|
106
105
|
}));
|
|
107
106
|
}
|
|
@@ -9,9 +9,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
/** @jsx jsx */
|
|
13
12
|
import React, { Fragment } from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
16
15
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
17
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -100,15 +99,15 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
100
99
|
event.preventDefault();
|
|
101
100
|
event.stopPropagation();
|
|
102
101
|
};
|
|
103
|
-
return
|
|
102
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
104
103
|
animate: maxContentSizeReached
|
|
105
|
-
},
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
105
|
css: [commentEditorStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
107
106
|
className: "akEditor",
|
|
108
107
|
ref: _this.wrapperElementRef
|
|
109
|
-
},
|
|
108
|
+
}, /*#__PURE__*/React.createElement(MainToolbar, {
|
|
110
109
|
useStickyToolbar: useStickyToolbar
|
|
111
|
-
},
|
|
110
|
+
}, /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
112
111
|
editorView: editorView,
|
|
113
112
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
114
113
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -116,7 +115,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
116
115
|
editorAppearance: _this.appearance,
|
|
117
116
|
useStickyToolbar: useStickyToolbar,
|
|
118
117
|
intl: intl
|
|
119
|
-
},
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Toolbar, {
|
|
120
119
|
editorView: editorView,
|
|
121
120
|
editorActions: editorActions,
|
|
122
121
|
eventDispatcher: eventDispatcher,
|
|
@@ -129,14 +128,14 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
129
128
|
disabled: !!disabled,
|
|
130
129
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
131
130
|
containerElement: _this.containerElement
|
|
132
|
-
}),
|
|
131
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
133
132
|
css: mainToolbarCustomComponentsSlotStyle
|
|
134
|
-
}, customPrimaryToolbarComponents))),
|
|
133
|
+
}, customPrimaryToolbarComponents))), /*#__PURE__*/React.createElement(ClickAreaBlock, {
|
|
135
134
|
editorView: editorView,
|
|
136
135
|
editorDisabled: disabled
|
|
137
|
-
},
|
|
136
|
+
}, /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
|
|
138
137
|
var width = _ref2.width;
|
|
139
|
-
return
|
|
138
|
+
return /*#__PURE__*/React.createElement(ContentArea, {
|
|
140
139
|
ref: function ref(_ref3) {
|
|
141
140
|
return _this.containerElement = _ref3;
|
|
142
141
|
},
|
|
@@ -145,7 +144,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
145
144
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
146
145
|
}),
|
|
147
146
|
featureFlags: featureFlags
|
|
148
|
-
}, customContentComponents,
|
|
147
|
+
}, customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
149
148
|
editorView: editorView,
|
|
150
149
|
editorActions: editorActions,
|
|
151
150
|
eventDispatcher: eventDispatcher,
|
|
@@ -161,19 +160,19 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
161
160
|
wrapperElement: _this.wrapperElementRef.current,
|
|
162
161
|
pluginHooks: pluginHooks
|
|
163
162
|
}), editorDOMElement);
|
|
164
|
-
}))), showSecondaryToolbar &&
|
|
163
|
+
}))), showSecondaryToolbar && /*#__PURE__*/React.createElement("div", {
|
|
165
164
|
css: secondaryToolbarStyle,
|
|
166
165
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
167
|
-
},
|
|
166
|
+
}, /*#__PURE__*/React.createElement(ButtonGroup, null, !!onSave && /*#__PURE__*/React.createElement(Button, {
|
|
168
167
|
appearance: "primary",
|
|
169
168
|
onClick: _this.handleSave,
|
|
170
169
|
testId: "comment-save-button",
|
|
171
170
|
isDisabled: disabled || mediaState && !mediaState.allUploadsFinished
|
|
172
|
-
}, intl.formatMessage(messages.saveButton)), !!onCancel &&
|
|
171
|
+
}, intl.formatMessage(messages.saveButton)), !!onCancel && /*#__PURE__*/React.createElement(Button, {
|
|
173
172
|
appearance: "subtle",
|
|
174
173
|
onClick: _this.handleCancel,
|
|
175
174
|
isDisabled: disabled
|
|
176
|
-
}, intl.formatMessage(messages.cancelButton))),
|
|
175
|
+
}, intl.formatMessage(messages.cancelButton))), /*#__PURE__*/React.createElement("span", {
|
|
177
176
|
style: {
|
|
178
177
|
flexGrow: 1
|
|
179
178
|
}
|
|
@@ -187,7 +186,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
187
186
|
_createClass(Editor, [{
|
|
188
187
|
key: "render",
|
|
189
188
|
value: function render() {
|
|
190
|
-
return
|
|
189
|
+
return /*#__PURE__*/React.createElement(RenderWithPluginState, {
|
|
191
190
|
renderChrome: this.renderChrome
|
|
192
191
|
});
|
|
193
192
|
}
|
|
@@ -201,7 +200,7 @@ function RenderWithPluginState(_ref4) {
|
|
|
201
200
|
var _useSharedPluginState = useSharedPluginState(api, ['media', 'maxContentSize']),
|
|
202
201
|
mediaState = _useSharedPluginState.mediaState,
|
|
203
202
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
204
|
-
return
|
|
203
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
|
|
205
204
|
maxContentSize: maxContentSizeState,
|
|
206
205
|
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
207
206
|
}));
|
|
@@ -2,10 +2,8 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
|
-
/** @jsx jsx */
|
|
6
|
-
|
|
7
5
|
import React, { useEffect, useState } from 'react';
|
|
8
|
-
import { css
|
|
6
|
+
import { css } from '@emotion/react';
|
|
9
7
|
import { N30 } from '@atlaskit/theme/colors';
|
|
10
8
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
9
|
export var TableControlsPadding = 20;
|
|
@@ -28,14 +26,14 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
28
26
|
setTop(props.offsetTop || 0);
|
|
29
27
|
}
|
|
30
28
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
31
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
30
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n "])), top)],
|
|
33
31
|
"data-testid": "ak-editor-main-toolbar",
|
|
34
32
|
className: 'show-keyline'
|
|
35
33
|
}, props.children);
|
|
36
34
|
};
|
|
37
35
|
var FixedToolbar = function FixedToolbar(props) {
|
|
38
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
37
|
css: mainToolbarWrapperStyle,
|
|
40
38
|
"data-testid": "ak-editor-main-toolbar"
|
|
41
39
|
}, props.children);
|
|
@@ -72,8 +70,8 @@ export var MainToolbar = function MainToolbar(_ref) {
|
|
|
72
70
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
73
71
|
children = _ref.children;
|
|
74
72
|
if (useStickyToolbar) {
|
|
75
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
76
74
|
}
|
|
77
|
-
return
|
|
75
|
+
return /*#__PURE__*/React.createElement(FixedToolbar, null, children);
|
|
78
76
|
};
|
|
79
77
|
export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)");
|