@atlaskit/editor-core 195.6.1 → 195.7.0
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 +30 -0
- package/dist/cjs/create-editor/ReactEditorView.js +2 -10
- package/dist/cjs/create-editor/create-editor.js +0 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +64 -60
- package/dist/cjs/ui/ContextPanel/deprecated.js +283 -0
- package/dist/cjs/ui/ContextPanel/index.js +26 -133
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -6
- package/dist/es2019/create-editor/create-editor.js +0 -1
- package/dist/es2019/index.js +6 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +4 -1
- package/dist/es2019/ui/ContextPanel/deprecated.js +258 -0
- package/dist/es2019/ui/ContextPanel/index.js +24 -133
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -10
- package/dist/esm/create-editor/create-editor.js +0 -1
- package/dist/esm/index.js +6 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +64 -60
- package/dist/esm/ui/ContextPanel/deprecated.js +277 -0
- package/dist/esm/ui/ContextPanel/index.js +24 -132
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +3 -5
- package/dist/types/create-editor/create-universal-preset.d.ts +78 -0
- package/dist/types/create-editor/get-plugins.d.ts +0 -2
- package/dist/types/index.d.ts +6 -1
- package/dist/types/presets/default.d.ts +66 -0
- package/dist/types/presets/universal.d.ts +78 -0
- package/dist/types/presets/useUniversalPreset.d.ts +78 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +3 -1
- package/dist/types/ui/ContextPanel/deprecated.d.ts +44 -0
- package/dist/types/ui/ContextPanel/index.d.ts +5 -9
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +3 -5
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +78 -0
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +0 -2
- package/dist/types-ts4.5/index.d.ts +6 -1
- package/dist/types-ts4.5/presets/default.d.ts +66 -0
- package/dist/types-ts4.5/presets/universal.d.ts +78 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +78 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +5 -1
- package/dist/types-ts4.5/ui/ContextPanel/deprecated.d.ts +44 -0
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +7 -9
- package/package.json +10 -19
|
@@ -4,55 +4,18 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
* @jsxRuntime classic
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import Transition from 'react-transition-group/Transition';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
|
+
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
14
|
+
import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
16
|
import { N30 } from '@atlaskit/theme/colors';
|
|
17
|
-
import
|
|
18
|
-
import WithEditorActions from '../WithEditorActions';
|
|
17
|
+
import ContextPanelDeprecated from './deprecated';
|
|
19
18
|
const ANIM_SPEED_MS = 500;
|
|
20
|
-
const EDITOR_WIDTH = akEditorDefaultLayoutWidth + akEditorBreakoutPadding;
|
|
21
|
-
const WIDE_EDITOR_WIDTH = akEditorWideLayoutWidth + akEditorBreakoutPadding;
|
|
22
|
-
const FULLWIDTH_MODE = 'full-width';
|
|
23
|
-
const WIDE_MODE = 'wide';
|
|
24
|
-
const absolutePanelStyles = css({
|
|
25
|
-
position: 'absolute',
|
|
26
|
-
right: 0,
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
-
height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()})`
|
|
29
|
-
});
|
|
30
|
-
const checkTableExistsInDoc = editorView => {
|
|
31
|
-
const tableNodeSchema = editorView.state.schema.nodes.table;
|
|
32
|
-
let findResult = findChildrenByType(editorView.state.doc, tableNodeSchema);
|
|
33
|
-
return findResult.length > 0;
|
|
34
|
-
};
|
|
35
|
-
export const shouldPanelBePositionedOverEditor = (editorWidth, panelWidth, editorView) => {
|
|
36
|
-
const {
|
|
37
|
-
lineLength,
|
|
38
|
-
containerWidth = 0,
|
|
39
|
-
contentBreakoutModes
|
|
40
|
-
} = editorWidth;
|
|
41
|
-
const editorNotFullWidth = !(lineLength && lineLength > akEditorDefaultLayoutWidth);
|
|
42
|
-
const hasSpaceForPanel = !contentBreakoutModes.length && containerWidth >= panelWidth * 2 + EDITOR_WIDTH;
|
|
43
|
-
const hasSpaceForWideBreakoutsAndPanel = !contentBreakoutModes.includes(FULLWIDTH_MODE) && contentBreakoutModes.includes(WIDE_MODE) && containerWidth >= panelWidth * 2 + WIDE_EDITOR_WIDTH;
|
|
44
|
-
if (!editorView) {
|
|
45
|
-
return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel);
|
|
46
|
-
} else {
|
|
47
|
-
// when custom table width feature flag is on,
|
|
48
|
-
// there are scenarios when a table has attr layout default, but width is in full-width or very wide
|
|
49
|
-
// but in this case we still want the shouldPanelBePositionedOverEditor return false
|
|
50
|
-
// previous logic is returning false when table layout default
|
|
51
|
-
// but when custom table width feature flag is one, we want to return false whenever there is a table in the doc
|
|
52
|
-
const isTableInDoc = checkTableExistsInDoc(editorView);
|
|
53
|
-
return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel) && !isTableInDoc;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
19
|
const panelHidden = css({
|
|
57
20
|
width: 0
|
|
58
21
|
});
|
|
@@ -87,13 +50,13 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
87
50
|
currentPluginContent: undefined
|
|
88
51
|
});
|
|
89
52
|
_defineProperty(this, "focusEditor", () => {
|
|
53
|
+
var _editorAPI$core;
|
|
90
54
|
const {
|
|
91
|
-
|
|
55
|
+
editorAPI
|
|
92
56
|
} = this.props;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
57
|
+
editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : _editorAPI$core.actions.focus({
|
|
58
|
+
scrollIntoView: false
|
|
59
|
+
});
|
|
97
60
|
});
|
|
98
61
|
_defineProperty(this, "showPluginContent", () => {
|
|
99
62
|
const {
|
|
@@ -150,29 +113,16 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
150
113
|
});
|
|
151
114
|
}
|
|
152
115
|
render() {
|
|
153
|
-
const {
|
|
154
|
-
editorWidth,
|
|
155
|
-
editorView
|
|
156
|
-
} = this.props;
|
|
157
116
|
const width = akEditorContextPanelWidth;
|
|
158
117
|
const userVisible = !!this.props.visible;
|
|
159
118
|
const visible = userVisible || !!this.state.currentPluginContent;
|
|
160
119
|
return jsx(ContextPanelConsumer, null, ({
|
|
161
|
-
broadcastWidth
|
|
162
|
-
broadcastPosition,
|
|
163
|
-
positionedOverEditor
|
|
120
|
+
broadcastWidth
|
|
164
121
|
}) => {
|
|
165
122
|
const contextPanelWidth = visible ? width : 0;
|
|
166
|
-
const newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
|
|
167
123
|
broadcastWidth(contextPanelWidth);
|
|
168
|
-
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
169
124
|
return jsx("div", {
|
|
170
|
-
css: [panel, !visible && panelHidden,
|
|
171
|
-
/**
|
|
172
|
-
* Only use absolute position for panel when screen size is wide enough
|
|
173
|
-
* to accommodate breakout content and editor is not in wide mode.
|
|
174
|
-
*/
|
|
175
|
-
newPosition && absolutePanelStyles],
|
|
125
|
+
css: [panel, !visible && panelHidden],
|
|
176
126
|
"data-testid": "context-panel-panel",
|
|
177
127
|
"aria-labelledby": "context-panel-title",
|
|
178
128
|
role: "dialog"
|
|
@@ -183,76 +133,17 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
183
133
|
});
|
|
184
134
|
}
|
|
185
135
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
// not have access to the pluginInjectionApi at this location.
|
|
189
|
-
// It might be that we need to inject the pluginInjectionApi
|
|
190
|
-
// via context so that we can use it in this file (similar to
|
|
191
|
-
// WithEditorActions). To be investigated further.
|
|
192
|
-
|
|
193
|
-
// @ts-ignore
|
|
194
|
-
const widthPluginKey = {
|
|
195
|
-
key: 'widthPlugin$',
|
|
196
|
-
getState: state => {
|
|
197
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
198
|
-
return state['widthPlugin$'];
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
// @ts-ignore
|
|
203
|
-
const contextPanelPluginKey = {
|
|
204
|
-
key: 'contextPanelPluginKey$',
|
|
205
|
-
getState: state => {
|
|
206
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
207
|
-
return state['contextPanelPluginKey$'];
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
function ContextPanelWithActions({
|
|
211
|
-
actions,
|
|
212
|
-
...props
|
|
213
|
-
}) {
|
|
214
|
-
const eventDispatcher = actions._privateGetEventDispatcher();
|
|
215
|
-
const editorView = actions._privateGetEditorView();
|
|
136
|
+
export function ContextPanel(props) {
|
|
137
|
+
var _contextPanelState$co;
|
|
216
138
|
const {
|
|
217
|
-
|
|
218
|
-
} =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
return (
|
|
225
|
-
// @ts-ignore - 'WithPluginState' cannot be used as a JSX component.
|
|
226
|
-
// This error was introduced after upgrading to TypeScript 5
|
|
227
|
-
jsx(WithPluginState, {
|
|
228
|
-
eventDispatcher: eventDispatcher,
|
|
229
|
-
plugins: {
|
|
230
|
-
contextPanel: contextPanelPluginKey,
|
|
231
|
-
widthState: widthPluginKey
|
|
232
|
-
},
|
|
233
|
-
render: ({
|
|
234
|
-
contextPanel,
|
|
235
|
-
widthState
|
|
236
|
-
}) => {
|
|
237
|
-
const firstContent = contextPanel && contextPanel.contents.find(Boolean);
|
|
238
|
-
const editorWidth = {
|
|
239
|
-
...widthState,
|
|
240
|
-
containerWidth: width,
|
|
241
|
-
contentBreakoutModes: editorView ? getChildBreakoutModes(editorView.state.doc, editorView.state.schema) : []
|
|
242
|
-
};
|
|
243
|
-
return jsx(SwappableContentArea, _extends({}, props, {
|
|
244
|
-
editorView: editorView,
|
|
245
|
-
pluginContent: firstContent,
|
|
246
|
-
editorWidth: editorWidth
|
|
247
|
-
}));
|
|
248
|
-
}
|
|
249
|
-
})
|
|
250
|
-
);
|
|
139
|
+
contextPanelState
|
|
140
|
+
} = useSharedPluginState(props.editorAPI, ['contextPanel']);
|
|
141
|
+
const firstContent = contextPanelState && (contextPanelState === null || contextPanelState === void 0 ? void 0 : (_contextPanelState$co = contextPanelState.contents) === null || _contextPanelState$co === void 0 ? void 0 : _contextPanelState$co.find(Boolean));
|
|
142
|
+
return jsx(SwappableContentArea, _extends({}, props, {
|
|
143
|
+
editorAPI: props.editorAPI,
|
|
144
|
+
pluginContent: firstContent
|
|
145
|
+
}));
|
|
251
146
|
}
|
|
252
|
-
export default function
|
|
253
|
-
return jsx(
|
|
254
|
-
render: actions => jsx(ContextPanelWithActions, _extends({
|
|
255
|
-
actions: actions
|
|
256
|
-
}, props))
|
|
257
|
-
});
|
|
147
|
+
export default function ContextPanelDefault(props) {
|
|
148
|
+
return fg('platform_editor_context-panel_simplify_behaviour') ? jsx(ContextPanel, props) : jsx(ContextPanelDeprecated, props);
|
|
258
149
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "195.
|
|
2
|
+
export const version = "195.7.0";
|
|
@@ -79,11 +79,11 @@ function handleEditorFocus(view) {
|
|
|
79
79
|
export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
80
80
|
_inherits(ReactEditorView, _React$Component);
|
|
81
81
|
var _super = _createSuper(ReactEditorView);
|
|
82
|
-
function ReactEditorView(props
|
|
82
|
+
function ReactEditorView(props) {
|
|
83
83
|
var _props$setEditorApi, _props$editorProps;
|
|
84
84
|
var _this;
|
|
85
85
|
_classCallCheck(this, ReactEditorView);
|
|
86
|
-
_this = _super.call(this, props
|
|
86
|
+
_this = _super.call(this, props);
|
|
87
87
|
_defineProperty(_assertThisInitialized(_this), "editorRef", /*#__PURE__*/React.createRef());
|
|
88
88
|
// ProseMirror is instantiated prior to the initial React render cycle,
|
|
89
89
|
// so we allow transactions by default, to avoid discarding the initial one.
|
|
@@ -128,7 +128,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
128
128
|
_this.featureFlags = createFeatureFlagsFromProps(_this.props.editorProps);
|
|
129
129
|
_this.editorState = _this.createEditorState({
|
|
130
130
|
props: _this.props,
|
|
131
|
-
context: _this.context,
|
|
132
131
|
doc: doc,
|
|
133
132
|
resetting: true,
|
|
134
133
|
selectionAtStart: !shouldScrollToBottom
|
|
@@ -194,9 +193,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
194
193
|
eventDispatcher: _this.eventDispatcher,
|
|
195
194
|
providerFactory: options.props.providerFactory,
|
|
196
195
|
portalProviderAPI: _this.props.portalProviderAPI,
|
|
197
|
-
reactContext: function reactContext() {
|
|
198
|
-
return options.context;
|
|
199
|
-
},
|
|
200
196
|
dispatchAnalyticsEvent: _this.dispatchAnalyticsEvent,
|
|
201
197
|
performanceTracking: _this.props.editorProps.performanceTracking,
|
|
202
198
|
transactionTracker: _this.transactionTracker,
|
|
@@ -575,7 +571,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
575
571
|
_this.eventDispatcher.on('resetEditorState', _this.resetEditorState);
|
|
576
572
|
_this.editorState = _this.createEditorState({
|
|
577
573
|
props: props,
|
|
578
|
-
context: context,
|
|
579
574
|
doc: props.editorProps.defaultValue,
|
|
580
575
|
// ED-4759: Don't set selection at end for full-page editor - should be at start.
|
|
581
576
|
selectionAtStart: isFullPage(props.editorProps.appearance)
|
|
@@ -690,9 +685,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
690
685
|
eventDispatcher: this.eventDispatcher,
|
|
691
686
|
providerFactory: props.providerFactory,
|
|
692
687
|
portalProviderAPI: props.portalProviderAPI,
|
|
693
|
-
reactContext: function reactContext() {
|
|
694
|
-
return _this2.context;
|
|
695
|
-
},
|
|
696
688
|
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
697
689
|
performanceTracking: props.editorProps.performanceTracking,
|
|
698
690
|
transactionTracker: this.transactionTracker,
|
|
@@ -120,7 +120,6 @@ export function createPMPlugins(config) {
|
|
|
120
120
|
providerFactory: config.providerFactory,
|
|
121
121
|
errorReporter: config.errorReporter,
|
|
122
122
|
portalProviderAPI: config.portalProviderAPI,
|
|
123
|
-
reactContext: config.reactContext,
|
|
124
123
|
dispatchAnalyticsEvent: config.dispatchAnalyticsEvent,
|
|
125
124
|
featureFlags: config.featureFlags || {},
|
|
126
125
|
getIntl: config.getIntl
|
package/dist/esm/index.js
CHANGED
|
@@ -7,7 +7,12 @@ export { default as WithHelpTrigger } from './ui/WithHelpTrigger';
|
|
|
7
7
|
export { default as CollapsedEditor } from './ui/CollapsedEditor';
|
|
8
8
|
export { default as ToolbarHelp } from './ui/ToolbarHelp';
|
|
9
9
|
export { default as ToolbarFeedback } from './ui/ToolbarFeedback';
|
|
10
|
-
export {
|
|
10
|
+
export {
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
* DO NOT USE THIS WILL BE REMOVED SOON. This was intended for internal usage only
|
|
14
|
+
*/
|
|
15
|
+
default as ContextPanel } from './ui/ContextPanel/deprecated';
|
|
11
16
|
export { EmojiResource } from '@atlaskit/emoji/resource';
|
|
12
17
|
export { MentionResource } from '@atlaskit/mention/resource';
|
|
13
18
|
export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
@@ -97,6 +97,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
97
97
|
featureFlags: props.featureFlags,
|
|
98
98
|
hideAvatarGroup: props.hideAvatarGroup
|
|
99
99
|
}), jsx(FullPageContentArea, {
|
|
100
|
+
editorAPI: editorAPI,
|
|
100
101
|
ref: scrollContentContainerRef,
|
|
101
102
|
appearance: props.appearance,
|
|
102
103
|
contentComponents: props.contentComponents,
|
|
@@ -36,67 +36,71 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36
36
|
}, []);
|
|
37
37
|
return jsx(WidthConsumer, null, function (_ref) {
|
|
38
38
|
var width = _ref.width;
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className: "fabric-editor-popup-scroll-parent",
|
|
56
|
-
featureFlags: props.featureFlags,
|
|
57
|
-
ref: scrollContainerRef
|
|
58
|
-
}, jsx(ClickAreaBlock, {
|
|
59
|
-
editorView: props.editorView,
|
|
60
|
-
editorDisabled: props.disabled
|
|
61
|
-
}, jsx("div", {
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
63
|
-
css: editorContentAreaStyle({
|
|
64
|
-
fullWidthMode: fullWidthMode,
|
|
65
|
-
layoutMaxWidth: theme.layoutMaxWidth,
|
|
66
|
-
containerWidth: width
|
|
67
|
-
}),
|
|
68
|
-
role: "region",
|
|
69
|
-
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
70
|
-
ref: contentAreaRef
|
|
71
|
-
}, jsx("div", {
|
|
72
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
73
|
-
css: editorContentGutterStyle()
|
|
39
|
+
return (
|
|
40
|
+
// Cleaned up with: platform_editor_context-panel_simplify_behaviour
|
|
41
|
+
jsx(ContextPanelConsumer, null, function (_ref2) {
|
|
42
|
+
var _contentAreaRef$curre;
|
|
43
|
+
var positionedOverEditor = _ref2.positionedOverEditor;
|
|
44
|
+
return jsx("div", {
|
|
45
|
+
css: [
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
47
|
+
contentArea,
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
49
|
+
props.isEditorToolbarHidden && contentAreaHeightNoToolbar,
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
51
|
+
positionedOverEditor && positionedOverEditorStyle],
|
|
52
|
+
"data-testid": CONTENT_AREA_TEST_ID,
|
|
53
|
+
ref: containerRef
|
|
54
|
+
}, jsx(ScrollContainer
|
|
74
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
75
|
-
,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
56
|
+
, {
|
|
57
|
+
className: "fabric-editor-popup-scroll-parent",
|
|
58
|
+
featureFlags: props.featureFlags,
|
|
59
|
+
ref: scrollContainerRef
|
|
60
|
+
}, jsx(ClickAreaBlock, {
|
|
61
|
+
editorView: props.editorView,
|
|
62
|
+
editorDisabled: props.disabled
|
|
63
|
+
}, jsx("div", {
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
65
|
+
css: editorContentAreaStyle({
|
|
66
|
+
fullWidthMode: fullWidthMode,
|
|
67
|
+
layoutMaxWidth: theme.layoutMaxWidth,
|
|
68
|
+
containerWidth: width
|
|
69
|
+
}),
|
|
70
|
+
role: "region",
|
|
71
|
+
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
72
|
+
ref: contentAreaRef
|
|
73
|
+
}, jsx("div", {
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
75
|
+
css: editorContentGutterStyle()
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
77
|
+
,
|
|
78
|
+
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
79
|
+
ref: contentAreaRef
|
|
80
|
+
}, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
|
|
81
|
+
editorView: props.editorView,
|
|
82
|
+
editorActions: props.editorActions,
|
|
83
|
+
eventDispatcher: props.eventDispatcher,
|
|
84
|
+
providerFactory: props.providerFactory,
|
|
85
|
+
appearance: props.appearance,
|
|
86
|
+
items: props.contentComponents,
|
|
87
|
+
pluginHooks: props.pluginHooks,
|
|
88
|
+
contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
|
|
89
|
+
popupsMountPoint: props.popupsMountPoint,
|
|
90
|
+
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
91
|
+
popupsScrollableElement: props.popupsScrollableElement,
|
|
92
|
+
disabled: !!props.disabled,
|
|
93
|
+
containerElement: scrollContainerRef.current,
|
|
94
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
95
|
+
wrapperElement: props.wrapperElement
|
|
96
|
+
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
|
|
97
|
+
css: sidebarArea
|
|
98
|
+
}, props.contextPanel || jsx(ContextPanel, {
|
|
99
|
+
editorAPI: props.editorAPI,
|
|
100
|
+
visible: false
|
|
101
|
+
})));
|
|
102
|
+
})
|
|
103
|
+
);
|
|
100
104
|
});
|
|
101
105
|
});
|
|
102
106
|
export var FullPageContentArea = injectIntl(Content, {
|