@atlaskit/editor-core 189.5.1 → 189.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/afm-cc/tsconfig.json +335 -0
- package/dist/cjs/composable-editor/editor-internal.js +11 -11
- package/dist/cjs/composable-editor/editor.js +8 -7
- package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +2 -0
- package/dist/cjs/editor.js +4 -3
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +11 -10
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -1
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +6 -5
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +5 -2
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -1
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +7 -4
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +13 -11
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +5 -4
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +9 -8
- package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -4
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -6
- package/dist/cjs/plugins/find-replace/ui/Find.js +14 -13
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +6 -5
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -7
- package/dist/cjs/plugins/find-replace/ui/Replace.js +6 -5
- package/dist/cjs/plugins/find-replace/ui/styles.js +1 -0
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +5 -4
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +11 -8
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +2 -1
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +2 -1
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +2 -1
- package/dist/cjs/ui/Addon/Dropdown/index.js +3 -2
- package/dist/cjs/ui/Addon/DropdownItem/index.js +5 -2
- package/dist/cjs/ui/Alignment/index.js +7 -6
- package/dist/cjs/ui/Appearance/Chromeless.js +7 -6
- package/dist/cjs/ui/Appearance/Comment/Comment.js +17 -16
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +5 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +12 -10
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +6 -5
- package/dist/cjs/ui/ChromeCollapsed/index.js +3 -2
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +16 -15
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +12 -11
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +8 -8
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +18 -17
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +9 -8
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +10 -9
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +6 -5
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Header.js +14 -13
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +3 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +5 -4
- package/dist/cjs/ui/ContentStyles/index.js +2 -1
- package/dist/cjs/ui/ContextPanel/index.js +11 -10
- package/dist/cjs/ui/PluginSlot/index.js +4 -3
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +16 -15
- package/dist/cjs/ui/WithFlash/index.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +12 -11
- package/dist/es2019/composable-editor/editor.js +8 -6
- package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
- package/dist/es2019/editor.js +4 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +7 -6
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +4 -2
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +6 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +14 -11
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +7 -5
- package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
- package/dist/es2019/plugins/find-replace/ui/Find.js +14 -12
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +6 -4
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
- package/dist/es2019/plugins/find-replace/ui/Replace.js +6 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +1 -0
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +3 -2
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +3 -2
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -2
- package/dist/es2019/ui/Addon/Dropdown/index.js +3 -1
- package/dist/es2019/ui/Addon/DropdownItem/index.js +4 -2
- package/dist/es2019/ui/Alignment/index.js +5 -3
- package/dist/es2019/ui/Appearance/Chromeless.js +8 -7
- package/dist/es2019/ui/Appearance/Comment/Comment.js +18 -17
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +7 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +3 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +13 -12
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +19 -18
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +10 -9
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +11 -10
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +7 -6
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +8 -7
- package/dist/es2019/ui/ConfigPanel/Header.js +15 -14
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +4 -3
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +12 -11
- package/dist/es2019/ui/PluginSlot/index.js +5 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +3 -2
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
- package/dist/es2019/ui/ToolbarFeedback/index.js +14 -12
- package/dist/es2019/ui/WithFlash/index.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +12 -11
- package/dist/esm/composable-editor/editor.js +8 -6
- package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
- package/dist/esm/editor.js +4 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +7 -6
- package/dist/esm/plugins/collab-edit/ui/avatars.js +4 -2
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +6 -4
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +14 -11
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +7 -5
- package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
- package/dist/esm/plugins/find-replace/ui/Find.js +14 -12
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +6 -4
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
- package/dist/esm/plugins/find-replace/ui/Replace.js +6 -4
- package/dist/esm/plugins/find-replace/ui/styles.js +1 -0
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +3 -2
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +3 -2
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -2
- package/dist/esm/ui/Addon/Dropdown/index.js +3 -1
- package/dist/esm/ui/Addon/DropdownItem/index.js +4 -2
- package/dist/esm/ui/Alignment/index.js +5 -3
- package/dist/esm/ui/Appearance/Chromeless.js +8 -7
- package/dist/esm/ui/Appearance/Comment/Comment.js +18 -17
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +7 -5
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +3 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +13 -12
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +19 -18
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +10 -9
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +11 -10
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +7 -6
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +8 -7
- package/dist/esm/ui/ConfigPanel/Header.js +15 -14
- package/dist/esm/ui/ConfigPanel/LoadingState.js +4 -3
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +12 -11
- package/dist/esm/ui/PluginSlot/index.js +5 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +3 -2
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
- package/dist/esm/ui/ToolbarFeedback/index.js +14 -12
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +13 -5
|
@@ -14,8 +14,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
14
14
|
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; }
|
|
15
15
|
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); }; }
|
|
16
16
|
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; } }
|
|
17
|
+
/** @jsx jsx */
|
|
17
18
|
import React, { useContext } from 'react';
|
|
18
|
-
import { css } from '@emotion/react';
|
|
19
|
+
import { css, jsx } from '@emotion/react';
|
|
19
20
|
import Transition from 'react-transition-group/Transition';
|
|
20
21
|
import { N30 } from '@atlaskit/theme/colors';
|
|
21
22
|
import { akEditorSwoopCubicBezier, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorBreakoutPadding, akEditorContextPanelWidth, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
@@ -86,7 +87,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
86
87
|
if (!currentPluginContent) {
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
|
-
return
|
|
90
|
+
return jsx(Transition, {
|
|
90
91
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
91
92
|
in: !!pluginContent,
|
|
92
93
|
mountOnEnter: true,
|
|
@@ -101,7 +102,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
102
|
if (!children) {
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
|
-
return
|
|
105
|
+
return jsx(Transition, {
|
|
105
106
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
106
107
|
in: isVisible,
|
|
107
108
|
mountOnEnter: true,
|
|
@@ -136,7 +137,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
136
137
|
var width = akEditorContextPanelWidth;
|
|
137
138
|
var userVisible = !!this.props.visible;
|
|
138
139
|
var visible = userVisible || !!this.state.currentPluginContent;
|
|
139
|
-
return
|
|
140
|
+
return jsx(ContextPanelConsumer, null, function (_ref) {
|
|
140
141
|
var broadcastWidth = _ref.broadcastWidth,
|
|
141
142
|
broadcastPosition = _ref.broadcastPosition,
|
|
142
143
|
positionedOverEditor = _ref.positionedOverEditor;
|
|
@@ -144,7 +145,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
144
145
|
var newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
|
|
145
146
|
broadcastWidth(contextPanelWidth);
|
|
146
147
|
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
147
|
-
return
|
|
148
|
+
return jsx("div", {
|
|
148
149
|
css: [panel, !visible && panelHidden,
|
|
149
150
|
/**
|
|
150
151
|
* Only use absolute position for panel when screen size is wide enough
|
|
@@ -154,7 +155,7 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
154
155
|
"data-testid": "context-panel-panel",
|
|
155
156
|
"aria-labelledby": "context-panel-title",
|
|
156
157
|
role: "dialog"
|
|
157
|
-
},
|
|
158
|
+
}, jsx("div", {
|
|
158
159
|
"data-testid": "context-panel-content",
|
|
159
160
|
css: [content, !visible && panelHidden]
|
|
160
161
|
}, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
|
|
@@ -202,11 +203,11 @@ function ContextPanelWithActions(_ref2) {
|
|
|
202
203
|
var _useContext = useContext(WidthContext),
|
|
203
204
|
width = _useContext.width;
|
|
204
205
|
if (!eventDispatcher) {
|
|
205
|
-
return
|
|
206
|
+
return jsx(SwappableContentArea, _extends({
|
|
206
207
|
editorView: editorView
|
|
207
208
|
}, props));
|
|
208
209
|
}
|
|
209
|
-
return
|
|
210
|
+
return jsx(WithPluginState, {
|
|
210
211
|
eventDispatcher: eventDispatcher,
|
|
211
212
|
plugins: {
|
|
212
213
|
contextPanel: contextPanelPluginKey,
|
|
@@ -220,7 +221,7 @@ function ContextPanelWithActions(_ref2) {
|
|
|
220
221
|
containerWidth: width,
|
|
221
222
|
contentBreakoutModes: editorView ? getChildBreakoutModes(editorView.state.doc, editorView.state.schema) : []
|
|
222
223
|
});
|
|
223
|
-
return
|
|
224
|
+
return jsx(SwappableContentArea, _extends({}, props, {
|
|
224
225
|
editorView: editorView,
|
|
225
226
|
pluginContent: firstContent,
|
|
226
227
|
editorWidth: editorWidth
|
|
@@ -229,9 +230,9 @@ function ContextPanelWithActions(_ref2) {
|
|
|
229
230
|
});
|
|
230
231
|
}
|
|
231
232
|
export default function ContextPanel(props) {
|
|
232
|
-
return
|
|
233
|
+
return jsx(WithEditorActions, {
|
|
233
234
|
render: function render(actions) {
|
|
234
|
-
return
|
|
235
|
+
return jsx(ContextPanelWithActions, _extends({
|
|
235
236
|
actions: actions
|
|
236
237
|
}, props));
|
|
237
238
|
}
|
|
@@ -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 { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
15
16
|
import { whichTransitionEvent } from '../../utils';
|
|
16
17
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
@@ -106,14 +107,14 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
|
|
|
106
107
|
if (!items && !pluginHooks || !editorView) {
|
|
107
108
|
return null;
|
|
108
109
|
}
|
|
109
|
-
return
|
|
110
|
+
return jsx(ErrorBoundary, {
|
|
110
111
|
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
111
112
|
fallbackComponent: null
|
|
112
|
-
},
|
|
113
|
+
}, jsx(MountPluginHooks, {
|
|
113
114
|
editorView: editorView,
|
|
114
115
|
pluginHooks: pluginHooks,
|
|
115
116
|
containerElement: containerElement
|
|
116
|
-
}),
|
|
117
|
+
}), jsx("div", {
|
|
117
118
|
css: pluginsComponentsWrapper
|
|
118
119
|
}, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
|
|
119
120
|
var props = {
|
|
@@ -7,8 +7,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
7
7
|
var _templateObject;
|
|
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';
|
|
11
|
-
import { css } from '@emotion/react';
|
|
12
|
+
import { css, jsx } from '@emotion/react';
|
|
12
13
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
13
14
|
var toolbarComponentsWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n @media (max-width: ", "px) {\n justify-content: space-between;\n }\n"])), akEditorMobileMaxWidth);
|
|
14
15
|
export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
@@ -44,7 +45,7 @@ export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
|
44
45
|
if (!items || !items.length) {
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
47
|
-
return
|
|
48
|
+
return jsx("div", {
|
|
48
49
|
css: toolbarComponentsWrapper
|
|
49
50
|
}, items.map(function (component, key) {
|
|
50
51
|
var props = {
|
|
@@ -2,8 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject;
|
|
5
|
+
/** @jsx jsx */
|
|
5
6
|
import React, { useMemo } from 'react';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
8
9
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
import { useElementWidth } from './hooks';
|
|
@@ -28,13 +29,13 @@ export var ToolbarWithSizeDetector = function ToolbarWithSizeDetector(props) {
|
|
|
28
29
|
var minWidth = "min-width: ".concat(props.hasMinWidth ? toolbarMinWidth : '254', "px");
|
|
29
30
|
return [toolbar, minWidth];
|
|
30
31
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
31
|
-
return
|
|
32
|
+
return jsx("div", {
|
|
32
33
|
css: toolbarStyle
|
|
33
|
-
},
|
|
34
|
+
}, jsx(WidthObserver, {
|
|
34
35
|
setWidth: setWidth
|
|
35
|
-
}), props.editorView && toolbarSize ?
|
|
36
|
+
}), props.editorView && toolbarSize ? jsx(Toolbar, _extends({}, props, {
|
|
36
37
|
toolbarSize: toolbarSize
|
|
37
|
-
})) :
|
|
38
|
+
})) : jsx("div", {
|
|
38
39
|
ref: ref
|
|
39
40
|
}));
|
|
40
41
|
};
|
|
@@ -12,6 +12,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
12
12
|
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; }
|
|
13
13
|
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); }; }
|
|
14
14
|
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; } }
|
|
15
|
+
/** @jsx jsx */
|
|
16
|
+
import { jsx } from '@emotion/react';
|
|
15
17
|
import ReactDOM from 'react-dom';
|
|
16
18
|
import { PureComponent } from 'react';
|
|
17
19
|
import PropTypes from 'prop-types';
|
|
@@ -150,20 +152,20 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
150
152
|
popupsMountPoint = _this$props.popupsMountPoint,
|
|
151
153
|
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
152
154
|
popupsScrollableElement = _this$props.popupsScrollableElement;
|
|
153
|
-
var iconBefore = this.state.jiraIssueCollectorScriptLoading ?
|
|
155
|
+
var iconBefore = this.state.jiraIssueCollectorScriptLoading ? jsx(Spinner, null) : undefined;
|
|
154
156
|
|
|
155
157
|
// JIRA issue collector script is using jQuery internally
|
|
156
|
-
return this.hasJquery() ?
|
|
158
|
+
return this.hasJquery() ? jsx("div", {
|
|
157
159
|
css: wrapper
|
|
158
|
-
},
|
|
160
|
+
}, jsx(ToolbarButton, {
|
|
159
161
|
ref: this.handleRef,
|
|
160
162
|
iconBefore: iconBefore,
|
|
161
163
|
onClick: this.collectFeedback,
|
|
162
164
|
selected: false,
|
|
163
165
|
spacing: "compact"
|
|
164
|
-
},
|
|
166
|
+
}, jsx("span", {
|
|
165
167
|
css: buttonContent
|
|
166
|
-
}, "Feedback")), this.state.showOptOutOption &&
|
|
168
|
+
}, "Feedback")), this.state.showOptOutOption && jsx(PopupWithOutsideListeners, {
|
|
167
169
|
target: this.state.target,
|
|
168
170
|
mountTo: popupsMountPoint,
|
|
169
171
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -172,19 +174,19 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
172
174
|
fitWidth: POPUP_WIDTH,
|
|
173
175
|
handleClickOutside: this.toggleShowOptOutOption,
|
|
174
176
|
handleEscapeKeydown: this.toggleShowOptOutOption
|
|
175
|
-
},
|
|
177
|
+
}, jsx("div", {
|
|
176
178
|
css: confirmationPopup
|
|
177
|
-
},
|
|
179
|
+
}, jsx("div", {
|
|
178
180
|
css: confirmationHeader
|
|
179
|
-
},
|
|
181
|
+
}, jsx("img", {
|
|
180
182
|
css: confirmationImg,
|
|
181
183
|
src: EDITOR_IMAGE_URL
|
|
182
|
-
})),
|
|
184
|
+
})), jsx("div", {
|
|
183
185
|
css: confirmationText
|
|
184
|
-
},
|
|
186
|
+
}, jsx("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), jsx("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), jsx(ButtonGroup, null, jsx(Button, {
|
|
185
187
|
appearance: "primary",
|
|
186
188
|
onClick: this.openFeedbackPopup
|
|
187
|
-
}, "Give feedback"),
|
|
189
|
+
}, "Give feedback"), jsx(Button, {
|
|
188
190
|
appearance: "default",
|
|
189
191
|
onClick: this.openLearnMorePage
|
|
190
192
|
}, "Learn more")))))) : null;
|
|
@@ -197,7 +199,7 @@ _defineProperty(ToolbarFeedbackInternal, "contextTypes", {
|
|
|
197
199
|
});
|
|
198
200
|
export default function ToolbarFeedback(props) {
|
|
199
201
|
var api = usePresetContext();
|
|
200
|
-
return
|
|
202
|
+
return jsx(ToolbarFeedbackInternal, _extends({
|
|
201
203
|
api: api
|
|
202
204
|
}, props));
|
|
203
205
|
}
|
|
@@ -9,8 +9,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
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, keyframes } from '@emotion/react';
|
|
14
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
14
15
|
import { R100 } from '@atlaskit/theme/colors';
|
|
15
16
|
var pulseBackground = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, ".concat(R100, ")"));
|
|
16
17
|
var pulseBackgroundReverse = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n background-color: ", ";\n }\n 50% {\n background-color: auto;\n }\n 100% {\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, ".concat(R100, ")"), "var(--ds-blanket-danger, ".concat(R100, ")"));
|
|
@@ -36,7 +37,7 @@ var WithFlash = /*#__PURE__*/function (_React$Component) {
|
|
|
36
37
|
animate = _this$props.animate,
|
|
37
38
|
children = _this$props.children;
|
|
38
39
|
this.toggle = animate && !this.toggle;
|
|
39
|
-
return
|
|
40
|
+
return jsx("div", {
|
|
40
41
|
css: animate ? flashWrapperAnimated : flashWrapper,
|
|
41
42
|
className: this.toggle ? '-flash' : ''
|
|
42
43
|
}, children);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.5.
|
|
2
|
+
export var version = "189.5.6";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "189.5.
|
|
3
|
+
"version": "189.5.6",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
48
48
|
"@atlaskit/avatar": "^21.4.0",
|
|
49
49
|
"@atlaskit/avatar-group": "^9.4.0",
|
|
50
|
-
"@atlaskit/button": "^16.
|
|
50
|
+
"@atlaskit/button": "^16.18.0",
|
|
51
51
|
"@atlaskit/checkbox": "^13.0.0",
|
|
52
52
|
"@atlaskit/date": "^0.10.0",
|
|
53
53
|
"@atlaskit/datetime-picker": "^13.0.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@atlaskit/editor-plugin-list": "^1.4.0",
|
|
92
92
|
"@atlaskit/editor-plugin-loom": "^0.1.0",
|
|
93
93
|
"@atlaskit/editor-plugin-max-content-size": "^0.1.0",
|
|
94
|
-
"@atlaskit/editor-plugin-media": "^0.
|
|
94
|
+
"@atlaskit/editor-plugin-media": "^0.6.0",
|
|
95
95
|
"@atlaskit/editor-plugin-mentions": "^0.1.0",
|
|
96
96
|
"@atlaskit/editor-plugin-panel": "^0.1.0",
|
|
97
97
|
"@atlaskit/editor-plugin-paste": "^0.1.0",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"@af/visual-regression": "*",
|
|
172
172
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
173
173
|
"@atlaskit/code": "^15.1.0",
|
|
174
|
-
"@atlaskit/collab-provider": "9.18.
|
|
174
|
+
"@atlaskit/collab-provider": "9.18.4",
|
|
175
175
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
176
176
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
177
177
|
"@atlaskit/editor-palette": "1.5.2",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
186
186
|
"@atlaskit/menu": "^2.1.0",
|
|
187
187
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
188
|
-
"@atlaskit/renderer": "^108.
|
|
188
|
+
"@atlaskit/renderer": "^108.20.0",
|
|
189
189
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
190
190
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
191
191
|
"@atlaskit/visual-regression": "*",
|
|
@@ -353,6 +353,14 @@
|
|
|
353
353
|
},
|
|
354
354
|
"platform.editor.loom-integration": {
|
|
355
355
|
"type": "boolean"
|
|
356
|
+
},
|
|
357
|
+
"platform.editor.a11y-media_er96o": {
|
|
358
|
+
"type": "boolean",
|
|
359
|
+
"referenceOnly": "true"
|
|
360
|
+
},
|
|
361
|
+
"platform.editor.a11y-media-resizing_b5v0o": {
|
|
362
|
+
"type": "boolean",
|
|
363
|
+
"referenceOnly": "true"
|
|
356
364
|
}
|
|
357
365
|
}
|
|
358
366
|
}
|