@atlaskit/editor-core 221.3.0 → 221.3.2

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +66 -9
  3. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  4. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +275 -0
  5. package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +357 -0
  6. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -344
  7. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
  8. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +96 -0
  9. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +190 -0
  10. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +413 -0
  11. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -402
  12. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
  13. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +6 -5
  14. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +6 -4
  15. package/dist/cjs/ui/EditorContentContainer/styles/backgroundColorStyles.js +17 -6
  16. package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +2 -2
  17. package/dist/cjs/version-wrapper.js +1 -1
  18. package/dist/es2019/create-editor/ReactEditorView.js +60 -9
  19. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  20. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +262 -0
  21. package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +344 -0
  22. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -337
  23. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
  24. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +96 -0
  25. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +179 -0
  26. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +405 -0
  27. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +8 -400
  28. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
  29. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +6 -5
  30. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +8 -6
  31. package/dist/es2019/ui/EditorContentContainer/styles/backgroundColorStyles.js +16 -5
  32. package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +1 -1
  33. package/dist/es2019/version-wrapper.js +1 -1
  34. package/dist/esm/create-editor/ReactEditorView.js +66 -9
  35. package/dist/esm/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  36. package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +268 -0
  37. package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +346 -0
  38. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -339
  39. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
  40. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +96 -0
  41. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +183 -0
  42. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +403 -0
  43. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +10 -398
  44. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
  45. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +6 -5
  46. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +8 -6
  47. package/dist/esm/ui/EditorContentContainer/styles/backgroundColorStyles.js +16 -5
  48. package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +1 -1
  49. package/dist/esm/version-wrapper.js +1 -1
  50. package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +30 -0
  51. package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +20 -0
  52. package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -20
  53. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +56 -0
  54. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +56 -0
  55. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -54
  56. package/dist/types/ui/EditorContentContainer/styles/backgroundColorStyles.d.ts +7 -0
  57. package/dist/types/ui/EditorContentContainer/styles/expandStyles.d.ts +1 -1
  58. package/package.json +8 -8
@@ -0,0 +1,344 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `Comment.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
12
+
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
14
+ import { css, jsx } from '@emotion/react';
15
+ import classnames from 'classnames';
16
+ import { useIntl } from 'react-intl';
17
+ import ButtonGroup from '@atlaskit/button/button-group';
18
+ import Button from '@atlaskit/button/new';
19
+ import { useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
20
+ import messages from '@atlaskit/editor-common/messages';
21
+ import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
22
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
23
+ import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
24
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
25
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
26
+ // Ignored via go/ees005
27
+ // eslint-disable-next-line import/no-named-as-default
28
+ import ClickAreaBlock from '../../Addon/ClickAreaBlock';
29
+ import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
30
+ import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
31
+ import PluginSlot from '../../PluginSlot';
32
+ import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
33
+ import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
34
+ import WithFlash from '../../WithFlash';
35
+ import { CommentToolbar } from './CommentToolbar';
36
+ import { MainToolbar } from './Toolbar';
37
+ const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
38
+
39
+ // Remove when platform_editor_comment_editor_border_radius is cleaned up
40
+ const commentEditorStylesOld = css({
41
+ display: 'flex',
42
+ flexDirection: 'column',
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
44
+ '.less-margin > .ProseMirror': {
45
+ margin: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`
46
+ },
47
+ minWidth: '272px',
48
+ height: 'auto',
49
+ backgroundColor: "var(--ds-background-input, #FFFFFF)",
50
+ border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border-input, #8C8F97)"}`,
51
+ boxSizing: 'border-box',
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
53
+ borderRadius: "var(--ds-radius-small, 3px)",
54
+ maxWidth: 'inherit',
55
+ wordWrap: 'break-word'
56
+ });
57
+ const commentEditorStyles = css({
58
+ display: 'flex',
59
+ flexDirection: 'column',
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
61
+ '.less-margin > .ProseMirror': {
62
+ margin: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`
63
+ },
64
+ minWidth: '272px',
65
+ height: 'auto',
66
+ backgroundColor: "var(--ds-background-input, #FFFFFF)",
67
+ border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border-input, #8C8F97)"}`,
68
+ boxSizing: 'border-box',
69
+ borderRadius: "var(--ds-radius-medium, 6px)",
70
+ maxWidth: 'inherit',
71
+ wordWrap: 'break-word'
72
+ });
73
+ const modernisedEditorStyles = css({
74
+ borderRadius: "var(--ds-radius-xlarge, 12px)"
75
+ });
76
+ const secondaryToolbarStyles = css({
77
+ boxSizing: 'border-box',
78
+ justifyContent: 'flex-end',
79
+ alignItems: 'center',
80
+ display: 'flex',
81
+ padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-025, 2px)"}`
82
+ });
83
+ const mainToolbarCustomComponentsSlotStyleNew = css({
84
+ display: 'flex',
85
+ justifyContent: 'flex-end',
86
+ alignItems: 'center',
87
+ flexGrow: 1,
88
+ paddingRight: "var(--ds-space-250, 20px)",
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
90
+ '> div': {
91
+ display: 'flex',
92
+ flexShrink: 0
93
+ }
94
+ });
95
+ const mainToolbarCustomComponentsSlotStylePaddingOverride = css({
96
+ paddingRight: 0
97
+ });
98
+ const mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = css({
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
100
+ [`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
101
+ paddingRight: 0
102
+ }
103
+ });
104
+ const appearance = 'comment';
105
+ export const CommentEditorWithIntlEmotion = props => {
106
+ var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu$3;
107
+ const {
108
+ editorAPI
109
+ } = props;
110
+
111
+ // Get useStandardNodeWidth from block menu plugin shared state
112
+ // Only access editorAPI when the experiment is enabled to avoid performance impact
113
+ const useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 ? void 0 : (_editorAPI$blockMenu$2 = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu$2 === void 0 ? void 0 : (_editorAPI$blockMenu$3 = _editorAPI$blockMenu$2.currentState()) === null || _editorAPI$blockMenu$3 === void 0 ? void 0 : _editorAPI$blockMenu$3.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
114
+ const {
115
+ editorViewMode,
116
+ primaryToolbarComponentsState,
117
+ maxContentSizeReached
118
+ } = useSharedPluginStateWithSelector(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], states => {
119
+ var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
120
+ return {
121
+ maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
122
+ primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
123
+ editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
124
+ };
125
+ });
126
+ const primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarComponentsState);
127
+ const {
128
+ mediaState
129
+ } = useSharedPluginState(editorAPI, ['media']);
130
+ const intl = useIntl();
131
+ const {
132
+ editorDOMElement,
133
+ editorView,
134
+ editorActions,
135
+ eventDispatcher,
136
+ providerFactory,
137
+ contentComponents,
138
+ customContentComponents,
139
+ customPrimaryToolbarComponents,
140
+ primaryToolbarComponents: primaryToolbarComponentsProp,
141
+ customSecondaryToolbarComponents,
142
+ popupsMountPoint,
143
+ popupsBoundariesElement,
144
+ popupsScrollableElement,
145
+ maxHeight,
146
+ minHeight = 150,
147
+ onSave,
148
+ onCancel,
149
+ disabled,
150
+ dispatchAnalyticsEvent,
151
+ useStickyToolbar,
152
+ pluginHooks,
153
+ featureFlags,
154
+ innerRef,
155
+ isEditorModernisationEnabled
156
+ } = props;
157
+ const showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
158
+ const containerElement = React.useRef(null);
159
+
160
+ // Wrapper container for toolbar and content area
161
+ const wrapperElementRef = useMemo(() => innerRef || /*#__PURE__*/React.createRef(), [innerRef]);
162
+ const [saveButtonDisabled, setSaveButtonDisabled] = useState(false);
163
+ useEffect(() => {
164
+ if (mediaState) {
165
+ mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
166
+ }
167
+ return () => mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
168
+ }, [mediaState]);
169
+ const handleSave = useCallback(() => {
170
+ if (editorView && onSave) {
171
+ onSave(editorView);
172
+ }
173
+ }, [editorView, onSave]);
174
+ const handleCancel = useCallback(() => {
175
+ if (editorView && onCancel) {
176
+ onCancel(editorView);
177
+ }
178
+ }, [editorView, onCancel]);
179
+ const isShortcutToFocusToolbar = useCallback(event => {
180
+ //Alt + F9 to reach first element in this main toolbar
181
+ return event.altKey && (event.key === 'F9' || event.keyCode === 120);
182
+ }, []);
183
+
184
+ // When primary toolbar components is undefined, do not show two line editor toolbar
185
+ const isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
186
+ const handleEscape = useCallback(event => {
187
+ if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
188
+ editorView === null || editorView === void 0 ? void 0 : editorView.focus();
189
+ }
190
+ event.preventDefault();
191
+ event.stopPropagation();
192
+ }, [editorView]);
193
+ let primaryToolbarComponents = primaryToolbarComponentsProp;
194
+ if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
195
+ primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
196
+ }
197
+ const isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
198
+ const memoizedContentAreaStyles = useMemo(() => [maxHeight ?
199
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
200
+ css({
201
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
202
+ maxHeight: `${maxHeight}px`,
203
+ // When maxHeight is set, content area should have overflow-y explicitly set as auto
204
+ // As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
205
+ // This will cause the content area to have content overflowing the container
206
+ // so need to set overflow-y as auto to make sure the content area is scrollable
207
+ overflowY: 'auto'
208
+ }) : null], [maxHeight]);
209
+ const contentAreaStyles = expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? memoizedContentAreaStyles : [maxHeight ?
210
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
211
+ css({
212
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
213
+ maxHeight: `${maxHeight}px`,
214
+ // When maxHeight is set, content area should have overflow-y explicitly set as auto
215
+ // As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
216
+ // This will cause the content area to have content overflowing the container
217
+ // so need to set overflow-y as auto to make sure the content area is scrollable
218
+ overflowY: 'auto'
219
+ }) : null];
220
+ const customToolbarSlot = jsx("div", {
221
+ css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
222
+ }, customPrimaryToolbarComponents);
223
+ return jsx(WithFlash, {
224
+ animate: maxContentSizeReached
225
+ }, jsx(WidthProvider, null, jsx("div", {
226
+ css: [expValEquals('platform_editor_comment_editor_border_radius', 'isEnabled', true) ? commentEditorStyles : commentEditorStylesOld, isEditorModernisationEnabled && modernisedEditorStyles,
227
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
228
+ css({
229
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
230
+ minHeight: `${minHeight}px`
231
+ })]
232
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
233
+ ,
234
+ className: "akEditor",
235
+ ref: wrapperElementRef
236
+ }, jsx(MainToolbar, {
237
+ isEditorModernisationEnabled: isEditorModernisationEnabled,
238
+ useStickyToolbar: useStickyToolbar,
239
+ twoLineEditorToolbar: isTwoLineToolbarEnabled,
240
+ isNewToolbarEnabled: isToolbarAIFCEnabled
241
+ }, isToolbarAIFCEnabled ? jsx(ToolbarArrowKeyNavigationProvider, {
242
+ editorView: editorView,
243
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
244
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
245
+ handleEscape: handleEscape,
246
+ editorAppearance: appearance,
247
+ useStickyToolbar: useStickyToolbar,
248
+ intl: intl
249
+ }, jsx(CommentToolbar, {
250
+ editorAPI: editorAPI,
251
+ editorView: editorView,
252
+ editorAppearance: appearance,
253
+ disabled: !!disabled,
254
+ popupsBoundariesElement: popupsBoundariesElement,
255
+ popupsScrollableElement: popupsScrollableElement,
256
+ popupsMountPoint: popupsMountPoint
257
+ }), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
258
+ editorView: editorView,
259
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
260
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
261
+ handleEscape: handleEscape,
262
+ editorAppearance: appearance,
263
+ useStickyToolbar: useStickyToolbar,
264
+ intl: intl
265
+ }, jsx(Toolbar
266
+ // Ignored via go/ees005
267
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
268
+ , {
269
+ editorView: editorView,
270
+ editorActions: editorActions
271
+ // Ignored via go/ees005
272
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
273
+ ,
274
+ eventDispatcher: eventDispatcher
275
+ // Ignored via go/ees005
276
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
277
+ ,
278
+ providerFactory: providerFactory,
279
+ appearance: appearance,
280
+ items: primaryToolbarComponents,
281
+ popupsMountPoint: popupsMountPoint,
282
+ popupsBoundariesElement: popupsBoundariesElement,
283
+ popupsScrollableElement: popupsScrollableElement,
284
+ disabled: !!disabled,
285
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
286
+ containerElement: containerElement.current,
287
+ twoLineEditorToolbar: isTwoLineToolbarEnabled
288
+ }), customToolbarSlot)), jsx(ClickAreaBlock, {
289
+ editorView: editorView,
290
+ editorDisabled: disabled
291
+ }, jsx(WidthConsumer, null, ({
292
+ width
293
+ }) => {
294
+ return jsx(EditorContentContainer, {
295
+ ref: containerElement,
296
+ css: contentAreaStyles,
297
+ isScrollable: maxHeight ? true : undefined
298
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
299
+ ,
300
+ className: classnames('ak-editor-content-area', {
301
+ 'less-margin': width < akEditorMobileBreakoutPoint
302
+ }),
303
+ featureFlags: featureFlags,
304
+ viewMode: editorViewMode,
305
+ appearance: appearance,
306
+ useStandardNodeWidth: useStandardNodeWidth
307
+ }, customContentComponents && 'before' in customContentComponents ? contentComponentClickWrapper(customContentComponents.before) : contentComponentClickWrapper(customContentComponents), jsx(PluginSlot, {
308
+ editorView: editorView,
309
+ editorActions: editorActions,
310
+ eventDispatcher: eventDispatcher,
311
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
312
+ providerFactory: providerFactory,
313
+ appearance: appearance,
314
+ items: contentComponents,
315
+ popupsMountPoint: popupsMountPoint,
316
+ popupsBoundariesElement: popupsBoundariesElement,
317
+ popupsScrollableElement: popupsScrollableElement,
318
+ containerElement: containerElement.current,
319
+ disabled: !!disabled,
320
+ wrapperElement: wrapperElementRef.current,
321
+ pluginHooks: pluginHooks
322
+ }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? contentComponentClickWrapper(customContentComponents.after) : null);
323
+ }))), showSecondaryToolbar && jsx("div", {
324
+ css: secondaryToolbarStyles,
325
+ "data-testid": "ak-editor-secondary-toolbar"
326
+ }, jsx(ButtonGroup, null, !!onSave && jsx(Button, {
327
+ appearance: "primary",
328
+ onClick: handleSave,
329
+ testId: "comment-save-button",
330
+ isDisabled: disabled || saveButtonDisabled,
331
+ interactionName: "editor-comment-save-button"
332
+ }, intl.formatMessage(messages.saveButton)), !!onCancel && jsx(Button, {
333
+ appearance: "subtle",
334
+ onClick: handleCancel,
335
+ testId: "comment-cancel-button",
336
+ isDisabled: disabled,
337
+ interactionName: "editor-comment-cancel-button"
338
+ }, intl.formatMessage(messages.cancelButton))), jsx("span", {
339
+ style: {
340
+ flexGrow: 1
341
+ }
342
+ }), customSecondaryToolbarComponents)));
343
+ };
344
+ CommentEditorWithIntlEmotion.displayName = 'CommentEditorAppearance';