@atlaskit/editor-core 189.4.15 → 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 +34 -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/pm-plugins/unique-id.js +4 -3
- 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/pm-plugins/unique-id.js +4 -3
- 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/pm-plugins/unique-id.js +4 -3
- 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 +9 -5
|
@@ -31,7 +31,6 @@ var _document = require("../../utils/document");
|
|
|
31
31
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
32
32
|
var _excluded = ["actions"];
|
|
33
33
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
34
|
-
/** @jsx jsx */
|
|
35
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
35
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
36
|
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; }
|
|
@@ -99,7 +98,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
99
98
|
if (!currentPluginContent) {
|
|
100
99
|
return;
|
|
101
100
|
}
|
|
102
|
-
return
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_Transition.default, {
|
|
103
102
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
104
103
|
in: !!pluginContent,
|
|
105
104
|
mountOnEnter: true,
|
|
@@ -114,7 +113,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
114
113
|
if (!children) {
|
|
115
114
|
return;
|
|
116
115
|
}
|
|
117
|
-
return
|
|
116
|
+
return /*#__PURE__*/_react.default.createElement(_Transition.default, {
|
|
118
117
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
119
118
|
in: isVisible,
|
|
120
119
|
mountOnEnter: true,
|
|
@@ -149,7 +148,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
149
148
|
var width = _editorSharedStyles.akEditorContextPanelWidth;
|
|
150
149
|
var userVisible = !!this.props.visible;
|
|
151
150
|
var visible = userVisible || !!this.state.currentPluginContent;
|
|
152
|
-
return
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(_ui.ContextPanelConsumer, null, function (_ref) {
|
|
153
152
|
var broadcastWidth = _ref.broadcastWidth,
|
|
154
153
|
broadcastPosition = _ref.broadcastPosition,
|
|
155
154
|
positionedOverEditor = _ref.positionedOverEditor;
|
|
@@ -157,7 +156,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
157
156
|
var newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
|
|
158
157
|
broadcastWidth(contextPanelWidth);
|
|
159
158
|
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
160
|
-
return
|
|
159
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
161
160
|
css: [panel, !visible && panelHidden,
|
|
162
161
|
/**
|
|
163
162
|
* Only use absolute position for panel when screen size is wide enough
|
|
@@ -167,7 +166,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
167
166
|
"data-testid": "context-panel-panel",
|
|
168
167
|
"aria-labelledby": "context-panel-title",
|
|
169
168
|
role: "dialog"
|
|
170
|
-
},
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
171
170
|
"data-testid": "context-panel-content",
|
|
172
171
|
css: [content, !visible && panelHidden]
|
|
173
172
|
}, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
|
|
@@ -213,11 +212,11 @@ function ContextPanelWithActions(_ref2) {
|
|
|
213
212
|
var _useContext = (0, _react.useContext)(_ui.WidthContext),
|
|
214
213
|
width = _useContext.width;
|
|
215
214
|
if (!eventDispatcher) {
|
|
216
|
-
return
|
|
215
|
+
return /*#__PURE__*/_react.default.createElement(SwappableContentArea, (0, _extends2.default)({
|
|
217
216
|
editorView: editorView
|
|
218
217
|
}, props));
|
|
219
218
|
}
|
|
220
|
-
return
|
|
219
|
+
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
221
220
|
eventDispatcher: eventDispatcher,
|
|
222
221
|
plugins: {
|
|
223
222
|
contextPanel: contextPanelPluginKey,
|
|
@@ -231,7 +230,7 @@ function ContextPanelWithActions(_ref2) {
|
|
|
231
230
|
containerWidth: width,
|
|
232
231
|
contentBreakoutModes: editorView ? (0, _document.getChildBreakoutModes)(editorView.state.doc, editorView.state.schema) : []
|
|
233
232
|
});
|
|
234
|
-
return
|
|
233
|
+
return /*#__PURE__*/_react.default.createElement(SwappableContentArea, (0, _extends2.default)({}, props, {
|
|
235
234
|
editorView: editorView,
|
|
236
235
|
pluginContent: firstContent,
|
|
237
236
|
editorWidth: editorWidth
|
|
@@ -240,9 +239,9 @@ function ContextPanelWithActions(_ref2) {
|
|
|
240
239
|
});
|
|
241
240
|
}
|
|
242
241
|
function ContextPanel(props) {
|
|
243
|
-
return
|
|
242
|
+
return /*#__PURE__*/_react.default.createElement(_WithEditorActions.default, {
|
|
244
243
|
render: function render(actions) {
|
|
245
|
-
return
|
|
244
|
+
return /*#__PURE__*/_react.default.createElement(ContextPanelWithActions, (0, _extends2.default)({
|
|
246
245
|
actions: actions
|
|
247
246
|
}, props));
|
|
248
247
|
}
|
|
@@ -20,7 +20,6 @@ var _utils = require("../../utils");
|
|
|
20
20
|
var _ErrorBoundary = require("../ErrorBoundary");
|
|
21
21
|
var _mountPluginHooks = require("./mount-plugin-hooks");
|
|
22
22
|
var _templateObject;
|
|
23
|
-
/** @jsx jsx */
|
|
24
23
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
24
|
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; } }
|
|
26
25
|
var pluginsComponentsWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
|
|
@@ -114,14 +113,14 @@ var PluginSlot = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
114
113
|
if (!items && !pluginHooks || !editorView) {
|
|
115
114
|
return null;
|
|
116
115
|
}
|
|
117
|
-
return
|
|
116
|
+
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
|
|
118
117
|
component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
|
|
119
118
|
fallbackComponent: null
|
|
120
|
-
},
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement(_mountPluginHooks.MountPluginHooks, {
|
|
121
120
|
editorView: editorView,
|
|
122
121
|
pluginHooks: pluginHooks,
|
|
123
122
|
containerElement: containerElement
|
|
124
|
-
}),
|
|
123
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
124
|
css: pluginsComponentsWrapper
|
|
126
125
|
}, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
|
|
127
126
|
var props = {
|
|
@@ -15,7 +15,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
var _templateObject;
|
|
18
|
-
/** @jsx jsx */
|
|
19
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
19
|
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; } }
|
|
21
20
|
var toolbarComponentsWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n\n @media (max-width: ", "px) {\n justify-content: space-between;\n }\n"])), _editorSharedStyles.akEditorMobileMaxWidth);
|
|
@@ -52,7 +51,7 @@ var ToolbarInner = exports.ToolbarInner = /*#__PURE__*/function (_React$Componen
|
|
|
52
51
|
if (!items || !items.length) {
|
|
53
52
|
return null;
|
|
54
53
|
}
|
|
55
|
-
return
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
56
55
|
css: toolbarComponentsWrapper
|
|
57
56
|
}, items.map(function (component, key) {
|
|
58
57
|
var props = {
|
|
@@ -19,7 +19,6 @@ var _Toolbar = require("./Toolbar");
|
|
|
19
19
|
var _types = require("./types");
|
|
20
20
|
var _isFullPage = require("../../utils/is-full-page");
|
|
21
21
|
var _templateObject;
|
|
22
|
-
/** @jsx jsx */
|
|
23
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
24
|
var toolbar = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n position: relative;\n @media (max-width: ", "px) {\n grid-column: 1 / 2;\n grid-row: 2;\n width: calc(100% - 30px);\n margin: 0 15px;\n }\n"])), _editorSharedStyles.akEditorMobileMaxWidth);
|
|
@@ -39,13 +38,13 @@ var ToolbarWithSizeDetector = exports.ToolbarWithSizeDetector = function Toolbar
|
|
|
39
38
|
var minWidth = "min-width: ".concat(props.hasMinWidth ? toolbarMinWidth : '254', "px");
|
|
40
39
|
return [toolbar, minWidth];
|
|
41
40
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
42
|
-
return
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
42
|
css: toolbarStyle
|
|
44
|
-
},
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_widthDetector.WidthObserver, {
|
|
45
44
|
setWidth: setWidth
|
|
46
|
-
}), props.editorView && toolbarSize ?
|
|
45
|
+
}), props.editorView && toolbarSize ? /*#__PURE__*/_react.default.createElement(_Toolbar.Toolbar, (0, _extends2.default)({}, props, {
|
|
47
46
|
toolbarSize: toolbarSize
|
|
48
|
-
})) :
|
|
47
|
+
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
49
48
|
ref: ref
|
|
50
49
|
}));
|
|
51
50
|
};
|
|
@@ -15,9 +15,8 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
-
var _react = require("@emotion/react");
|
|
19
18
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
20
|
-
var
|
|
19
|
+
var _react = require("react");
|
|
21
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
21
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
23
22
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -36,7 +35,7 @@ var _context2 = require("../../presets/context");
|
|
|
36
35
|
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; }
|
|
37
36
|
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) { (0, _defineProperty2.default)(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; }
|
|
38
37
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
39
|
-
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; } }
|
|
38
|
+
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; } }
|
|
40
39
|
var PopupWithOutsideListeners = (0, _withOuterListeners.default)(_ui.Popup);
|
|
41
40
|
var POPUP_HEIGHT = 388;
|
|
42
41
|
var POPUP_WIDTH = 280;
|
|
@@ -158,20 +157,20 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
158
157
|
popupsMountPoint = _this$props.popupsMountPoint,
|
|
159
158
|
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
160
159
|
popupsScrollableElement = _this$props.popupsScrollableElement;
|
|
161
|
-
var iconBefore = this.state.jiraIssueCollectorScriptLoading ?
|
|
160
|
+
var iconBefore = this.state.jiraIssueCollectorScriptLoading ? /*#__PURE__*/React.createElement(_spinner.default, null) : undefined;
|
|
162
161
|
|
|
163
162
|
// JIRA issue collector script is using jQuery internally
|
|
164
|
-
return this.hasJquery() ?
|
|
163
|
+
return this.hasJquery() ? /*#__PURE__*/React.createElement("div", {
|
|
165
164
|
css: _styles.wrapper
|
|
166
|
-
},
|
|
165
|
+
}, /*#__PURE__*/React.createElement(_ToolbarButton.default, {
|
|
167
166
|
ref: this.handleRef,
|
|
168
167
|
iconBefore: iconBefore,
|
|
169
168
|
onClick: this.collectFeedback,
|
|
170
169
|
selected: false,
|
|
171
170
|
spacing: "compact"
|
|
172
|
-
},
|
|
171
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
173
172
|
css: _styles.buttonContent
|
|
174
|
-
}, "Feedback")), this.state.showOptOutOption &&
|
|
173
|
+
}, "Feedback")), this.state.showOptOutOption && /*#__PURE__*/React.createElement(PopupWithOutsideListeners, {
|
|
175
174
|
target: this.state.target,
|
|
176
175
|
mountTo: popupsMountPoint,
|
|
177
176
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -180,32 +179,32 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
180
179
|
fitWidth: POPUP_WIDTH,
|
|
181
180
|
handleClickOutside: this.toggleShowOptOutOption,
|
|
182
181
|
handleEscapeKeydown: this.toggleShowOptOutOption
|
|
183
|
-
},
|
|
182
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
184
183
|
css: _styles.confirmationPopup
|
|
185
|
-
},
|
|
184
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
186
185
|
css: _styles.confirmationHeader
|
|
187
|
-
},
|
|
186
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
188
187
|
css: _styles.confirmationImg,
|
|
189
188
|
src: EDITOR_IMAGE_URL
|
|
190
|
-
})),
|
|
189
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
191
190
|
css: _styles.confirmationText
|
|
192
|
-
},
|
|
191
|
+
}, /*#__PURE__*/React.createElement("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), /*#__PURE__*/React.createElement("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), /*#__PURE__*/React.createElement(_buttonGroup.default, null, /*#__PURE__*/React.createElement(_customThemeButton.default, {
|
|
193
192
|
appearance: "primary",
|
|
194
193
|
onClick: this.openFeedbackPopup
|
|
195
|
-
}, "Give feedback"),
|
|
194
|
+
}, "Give feedback"), /*#__PURE__*/React.createElement(_customThemeButton.default, {
|
|
196
195
|
appearance: "default",
|
|
197
196
|
onClick: this.openLearnMorePage
|
|
198
197
|
}, "Learn more")))))) : null;
|
|
199
198
|
}
|
|
200
199
|
}]);
|
|
201
200
|
return ToolbarFeedbackInternal;
|
|
202
|
-
}(
|
|
201
|
+
}(_react.PureComponent);
|
|
203
202
|
(0, _defineProperty2.default)(ToolbarFeedbackInternal, "contextTypes", {
|
|
204
203
|
editorActions: _propTypes.default.object.isRequired
|
|
205
204
|
});
|
|
206
205
|
function ToolbarFeedback(props) {
|
|
207
206
|
var api = (0, _context2.usePresetContext)();
|
|
208
|
-
return
|
|
207
|
+
return /*#__PURE__*/React.createElement(ToolbarFeedbackInternal, (0, _extends2.default)({
|
|
209
208
|
api: api
|
|
210
209
|
}, props));
|
|
211
210
|
}
|
|
@@ -17,7 +17,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
20
|
-
/** @jsx jsx */
|
|
21
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
21
|
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; } }
|
|
23
22
|
var pulseBackground = (0, _react2.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 50% {\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, ".concat(_colors.R100, ")"));
|
|
@@ -44,7 +43,7 @@ var WithFlash = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
44
43
|
animate = _this$props.animate,
|
|
45
44
|
children = _this$props.children;
|
|
46
45
|
this.toggle = animate && !this.toggle;
|
|
47
|
-
return
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
48
47
|
css: animate ? flashWrapperAnimated : flashWrapper,
|
|
49
48
|
className: this.toggle ? '-flash' : ''
|
|
50
49
|
}, children);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { memo, Fragment, useCallback } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
6
5
|
import { PortalProviderWithThemeProviders, PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
7
6
|
import { BaseTheme, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -46,28 +45,28 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
46
45
|
// it will still be enabled as it currently is. Then we can
|
|
47
46
|
// progressively opt out synthetic tenants.
|
|
48
47
|
const isErrorTrackingExplicitlyDisabled = ((_props$performanceTra3 = props.performanceTracking) === null || _props$performanceTra3 === void 0 ? void 0 : (_props$performanceTra4 = _props$performanceTra3.errorTracking) === null || _props$performanceTra4 === void 0 ? void 0 : _props$performanceTra4.enabled) === false;
|
|
49
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderTrackingEnabled && /*#__PURE__*/React.createElement(RenderTracking, {
|
|
50
49
|
componentProps: props,
|
|
51
50
|
action: ACTION.RE_RENDERED,
|
|
52
51
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
53
52
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
54
53
|
propsToIgnore: ['defaultValue'],
|
|
55
54
|
useShallow: useShallow
|
|
56
|
-
}),
|
|
55
|
+
}), /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
57
56
|
errorTracking: !isErrorTrackingExplicitlyDisabled,
|
|
58
57
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
59
58
|
contextIdentifierProvider: props.contextIdentifierProvider,
|
|
60
59
|
featureFlags: featureFlags
|
|
61
|
-
},
|
|
60
|
+
}, /*#__PURE__*/React.createElement(WidthProvider, {
|
|
62
61
|
css: css({
|
|
63
62
|
height: '100%'
|
|
64
63
|
})
|
|
65
|
-
},
|
|
64
|
+
}, /*#__PURE__*/React.createElement(EditorContext, {
|
|
66
65
|
editorActions: editorActions
|
|
67
|
-
},
|
|
66
|
+
}, /*#__PURE__*/React.createElement(ContextAdapter, null, /*#__PURE__*/React.createElement(PortalProviderWithThemeProviders, {
|
|
68
67
|
onAnalyticsEvent: handleAnalyticsEvent,
|
|
69
68
|
useAnalyticsContext: props.UNSAFE_useAnalyticsContext,
|
|
70
|
-
render: portalProviderAPI =>
|
|
69
|
+
render: portalProviderAPI => /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ReactEditorViewContextWrapper, {
|
|
71
70
|
editorProps: overriddenEditorProps,
|
|
72
71
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
73
72
|
portalProviderAPI: portalProviderAPI,
|
|
@@ -86,9 +85,9 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
86
85
|
editorRef
|
|
87
86
|
}) => {
|
|
88
87
|
var _props$featureFlags, _props$featureFlags2;
|
|
89
|
-
return
|
|
88
|
+
return /*#__PURE__*/React.createElement(BaseTheme, {
|
|
90
89
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
91
|
-
},
|
|
90
|
+
}, /*#__PURE__*/React.createElement(Component, {
|
|
92
91
|
innerRef: editorRef,
|
|
93
92
|
appearance: props.appearance,
|
|
94
93
|
disabled: props.disabled,
|
|
@@ -122,7 +121,7 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
122
121
|
hideAvatarGroup: props.hideAvatarGroup
|
|
123
122
|
}));
|
|
124
123
|
}
|
|
125
|
-
}),
|
|
124
|
+
}), /*#__PURE__*/React.createElement(PortalRenderer, {
|
|
126
125
|
portalProviderAPI: portalProviderAPI
|
|
127
126
|
}))
|
|
128
127
|
}))))));
|
|
@@ -145,7 +144,7 @@ function ReactEditorViewContextWrapper(props) {
|
|
|
145
144
|
setInternalEditorAPI === null || setInternalEditorAPI === void 0 ? void 0 : setInternalEditorAPI(api);
|
|
146
145
|
setExternalEditorAPI === null || setExternalEditorAPI === void 0 ? void 0 : setExternalEditorAPI(api);
|
|
147
146
|
}, [setInternalEditorAPI, setExternalEditorAPI]);
|
|
148
|
-
return
|
|
147
|
+
return /*#__PURE__*/React.createElement(ReactEditorView, _extends({}, props, {
|
|
149
148
|
setEditorApi: setEditorAPI
|
|
150
149
|
}));
|
|
151
150
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { useRef, useCallback, useMemo } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
import uuid from 'uuid/v4';
|
|
5
3
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
6
4
|
import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -70,7 +68,7 @@ function Editor(passedProps) {
|
|
|
70
68
|
};
|
|
71
69
|
useMeasureEditorMountTime(props, getExperienceStore, createAnalyticsEvent);
|
|
72
70
|
const providerFactory = useProviderFactory(props, editorActions.current, createAnalyticsEvent);
|
|
73
|
-
return
|
|
71
|
+
return /*#__PURE__*/React.createElement(EditorInternal, {
|
|
74
72
|
props: props,
|
|
75
73
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
76
74
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -264,7 +262,7 @@ function EditorButBetter(passedProps) {
|
|
|
264
262
|
onSaveFromProps(view);
|
|
265
263
|
}
|
|
266
264
|
}, [onSaveFromProps]);
|
|
267
|
-
return
|
|
265
|
+
return /*#__PURE__*/React.createElement(EditorInternal, {
|
|
268
266
|
props: props,
|
|
269
267
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
270
268
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
@@ -288,17 +286,17 @@ export function ComposableEditor(props) {
|
|
|
288
286
|
};
|
|
289
287
|
}, [props.appearance]);
|
|
290
288
|
if (getBooleanFF('platform.editor.less-editor-props-rerendering')) {
|
|
291
|
-
return
|
|
289
|
+
return /*#__PURE__*/React.createElement(FabricEditorAnalyticsContext
|
|
292
290
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
293
291
|
, {
|
|
294
292
|
data: data
|
|
295
|
-
},
|
|
293
|
+
}, /*#__PURE__*/React.createElement(EditorButBetter, props));
|
|
296
294
|
}
|
|
297
|
-
return
|
|
295
|
+
return /*#__PURE__*/React.createElement(FabricEditorAnalyticsContext
|
|
298
296
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
299
297
|
, {
|
|
300
298
|
data: data
|
|
301
|
-
},
|
|
299
|
+
}, /*#__PURE__*/React.createElement(Editor, props));
|
|
302
300
|
}
|
|
303
301
|
ComposableEditor.propTypes = {
|
|
304
302
|
minHeight: ({
|
package/dist/es2019/editor.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
4
|
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
7
5
|
import { ComposableEditor } from './composable-editor';
|
|
8
6
|
import useUniversalPreset from './presets/useUniversalPreset';
|
|
@@ -12,7 +10,7 @@ const ComposableEditorWrapper = ({
|
|
|
12
10
|
const preset = useUniversalPreset({
|
|
13
11
|
props
|
|
14
12
|
});
|
|
15
|
-
return
|
|
13
|
+
return /*#__PURE__*/React.createElement(ComposableEditor, _extends({
|
|
16
14
|
preset: preset
|
|
17
15
|
}, props));
|
|
18
16
|
};
|
|
@@ -22,7 +20,7 @@ export default class Editor extends React.Component {
|
|
|
22
20
|
editorDeprecationWarnings(props);
|
|
23
21
|
}
|
|
24
22
|
render() {
|
|
25
|
-
return
|
|
23
|
+
return /*#__PURE__*/React.createElement(ComposableEditorWrapper, {
|
|
26
24
|
props: this.props
|
|
27
25
|
});
|
|
28
26
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import { injectIntl } from 'react-intl-next';
|
|
6
4
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
7
5
|
import ToolbarButton from '../../../../ui/ToolbarButton';
|
|
@@ -68,9 +66,9 @@ export class AlignmentToolbar extends React.Component {
|
|
|
68
66
|
intl
|
|
69
67
|
} = this.props;
|
|
70
68
|
const title = intl.formatMessage(messages.alignment);
|
|
71
|
-
return
|
|
69
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
72
70
|
css: wrapper
|
|
73
|
-
},
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
74
72
|
mountTo: popupsMountPoint,
|
|
75
73
|
boundariesElement: popupsBoundariesElement,
|
|
76
74
|
scrollableElement: popupsScrollableElement,
|
|
@@ -97,7 +95,7 @@ export class AlignmentToolbar extends React.Component {
|
|
|
97
95
|
fitWidth: 112,
|
|
98
96
|
fitHeight: 80,
|
|
99
97
|
closeOnTab: true,
|
|
100
|
-
trigger:
|
|
98
|
+
trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
101
99
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
102
100
|
disabled: disabled,
|
|
103
101
|
selected: isOpen,
|
|
@@ -108,21 +106,21 @@ export class AlignmentToolbar extends React.Component {
|
|
|
108
106
|
"aria-haspopup": true,
|
|
109
107
|
onClick: this.toggleOpen,
|
|
110
108
|
onKeyDown: this.toggleOpenByKeyboard,
|
|
111
|
-
iconBefore:
|
|
109
|
+
iconBefore: /*#__PURE__*/React.createElement("div", {
|
|
112
110
|
css: triggerWrapper
|
|
113
|
-
},
|
|
111
|
+
}, /*#__PURE__*/React.createElement(IconMap, {
|
|
114
112
|
alignment: pluginState.align
|
|
115
|
-
}),
|
|
113
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
116
114
|
css: expandIconWrapper
|
|
117
|
-
},
|
|
115
|
+
}, /*#__PURE__*/React.createElement(ExpandIcon, {
|
|
118
116
|
label: ""
|
|
119
117
|
}))),
|
|
120
118
|
ref: this.toolbarItemRef
|
|
121
119
|
})
|
|
122
|
-
},
|
|
120
|
+
}, /*#__PURE__*/React.createElement(Alignment, {
|
|
123
121
|
onClick: align => this.changeAlignment(align, false),
|
|
124
122
|
selectedAlignment: pluginState.align
|
|
125
|
-
})),
|
|
123
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
126
124
|
css: separatorStyles
|
|
127
125
|
}));
|
|
128
126
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { useEffect } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import AvatarsWithPluginState from '../../collab-edit/ui/avatars-with-plugin-state';
|
|
5
4
|
import { useIntl } from 'react-intl-next';
|
|
6
5
|
import { avatarGroupMessages } from '../messages';
|
|
@@ -35,11 +34,11 @@ const AvatarGroupPluginWrapper = props => {
|
|
|
35
34
|
eventType: EVENT_TYPE.UI
|
|
36
35
|
});
|
|
37
36
|
}, [dispatchAnalyticsEvent]);
|
|
38
|
-
return
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
38
|
"aria-label": intl.formatMessage(avatarGroupMessages.editors),
|
|
40
39
|
"data-testid": 'avatar-group-in-plugin',
|
|
41
40
|
css: props.takeFullWidth ? toolbarButtonWrapperFullWidth : toolbarButtonWrapper
|
|
42
|
-
},
|
|
41
|
+
}, /*#__PURE__*/React.createElement(AvatarsWithPluginState, {
|
|
43
42
|
editorView: props.editorView,
|
|
44
43
|
eventDispatcher: props.eventDispatcher,
|
|
45
44
|
inviteToEditComponent: props.collabEdit && props.collabEdit.inviteToEditComponent,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
const beforePrimaryToolbarPluginWrapper = css`
|
|
4
3
|
display: flex;
|
|
5
4
|
margin-right: 8px;
|
|
@@ -7,7 +6,7 @@ const beforePrimaryToolbarPluginWrapper = css`
|
|
|
7
6
|
justify-content: flex-end;
|
|
8
7
|
align-items: center;
|
|
9
8
|
`;
|
|
10
|
-
export const BeforePrimaryToolbarWrapper = props =>
|
|
9
|
+
export const BeforePrimaryToolbarWrapper = props => /*#__PURE__*/React.createElement("div", {
|
|
11
10
|
css: beforePrimaryToolbarPluginWrapper,
|
|
12
11
|
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
13
12
|
}, props.beforePrimaryToolbarComponents);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { B300, N300, N20A } from '@atlaskit/theme/colors';
|
|
6
5
|
import { injectIntl } from 'react-intl-next';
|
|
7
6
|
import { findParentDomRefOfType, findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -87,7 +86,7 @@ class LayoutButton extends React.Component {
|
|
|
87
86
|
if (closestEl && closestEl.firstChild) {
|
|
88
87
|
element = closestEl.firstChild;
|
|
89
88
|
}
|
|
90
|
-
return
|
|
89
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
91
90
|
ariaLabel: title,
|
|
92
91
|
target: element,
|
|
93
92
|
offset: [5, 0],
|
|
@@ -99,15 +98,15 @@ class LayoutButton extends React.Component {
|
|
|
99
98
|
stick: true,
|
|
100
99
|
forcePlacement: true,
|
|
101
100
|
zIndex: belowOtherPopupsZIndex
|
|
102
|
-
},
|
|
101
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
103
102
|
css: toolbarButtonWrapper
|
|
104
|
-
},
|
|
103
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
105
104
|
title: title,
|
|
106
105
|
testId: titleMessage.id,
|
|
107
106
|
onClick: this.handleClick(nextBreakoutMode),
|
|
108
|
-
iconBefore: breakoutMode === 'full-width' ?
|
|
107
|
+
iconBefore: breakoutMode === 'full-width' ? /*#__PURE__*/React.createElement(CollapseIcon, {
|
|
109
108
|
label: title
|
|
110
|
-
}) :
|
|
109
|
+
}) : /*#__PURE__*/React.createElement(ExpandIcon, {
|
|
111
110
|
label: title
|
|
112
111
|
})
|
|
113
112
|
})));
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
5
3
|
import { avatarContainer } from './styles';
|
|
6
4
|
import toAvatar from './to-avatar';
|
|
@@ -16,9 +14,9 @@ export const Avatars = /*#__PURE__*/React.memo(props => {
|
|
|
16
14
|
if (!avatars.length) {
|
|
17
15
|
return null;
|
|
18
16
|
}
|
|
19
|
-
return
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
18
|
css: avatarContainer
|
|
21
|
-
},
|
|
19
|
+
}, /*#__PURE__*/React.createElement(AvatarGroup, {
|
|
22
20
|
appearance: "stack",
|
|
23
21
|
size: "medium",
|
|
24
22
|
data: avatars,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import { getAvatarColor } from '../utils';
|
|
4
2
|
import { badge } from './styles';
|
|
5
3
|
export const ColoredAvatarItem = props => {
|
|
6
4
|
const color = getAvatarColor(props.sessionId).color.solid;
|
|
7
5
|
const avatar = props.name.substr(0, 1).toUpperCase();
|
|
8
|
-
return
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
7
|
css: badge(color),
|
|
10
8
|
"data-testid": "editor-collab-badge"
|
|
11
9
|
}, avatar);
|