@atlaskit/editor-core 221.4.1 → 221.5.1

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 (39) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  3. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +275 -0
  4. package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +357 -0
  5. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -344
  6. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  7. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +191 -0
  8. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +428 -0
  9. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -402
  10. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +19 -18
  11. package/dist/cjs/version-wrapper.js +1 -1
  12. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  13. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +262 -0
  14. package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +344 -0
  15. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -337
  16. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  17. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +180 -0
  18. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +420 -0
  19. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +8 -400
  20. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +18 -17
  21. package/dist/es2019/version-wrapper.js +1 -1
  22. package/dist/esm/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  23. package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +268 -0
  24. package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +346 -0
  25. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -339
  26. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  27. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +184 -0
  28. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +418 -0
  29. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +10 -398
  30. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +18 -17
  31. package/dist/esm/version-wrapper.js +1 -1
  32. package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +30 -0
  33. package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +20 -0
  34. package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -20
  35. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +56 -0
  36. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +56 -0
  37. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -54
  38. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +15 -1
  39. package/package.json +33 -33
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 221.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0bdcdc112c8b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0bdcdc112c8b0) -
8
+ migrate compiled css for comment and fullpage
9
+
10
+ ## 221.5.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`cd097a2111788`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd097a2111788) -
15
+ Republish packages depending on `@atlaskit/react-compiler-gating` so their published dependency
16
+ reference is updated to the renamed `@atlaskit/react-compiler-gating` scope.
17
+
18
+ The earlier rename of `@atlassian/react-compiler-gating` to `@atlaskit/react-compiler-gating` only
19
+ bumped the renamed package itself, so dependent packages were never republished and their
20
+ published versions still referenced the old `@atlassian/react-compiler-gating` name, which is not
21
+ available in the public npm registry. This minor bump republishes all affected packages with the
22
+ corrected dependency.
23
+
24
+ ### Patch Changes
25
+
26
+ - [`6e885938419af`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e885938419af) -
27
+ Fix scrollbar behaviour in the markdown source view (MVP layout): CodeMirror now owns its own
28
+ scrolling so its native horizontal and vertical scrollbars sit at the viewport edges with the
29
+ status-bar footer in-flow below them, and the editor's scroll container no longer renders a
30
+ redundant second vertical scrollbar. The top content inset is applied inside the scroller so it no
31
+ longer leaves a gap above the vertical scrollbar.
32
+ - Updated dependencies
33
+
3
34
  ## 221.4.1
4
35
 
5
36
  ### Patch Changes
@@ -0,0 +1,30 @@
1
+
2
+ ._19itno8c{border:var(--ds-border-width,1px) solid var(--ds-border-input,#8c8f97)}
3
+ ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
4
+ ._2rkofajl{border-radius:var(--ds-radius-small,3px)}
5
+ ._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}._13dfutpp .less-margin>.ProseMirror{margin-top:var(--ds-space-150,9pt)}
6
+ ._16jlkb7n{flex-grow:1}
7
+ ._18m91wug{overflow-y:auto}
8
+ ._19bvv77o{padding-left:var(--ds-space-025,2px)}
9
+ ._1bahesu3{justify-content:flex-end}
10
+ ._1e0c1txw{display:flex}
11
+ ._1ul9clpc{min-width:17pc}
12
+ ._2lx21bp4{flex-direction:column}
13
+ ._4cvr1h6o{align-items:center}
14
+ ._4t3i1wug{height:auto}
15
+ ._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
16
+ ._c71lmz22{max-height:var(--comment-editor-max-height)}
17
+ ._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
18
+ ._ghozu2gc .less-margin>.ProseMirror{margin-bottom:var(--ds-space-100,8px)}
19
+ ._gzr8u2gc .less-margin>.ProseMirror{margin-right:var(--ds-space-100,8px)}
20
+ ._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
21
+ ._oafwu2gc .less-margin>.ProseMirror{margin-left:var(--ds-space-100,8px)}
22
+ ._p12f1kw7{max-width:inherit}
23
+ ._p7r11txw >div{display:flex}
24
+ ._slp31hna{word-wrap:break-word}
25
+ ._t1edidpf >div{flex-shrink:0}
26
+ ._u5f3idpf{padding-right:0}
27
+ ._u5f3v47k{padding-right:var(--ds-space-250,20px)}
28
+ ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
29
+ ._vchhusvi{box-sizing:border-box}
30
+ @media (max-width:490px){._xugcidpf{padding-right:0}}
@@ -0,0 +1,275 @@
1
+ /* Comment-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.CommentEditorWithIntlCompiled = void 0;
10
+ require("./Comment-compiled.compiled.css");
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
14
+ var _react = _interopRequireWildcard(require("react"));
15
+ var _classnames = _interopRequireDefault(require("classnames"));
16
+ var _reactIntl = require("react-intl");
17
+ var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
18
+ var _new = _interopRequireDefault(require("@atlaskit/button/new"));
19
+ var _hooks = require("@atlaskit/editor-common/hooks");
20
+ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
21
+ var _ui = require("@atlaskit/editor-common/ui");
22
+ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
23
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
24
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
25
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
26
+ var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
27
+ var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
28
+ var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
29
+ var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
30
+ var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
31
+ var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
32
+ var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
33
+ var _CommentToolbar = require("./CommentToolbar");
34
+ var _Toolbar = require("./Toolbar");
35
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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; }
37
+ 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
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
39
+ * Used via `componentWithCondition` in `Comment.tsx`.
40
+ *
41
+ * Cleanup: delete this file once the experiment has shipped.
42
+ */ // Ignored via go/ees005
43
+ // eslint-disable-next-line import/no-named-as-default
44
+ var commentEditorCompiledStyles = {
45
+ commentEditorOld: "_19itno8c _2rkofajl _1e0c1txw _2lx21bp4 _1ul9clpc _4t3i1wug _bfhk1j9a _vchhusvi _p12f1kw7 _slp31hna _13dfutpp _gzr8u2gc _ghozu2gc _oafwu2gc",
46
+ commentEditor: "_19itno8c _2rko1qi0 _1e0c1txw _2lx21bp4 _1ul9clpc _4t3i1wug _bfhk1j9a _vchhusvi _p12f1kw7 _slp31hna _13dfutpp _gzr8u2gc _ghozu2gc _oafwu2gc",
47
+ modernisedEditor: "_2rkopb1k",
48
+ secondaryToolbar: "_vchhusvi _1bahesu3 _4cvr1h6o _1e0c1txw _ca0qutpp _u5f3v77o _n3tdutpp _19bvv77o",
49
+ mainToolbarCustomComponentsSlotNew: "_1e0c1txw _1bahesu3 _4cvr1h6o _16jlkb7n _u5f3v47k _p7r11txw _t1edidpf",
50
+ mainToolbarCustomComponentsSlotPaddingOverride: "_u5f3idpf",
51
+ mainToolbarCustomComponentsSlotTwoLineToolbar: "_xugcidpf",
52
+ contentAreaMaxHeight: "_c71lmz22 _18m91wug"
53
+ };
54
+ var appearance = 'comment';
55
+ var CommentEditorWithIntlCompiled = exports.CommentEditorWithIntlCompiled = function CommentEditorWithIntlCompiled(props) {
56
+ var _editorAPI$blockMenu$, _editorAPI$blockMenu;
57
+ var editorAPI = props.editorAPI;
58
+
59
+ // Get useStandardNodeWidth from block menu plugin shared state
60
+ // Only access editorAPI when the experiment is enabled to avoid performance impact
61
+ var useStandardNodeWidth = (0, _experiments.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);
62
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
63
+ var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
64
+ return {
65
+ maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
66
+ primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
67
+ editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
68
+ };
69
+ }),
70
+ editorViewMode = _useSharedPluginState.editorViewMode,
71
+ primaryToolbarComponentsState = _useSharedPluginState.primaryToolbarComponentsState,
72
+ maxContentSizeReached = _useSharedPluginState.maxContentSizeReached;
73
+ var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, primaryToolbarComponentsState);
74
+ var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(editorAPI, ['media']),
75
+ mediaState = _useSharedPluginState2.mediaState;
76
+ var intl = (0, _reactIntl.useIntl)();
77
+ var editorDOMElement = props.editorDOMElement,
78
+ editorView = props.editorView,
79
+ editorActions = props.editorActions,
80
+ eventDispatcher = props.eventDispatcher,
81
+ providerFactory = props.providerFactory,
82
+ contentComponents = props.contentComponents,
83
+ customContentComponents = props.customContentComponents,
84
+ customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
85
+ primaryToolbarComponentsProp = props.primaryToolbarComponents,
86
+ customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
87
+ popupsMountPoint = props.popupsMountPoint,
88
+ popupsBoundariesElement = props.popupsBoundariesElement,
89
+ popupsScrollableElement = props.popupsScrollableElement,
90
+ maxHeight = props.maxHeight,
91
+ _props$minHeight = props.minHeight,
92
+ minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
93
+ onSave = props.onSave,
94
+ onCancel = props.onCancel,
95
+ disabled = props.disabled,
96
+ dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
97
+ useStickyToolbar = props.useStickyToolbar,
98
+ pluginHooks = props.pluginHooks,
99
+ featureFlags = props.featureFlags,
100
+ innerRef = props.innerRef,
101
+ isEditorModernisationEnabled = props.isEditorModernisationEnabled;
102
+ var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
103
+ var containerElement = _react.default.useRef(null);
104
+
105
+ // Wrapper container for toolbar and content area
106
+ var wrapperElementRef = (0, _react.useMemo)(function () {
107
+ return innerRef || /*#__PURE__*/_react.default.createRef();
108
+ }, [innerRef]);
109
+ var _useState = (0, _react.useState)(false),
110
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
111
+ saveButtonDisabled = _useState2[0],
112
+ setSaveButtonDisabled = _useState2[1];
113
+ (0, _react.useEffect)(function () {
114
+ if (mediaState) {
115
+ mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
116
+ }
117
+ return function () {
118
+ return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
119
+ };
120
+ }, [mediaState]);
121
+ var handleSave = (0, _react.useCallback)(function () {
122
+ if (editorView && onSave) {
123
+ onSave(editorView);
124
+ }
125
+ }, [editorView, onSave]);
126
+ var handleCancel = (0, _react.useCallback)(function () {
127
+ if (editorView && onCancel) {
128
+ onCancel(editorView);
129
+ }
130
+ }, [editorView, onCancel]);
131
+ var isShortcutToFocusToolbar = (0, _react.useCallback)(function (event) {
132
+ //Alt + F9 to reach first element in this main toolbar
133
+ return event.altKey && (event.key === 'F9' || event.keyCode === 120);
134
+ }, []);
135
+
136
+ // When primary toolbar components is undefined, do not show two line editor toolbar
137
+ var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
138
+ var handleEscape = (0, _react.useCallback)(function (event) {
139
+ if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
140
+ editorView === null || editorView === void 0 || editorView.focus();
141
+ }
142
+ event.preventDefault();
143
+ event.stopPropagation();
144
+ }, [editorView]);
145
+ var primaryToolbarComponents = primaryToolbarComponentsProp;
146
+ if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
147
+ primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
148
+ }
149
+ var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
150
+ var wrapperStyle = (0, _react.useMemo)(function () {
151
+ return _objectSpread({
152
+ minHeight: "".concat(minHeight, "px")
153
+ }, maxHeight ? {
154
+ '--comment-editor-max-height': "".concat(maxHeight, "px")
155
+ } : {});
156
+ }, [minHeight, maxHeight]);
157
+ var customToolbarSlot = /*#__PURE__*/_react.default.createElement("div", {
158
+ className: (0, _runtime.ax)([commentEditorCompiledStyles.mainToolbarCustomComponentsSlotNew, isTwoLineToolbarEnabled && commentEditorCompiledStyles.mainToolbarCustomComponentsSlotTwoLineToolbar, isToolbarAIFCEnabled && commentEditorCompiledStyles.mainToolbarCustomComponentsSlotPaddingOverride])
159
+ }, customPrimaryToolbarComponents);
160
+ return /*#__PURE__*/_react.default.createElement(_WithFlash.default, {
161
+ animate: maxContentSizeReached
162
+ }, /*#__PURE__*/_react.default.createElement(_ui.WidthProvider, null, /*#__PURE__*/_react.default.createElement("div", {
163
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic minHeight/maxHeight from props
164
+ style: wrapperStyle
165
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
166
+ ,
167
+ className: (0, _runtime.ax)([(0, _expValEquals.expValEquals)('platform_editor_comment_editor_border_radius', 'isEnabled', true) ? commentEditorCompiledStyles.commentEditor : commentEditorCompiledStyles.commentEditorOld, isEditorModernisationEnabled && commentEditorCompiledStyles.modernisedEditor, "akEditor"]),
168
+ ref: wrapperElementRef
169
+ }, /*#__PURE__*/_react.default.createElement(_Toolbar.MainToolbar, {
170
+ isEditorModernisationEnabled: isEditorModernisationEnabled,
171
+ useStickyToolbar: useStickyToolbar,
172
+ twoLineEditorToolbar: isTwoLineToolbarEnabled,
173
+ isNewToolbarEnabled: isToolbarAIFCEnabled
174
+ }, isToolbarAIFCEnabled ? /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarArrowKeyNavigationProvider, {
175
+ editorView: editorView,
176
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
177
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
178
+ handleEscape: handleEscape,
179
+ editorAppearance: appearance,
180
+ useStickyToolbar: useStickyToolbar,
181
+ intl: intl
182
+ }, /*#__PURE__*/_react.default.createElement(_CommentToolbar.CommentToolbar, {
183
+ editorAPI: editorAPI,
184
+ editorView: editorView,
185
+ editorAppearance: appearance,
186
+ disabled: !!disabled,
187
+ popupsBoundariesElement: popupsBoundariesElement,
188
+ popupsScrollableElement: popupsScrollableElement,
189
+ popupsMountPoint: popupsMountPoint
190
+ }), customPrimaryToolbarComponents ? customToolbarSlot : null) : /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarArrowKeyNavigationProvider, {
191
+ editorView: editorView,
192
+ childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
193
+ isShortcutToFocusToolbar: isShortcutToFocusToolbar,
194
+ handleEscape: handleEscape,
195
+ editorAppearance: appearance,
196
+ useStickyToolbar: useStickyToolbar,
197
+ intl: intl
198
+ }, /*#__PURE__*/_react.default.createElement(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
199
+ // Ignored via go/ees005
200
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
201
+ , {
202
+ editorView: editorView,
203
+ editorActions: editorActions
204
+ // Ignored via go/ees005
205
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
206
+ ,
207
+ eventDispatcher: eventDispatcher
208
+ // Ignored via go/ees005
209
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
210
+ ,
211
+ providerFactory: providerFactory,
212
+ appearance: appearance,
213
+ items: primaryToolbarComponents,
214
+ popupsMountPoint: popupsMountPoint,
215
+ popupsBoundariesElement: popupsBoundariesElement,
216
+ popupsScrollableElement: popupsScrollableElement,
217
+ disabled: !!disabled,
218
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
219
+ containerElement: containerElement.current,
220
+ twoLineEditorToolbar: isTwoLineToolbarEnabled
221
+ }), customToolbarSlot)), /*#__PURE__*/_react.default.createElement(_ClickAreaBlock.default, {
222
+ editorView: editorView,
223
+ editorDisabled: disabled
224
+ }, /*#__PURE__*/_react.default.createElement(_ui.WidthConsumer, null, function (_ref) {
225
+ var width = _ref.width;
226
+ return /*#__PURE__*/_react.default.createElement(_EditorContentContainer.default, {
227
+ ref: containerElement,
228
+ isScrollable: maxHeight ? true : undefined
229
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
230
+ ,
231
+ className: (0, _runtime.ax)([maxHeight && commentEditorCompiledStyles.contentAreaMaxHeight, (0, _classnames.default)('ak-editor-content-area', {
232
+ 'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
233
+ })]),
234
+ featureFlags: featureFlags,
235
+ viewMode: editorViewMode,
236
+ appearance: appearance,
237
+ useStandardNodeWidth: useStandardNodeWidth
238
+ }, customContentComponents && 'before' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents), /*#__PURE__*/_react.default.createElement(_PluginSlot.default, {
239
+ editorView: editorView,
240
+ editorActions: editorActions,
241
+ eventDispatcher: eventDispatcher,
242
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
243
+ providerFactory: providerFactory,
244
+ appearance: appearance,
245
+ items: contentComponents,
246
+ popupsMountPoint: popupsMountPoint,
247
+ popupsBoundariesElement: popupsBoundariesElement,
248
+ popupsScrollableElement: popupsScrollableElement,
249
+ containerElement: containerElement.current,
250
+ disabled: !!disabled,
251
+ wrapperElement: wrapperElementRef.current,
252
+ pluginHooks: pluginHooks
253
+ }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.after) : null);
254
+ }))), showSecondaryToolbar && /*#__PURE__*/_react.default.createElement("div", {
255
+ "data-testid": "ak-editor-secondary-toolbar",
256
+ className: (0, _runtime.ax)([commentEditorCompiledStyles.secondaryToolbar])
257
+ }, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, null, !!onSave && /*#__PURE__*/_react.default.createElement(_new.default, {
258
+ appearance: "primary",
259
+ onClick: handleSave,
260
+ testId: "comment-save-button",
261
+ isDisabled: disabled || saveButtonDisabled,
262
+ interactionName: "editor-comment-save-button"
263
+ }, intl.formatMessage(_messages.default.saveButton)), !!onCancel && /*#__PURE__*/_react.default.createElement(_new.default, {
264
+ appearance: "subtle",
265
+ onClick: handleCancel,
266
+ testId: "comment-cancel-button",
267
+ isDisabled: disabled,
268
+ interactionName: "editor-comment-cancel-button"
269
+ }, intl.formatMessage(_messages.default.cancelButton))), /*#__PURE__*/_react.default.createElement("span", {
270
+ style: {
271
+ flexGrow: 1
272
+ }
273
+ }), customSecondaryToolbarComponents)));
274
+ };
275
+ CommentEditorWithIntlCompiled.displayName = 'CommentEditorAppearance';