@atlaskit/editor-core 221.3.2 → 221.3.3

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